Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 5f05cb47521339c9c046e5803f1cb607 > files > 20

rsh-0.17-13mdk.src.rpm

%define	_snapshot	-pre20000412
%define version 0.17
%define release 13mdk

Summary:	Clients for remote access commands (rsh, rlogin, rcp).
Name:		rsh
Version:	%{version}
Release:	%{release}
License:	BSD
Group:		Networking/Remote access
Buildroot:	%{_tmppath}/%{name}-root

Source:		ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-rsh-%{version}%{_snapshot}.tar.bz2
Source1:	rexec.pam
Source2:	rlogin.pam
Source3:	rsh.pam
Source4:	http://www.tc.cornell.edu/~sadd/rexec-1.5.tar.bz2
Source5:	rsh-xinetd
Source6:	rlogin-xinetd
Source7:	rexec-xinetd

Patch2:		netkit-rsh-0.17-sectty.patch.bz2
Patch3:		netkit-rsh-0.10-rexec.patch.bz2
Patch4:		netkit-rsh-0.10-stdarg.patch.bz2
Patch5:		netkit-rsh-0.16-jbj.patch.bz2
#Patch6:	netkit-rsh-0.16-pamfix.patch.bz2
#Patch7:	netkit-rsh-0.16-jbj2.patch.bz2
#Patch8:	netkit-rsh-0.16-jbj3.patch.bz2
Patch9:		netkit-rsh-0.16-jbj4.patch.bz2
Patch10:	netkit-rsh-0.16-prompt.patch.bz2
Patch11:	netkit-rsh-0.16-rlogin=rsh.patch.bz2
Patch12:	netkit-rsh-0.16-nokrb.patch.bz2
Patch13:	netkit-rsh-0.17-pre20000412-jbj5.patch.bz2
Patch14:	netkit-rsh-0.17-pre20000412-glibc22.patch.bz2
Patch15:	netkit-rsh-0.17-userandhost.patch.bz2

BuildRequires:	libtermcap-devel
BuildRequires:	pam-devel
Conflicts:	krb5-workstation <= 1.3-4mdk

%description
The rsh package contains a set of programs which allow users to run
commmands on remote machines, login to other machines and copy files
between machines (rsh, rlogin and rcp).  All three of these commands
use rhosts style authentication.  This package contains the clients
needed for all of these services.
The rsh package should be installed to enable remote access to other
machines.

%package server
Summary: Servers for remote access commands (rsh, rlogin, rcp).
Group: System/Servers
Requires: pam >= 0.59, xinetd

%description server
The rsh-server package contains a set of programs which allow users
to run commmands on remote machines, login to other machines and copy
files between machines (rsh, rlogin and rcp).  All three of these
commands use rhosts style authentication.  This package contains the
servers needed for all of these services.  It also contains a server
for rexec, an alternate method of executing remote commands.
All of these servers are run by xinetd and configured using
/etc/xinetd.d/ and PAM.  All the server is disabled by default.

%prep
%setup -q -n netkit-rsh-%{version}%{_snapshot} -a 4
%patch2 -p1 -b .sectty
%patch3 -p1 -b .rexec
%patch4 -p1 -b .stdarg
%patch5 -p1 -b .jbj

# XXX patches {6,7,8} not applied
#%patch6 -p1 -b .pamfix
#%patch7 -p1 -b .jbj2
#%patch8 -p1 -b .jbj3

%patch9 -p1 -b .jbj4
%patch10 -p1 -b .prompt
%patch11 -p1 -b .rsh
%patch12 -p1 -b .rsh.nokrb

%patch13 -p1 -b .jbj5
%patch14 -p1 -b .glibc22
%patch15 -p1 -b userandhost

# No, I don't know what this is doing in the tarball.
rm -f rexec/rexec

%build
sh configure
perl -pi -e '
    s,^CC=.*$,CC=cc,;
    s,-O2,\$(RPM_OPT_FLAGS),;
    s,^BINDIR=.*$,BINDIR=%{_bindir},;
    s,^MANDIR=.*$,MANDIR=%{_mandir},;
    s,^SBINDIR=.*$,SBINDIR=%{_sbindir},;
    ' MCONFIG

%make

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/pam.d
mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/{man1,man5,man8}
make INSTALLROOT=$RPM_BUILD_ROOT MANDIR=%{_mandir} install

install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/rexec
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/rlogin
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/rsh

