diff options
author | B. Watson <yalhcru@gmail.com> | 2021-08-27 04:00:49 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-10-13 00:51:46 +0700 |
commit | ae1f41082f9928546381d23b2d27ff52b8e0b438 (patch) | |
tree | feae62139e72744e466902a794e1fa67fe379b37 /system/csh | |
parent | e3ca39cb94c933b1049e1f749c307e075a1b223a (diff) |
system/csh: Updated for version 20110502_6.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/csh')
-rw-r--r-- | system/csh/README | 9 | ||||
-rw-r--r-- | system/csh/csh.SlackBuild | 40 | ||||
-rw-r--r-- | system/csh/csh.info | 8 | ||||
-rw-r--r-- | system/csh/glibc-2.32-sys_siglist.diff | 38 |
4 files changed, 70 insertions, 25 deletions
diff --git a/system/csh/README b/system/csh/README index 12230bebd9a21..525cb405ec18e 100644 --- a/system/csh/README +++ b/system/csh/README @@ -1,9 +1,10 @@ csh (C shell from BSD) -The C shell was originally written at UCB to overcome limitations in the -Bourne shell. Its flexibility and comfort (at that time) quickly made -it the shell of choice until more advanced shells like ksh, bash, zsh -or tcsh appeared. Most of the latter incorporate features original to csh. +The C shell was originally written at UCB to overcome limitations in +the Bourne shell. Its flexibility and comfort (at that time) quickly +made it the shell of choice until more advanced shells like ksh, bash, +zsh or tcsh appeared. Most of the latter incorporate features original +to csh. This build is based on OpenBSD sources from 2011. diff --git a/system/csh/csh.SlackBuild b/system/csh/csh.SlackBuild index cf3255cabd978..d18ab6e437b8e 100644 --- a/system/csh/csh.SlackBuild +++ b/system/csh/csh.SlackBuild @@ -6,6 +6,10 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20210827 bkw: +# - update to latest debian patch (6), add deb version to VERSION. +# - add -current fix for recent glibc. + # 20170621 bkw: # - update to latest debian patch (-2.2, needed for -current). # - quit compiling with -Werror (also needed for -current). @@ -14,8 +18,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=csh -VERSION=${VERSION:-20110502} -BUILD=${BUILD:-2} +VERSION=${VERSION:-20110502_6} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -27,9 +31,6 @@ if [ -z "$ARCH" ]; then esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -55,11 +56,12 @@ fi set -e -DEBVER=2.2 +MAINVER="${VERSION%_*}" # 123_4 => 123 +DEBVER="${VERSION#*_}" # 123_4 => 4 # Grr. -TARNAM="${PRGNAM}_${VERSION}.orig" -DIRNAM="${PRGNAM}-${VERSION}.orig" +TARNAM="${PRGNAM}_${MAINVER}.orig" +DIRNAM="${PRGNAM}-${MAINVER}.orig" rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT @@ -67,17 +69,14 @@ cd $TMP rm -rf $DIRNAM tar xvf $CWD/$TARNAM.tar.gz cd $DIRNAM -tar xvf $CWD/${PRGNAM}_${VERSION}-$DEBVER.debian.tar.[xg]z +tar xvf $CWD/${PRGNAM}_${MAINVER}-$DEBVER.debian.tar.[xg]z chown -R root:root . -find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -# Apply all of Debian's patches. +# Apply all of Debian's patches. Except one... for diff in debian/patches/*.diff; do - patch -p1 < $diff + [ "$( basename $diff )" != "09_sys_signame.diff" ] && patch -p1 < $diff done # My own patch, keeps csh.h from defining its own (tiny) BUFSIZ. Might @@ -85,8 +84,15 @@ done # to set a giant $LS_OPTIONS value without "Word too long" error. patch -p1 < $CWD/bufsiz.diff +# 20210827 bkw: my own patch, glibc >= 2.32 no longer exports +# sys_siglist so we have to use sigdescr_np() instead. Ditto +# sys_signame and sigabbrev_np(). See glibc changelog: +# https://sourceware.org/pipermail/libc-announce/2020/000029.html +# This patch replaces Debian's 09_sys_signame.diff. +patch -p1 < $CWD/glibc-2.32-sys_siglist.diff + # use Slackware standard flags -sed -i "1iCFLAGS=$SLKCFLAGS" Makefile +sed -i "1iCFLAGS=$SLKCFLAGS -fcommon" Makefile # The LIBC= isn't even used, but Slackware64's pmake is broken: it has # /usr/lib/libc.a hard-coded, and pmake wants to build that (and can't), diff --git a/system/csh/csh.info b/system/csh/csh.info index a8ac38100af5b..527b6dbe26226 100644 --- a/system/csh/csh.info +++ b/system/csh/csh.info @@ -1,10 +1,10 @@ PRGNAM="csh" -VERSION="20110502" +VERSION="20110502_6" HOMEPAGE="https://packages.debian.org/sid/csh" -DOWNLOAD="http://ftp.debian.org/debian/pool/main/c/csh/csh_20110502.orig.tar.gz \ - http://http.debian.net/debian/pool/main/c/csh/csh_20110502-2.2.debian.tar.xz" +DOWNLOAD="https://deb.debian.org/debian/pool/main/c/csh/csh_20110502.orig.tar.gz \ + https://deb.debian.org/debian/pool/main/c/csh/csh_20110502-6.debian.tar.xz" MD5SUM="578c40bfa54c09c8affbc434e34fb40c \ - a66e38ff89e978970a4ade6eb419a69a" + 22bdcfe61cbbc4f8b8fd69176beadfe7" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="%README% libbsd" diff --git a/system/csh/glibc-2.32-sys_siglist.diff b/system/csh/glibc-2.32-sys_siglist.diff new file mode 100644 index 0000000000000..4830e62ae7440 --- /dev/null +++ b/system/csh/glibc-2.32-sys_siglist.diff @@ -0,0 +1,38 @@ +diff -Naur csh-20110502.orig/proc.c csh-20110502.orig.patched/proc.c +--- csh-20110502.orig/proc.c 2009-10-27 19:59:21.000000000 -0400 ++++ csh-20110502.orig.patched/proc.c 2021-08-27 02:56:08.386981036 -0400 +@@ -726,8 +726,7 @@ + && (reason != SIGPIPE + || (pp->p_flags & PPOU) == 0))) { + (void) fprintf(cshout, format, +- sys_siglist[(unsigned char) +- pp->p_reason]); ++ sigdescr_np(pp->p_reason)); + hadnl = 0; + } + break; +@@ -948,10 +947,10 @@ + else if (signum == 0) + (void) fputc('0', cshout); /* 0's symbolic name is '0' */ + else +- (void) fprintf(cshout, "%s ", sys_signame[signum]); ++ (void) fprintf(cshout, "%s ", sigabbrev_np(signum)); + } else { + for (signum = 1; signum < NSIG; signum++) { +- (void) fprintf(cshout, "%s ", sys_signame[signum]); ++ (void) fprintf(cshout, "%s ", sigabbrev_np(signum)); + if (signum == NSIG / 2) + (void) fputc('\n', cshout); + } +@@ -978,9 +977,9 @@ + } + + for (signum = 1; signum < NSIG; signum++) +- if (!strcasecmp(sys_signame[signum], name) || ++ if (!strcasecmp(sigabbrev_np(signum), name) || + (strlen(name) > 3 && !strncasecmp("SIG", name, 3) && +- !strcasecmp(sys_signame[signum], name + 3))) ++ !strcasecmp(sigabbrev_np(signum), name + 3))) + break; + + if (signum == NSIG) { |