From 6a62bff3e0e7aede256893bf1743b4698d85610c Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 3 Jan 2017 13:11:55 +0100 Subject: [PATCH 1/2] Debian package lint - Tweak description synopsis to make Debian happy - Put bash completion files in correct directory - Add a manpage for zcash-fetch-params --- contrib/DEBIAN/control | 2 +- contrib/DEBIAN/manpages/zcash-fetch-params.1 | 28 ++++++++++++++++++++ zcutil/build-debian-package.sh | 4 ++- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 contrib/DEBIAN/manpages/zcash-fetch-params.1 diff --git a/contrib/DEBIAN/control b/contrib/DEBIAN/control index b24ffc54..02eb7332 100644 --- a/contrib/DEBIAN/control +++ b/contrib/DEBIAN/control @@ -13,7 +13,7 @@ Package: zcash Version: 1.0.4 Architecture: amd64 Depends: libgomp1 -Description: An implementation of the "Zerocash" protocol. +Description: HTTPS for money. Based on Bitcoin's code, it intends to offer a far higher standard of privacy and anonymity through a sophisticiated zero-knowledge proving scheme which preserves confidentiality of transaction metadata. diff --git a/contrib/DEBIAN/manpages/zcash-fetch-params.1 b/contrib/DEBIAN/manpages/zcash-fetch-params.1 new file mode 100644 index 00000000..76dab4c2 --- /dev/null +++ b/contrib/DEBIAN/manpages/zcash-fetch-params.1 @@ -0,0 +1,28 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH ZCASH-FETCH-PARAMS "1" "January 2017" "Zcash - zcash-fetch-params" "User Commands" +.SH NAME +zcash-fetch-params \- Downloads the Zcash network parameters +.SH DESCRIPTION +Zcash \- zcash-fetch\-params +.PP +This script will fetch the Zcash zkSNARK parameters and verify their +integrity with sha256sum. +.PP +If they already exist locally, it will exit now and do nothing else. +.PP +This script will fetch the Zcash zkSNARK parameters and verify their +integrity with sha256sum. +.PP +If they already exist locally, it will exit now and do nothing else. +.SH "SEE ALSO" +The full documentation for +.B Zcash +is maintained as a Texinfo manual. If the +.B info +and +.B Zcash +programs are properly installed at your site, the command +.IP +.B info Zcash +.PP +should give you access to the complete manual. diff --git a/zcutil/build-debian-package.sh b/zcutil/build-debian-package.sh index 8d063399..39fbfe67 100755 --- a/zcutil/build-debian-package.sh +++ b/zcutil/build-debian-package.sh @@ -23,8 +23,8 @@ if [ -d $BUILD_DIR ]; then rm -R $BUILD_DIR fi -DEB_CMP=$BUILD_DIR/etc/bash_completion.d DEB_BIN=$BUILD_DIR/usr/bin +DEB_CMP=$BUILD_DIR/usr/share/bash-completion/completions DEB_DOC=$BUILD_DIR/usr/share/doc/$PACKAGE_NAME DEB_MAN=$BUILD_DIR/usr/share/man/man1 mkdir -p $BUILD_DIR/DEBIAN $DEB_CMP $DEB_BIN $DEB_DOC $DEB_MAN @@ -49,6 +49,7 @@ cp -r $SRC_DEB/examples $DEB_DOC # Copy manpages cp $SRC_DEB/manpages/zcashd.1 $DEB_MAN cp $SRC_DEB/manpages/zcash-cli.1 $DEB_MAN +cp $SRC_DEB/manpages/zcash-fetch-params.1 $DEB_MAN # Copy bash completion files cp $SRC_PATH/contrib/bitcoind.bash-completion $DEB_CMP/zcashd cp $SRC_PATH/contrib/bitcoin-cli.bash-completion $DEB_CMP/zcash-cli @@ -57,6 +58,7 @@ gzip --best -n $DEB_DOC/changelog gzip --best -n $DEB_DOC/changelog.Debian gzip --best -n $DEB_MAN/zcashd.1 gzip --best -n $DEB_MAN/zcash-cli.1 +gzip --best -n $DEB_MAN/zcash-fetch-params.1 # Create the Debian package fakeroot dpkg-deb --build $BUILD_DIR From b50b4d5c38db9914817ff11f8fa623b64273c8e9 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 3 Jan 2017 16:17:21 +0100 Subject: [PATCH 2/2] Generate Debian control file to fix shlibs lint --- .gitignore | 3 +++ contrib/{DEBIAN => debian}/changelog | 0 contrib/{DEBIAN => debian}/compat | 0 contrib/{DEBIAN => debian}/control | 10 +++++----- contrib/{DEBIAN => debian}/copyright | 0 contrib/{DEBIAN => debian}/examples/zcash.conf | 0 contrib/{DEBIAN => debian}/manpages/zcash-cli.1 | 0 .../{DEBIAN => debian}/manpages/zcash-fetch-params.1 | 0 contrib/{DEBIAN => debian}/manpages/zcashd.1 | 0 contrib/{DEBIAN => debian}/postinst | 0 contrib/{DEBIAN => debian}/postrm | 0 contrib/{DEBIAN => debian}/preinst | 0 contrib/{DEBIAN => debian}/prerm | 0 contrib/{DEBIAN => debian}/rules | 0 contrib/{DEBIAN => debian}/zcash.examples | 0 contrib/{DEBIAN => debian}/zcash.install | 0 contrib/{DEBIAN => debian}/zcash.manpages | 0 doc/release-process.md | 1 - zcutil/build-debian-package.sh | 12 ++++++++---- 19 files changed, 16 insertions(+), 10 deletions(-) rename contrib/{DEBIAN => debian}/changelog (100%) rename contrib/{DEBIAN => debian}/compat (100%) rename contrib/{DEBIAN => debian}/control (85%) rename contrib/{DEBIAN => debian}/copyright (100%) rename contrib/{DEBIAN => debian}/examples/zcash.conf (100%) rename contrib/{DEBIAN => debian}/manpages/zcash-cli.1 (100%) rename contrib/{DEBIAN => debian}/manpages/zcash-fetch-params.1 (100%) rename contrib/{DEBIAN => debian}/manpages/zcashd.1 (100%) rename contrib/{DEBIAN => debian}/postinst (100%) rename contrib/{DEBIAN => debian}/postrm (100%) rename contrib/{DEBIAN => debian}/preinst (100%) rename contrib/{DEBIAN => debian}/prerm (100%) rename contrib/{DEBIAN => debian}/rules (100%) rename contrib/{DEBIAN => debian}/zcash.examples (100%) rename contrib/{DEBIAN => debian}/zcash.install (100%) rename contrib/{DEBIAN => debian}/zcash.manpages (100%) diff --git a/.gitignore b/.gitignore index 71385956..34d16b30 100644 --- a/.gitignore +++ b/.gitignore @@ -123,3 +123,6 @@ qa/pull-tester/test.*/* /doc/doxygen/ libzcashconsensus.pc + +contrib/debian/files +contrib/debian/substvars diff --git a/contrib/DEBIAN/changelog b/contrib/debian/changelog similarity index 100% rename from contrib/DEBIAN/changelog rename to contrib/debian/changelog diff --git a/contrib/DEBIAN/compat b/contrib/debian/compat similarity index 100% rename from contrib/DEBIAN/compat rename to contrib/debian/compat diff --git a/contrib/DEBIAN/control b/contrib/debian/control similarity index 85% rename from contrib/DEBIAN/control rename to contrib/debian/control index 02eb7332..b0c220cf 100644 --- a/contrib/DEBIAN/control +++ b/contrib/debian/control @@ -3,16 +3,16 @@ Section: utils Priority: optional Maintainer: Zcash Company Homepage: https://z.cash -Build-Depends: autoconf, automake, bsdmainutils, build-essential - git, g++-multilib, libc6-dev, libtool - m4, ncurses-dev, pkg-config, python +Build-Depends: autoconf, automake, bsdmainutils, build-essential, + git, g++-multilib, libc6-dev, libtool, + m4, ncurses-dev, pkg-config, python, unzip, wget, zlib1g-dev Vcs-Git: https://github.com/zcash/zcash.git Vcs-Browser: https://github.com/zcash/zcash + Package: zcash -Version: 1.0.4 Architecture: amd64 -Depends: libgomp1 +Depends: ${shlibs:Depends} Description: HTTPS for money. Based on Bitcoin's code, it intends to offer a far higher standard of privacy and anonymity through a sophisticiated zero-knowledge diff --git a/contrib/DEBIAN/copyright b/contrib/debian/copyright similarity index 100% rename from contrib/DEBIAN/copyright rename to contrib/debian/copyright diff --git a/contrib/DEBIAN/examples/zcash.conf b/contrib/debian/examples/zcash.conf similarity index 100% rename from contrib/DEBIAN/examples/zcash.conf rename to contrib/debian/examples/zcash.conf diff --git a/contrib/DEBIAN/manpages/zcash-cli.1 b/contrib/debian/manpages/zcash-cli.1 similarity index 100% rename from contrib/DEBIAN/manpages/zcash-cli.1 rename to contrib/debian/manpages/zcash-cli.1 diff --git a/contrib/DEBIAN/manpages/zcash-fetch-params.1 b/contrib/debian/manpages/zcash-fetch-params.1 similarity index 100% rename from contrib/DEBIAN/manpages/zcash-fetch-params.1 rename to contrib/debian/manpages/zcash-fetch-params.1 diff --git a/contrib/DEBIAN/manpages/zcashd.1 b/contrib/debian/manpages/zcashd.1 similarity index 100% rename from contrib/DEBIAN/manpages/zcashd.1 rename to contrib/debian/manpages/zcashd.1 diff --git a/contrib/DEBIAN/postinst b/contrib/debian/postinst similarity index 100% rename from contrib/DEBIAN/postinst rename to contrib/debian/postinst diff --git a/contrib/DEBIAN/postrm b/contrib/debian/postrm similarity index 100% rename from contrib/DEBIAN/postrm rename to contrib/debian/postrm diff --git a/contrib/DEBIAN/preinst b/contrib/debian/preinst similarity index 100% rename from contrib/DEBIAN/preinst rename to contrib/debian/preinst diff --git a/contrib/DEBIAN/prerm b/contrib/debian/prerm similarity index 100% rename from contrib/DEBIAN/prerm rename to contrib/debian/prerm diff --git a/contrib/DEBIAN/rules b/contrib/debian/rules similarity index 100% rename from contrib/DEBIAN/rules rename to contrib/debian/rules diff --git a/contrib/DEBIAN/zcash.examples b/contrib/debian/zcash.examples similarity index 100% rename from contrib/DEBIAN/zcash.examples rename to contrib/debian/zcash.examples diff --git a/contrib/DEBIAN/zcash.install b/contrib/debian/zcash.install similarity index 100% rename from contrib/DEBIAN/zcash.install rename to contrib/debian/zcash.install diff --git a/contrib/DEBIAN/zcash.manpages b/contrib/debian/zcash.manpages similarity index 100% rename from contrib/DEBIAN/zcash.manpages rename to contrib/debian/zcash.manpages diff --git a/doc/release-process.md b/doc/release-process.md index 93b97ada..cfbf4fad 100644 --- a/doc/release-process.md +++ b/doc/release-process.md @@ -35,7 +35,6 @@ previous release: README.md src/clientversion.h configure.ac - contrib/DEBIAN/control contrib/gitian-descriptors/gitian-linux.yml Build and commit to update versions, and then perform the following commands: diff --git a/zcutil/build-debian-package.sh b/zcutil/build-debian-package.sh index 39fbfe67..55e07e68 100755 --- a/zcutil/build-debian-package.sh +++ b/zcutil/build-debian-package.sh @@ -8,7 +8,7 @@ set -x BUILD_PATH="/tmp/zcbuild" PACKAGE_NAME="zcash" SRC_PATH=`pwd` -SRC_DEB=$SRC_PATH/contrib/DEBIAN +SRC_DEB=$SRC_PATH/contrib/debian umask 022 @@ -16,7 +16,7 @@ if [ ! -d $BUILD_PATH ]; then mkdir $BUILD_PATH fi -PACKAGE_VERSION=$(grep Version $SRC_PATH/contrib/DEBIAN/control | cut -d: -f2 | tr -d ' ') +PACKAGE_VERSION=$($SRC_PATH/src/zcashd --version | grep version | cut -d' ' -f4 | tr -d v) BUILD_DIR="$BUILD_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-amd64" if [ -d $BUILD_DIR ]; then @@ -30,8 +30,6 @@ DEB_MAN=$BUILD_DIR/usr/share/man/man1 mkdir -p $BUILD_DIR/DEBIAN $DEB_CMP $DEB_BIN $DEB_DOC $DEB_MAN chmod 0755 -R $BUILD_DIR/* -# Copy control file -cp $SRC_DEB/control $BUILD_DIR/DEBIAN # Package maintainer scripts (currently empty) #cp $SRC_DEB/postinst $BUILD_DIR/DEBIAN #cp $SRC_DEB/postrm $BUILD_DIR/DEBIAN @@ -60,6 +58,12 @@ gzip --best -n $DEB_MAN/zcashd.1 gzip --best -n $DEB_MAN/zcash-cli.1 gzip --best -n $DEB_MAN/zcash-fetch-params.1 +cd $SRC_PATH/contrib + +# Create the control file +dpkg-shlibdeps $DEB_BIN/zcashd $DEB_BIN/zcash-cli +dpkg-gencontrol -P$BUILD_DIR + # Create the Debian package fakeroot dpkg-deb --build $BUILD_DIR cp $BUILD_PATH/$PACKAGE_NAME-$PACKAGE_VERSION-amd64.deb $SRC_PATH