make INSTALLROOT=$RPM_BUILD_ROOT MANDIR=%{_mandir} install -C rexec

cd $RPM_BUILD_ROOT%{_mandir}/man8
for i in rexecd rlogind rshd; do
  rm $i.8
  echo ".so man8/in.$i.8" > $i.8
done

install -D -m644 %SOURCE5 ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/rsh
install -m644 %SOURCE6 ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/rlogin
install -m644 %SOURCE7 ${RPM_BUILD_ROOT}%{_sysconfdir}/xinetd.d/rexec

# rexec.1 lands in the wrong place
mv $RPM_BUILD_ROOT%{_mandir}/rexec.1 $RPM_BUILD_ROOT%{_mandir}/man1/

# use alternatives to prevent conflict with krb5 provided binaries
for i in rcp rlogin rsh; do
  mv $RPM_BUILD_ROOT%{_bindir}/$i $RPM_BUILD_ROOT%{_bindir}/$i.netkit
  mv $RPM_BUILD_ROOT%{_mandir}/man1/$i.1 $RPM_BUILD_ROOT%{_mandir}/man1/$i.netkit.1
done

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{_sbindir}/update-alternatives --install %{_bindir}/rcp rcp %{_bindir}/rcp.netkit 10 --slave %{_mandir}/man1/rcp.1.bz2 man-rcp %{_mandir}/man1/rcp.netkit.1.bz2
%{_sbindir}/update-alternatives --install %{_bindir}/rlogin rlogin %{_bindir}/rlogin.netkit 10 --slave %{_mandir}/man1/rlogin.1.bz2 man-rlogin %{_mandir}/man1/rlogin.netkit.1.bz2
%{_sbindir}/update-alternatives --install %{_bindir}/rsh rsh %{_bindir}/rsh.netkit 10 --slave %{_mandir}/man1/rsh.1.bz2 man-rsh %{_mandir}/man1/rsh.netkit.1.bz2

%preun
if [ $1 -eq 0 ]; then
  %{_sbindir}/update-alternatives --remove rcp %{_bindir}/rcp.netkit
  %{_sbindir}/update-alternatives --remove rlogin %{_bindir}/rlogin.netkit
  %{_sbindir}/update-alternatives --remove rsh %{_bindir}/rsh.netkit
fi

%triggerpostun -- %{name} <= 0.17-12mdk
if [ ! -f %{_bindir}/rcp ]; then
  %{_sbindir}/update-alternatives --install %{_bindir}/rcp rcp %{_bindir}/rcp.netkit 10 --slave %{_mandir}/man1/rcp.1.bz2 man-rcp %{_mandir}/man1/rcp.netkit.1.bz2
  %{_sbindir}/update-alternatives --install %{_bindir}/rlogin rlogin %{_bindir}/rlogin.netkit 10 --slave %{_mandir}/man1/rlogin.1.bz2 man-rlogin %{_mandir}/man1/rlogin.netkit.1.bz2
  %{_sbindir}/update-alternatives --install %{_bindir}/rsh rsh %{_bindir}/rsh.netkit 10 --slave %{_mandir}/man1/rsh.1.bz2 man-rsh %{_mandir}/man1/rsh.netkit.1.bz2
fi

