diff --git a/contrib/debian/rules b/contrib/debian/rules index 5c815978c..48a124527 100755 --- a/contrib/debian/rules +++ b/contrib/debian/rules @@ -1,30 +1,35 @@ #!/usr/bin/make -f # -*- mode: makefile; coding: utf-8 -*- +# Ubuntu Jammy enables LTO by default. This is great but this produces a bad +# bitcoin-qt binary on amd64 (Qt5Core segfaults at startup) for some reason, so +# we force disable it. +export DEB_BUILD_MAINT_OPTIONS = optimize=-lto + %: dh $@ --buildsystem=cmake+ninja --builddirectory=_build override_dh_auto_configure: dh_auto_configure -- \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=$$(pwd)/debian/tmp \ -DCLIENT_VERSION_IS_RELEASE=ON \ -DUSE_JEMALLOC=OFF \ -DBUILD_LIBBITCOINCONSENSUS=OFF \ -DBUILD_BITCOIN_SEEDER=OFF override_dh_auto_test: ninja -C _build check override_dh_auto_install: ninja -C _build install/strip DESTDIR= xvfb-run ninja -C _build install-manpages # Skip the dwz step since the files are stripped already. # https://manpages.debian.org/testing/debhelper/dh_dwz.1.en.html override_dh_dwz: ; # Enforce dh_missing to issue warnings when files are present but not installed. # Note that this is the default with compat level 12. override_dh_missing: dh_missing --list-missing diff --git a/contrib/gitian-signing/keys.txt b/contrib/gitian-signing/keys.txt index e2f919782..806f9afc1 100644 --- a/contrib/gitian-signing/keys.txt +++ b/contrib/gitian-signing/keys.txt @@ -1,4 +1,5 @@ 629D7E5DDDA0512BD5860F2C5D7922BBD649C4A7 deadalnix@bitcoinabc.org 3BB16D00D9A6D281591BDC76E4486356E7A81D2C jasonbcox@bitcoinabc.org B93D6215ED031A3384F5D3209C0D84E61FD02C16 fabien@bitcoinabc.org 923C3E0FF2CDE340C7618B491EF82E337380E461 marco@bitcoinabc.org +F7D2C66D608F03E15B5E1EA6CAF74C33DBE2797F fabcien@gmail.com diff --git a/contrib/release/debian-packages.sh b/contrib/release/debian-packages.sh index 448999903..3ded48a2a 100755 --- a/contrib/release/debian-packages.sh +++ b/contrib/release/debian-packages.sh @@ -1,209 +1,211 @@ #!/usr/bin/env bash export LC_ALL=C set -euo pipefail DEFAULT_DISTROS=() # Bionic: Ubuntu 18.04 LTS DEFAULT_DISTROS+=("bionic") # Focal: Ubuntu 20.04 LTS DEFAULT_DISTROS+=("focal") +# Jammy: Ubuntu 22.04 LTS +DEFAULT_DISTROS+=("jammy") DEFAULT_PPA="bitcoin-abc" DPUT_CONFIG_FILE=~/".dput.cf" TOPLEVEL="$(git rev-parse --show-toplevel)" KEYS_TXT="${TOPLEVEL}"/contrib/gitian-signing/keys.txt help_message() { cat < signer Example usage: $0 jasonbcox signer will be used to fetch the signing key fingerprint from '${KEYS_TXT}' That matching fingerprint will be used to fetch the correctly formatted name and email from GPG. signer must at least partially match the fingerprint or email in keys.txt Note: This script will prompt you to sign with your PGP key. -d, --dry-run Build and sign the packages, but do not push them to the PPA. -D, --distro Name of the distribution to package for. Can be supplied multiple times. If supplied at least once, the defaults are ignored. Defaults to: '${DEFAULT_DISTROS[@]}' -h, --help Display this help message. -p, --ppa PPA hostname. Defaults to: '${DEFAULT_PPA}'. If no config file exists at ${DPUT_CONFIG_FILE} then one will be created using '${DEFAULT_PPA}'. Setting this option to a hostname other than the default will require that you add the necessary settings to the config file. -v, --version Set the package version. Defaults to the version returned by 'bitcoind --version'. If set, version must be of the form: MAJOR.MINOR.REVISION[.OPTIONALPATCH] OPTIONALPATCH may be necessary when source files have changed but the version revision has not, as the PPA will reject source archives of the same name. EOF } DISTROS=() DRY_RUN="false" NUM_EXPECTED_ARGUMENTS=1 PACKAGE_VERSION="" PPA="${DEFAULT_PPA}" # Parse command line arguments while [[ $# -ne 0 ]]; do case $1 in -d|--dry-run) DRY_RUN="true" shift # shift past argument ;; -D|--distro) DISTROS+=("$2") shift # shift past argument shift # shift past value ;; -h|--help) help_message exit 0 ;; -p|--ppa) PPA="$2" shift # shift past argument shift # shift past value ;; -v|--version) PACKAGE_VERSION="$2" echo "${PACKAGE_VERSION}" | grep -E "[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?" || { echo "Error: package_version is not formatted correctly" echo help_message exit 20 } shift # shift past argument shift # shift past value ;; *) if [ "$#" -le "${NUM_EXPECTED_ARGUMENTS}" ]; then break fi echo "Unknown argument: $1" help_message exit 1 ;; esac done # Check for dependencies if ! command -v dput > /dev/null; then echo "Error: 'dput' is not installed." exit 10 fi if ! command -v debuild > /dev/null; then echo "Error: 'debuild' is not installed." exit 11 fi if [ "$#" -ne "${NUM_EXPECTED_ARGUMENTS}" ]; then echo "Error: Expects ${NUM_EXPECTED_ARGUMENTS} arguments" echo help_message exit 20 fi # If no distributions are explicitly set, use the defaults if [ "${#DISTROS[@]}" == 0 ]; then DISTROS=("${DEFAULT_DISTROS[@]}") fi SIGNER_FINGERPRINT=$(grep "$1" "${KEYS_TXT}" | cut -d' ' -f 1) || { echo "Error: Signer '$1' does not match any line in '${KEYS_TXT}'" exit 21 } SIGNER_EMAIL=$(grep "$1" "${KEYS_TXT}" | cut -d' ' -f 2) NUM_FINGERPRINT_MATCHES=$(echo "${SIGNER_FINGERPRINT}" | wc -l) if [ "${NUM_FINGERPRINT_MATCHES}" -ne 1 ]; then echo "Error: '$1' is expected to match only one line in '${KEYS_TXT}'. Got '${NUM_FINGERPRINT_MATCHES}'" exit 22 fi SIGNER=$(gpg --list-key "${SIGNER_FINGERPRINT}" | grep -o "\[ultimate\] .* <.*@.*>" | cut -d' ' -f 2- | grep "${SIGNER_EMAIL}") echo "Signer: ${SIGNER}" if [ -z "${SIGNER}" ]; then echo "Error: Signer key for '${SIGNER}' not found." exit 23 fi # Generate default dput config file if none exists if [ ! -f ${DPUT_CONFIG_FILE} ]; then echo "Info: No dput config file exists. Creating ${DPUT_CONFIG_FILE} now..." cat > ${DPUT_CONFIG_FILE} < debian/changelog <