]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
GHA: tidy up `apt` commands
authorViktor Szakats <commit@vsz.me>
Wed, 29 Jan 2025 18:46:25 +0000 (19:46 +0100)
committerViktor Szakats <commit@vsz.me>
Thu, 30 Jan 2025 01:36:43 +0000 (02:36 +0100)
- drop `--quiet 2` option where used, to have uniform output.
- replace `apt` with `apt-get` in one job. sync options with rest.
- replace deprecated `apt-key` command with the alternative recommended
  by `apt-key(8)`.
- drop stray `cd /tmp`, no longer needed after migrating to GHA.
- shorten `--option Dpkg::Use-Pty=0` to `-o Dpkg::Use-Pty=0`.
- add `-o Dpkg::Use-Pty=0` to hide `apt-get` progress bars taking
  vertical log space, where missing.
- drop `-y --no-install-suggests --no-install-recommends` `apt-get`
  options. They are the default in the ubuntu-24.04 image.
- GHA/distcheck: move `name:` to top in steps where not there.
- scripts/cijobs.pl: catch `apt-get` lines with the `-o` option.

Closes #16127

.github/workflows/checkdocs.yml
.github/workflows/checksrc.yml
.github/workflows/configure-vs-cmake.yml
.github/workflows/distcheck.yml
.github/workflows/http3-linux.yml
.github/workflows/linux-old.yml
.github/workflows/linux.yml
.github/workflows/non-native.yml
.github/workflows/windows.yml
scripts/cijobs.pl

index bda9767be28457d72bc592ecc09966a0ebcbfc3c..81c3755ae62324057cc1cea3fdf4c127e816ca3a 100644 (file)
@@ -46,9 +46,8 @@ jobs:
   #      - name: install prereqs
   #        run: |
   #          sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-  #          sudo apt-get update -y
-  #          sudo apt-get install -y --no-install-suggests --no-install-recommends \
-  #            python3-proselint
+  #          sudo apt-get -o Dpkg::Use-Pty=0 update
+  #          sudo apt-get -o Dpkg::Use-Pty=0 install python3-proselint
   #
   #      # config file help: https://github.com/amperser/proselint/
   #      - name: create proselint config
index 72f341323dbbab51099b54082874e110209d2a33..83a5f396a432fc1a2cca809ecd9c5005eaa66641 100644 (file)
@@ -56,8 +56,8 @@ jobs:
           DEBIAN_FRONTEND: noninteractive
         run: |
           sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update -y
-          sudo apt-get install -y --no-install-suggests --no-install-recommends \
+          sudo apt-get -o Dpkg::Use-Pty=0 update
+          sudo apt-get -o Dpkg::Use-Pty=0 install \
             codespell python3-pip python3-networkx python3-pydot python3-yaml \
             python3-toml python3-markupsafe python3-jinja2 python3-tabulate \
             python3-typing-extensions python3-libcst python3-impacket \
index 736978f8e9a7b10d9793654d8cc926ed6d7d3b7d..724fff96f2b467764c7d48a638081175f863cbfc 100644 (file)
@@ -112,7 +112,7 @@ jobs:
       TRIPLET: 'x86_64-w64-mingw32'
     steps:
       - name: 'install packages'
-        run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install mingw-w64
+        run: sudo apt-get -o Dpkg::Use-Pty=0 install mingw-w64
 
       - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
         with:
index 5f0b213cd6d4f93ef2504a731d30749d5a902256..58465f275640a0efdeb0abb9b0915ad1e63f0bb8 100644 (file)
@@ -28,21 +28,20 @@ jobs:
         with:
           persist-credentials: false
 
-      - run: sudo apt-get purge -y curl libcurl4 libcurl4-doc
-        name: 'remove preinstalled curl libcurl4{-doc}'
+      - name: 'remove preinstalled curl libcurl4{-doc}'
+        run: sudo apt-get -o Dpkg::Use-Pty=0 purge curl libcurl4 libcurl4-doc
 
-      - run: autoreconf -fi
-        name: 'autoreconf'
+      - name: 'autoreconf'
+        run: autoreconf -fi
 
