Skip to content

Commit

Permalink
Issue #585: fix bug with --with-mode=MODE code in configure.ac
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Jul 31, 2022
1 parent 0719d11 commit 8e0b688
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ INIT_KSH_FUNCS := $(MY_PACKAGE)/init/ksh_funcs
FISH_TAB := $(MY_PACKAGE)/init/fish_tab_completion
MESSAGEDIR := $(MY_PACKAGE)/messageDir
LMOD_MF := $(MY_PACKAGE)/modulefiles/Core
MAN_PAGES := $(MY_PACKAGE)/share/man/cat1
MAN_PAGES := $(MY_PACKAGE)/share/man/cat1
LMOD_MF_SOURCE := $(patsubst %, $(srcdir)/%, MF/*.version.lua)
SETTARG_SOURCE := $(patsubst %, $(srcdir)/%, settarg/*.lua settarg/targ.in)
DATE_cmd := $(srcdir)/proj_mgmt/DATE_cmd.sh
Expand Down Expand Up @@ -235,7 +235,7 @@ echo:
@echo GIT_VERSION: $(GIT_VERSION)
man_pages:
-$(PATH_TO_LUA) $(srcdir)/src/lmod.in.lua bash --help >/dev/null 2> $(DESTDIR)$(MAN_PAGES)/module.1
-chmod $(MODE_R) $(DESTDIR)$(MAN_PAGES)/module.1
chmod $(MODE_R) $(DESTDIR)$(MAN_PAGES)/module.1

$(DIRLIST) :
install -m $(MODE_X) -d $@
Expand Down
4 changes: 2 additions & 2 deletions README.new
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ Lmod 8.7+
entry in defaultA, instead of all. This avoids the issue where there is a .modulerc.lua
which works and a .modulerc or .version file which has syntax errors.
(8.7.9) * Correctly generate Version.lua file when installing from a tar ball.


(8.7.10) * Issue #585: Add support for --with-mode=MODE
(8.7.11) * Fix bug found in 8.7.10 about --with-mode=MODE
7 changes: 4 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3637,7 +3637,6 @@ if test ${with_mode+y}
then :
withval=$with_mode; MODE="$withval"
MODE=`echo $MODE | tr '[:upper:]' '[:lower:]'`
VALID_YN $MODE "--with-mode=ans: ans must be yes or no"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: MODE=$with_mode" >&5
printf "%s\n" "MODE=$with_mode" >&6; }
printf "%s\n" "#define MODE \"$with_mode\"" >>confdefs.h
Expand Down Expand Up @@ -4588,11 +4587,11 @@ if test $MODE = "user_default" ; then
umask=022
fi
MODE_X=$(( ( ~ $umask ) & 0777 ))
MODE_X=$(echo "ibase=10; obase=8; $MODE_X" | bc )
else
MODE_X=$MODE
MODE_X=0$MODE
fi
MODE_R=$(( 0666 & $MODE_X ))
MODE_X=$(echo "ibase=10; obase=8; $MODE_X" | bc )
MODE_R=$(echo "ibase=10; obase=8; $MODE_R" | bc )
echo MODE_X: $MODE_X
echo MODE_R: $MODE_R
Expand Down Expand Up @@ -6779,12 +6778,14 @@ echo "Use built-in lua packages instead of system provided pkgs..." : $USE_BUILT
echo "Silence shell debugging output for bash/zsh................." : $SILENCE_SHELL_DEBUGGING
echo "Allow root to use Lmod......................................" : $LMOD_ALLOW_ROOT_USE
echo "Support KSH................................................." : $SUPPORT_KSH
echo "MODE........................................................" : $MODE
echo "Use the fast TCL interpreter................................" : $FAST_TCL_INTERP
echo "LMOD_CONFIG_DIR............................................." : $LMOD_CONFIG_DIR
echo "Display Extensions w/ module avail.........................." : $AVAIL_EXTENSIONS
echo "Dynamic Spider Cache support................................" : $DYNAMIC_SPIDER_CACHE
echo "Allow for extended default.(ml intel/17 #-> intel/17.0.4)..." : $EXTENDED_DEFAULT #"
echo
echo '------------------------------------------------------------------------------'
echo
Expand Down
5 changes: 2 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ AC_ARG_WITH(mode,
AS_HELP_STRING([--with-mode=ans],[Override executable install mode (755 or 750 or 700) [[user_default]]]),
MODE="$withval"
MODE=`echo $MODE | tr '@<:@:upper:@:>@' '@<:@:lower:@:>@'`
VALID_YN $MODE "--with-mode=ans: ans must be yes or no"
AC_MSG_RESULT([MODE=$with_mode])
AC_DEFINE_UNQUOTED(MODE, "$with_mode")dnl
,
Expand Down Expand Up @@ -730,11 +729,11 @@ if test $MODE = "user_default" ; then
umask=022
fi
MODE_X=$(( ( ~ $umask ) & 0777 ))
MODE_X=$(echo "ibase=10; obase=8; $MODE_X" | bc )
else
MODE_X=$MODE
MODE_X=0$MODE
fi
MODE_R=$(( 0666 & $MODE_X ))
MODE_X=$(echo "ibase=10; obase=8; $MODE_X" | bc )
MODE_R=$(echo "ibase=10; obase=8; $MODE_R" | bc )
echo MODE_X: $MODE_X
echo MODE_R: $MODE_R
Expand Down

0 comments on commit 8e0b688

Please sign in to comment.