Sophie

Sophie

distrib > Mandriva > 9.0 > i586 > by-pkgid > e86f9046d53ff3dd72ebf9691ca8098e > files > 10

sh-utils-2.0.15-2mdk.src.rpm

#rh-2.0.12-2
%define version 2.0.15
%define release 2mdk
%define optflags $RPM_OPT_FLAGS -D_GNU_SOURCE=1

Summary:        A set of GNU utilities commonly used in shell scripts
Name:           sh-utils
Version:        %{version}
Release:        %{release}
License:        GPL
Group:          System/Base
Url:            ftp://alpha.gnu.org/gnu/fetish
Source:         %{Url}/%name-%version.tar.bz2
Source1:        su.pamd
Source2:        help2man
Source100:      sh-utils-2.0-po.tar.bz2

Patch2: sh-utils-2.0-utmp.patch.bz2
Patch3: sh-utils-2.0.11-dateman.patch.bz2
Patch4: sh-utils-1.16-paths.patch.bz2
# RMS will never accept the PAM patch because it removes his historical
# rant about Twenex and the wheel group, so we'll continue to maintain
# it here indefinitely.
Patch6: sh-utils-2.0.15-pam.patch.bz2
Patch10: sh-utils-2.0-rfc822.patch.bz2
Patch11: sh-utils-2.0.12-hname.patch.bz2

BuildRequires:	pam-devel
BuildRoot:	%{_tmppath}/sh-utils
Requires:	pam >= 0.66-12
Prefix: %{_prefix}

%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,
  * yes: to print a string indefinitely.

%prep

%setup -q

%patch2 -p1 -b .utmp
%patch3 -p1 -b .dateman
%patch4 -p1 -b .paths
%patch6 -p1 -b .pam
%patch10 -p1 -b .rfc822

# Get rid of an evil construct that isn't accepted by automake >= 1.4p
#perl -pi -e "s/^VERSION.*/VERSION = %{version}/g" aclocal.m4
rm -f config/missing
cp -a /bin/true config/missing

# XXX docs should say /var/run/[uw]tmp not /etc/[uw]tmp
perl -pi -e 's,/etc/utmp,/var/run/utmp,g' doc/sh-utils.texi man/logname.1 man/users.1 man/who.1
perl -pi -e 's,/etc/wtmp,/var/run/wtmp,g' doc/sh-utils.texi man/logname.1 man/users.1 man/who.1
#INFOrm -f doc/sh-utils.info

cp %{SOURCE2} man/help2man
chmod +x man/help2man

%build
touch aclocal.m4 configure config.hin Makefile.in */Makefile.in */*/Makefile.in
%configure --disable-largefile --enable-pam || :
make all CPPFLAGS="-DUSE_PAM" su_LDFLAGS="-lpam -lpam_misc"

%install
rm -rf $RPM_BUILD_ROOT

%makeinstall

install -m 4755 src/su ${RPM_BUILD_ROOT}%{_bindir}/su

{ pushd $RPM_BUILD_ROOT

# These come from util-linux and/or procps.
  for i in hostname uptime ; do
    rm -f .%{_bindir}/$i .%{_mandir}/man1/${i}.1
  done

# Rearrange executables to taste.
  mkdir -p ./bin
  for i in id basename date echo false nice pwd sleep stty su true uname env; do
    mv .%{_bindir}/$i ./bin/$i
  done
  ln -s ../../bin/env $RPM_BUILD_ROOT/%_bindir/env 
# XXX this really should be a %attr ...
  chmod 4755 ./bin/su

  mkdir -p .%{_sbindir}
  mv .%{_bindir}/chroot .%{_sbindir}

  mkdir -p .%{_sysconfdir}/pam.d
  install -m 644 ${RPM_SOURCE_DIR}/su.pamd .%{_sysconfdir}/pam.d/su

  ln -sf test .%{_bindir}/[

#INFO  rm -f .%{_infodir}/dir
  popd
}

%find_lang %{name}

%clean
rm -rf $RPM_BUILD_ROOT

%pre
# This is needed to remove info references on update because of coreutils.info
if [ -f /usr/share/info/sh-utils.info.bz2 ]; then
	/sbin/install-info /usr/share/info/sh-utils.info.bz2 --dir=/usr/share/info/dir --remove > /dev/null &> /dev/null
fi 

%files -f %{name}.lang
%defattr(-,root,root)
%doc NEWS README
%config(noreplace) /etc/pam.d/su
/bin/*
%{_sbindir}/chroot
%{_bindir}/*
%{_mandir}/man*/*

%changelog
* Thu Sep  5 2002 Frederic Lepied <flepied@mandrakesoft.com> 2.0.15-2mdk
- use pam in su !
- fix the build

* Tue Aug 13 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.0.15-1mdk
- new release
- compile with -D_GNU_SOURCE=1
- move env to /bin
- remove prereq on install-info since coreutils is provide elsewhere
- drop patch1 (hostname came from net-tools)
- fix owner hasn't the rights but the group has access, still doesn't works
  [Patch5]
- rediff pam patch [Patch6]
- drop patches 0, 7 and 8 (merged upstream)
- remove zh hack

* Mon May 06 2002 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2.0.11-9mdk
- Automated rebuild in gcc3.1 environment

* Thu Mar 07 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.0.11-8mdk
- add infrastucture to ease update from mdk8.1

