Summary: A set of GNU utilities commonly used in shell scripts. Name: sh-utils Version: 2.0 Release: 1a Copyright: GPL Group: System Environment/Shells Source: ftp://prep.ai.mit.edu/pub/gnu/sh-utils-%{version}.tar.gz Source1: su.pamd Patch1: sh-utils-%{version}-hostname.patch Patch2: sh-utils-%{version}-pam.patch Patch6: sh-utils-%{version}-paths.patch Patch9: sh-utils-%{version}-nocrypt.patch Patch12: sh-utils-%{version}-nostdin.patch Buildroot: /var/tmp/sh-utils Requires: pam >= 0.66-12 Prereq: /sbin/install-info %description The GNU shell utilities are a set of useful system utilities which are often used in shell scripts. The sh-utils package includes basename (to remove the path prefix from a specified pathname), chroot (to change the root directory), date (to print/set the system time and date), dirname (to remove the last level or the filename from a given path), echo (to print a line of text), env (to display/modify the environment), expr (to evaluate expressions), factor (to print prime factors), false (to return an unsuccessful exit status), groups (to print the groups a specified user is a member of), id (to print the real/effective uid/gid), logname (to print the current login name), nice (to modify a scheduling priority), nohup (to allow a command to continue running after logging out), pathchk (to check a file name's portability), printenv (to print environment variables), printf (to format and print data), pwd (to print the current directory), seq (to print numeric sequences), sleep (to suspend execution for a specified time), stty (to print/change terminal settings), su (to become another user or the superuser), tee (to send output to multiple files), test (to evaluate an expression), true (to return a successful exit status), tty (to print the terminal name), uname (to print system information), users (to print current users' names), who (to print a list of the users who are currently logged in), whoami (to print the effective user id), and yes (to print a string indefinitely). %prep %setup -q %patch1 -p1 -b .hostname %patch2 -p1 -b .nopam %patch6 -p1 -b .badpaths %patch9 -p1 -b .nocrypt %patch12 -p1 -b .nostdin %build CFLAGS="$RPM_OPT_FLAGS -DUSE_PAM" LDFLAGS=-s ./configure --prefix=/usr make PAMLIBS="-ldl -lpam -lpam_misc" make PAMLIBS="-ldl -lpam -lpam_misc" info %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/{bin,etc/pam.d,usr/sbin} make install prefix=$RPM_BUILD_ROOT/usr #some files are shell scripts... strip will fail on those strip $RPM_BUILD_ROOT/usr/bin/* || : for i in basename date echo false nice pwd sleep stty su true uname ; do install -m 755 -s $RPM_BUILD_ROOT/usr/bin/$i $RPM_BUILD_ROOT/bin/$i rm -f $RPM_BUILD_ROOT/usr/bin/$i done install -m 755 $RPM_BUILD_ROOT/usr/bin/chroot $RPM_BUILD_ROOT/usr/sbin rm -f $RPM_BUILD_ROOT/usr/bin/chroot rm -f $RPM_BUILD_ROOT/usr/bin/{hostname,uptime} $RPM_BUILD_ROOT/usr/man/man1/{hostname,uptime}.1 rm -f $RPM_BUILD_ROOT/usr/bin/[ ln -sf test $RPM_BUILD_ROOT/usr/bin/[ gzip -n -f $RPM_BUILD_ROOT/usr/info/sh-utils.info mkdir -p $RPM_BUILD_ROOT/etc/pam.d install -m644 ${RPM_SOURCE_DIR}/su.pamd $RPM_BUILD_ROOT/etc/pam.d/su %clean rm -rf $RPM_BUILD_ROOT %post /sbin/install-info /usr/info/sh-utils.info.gz /usr/info/dir %preun if [ $1 = 0 ]; then /sbin/install-info --delete /usr/info/sh-utils.info.gz /usr/info/dir fi %files %defattr(-,root,root) %doc NEWS README %config /etc/pam.d/su /bin/basename /bin/date /bin/echo /bin/false /bin/nice /bin/pwd /bin/sleep /bin/stty %attr(4755,root,root) /bin/su /bin/true /bin/uname /usr/sbin/chroot /usr/bin/* /usr/man/man1/* /usr/info/sh-utils.info.gz %changelog * Sat Aug 28 1999 Keisuke Fujii - updated to v.2.0 * Tue Apr 13 1999 Michael K. Johnson - su.pamd now calls pam_xauth * Mon Apr 12 1999 Michael K. Johnson - merge pam patches - wait until in child process to drop priviledges as we need euid != ruid during pam_open_session and pam_close_session * Thu Apr 01 1999 Erik Troan - make sure standard in is a tty so we can't feed it from a pipe * Wed Mar 31 1999 Erik Troan - don't trust stdin for su (bug 1274) * Fri Mar 26 1999 Michael Maher - added stty patch, fixed bug #997 * Sun Mar 21 1999 Cristian Gafton - auto rebuild in the new build environment (release 16) * Fri Dec 18 1998 Cristian Gafton - build against glibc 2.1 * Mon Jun 8 1998 Michal Jaegermann - fixed reversed test for when to allocate in who.c and an incorrect use of xrealloc. * Thu Apr 30 1998 Donnie Barnes - moved /usr/bin/nice to /bin/nice * Fri Apr 24 1998 Prospector System - translations modified for de, fr, tr * Sat Apr 11 1998 Cristian Gafton - manhattan rebuild * Wed Oct 22 1997 Michael K. Johnson - added minor patch for glibc 2.1 * Wed Oct 21 1997 Cristian Gafton - fixed the URLs in spec file - cleaned up the spec file * Thu Oct 02 1997 Michael K. Johnson - BuildRoot - New pam standard. * Sun Sep 14 1997 Erik Troan - uses install-info * Mon Jun 02 1997 Erik Troan - built against glibc * Fri Apr 18 1997 Michael K. Johnson - Fixed the sense of the user and root default paths. * Mon Apr 14 1997 Erik Troan - Fixed getutent patch to define UTMP_READ_INCR - Modified su.c to define default paths w/o regard to other header files or -D style definitions * Wed Apr 02 1997 Erik Troan - Updated getutent patch for 1.16 - Added mktime patch for 64bit time_t * Tue Mar 25 1997 Michael K. Johnson - DEFPATH handling moved from ...path.patch to _PATH_DEFPATH* * Mon Mar 03 1997 Michael K. Johnson - Moved from pam.conf to pam.d