[packages/rpm-build-tools/netns-with-lo-addr] builder: add debug support for setting up lo

atler atler at pld-linux.org
Mon Oct 27 13:47:25 CET 2025


commit f18ba53fe461a697d3615418eaf1545e6f65b4ca
Author: Jan Palus <atler at pld-linux.org>
Date:   Mon Oct 27 13:44:34 2025 +0100

    builder: add debug support for setting up lo

 builder.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/builder.sh b/builder.sh
index 4c0fece..2a9685d 100755
--- a/builder.sh
+++ b/builder.sh
@@ -153,7 +153,7 @@ REVERT_BROKEN_UPGRADE="yes"
 IP=/sbin/ip
 
 # disable network for rpm build tool, autodetect if it works (doesn't work in chroot and in vserver guest)
-unshare --user --net --map-current-user true 2> /dev/null && NONETWORK="unshare --user --net --map-root-user $SHELL -c 'if test -x $IP; then $IP a add 127.0.0.1/8 dev lo 2> /dev/null && addr=1; $IP a add ::1/128 dev lo noprefixroute 2> /dev/null && addr=1; test -n \"\$addr\" && $IP l set lo up; unset addr; fi; exec unshare --map-user $(id -un) $SHELL'" || NONETWORK=""
+unshare --user --net --map-current-user true 2> /dev/null && NONETWORK="unshare --user --net --map-root-user $SHELL -\${DEBUG:+xv}c 'if test -x $IP; then $IP a add 127.0.0.1/8 dev lo 2> /dev/null && addr=1; $IP a add ::1/128 dev lo noprefixroute 2> /dev/null && addr=1; test -n \"\$addr\" && $IP l set lo up; unset addr; fi; exec unshare --map-user $(id -un) $SHELL'" || NONETWORK=""
 
 if rpm --specsrpm 2>/dev/null; then
 	FETCH_BUILD_REQUIRES_RPMSPECSRPM="yes"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/f18ba53fe461a697d3615418eaf1545e6f65b4ca



More information about the pld-cvs-commit mailing list