- From 08876e9a9057f79c27eeaad107772798b2a1f609 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Sat, 6 Jul 2024 11:32:29 +0200
- Subject: [PATCH 1/3] cygwin,tests: Update ksh93 to V1.0.9
- Update ksh93 to V1.0.9, and update recommended list of packages.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/README.bintarball.txt | 3 ++
- cygwin/cygwin_ksh93/ksh93.cygport | 42 +++++++++++--------
- ...t_PATH_LEADING_SLASHES_for_UNC_paths.patch | 12 +++---
- tests/manual_testing.txt | 4 +-
- 4 files changed, 37 insertions(+), 24 deletions(-)
- diff --git a/cygwin/README.bintarball.txt b/cygwin/README.bintarball.txt
- index 5a366bc..edd1c55 100644
- --- a/cygwin/README.bintarball.txt
- +++ b/cygwin/README.bintarball.txt
- @@ -117,6 +117,9 @@ NFSv4.1 client and filesystem driver for Windows 10/11
- mingw64-x86_64-clang
- dos2unix
- unzip
- + bison
- + cygport
- + libiconv-devel
- #
- # 4. Download and install Cygwin (if not installed yet):
- diff --git a/cygwin/cygwin_ksh93/ksh93.cygport b/cygwin/cygwin_ksh93/ksh93.cygport
- index b8d13fe..cffc02e 100644
- --- a/cygwin/cygwin_ksh93/ksh93.cygport
- +++ b/cygwin/cygwin_ksh93/ksh93.cygport
- @@ -11,7 +11,7 @@
- NAME=astksh
- LICENSE="Eclipse Public License - v 2.0"
- HOMEPAGE="https://github.com/ksh93/ksh"
- -VERSION=1.0.8
- +VERSION=1.0.9
- RELEASE=0
- PKG_NAMES="astksh astksh_devel"
- @@ -36,21 +36,23 @@ astksh_devel_CONTENTS="usr/share/ksh \
- bin/shcomp.exe \
- "
- -SRC_URI="https://github.com/ksh93/ksh/archive/refs/tags/v1.0.8.zip"
- -SRC_DIR='./ksh-1.0.8/'
- -PATCH_URI="ksh_1_0_8_libast_Cygwin_set_PATH_LEADING_SLASHES_for_UNC_paths.patch"
- +SRC_URI="https://github.com/ksh93/ksh/archive/refs/tags/v1.0.9.zip"
- +SRC_DIR='./ksh-1.0.9/'
- +PATCH_URI=""
- +#PATCH_URI+=" ksh_1_0_8_libast_Cygwin_set_PATH_LEADING_SLASHES_for_UNC_paths.patch"
- +PATCH_URI+=" ksh_1_0_9_mamake_bootstrap.patch"
- BUILD_REQUIRES=" \
- - bash \
- - coreutils \
- - bison \
- - gcc-g++ \
- - libiconv-devel \
- - libintl-devel \
- - libncurses-devel \
- - make \
- - sed \
- - texinfo \
- + bash \
- + coreutils \
- + bison \
- + gcc-g++ \
- + libiconv-devel \
- + libintl-devel \
- + libncurses-devel \
- + make \
- + sed \
- + texinfo \
- "
- CPPFLAGS=
- @@ -64,7 +66,7 @@ function print_gnulinux_builtin_header
- cat <<ENDOFTEXT
- #ifndef _GNULINUX_KSH_CMDLIST_H
- -#define _GNULINUX_KSH_CMDLIST_H
- +#define _GNULINUX_KSH_CMDLIST_H
- #ifdef __cplusplus
- extern "C" {
- @@ -233,14 +235,20 @@ src_compile()
- #export IFFEFLAGS=-d1
- # fix build issues with mkfifo
- - sed -i -r 's/mkfifo.+?(-m [[:digit:]]+)/mkfifo /g' ./src/cmd/INIT/package.sh ./bin/package
- + if false ; then
- + # ksh93 v1.0.8
- + sed -i -r 's/mkfifo.+?(-m [[:digit:]]+)/mkfifo /g' ./src/cmd/INIT/package.sh ./bin/package
- + else
- + # ksh93 >= v1.0.9
- + sed -i -r 's/mkfifo.+?(-m [[:digit:]]+)/mkfifo /g' ./bin/package
- + fi
- #
- # build AT&T AST ksh
- #
- if [[ "$ARCH" == 'i686' ]] ; then
- - export SHELL=/bin/bash HOSTTYPE="${ast_hosttype}"; \
- + export SHELL=/bin/bash HOSTTYPE="${ast_hosttype}"; \
- /bin/bash ./bin/package make \
- CC="/usr/bin/gcc -m32 -std=gnu17" CCFLAGS="-Os -g ${bast_flags}" SHELL="$SHELL" HOSTTYPE="$HOSTTYPE"
- elif [[ "$ARCH" == 'x86_64' ]] ; then
- diff --git a/cygwin/cygwin_ksh93/ksh_1_0_8_libast_Cygwin_set_PATH_LEADING_SLASHES_for_UNC_paths.patch b/cygwin/cygwin_ksh93/ksh_1_0_8_libast_Cygwin_set_PATH_LEADING_SLASHES_for_UNC_paths.patch
- index 6128fe9..bdadb8d 100644
- --- a/cygwin/cygwin_ksh93/ksh_1_0_8_libast_Cygwin_set_PATH_LEADING_SLASHES_for_UNC_paths.patch
- +++ b/cygwin/cygwin_ksh93/ksh_1_0_8_libast_Cygwin_set_PATH_LEADING_SLASHES_for_UNC_paths.patch
- @@ -3,9 +3,9 @@ index b6b58027..396cd46d 100644
- --- a/src/lib/libast/port/astconf.c
- +++ b/src/lib/libast/port/astconf.c
- @@ -1355,6 +1355,24 @@ astgetconf(const char* name, const char* path, const char* value, int flags, Err
- - Lookup_t look;
- - Sfio_t* tmp;
- -
- + Lookup_t look;
- + Sfio_t* tmp;
- +
- +#ifdef __CYGWIN__
- + /*
- + * hack for Cygwin to make Cygwin UNC paths (with leading
- @@ -24,6 +24,6 @@ index b6b58027..396cd46d 100644
- + return "1";
- + }
- +#endif /* __CYGWIN__ */
- - if (!name)
- - {
- - if (path)
- + if (!name)
- + {
- + if (path)
- diff --git a/tests/manual_testing.txt b/tests/manual_testing.txt
- index 2ab20f2..9a66289 100644
- --- a/tests/manual_testing.txt
- +++ b/tests/manual_testing.txt
- @@ -1,5 +1,5 @@
- #
- -# ms-nfs41-client manual testing sequence, 2024-06-26
- +# ms-nfs41-client manual testing sequence, 2024-07-04
- #
- # Draft version, needs to be turned into automated tests
- # if possible
- @@ -21,6 +21,7 @@
- # subversion
- # cygport
- # dos2unix
- +# libiconv-devel
- # libncurses-devel
- # libgmp-devel
- # libmpfr-devel
- @@ -35,6 +36,7 @@
- # konsole
- # nedit
- # emacs
- +# cygport
- # ---- snip ----
- #
- # - Benchmarking/profiling should be done with the realtime virus checker
- --
- 2.45.1
- From ff689516439a1b14afa390424e8ca6bc53d48dc2 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Sat, 6 Jul 2024 12:10:35 +0200
- Subject: [PATCH 2/3] cygwin,tests: Update ksh93 to V1.0.9 [refix]
- Refix "Update ksh93 to V1.0.9", add missing patch file.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- .../cygwin_ksh93/ksh_1_0_9_mamake_bootstrap.patch | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
- create mode 100644 cygwin/cygwin_ksh93/ksh_1_0_9_mamake_bootstrap.patch
- diff --git a/cygwin/cygwin_ksh93/ksh_1_0_9_mamake_bootstrap.patch b/cygwin/cygwin_ksh93/ksh_1_0_9_mamake_bootstrap.patch
- new file mode 100644
- index 0000000..b654a27
- --- /dev/null
- +++ b/cygwin/cygwin_ksh93/ksh_1_0_9_mamake_bootstrap.patch
- @@ -0,0 +1,15 @@
- +# Patch to avoid ETXTBUSY when trying to replace mamake.exe
- +diff --git a/bin/package b/bin/package
- +index 8d969c8b..f9ba6ab6 100755
- +--- a/bin/package
- ++++ b/bin/package
- +@@ -2515,7 +2515,8 @@ checkaout() # cmd ...
- + done
- + fi
- + rm -f "$INSTALLROOT/dyn/bin/$i" "$INSTALLROOT/src/lib/libast/$i" &
- +- $exec $CC -O $CCFLAGS $LDFLAGS -o $INSTALLROOT/bin/$i $INITROOT/$i.c || return
- ++ $exec $CC -O $CCFLAGS $LDFLAGS -o $INSTALLROOT/bin/${i}_bootstrap $INITROOT/$i.c || return
- ++ $exec ln -s ${i}_bootstrap $INSTALLROOT/bin/$i
- + test -f $i.o && $exec rm -f $i.o
- + hash -r
- + ;;
- --
- 2.45.1
- From a371dcc8188db1e22509d4aaee5e095a5fe93d2e Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Sat, 6 Jul 2024 13:05:29 +0200
- Subject: [PATCH 3/3] cygwin: ksh93 ksh.ksh93 PS1 should use RED colour for
- admins
- ksh93 /etc/ksh.ksh93 PS1 should use RED colour for users
- with Admin group membership.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- cygwin/cygwin_ksh93/ksh.kshrc | 25 ++++++++++++++++++++++++-
- cygwin/cygwin_ksh93/ksh93.cygport | 30 ++++++++++++++++++++++++++++--
- 2 files changed, 52 insertions(+), 3 deletions(-)
- diff --git a/cygwin/cygwin_ksh93/ksh.kshrc b/cygwin/cygwin_ksh93/ksh.kshrc
- index 5e12602..f3d0382 100644
- --- a/cygwin/cygwin_ksh93/ksh.kshrc
- +++ b/cygwin/cygwin_ksh93/ksh.kshrc
- @@ -2,7 +2,30 @@
- # /etc/ksh.kshrc+~/.kshrc are sourced only for interactive shells
- #
- +function _ksh_kshrc_is_windows_admin_account
- +{
- + #
- + # Test whether we have the Windows permissions to install DLLs
- + # and the kernel module
- + #
- + # Usually Windows Adminstrator rights are indicated by the
- + # membership in group "544(Administratoren)" (Cygwin maps
- + # "SID S-1-5-32-544" to GID 544)
- + #
- + if [[ "$(/usr/bin/id -G)" =~ (^|[[:space:]]+)544([[:space:]]+|$) ]] ; then
- + return 0
- + fi
- + return 1
- +}
- +
- # default prompt
- -PS1=$'\E[1;32m$(/usr/bin/logname)@$(/usr/bin/hostname) \E[1;33m${PWD/~(Sl-r)$HOME/"~"}\E[0m\n$ '
- +if _ksh_kshrc_is_windows_admin_account ; then
- + PS1=$'\E[1;91m$(/usr/bin/logname)@$(/usr/bin/hostname) \E[1;33m${PWD/~(Sl-r)$HOME/"~"}\E[0m\n$ '
- +else
- + PS1=$'\E[1;32m$(/usr/bin/logname)@$(/usr/bin/hostname) \E[1;33m${PWD/~(Sl-r)$HOME/"~"}\E[0m\n$ '
- +fi
- +
- # default editor mode
- set -o gmacs
- +
- +# EOF.
- diff --git a/cygwin/cygwin_ksh93/ksh93.cygport b/cygwin/cygwin_ksh93/ksh93.cygport
- index cffc02e..b0cf88e 100644
- --- a/cygwin/cygwin_ksh93/ksh93.cygport
- +++ b/cygwin/cygwin_ksh93/ksh93.cygport
- @@ -265,11 +265,37 @@ src_compile()
- # create ksh.kshrc
- #
- {
- - printf '#\n# /etc/ksh.kshrc+~/.kshrc are sourced only for interactive shells\n#\n\n'
- + printf '#\n'
- + printf '# /etc/ksh.kshrc+~/.kshrc are sourced only for interactive shells\n'
- + printf '#\n'
- + printf '\n'
- + printf 'function _ksh_kshrc_is_windows_admin_account\n'
- + printf '{\n'
- + printf ' #\n'
- + printf ' # Test whether we have the Windows permissions to install DLLs\n'
- + printf ' # and the kernel module\n'
- + printf ' #\n'
- + printf ' # Usually Windows Adminstrator rights are indicated by the\n'
- + printf ' # membership in group "544(Administratoren)" (Cygwin maps\n'
- + printf ' # "SID S-1-5-32-544" to GID 544)\n'
- + printf ' #\n'
- + printf ' if [[ "$(/usr/bin/id -G)" =~ (^|[[:space:]]+)544([[:space:]]+|$) ]] ; then\n'
- + printf ' return 0\n'
- + printf ' fi\n'
- + printf ' return 1\n'
- + printf '}\n'
- + printf '\n'
- printf '# default prompt\n'
- - printf 'PS1=%q\n' $'\E[1;32m$(/usr/bin/logname)@$(/usr/bin/hostname) \E[1;33m${PWD/~(Sl-r)$HOME/"~"}\E[0m\n$ '
- + printf 'if _ksh_kshrc_is_windows_admin_account ; then\n'
- + printf ' PS1=$'\''\\E[1;91m$(/usr/bin/logname)@$(/usr/bin/hostname) \\E[1;33m${PWD/~(Sl-r)$HOME/"~"}\\E[0m\\n$ '\''\n'
- + printf 'else\n'
- + printf ' PS1=$'\''\\E[1;32m$(/usr/bin/logname)@$(/usr/bin/hostname) \\E[1;33m${PWD/~(Sl-r)$HOME/"~"}\\E[0m\\n$ '\''\n'
- + printf 'fi\n'
- + printf '\n'
- printf '# default editor mode\n'
- printf 'set -o gmacs\n'
- + printf '\n'
- + printf '# EOF.\n'
- } >${S}/etc_ksh_kshrc
- }
- --
- 2.45.1
msnfs41client: Update ksh93&co to v1.0.9+PS1 update+misc, 2024-07-06
Posted by Anonymous on Sat 6th Jul 2024 14:54
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.