From: paper42 <paper42@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] [NOMERGE,RFC]: xbps-src: add strict mode
Date: Wed, 09 Mar 2022 22:19:16 +0100 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36069@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1242 bytes --]
There is a new pull request by paper42 against master on the void-packages repository
https://github.com/paper42/void-packages xbps-src-strict-mode
https://github.com/void-linux/void-packages/pull/36069
[NOMERGE,RFC]: xbps-src: add strict mode
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **briefly**
<!--
#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please [skip CI](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration)
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- aarch64-musl
- armv7l
- armv6l-musl
-->
A patch file from https://github.com/void-linux/void-packages/pull/36069.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xbps-src-strict-mode-36069.patch --]
[-- Type: text/x-diff, Size: 5462 bytes --]
From 6ef7a36dfc85c7e9382ed2bb6623f32c37f4193b Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Wed, 9 Mar 2022 22:12:40 +0100
Subject: [PATCH 1/2] xbps-src: add strict mode
---
common/environment/setup/vsed.sh | 7 ++++++-
common/travis/build.sh | 2 +-
xbps-src | 11 ++++++++---
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/common/environment/setup/vsed.sh b/common/environment/setup/vsed.sh
index 5b5bf427c239..c74c086a4ce8 100644
--- a/common/environment/setup/vsed.sh
+++ b/common/environment/setup/vsed.sh
@@ -57,8 +57,13 @@ vsed() {
newdigest="$($XBPS_DIGEST_CMD "$f")"
newdigest="${newdigest%% *}"
+ msgfunc=msg_warn
+ if [ -n "$XBPS_STRICT" ]; then
+ msgfunc=msg_error
+ fi
+
if [ "$olddigest" = "$newdigest" ]; then
- msg_warn "$pkgver: vsed: regex \"$rx\" didn't change file \"$f\"\n"
+ $msgfunc "$pkgver: vsed: regex \"$rx\" didn't change file \"$f\"\n"
fi
olddigest="${newdigest}"
done
diff --git a/common/travis/build.sh b/common/travis/build.sh
index f5cf9cffc064..007a61f994d7 100755
--- a/common/travis/build.sh
+++ b/common/travis/build.sh
@@ -13,7 +13,7 @@ fi
PKGS=$(/hostrepo/xbps-src sort-dependencies $(cat /tmp/templates))
for pkg in ${PKGS}; do
- /hostrepo/xbps-src -j$(nproc) -H "$HOME"/hostdir $arch $test pkg "$pkg"
+ /hostrepo/xbps-src -j$(nproc) -s -H "$HOME"/hostdir $arch $test pkg "$pkg"
[ $? -eq 1 ] && exit 1
done
diff --git a/xbps-src b/xbps-src
index ff249015ed02..59607eefa80d 100755
--- a/xbps-src
+++ b/xbps-src
@@ -216,6 +216,9 @@ $(print_cross_targets)
This alternative repository will also be used to resolve dependencies
with highest priority order than others.
+-s
+ Make vsed warnings errors.
+
-t Create a temporary masterdir to not pollute the current one. Note that
the existing masterdir must be fully populated with binary-bootstrap first.
Once the target has finished, this temporary masterdir will be removed.
@@ -357,7 +360,7 @@ readonly XBPS_SRC_VERSION="113"
export XBPS_MACHINE=$(xbps-uhelper -C /dev/null arch)
XBPS_OPTIONS=
-XBPS_OPTSTRING="1a:c:CEfgGhH:iIj:Lm:No:p:qQKr:tV"
+XBPS_OPTSTRING="1a:c:CEfgGhH:iIj:Lm:No:p:qsQKr:tV"
# Preprocess arguments in order to allow options before and after XBPS_TARGET.
eval set -- $(getopt "$XBPS_OPTSTRING" "$@");
@@ -389,6 +392,7 @@ while getopts "$XBPS_OPTSTRING" opt; do
Q) XBPS_ARG_CHECK_PKGS=yes; XBPS_OPTIONS+=" -Q";;
K) XBPS_ARG_CHECK_PKGS=full; XBPS_OPTIONS+=" -K";;
r) XBPS_ARG_ALT_REPOSITORY="$OPTARG"; XBPS_OPTIONS+=" -r $OPTARG";;
+ s) XBPS_ARG_STRICT=yes; XBPS_OPTIONS+=" -s";;
t) XBPS_ARG_TEMP_MASTERDIR=1; XBPS_OPTIONS+=" -t -C";;
V) echo "xbps-src-$XBPS_SRC_VERSION $(xbps-uhelper -V)" && exit 0;;
--) shift; break;;
@@ -471,6 +475,7 @@ fi
[ -n "$XBPS_ARG_QUIET" ] && XBPS_QUIET=1
[ -n "$XBPS_ARG_PRINT_VARIABLES" ] && XBPS_PRINT_VARIABLES="$XBPS_ARG_PRINT_VARIABLES"
[ -n "$XBPS_ARG_ALT_REPOSITORY" ] && XBPS_ALT_REPOSITORY="$XBPS_ARG_ALT_REPOSITORY"
+[ -n "$XBPS_ARG_STRICT" ] && XBPS_STRICT="$XBPS_ARG_STRICT" && echo no
[ -n "$XBPS_ARG_CROSS_BUILD" ] && XBPS_CROSS_BUILD="$XBPS_ARG_CROSS_BUILD"
[ -n "$XBPS_ARG_CHECK_PKGS" ] && XBPS_CHECK_PKGS="$XBPS_ARG_CHECK_PKGS"
[ -n "$XBPS_ARG_MAKEJOBS" ] && XBPS_MAKEJOBS="$XBPS_ARG_MAKEJOBS"
@@ -478,7 +483,7 @@ fi
export XBPS_BUILD_ONLY_ONE_PKG XBPS_SKIP_REMOTEREPOS XBPS_BUILD_FORCEMODE \
XBPS_INFORMATIVE_RUN XBPS_TEMP_MASTERDIR XBPS_BINPKG_EXISTS \
XBPS_USE_GIT_REVS XBPS_CHECK_PKGS XBPS_DEBUG_PKGS XBPS_SKIP_DEPS \
- XBPS_KEEP_ALL XBPS_QUIET XBPS_ALT_REPOSITORY XBPS_CROSS_BUILD \
+ XBPS_KEEP_ALL XBPS_QUIET XBPS_ALT_REPOSITORY XBPS_STRICT XBPS_CROSS_BUILD \
XBPS_MAKEJOBS XBPS_PRINT_VARIABLES
# The masterdir/hostdir variables are forced and readonly in chroot
@@ -626,7 +631,7 @@ readonly XBPS_CMPVER_CMD="xbps-uhelper cmpver"
export XBPS_SHUTILSDIR XBPS_CROSSPFDIR XBPS_TRIGGERSDIR \
XBPS_SRCPKGDIR XBPS_COMMONDIR XBPS_BUILDDIR \
- XBPS_REPOSITORY XBPS_ALT_REPOSITORY XBPS_SRCDISTDIR XBPS_DIGEST_CMD \
+ XBPS_REPOSITORY XBPS_ALT_REPOSITORY XBPS_STRICT XBPS_SRCDISTDIR XBPS_DIGEST_CMD \
XBPS_UHELPER_CMD XBPS_INSTALL_CMD XBPS_QUERY_CMD XBPS_BUILD_ONLY_ONE_PKG \
XBPS_RINDEX_CMD XBPS_RECONFIGURE_CMD XBPS_REMOVE_CMD XBPS_CHECKVERS_CMD \
XBPS_CMPVER_CMD XBPS_FETCH_CMD XBPS_VERSION XBPS_BUILDSTYLEDIR \
From c9aba63014ed1bb85b8a630fbb351a3f67ecd29e Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal@vasilek.cz>
Date: Wed, 9 Mar 2022 22:16:32 +0100
Subject: [PATCH 2/2] [NOMERGE]: opendoas: break CI with an invalid vsed
---
srcpkgs/opendoas/template | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/srcpkgs/opendoas/template b/srcpkgs/opendoas/template
index 685cd45da59b..ff298e7a1a9d 100644
--- a/srcpkgs/opendoas/template
+++ b/srcpkgs/opendoas/template
@@ -1,7 +1,7 @@
# Template file for 'opendoas'
pkgname=opendoas
version=6.8.2
-revision=1
+revision=2
wrksrc="OpenDoas-$version"
build_style=configure
configure_args="--prefix=/usr $(vopt_with 'pam') $(vopt_with 'timestamp')"
@@ -20,6 +20,7 @@ build_options_default="pam timestamp"
desc_option_timestamp="enable persistent auth using timestamps"
pre_configure() {
+ vsed -i GNUmakefile -e '/xxxx/d'
cp ${FILESDIR}/doas.pam pam.d__doas__linux
vsed -i GNUmakefile \
-e '/chown ${BINOWN}:${BINGRP}/d'
next reply other threads:[~2022-03-09 21:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-09 21:19 paper42 [this message]
2022-04-07 17:49 ` [PR PATCH] [Updated] " paper42
2022-04-07 17:53 ` [RFC]: " classabbyamp
2022-04-07 18:04 ` [PR PATCH] [Updated] " paper42
2022-04-07 18:18 ` Chocimier
2022-04-07 18:27 ` paper42
2022-04-07 18:27 ` [PR PATCH] [Merged]: " paper42
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36069@inbox.vuxu.org \
--to=paper42@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).