File ypserv.spec of Package ypserv

#
# spec file for package ypserv (Version 2.21)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           ypserv
BuildRequires:  gdbm-devel openslp-devel
License:        GPL v2 only
Group:          Productivity/Networking/NIS
Requires:       make portmap gawk
AutoReqProv:    on
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Version:        2.21
Release:        1
Summary:        YP - (NIS)-Server
PreReq:         %insserv_prereq %fillup_prereq
Source:         ypserv-%{version}.tar.bz2
Source1:        ypserv.init
Source2:        yppasswdd.init
Source3:        ypxfrd.init
Source4:        sysconfig.ypserv
Source5:        SuSEfirewall2.ypserv
Patch:          ypserv-%{version}.diff

%description
Configure your Linux PC as a YP server (NIS) using this package.



%prep
%setup -q
%patch

%build
export CFLAGS="$RPM_OPT_FLAGS"
./configure --prefix=%{_prefix} --enable-fqdn --mandir=%{_mandir}
make

%install
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services
mkdir -p $RPM_BUILD_ROOT/sbin/conf.d
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates
DOCDIR=%{_defaultdocdir}/yp
install -d -m 755 $RPM_BUILD_ROOT${DOCDIR}
install -d -m 755 $RPM_BUILD_ROOT${DOCDIR}/ypserv
make install DESTDIR=$RPM_BUILD_ROOT
#install contrib/ypslave $RPM_BUILD_ROOT/usr/sbin/
install -m 644 etc/ypserv.conf $RPM_BUILD_ROOT/etc/
install -m 644 etc/securenets $RPM_BUILD_ROOT/var/yp
install -m 755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/ypserv
install -m 755 %SOURCE2 $RPM_BUILD_ROOT/etc/init.d/yppasswdd
install -m 755 %SOURCE3 $RPM_BUILD_ROOT/etc/init.d/ypxfrd
# install sysconfig.ypserv
install -m 644 %SOURCE4 $RPM_BUILD_ROOT/var/adm/fillup-templates/
ln -sf ../../etc/init.d/yppasswdd	$RPM_BUILD_ROOT/usr/sbin/rcyppasswdd
ln -sf ../../etc/init.d/ypxfrd		$RPM_BUILD_ROOT/usr/sbin/rcypxfrd
ln -sf ../../etc/init.d/ypserv   	$RPM_BUILD_ROOT/usr/sbin/rcypserv
# install SuSEfirewall2 service script
install -m 644 %SOURCE5 $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/ypserv
# Remove files which should not be included:
rm $RPM_BUILD_ROOT/usr/lib/yp/match_printcap

%clean
rm -rf $RPM_BUILD_ROOT

%post
%{fillup_and_insserv ypserv ypxfrd yppasswdd}

%preun
%stop_on_removal ypserv ypxfrd yppasswdd

%postun
%restart_on_update ypserv ypxfrd yppasswdd
%insserv_cleanup

%files
%defattr(-,root,root)
%doc NEWS README TODO COPYING ChangeLog
/var/adm/fillup-templates/sysconfig.ypserv
%config /etc/init.d/yppasswdd
%config /etc/init.d/ypserv
%config /etc/init.d/ypxfrd
%config(noreplace) /var/yp/Makefile
%config(noreplace) /var/yp/securenets
%config(noreplace) /etc/ypserv.conf
%config /etc/sysconfig/SuSEfirewall2.d/services/ypserv
%dir /usr/lib/yp
%dir /var/yp
%doc %{_mandir}/man5/netgroup.5.gz
%doc %{_mandir}/man5/ypserv.conf.5.gz
%doc %{_mandir}/man8/makedbm.8.gz
%doc %{_mandir}/man8/mknetid.8.gz
%doc %{_mandir}/man8/pwupdate.8.gz
%doc %{_mandir}/man8/revnetgroup.8.gz
%doc %{_mandir}/man8/rpc.yppasswdd.8.gz
%doc %{_mandir}/man8/rpc.ypxfrd.8.gz
%doc %{_mandir}/man8/yphelper.8.gz
%doc %{_mandir}/man8/ypinit.8.gz
%doc %{_mandir}/man8/yppasswdd.8.gz
%doc %{_mandir}/man8/yppush.8.gz
%doc %{_mandir}/man8/ypserv.8.gz
%doc %{_mandir}/man8/ypxfr.8.gz
%doc %{_mandir}/man8/ypxfrd.8.gz
/usr/include/rpcsvc/ypxfrd.x
/usr/lib/yp/makedbm
/usr/lib/yp/create_printcap
/usr/lib/yp/mknetid
/usr/lib/yp/pwupdate
/usr/lib/yp/revnetgroup
/usr/lib/yp/yphelper
/usr/lib/yp/ypinit
/usr/lib/yp/ypxfr
/usr/lib/yp/ypxfr_*
/usr/sbin/rcyppasswdd
/usr/sbin/rcypserv
/usr/sbin/rcypxfrd
/usr/sbin/rpc.ypxfrd
/usr/sbin/rpc.yppasswdd
/usr/sbin/yppush
/usr/sbin/ypserv
#/usr/sbin/ypslave

