mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 04:12:02 +00:00
setup: Merge multiple setup-apt-repo scripts into one.
This moves the `.asc` files into subdirectories, and writes out the according `.list` files into them. It moves from templates to written-out `.list` files for clarity and ease of implementation (Debian and Ubuntu need different templates for `zulip`), and as a way of making explicit which releases are supported for each list. For the special-case of the PGroonga signing key, we source an additional file within the directory. This simplifies the process for adding another class of `.list` file.
This commit is contained in:
committed by
Tim Abbott
parent
7d1db086c3
commit
f3eea72c2a
2
scripts/setup/apt-repos/ksplice/bionic.list
Normal file
2
scripts/setup/apt-repos/ksplice/bionic.list
Normal file
@@ -0,0 +1,2 @@
|
||||
deb http://www.ksplice.com/apt bionic ksplice
|
||||
deb-src http://www.ksplice.com/apt bionic ksplice
|
||||
2
scripts/setup/apt-repos/ksplice/focal.list
Normal file
2
scripts/setup/apt-repos/ksplice/focal.list
Normal file
@@ -0,0 +1,2 @@
|
||||
deb http://www.ksplice.com/apt focal ksplice
|
||||
deb-src http://www.ksplice.com/apt focal ksplice
|
||||
5
scripts/setup/apt-repos/zulip/bionic.list
Normal file
5
scripts/setup/apt-repos/zulip/bionic.list
Normal file
@@ -0,0 +1,5 @@
|
||||
deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
|
||||
deb-src http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
|
||||
|
||||
deb http://ppa.launchpad.net/groonga/ppa/ubuntu bionic main
|
||||
deb-src http://ppa.launchpad.net/groonga/ppa/ubuntu bionic main
|
||||
2
scripts/setup/apt-repos/zulip/bullseye.list
Normal file
2
scripts/setup/apt-repos/zulip/bullseye.list
Normal file
@@ -0,0 +1,2 @@
|
||||
deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main
|
||||
deb-src http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main
|
||||
2
scripts/setup/apt-repos/zulip/buster.list
Normal file
2
scripts/setup/apt-repos/zulip/buster.list
Normal file
@@ -0,0 +1,2 @@
|
||||
deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main
|
||||
deb-src http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main
|
||||
5
scripts/setup/apt-repos/zulip/cosmic.list
Normal file
5
scripts/setup/apt-repos/zulip/cosmic.list
Normal file
@@ -0,0 +1,5 @@
|
||||
deb http://apt.postgresql.org/pub/repos/apt/ cosmic-pgdg main
|
||||
deb-src http://apt.postgresql.org/pub/repos/apt/ cosmic-pgdg main
|
||||
|
||||
deb http://ppa.launchpad.net/groonga/ppa/ubuntu cosmic main
|
||||
deb-src http://ppa.launchpad.net/groonga/ppa/ubuntu cosmic main
|
||||
41
scripts/setup/apt-repos/zulip/custom.sh
Executable file
41
scripts/setup/apt-repos/zulip/custom.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ ! -e /usr/share/doc/groonga-apt-source/copyright ]]; then
|
||||
remove_pgroonga_apt_tmp_dir() {
|
||||
rm -rf "$pgroonga_apt_tmp_dir"
|
||||
}
|
||||
pgroonga_apt_tmp_dir=$(mktemp --directory)
|
||||
trap remove_pgroonga_apt_tmp_dir EXIT
|
||||
|
||||
{
|
||||
cd "$pgroonga_apt_tmp_dir" || exit 1
|
||||
tmp_gpg_home=.gnupg
|
||||
pgroonga_apt_sign_key="$LIST_PATH/pgroonga-packages.groonga.org.asc"
|
||||
gpg --homedir="$tmp_gpg_home" --import "$pgroonga_apt_sign_key"
|
||||
# Find fingerprint of the first key.
|
||||
pgroonga_apt_sign_key_fingerprint=$(
|
||||
gpg --homedir="$tmp_gpg_home" --with-colons --list-keys \
|
||||
| grep '^fpr:' \
|
||||
| cut --delimiter=: --fields=10 \
|
||||
| head --lines=1
|
||||
)
|
||||
release=$(lsb_release -sc)
|
||||
distribution=$(lsb_release -si | tr '[:upper:]' '[:lower:]')
|
||||
groonga_apt_source_deb="groonga-apt-source-latest-$release.deb"
|
||||
groonga_apt_source_deb_sign="$groonga_apt_source_deb.asc.$pgroonga_apt_sign_key_fingerprint"
|
||||
wget "https://packages.groonga.org/$distribution/$groonga_apt_source_deb"
|
||||
wget "https://packages.groonga.org/$distribution/$groonga_apt_source_deb_sign"
|
||||
gpg \
|
||||
--homedir="$tmp_gpg_home" \
|
||||
--verify \
|
||||
"$groonga_apt_source_deb_sign" \
|
||||
"$groonga_apt_source_deb"
|
||||
# To suppress the following warning by "apt-get install":
|
||||
# N: Download is performed unsandboxed as root as file
|
||||
# '.../groonga-apt-source-latest-$release.deb' couldn't be
|
||||
# accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
|
||||
chown _apt .
|
||||
apt-get -y install "./$groonga_apt_source_deb"
|
||||
}
|
||||
touch "$STAMP_FILE"
|
||||
fi
|
||||
5
scripts/setup/apt-repos/zulip/disco.list
Normal file
5
scripts/setup/apt-repos/zulip/disco.list
Normal file
@@ -0,0 +1,5 @@
|
||||
deb http://apt.postgresql.org/pub/repos/apt/ disco-pgdg main
|
||||
deb-src http://apt.postgresql.org/pub/repos/apt/ disco-pgdg main
|
||||
|
||||
deb http://ppa.launchpad.net/groonga/ppa/ubuntu disco main
|
||||
deb-src http://ppa.launchpad.net/groonga/ppa/ubuntu disco main
|
||||
5
scripts/setup/apt-repos/zulip/eoan.list
Normal file
5
scripts/setup/apt-repos/zulip/eoan.list
Normal file
@@ -0,0 +1,5 @@
|
||||
deb http://apt.postgresql.org/pub/repos/apt/ eoan-pgdg main
|
||||
deb-src http://apt.postgresql.org/pub/repos/apt/ eoan-pgdg main
|
||||
|
||||
deb http://ppa.launchpad.net/groonga/ppa/ubuntu eoan main
|
||||
deb-src http://ppa.launchpad.net/groonga/ppa/ubuntu eoan main
|
||||
5
scripts/setup/apt-repos/zulip/focal.list
Normal file
5
scripts/setup/apt-repos/zulip/focal.list
Normal file
@@ -0,0 +1,5 @@
|
||||
deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
|
||||
deb-src http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main
|
||||
|
||||
deb http://ppa.launchpad.net/groonga/ppa/ubuntu focal main
|
||||
deb-src http://ppa.launchpad.net/groonga/ppa/ubuntu focal main
|
||||
5
scripts/setup/apt-repos/zulip/groovy.list
Normal file
5
scripts/setup/apt-repos/zulip/groovy.list
Normal file
@@ -0,0 +1,5 @@
|
||||
deb http://apt.postgresql.org/pub/repos/apt/ groovy-pgdg main
|
||||
deb-src http://apt.postgresql.org/pub/repos/apt/ groovy-pgdg main
|
||||
|
||||
deb http://ppa.launchpad.net/groonga/ppa/ubuntu groovy main
|
||||
deb-src http://ppa.launchpad.net/groonga/ppa/ubuntu groovy main
|
||||
2
scripts/setup/apt-repos/zulip_debathena/bionic.list
Normal file
2
scripts/setup/apt-repos/zulip_debathena/bionic.list
Normal file
@@ -0,0 +1,2 @@
|
||||
deb http://debathena.mit.edu/apt bionic debathena debathena-config
|
||||
deb-src http://debathena.mit.edu/apt bionic debathena debathena-config
|
||||
Reference in New Issue
Block a user