[alfs-log] r4036 - in jhalfs/trunk: . common/libs

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Sat Feb 3 08:37:32 PST 2018


Author: pierre
Date: Sat Feb  3 08:37:32 2018
New Revision: 4036

Log:
Remove the need to have write access to BUILDDIR, using sudi, which is
required anyway. ticket #1715

Modified:
   jhalfs/trunk/common/libs/func_install_blfs
   jhalfs/trunk/common/libs/func_validate_configs.sh
   jhalfs/trunk/jhalfs

Modified: jhalfs/trunk/common/libs/func_install_blfs
==============================================================================
--- jhalfs/trunk/common/libs/func_install_blfs	Fri Feb  2 13:12:30 2018	(r4035)
+++ jhalfs/trunk/common/libs/func_install_blfs	Sat Feb  3 08:37:32 2018	(r4036)
@@ -7,7 +7,10 @@
 #----------------------------# the dependency tools
 set -e
 # Install the files
-[[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && mkdir -pv ${BUILDDIR}${BLFS_ROOT}
+[[ ! -d ${BUILDDIR}${BLFS_ROOT} ]] && {
+    sudo mkdir -pv ${BUILDDIR}${BLFS_ROOT}
+    sudo chown $USER:$USER ${BUILDDIR}${BLFS_ROOT}
+}
 cp -r BLFS/* ${BUILDDIR}${BLFS_ROOT}
 cp -r menu ${BUILDDIR}${BLFS_ROOT}
 cp $COMMON_DIR/progress_bar.sh ${BUILDDIR}${BLFS_ROOT}

Modified: jhalfs/trunk/common/libs/func_validate_configs.sh
==============================================================================
--- jhalfs/trunk/common/libs/func_validate_configs.sh	Fri Feb  2 13:12:30 2018	(r4035)
+++ jhalfs/trunk/common/libs/func_validate_configs.sh	Sat Feb  3 08:37:32 2018	(r4036)
@@ -177,7 +177,7 @@
         #  warning -z+   -w+
       SRC_ARCHIVE) [[ "$GETPKG" = "y" ]] && validate_dir -z+ -d -w+ ;;
         # The build directory/partition MUST exist and be writable by the user
-      BUILDDIR)   validate_dir -z -d -w
+      BUILDDIR)   validate_dir -z -d
                   [[ "xx x/x" =~ x${!config_param}x ]] && write_error_and_die ;;
       LHOME)      validate_dir -z -d ;;
 

Modified: jhalfs/trunk/jhalfs
==============================================================================
--- jhalfs/trunk/jhalfs	Fri Feb  2 13:12:30 2018	(r4035)
+++ jhalfs/trunk/jhalfs	Sat Feb  3 08:37:32 2018	(r4036)
@@ -358,12 +358,14 @@
   clean_builddir
 
   if [[ ! -d $JHALFSDIR ]]; then
-    mkdir -p $JHALFSDIR
+    sudo mkdir -p $JHALFSDIR
+    sudo chown $USER:$USER $JHALFSDIR
   fi
 
 # Create $BUILDDIR/sources even though it could be created by get_sources()
   if [[ ! -d $BUILDDIR/sources ]]; then
-    mkdir -p $BUILDDIR/sources
+    sudo mkdir -p $BUILDDIR/sources
+    sudo chmod a+wt $BUILDDIR/sources
   fi
 
 # Create the log directory


More information about the alfs-log mailing list