Browse Source

Added option to publish new packages to S3 and create Yum repository

pull/1943/head
Greg Szabo 8 years ago
parent
commit
aa3ec15dc4
5 changed files with 65 additions and 9 deletions
  1. +19
    -6
      devops/rpmbuild/Makefile
  2. +19
    -0
      devops/rpmbuild/RPM-GPG-KEY-Tendermint
  3. +3
    -3
      devops/rpmbuild/spectemplates/basecoin.spec
  4. +12
    -0
      devops/rpmbuild/tendermint-dev.repo
  5. +12
    -0
      devops/rpmbuild/tendermint.repo

+ 19
- 6
devops/rpmbuild/Makefile View File

@ -31,12 +31,12 @@ endif
binaries = tendermint basecoin ethermint
build-binaries = build-tendermint build-basecoin build-ethermint
dist-binaries = dist-tendermint dist-basecoin dist-ethermint
package-binaries = package-tendermint package-basecoin package-ethermint
all: $(binaries)
build: $(build-binaries)
dist: $(dist-binaries)
$(binaries): %: build-% dist-% ;
package: $(package-binaries)
$(binaries): %: build-% package-% ;
###
# Building the binaries is not in the spec file, because in the spec file you already need to know the version number
@ -68,18 +68,31 @@ prepare-spec-%: $(GOPATH)/bin/%
echo "Release: $(BUILD_NUMBER)" >> SPECS/$*.spec
cat spectemplates/$*.spec >> SPECS/$*.spec
dist-tendermint: prepare-spec-tendermint
package-tendermint: prepare-spec-tendermint
$(info Packaging tendermint version $(tendermint_version))
rpmbuild -bb SPECS/tendermint.spec --sign
dist-basecoin: prepare-spec-basecoin
package-basecoin: prepare-spec-basecoin
$(info Packaging basecoin version $(basecoin_version))
rpmbuild -bb SPECS/basecoin.spec --sign
dist-ethermint: prepare-spec-ethermint ;
package-ethermint: prepare-spec-ethermint ;
$(info Packaging ethermint version $(ethermint_version))
rpmbuild -bb SPECS/ethermint.spec --sign
install-%:
#Make sure your host has the IAM role to read/write the S3 bucket OR that you set up ~/.boto
aws s3 sync s3://tendermint-packages/centos/ tmp/s3/
mkdir -p tmp/s3/7/cr/x86_64/Packages
cp -r RPMS/x86_64/$** tmp/s3/7/cr/x86_64/Packages
cp ./RPM-GPG-KEY-Tendermint tmp/s3/7/os/x86_64/
cp ./tendermint.repo tmp/s3/7/os/x86_64/
cp ./tendermint-dev.repo tmp/s3/7/cr/x86_64/
createrepo tmp/s3/7/cr/x86_64/Packages -u http://tendermint-packages.s3-website-us-west-1.amazonaws.com/centos/7/cr/x86_64/Packages -o tmp/s3/7/cr/x86_64 --update -S --repo Tendermint --content tendermint --content basecoin --content ethermint
#Asks about overwrite
gpg --clearsign tmp/s3/7/cr/x86_64/repodata/repomd.xml
aws s3 sync tmp/s3/ s3://tendermint-packages/centos/ --acl public-read
mostlyclean:
rm -rf {BUILDROOT,SOURCES,SPECS,SRPMS,tmp}


+ 19
- 0
devops/rpmbuild/RPM-GPG-KEY-Tendermint View File

@ -0,0 +1,19 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)
mQENBFk97ngBCADaiPQFKJI7zWYdUKqC490DzY9g9LatsWoJErK5LuMXwEnF5i+a
UkygueukA4C5U7L71l5EeOB9rtb6AbkF4IEZsmmp93APec/3Vfbac9xvK4dBdiht
F8SrazPdHeR6AKcZH8ZpG/+mdONvGb/gEgtxVjaeIJFpCbjKLlKEXazh2zamhhth
q+Nn/17QmI3KBiaGqQK5w4kGZ4mZPy6fXMQhW5dDMq9f4anlGIAYi9O53dVxsx2S
5d+NHuGer5Ps0u6WMJi/e+UT2EGwzP6ygOxkIjyhMFuVftabOtSSrRHHetw8UAaI
N/RPn2gSbQtOQ7unzHDXp3/o6/r2nDEErPyJABEBAAG0LkdyZWcgU3phYm8gKFRl
bmRlcm1pbnQpIDxncmVnQHBoaWxvc29iZWFyLmNvbT6JATkEEwECACMFAlk97ngC
GwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRDIkIHIISLL6bX/CACXTKmO
u5XgvJICH0pHNeVS5/4Om1Rsg1xNmEkGFBP8N2fqn576exbOLgWLSyNHTEyrJNoc
iTeUtod2qqbVGwRgWm1zeiP8NBYiQ9SUbqskIqcPavJNGWIxsCB0p/odoZah8xSj
tGrkoyoxrc+7z2JgKYK8SVSkJXQkzuc5/ZlY85ci5gPKQhlo5YDqGo+4U9n/Ieo5
nkF8LBalFC2j7A7sQNroEicpulpGhIq3jyUHtadX01z3pNzuX+wfHX9futoet0YS
tG2007WoPGV0whGnoKxmk0JhwzhscC2XNtJl1GZcwqOOlPU9eGtZuPKj/HBAlRtz
4xTOAcklpg8soqRA
=jNDW
-----END PGP PUBLIC KEY BLOCK-----

+ 3
- 3
devops/rpmbuild/spectemplates/basecoin.spec View File

@ -58,17 +58,17 @@ EOF
# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml
proxy_app = "tcp://127.0.0.1:46658"
proxy_app = "tcp://127.0.0.1:36658"
moniker = ""
fast_sync = true
db_backend = "leveldb"
log_level = "debug"
[rpc]
laddr = "tcp://0.0.0.0:46657"
laddr = "tcp://0.0.0.0:36657"
[p2p]
laddr = "tcp://0.0.0.0:46656"
laddr = "tcp://0.0.0.0:36656"
seeds = ""
EOF
%{__cat} << EOF > .%{_sysconfdir}/systemd/system/%{name}.service


+ 12
- 0
devops/rpmbuild/tendermint-dev.repo View File

@ -0,0 +1,12 @@
#This is the .repo file for the Tendermint CentOS repositories.
#Although it has only been tested under CentOS 7, it should work under Fedora and RedHat 7 too.
#Currently only 64-bit packages are built.
[tendermint-dev]
name=Tendermint development releases repository
baseurl=http://tendermint-packages.s3-website-us-west-1.amazonaws.com/centos/7/cr/x86_64
gpgcheck=1
gpgkey=http://tendermint-packages.s3-website-us-west-1.amazonaws.com/centos/7/os/x86_64/RPM-GPG-KEY-Tendermint
enabled=1
#sslverify = 1

+ 12
- 0
devops/rpmbuild/tendermint.repo View File

@ -0,0 +1,12 @@
#This is the .repo file for the Tendermint CentOS repositories.
#Although it has only been tested under CentOS 7, it should work under Fedora and RedHat 7 too.
#Currently only 64-bit packages are built.
[tendermint]
name=Tendermint stable releases repository
baseurl=http://tendermint-packages.s3-website-us-west-1.amazonaws.com/centos/7/os/x86_64
gpgcheck=1
gpgkey=http://tendermint-packages.s3-website-us-west-1.amazonaws.com/centos/7/os/x86_64/RPM-GPG-KEY-Tendermint
enabled=1
#sslverify = 1

Loading…
Cancel
Save