aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-04-25 13:42:08 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-14 18:54:49 -0300
commit15e40e9ae48dcab4f317215fe5aef8a58f7259dc (patch)
treed66499339558c8c6ffc53ab981b394368f0c4598
parentci: remove commented profile checks from build jobs (diff)
downloadfirejail-15e40e9ae48dcab4f317215fe5aef8a58f7259dc.tar.gz
firejail-15e40e9ae48dcab4f317215fe5aef8a58f7259dc.tar.zst
firejail-15e40e9ae48dcab4f317215fe5aef8a58f7259dc.zip
ci: standardize apt-get update/install
General changes: * Use a single -q on update, as the output is not too long * Use a single -q on install, to show all packages at once GitLab-specific changes: * Use `DEBIAN_FRONTEND=noninteractive` to reduce noise * Use --no-install-recommends to avoid installing unnecessary packages * Filter out uninteresting lines on install Note: `DEBIAN_FRONTEND` does not appear to be needed in the default GitHub runner container and not many packages are currently being downloaded/installed in them, so do the above changes only jobs that use custom Docker images.
-rw-r--r--.github/workflows/build-extra.yml24
-rw-r--r--.github/workflows/build.yml4
-rw-r--r--.gitlab-ci.yml32
3 files changed, 37 insertions, 23 deletions
diff --git a/.github/workflows/build-extra.yml b/.github/workflows/build-extra.yml
index 32a8969d6..e32f827e1 100644
--- a/.github/workflows/build-extra.yml
+++ b/.github/workflows/build-extra.yml
@@ -62,9 +62,11 @@ jobs:
62 github.com:443 62 github.com:443
63 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab 63 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
64 - name: update package information 64 - name: update package information
65 run: sudo apt-get update 65 run: sudo apt-get update -qy
66 - name: install dependencies 66 - name: install dependencies
67 run: sudo apt-get install libapparmor-dev libselinux1-dev 67 run: >
68 sudo apt-get install -qy
69 libapparmor-dev libselinux1-dev
68 - name: print env 70 - name: print env
69 run: ./ci/printenv.sh 71 run: ./ci/printenv.sh
70 - name: configure 72 - name: configure
@@ -90,9 +92,11 @@ jobs:
90 github.com:443 92 github.com:443
91 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab 93 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
92 - name: update package information 94 - name: update package information
93 run: sudo apt-get update 95 run: sudo apt-get update -qy
94 - name: install clang-tools-14 and dependencies 96 - name: install clang-tools-14 and dependencies
95 run: sudo apt-get install clang-tools-14 libapparmor-dev libselinux1-dev 97 run: >
98 sudo apt-get install -qy
99 clang-tools-14 libapparmor-dev libselinux1-dev
96 - name: print env 100 - name: print env
97 run: ./ci/printenv.sh 101 run: ./ci/printenv.sh
98 - name: configure 102 - name: configure
@@ -114,9 +118,9 @@ jobs:
114 github.com:443 118 github.com:443
115 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab 119 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
116 - name: update package information 120 - name: update package information
117 run: sudo apt-get update 121 run: sudo apt-get update -qy
118 - name: install cppcheck 122 - name: install cppcheck
119 run: sudo apt-get install cppcheck 123 run: sudo apt-get install -qy cppcheck
120 - run: cppcheck --version 124 - run: cppcheck --version
121 - name: cppcheck 125 - name: cppcheck
122 run: > 126 run: >
@@ -136,9 +140,9 @@ jobs:
136 github.com:443 140 github.com:443
137 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab 141 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
138 - name: update package information 142 - name: update package information
139 run: sudo apt-get update 143 run: sudo apt-get update -qy
140 - name: install cppcheck 144 - name: install cppcheck
141 run: sudo apt-get install cppcheck 145 run: sudo apt-get install -qy cppcheck
142 - run: cppcheck --version 146 - run: cppcheck --version
143 - name: cppcheck 147 - name: cppcheck
144 run: cppcheck -q --force --error-exitcode=1 --enable=warning,performance . 148 run: cppcheck -q --force --error-exitcode=1 --enable=warning,performance .
@@ -154,9 +158,9 @@ jobs:
154 github.com:443 158 github.com:443
155 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab 159 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
156 - name: update package information 160 - name: update package information
157 run: sudo apt-get update 161 run: sudo apt-get update -qy
158 - name: install dependencies 162 - name: install dependencies
159 run: sudo apt-get install codespell 163 run: sudo apt-get install -qy codespell
160 - run: codespell --version 164 - run: codespell --version
161 - name: codespell 165 - name: codespell
162 run: make codespell 166 run: make codespell
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 82ec9b5bf..ea85e1109 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -63,10 +63,10 @@ jobs:
63 yahoo.com:1025 63 yahoo.com:1025
64 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab 64 - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
65 - name: update package information 65 - name: update package information
66 run: sudo apt-get update 66 run: sudo apt-get update -qy
67 - name: install dependencies 67 - name: install dependencies
68 run: > 68 run: >
69 sudo apt-get install 69 sudo apt-get install -qy
70 gcc-12 libapparmor-dev libselinux1-dev expect xzdec whois 70 gcc-12 libapparmor-dev libselinux1-dev expect xzdec whois
71 bridge-utils 71 bridge-utils
72 - name: print env 72 - name: print env
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c0d390998..cb88c0263 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -8,11 +8,14 @@
8 8
9build_ubuntu_package: 9build_ubuntu_package:
10 image: ubuntu:rolling 10 image: ubuntu:rolling
11 variables:
12 DEBIAN_FRONTEND: noninteractive
11 script: 13 script:
12 - apt-get update -qq 14 - apt-get update -qy
13 - > 15 - >
14 DEBIAN_FRONTEND=noninteractive apt-get install -y -qq 16 apt-get install --no-install-recommends -qy
15 build-essential lintian libapparmor-dev pkg-config gawk 17 build-essential fakeroot lintian libapparmor-dev pkg-config gawk
18 | grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
16 - ./ci/printenv.sh 19 - ./ci/printenv.sh
17 - ./configure || (cat config.log; exit 1) 20 - ./configure || (cat config.log; exit 1)
18 - make deb 21 - make deb
@@ -21,11 +24,14 @@ build_ubuntu_package:
21 24
22build_debian_package: 25build_debian_package:
23 image: debian:buster 26 image: debian:buster
27 variables:
28 DEBIAN_FRONTEND: noninteractive
24 script: 29 script:
25 - apt-get update -qq 30 - apt-get update -qy
26 - > 31 - >
27 apt-get install -y -qq 32 apt-get install --no-install-recommends -qy
28 build-essential lintian libapparmor-dev pkg-config gawk 33 build-essential fakeroot lintian libapparmor-dev pkg-config gawk
34 | grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
29 - ./ci/printenv.sh 35 - ./ci/printenv.sh
30 - ./configure || (cat config.log; exit 1) 36 - ./configure || (cat config.log; exit 1)
31 - make deb 37 - make deb
@@ -68,11 +74,14 @@ build_src_package:
68 74
69build_no_apparmor: 75build_no_apparmor:
70 image: ubuntu:latest 76 image: ubuntu:latest
77 variables:
78 DEBIAN_FRONTEND: noninteractive
71 script: 79 script:
72 - apt-get update -qq 80 - apt-get update -qy
73 - > 81 - >
74 DEBIAN_FRONTEND=noninteractive apt-get install -y -qq 82 apt-get install --no-install-recommends -qy
75 build-essential lintian pkg-config gawk 83 build-essential fakeroot lintian pkg-config gawk
84 | grep -Ev '^(Selecting|Preparing to unpack|Unpacking)'
76 - ./ci/printenv.sh 85 - ./ci/printenv.sh
77 - ./configure || (cat config.log; exit 1) 86 - ./configure || (cat config.log; exit 1)
78 - make dist 87 - make dist
@@ -86,6 +95,7 @@ debian_ci:
86 variables: 95 variables:
87 DEBFULLNAME: "$GITLAB_USER_NAME" 96 DEBFULLNAME: "$GITLAB_USER_NAME"
88 DEBEMAIL: "$GITLAB_USER_EMAIL" 97 DEBEMAIL: "$GITLAB_USER_EMAIL"
98 DEBIAN_FRONTEND: noninteractive
89 before_script: 99 before_script:
90 - git checkout -B ci_build "$CI_COMMIT_SHA" 100 - git checkout -B ci_build "$CI_COMMIT_SHA"
91 - gitlab-ci-enable-sid 101 - gitlab-ci-enable-sid
@@ -95,7 +105,7 @@ debian_ci:
95 deb-src http://deb.debian.org/debian sid main 105 deb-src http://deb.debian.org/debian sid main
96 deb-src http://deb.debian.org/debian experimental main 106 deb-src http://deb.debian.org/debian experimental main
97 EOF 107 EOF
98 - apt-get update 108 - apt-get update -qy
99 - git config user.name "$DEBFULLNAME" 109 - git config user.name "$DEBFULLNAME"
100 - git config user.email "$DEBEMAIL" 110 - git config user.email "$DEBEMAIL"
101 - | 111 - |
@@ -116,7 +126,7 @@ debian_ci:
116 - git commit -m 'add debian/' 126 - git commit -m 'add debian/'
117 - export CI_COMMIT_SHA="$(git rev-parse HEAD)" 127 - export CI_COMMIT_SHA="$(git rev-parse HEAD)"
118 script: 128 script:
119 - apt-get --no-install-recommends install -y -qq gawk 129 - apt-get install --no-install-recommends -qy gawk
120 - ./ci/printenv.sh 130 - ./ci/printenv.sh
121 - gitlab-ci-git-buildpackage 131 - gitlab-ci-git-buildpackage
122 - gitlab-ci-lintian 132 - gitlab-ci-lintian