* Mon Jan 28 2002 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.0.11-7mdk
- Move id to /bin/.

* Thu Jan 24 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 2.0.11-6mdk
- add Url:
- sanitize
- info is now provided by fileutils

* Fri Sep 14 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.0.11-5mdk
- Rebuild.

* Mon Aug  6 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.0.11-4mdk
- pass XAUTHORITY through su (rh).
- re-fix su exit code (rh).

* Thu Jul 12 2001 Stefan van der Eijk <stefan@eijk.nu> 2.0.11-3mdk
- BuildRequires:	pam-devel

* Sat Jun 09 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 2.0.11-2mdk
- Fix a locale zh problem (chmou).

* Fri Jun  8 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.0.11-1mdk
- 2.0.11, merge rh patches.

* Sun May 27 2001 Jeff Garzik <jgarzik@mandrakesoft.com> 2.0-14mdk
- update po from pablo, as separate tarball, so it builds under new gettext
- remove old po update and outdated po fixups
- patch configure.in to update ALL_LINGUAS
- fix rpmlint warnings
- replace silly use of pushd with sub-shell

* Wed Feb  7 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.0-13mdk
- Define initial TZ to NULL.
- Fix usage help.
- Set as no replace /etc/ files.

* Sun Sep 24 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.0-12mdk
- Updated pamd configuration.

* Fri Jul 28 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.0-11mdk
- Remove duplicate uptime (thanks stefan).

* Fri Jul 21 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.0-10mdk
- Correct macros and filelist.
- Remove hostname manpages since we use the one from net-tools.

* Wed Jul 19 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.0-9mdk
- Correct build with latest pam.
- Macros.
- BM.

* Mon Jul 03 2000 David BAUDENS <baudens@mandrakesoft.com> 2.0-8mdk
- Fix SRPM installation
- Human readable description

* Mon Jul 03 2000 Pablo Saratxaga <pablo@mandrakesoft.com> 2.0-7mdk
- add utf8 patch to stty from mckinstry@computer.org
- added Irish language catalog

* Fri Mar 31 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 2.0-6mdk
- Spec-helper cleanup.
- Adjust groups.
- Use find_lang macros for locales.
- Merge with rh patchs.

* Fri Jan 21 2000 Pablo Saratxaga <pablo@mandrakesoft.com>
- added Catalan and Galician language catalogs
- included catalog languages into the rpm

* Tue Jan 11 2000 Pixel <pixel@linux-mandrake.com>
- fix build as non-root

* Tue Oct 26 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Merge with redhat changes.

* Mon Aug 16 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com>
- 2.0

* Sun Aug  8 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com>
- 1.16m
- clean up .spec file; merge the two PAM patches to one
- remove some obsolete patches

* Fri Jul 16 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Move %{_bindir}/tty to /bin/ and make a link for backward compatibility.

* Mon Jul 12 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>

- Build release (25mdk).

* Sat Jul 10 1999 Pablo Saratxaga <srtxg@chanae.alphanet.ch>
- added my patch that makes it for "who" not to do dns calls for 
  "machine names" which are in fact modem speed connections; as used
  by mgetty (ex: obituary ttyS2    Jul 10 18:14 (31200/ARQ) )
- included locale files (why it is that so many packages don't include
  them ? )

* Mon May 10 1999 Pixel <pixel_@geocities.com>
- hacked out restriction on su (stdin isatty now not checked)

* Tue Apr 13 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- Add RedHat6.0 patches.

* Sat Apr 10 1999 Bernhard Rosenkraenzer <bero@linux-mandrake.com>
- Mandrake adaptions
- bzip2 man/info pages
- add de locale
- fix handling of RPM_OPT_FLAGS

* Fri Dec 18 1998 Cristian Gafton <gafton@redhat.com>
- build against glibc 2.1

* Mon Jun  8 1998 Michal Jaegermann <michal@harddata.com>
- fixed reversed test for when to allocate in who.c and an incorrect
  use of xrealloc.

* Thu Apr 30 1998 Donnie Barnes <djb@redhat.com>
- moved %{_bindir}/nice to /bin/nice

* Fri Apr 24 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Sat Apr 11 1998 Cristian Gafton <gafton@redhat.com>
- manhattan rebuild

* Wed Oct 22 1997 Michael K. Johnson <johnsonm@redhat.com>
- added minor patch for glibc 2.1

* Wed Oct 21 1997 Cristian Gafton <gafton@redhat.com>
- fixed the URLs in spec file
- cleaned up the spec file

* Thu Oct 02 1997 Michael K. Johnson <johnsonm@redhat.com>
- BuildRoot
- New pam standard.

* Sun Sep 14 1997 Erik Troan <ewt@redhat.com>
- uses install-info

* Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
- built against glibc

* Fri Apr 18 1997 Michael K. Johnson <johnsonm@redhat.com>
- Fixed the sense of the user and root default paths.

* Mon Apr 14 1997 Erik Troan <ewt@redhat.com>
- 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 <ewt@redhat.com>
- Updated getutent patch for 1.16
- Added mktime patch for 64bit time_t

* Tue Mar 25 1997 Michael K. Johnson <johnsonm@redhat.com>
- DEFPATH handling moved from ...path.patch to _PATH_DEFPATH*

* Mon Mar 03 1997 Michael K. Johnson <johnsonm@redhat.com>
- Moved from pam.conf to pam.d