%files
%defattr(-,root,root)
%{_bindir}/rexec
%{_mandir}/man1/*.1*
%defattr(4755,root,root)
%{_bindir}/rcp.netkit
%{_bindir}/rlogin.netkit
%{_bindir}/rsh.netkit

%files server
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/xinetd.d/*
%config(noreplace) %{_sysconfdir}/pam.d/*
%{_mandir}/man8/*.8*
%{_sbindir}/in.*

%changelog
* Fri Feb 13 2004 Abel Cheung <deaddog@deaddog.org> 0.17-13mdk
- Use alternatives for rsh etc, instead of conflict with krb5-workstation

* Fri Jul 25 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 0.17-12mdk
- fix use-of-RPM_SOURCE_DIR (rpmlint)
- fix conffile-without-noreplace-flag (rpmlint)
- macroize
- drop unapplied Patches (P6, P7 & P8)

* Fri Jul 25 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 0.17-11mdk
- rebuild

* Sun Feb  2 2003 Stefan van der Eijk <stefan@eijk.nu> 0.17-10mdk
- move rexec.1 manpage to %%{_mandir}/man1/

* Tue Apr 09 2002 Yoann Vandoorselaere <yoann@mandrakesoft.com> 0.17-9mdk

- add missing dependencie on xinetd (thanks to Erwan Velu
  <erwan@mandrakesoft.com> for reporting this).
  
* Fri Feb 14 2002 Yoann Vandoorselaere <yoann@mandrakesoft.com> 0.17-8mdk

- forgot to apply patch 15.

* Fri Feb 14 2002 Yoann Vandoorselaere <yoann@mandrakesoft.com> 0.17-7mdk

Fix bug #3109

- include RH userandhost patch (should fix REMOTEHOST not set issue).
- update stty patch.

* Wed Oct 10 2001 Stefan van der Eijk <stefan@eijk.nu> 0.17-6mdk
- BuildRequires: libtermcap-devel

* Wed Apr 04 2001 Yoann Vandoorselaere <yoann@mandrakesoft.com> 0.17-5mdk
- Fix bug #2318 (/etc/xinetd.d/rexec specifies to run rlogind instead of
  rexecd) reported by <smart@hpc.csiro.au>

- Merge RH Pam change.

* Tue Sep 26 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.17-4mdk
- Pamstackizification.

* Sat Sep 23 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.17-3mdk
- Xinetd support.
- Merge rh patch.
- Upgrade to the last pre of 0.17.

* Thu Aug 31 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 0.17-2mdk
- removed unused patch
- patch: all r-client command output a : 
  "This command is deprecated, you should use ssh instead."

* Sat Aug 05 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.17-1mdk
- new and shiny version

* Wed Jun 28 2000 Pablo Saratxaga <pablo@mandrakesoft.com> 0.16-3mdk
- Added UTF-8 patch from Alastair.McKinstry@compaq.com
- made man pages paths modular
- remove useless man pages compression and binary stripping sections
  (now done by spec-helper)

* Thu Apr 13 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 0.16-2mdk
- Fix bad tag value.

* Tue Mar 21 2000 Yoann Vandoorselaere <yoann@mandrakesoft.com> 0.16-1mdk
- 0.16-1mdk

* Wed Feb  9 2000 Jeff Johnson <jbj@redhat.com>
- mark pam config files as %config.

* Fri Feb  4 2000 Bill Nottingham <notting@redhat.com>
- handle compressed manpages

* Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
- fix description

* Sun Jan 30 2000 Bill Nottingham <notting@redhat.com>
- remove bogus rexec binary when building; it causes weirdness

* Fri Jan 28 2000 Jeff Johnson <jbj@redhat.com>
- Make sure that rshd is compiled with -DUSE_PAM.

* Mon Jan 10 2000 Jeff Johnson <jbj@redhat.com>
- Fix bug in rshd (hangs forever with zombie offspring) (#8313).

* Wed Jan  5 2000 Jeff Johnson <jbj@redhat.com>
- fix the PAM fix yet again (#8133).

* Tue Jan  4 2000 Bill Nottingham <notting@redhat.com>
- split client and server

* Tue Dec 21 1999 Jeff Johnson <jbj@redhat.com>
- update to 0.16.
- dup setuid bits into files list.

* Fri Jul 30 1999 Jeff Johnson <jbj@redhat.com>
- update to rexec-1.5 client (#4262)

* Wed May 19 1999 Jeff Johnson <jbj@redhat.com>
- fix broken rexec protocol in in.rexecd (#2318).

* Tue May  4 1999 Justin Vallon <vallon@mindspring.com>
- rcp with error was tricked by stdarg side effect (#2300)

* Thu Apr 15 1999 Michael K. Johnson <johnsonm@redhat.com>
- rlogin pam file was missing comment magic

* Tue Apr 06 1999 Preston Brown <pbrown@redhat.com>
- strip rexec

* Fri Mar 26 1999 Jeff Johnson <jbj@redhat.com>
- rexec needs pam_set_item() (#60).
- clarify protocol in rexecd.8.
- add rexec client from contrib.

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 22)

* Mon Mar 15 1999 Jeff Johnson <jbj@redhat.com>
- compile for 6.0.

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

* Tue Apr 14 1998 Erik Troan <ewt@redhat.com>
- built against new ncurses

* Sat Apr  5 1998 Marcelo F. Vianna <m-vianna@usa.net>
- Packaged for RH5.0 (Hurricane)

* Tue Oct 14 1997 Michael K. Johnson <johnsonm@redhat.com>
- new pam conventions

* Tue Jul 15 1997 Erik Troan <ewt@redhat.com>
- initial build