From d2af6ad891e580fedcfb7a4a1a1e1a12aff040eb Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 29 Mar 2022 09:36:54 +0200 Subject: tools/ci-install.sh: on debian|ubuntu reduce the need for mingw package name changes Instead of having to specify an exact version that needs to be adjusted with each repository update, it is now possible to specify package names without version or partially qualified versions, which reduces the frequency of necessary adjustments. This is achieved by searching for the package names in a previously downloaded list of available packages. Signed-off-by: Ralf Habacker (cherry picked from commit 7e9d3708b1fea32c71ede2087083eeb179fc164b) --- tools/ci-install.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/ci-install.sh b/tools/ci-install.sh index 21548cf5..c2e550a9 100755 --- a/tools/ci-install.sh +++ b/tools/ci-install.sh @@ -196,6 +196,8 @@ if [ "$ci_local_packages" = yes ]; then mirror=https://repo.msys2.org/mingw/${ci_host%%-*} dep_prefix=$(pwd)/${ci_host}-prefix install -d "${dep_prefix}" + wget -O files.lst ${mirror} + sed 's,^.*$,,g' files.lst | grep -v "\.db" | grep -v "\.files" | grep ".*zst$" | sort > filenames.lst packages=( bzip2-1.0.8-2 expat-2.2.10-1 @@ -210,8 +212,13 @@ if [ "$ci_local_packages" = yes ]; then zlib-1.2.11-8 ) for pkg in "${packages[@]}" ; do - wget ${mirror}/mingw-w64-${ci_host%%-*}-${pkg}-any.pkg.tar.zst - tar -C ${dep_prefix} --strip-components=1 -xvf mingw-w64-${ci_host%%-*}-${pkg}-any.pkg.tar.zst + filename=$(grep ${pkg} filenames.lst | tail -1) + if [ -z ${filename} ]; then + echo "could not find filename for package '${pkg}'" + exit 1 + fi + wget ${mirror}/${filename} + tar -C ${dep_prefix} --strip-components=1 -xvf ${filename} done # limit access rights -- cgit v1.2.1 From 1b013547130fc0350503483210a81a44fa5da5b6 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 29 Mar 2022 09:56:40 +0200 Subject: tools/ci-install.sh: Use partially qualified versions with mingw package names Fixes dbus/dbus#388 Signed-off-by: Ralf Habacker (cherry picked from commit 85f5f0503855fed561c010b4676f8aeb3a77424f) --- tools/ci-install.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/ci-install.sh b/tools/ci-install.sh index c2e550a9..362ed05c 100755 --- a/tools/ci-install.sh +++ b/tools/ci-install.sh @@ -199,17 +199,17 @@ if [ "$ci_local_packages" = yes ]; then wget -O files.lst ${mirror} sed 's,^.*$,,g' files.lst | grep -v "\.db" | grep -v "\.files" | grep ".*zst$" | sort > filenames.lst packages=( - bzip2-1.0.8-2 - expat-2.2.10-1 - gcc-libs-10.2.0-6 - gettext-0.19.8.1-10 - glib2-2.66.4-1 - iconv-1.16-2 - libffi-3.3-2 - libiconv-1.16-2 - libwinpthread-git-8.0.0.5906.c9a21571-1 - pcre-8.44-2 - zlib-1.2.11-8 + bzip2-1.0 + expat-2.2 + gcc-libs-10.2 + gettext-0.19 + glib2-2.66 + iconv-1.16 + libffi-3.3 + libiconv-1.16 + libwinpthread-git-8.0.0 + pcre-8.44 + zlib-1.2 ) for pkg in "${packages[@]}" ; do filename=$(grep ${pkg} filenames.lst | tail -1) -- cgit v1.2.1 From 182eafb3a20df121a7201cde8b7f5a6efb993b59 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Tue, 29 Mar 2022 09:59:59 +0200 Subject: tools/ci-install.sh: clean up the previously used installation prefix and the downloaded mingw packages This is necessary to have a clean initial state when running the script locally. Signed-off-by: Ralf Habacker (cherry picked from commit 067733d4b0e7c9c03ee25cb85eecb80980f01f68) --- tools/ci-install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/ci-install.sh b/tools/ci-install.sh index 362ed05c..ac0ae95d 100755 --- a/tools/ci-install.sh +++ b/tools/ci-install.sh @@ -195,6 +195,8 @@ if [ "$ci_local_packages" = yes ]; then (*-w64-mingw32) mirror=https://repo.msys2.org/mingw/${ci_host%%-*} dep_prefix=$(pwd)/${ci_host}-prefix + # clean install dir, if present + rm -rf ${dep_prefix} install -d "${dep_prefix}" wget -O files.lst ${mirror} sed 's,^.*$,,g' files.lst | grep -v "\.db" | grep -v "\.files" | grep ".*zst$" | sort > filenames.lst @@ -217,6 +219,11 @@ if [ "$ci_local_packages" = yes ]; then echo "could not find filename for package '${pkg}'" exit 1 fi + # Remove previously downloaded file, which can happen + # when run locally + if [ -f ${filename} ]; then + rm -rf ${filename} + fi wget ${mirror}/${filename} tar -C ${dep_prefix} --strip-components=1 -xvf ${filename} done -- cgit v1.2.1 From 99fa277774d62ddaa6481e1dcb5c72ab0e1ea3b2 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 12 Sep 2022 18:13:48 +0100 Subject: CI: Don't pin msys2 packages to a specific version at all Similar to dbus/dbus!286, but more so: just use the package names, ignoring their version numbers completely. pcre2 is not strictly needed at the moment, but it'll be a dependency for GLib >= 2.73.x (older versions used pcre). For a bit of future-proofing, download both pcre and pcre2. Signed-off-by: Simon McVittie (cherry picked from commit 8aa34131dd3665df1c0d6a2c92600e04593d09c0) --- tools/ci-install.sh | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tools/ci-install.sh b/tools/ci-install.sh index ac0ae95d..7dcf5885 100755 --- a/tools/ci-install.sh +++ b/tools/ci-install.sh @@ -193,7 +193,8 @@ esac if [ "$ci_local_packages" = yes ]; then case "$ci_host" in (*-w64-mingw32) - mirror=https://repo.msys2.org/mingw/${ci_host%%-*} + cpu="${ci_host%%-*}" + mirror="https://repo.msys2.org/mingw/$cpu" dep_prefix=$(pwd)/${ci_host}-prefix # clean install dir, if present rm -rf ${dep_prefix} @@ -201,20 +202,21 @@ if [ "$ci_local_packages" = yes ]; then wget -O files.lst ${mirror} sed 's,^.*$,,g' files.lst | grep -v "\.db" | grep -v "\.files" | grep ".*zst$" | sort > filenames.lst packages=( - bzip2-1.0 - expat-2.2 - gcc-libs-10.2 - gettext-0.19 - glib2-2.66 - iconv-1.16 - libffi-3.3 - libiconv-1.16 - libwinpthread-git-8.0.0 - pcre-8.44 - zlib-1.2 + bzip2 + expat + gcc-libs + gettext + glib2 + iconv + libffi + libiconv + libwinpthread-git + pcre + pcre2 + zlib ) for pkg in "${packages[@]}" ; do - filename=$(grep ${pkg} filenames.lst | tail -1) + filename=$(grep -F "mingw-w64-${cpu}-${pkg}-" filenames.lst | tail -1) if [ -z ${filename} ]; then echo "could not find filename for package '${pkg}'" exit 1 -- cgit v1.2.1 From b559b318f1965942545932505c90288f35d3e6be Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 13 Sep 2022 16:15:16 +0100 Subject: CI: Use Debian 11 'bullseye' for most builds dbus 1.12.x was included in both Debian 10 'buster', which is now EOL, and Debian 11 'bullseye', which continues to be supported. I need this branch to work on Debian 11 for security and bugfix backports, but I'm no longer supporting Debian 10. Leave one build variant, the "legacy" build, on Debian 10 to check that we can still build there, to be nice to the Debian LTS subproject. Also continue to use Debian 10 for mingw builds, since dbus#380 has not been fixed in this branch (which is now the security-fix-only old-stable branch, so the fix will not be backported). Signed-off-by: Simon McVittie --- .gitlab-ci.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd7c4c6b..242e4fe6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,7 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -image: debian:buster-slim +image: debian:bullseye-slim stages: - build @@ -45,11 +45,11 @@ variables: ci_parallel: "2" ci_sudo: "yes" ci_distro: "debian" - ci_suite: "buster" + ci_suite: "bullseye" production: stage: build - image: "debian:buster-slim" + image: "debian:bullseye-slim" variables: ci_variant: "production" script: &script @@ -58,7 +58,7 @@ production: debug: stage: build - image: "debian:buster-slim" + image: "debian:bullseye-slim" variables: ci_variant: "debug" script: *script @@ -66,14 +66,13 @@ debug: reduced: stage: build when: manual - image: "debian:buster-slim" + image: "debian:bullseye-slim" variables: ci_variant: "reduced" script: *script legacy: stage: build - when: manual image: "debian:buster-slim" variables: ci_variant: "legacy" @@ -81,7 +80,7 @@ legacy: cmake: stage: build - image: "debian:buster-slim" + image: "debian:bullseye-slim" variables: ci_buildsys: "cmake-dist" script: *script -- cgit v1.2.1