summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2024-01-01 14:34:17 -0500
committerbill-auger <mr.j.spam.me@gmail.com>2024-01-04 16:10:00 -0500
commit107e4776e07fe21db196214b02373130a627cd49 (patch)
tree8a4c37a61ca4325878adfabf90e3ebadf5538eca
parent5cb88331ead03f9c48dbf5d7b82b3b71c58370b0 (diff)
negate the semantics of NNET->NETWORKINGv20231231-wip
-rwxr-xr-xsrc/chroot-tools/librechroot2
-rwxr-xr-xsrc/chroot-tools/libremakepkg16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 6236480..cd814ee 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -360,7 +360,7 @@ usage() {
dependency conflicts or shared library mismatches.
Use this only in extreme circumstances; such as if you
need to enable [testing] without synchronizing afterward." \
- "-N" "Disable networking in the chroot" \
+ "-N" "Enable networking in the chroot" \
"-w <${mount_msg}>" "Bind mount a file or directory, read/write" \
"-r <${mount_msg}>" "Bind mount a file or directory, read-only"
echo
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index e2ccfc6..1206725 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -39,8 +39,8 @@ umask 0022
# Global variables:
readonly _indent="$(librelib chroot/indent)"
-SANE=true # can be changed with the -I flag
-NONET=true # can be changed with the -N flag
+SANE=true # can be changed with the -I flag
+NETWORKING=false # can be changed with the -N flag
# {PKG,SRC,SRCPKG,LOG}DEST set at runtime by makepkg.conf
# MAKEFLAGS, PACKAGER set at runtime by makepkg.conf
# LIBREUSER, LIBREHOME set by conf.sh
@@ -128,14 +128,14 @@ build() (
local run_nnet=()
if is_in_chroot; then
local _run=(sh -c "mount --bind -o ro -- ${startdir@Q} ${startdir@Q} && cd ${startdir@Q} && \$@" --)
- run_ynet=(unshare --mount -- "${_run[@]}")
- run_nnet=(unshare --mount --net -- "${_run[@]}")
+ run_ynet=(unshare --mount --net -- "${_run[@]}")
+ run_nnet=(unshare --mount -- "${_run[@]}")
else
librechroot_flags+=(-r "$startdir:/startdir")
- run_ynet=(librechroot "${librechroot_flags[@]}" run)
- run_nnet=(librechroot "${librechroot_flags[@]}" -N run)
+ run_ynet=(librechroot "${librechroot_flags[@]}" -N run)
+ run_nnet=(librechroot "${librechroot_flags[@]}" run)
fi
- $NONET || run_nnet=("${run_ynet[@]}")
+ ! $NETWORKING || run_nnet=("${run_ynet[@]}")
prepare_chroot "$copydir" "$LIBREHOME" "$repack" false # generates 'chrootbuild'
@@ -222,7 +222,7 @@ main() {
l ) copy=$OPTARG ; ! is_in_chroot || err_chflag "$flag";;
w|r) librechroot_flags+=(-$flag "$OPTARG") ; ! is_in_chroot || err_chflag "$flag";;
I ) SANE=false;;
- N ) NONET=false;;
+ N ) NETWORKING=true;;
R ) repack=true; makepkg_args+=(-R);;
S ) srcpkg='';; # srcpkg=$OPTARG;; TODO: not yet implemented
h ) usage; exit $EXIT_SUCCESS;;