-      - run: ./configure --without-ssl --without-libpsl
-        name: 'configure'
+      - name: 'configure'
+        run: ./configure --without-ssl --without-libpsl
 
-      - run: make V=1
-        name: 'make'
+      - name: 'make'
+        run: make V=1
 
       - name: 'maketgz'
-        run: |
-          SOURCE_DATE_EPOCH=1711526400 ./scripts/maketgz 99.98.97
+        run: SOURCE_DATE_EPOCH=1711526400 ./scripts/maketgz 99.98.97
 
       - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
         with:
@@ -50,7 +49,8 @@ jobs:
           path: 'curl-99.98.97.tar.gz'
           retention-days: 1
 
-      - run: |
+      - name: 'verify in-tree configure build including install'
+        run: |
           echo "::stop-commands::$(uuidgen)"
           tar xvf curl-99.98.97.tar.gz
           pushd curl-99.98.97
@@ -62,7 +62,6 @@ jobs:
           # basic check of the installed files
           bash scripts/installcheck.sh $HOME/temp
           rm -rf curl-99.98.97
-        name: 'verify in-tree configure build including install'
 
   verify-out-of-tree-docs:
     runs-on: ubuntu-latest
@@ -73,7 +72,8 @@ jobs:
         with:
           name: 'release-tgz'
 
-      - run: |
+      - name: 'verify out-of-tree configure build including docs'
+        run: |
           echo "::stop-commands::$(uuidgen)"
           tar xvf curl-99.98.97.tar.gz
           touch curl-99.98.97/docs/{cmdline-opts,libcurl}/Makefile.inc
@@ -85,7 +85,6 @@ jobs:
           popd
           rm -rf build
           rm -rf curl-99.98.97
-        name: 'verify out-of-tree configure build including docs'
 
   verify-out-of-tree-autotools-debug:
     runs-on: ubuntu-latest
@@ -96,7 +95,8 @@ jobs:
         with:
           name: 'release-tgz'
 
-      - run: |
+      - name: 'verify out-of-tree autotools debug build'
+        run: |
           echo "::stop-commands::$(uuidgen)"
           tar xvf curl-99.98.97.tar.gz
           pushd curl-99.98.97
@@ -106,7 +106,6 @@ jobs:
           make -j5
           make -j5 test-ci
           make -j5 install
-        name: 'verify out-of-tree autotools debug build'
 
   verify-out-of-tree-cmake:
     runs-on: ubuntu-latest
@@ -117,13 +116,13 @@ jobs:
         with:
           name: 'release-tgz'
 
-      - run: |
+      - name: 'verify out-of-tree cmake build'
+        run: |
           echo "::stop-commands::$(uuidgen)"
           tar xvf curl-99.98.97.tar.gz
           pushd curl-99.98.97
           cmake -B build -DCURL_WERROR=ON -DCURL_USE_LIBPSL=OFF
           make -C build -j5
-        name: 'verify out-of-tree cmake build'
 
   missing-files:
     runs-on: ubuntu-latest
@@ -148,11 +147,11 @@ jobs:
         with:
           persist-credentials: false
 
-      - run: sudo apt-get purge -y curl libcurl4 libcurl4-doc
-        name: 'remove preinstalled curl libcurl4{-doc}'
+      - name: 'remove preinstalled curl libcurl4{-doc}'
+        run: sudo apt-get -o Dpkg::Use-Pty=0 purge curl libcurl4 libcurl4-doc
 
-      - run: ./scripts/dmaketgz 9.10.11
-        name: 'generate release tarballs'
+      - name: 'generate release tarballs'
+        run: ./scripts/dmaketgz 9.10.11
 
       - name: 'verify release tarballs'
         run: |
index dc9d2883fc4cb58063add406ca6b7ecf43b84e46..f6296356dd2d6092a3f5e46d559967b91a153d37 100644 (file)
@@ -129,8 +129,8 @@ jobs:
         if: steps.settings.outputs.needs-build == 'true'
         run: |
           sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update -y
