From 6e4fad397fce65d479e107383bb3e57c48be97f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:49 +0200 Subject: [PATCH 01/12] xbps-src: add make_check=ci-skip --- Manual.md | 9 +++++++-- common/travis/prepare.sh | 1 + common/xbps-src/libexec/xbps-src-docheck.sh | 6 ++++++ etc/defaults.conf | 6 ++++++ xbps-src | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/Manual.md b/Manual.md index 8c2afbaca71d..591df7c9faa0 100644 --- a/Manual.md +++ b/Manual.md @@ -606,10 +606,15 @@ patches to the package sources during `do_patch()`. Patches are stored in - `disable_parallel_build` If set the package won't be built in parallel and `XBPS_MAKEJOBS` has no effect. -- `make_check` Sets the cases in which the `check` phase is run. Can be `yes` (the default) to run if -`XBPS_CHECK_PKGS` is set, `extended` to run if `XBPS_CHECK_PKGS` is `full` and `no` to never run. +- `make_check` Sets the cases in which the `check` phase is run. This option should usually be accompanied by a comment explaining why it was set, especially when set to `no`. +Allowed values: + - `yes` (the default) to run if `XBPS_CHECK_PKGS` is set. + - `extended` to run if `XBPS_CHECK_PKGS` is `full`. + - `ci-skip` to run locally if `XBPS_CHECK_PKGS` is set, but not as part of pull request checks. + - `no` to never run. + - `keep_libtool_archives` If enabled the `GNU Libtool` archives won't be removed. By default those files are always removed automatically. diff --git a/common/travis/prepare.sh b/common/travis/prepare.sh index 1e17be97545b..550fbd7598d0 100755 --- a/common/travis/prepare.sh +++ b/common/travis/prepare.sh @@ -5,6 +5,7 @@ [ "$XLINT" ] && exit 0 /bin/echo -e '\x1b[32mUpdating etc/conf...\x1b[0m' +echo XBPS_BUILD_ENVIRONMENT=void-packages-ci >> etc/conf echo XBPS_ALLOW_RESTRICTED=yes >> etc/conf /bin/echo -e '\x1b[32mEnabling ethereal chroot-style...\x1b[0m' diff --git a/common/xbps-src/libexec/xbps-src-docheck.sh b/common/xbps-src/libexec/xbps-src-docheck.sh index 1cb9f6ab13aa..d35eb5ed7354 100755 --- a/common/xbps-src/libexec/xbps-src-docheck.sh +++ b/common/xbps-src/libexec/xbps-src-docheck.sh @@ -43,6 +43,12 @@ if [ "$make_check" = extended -a "$XBPS_CHECK_PKGS" != full ]; then exit 0 fi +if [ "$make_check" = ci-skip ] && [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then + msg_normal \ + "${pkgname}-${version}_${revision}: skipping check (make_check=ci-skip and XBPS_BUILD_ENVIRONMENT=void-packages-ci) ...\n" + exit 0 +fi + for f in $XBPS_COMMONDIR/environment/check/*.sh; do source_file "$f" done diff --git a/etc/defaults.conf b/etc/defaults.conf index 133449a150d6..1243e61b3a61 100644 --- a/etc/defaults.conf +++ b/etc/defaults.conf @@ -136,6 +136,12 @@ XBPS_SUCMD="sudo /bin/sh -c" # #XBPS_USE_BUILD_MTIME=yes +# [OPTIONAL] +# Enable CI specific mode of operation. Currently this disables do_check for some +# packages. +# +#XBPS_BUILD_ENVIRONMENT=void-packages-ci + # [OPTIONAL] # When using the 'ethereal' chroot-style this switch must be activated, it is # meant as safeguard against users casually destroying their systems diff --git a/xbps-src b/xbps-src index 9d88873ab2c5..c3cd7e5db10b 100755 --- a/xbps-src +++ b/xbps-src @@ -635,7 +635,7 @@ export XBPS_SHUTILSDIR XBPS_CROSSPFDIR XBPS_TRIGGERSDIR \ XBPS_DESTDIR XBPS_MACHINE XBPS_TEMP_MASTERDIR XBPS_BINPKG_EXISTS \ XBPS_LIBEXECDIR XBPS_DISTDIR XBPS_DISTFILES_MIRROR XBPS_ALLOW_RESTRICTED \ XBPS_USE_GIT_COMMIT_DATE XBPS_PKG_COMPTYPE XBPS_REPO_COMPTYPE \ - XBPS_BUILDHELPERDIR XBPS_USE_BUILD_MTIME + XBPS_BUILDHELPERDIR XBPS_USE_BUILD_MTIME XBPS_BUILD_ENVIRONMENT for i in REPOSITORY DESTDIR BUILDDIR SRCDISTDIR; do eval val="\$XBPS_$i" From 00424c4cd7a1663feac4655da015a3c752cbd0b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:49 +0200 Subject: [PATCH 02/12] inetutils: enable tests locally --- srcpkgs/inetutils/template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/inetutils/template b/srcpkgs/inetutils/template index 7918a4641a87..ced4ac1166cd 100644 --- a/srcpkgs/inetutils/template +++ b/srcpkgs/inetutils/template @@ -20,8 +20,8 @@ subpackages="inetutils-dnsdomainname inetutils-ftp inetutils-hostname CFLAGS="-fcommon" -# tests can't run in CI -make_check=extended +# hostname test can't run in CI +make_check=ci-skip case "$XBPS_TARGET_MACHINE" in *-musl) From 77ee4984fe037969dc058acedde5614ff696b3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:50 +0200 Subject: [PATCH 03/12] elogind: enable tests locally --- srcpkgs/elogind/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/elogind/template b/srcpkgs/elogind/template index d4bfe499bc55..a481be29d920 100644 --- a/srcpkgs/elogind/template +++ b/srcpkgs/elogind/template @@ -20,7 +20,7 @@ distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz" checksum=dd2fcf22a89a078cad22e633d2f14a4cc9f4a9c8bae25c0e39fc4aec3e273bc9 conf_files="/etc/elogind/*.conf" # tests fail differently due to containerization and kernel features -make_check=extended +make_check=ci-skip if [ "$XBPS_TARGET_LIBC" = "musl" ]; then configure_args+=" -Dutmp=false" From bd931cd329e4b693f36d600d7d8c5c22e596f169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:50 +0200 Subject: [PATCH 04/12] fish-shell: enable tests locally --- srcpkgs/fish-shell/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/fish-shell/template b/srcpkgs/fish-shell/template index 35ce6f0967ea..c7d3076af03a 100644 --- a/srcpkgs/fish-shell/template +++ b/srcpkgs/fish-shell/template @@ -16,7 +16,7 @@ distfiles="https://github.com/fish-shell/fish-shell/releases/download/${version} checksum=5944da1a8893d11b0828a4fd9136ee174549daffb3d0adfdd8917856fe6b4009 register_shell="/bin/fish /usr/bin/fish" # tests don't work as root -make_check=extended +make_check=ci-skip if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then makedepends+=" libatomic-devel" From 5a95f636a769402b40d75b1ae3040bf718cca9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:50 +0200 Subject: [PATCH 05/12] flac: enable tests locally --- srcpkgs/flac/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/flac/template b/srcpkgs/flac/template index bc126d52029c..8166b9f00655 100644 --- a/srcpkgs/flac/template +++ b/srcpkgs/flac/template @@ -15,7 +15,7 @@ distfiles="https://downloads.xiph.org/releases/flac/flac-${version}.tar.xz" checksum=213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748 patch_args="-Np1" # the tests fail when run as root and as such break in the CI containers -make_check=extended +make_check=ci-skip # TODO: make into options case "$XBPS_TARGET_MACHINE" in From 3fad0b229eb6c1eec5874431f57643fb35571e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:50 +0200 Subject: [PATCH 06/12] igt-gpu-tools: enable tests locally --- srcpkgs/igt-gpu-tools/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/igt-gpu-tools/template b/srcpkgs/igt-gpu-tools/template index 2588c2ddff5c..3b222ecd18d8 100644 --- a/srcpkgs/igt-gpu-tools/template +++ b/srcpkgs/igt-gpu-tools/template @@ -16,7 +16,7 @@ homepage="https://gitlab.freedesktop.org/drm/igt-gpu-tools" distfiles="${XORG_SITE}/app/${pkgname}-${version}.tar.xz" checksum=40454d8f0484ea2477862007398a08eef78a6c252c4defce1c934548593fdd11 # tests don't behave in containers -make_check=extended +make_check=ci-skip lib32disabled=yes archs="i686* x86_64*" From f2728b37db90084fb32b8471b8ce90fc3b9a77ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:50 +0200 Subject: [PATCH 07/12] libgusb: enable tests locally --- srcpkgs/libgusb/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/libgusb/template b/srcpkgs/libgusb/template index e26b6ccf96d3..a7cc76a8c8b1 100644 --- a/srcpkgs/libgusb/template +++ b/srcpkgs/libgusb/template @@ -17,7 +17,7 @@ changelog="https://raw.githubusercontent.com/hughsie/libgusb/master/NEWS" distfiles="http://people.freedesktop.org/~hughsient/releases/${pkgname}-${version}.tar.xz" checksum=13277948a2ee06861234938089aea21bce6ad862f14c81a2efa85340ed701efd # requires access to USB devices, not available on CI -make_check=extended +make_check=ci-skip build_options="gir vala" build_options_default="gir vala" From e9756a548075196c605e868cecbf8236a961fb7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:50 +0200 Subject: [PATCH 08/12] libuv: enable tests locally --- srcpkgs/libuv/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/libuv/template b/srcpkgs/libuv/template index 76a36863f4b9..235b8f3e1f0d 100644 --- a/srcpkgs/libuv/template +++ b/srcpkgs/libuv/template @@ -12,7 +12,7 @@ changelog="https://raw.githubusercontent.com/libuv/libuv/v1.x/ChangeLog" distfiles="https://github.com/libuv/libuv/archive/v${version}.tar.gz" checksum=6cfeb5f4bab271462b4a2cc77d4ecec847fdbdc26b72019c27ae21509e6f94fa # the tests fail when run as root and as such break in the CI containers -make_check="extended" +make_check=ci-skip LDFLAGS="-pthread" From 4721bfbbaadc2b9943b6162731df797371a20a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:50 +0200 Subject: [PATCH 09/12] newsboat: enable tests locally --- srcpkgs/newsboat/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/newsboat/template b/srcpkgs/newsboat/template index ad8a04787d37..3654bd1efe2b 100644 --- a/srcpkgs/newsboat/template +++ b/srcpkgs/newsboat/template @@ -21,7 +21,7 @@ checksum=b997b139d41db2cc5f54346f27c448bee47d6c6228a12ce9cb91c3ffaec7dadc # tests fail when run by superuser # they always fail on musl, see https://github.com/newsboat/newsboat/issues/1216 -make_check=extended +make_check=ci-skip pre_check() { export TERM=$TERM From e8fab02ea068a423c8048e5b7c09c0f602c0d2a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:50 +0200 Subject: [PATCH 10/12] openvpn: enable tests locally --- srcpkgs/openvpn/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/openvpn/template b/srcpkgs/openvpn/template index cbad158b7c7f..c4146346ea44 100644 --- a/srcpkgs/openvpn/template +++ b/srcpkgs/openvpn/template @@ -22,7 +22,7 @@ desc_option_pkcs11="Enable support for PKCS#11" vopt_conflict mbedtls pkcs11 # tests can't run in CI -make_check=extended +make_check=ci-skip post_install() { vmkdir usr/share/examples/${pkgname} From 3d126b31e4c4df863b36080de92ddb563fa346c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:50 +0200 Subject: [PATCH 11/12] openvswitch: enable tests locally --- srcpkgs/openvswitch/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/openvswitch/template b/srcpkgs/openvswitch/template index 145a0b52e8fc..1712284f2d0e 100644 --- a/srcpkgs/openvswitch/template +++ b/srcpkgs/openvswitch/template @@ -19,7 +19,7 @@ python_version=3 _completiondir="/usr/share/bash-completion/completions" make_install_args+=" completiondir=${_completiondir}" # test can hang in containers -make_check=extended +make_check=ci-skip post_install() { for cmd in ovs-appctl ovs-vsctl; do From 18801001518bcc949daa7cf093d18e213d127f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 20 Apr 2021 00:05:50 +0200 Subject: [PATCH 12/12] postgresql: enable tests locally --- srcpkgs/postgresql/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/postgresql/template b/srcpkgs/postgresql/template index 25f7e62bd8da..fcbf3e2a67c4 100644 --- a/srcpkgs/postgresql/template +++ b/srcpkgs/postgresql/template @@ -21,7 +21,7 @@ changelog="https://www.postgresql.org/docs/current/release-${version//./-}.html" distfiles="https://ftp.postgresql.org/pub/source/v${version}/${pkgname}-${version}.tar.bz2" checksum=930feaef28885c97ec40c26ab6221903751eeb625de92b22602706d7d47d1634 # initdb fails on github actions, works locally with xbps-uunshare -make_check=extended +make_check=ci-skip conf_files=" /etc/default/${pkgname}