%changelog
* Mon Jun 15 2009 kukuk@suse.de
- Update to version 2.21
  - Log RPC decoding errors
* Thu Apr 02 2009 kukuk@suse.de
- Update to version 2.20
  - manual page cleanup
  - some sanity checks added
* Tue Sep 23 2008 kukuk@suse.de
- Remove check for portmap from init scripts [bnc#428417]
* Thu Aug 14 2008 kukuk@suse.de
- Adjust init scripts to new policy
* Mon Jun 25 2007 adrian@suse.de
- fix changelog order
* Wed May 02 2007 kukuk@suse.de
- Add SuSEfirewall2 service data [Fate #300687/bnc #251659]
* Mon Mar 26 2007 rguenther@suse.de
- Add gdbm-devel BuildRequires.
* Fri May 26 2006 schwab@suse.de
- Don't strip binaries.
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Jan 10 2006 kukuk@suse.de
- Update to version 2.19
- Fix crash if hostname is not resolveable [#138006]
* Fri Sep 02 2005 kukuk@suse.de
- Fix memory corruption in ypxfr [#114932]
* Wed Jul 20 2005 kukuk@suse.de
- Fix -x/-E option of rpc.yppasswdd
* Tue May 31 2005 kukuk@suse.de
- Update to 2.17 (fix securenets support)
* Thu May 19 2005 kukuk@suse.de
- Update to 2.16
* Thu Apr 07 2005 kukuk@suse.de
- Update to 2.15 (compile with -fpie)
* Mon Sep 06 2004 kukuk@suse.de
- Update to 2.14 (includes last patches)
* Wed Sep 01 2004 kukuk@suse.de
- Don't free data of last record [Bug #44547]
* Wed Apr 14 2004 kukuk@suse.de
- Update to version 2.13: Add SLP domain attribute support and
  fix memory leak
* Thu Apr 01 2004 kukuk@suse.de
- Fix creation of services.byservicename
- check regulary SLP registration
* Thu Feb 26 2004 kukuk@suse.de
- Mark some more config files as noreplace
* Mon Feb 16 2004 kukuk@suse.de
- Don't merge /etc/gshadow, we don't have this file
* Sat Feb 14 2004 kukuk@suse.de
- Update to 2.12.1 (SLP URL change)
* Fri Feb 13 2004 kukuk@suse.de
- Update to ypserv 2.12 (fix Solaris 9 compatibility problems)
- Update init scripts to be LSB 2.0 conform
* Fri Feb 13 2004 kukuk@suse.de
- Remove test code from SLP registration
* Mon Jan 12 2004 kukuk@suse.de
- Update to 2.11 (ypxfr and yppush fixes)
* Mon Nov 24 2003 kukuk@suse.de
- Update to 2.10.90 (Add SLP support)
* Wed Oct 22 2003 kukuk@suse.de
- Update to 2.10 (Fix makedbm parser bug, fix for svc_run fails)
* Fri Aug 15 2003 kukuk@suse.de
- Update to interim release 2.9.91
- Add new metadata to sysconfig [Bug #28965]
* Tue Jul 29 2003 kukuk@suse.de
- Stop/Restart daemons on removal/update
* Thu Jun 26 2003 kukuk@suse.de
- Update to version 2.9
* Sun Jun 22 2003 mmj@suse.de
- Own all dirs
* Thu May 15 2003 kukuk@suse.de
- Fix return code of ypproc_all for not supported domains
* Tue May 13 2003 kukuk@suse.de
- Fix filelist (add yphelper.8 manual page)
* Sat Mar 08 2003 kukuk@suse.de
- Add patch to support multi line entries in aliases file
* Mon Mar 03 2003 kukuk@suse.de
- Don't reply with Access denied if map does not exist
* Fri Feb 14 2003 kukuk@suse.de
- Update to version 2.8
- Add patch to enable/disable debugging with SIGUSR1
* Mon Jan 27 2003 kukuk@suse.de
- Add sysconfig meta data [Bug #22707]
* Wed Oct 30 2002 kukuk@suse.de
- Update to version 2.6 (handling of cached file handles improved)
* Wed Aug 14 2002 poeml@suse.de
- fix comments in init scripts
* Thu Aug 08 2002 kukuk@suse.de
- Update to ypserv 2.5 (merge of all patches)
* Tue Aug 06 2002 kukuk@suse.de
- fix memory leak in ypserv
* Mon Jul 29 2002 kukuk@suse.de
- Add PreRequires
* Wed Jul 24 2002 kukuk@suse.de
- Add patch to print the name of the real master
* Wed Jul 17 2002 kukuk@suse.de
- Fix quoting in ypxfr_* scripts
* Mon May 27 2002 kukuk@suse.de
- Update to ypserv 2.4 (mostly documentation fixes)
* Tue May 14 2002 kukuk@suse.de
- Update to ypserv 2.3 (lot of minor bug fixes)
* Sat Feb 09 2002 kukuk@suse.de
- Fix problem that yppush does not end after transferring of map
* Wed Dec 12 2001 kukuk@suse.de
- Move ypserv config file to sysconfig
- Add gawk to requires
- Fix syntax error in create_printcap script
* Tue Dec 04 2001 kukuk@suse.de
- Check in init scripts if portmap is already running
* Mon Dec 03 2001 kukuk@suse.de
- Update to final ypserv 2.2 version (merge of all patches)
- Fix bug in ypxfr, do not replace master name with FQDN version
* Mon Nov 26 2001 kukuk@suse.de
- Remove START_ variables
- Handle return value of securenet check correct
* Tue Oct 30 2001 kukuk@suse.de
- update to ypserv 2.2 snapshot (merge of patches)
* Mon Oct 29 2001 kukuk@suse.de
- Fix seg.fault due bogus, old data
* Sat Sep 08 2001 kukuk@suse.de
- Lot of improvements for yphelper (needed by YaST2) [Bug #10296]:
  - allow IP numbers for finding maps
  - add extra parameter to allow specification of domainname
  - Do a reverse lookup on both host keys before comparing them
  and ignore the case of the characters
* Thu Sep 06 2001 kukuk@suse.de
- Add /usr/lib/yp/ypxfr_* to allow the sysadmin to sync NIS maps
  with cron jobs [Bug #10195]
* Mon Sep 03 2001 kukuk@suse.de
- Update to final ypserv 2.1:
  - Add parameter to rpc.yppasswdd to register on special port
  - Lot of documentation fixes
* Thu Aug 30 2001 kukuk@suse.de
- Update to ypserv 2.1 snapshot
- Fix manual pages [Bug #9901]
- Fix ypxfr fallback mode
* Wed Aug 08 2001 kukuk@suse.de
- Update to ypserv 2.0
* Tue Aug 07 2001 kukuk@suse.de
- Fix reading of YPPWD_SRCDIR form ypserv.rc.config
* Fri Jun 29 2001 schwab@suse.de
- Fix conflicting declaration.
* Wed Mar 21 2001 kukuk@suse.de
- Update to 1.3.12, fix to short timeout in ypxfrd_getmap.c
* Thu Feb 01 2001 kukuk@suse.de
- Fix typo in yppasswdd init script [Bug #6232]
* Sat Jan 06 2001 kukuk@suse.de
- Fix post and postun section (call of insserv) [Bug #5238]
* Mon Nov 27 2000 kukuk@suse.de
- Fix rpc.ypxfrd manual page
* Sun Nov 26 2000 kukuk@suse.de
- Use new initscripts in /etc/init.d
* Thu Nov 02 2000 kukuk@suse.de
- Move ypclient subpackage into extra main packages
* Fri Sep 29 2000 kukuk@suse.de
- Add missing %%dir entries in ypclients filelist
* Tue Sep 26 2000 kukuk@suse.de
- Update to ypbind-mt 1.7
* Wed Jul 19 2000 kukuk@suse.de
- Fix typo: If NIS is not configured, exit with zero.
* Thu Jul 13 2000 kukuk@suse.de
- Fix setting of domainname if no domainname is set
* Thu Jun 29 2000 kukuk@suse.de
- Set the domainname if no domainname is already set [Bug 3018]
* Tue Jun 27 2000 kukuk@suse.de
- Fix long standing bug in /var/yp/Makefile
* Sun Jun 04 2000 kukuk@suse.de
- Remove old ypbind-3.3 and ypbind-bsd
- Remove obsolete ypbind versions from file list
- Add all doc dirs to file list
* Tue May 16 2000 kukuk@suse.de
- Add new scripts for LPRng/printcap over NIS
* Mon May 15 2000 kukuk@suse.de
- Use /var/yp/securenets, not tcp wrapper
* Wed May 10 2000 kukuk@suse.de
- Remove ypmake
- Add sleep to ypbind restart
- Use BuildRoot
* Tue May 09 2000 kukuk@suse.de
- ypbind: Remove /var/yp/binding on stop
* Thu Apr 20 2000 kukuk@suse.de
- minor corrections for the SuSE Howto
* Tue Apr 18 2000 kukuk@suse.de
- Now really add tcpd to need for build
* Tue Apr 18 2000 kukuk@suse.de
- Add "probe" to /sbin/init.d/ypclient
* Tue Apr 18 2000 kukuk@suse.de
- Close file handles on error case
* Sat Apr 15 2000 kukuk@suse.de
- Update to ypserv 1.3.11
- Add tcpd to need for build
* Fri Mar 10 2000 kukuk@suse.de
- Remove debug messages
* Fri Mar 10 2000 kukuk@suse.de
- Apply lost yp/Makefile fix
* Wed Feb 23 2000 kukuk@suse.de
- Fix ypxfr bug.
* Thu Jan 20 2000 kukuk@suse.de
- ypserv: Update to 1.3.10
- Move /usr/man -> /usr/share/man
- Fix [Bug 1303]
* Sun Nov 07 1999 kukuk@suse.de
- yppush: Fix bug with Solaris NIS slave
* Sat Oct 30 1999 kukuk@suse.de
- yppasswd: fix possible buffer overun
* Mon Oct 25 1999 kukuk@suse.de
- ypserv: /var/yp/Makefile bugfix for non-shadow Systems
* Sat Oct 23 1999 kukuk@suse.de
- SuSEconfig.ypclient: Ignore the date for comparing different versions
* Fri Oct 22 1999 kukuk@suse.de
- yp-tools: Update to version 2.4
- SuSEconfig.ypclient: Fix + handling in /etc{passwd|group} (BUG#704)
* Tue Oct 19 1999 kukuk@suse.de
- ypserv: Update to version 1.3.9 (security fixes)
- yp-tools: Fix yppasswd messages
* Thu Oct 14 1999 kukuk@suse.de
- ypserv: Update to version 1.3.8
- ypbind-mt: Update to version 1.6
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Mon Aug 30 1999 kukuk@suse.de
- Add nisdomainname and ypdomainname
* Fri Aug 27 1999 kukuk@suse.de
- Update to ypserv 1.3.7
- Add yppush patch for Irix slave server
- Add ypbind-mt patch for glibc 2.1.2
* Wed Jul 14 1999 kukuk@suse.de
- Add ypwhich.1 to filelist
- Change hosts alias from hosts.byaddr to hosts.byname
* Wed Jun 30 1999 kukuk@suse.de
- Remove old, bogus debug message from rpc.yppasswdd
* Mon Jun 14 1999 kukuk@suse.de
- /var/yp/Makefile: don't build shadow map if we merge passwd
  with shadow.
* Fri Jun 04 1999 kukuk@suse.de
- Make source directory for passwd, shadow and group a variable
  in rc.config
* Thu Jun 03 1999 kukuk@suse.de
- Update all sources to latest version
- Make ypbind-mt default
- Support more then 1 server in /etc/yp.conf
- Add START_YPBIND to /sbin/init.d/ypclient, /etc/rc.config
* Thu Apr 29 1999 kukuk@suse.de
- rc (ypserv): Send SIGHUP for reload.
- rc (ypbind): Send SIGHUP for reload, wait until ypbind finds
  an NIS server.
* Thu Apr 22 1999 kukuk@suse.de
- ypslave (ypserv): If ypserv runs, send a clear cache to it.
* Wed Mar 31 1999 kukuk@suse.de
- ypserv.spec: Remove duplicate rc* entries, create relative rc
  links.
- ypserv/Makefile.Linux: don't create absolute rc* links.
- ypbind-3.3/Makefile.Linux: Likewise.
* Mon Mar 29 1999 kukuk@suse.de
- yp-tools: Fix typo in manpage
* Sat Mar 27 1999 ro@suse.de
- changed AM_PROG_INSTALL to AC_PROG_INSTALL in ypbind-3.3
* Sun Mar 14 1999 kukuk@suse.de
- ypserv: Fix new typo
* Sun Mar 14 1999 kukuk@suse.de
- ypserv: Fix 2 typos in yphelper parser
* Wed Mar 03 1999 ro@suse.de
- ypbind-3.3 switch from AM_PROG_INSTALL to AC_PROG_INSTALL
* Mon Mar 01 1999 kukuk@suse.de
- Update ypserv to 1.3.6.91
* Fri Feb 19 1999 kukuk@suse.de
- ypserv-1.3.6.90: Fix merging of group with gshadow
* Wed Feb 17 1999 kukuk@suse.de
- yp-tools-2.2: Fix some typos in german translation
- ypbind-3.3: Add ypbind-3.3-glibc4 patch
- update to ypserv 1.3.6.90
* Tue Feb 16 1999 kukuk@suse.de
- ypclients: Replaced with yp-tools 2.2
* Fri Jan 08 1999 ro@suse.de
- ypbind-3.3 : use rpcsvc include file from libc !
* Thu Jan 07 1999 ro@suse.de
- specfile: check for any alpha
* Fri Dec 18 1998 ro@suse.de
- specfile: respect alpha
- ypserv: dont redefine snprintf for glibc
* Mon Dec 07 1998 ro@suse.de
- added rc-links ; updated rest of init-scripts
* Mon Dec 07 1998 ro@suse.de
- updated init-scripts
* Wed Nov 11 1998 ro@suse.de
- ypbind: cast arg4 of semctl explicitly to (union semun)
* Mon Sep 21 1998 ro@suse.de
- ypbind-bsd: for glibc link against libnsl instead of libbsd
- ypclients:  for glibc use libnsl and libcrypt where needed
- ypserv:     define _GNU_SOURCE for use of getopt_long
* Tue Oct 28 1997 florian@suse.de
- start ypclient after ypserv
* Tue Oct 28 1997 florian@suse.de
- update to ypbind 3.3
- update to ypserv 1.2.4
- create bug-fix for ypserv to include FQDN in the maps
- add startup scripts for ypserv, ypxfrd, yppasswd together with
  fillup parameters in rc.config
- move some programs from ypserv package to ypclient as they are
  client programs
* Mon Oct 27 1997 ro@suse.de
- added ypclient as source -- changes-file is pasted at the end
  of this file
* Wed Aug 13 1997 bs@suse.de
- fixed SuSEconfig.ypclient for "+user:...." entries.
* Wed Aug 06 1997 bs@suse.de
- fixed bsh-2.0 problem in /var/yp/Makefile
* Fri Jun 06 1997 bs@suse.de
- clear all lines passwd beginnig with "^+" and not "^+$" in
  SuSEconfig.ypclient
* Sun Jun 01 1997 bs@suse.de
- moved fillup stuff to var/adm/fillup-templates
* Mon Apr 28 1997 bs@suse.de
  new version 2.2-970318
  added ypbind-bsd-1.15
* Thu Jan 02 1997 bs@suse.de
  deleted chmod in SuSEconfig.ypclient (is done via /etc/permissions)
* Thu Jan 02 1997 florian@suse.de
- update to version 1.1.3
* Thu Jan 02 1997 florian@suse.de
- update to new version 1.1.1
* Thu Jan 02 1997 florian@suse.de
- Update auf neue Version 1.1.0.
- Enthaelt neues Programm ypmake mit shadow-Unterstuetzung.
  ypclient.changes:
openSUSE Build Service is sponsored by