-          sudo apt-get install -y --no-install-suggests --no-install-recommends \
+          sudo apt-get -o Dpkg::Use-Pty=0 update
+          sudo apt-get -o Dpkg::Use-Pty=0 install \
             libtool autoconf automake pkgconf stunnel4 \
             libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev \
             nettle-dev libp11-kit-dev libtspi-dev libunistring-dev guile-2.2-dev libtasn1-bin \
@@ -289,8 +289,8 @@ jobs:
       - name: 'install prereqs'
         run: |
           sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update -y
-          sudo apt-get install -y --no-install-suggests --no-install-recommends \
+          sudo apt-get -o Dpkg::Use-Pty=0 update
+          sudo apt-get -o Dpkg::Use-Pty=0 install \
             libtool autoconf automake ninja-build pkgconf stunnel4 \
             libpsl-dev libbrotli-dev libzstd-dev zlib1g-dev libev-dev libc-ares-dev \
             nettle-dev libp11-kit-dev libtspi-dev libunistring-dev guile-2.2-dev libtasn1-bin \
index af458426a6e37014a60fdda5c716b74e2c1ec898..3878e80862f4e6f18b84def62c579565cbc4910d 100644 (file)
@@ -60,14 +60,14 @@ jobs:
         # Remember, this shell is dash, not bash
         run: |
           sed -E -i -e s@[a-z]+\.debian\.org/@archive.debian.org/debian-archive/@ -e '/ stretch-updates /d' /etc/apt/sources.list
-          apt-get update
+          apt-get -o Dpkg::Use-Pty=0 update
           # See comment above if this fails after 2025-05-20
-          apt-get install -y --no-install-suggests --no-install-recommends httrack
+          apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends httrack
           httrack --get https://deb.freexian.com/extended-lts/pool/main/f/freexian-archive-keyring/freexian-archive-keyring_2022.06.08_all.deb
           dpkg -i freexian-archive-keyring_2022.06.08_all.deb
           echo 'deb http://deb.freexian.com/extended-lts stretch-lts main contrib non-free' | tee /etc/apt/sources.list.d/extended-lts.list
-          apt-get update
-          apt-get install -y --no-install-suggests --no-install-recommends cmake make automake autoconf libtool gcc pkg-config libpsl-dev libzstd-dev zlib1g-dev libssl1.0-dev libssh-dev libssh2-1-dev libc-ares-dev heimdal-dev libldap2-dev librtmp-dev stunnel4 groff
+          apt-get -o Dpkg::Use-Pty=0 update
+          apt-get -o Dpkg::Use-Pty=0 install -y --no-install-suggests --no-install-recommends cmake make automake autoconf libtool gcc pkg-config libpsl-dev libzstd-dev zlib1g-dev libssl1.0-dev libssh-dev libssh2-1-dev libc-ares-dev heimdal-dev libldap2-dev librtmp-dev stunnel4 groff
           # GitHub's actions/checkout needs a newer glibc. This one is the
           # latest available for buster, the next stable release after stretch.
           httrack --get https://security.debian.org/debian-security/pool/updates/main/g/glibc/libc6_2.28-10+deb10u4_amd64.deb
index ebe46fbe7ddf5c94a0a2a949988000e0918783d1..6274d100d60ab4ab1b30e85a92570900691dc93c 100644 (file)
@@ -301,8 +301,8 @@ jobs:
         if: matrix.build.container == null && !contains(matrix.build.name, 'i686')
         run: |
           sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update -y
-          sudo apt-get install -y --no-install-suggests --no-install-recommends \
+          sudo apt-get -o Dpkg::Use-Pty=0 update
+          sudo apt-get -o Dpkg::Use-Pty=0 install \
             libtool autoconf automake pkgconf ninja-build \
             ${{ matrix.build.install_steps != 'skipall' && matrix.build.install_steps != 'skiprun' && 'stunnel4' || '' }} \
             libpsl-dev libbrotli-dev libzstd-dev \
@@ -314,8 +314,8 @@ jobs:
         run: |
           sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
           sudo dpkg --add-architecture i386
