Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1From 8db8a2290683acf94f02e855af668a864d6001c2 Mon Sep 17 00:00:00 2001 2Subject: [PATCH 1/2] installCDE: don't hardcode path to whoami 3--- 4 cde/admin/IntegTools/dbTools/installCDE.src | 11 ++--------- 5 cde/admin/IntegTools/dbTools/mkProd | 9 +-------- 6 2 files changed, 3 insertions(+), 17 deletions(-) 7 8diff --git a/cde/admin/IntegTools/dbTools/installCDE.src b/cde/admin/IntegTools/dbTools/installCDE.src 9index a00fefd1..233b4a96 100755 10--- a/cde/admin/IntegTools/dbTools/installCDE.src 11+++ b/admin/IntegTools/dbTools/installCDE.src 12@@ -52,7 +52,7 @@ LOGFILE="installCDE.$$.log" 13 14 Log() 15 { 16- /bin/echo "$1" | tee -a $LOGFILE 17+ echo "$1" | tee -a $LOGFILE 18 } 19 20 MakeTarball() 21@@ -537,14 +537,7 @@ XCOMM 22 PLATFORM_SCRIPT_DIR=hp 23 fi 24 25- if [ "$PLATFORM" = "aix" ]; 26- then 27- USER=$(/bin/whoami) 28- else 29- USER=$(/usr/bin/whoami) 30- fi 31- 32- if [ "$USER" != "root" ]; 33+ if [ $(whoami) != "root" ]; 34 then 35 echo "" 36 echo "You should be root to run this script. Continuing anyway." 37diff --git a/cde/admin/IntegTools/dbTools/mkProd b/cde/admin/IntegTools/dbTools/mkProd 38index 44591fab..413a77e8 100755 39--- a/cde/admin/IntegTools/dbTools/mkProd 40+++ b/admin/IntegTools/dbTools/mkProd 41@@ -96,13 +96,6 @@ else # Build system = HP 42 PLATFORM=hp-ux 43 fi 44 45-if [ $PLATFORM = "aix" ]; 46-then 47- USER=`/bin/whoami` 48-else 49- USER=`/usr/bin/whoami` 50-fi 51- 52 awkit() { 53 awk ' 54 BEGIN { 55@@ -504,7 +497,7 @@ doit() 56 } 57 # set permissions for non-links 58 if [ "${TYPE%link}" = "$TYPE" ]; then 59- if [ "$USER" = "root" ]; then 60+ if [ $(whoami) = "root" ]; then 61 chgrp $GROUP $DEST || 62 echo "ERROR: \"chgrp $GROUP $DEST\" failed" >&2 63 chown $OWNER $DEST || 64-- 652.25.0 66 67 68From 9221c55a5f811986eaf0e01301827c294ac2e29b Mon Sep 17 00:00:00 2001 69Subject: [PATCH 2/2] tt_type_comp: use CppCmd definition 70--- 71 cde/lib/tt/bin/tt_type_comp/Imakefile | 4 +++- 72 cde/lib/tt/lib/tt_options.h | 5 +++++ 73 2 files changed, 8 insertions(+), 1 deletion(-) 74 75diff --git a/cde/lib/tt/bin/tt_type_comp/Imakefile b/cde/lib/tt/bin/tt_type_comp/Imakefile 76index 92179208..62434929 100644 77--- a/cde/lib/tt/bin/tt_type_comp/Imakefile 78+++ b/lib/tt/bin/tt_type_comp/Imakefile 79@@ -8,7 +8,9 @@ EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB) 80 81 #include "../../tooltalk.tmpl" 82 83-DEFINES = 84+CPP_PROGRAM = CppCmd 85+CPP_DEFINES = -DCPP_PROGRAM="\"$(CPP_PROGRAM)\"" 86+DEFINES = $(CPP_DEFINES) 87 INCLUDES = $(TIRPCINC) -I../../lib -I../../slib 88 89 DEPLIBS = ../../slib/libstt.a TtClientDepLibs 90diff --git a/cde/lib/tt/lib/tt_options.h b/cde/lib/tt/lib/tt_options.h 91index 4315daa8..e23bb9e5 100644 92--- a/cde/lib/tt/lib/tt_options.h 93+++ b/lib/tt/lib/tt_options.h 94@@ -529,4 +529,9 @@ 95 96 #endif 97 98+#ifdef CPP_PROGRAM 99+# undef OPT_CPP_PATH 100+# define OPT_CPP_PATH CPP_PROGRAM 101+#endif 102+ 103 #endif /* _TT_OPTIONS_H */ 104-- 1052.25.0 106