s390x bootstrapping tweaks
authorChristoph Berg <myon@debian.org>
Fri, 14 Apr 2023 01:25:43 +0000 (01:25 +0000)
committerChristoph Berg <myon@debian.org>
Fri, 14 Apr 2023 01:25:43 +0000 (01:25 +0000)
README.md
jenkins/sbuild-update.sh
pgapt.conf

index ae83d645f44299a63905ecc9512e266883f959f0..8682510dfaed7fe35b79eb7326ebab69632c2dee 100644 (file)
--- a/README.md
+++ b/README.md
@@ -107,4 +107,10 @@ Do the paperwork:
 * remove from pgapt.conf; make -C repo; git commit
 * cd /srv/apt && sudo -u aptuser git pull
 * sudo -u aptuser reprepro --delete clearvanished
-* sudo -u aptuser rm -rf repo/dists/$DIST-pgdg*
+* `sudo -u aptuser rm -rf repo/dists/$DIST-pgdg*`
+
+## Adding a new architecture
+
+Same as adding a new distribution, but instead of copysrc/export, use `flood`:
+* for dist in ...; do sudo -u aptuser reprepro flood $dist-pgdg-testing $arch; done
+* in the database on repo host: `insert into architecture values ('$arch');`
index 7eb9b1414525ab83e876dcb92f81a99391ee4ab2..abaffe3f179ae34d6e33103c3c47189b7a61d6b0 100755 (executable)
@@ -18,7 +18,7 @@ for dir in . .. $HOME/apt.postgresql.org; do
   . $dir/pgapt.conf
   break
 done
-chroot="source:${distribution:=sid}-${architecture:=amd64}-sbuild"
+chroot="source:${distribution:=sid}-${architecture:=$(dpkg --print-architecture)}-sbuild"
 chroot_path="/home/chroot/$distribution-$architecture"
 set_dist_vars $distribution $architecture
 
@@ -69,17 +69,12 @@ umask 002
 
        # configure dpkg and apt
        test -e /etc/dpkg/dpkg.cfg.d/01unsafeio || echo force-unsafe-io | tee /etc/dpkg/dpkg.cfg.d/01unsafeio
+       test -e /etc/apt/apt.conf.d/20dpkg || echo 'DPkg::Options:: "--force-confnew"; DPkg::Options:: "--force-confmiss";' | tee /etc/apt/apt.conf.d/20dpkg
        test -e /etc/apt/apt.conf.d/20norecommends || echo 'APT::Install-Recommends "false";' | tee /etc/apt/apt.conf.d/20norecommends
        test -e /etc/apt/apt.conf.d/50i18n || echo 'Acquire::Languages { none; };' | tee /etc/apt/apt.conf.d/50i18n
        test -e /etc/apt/apt.conf.d/60releaseinfo || echo 'Acquire::AllowReleaseInfoChange "true" { Suite "true"; };' | tee /etc/apt/apt.conf.d/60releaseinfo # don't complain when testing gets released as stable
        rm -f /var/lib/apt/lists/*_Translation-*
 
-       # run apt.postgresql.org.sh to install repository key (ca-certificates for https:// repo URL)
-       if ! test -f /etc/apt/sources.list.d/pgdg.sources; then
-         apt-get install -y ca-certificates postgresql-common
-         /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -h$PGDG_MIRROR -st $distribution
-       fi
-
        # write sources lists
        echo "deb $mirror $distribution main" > /etc/apt/sources.list
        case $DISTRO in
@@ -106,6 +101,14 @@ umask 002
          rm -f /etc/apt/sources.list.d/backports.list*
        fi
 
+       # run apt.postgresql.org.sh to install repository key (ca-certificates for https:// repo URL)
+       if ! test -f /etc/apt/sources.list.d/pgdg.sources; then
+         apt-get install -y ca-certificates postgresql-common gnupg
+         echo | /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh # installed version might not know -h yet
+         apt-get install -y postgresql-common gnupg-
+         /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -h$PGDG_MIRROR -st $distribution
+       fi
+
        # add a local extra repo
        if [ "${LOCAL_REPO:-}" ]; then
          keyring="/usr/share/keyrings/${LOCAL_REPO_NAME:-}-archive-keyring.asc"
index 72605e569778e55e514c769e1e759939b3d3749f..5912bd62b7a9ee9e4175c678571ba629d8bd2f59 100644 (file)
@@ -76,7 +76,7 @@ set_dist_vars () { # args: $1 = distribution [$2 = architecture]
       ;;
     ubuntu)
       mirror="http://archive.ubuntu.com/ubuntu"
-      case ${architecture:-} in arm64|ppc64el)
+      case ${architecture:-} in arm64|ppc64el|s390x)
         mirror="http://ports.ubuntu.com/ubuntu-ports" ;;
       esac
       case $(hostname) in