diff options
-rw-r--r-- | system/rxvt/README | 12 | ||||
-rw-r--r-- | system/rxvt/doinst.sh | 9 | ||||
-rw-r--r-- | system/rxvt/rxvt-integer-overflow-fix.diff | 11 | ||||
-rw-r--r-- | system/rxvt/rxvt-logo.png | bin | 0 -> 1806 bytes | |||
-rw-r--r-- | system/rxvt/rxvt.SlackBuild | 139 | ||||
-rw-r--r-- | system/rxvt/rxvt.desktop | 9 | ||||
-rw-r--r-- | system/rxvt/rxvt.info | 10 | ||||
-rw-r--r-- | system/rxvt/rxvt.utempter.diff | 277 | ||||
-rw-r--r-- | system/rxvt/slack-desc | 19 |
9 files changed, 486 insertions, 0 deletions
diff --git a/system/rxvt/README b/system/rxvt/README new file mode 100644 index 0000000000..08c8d87ecb --- /dev/null +++ b/system/rxvt/README @@ -0,0 +1,12 @@ +rxvt (terminal emulator) + +rxvt is a color vt102 terminal emulator intended as an xterm +replacement for users who do not require features such as Tektronix +4014 emulation and toolkit-style configurability. As a result, rxvt +uses much less memory -- a significant advantage on a machine serving +many X sessions. Also included is rclock, an analog clock for X. + +rxvt was in Slackware up through 14.2; it was replaced with +rxvt-unicode in 15.0. Some people still prefer the original rxvt, so +here it is. Be aware that it's no longer maintained upstream. Also, +be aware that rxvt doesn't support Unicode. diff --git a/system/rxvt/doinst.sh b/system/rxvt/doinst.sh new file mode 100644 index 0000000000..65c7e2eeb9 --- /dev/null +++ b/system/rxvt/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/system/rxvt/rxvt-integer-overflow-fix.diff b/system/rxvt/rxvt-integer-overflow-fix.diff new file mode 100644 index 0000000000..edb13856ed --- /dev/null +++ b/system/rxvt/rxvt-integer-overflow-fix.diff @@ -0,0 +1,11 @@ +--- rxvt-2.7.10/src/command.c 2003-03-26 07:01:23.000000000 +0100 ++++ rxvt-2.7.10-patched/src/command.c 2017-04-27 12:06:05.682072274 +0200 +@@ -2096,7 +2096,7 @@ + i = ch - CSI_ICH; + ndef = get_byte_array_bit(csi_defaults, i); + for (p = 0; p < nargs; p++) +- if (arg[p] == -1) ++ if (arg[p] < 0 || arg[p] > 30000) + arg[p] = ndef; + + #ifdef DEBUG_CMD diff --git a/system/rxvt/rxvt-logo.png b/system/rxvt/rxvt-logo.png Binary files differnew file mode 100644 index 0000000000..7e5f792670 --- /dev/null +++ b/system/rxvt/rxvt-logo.png diff --git a/system/rxvt/rxvt.SlackBuild b/system/rxvt/rxvt.SlackBuild new file mode 100644 index 0000000000..1e2873648b --- /dev/null +++ b/system/rxvt/rxvt.SlackBuild @@ -0,0 +1,139 @@ +#!/bin/bash + +# Slackware build script for rxvt + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# This is loosely based on Pat Volkerding's rxvt from Slackware 14.2's +# patches/ (same ./configure options and patches). Since his last BUILD +# was 5, I'm submitting this with BUILD=6 to start out with. + +# The original upstream site is long gone. I was gonna link to an +# archive.org copy of it for the screenshots in the HTML doc, but +# the screenshot (the only one) isn't archived. So the docs have dead +# links, *shrug*. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=rxvt +VERSION=${VERSION:-2.7.10} +BUILD=${BUILD:-6} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +else + SLKCFLAGS="-O2" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +# Patches came from: +# https://ftp.slackware.com/pub/slackware/slackware-14.2/patches/source/rxvt/ +# ...though I gunzipped them since SBo prefers that. +patch -p1 < $CWD/rxvt-integer-overflow-fix.diff +patch -p1 < $CWD/rxvt.utempter.diff + +# Same configure options as Pat used: +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --enable-languages \ + --enable-utmp \ + --enable-wtmp \ + --enable-xpm-background \ + --enable-transparency \ + --enable-menubar \ + --enable-graphics \ + --enable-rxvt-scroll \ + --enable-next-scroll \ + --enable-xterm-scroll \ + --enable-xim \ + --enable-frills \ + --enable-linespace \ + --enable-24bit \ + --enable-keepscrolling \ + --enable-mousewheel \ + --enable-slipwheeling \ + --enable-xgetdefault \ + --enable-old-selection \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG +strip $PKG/usr/bin/* +gzip -9 $PKG/usr/man/man*/* + +# Cleanup on aisle six: empty dirs and a duplicate binary. +rmdir $PKG/usr/lib $PKG/usr/include +rm -rf $PKG/usr/bin/$PRGNAM-$VERSION + +# Note to self: do not include the terminfo entry, even though it's +# present in the source. Slackware's already got it, in the ncurses +# package. + +# Pat's package didn't include an icon or a .desktop. rxvt-logo.png +# came from upstream's web site, and the .desktop is a modified version +# of the one from rxvt-unicode. +APPS=$PKG/usr/share/applications +ICONS=$PKG/usr/share/icons/hicolor/32x32/apps +PMAPS=$PKG/usr/share/pixmaps + +mkdir -p $APPS $ICONS $PMAPS +cat $CWD/$PRGNAM.desktop > $APPS/$PRGNAM.desktop +cat $CWD/rxvt-logo.png > $ICONS/$PRGNAM.png +ln -s ../icons/hicolor/32x32/apps/$PRGNAM.png $PMAPS/$PRGNAM.png + +# Here we differ from Pat's package: not going to include the entire +# contents of doc/, since some of it's YODL source for the HTML, and there +# are Makefiles... +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +chmod 644 doc/menu/* +cp -a ChangeLog \ + *.lsm \ + doc/{etc/*.ad,menu,BUGS,FAQ,README.*,TODO,*.{txt,html,seq}} \ + rclock/*.html $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/rxvt/rxvt.desktop b/system/rxvt/rxvt.desktop new file mode 100644 index 0000000000..b41cf3089d --- /dev/null +++ b/system/rxvt/rxvt.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=rxvt +Comment=Classic X terminal emulator +Exec=rxvt +Icon=rxvt +Terminal=false +Type=Application +Categories=System;TerminalEmulator; diff --git a/system/rxvt/rxvt.info b/system/rxvt/rxvt.info new file mode 100644 index 0000000000..31e1a216f4 --- /dev/null +++ b/system/rxvt/rxvt.info @@ -0,0 +1,10 @@ +PRGNAM="rxvt" +VERSION="2.7.10" +HOMEPAGE="https://rxvt.sourceforge.net/" +DOWNLOAD="https://downloads.sourceforge.net/project/rxvt/rxvt-dev/2.7.10/rxvt-2.7.10.tar.gz" +MD5SUM="302c5c455e64047b02d1ef19ff749141" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" diff --git a/system/rxvt/rxvt.utempter.diff b/system/rxvt/rxvt.utempter.diff new file mode 100644 index 0000000000..54e06f7af0 --- /dev/null +++ b/system/rxvt/rxvt.utempter.diff @@ -0,0 +1,277 @@ +--- ./src/logging.c.orig 2002-12-15 16:33:04.000000000 -0800 ++++ ./src/logging.c 2003-06-07 21:08:52.000000000 -0700 +@@ -60,157 +60,7 @@ + void + rxvt_makeutent(rxvt_t *r, const char *pty, const char *hostname) + { +-#ifdef HAVE_STRUCT_UTMP +- struct utmp *ut = &(r->h->ut); +-#endif +-#ifdef HAVE_STRUCT_UTMPX +- struct utmpx *utx = &(r->h->utx); +-#endif +-#ifdef HAVE_UTMP_PID +- int i; +-#endif +- char ut_id[5]; +- struct passwd *pwent = getpwuid(getuid()); +- +- if (!STRNCMP(pty, "/dev/", 5)) +- pty += 5; /* skip /dev/ prefix */ +- +- if (!STRNCMP(pty, "pty", 3) || !STRNCMP(pty, "tty", 3)) { +- STRNCPY(ut_id, (pty + 3), sizeof(ut_id)); +- } +-#ifdef HAVE_UTMP_PID +- else if (sscanf(pty, "pts/%d", &i) == 1) +- sprintf(ut_id, "vt%02x", (i & 0xff)); /* sysv naming */ +-#endif +- else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3)) { +- rxvt_print_error("can't parse tty name \"%s\"", pty); +- return; +- } +- +-#ifdef HAVE_STRUCT_UTMP +- MEMSET(ut, 0, sizeof(struct utmp)); +-# ifdef HAVE_UTMP_PID +- setutent(); +- STRNCPY(ut->ut_id, ut_id, sizeof(ut->ut_id)); +- ut->ut_type = DEAD_PROCESS; +- getutid(ut); /* position to entry in utmp file */ +- STRNCPY(r->h->ut_id, ut_id, sizeof(r->h->ut_id)); +-# endif +-#endif +- +-#ifdef HAVE_STRUCT_UTMPX +- MEMSET(utx, 0, sizeof(struct utmpx)); +- setutxent(); +- STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id)); +- utx->ut_type = DEAD_PROCESS; +- getutxid(utx); /* position to entry in utmp file */ +- STRNCPY(r->h->ut_id, ut_id, sizeof(r->h->ut_id)); +-#endif +- +-#ifdef HAVE_STRUCT_UTMP +- STRNCPY(ut->ut_line, pty, sizeof(ut->ut_line)); +- ut->ut_time = time(NULL); +-# ifdef HAVE_UTMP_PID +- STRNCPY(ut->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?", +- sizeof(ut->ut_user)); +- STRNCPY(ut->ut_id, ut_id, sizeof(ut->ut_id)); +- ut->ut_time = time(NULL); +- ut->ut_pid = r->h->cmd_pid; +-# ifdef HAVE_UTMP_HOST +- STRNCPY(ut->ut_host, hostname, sizeof(ut->ut_host)); +-# endif +- ut->ut_type = USER_PROCESS; +- pututline(ut); +- endutent(); /* close the file */ +- r->h->utmp_pos = -1; +-# else +- STRNCPY(ut->ut_name, (pwent && pwent->pw_name) ? pwent->pw_name : "?", +- sizeof(ut->ut_name)); +-# ifdef HAVE_UTMP_HOST +- STRNCPY(ut->ut_host, hostname, sizeof(ut->ut_host)); +-# endif +-# endif +-#endif +- +-#ifdef HAVE_STRUCT_UTMPX +- STRNCPY(utx->ut_line, pty, sizeof(utx->ut_line)); +- STRNCPY(utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?", +- sizeof(utx->ut_user)); +- STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id)); +- utx->ut_session = getsid(0); +- utx->ut_tv.tv_sec = time(NULL); +- utx->ut_tv.tv_usec = 0; +- utx->ut_pid = r->h->cmd_pid; +-# ifdef HAVE_UTMPX_HOST +- STRNCPY(utx->ut_host, hostname, sizeof(utx->ut_host)); +-# if 0 +- { +- char *colon; +- +- if ((colon = STRRCHR(ut->ut_host, ':')) != NULL) +- *colon = '\0'; +- } +-# endif +-# endif +- utx->ut_type = USER_PROCESS; +- pututxline(utx); +- endutxent(); /* close the file */ +- r->h->utmp_pos = -1; +-#endif +- +-#if defined(HAVE_STRUCT_UTMP) && !defined(HAVE_UTMP_PID) +- { +- int i; +-# ifdef HAVE_TTYSLOT +- i = ttyslot(); +- if (rxvt_write_bsd_utmp(i, ut)) +- r->h->utmp_pos = i; +-# else +- FILE *fd0; +- +- if ((fd0 = fopen(TTYTAB_FILENAME, "r")) != NULL) { +- char buf[256], name[256]; +- +- buf[sizeof(buf) - 1] = '\0'; +- for (i = 1; (fgets(buf, sizeof(buf) - 1, fd0) != NULL);) { +- if (*buf == '#' || sscanf(buf, "%s", name) != 1) +- continue; +- if (!STRCMP(ut->ut_line, name)) { +- if (!rxvt_write_bsd_utmp(i, ut)) +- i = 0; +- r->h->utmp_pos = i; +- fclose(fd0); +- break; +- } +- i++; +- } +- fclose(fd0); +- } +-# endif +- } +-#endif +- +-#ifdef WTMP_SUPPORT +-# ifdef WTMP_ONLY_ON_LOGIN +- if (r->Options & Opt_loginShell) +-# endif +- { +-# ifdef HAVE_STRUCT_UTMP +-# ifdef HAVE_UPDWTMP +- updwtmp(RXVT_WTMP_FILE, ut); +-# else +- rxvt_update_wtmp(RXVT_WTMP_FILE, ut); +-# endif +-# endif +-# ifdef HAVE_STRUCT_UTMPX +- updwtmpx(RXVT_WTMPX_FILE, utx); +-# endif +- } +-#endif +-#if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE) +- if (r->Options & Opt_loginShell) +- rxvt_update_lastlog(RXVT_LASTLOG_FILE, pty, hostname); +-#endif ++ addToUtmp(pty, NULL, r->cmd_fd); + } + + /* ------------------------------------------------------------------------- */ +@@ -221,85 +71,7 @@ + void + rxvt_cleanutent(rxvt_t *r) + { +-#ifdef HAVE_STRUCT_UTMP +- struct utmp *tmput, *ut = &(r->h->ut); +-#endif +-#ifdef HAVE_STRUCT_UTMPX +- struct utmpx *tmputx, *utx = &(r->h->utx); +-#endif +- +-#ifdef HAVE_STRUCT_UTMP +-# ifdef HAVE_UTMP_PID +- MEMSET(ut, 0, sizeof(struct utmp)); +- setutent(); +- STRNCPY(ut->ut_id, r->h->ut_id, sizeof(ut->ut_id)); +- ut->ut_type = USER_PROCESS; +- if ((tmput = getutid(ut))) /* position to entry in utmp file */ +- ut = tmput; +- ut->ut_type = DEAD_PROCESS; +-# else +- MEMSET(ut->ut_name, 0, sizeof(ut->ut_name)); +-# ifdef HAVE_UTMP_HOST +- MEMSET(ut->ut_host, 0, sizeof(ut->ut_host)); +-# endif +-# endif +- ut->ut_time = time(NULL); +-#endif +- +-#ifdef HAVE_STRUCT_UTMPX +- MEMSET(utx, 0, sizeof(struct utmpx)); +- setutxent(); +- STRNCPY(utx->ut_id, r->h->ut_id, sizeof(utx->ut_id)); +- utx->ut_type = USER_PROCESS; +- if ((tmputx = getutxid(utx))) /* position to entry in utmp file */ +- utx = tmputx; +- utx->ut_type = DEAD_PROCESS; +- utx->ut_session = getsid(0); +- utx->ut_tv.tv_sec = time(NULL); +- utx->ut_tv.tv_usec = 0; +-#endif +- +- /* +- * Write ending wtmp entry +- */ +-#ifdef WTMP_SUPPORT +-# ifdef WTMP_ONLY_ON_LOGIN +- if (r->Options & Opt_loginShell) +-# endif +- { +-# ifdef HAVE_STRUCT_UTMP +-# ifdef HAVE_UPDWTMP +- updwtmp(RXVT_WTMP_FILE, ut); +-# else +- rxvt_update_wtmp(RXVT_WTMP_FILE, ut); +-# endif +-# endif +-# ifdef HAVE_STRUCT_UTMPX +- updwtmpx(RXVT_WTMPX_FILE, utx); +-# endif +- } +-#endif +- +- /* +- * Write utmp entry +- */ +-#ifdef HAVE_STRUCT_UTMP +-# ifdef HAVE_UTMP_PID +- if (ut->ut_pid == r->h->cmd_pid) +- pututline(ut); +- endutent(); +-# else +- if (r->h->utmp_pos > 0) { +- MEMSET(ut, 0, sizeof(struct utmp)); +- rxvt_write_bsd_utmp(r->h->utmp_pos, ut); +- } +-# endif +-#endif +-#ifdef HAVE_STRUCT_UTMPX +- if (utx->ut_pid == r->h->cmd_pid) +- pututxline(utx); +- endutxent(); +-#endif ++ removeFromUtmp(); + } + + /* ------------------------------------------------------------------------- */ +--- ./src/init.c.orig 2002-12-03 21:21:39.000000000 -0800 ++++ ./src/init.c 2003-06-07 21:09:26.000000000 -0700 +@@ -858,6 +858,7 @@ + rxvt_print_error("aborting"); + exit(EXIT_FAILURE); + } ++ rxvt_privileged_utmp(r, SAVE); + } + + /*----------------------------------------------------------------------*/ +@@ -1364,7 +1365,6 @@ + #endif + r->num_fds++; /* counts from 0 */ + +- rxvt_privileged_utmp(r, SAVE); + return cfd; + } + +--- ./autoconf/Make.common.in.orig 2001-11-29 19:22:56.000000000 -0800 ++++ ./autoconf/Make.common.in 2003-06-07 21:08:52.000000000 -0700 +@@ -68,7 +68,7 @@ + + LIBTOOL = @LIBTOOL@ + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEBUG) $(DINCLUDE) $(XINC) -I$(basedir) -I$(srcdir) -I. +-LINK = $(CC) $(CFLAGS) $(LDFLAGS) ++LINK = $(CC) $(CFLAGS) $(LDFLAGS) -lutempter -lutil + + # End of common section of the Makefile + #------------------------------------------------------------------------- diff --git a/system/rxvt/slack-desc b/system/rxvt/slack-desc new file mode 100644 index 0000000000..3ccbd2c348 --- /dev/null +++ b/system/rxvt/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +rxvt: rxvt (terminal emulator) +rxvt: +rxvt: rxvt is a color vt102 terminal emulator intended as an xterm +rxvt: replacement for users who do not require features such as Tektronix +rxvt: 4014 emulation and toolkit-style configurability. As a result, rxvt +rxvt: uses much less memory -- a significant advantage on a machine serving +rxvt: many X sessions. Also included is rclock, an analog clock for X. +rxvt: +rxvt: +rxvt: +rxvt: |