-          sudo apt-get update -y
-          sudo apt-get install -y --no-install-suggests --no-install-recommends \
+          sudo apt-get -o Dpkg::Use-Pty=0 update
+          sudo apt-get -o Dpkg::Use-Pty=0 install \
             libtool autoconf automake pkgconf stunnel4 \
             libpsl-dev:i386 libbrotli-dev:i386 libzstd-dev:i386 \
             ${{ matrix.build.install_packages }}
@@ -324,8 +324,7 @@ jobs:
       - name: 'install prereqs for pytest'
         if: contains(matrix.build.install_steps, 'pytest')
         run: |
-          sudo apt-get install -y --no-install-suggests --no-install-recommends \
-            apache2 apache2-dev libnghttp2-dev vsftpd
+          sudo apt-get -o Dpkg::Use-Pty=0 install apache2 apache2-dev libnghttp2-dev vsftpd
 
       - name: 'install dependencies'
         if: startsWith(matrix.build.container, 'alpine')
@@ -437,7 +436,7 @@ jobs:
           cache-name: cache-wolfssh
         with:
           path: ~/wolfssh
-          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.wolfssl-version }}-${{ env.wolfssh-version }}
+          key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.wolfssh-version }}-${{ env.wolfssl-version }}
 
       - name: 'build wolfssh'
         if: contains(matrix.build.install_steps, 'wolfssh') && steps.cache-wolfssh.outputs.cache-hit != 'true'
@@ -582,10 +581,9 @@ jobs:
       - name: 'install Intel compilers'
         if: contains(matrix.build.install_steps, 'intel')
         run: |
-          cd /tmp
-          curl -sSf --compressed https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo apt-key add -
+          curl -sSf --compressed https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | sudo tee /etc/apt/trusted.gpg.d/intel-sw.asc >/dev/null
           sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
-          sudo apt install --no-install-recommends intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
+          sudo apt-get -o Dpkg::Use-Pty=0 install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
           source /opt/intel/oneapi/setvars.sh
           printenv >> $GITHUB_ENV
 
index 92889affa6b72bb44acfb603663aaba352358a72..615aaeceb62311d33203e93400caf635a4f83b3b 100644 (file)
@@ -420,8 +420,8 @@ jobs:
         timeout-minutes: 5
         run: |
           sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
-          sudo apt-get update -y
-          sudo apt-get install -y --no-install-suggests --no-install-recommends nasm
+          sudo apt-get -o Dpkg::Use-Pty=0 update
+          sudo apt-get -o Dpkg::Use-Pty=0 install nasm
 
       - name: 'vcpkg build'
         if: ${{ matrix.install }}
@@ -606,7 +606,7 @@ jobs:
       fail-fast: false
     steps:
       - name: 'install packages'
-        run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install libfl2 ${{ matrix.build == 'cmake' && 'ninja-build' || '' }}
+        run: sudo apt-get -o Dpkg::Use-Pty=0 install libfl2 ${{ matrix.build == 'cmake' && 'ninja-build' || '' }}
 
       - name: 'cache compiler (djgpp)'
         uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
index 9778d4a138110eaa6603cba654f4fefe2840c24e..393dc7681a20bea8e95c2feaf5349a41c7f5320f 100644 (file)
@@ -495,7 +495,7 @@ jobs:
       TRIPLET: 'x86_64-w64-mingw32'
     steps:
       - name: 'install packages'
-        run: sudo apt-get --quiet 2 --option Dpkg::Use-Pty=0 install mingw-w64 ${{ matrix.build == 'cmake' && 'ninja-build' || '' }}
+        run: sudo apt-get -o Dpkg::Use-Pty=0 install mingw-w64 ${{ matrix.build == 'cmake' && 'ninja-build' || '' }}
 
       - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
         with:
index 7d0a2dec7a563a9922ec48e2a5fbf853475137aa..56916bcd820094ea255642f71f6b060446ae67b1 100755 (executable)
@@ -85,7 +85,7 @@ sub githubactions {
                 $m = 0;
                 $j = 0;
             }
-            elsif($_ =~ /^    - run: .* apt-get install (.*)/) {
+            elsif($_ =~ /^    - run: .* apt-get .* install (.*)/) {
                 $job{'install'} = $1;
             }
             elsif($m >= 0) {