mv tools files to tools repo

This commit is contained in:
Zach Ramsay
2018-07-10 11:15:39 -04:00
parent 65487586f8
commit 2f4ab0c068
105 changed files with 0 additions and 3 deletions

4
tools/build/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
BUILD
RPMS
SPECS
tmp

204
tools/build/LICENSE Normal file
View File

@ -0,0 +1,204 @@
Tendermint Core
License: Apache2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2016 All in Bits, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

289
tools/build/Makefile Normal file
View File

@ -0,0 +1,289 @@
##
# Extra checks, because we do not use autoconf.
##
requirements_check = true
gpg_check = false
go_min_version = 1.9.4
gpg_key = 2122CBE9
ifeq ($(requirements_check),true)
ifndef GOPATH
$(error GOPATH not set)
else
go_version := $(shell go version | sed "s/^.* go\([0-9\.]*\) .*$$/\1/" )
$(info Found go version $(go_version))
go_version_check := $(shell echo -e "$(go_min_version)\n$(go_version)" | sort -V | head -1)
ifneq ($(go_min_version),$(go_version_check))
$(error go version go_min_version or above is required)
endif
endif
ifeq ($(gpg_check),true)
gpg_check := $(shell gpg -K | grep '/$(gpg_key) ' | sed 's,^.*/\($(gpg_key)\) .*$$,\1,')
ifneq ($(gpg_check),$(gpg_key))
$(error GPG key $(gpg_key) not found.)
else
$(info GPG key $(gpg_key) found)
endif
ifndef GPG_PASSPHRASE
$(error GPG_PASSPHRASE not set)
endif
endif
endif
###
# Here comes the real deal
###
binaries = tendermint basecoind ethermint gaia
build-binaries = build-tendermint build-basecoind build-ethermint build-gaia
package-rpm = package-rpm-tendermint package-rpm-basecoind package-rpm-ethermint package-rpm-gaia
install-rpm = install-rpm-tendermint install-rpm-basecoind install-rpm-ethermint install-rpm-gaia
package-deb = package-deb-tendermint package-deb-basecoind package-deb-ethermint package-deb-gaia
install-deb = install-deb-tendermint install-deb-basecoind install-deb-ethermint install-deb-gaia
all: $(binaries)
build: $(build-binaries)
package: $(package-rpm) $(package-deb)
install: $(install-rpm) $(install-deb)
$(binaries): %: build-% package-rpm-% package-deb-%
###
# Build the binaries
###
git-branch:
$(eval GIT_BRANCH=$(shell echo $${GIT_BRANCH:-master}))
gopath-setup:
test -d $(GOPATH) || mkdir -p $(GOPATH)
test -d $(GOPATH)/bin || mkdir -p $(GOPATH)/bin
test -d $(GOPATH)/src || mkdir -p $(GOPATH)/src
build-tendermint: git-branch gopath-setup
@echo "*** Building tendermint"
go get -d -u github.com/tendermint/tendermint/cmd/tendermint
cd $(GOPATH)/src/github.com/tendermint/tendermint && git checkout "$(GIT_BRANCH)" && git pull
export PATH=$(GOPATH)/bin:$(PATH) && $(MAKE) -C $(GOPATH)/src/github.com/tendermint/tendermint get_tools get_vendor_deps build
cp $(GOPATH)/src/github.com/tendermint/tendermint/build/tendermint $(GOPATH)/bin
@echo "*** Built tendermint"
build-ethermint: git-branch gopath-setup
@echo "*** Building ethermint"
go get -d -u github.com/tendermint/ethermint/cmd/ethermint
cd $(GOPATH)/src/github.com/tendermint/ethermint && git checkout "$(GIT_BRANCH)" && git pull
export PATH=$(GOPATH)/bin:$(PATH) && $(MAKE) -C $(GOPATH)/src/github.com/tendermint/ethermint get_vendor_deps build
cp $(GOPATH)/src/github.com/tendermint/ethermint/build/ethermint $(GOPATH)/bin
@echo "*** Built ethermint"
build-gaia: git-branch gopath-setup
@echo "*** Building gaia"
go get -d -u go github.com/cosmos/gaia || echo "Workaround for go downloads."
cd $(GOPATH)/src/github.com/cosmos/gaia && git checkout "$(GIT_BRANCH)" && git pull
export PATH=$(GOPATH)/bin:$(PATH) && $(MAKE) -C $(GOPATH)/src/github.com/cosmos/gaia get_vendor_deps install
@echo "*** Built gaia"
build-basecoind: git-branch gopath-setup
@echo "*** Building basecoind from cosmos-sdk"
go get -d -u github.com/cosmos/cosmos-sdk/examples/basecoin/cmd/basecoind
cd $(GOPATH)/src/github.com/cosmos/cosmos-sdk && git checkout "$(GIT_BRANCH)" && git pull
export PATH=$(GOPATH)/bin:$(PATH) && $(MAKE) -C $(GOPATH)/src/github.com/cosmos/cosmos-sdk get_tools get_vendor_deps build
cp $(GOPATH)/src/github.com/cosmos/cosmos-sdk/build/basecoind $(GOPATH)/bin/basecoind
@echo "*** Built basecoind from cosmos-sdk"
###
# Prepare package files
###
# set app_version
version-%:
@echo "Checking if binary exists"
test -f $(GOPATH)/bin/$*
@echo "BUILD_NUMBER is $(BUILD_NUMBER)"
test -n "$(BUILD_NUMBER)"
$(eval $*_version=$(shell $(GOPATH)/bin/$* version | head -1 | cut -d- -f1 | sed 's/^\(ethermint:\s*\|\)\(v\|\)//' | tr -d '\t ' ))
# set build_folder
folder-%: version-%
$(eval build_folder=BUILD/$*-$($*_version)-$(BUILD_NUMBER))
# clean up folder structure for package files
prepare-files = rm -rf $(build_folder) && mkdir -p $(build_folder) && cp -r ./$(1)/* $(build_folder) && mkdir -p $(build_folder)/usr/bin && cp $(GOPATH)/bin/$(1) $(build_folder)/usr/bin
##
## Package customizations for the different applications
##
prepare-tendermint =
prepare-ethermint = mkdir -p $(build_folder)/etc/ethermint && \
cp $(GOPATH)/src/github.com/tendermint/ethermint/setup/genesis.json $(build_folder)/etc/ethermint/genesis.json && \
cp -r $(GOPATH)/src/github.com/tendermint/ethermint/setup/keystore $(build_folder)/etc/ethermint
prepare-gaia =
prepare-basecoind = cp $(GOPATH)/bin/basecoind $(build_folder)/usr/bin
###
# Package the binary for CentOS/RedHat (RPM) and Debian/Ubuntu (DEB)
###
# Depends on rpmbuild, sorry, this can only be built on CentOS/RedHat machines.
package-rpm-%: folder-%
@echo "*** Packaging RPM $* version $($*_version)"
$(call prepare-files,$*)
$(call prepare-$*)
rm -rf $(build_folder)/DEBIAN
mkdir -p $(build_folder)/usr/share/licenses/$*
cp ./LICENSE $(build_folder)/usr/share/licenses/$*/LICENSE
chmod -Rf a+rX,u+w,g-w,o-w $(build_folder)
mkdir -p {SPECS,tmp}
./generate-spec $* spectemplates SPECS
sed -i "s/@VERSION@/$($*_version)/" SPECS/$*.spec
sed -i "s/@BUILD_NUMBER@/$(BUILD_NUMBER)/" SPECS/$*.spec
sed -i "s/@PACKAGE_NAME@/$*/" SPECS/$*.spec
rpmbuild -bb SPECS/$*.spec --define "_topdir `pwd`" --define "_tmppath `pwd`/tmp"
./sign RPMS/x86_64/$*-$($*_version)-$(BUILD_NUMBER).x86_64.rpm "$(gpg_key)" "`which gpg`"
rpm -Kv RPMS/x86_64/$*-$($*_version)-$(BUILD_NUMBER).x86_64.rpm || echo "rpm returns non-zero exist for some reason. ($?)"
@echo "*** Packaged RPM $* version $($*_version)"
package-deb-%: folder-%
@echo "*** Packaging DEB $* version $($*_version)-$(BUILD_NUMBER)"
$(call prepare-files,$*)
$(call prepare-$*)
mkdir -p $(build_folder)/usr/share/doc/$*
cp $(build_folder)/DEBIAN/copyright $(build_folder)/usr/share/doc/$*
chmod -Rf a+rX,u+w,g-w,o-w $(build_folder)
sed -i "s/@VERSION@/$($*_version)-$(BUILD_NUMBER)/" $(build_folder)/DEBIAN/changelog
sed -i "s/@STABILITY@/stable/" $(build_folder)/DEBIAN/changelog
sed -i "s/@DATETIMESTAMP@/`date +%a,\ %d\ %b\ %Y\ %T\ %z`/" $(build_folder)/DEBIAN/changelog
sed -i "s/@VERSION@/$($*_version)-$(BUILD_NUMBER)/" $(build_folder)/DEBIAN/control
gzip -c $(build_folder)/DEBIAN/changelog > $(build_folder)/usr/share/doc/$*/changelog.Debian.gz
gzip -c $(build_folder)/DEBIAN/changelog > $(build_folder)/usr/share/doc/$*/changelog.Debian.amd64.gz
sed -i "s/@INSTALLEDSIZE@/`du -ks $(build_folder) | cut -f 1`/" $(build_folder)/DEBIAN/control
cd $(build_folder) && tar --owner=root --group=root -cvJf ../../tmp/data.tar.xz --exclude DEBIAN *
cd $(build_folder)/DEBIAN && tar --owner=root --group=root -cvzf ../../../tmp/control.tar.gz *
echo "2.0" > tmp/debian-binary
cp ./_gpg tmp/
cd tmp && sed -i "s/@DATETIMESTAMP@/`date +%a\ %b\ %d\ %T\ %Y`/" _gpg
cd tmp && sed -i "s/@BINMD5@/`md5sum debian-binary | cut -d\ -f1`/" _gpg
cd tmp && sed -i "s/@BINSHA1@/`sha1sum debian-binary | cut -d\ -f1`/" _gpg
cd tmp && sed -i "s/@BINSIZE@/`stat -c %s debian-binary | cut -d\ -f1`/" _gpg
cd tmp && sed -i "s/@CONMD5@/`md5sum control.tar.gz | cut -d\ -f1`/" _gpg
cd tmp && sed -i "s/@CONSHA1@/`sha1sum control.tar.gz | cut -d\ -f1`/" _gpg
cd tmp && sed -i "s/@CONSIZE@/`stat -c %s control.tar.gz | cut -d\ -f1`/" _gpg
cd tmp && sed -i "s/@DATMD5@/`md5sum data.tar.xz | cut -d\ -f1`/" _gpg
cd tmp && sed -i "s/@DATSHA1@/`sha1sum data.tar.xz | cut -d\ -f1`/" _gpg
cd tmp && sed -i "s/@DATSIZE@/`stat -c %s data.tar.xz | cut -d\ -f1`/" _gpg
gpg --batch --passphrase "$(GPG_PASSPHRASE)" --clearsign tmp/_gpg
mv tmp/_gpg.asc tmp/_gpgbuilder
ar r tmp/$*-$($*_version)-$(BUILD_NUMBER)_amd64.deb tmp/debian-binary tmp/control.tar.gz tmp/data.tar.xz tmp/_gpgbuilder
mv tmp/$*-$($*_version)-$(BUILD_NUMBER)_amd64.deb RPMS/
rm tmp/debian-binary tmp/control.tar.gz tmp/data.tar.xz tmp/_gpgbuilder tmp/_gpg
@echo "*** Packaged DEB $* version $($*_version)-$(BUILD_NUMBER)"
install-rpm-%: version-%
#Make sure your host has the IAM role to read/write the S3 bucket OR that you set up ~/.boto
@echo "*** Uploading $*-$($*_version)-$(BUILD_NUMBER).x86_64.rpm to AWS $(DEVOPS_PATH)CentOS repository"
aws s3 sync s3://tendermint-packages/$(DEVOPS_PATH)centos/ tmp/s3/ --delete
mkdir -p tmp/s3/7/os/x86_64/Packages
cp RPMS/x86_64/$*-$($*_version)-$(BUILD_NUMBER).x86_64.rpm tmp/s3/7/os/x86_64/Packages
cp ./RPM-GPG-KEY-Tendermint tmp/s3/7/os/x86_64/
cp ./tendermint.repo tmp/s3/7/os/x86_64/
rm -f tmp/s3/7/os/x86_64/repodata/*.bz2 tmp/s3/7/os/x86_64/repodata/*.gz tmp/s3/7/os/x86_64/repodata/repomd.xml.asc
createrepo tmp/s3/7/os/x86_64/Packages -u https://tendermint-packages.interblock.io/$(DEVOPS_PATH)centos/7/os/x86_64/Packages -o tmp/s3/7/os/x86_64 --update -S --repo Tendermint --content tendermint --content basecoind --content ethermint
gpg --batch --passphrase "$(GPG_PASSPHRASE)" --detach-sign -a tmp/s3/7/os/x86_64/repodata/repomd.xml
aws s3 sync tmp/s3/ s3://tendermint-packages/$(DEVOPS_PATH)centos/ --delete --acl public-read
@echo "*** Uploaded $* to AWS $(DEVOPS_PATH)CentOS repository"
install-deb-%: version-%
@echo "*** Uploading $*-$($*_version)-$(BUILD_NUMBER)_amd64.deb to AWS $(DEVOPS_PATH)Debian repository"
@echo "Testing if $*-$($*_version)-$(BUILD_NUMBER)_amd64.deb is already uploaded"
test ! -f tmp/debian-s3/pool/$*-$($*_version)-$(BUILD_NUMBER)_amd64.deb
aws s3 sync s3://tendermint-packages/$(DEVOPS_PATH)debian/ tmp/debian-s3/ --delete
@echo "Testing if $*-$($*_version)-$(BUILD_NUMBER)_amd64.deb is already uploaded"
test ! -f tmp/debian-s3/pool/$*-$($*_version)-$(BUILD_NUMBER)_amd64.deb
cp ./tendermint.list tmp/debian-s3/
mkdir -p tmp/debian-s3/pool tmp/debian-s3/dists/stable/main/binary-amd64
cp RPMS/$*-$($*_version)-$(BUILD_NUMBER)_amd64.deb tmp/debian-s3/pool
cp ./Release_amd64 tmp/debian-s3/dists/stable/main/binary-amd64/Release
#Packages / Packages.gz
echo > tmp/Package
echo "Filename: pool/$*-$($*_version)-$(BUILD_NUMBER)_amd64.deb" >> tmp/Package
echo "MD5sum: `md5sum RPMS/$*-$($*_version)-$(BUILD_NUMBER)_amd64.deb | cut -d\ -f 1`" >> tmp/Package
echo "SHA1: `sha1sum RPMS/$*-$($*_version)-$(BUILD_NUMBER)_amd64.deb | cut -d\ -f 1`" >> tmp/Package
echo "SHA256: `sha256sum RPMS/$*-$($*_version)-$(BUILD_NUMBER)_amd64.deb | cut -d\ -f 1`" >> tmp/Package
echo "Size: `stat -c %s RPMS/$*-$($*_version)-$(BUILD_NUMBER)_amd64.deb | cut -d\ -f 1`" >> tmp/Package
cat BUILD/$*-$($*_version)-$(BUILD_NUMBER)/DEBIAN/control >> tmp/Package
cat tmp/Package >> tmp/debian-s3/dists/stable/main/binary-amd64/Packages
rm -f tmp/debian-s3/dists/stable/main/binary-amd64/Packages.gz
gzip -c tmp/debian-s3/dists/stable/main/binary-amd64/Packages > tmp/debian-s3/dists/stable/main/binary-amd64/Packages.gz
rm -f tmp/Package
#main / Release / InRelease / Release.gpg
cp ./Release tmp/debian-s3/dists/stable/main/Release
rm -f tmp/debian-s3/dists/stable/main/InRelease
rm -f tmp/debian-s3/dists/stable/main/Release.gpg
echo "MD5Sum:" >> tmp/debian-s3/dists/stable/main/Release
cd tmp/debian-s3/dists/stable/main && for f in `find . -type f | sed 's/^.\///'` ; do test "$$f" == "Release" && continue ; echo -n " " ; md5sum $$f | sed "s/ / `stat -c %s $$f` /" ; done >> Release
echo "SHA1:" >> tmp/debian-s3/dists/stable/main/Release
cd tmp/debian-s3/dists/stable/main && for f in `find . -type f | sed 's/^.\///'` ; do test "$$f" == "Release" && continue ; echo -n " " ; sha1sum $$f | sed "s/ / `stat -c %s $$f` /" ; done >> Release
echo "SHA256:" >> tmp/debian-s3/dists/stable/main/Release
cd tmp/debian-s3/dists/stable/main && for f in `find . -type f | sed 's/^.\///'` ; do test "$$f" == "Release" && continue ; echo -n " " ; sha256sum $$f | sed "s/ / `stat -c %s $$f` /" ; done >> Release
gpg --batch --passphrase "$(GPG_PASSPHRASE)" --digest-algo SHA256 -b -a tmp/debian-s3/dists/stable/main/Release
mv tmp/debian-s3/dists/stable/main/Release.asc tmp/debian-s3/dists/stable/main/Release.gpg
gpg --batch --passphrase "$(GPG_PASSPHRASE)" --digest-algo SHA512 --clearsign tmp/debian-s3/dists/stable/main/Release
mv tmp/debian-s3/dists/stable/main/Release.asc tmp/debian-s3/dists/stable/main/InRelease
#stable / Release / InRelease / Release.gpg
cp ./Release tmp/debian-s3/dists/stable/Release
rm -f tmp/debian-s3/dists/stable/InRelease
rm -f tmp/debian-s3/dists/stable/Release.gpg
echo "MD5Sum:" >> tmp/debian-s3/dists/stable/Release
cd tmp/debian-s3/dists/stable && for f in `find . -type f | sed 's/^.\///'` ; do test "$$f" == "Release" && continue ; echo -n " " ; md5sum $$f | sed "s/ / `stat -c %s $$f` /" ; done >> Release
echo "SHA1:" >> tmp/debian-s3/dists/stable/Release
cd tmp/debian-s3/dists/stable && for f in `find . -type f | sed 's/^.\///'` ; do test "$$f" == "Release" && continue ; echo -n " " ; sha1sum $$f | sed "s/ / `stat -c %s $$f` /" ; done >> Release
echo "SHA256:" >> tmp/debian-s3/dists/stable/Release
cd tmp/debian-s3/dists/stable && for f in `find . -type f | sed 's/^.\///'` ; do test "$$f" == "Release" && continue ; echo -n " " ; sha256sum $$f | sed "s/ / `stat -c %s $$f` /" ; done >> Release
gpg --batch --passphrase "$(GPG_PASSPHRASE)" --digest-algo SHA256 -b -a tmp/debian-s3/dists/stable/Release
mv tmp/debian-s3/dists/stable/Release.asc tmp/debian-s3/dists/stable/Release.gpg
gpg --batch --passphrase "$(GPG_PASSPHRASE)" --digest-algo SHA512 --clearsign tmp/debian-s3/dists/stable/Release
mv tmp/debian-s3/dists/stable/Release.asc tmp/debian-s3/dists/stable/InRelease
aws s3 sync tmp/debian-s3/ s3://tendermint-packages/$(DEVOPS_PATH)debian/ --delete --acl public-read
@echo "*** Uploaded $*-$($*_version)-$(BUILD_NUMBER)_amd64.deb to AWS $(DEVOPS_PATH)Debian repository"
mostlyclean:
rm -rf {BUILDROOT,SOURCES,SPECS,SRPMS,tmp}
clean: mostlyclean
rm -rf {BUILD,RPMS}
distclean: clean
rm -rf $(GOPATH)/src/github.com/tendermint/tendermint
rm -rf $(GOPATH)/src/github.com/cosmos/cosmos-sdk
rm -rf $(GOPATH)/src/github.com/tendermint/ethermint
rm -rf $(GOPATH)/bin/tendermint
rm -rf $(GOPATH)/bin/basecoind
rm -rf $(GOPATH)/bin/ethermint
rm -rf $(GOPATH)/bin/gaia
.PHONY : clean

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-----

7
tools/build/Release Normal file
View File

@ -0,0 +1,7 @@
Origin: Tendermint
Label: Tendermint
Suite: stable
Date: Fri, 16 Jun 2017 19:44:00 UTC
Architectures: amd64
Components: main
Description: Tendermint repository

View File

@ -0,0 +1,5 @@
Archive: stable
Component: main
Origin: Tendermint
Label: Tendermint
Architecture: amd64

8
tools/build/_gpg Normal file
View File

@ -0,0 +1,8 @@
Version: 4
Signer:
Date: @DATETIMESTAMP@
Role: builder
Files:
@BINMD5@ @BINSHA1@ @BINSIZE@ debian-binary
@CONMD5@ @CONSHA1@ @CONSIZE@ control.tar.gz
@DATMD5@ @DATSHA1@ @DATSIZE@ data.tar.xz

View File

@ -0,0 +1,6 @@
basecoind (@VERSION@) @STABILITY@; urgency=medium
* Automatic build. See https://github.com/cosmos/cosmos-sdk for more information.
-- Greg Szabo <greg@philosobear.com> @DATETIMESTAMP@

View File

@ -0,0 +1 @@
9

View File

@ -0,0 +1,14 @@
Source: basecoind
Section: net
Priority: optional
Maintainer: Greg Szabo <greg@philosobear.com>
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.6
Homepage: https://tendermint.com
Package: basecoind
Architecture: amd64
Version: @VERSION@
Installed-Size: @INSTALLEDSIZE@
Description: basecoind is a Proof-of-Stake cryptocurrency and framework
Basecoind is an ABCI application designed to be used with the Tendermint consensus engine to form a Proof-of-Stake cryptocurrency. It also provides a general purpose framework for extending the feature-set of the cryptocurrency by implementing plugins.

View File

@ -0,0 +1,21 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: basecoind
Source: https://github.com/cosmos/cosmos-sdk
Files: *
Copyright: 2017 All In Bits, Inc.
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the full text of the Apache License 2.0 can be found
in the file `/usr/share/common-licenses/Apache-2.0'.

View File

@ -0,0 +1,41 @@
#!/bin/sh
# postinst script for basecoind
#
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
chown basecoind.basecoind /etc/basecoind
sudo -Hu basecoind basecoind node init --home /etc/basecoind 2B24DEE2364762300168DF19B6C18BCE2D399EA2
systemctl daemon-reload
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,41 @@
#!/bin/sh
# postrm script for basecoin
#
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
upgrade|failed-upgrade|abort-upgrade)
systemctl daemon-reload
;;
purge|remove|abort-install|disappear)
systemctl daemon-reload
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,38 @@
#!/bin/sh
# preinst script for basecoind
#
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
install|upgrade)
if ! grep -q '^basecoind:' /etc/passwd ; then
useradd -k /dev/null -r -m -b /etc basecoind
chmod 755 /etc/basecoind
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,38 @@
#!/bin/sh
# prerm script for basecoin
#
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|upgrade|deconfigure)
systemctl stop basecoind 2> /dev/null || :
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,2 @@
disable basecoind.service

View File

@ -0,0 +1,18 @@
[Unit]
Description=Basecoind
Requires=network-online.target
After=network-online.target
[Service]
Environment="BCHOME=/etc/basecoind"
Restart=on-failure
User=basecoind
Group=basecoind
PermissionsStartOnly=true
ExecStart=/usr/bin/basecoind start
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGTERM
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,12 @@
{
"address": "1B1BE55F969F54064628A63B9559E7C21C925165",
"priv_key": {
"type": "ed25519",
"data": "C70D6934B4F55F1B7BC33B56B9CA8A2061384AFC19E91E44B40C4BBA182953D1619D3678599971ED29C7529DDD4DA537B97129893598A17C82E3AC9A8BA95279"
},
"pub_key": {
"type": "ed25519",
"data": "619D3678599971ED29C7529DDD4DA537B97129893598A17C82E3AC9A8BA95279"
}
}

View File

@ -0,0 +1,12 @@
{
"address": "1DA7C74F9C219229FD54CC9F7386D5A3839F0090",
"priv_key": {
"type": "ed25519",
"data": "34BAE9E65CE8245FAD035A0E3EED9401BDE8785FFB3199ACCF8F5B5DDF7486A8352195DA90CB0B90C24295B90AEBA25A5A71BC61BAB2FE2387241D439698B7B8"
},
"pub_key": {
"type": "ed25519",
"data": "352195DA90CB0B90C24295B90AEBA25A5A71BC61BAB2FE2387241D439698B7B8"
}
}

View File

@ -0,0 +1,6 @@
ethermint (@VERSION@) @STABILITY@; urgency=medium
* Automatic build. See https://github.com/tendermint/tendermint for more information.
-- Greg Szabo <greg@philosobear.com> @DATETIMESTAMP@

View File

@ -0,0 +1 @@
9

View File

@ -0,0 +1,15 @@
Source: ethermint
Section: net
Priority: optional
Maintainer: Greg Szabo <greg@philosobear.com>
Build-Depends: debhelper (>=9)
Depends: tendermint (>=0.11.0)
Standards-Version: 3.9.6
Homepage: https://tendermint.com
Package: ethermint
Architecture: amd64
Version: @VERSION@
Installed-Size: @INSTALLEDSIZE@
Description: ethermint enables ethereum as an ABCI application on tendermint and the COSMOS hub
Ethermint enables ethereum to run as an ABCI application on tendermint and the COSMOS hub. This application allows you to get all the benefits of ethereum without having to run your own miners.

View File

@ -0,0 +1,21 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ethermint
Source: https://github.com/tendermint/ethermint
Files: *
Copyright: 2017 All In Bits, Inc.
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the full text of the Apache License 2.0 can be found
in the file `/usr/share/common-licenses/Apache-2.0'.

View File

@ -0,0 +1,46 @@
#!/bin/sh
# postinst script for ethermint
#
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
chown ethermint.ethermint /etc/ethermint
chown ethermint.ethermint /etc/ethermint/genesis.json
chown ethermint.ethermint /etc/ethermint/keystore
chown ethermint.ethermint /etc/ethermint/keystore/UTC--2016-10-21T22-30-03.071787745Z--7eff122b94897ea5b0e2a9abf47b86337fafebdc
sudo -Hu ethermint /usr/bin/ethermint --datadir /etc/ethermint init /etc/ethermint/genesis.json
sudo -Hu ethermint tendermint init --home /etc/ethermint
systemctl daemon-reload
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,41 @@
#!/bin/sh
# postrm script for ethermint
#
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
upgrade|failed-upgrade|abort-upgrade)
systemctl daemon-reload
;;
purge|remove|abort-install|disappear)
systemctl daemon-reload
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,38 @@
#!/bin/sh
# preinst script for ethermint
#
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
install|upgrade)
if ! grep -q '^ethermint:' /etc/passwd ; then
useradd -k /dev/null -r -m -b /etc ethermint
chmod 755 /etc/ethermint
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,38 @@
#!/bin/sh
# prerm script for ethermint
#
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|upgrade|deconfigure)
systemctl stop ethermint 2> /dev/null || :
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,2 @@
disable ethermint.service

View File

@ -0,0 +1,17 @@
[Unit]
Description=Ethermint
Requires=network-online.target
After=network-online.target
[Service]
Restart=on-failure
User=ethermint
Group=ethermint
PermissionsStartOnly=true
ExecStart=/usr/bin/ethermint --datadir /etc/ethermint
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGTERM
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,6 @@
gaia (@VERSION@) @STABILITY@; urgency=medium
* Automatic build. See https://github.com/tendermint/basecoin for more information.
-- Greg Szabo <greg@philosobear.com> @DATETIMESTAMP@

View File

@ -0,0 +1 @@
9

View File

@ -0,0 +1,14 @@
Source: gaia
Section: net
Priority: optional
Maintainer: Greg Szabo <greg@philosobear.com>
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.6
Homepage: https://cosmos.network
Package: gaia
Architecture: amd64
Version: @VERSION@
Installed-Size: @INSTALLEDSIZE@
Description: gaia - Tendermint Cosmos delegation game chain
Gaia description comes later.

View File

@ -0,0 +1,21 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: gaia
Source: https://github.com/cosmos/gaia
Files: *
Copyright: 2017 All In Bits, Inc.
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the full text of the Apache License 2.0 can be found
in the file `/usr/share/common-licenses/Apache-2.0'.

View File

@ -0,0 +1,41 @@
#!/bin/sh
# postinst script for gaia
#
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
chown gaia.gaia /etc/gaia
sudo -Hu gaia gaia node init --home /etc/gaia 2B24DEE2364762300168DF19B6C18BCE2D399EA2
systemctl daemon-reload
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,41 @@
#!/bin/sh
# postrm script for gaia
#
set -e
# summary of how this script can be called:
# * <postrm> `remove'
# * <postrm> `purge'
# * <old-postrm> `upgrade' <new-version>
# * <new-postrm> `failed-upgrade' <old-version>
# * <new-postrm> `abort-install'
# * <new-postrm> `abort-install' <old-version>
# * <new-postrm> `abort-upgrade' <old-version>
# * <disappearer's-postrm> `disappear' <overwriter>
# <overwriter-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
upgrade|failed-upgrade|abort-upgrade)
systemctl daemon-reload
;;
purge|remove|abort-install|disappear)
systemctl daemon-reload
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,38 @@
#!/bin/sh
# preinst script for gaia
#
set -e
# summary of how this script can be called:
# * <new-preinst> `install'
# * <new-preinst> `install' <old-version>
# * <new-preinst> `upgrade' <old-version>
# * <old-preinst> `abort-upgrade' <new-version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
install|upgrade)
if ! grep -q '^gaia:' /etc/passwd ; then
useradd -k /dev/null -r -m -b /etc gaia
chmod 755 /etc/gaia
fi
;;
abort-upgrade)
;;
*)
echo "preinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,38 @@
#!/bin/sh
# prerm script for gaia
#
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see https://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|upgrade|deconfigure)
systemctl stop gaia 2> /dev/null || :
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,2 @@
disable gaia.service

View File

@ -0,0 +1,17 @@
[Unit]
Description=Gaia
Requires=network-online.target
After=network-online.target
[Service]
Restart=on-failure
User=gaia
Group=gaia
PermissionsStartOnly=true
ExecStart=/usr/bin/gaia node start --home=/etc/gaia
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGTERM
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,12 @@
{
"address": "1B1BE55F969F54064628A63B9559E7C21C925165",
"priv_key": {
"type": "ed25519",
"data": "C70D6934B4F55F1B7BC33B56B9CA8A2061384AFC19E91E44B40C4BBA182953D1619D3678599971ED29C7529DDD4DA537B97129893598A17C82E3AC9A8BA95279"
},
"pub_key": {
"type": "ed25519",
"data": "619D3678599971ED29C7529DDD4DA537B97129893598A17C82E3AC9A8BA95279"
}
}

View File

@ -0,0 +1,12 @@
{
"address": "1DA7C74F9C219229FD54CC9F7386D5A3839F0090",
"priv_key": {
"type": "ed25519",
"data": "34BAE9E65CE8245FAD035A0E3EED9401BDE8785FFB3199ACCF8F5B5DDF7486A8352195DA90CB0B90C24295B90AEBA25A5A71BC61BAB2FE2387241D439698B7B8"
},
"pub_key": {
"type": "ed25519",
"data": "352195DA90CB0B90C24295B90AEBA25A5A71BC61BAB2FE2387241D439698B7B8"
}
}

36
tools/build/generate-spec Executable file
View File

@ -0,0 +1,36 @@
#!/bin/bash
if [ $# -ne 3 ]; then
echo "Usage: $0 <application> <template_source_dir> <SPEC_dir>"
exit 1
fi
app=$1
src=$2
dst=$3
# Find spectemplate
if [ ! -f "$src/$app.spec" ]; then
if [ ! -f "$src/app-template.spec" ]; then
echo "Source template not found."
exit 1
else
srcfile="$src/app-template.spec"
fi
else
srcfile="$src/$app.spec"
fi
# Copy spectemplate to SPECS
cp "$srcfile" "$dst/$app.spec"
# Apply any variables defined in .data
if [ -f "$src/$app.data" ]; then
srcdata="$src/$app.data"
source "$srcdata"
for var in `grep -v -e ^# -e ^\s*$ "$srcdata" | grep = | sed 's/\s*=.*$//'`
do
sed -i "s\\@${var}@\\${!var}\\g" "$dst/$app.spec"
done
fi

26
tools/build/sign Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/expect -f
set timeout 3
set PACKAGE [lindex $argv 0]
set GPG_NAME [lindex $argv 1]
set GPG_PATH [lindex $argv 2]
set GPG_PASSPHRASE $env(GPG_PASSPHRASE)
if {[llength $argv] == 0} {
send_user "Usage: ./sign <rpm_package> <gpg_key> <gpg_binary>\n"
exit 1
}
send_user "\nSigning $PACKAGE\n"
spawn rpmsign --resign $PACKAGE --define "_signature gpg" --define "_gpg_name $GPG_NAME" --define "_gpgbin $GPG_PATH"
expect {
timeout { send_user "\nTimeout signing $PACKAGE\n"; exit 1 }
"Enter pass phrase:"
}
send "$GPG_PASSPHRASE\r"
expect {
timeout { send_user "\nTimeout signing $PACKAGE\n"; exit 1 }
"Pass phrase is good."
}
interact
sleep 3

View File

@ -0,0 +1,55 @@
Version: @VERSION@
Release: @BUILD_NUMBER@
%define __spec_install_post %{nil}
%define debug_package %{nil}
%define __os_install_post %{nil}
Name: @PACKAGE_NAME@
Summary: @PACKAGE_SUMMARY@
License: Apache 2.0
URL: @PACKAGE_URL@
Packager: Greg Szabo
@PACKAGE_ADDITIONAL_HEADER@
%description
@PACKAGE_DESCRIPTION@
%pre
if ! %{__grep} -q '^%{name}:' /etc/passwd ; then
useradd -r -b %{_sysconfdir} %{name}
mkdir -p %{_sysconfdir}/%{name}
chmod 755 %{_sysconfdir}/%{name}
chown %{name}.%{name} %{_sysconfdir}/%{name}
fi
%prep
# Nothing to do here. - It is done in the Makefile.
%build
# Nothing to do here.
%install
cd %{name}-%{version}-%{release}
%{__cp} -a * %{buildroot}
%post
sudo -Hu %{name} %{name} node init --home %{_sysconfdir}/%{name} 2B24DEE2364762300168DF19B6C18BCE2D399EA2
systemctl daemon-reload
%preun
systemctl stop %{name} 2> /dev/null || :
%postun
systemctl daemon-reload
%files
%ghost %attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}
%{_bindir}/*
%{_sysconfdir}/systemd/system/*
%{_sysconfdir}/systemd/system-preset/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%dir %{_defaultlicensedir}/%{name}
%doc %{_defaultlicensedir}/%{name}/LICENSE

View File

@ -0,0 +1,5 @@
PACKAGE_SUMMARY="basecoind is a Proof-of-Stake cryptocurrency and framework"
PACKAGE_URL="https://cosmos.network/"
PACKAGE_ADDITIONAL_HEADER="Provides: basecoind"
PACKAGE_DESCRIPTION="Basecoind is an ABCI application designed to be used with the Tendermint consensus engine to form a Proof-of-Stake cryptocurrency. It also provides a general purpose framework for extending the feature-set of the cryptocurrency by implementing plugins."

View File

@ -0,0 +1,5 @@
PACKAGE_SUMMARY="ethermint enables ethereum as an ABCI application on tendermint and the COSMOS hub"
PACKAGE_URL="https://tendermint.com/"
PACKAGE_ADDITIONAL_HEADER="Provides: ethermint"
PACKAGE_DESCRIPTION="Ethermint enables ethereum to run as an ABCI application on tendermint and the COSMOS hub. This application allows you to get all the benefits of ethereum without having to run your own miners."

View File

@ -0,0 +1,60 @@
Version: @VERSION@
Release: @BUILD_NUMBER@
%define __spec_install_post %{nil}
%define debug_package %{nil}
%define __os_install_post %{nil}
Name: @PACKAGE_NAME@
Summary: @PACKAGE_SUMMARY@
License: Apache 2.0
URL: @PACKAGE_URL@
Packager: Greg Szabo
Requires: tendermint >= 0.11.0
@PACKAGE_ADDITIONAL_HEADER@
%description
@PACKAGE_DESCRIPTION@
%pre
if ! %{__grep} -q '^%{name}:' /etc/passwd ; then
useradd -r -b %{_sysconfdir} %{name}
mkdir -p %{_sysconfdir}/%{name}
chmod 755 %{_sysconfdir}/%{name}
chown %{name}.%{name} %{_sysconfdir}/%{name}
fi
%prep
# Nothing to do here. - It is done in the Makefile.
%build
# Nothing to do here.
%install
cd %{name}-%{version}-%{release}
%{__cp} -a * %{buildroot}
%post
sudo -Hu %{name} tendermint init --home %{_sysconfdir}/%{name}
sudo -Hu %{name} %{name} --datadir %{_sysconfdir}/%{name} init %{_sysconfdir}/%{name}/genesis.json
systemctl daemon-reload
%preun
systemctl stop %{name} 2> /dev/null || :
systemctl stop %{name}-service 2> /dev/null || :
%postun
systemctl daemon-reload
%files
%attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}
%config(noreplace) %attr(0644, %{name}, %{name}) %{_sysconfdir}/%{name}/genesis.json
%attr(0755, %{name}, %{name}) %dir %{_sysconfdir}/%{name}/keystore
%attr(0644, %{name}, %{name}) %{_sysconfdir}/%{name}/keystore/*
%{_bindir}/*
%{_sysconfdir}/systemd/system/*
%{_sysconfdir}/systemd/system-preset/*
%dir %{_defaultlicensedir}/%{name}
%doc %{_defaultlicensedir}/%{name}/LICENSE

View File

@ -0,0 +1,5 @@
PACKAGE_SUMMARY="gaia - Tendermint Cosmos delegation game chain"
PACKAGE_URL="https://cosmos.network/"
PACKAGE_ADDITIONAL_HEADER=""
PACKAGE_DESCRIPTION="Gaia description comes later."

View File

@ -0,0 +1,31 @@
Version: @VERSION@
Release: @BUILD_NUMBER@
%define __spec_install_post %{nil}
%define debug_package %{nil}
%define __os_install_post %{nil}
Name: tendermint
Summary: securely and consistently replicate an application on many machines
License: Apache 2.0
URL: https://tendermint.com/
Packager: Greg Szabo
%description
Tendermint is software for securely and consistently replicating an application on many machines. By securely, we mean that Tendermint works even if up to 1/3 of machines fail in arbitrary ways. By consistently, we mean that every non-faulty machine sees the same transaction log and computes the same state.
%prep
# Nothing to do here. - It is done in the Makefile.
%build
# Nothing to do here.
%install
cd %{name}-%{version}-%{release}
%{__cp} -a * %{buildroot}
%files
%{_bindir}/tendermint
%dir %{_defaultlicensedir}/%{name}
%doc %{_defaultlicensedir}/%{name}/LICENSE

View File

@ -0,0 +1 @@
deb http://tendermint-packages.s3-website-us-west-1.amazonaws.com/debian stable main

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=https://do9rmxapsag1v.cloudfront.net/centos/7/os/x86_64
gpgcheck=1
gpgkey=https://do9rmxapsag1v.cloudfront.net/centos/7/os/x86_64/RPM-GPG-KEY-Tendermint
enabled=1
#sslverify = 1

View File

@ -0,0 +1,6 @@
tendermint (@VERSION@) @STABILITY@; urgency=medium
* Automatic build. See https://github.com/tendermint/tendermint for more information.
-- Greg Szabo <greg@philosobear.com> @DATETIMESTAMP@

View File

@ -0,0 +1 @@
9

View File

@ -0,0 +1,14 @@
Source: tendermint
Section: net
Priority: optional
Maintainer: Greg Szabo <greg@philosobear.com>
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.6
Homepage: https://tendermint.com
Package: tendermint
Architecture: amd64
Version: @VERSION@
Installed-Size: @INSTALLEDSIZE@
Description: securely and consistently replicate an application on many machines
Tendermint is software for securely and consistently replicating an application on many machines. By securely, we mean that Tendermint works even if up to 1/3 of machines fail in arbitrary ways. By consistently, we mean that every non-faulty machine sees the same transaction log and computes the same state.

View File

@ -0,0 +1,21 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: tendermint
Source: https://github.com/tendermint/tendermint
Files: *
Copyright: 2017 All In Bits, Inc.
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the full text of the Apache License 2.0 can be found
in the file `/usr/share/common-licenses/Apache-2.0'.