Skip to content

Commit a154ede

Browse files
committed
upgrade gpg and deb
1 parent 3e5c025 commit a154ede

File tree

4 files changed

+8
-27
lines changed

4 files changed

+8
-27
lines changed

packaging/linux/Dockerfile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
FROM debian:buster
22
LABEL maintainer="Keybase <admin@keybase.io>"
33

4-
5-
# RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
6-
# -e 's|security.debian.org|archive.debian.org/|g' \
7-
# -e '/stretch-updates/d' /etc/apt/sources.list
8-
# RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' /etc/apt/sources.list.d/backports.list
9-
104
# Install dependencies from the standard repos.
115
# - Debian build requires 'fakeroot' and 'reprepro' (and 'dpkg-deb', but
126
# that's installed by default).
@@ -19,7 +13,7 @@ LABEL maintainer="Keybase <admin@keybase.io>"
1913
# - unzip because electron6 packager requires it
2014
RUN apt-get update
2115
RUN apt-get install -y fakeroot reprepro rpm createrepo git wget \
22-
build-essential curl python python-pip gnupg1 unzip rsync
16+
build-essential curl python python-pip gnupg2 unzip rsync
2317

2418
# Install s3cmd. See this issue for why we need a version newer than what's in
2519
# the Debian repos: https://github.com/s3tools/s3cmd/issues/437
@@ -44,6 +38,3 @@ RUN echo "$GOLANG_DOWNLOAD_SHA256 /root/go.tar.gz" | sha256sum --check --status
4438
RUN tar -C /usr/local -xzf /root/go.tar.gz
4539
RUN rm /root/go.tar.gz
4640
ENV PATH "$PATH:/usr/local/go/bin"
47-
48-
# Newer Debian gnupg1 provide `gpg1` only
49-
RUN ln -sf /usr/bin/gpg1 /usr/bin/gpg

packaging/linux/docker_build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#! /usr/bin/env bash
2+
23
# This script is the starting point for Linux packaging builds. Here's what the
34
# build does:
45
# 1) create the "keybase_packaging_v*" docker image, if it doesn't exist
@@ -57,7 +58,7 @@ gpg_tempfile="$gpg_tempdir/code_signing_key"
5758
gpg --export-secret-key --armor "$code_signing_fingerprint" > "$gpg_tempfile"
5859

5960
# Make sure the Docker image is built.
60-
image=keybase_packaging_v47
61+
image=keybase_packaging_v48
6162
if [ -z "$(sudo docker images -q "$image")" ] ; then
6263
echo "Docker image '$image' not yet built. Building..."
6364
sudo docker build -t "$image" "$clientdir/packaging/linux"

packaging/linux/inside_docker_main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ code_signing_fingerprint="$(/CLIENT/packaging/linux/fingerprint.sh)"
3131
# Specifically use GnuPG v1 for the import, because modern versions need the
3232
# decryption password here, for some stupid reason, totally duplicative of the
3333
# password they'll need again below when we load the key into the agent.
34-
gpg1 --import < /GPG/code_signing_key
34+
gpg --import < /GPG/code_signing_key
3535
true > /GPG/code_signing_key # truncate it, just in case
3636
# Use very long lifetimes for the key in memory, so that we don't forget it in
3737
# the middle of a nightly loop.

packaging/linux/rpm/layout_repo.sh

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -66,25 +66,17 @@ for arch in x86_64 ; do
6666
# hashes in a text file at the root of the Debian repo, RPM puts a separate
6767
# signature in each package file. Command copied from:
6868
# https://ask.fedoraproject.org/en/question/56107/can-gpg-agent-be-used-when-signing-rpm-packages/
69-
#
70-
# The `setsid` and `/dev/null` bits are both required to suppress the no-op
71-
# password prompt that appears despite the agent configs.
72-
echo "Signing '$rpmcopy'..."
73-
echo "Signing '$rpmcopy'...1.. $(which gpg) $(which gpg1)"
74-
# setsid -w rpm \
7569
rpm \
7670
--define "_gpg_name $code_signing_fingerprint" \
7771
--define '_signature gpg' \
78-
--define '_gpgbin /usr/bin/gpg1' \
72+
--define '_gpgbin /usr/bin/gpg' \
7973
--define '__gpg_check_password_cmd /bin/true' \
80-
--define '__gpg_sign_cmd %{__gpg} /usr/bin/gpg1 --batch --no-verbose --no-armor --use-agent --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}' \
74+
--define '__gpg_sign_cmd %{__gpg} gpg --batch --no-verbose --no-armor --use-agent --no-secmem-warning -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}' \
8175
--addsign "$rpmcopy"
82-
# --addsign "$rpmcopy" < /dev/null
8376

84-
echo "Signing '$rpmcopy'...2"
8577
# Add a standalone signature file, for user convenience. Other packaging
8678
# steps will pick this up and copy it around.
87-
/usr/bin/gpg --detach-sign --armor --use-agent --local-user "$code_signing_fingerprint" \
79+
gpg --detach-sign --armor --use-agent --local-user "$code_signing_fingerprint" \
8880
-o "$rpmcopy.sig" "$rpmcopy"
8981

9082
# Update the latest pointer. Even though the RPM repo is split by
@@ -93,15 +85,12 @@ for arch in x86_64 ; do
9385
ln -sf "repo/$arch/$rpmname" "$repo_root/$binary_name-latest-$arch.rpm"
9486
ln -sf "repo/$arch/$rpmname.sig" "$repo_root/$binary_name-latest-$arch.rpm.sig"
9587

96-
echo "Signing '$rpmcopy'...3"
9788
# Run createrepo to update the database files.
9889
"$CREATEREPO" "$repo_root/repo/$arch"
9990

100-
/usr/bin/gpg --detach-sign --armor --use-agent --local-user "$code_signing_fingerprint" \
91+
gpg --detach-sign --armor --use-agent --local-user "$code_signing_fingerprint" \
10192
-o "$repo_root/repo/$arch/repodata/repomd.xml.asc" "$repo_root/repo/$arch/repodata/repomd.xml"
10293

103-
echo "Signing '$rpmcopy'...4"
10494
# Add updateinfo.xml changelog to the repo
10595
"$MODIFYREPO" "$here/updateinfo.xml" "$repo_root/repo/$arch/repodata"
106-
echo "Signing '$rpmcopy'...5"
10796
done

0 commit comments

Comments
 (0)