File amanda.spec of Package amanda

#
# spec file for package amanda (Version 2.5.2.1)
#
# Copyright (c) 2008 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/
#



Name:           amanda
BuildRequires:  cups-libs dump gawk gnuplot krb5-devel libsmbclient libsmbclient-devel libxslt lprng mailx mtx popt-devel readline-devel samba-client sendmail
%define package_version 2.5.2p1
Version:        2.5.2.1
Release:        186
PreReq:         /usr/sbin/useradd permissions
Requires:       dump /usr/bin/smbclient
AutoReqProv:    on
Group:          Productivity/Archiving/Backup
License:        GPL v2 or later; X11/MIT
Url:            http://www.amanda.org/
Summary:        Network Disk Archiver
Source:         %{name}-%{package_version}.tar.bz2
Source1:        %{name}-SuSE.tar.bz2
Source2:        AMANDA-HOWTO-Collection.pdf.tar.bz2
Patch1:         %{name}-%{version}-pie.patch
Patch2:         %{name}-%{version}-no_chown.patch
Patch3:         %{name}-%{version}-shellbang.patch
# upstream patch
Patch4:         %{name}-%{version}-chg-multi.patch
Patch5:         %{name}-%{version}-gnulib.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a release of Amanda, the Advanced Maryland Automatic Network
Disk Archiver.	Amanda is a backup system designed to archive many
computers on a network to a single large-capacity tape drive.



Authors:
--------
    James da Silva <jds@cs.umd.edu>
    Mike Grupenhoff <kashmir@munge.com>
    Todd Kover <kovert@uu.net>
    James Mathiesen <James-Mathiesen@deshaw.com>
    Alan McIvor <a.mcivor@irl.cri.nz>
    George Scott <George.Scott@cc.monash.edu.au>
    Alexandre Oliva <oliva@dcc.unicamp.br>
    Blair Zajac <blair@gps.caltech.edu>
    Curtis Varner <cvarner@cs.ucr.edu>
    John R. Jackson <jrj@gandalf.cc.purdue.edu>
    Jean-Louis Martineau <martinea@iro.umontreal.edu>

%prep
%setup -q -a 1 -a 2 -n %{name}-%{package_version}
%patch1
%patch2
%patch3
%patch4
%patch5

%build
%{suse_update_config  ./ config}
# Remove broken libtool macros
sed -i '/m4_include/,$!d' acinclude.m4
autoreconf -fi
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fPIC" \
	./configure --mandir=%{_mandir} \
          --prefix=%{_prefix} \
          --infodir=%{_infodir} \
          --sysconfdir=%{_sysconfdir} \
          --libdir=%{_libdir} \
          --libexecdir=/usr/lib/amanda \
          --localstatedir=/var/lib \
          --with-index-server=localhost \
          --with-gnutar-listdir=/var/lib/amanda/gnutar-lists \
          --with-smbclient=%{_prefix}/bin/smbclient \
          --with-dumperdir=/usr/lib/dumper \
          --with-amandahosts \
          --with-user=amanda \
          --with-group=disk \
          --with-gnutar=/bin/tar \
          --with-maxtapeblocksize=256 \
          --disable-libtool \
          --disable-shared \
          --disable-static 
make

%install
make DESTDIR=$RPM_BUILD_ROOT/ install
install -d $RPM_BUILD_ROOT/etc/amanda \
           $RPM_BUILD_ROOT/var/lib/amanda/index \
           $RPM_BUILD_ROOT/var/lib/amanda/gnutar-lists \
	   $RPM_BUILD_ROOT/var/lib/amanda/disklist \
	   $RPM_BUILD_ROOT/var/lib/amanda/DailySet1 \
	   $RPM_BUILD_ROOT/var/lib/amanda/lbl-templ \
	   $RPM_BUILD_ROOT/%{_docdir}/%{name} \
           $RPM_BUILD_ROOT/etc/xinetd.d
install NEWS README README.SuSE docs/* example/{amanda.conf,chg-multi.conf,disklist} $RPM_BUILD_ROOT/%{_docdir}/%{name}
rm -f $RPM_BUILD_ROOT/%{_docdir}/%{name}/Makefile*
#chown root:root $RPM_BUILD_ROOT/%{_docdir}/%{name}/* \
#                $RPM_BUILD_ROOT/%{_mandir}/*/*
chmod 644 $RPM_BUILD_ROOT/%{_docdir}/%{name}/* \
          $RPM_BUILD_ROOT/%{_mandir}/*/*
cp -a SuSE/* $RPM_BUILD_ROOT
#
# pdf doc
cp AMANDA-HOWTO-Collection.pdf $RPM_BUILD_ROOT/%{_docdir}/%{name}/
#
# label templates
cp -a example/*.ps $RPM_BUILD_ROOT/var/lib/amanda/lbl-templ
#
# create a list of binaries to be checked externally
cat << EOF > $RPM_BUILD_ROOT/usr/lib/amanda/suidlist
/usr/sbin/amcheck
/usr/lib/amanda/calcsize
/usr/lib/amanda/rundump
/usr/lib/amanda/planner
/usr/lib/amanda/runtar
/usr/lib/amanda/dumper
/usr/lib/amanda/killpgrp
EOF
rm -rf $RPM_BUILD_ROOT/usr/share/amanda
# bnc#412636
touch $RPM_BUILD_ROOT/usr/lib/amanda/exclude.gtar

%pre
/usr/sbin/useradd -r -o -g disk -u 37 -s /bin/bash -c "Amanda admin" \
-d /var/lib/amanda amanda 2> /dev/null || :

%post
%run_permissions
%verifyscript
%verify_permissions -f /usr/lib/amanda/suidlist

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc AMANDA-HOWTO-Collection.pdf ChangeLog NEWS INSTALL AUTHORS COPYRIGHT README ReleaseNotes docs/*.txt
%doc %{_mandir}/man*/am*
%config /usr/lib/amanda/exclude.gtar
%attr(664,amanda,disk) %config(noreplace) /etc/dumpdates
%attr(664,amanda,disk) %config(noreplace) /etc/amandates
%attr(755,amanda,disk) %dir /etc/amanda
%attr(755,amanda,disk) %dir /etc/amanda/example
%dir /usr/lib/amanda
%attr(755,amanda,disk) %dir /var/lib/amanda/
%attr(755,amanda,disk) %dir /var/lib/amanda/disklist
%attr(755,amanda,disk) %dir /var/lib/amanda/gnutar-lists/
%attr(755,amanda,disk) %dir /var/lib/amanda/index/
%attr(755,amanda,disk) %dir /var/lib/amanda/DailySet1
%attr(755,amanda,disk) %dir /var/lib/amanda/lbl-templ
%attr(644,amanda,disk) /var/lib/amanda/lbl-templ/*
%config %attr(644,amanda,disk) /var/lib/amanda/.bashrc
%config %attr(644,amanda,disk) /var/lib/amanda/.profile
# bnc#412636 file permissions of .amandahosts should be 600
%config %attr(600,amanda,disk) /var/lib/amanda/.amandahosts
%config %attr(644,amanda,disk) /etc/amanda/example/amanda.conf
%config %attr(644,amanda,disk) /etc/amanda/example/disklist
%config(noreplace) /etc/xinetd.d/*
%defattr(755,amanda,disk)
/usr/sbin/amadmin
%verify(not mode) %attr(0750,root,disk)/usr/sbin/amcheck
/usr/sbin/amcheckdb
/usr/sbin/amcleanup
/usr/sbin/amdd
/usr/sbin/amdump
/usr/sbin/amflush
/usr/sbin/amgetconf
/usr/sbin/amlabel
/usr/sbin/ammt
/usr/sbin/amoverview
/usr/sbin/amplot
%attr(0750,amanda,disk)/usr/sbin/amrecover
/usr/sbin/amreport
/usr/sbin/amrestore
/usr/sbin/amrmtape
/usr/sbin/amstatus
/usr/sbin/amtape
/usr/sbin/amtapetype
/usr/sbin/amtoc
/usr/sbin/amverify
/usr/sbin/amverifyrun
/usr/sbin/amcrypt-ossl
/usr/sbin/amcrypt-ossl-asym
/usr/sbin/amoldrecover
%defattr(644,amanda,disk)
/usr/lib/amanda/suidlist
/usr/lib/amanda/amcat.awk
/usr/lib/amanda/amplot.awk
/usr/lib/amanda/amplot.g
/usr/lib/amanda/amplot.gp
%defattr(755,amanda,disk)
/usr/lib/amanda/amandad
/usr/lib/amanda/amidxtaped
/usr/lib/amanda/amindexd
/usr/lib/amanda/amtrmidx
/usr/lib/amanda/chg-mcutil
/usr/lib/amanda/chg-null
/usr/lib/amanda/chg-chio
/usr/lib/amanda/chg-chs
/usr/lib/amanda/chg-disk
/usr/lib/amanda/chg-iomega
/usr/lib/amanda/chg-juke
/usr/lib/amanda/chg-manual
/usr/lib/amanda/chg-mtx
/usr/lib/amanda/chg-multi
/usr/lib/amanda/chg-rait
/usr/lib/amanda/chg-rth
/usr/lib/amanda/chg-scsi
/usr/lib/amanda/chg-zd-mtx
/usr/lib/amanda/driver
/usr/lib/amanda/amcleanupdisk
/usr/lib/amanda/amlogroll
/usr/lib/amanda/amtrmlog
%verify(not mode) %attr(0750,root,disk)/usr/lib/amanda/calcsize
%verify(not mode) %attr(0750,root,disk)/usr/lib/amanda/dumper
%verify(not mode) %attr(0750,root,disk)/usr/lib/amanda/killpgrp
%verify(not mode) %attr(0750,root,disk)/usr/lib/amanda/planner
%verify(not mode) %attr(0750,root,disk)/usr/lib/amanda/rundump
%verify(not mode) %attr(0750,root,disk)/usr/lib/amanda/runtar
/usr/lib/amanda/patch-system
/usr/lib/amanda/selfcheck
/usr/lib/amanda/sendbackup
/usr/lib/amanda/sendsize
/usr/lib/amanda/taper
/usr/lib/amanda/versionsuffix
/usr/lib/amanda/chg-lib.sh
%attr(755,amanda,disk) %dir /usr/lib/dumper
/usr/lib/dumper/generic-dumper
/usr/lib/dumper/amgtar
/usr/lib/amanda/chunker
/usr/lib/amanda/noop
/usr/sbin/amaespipe
/usr/sbin/amcrypt
/usr/sbin/amfetchdump
%{_libdir}/lib*
# excluding static libs
%exclude %{_libdir}/lib*.la
%exclude %{_libdir}/lib*.a

%changelog
* Mon Aug 18 2008 lmichnovic@suse.cz
- fixed missing exclude.gtar file [bnc#412636]
- fixed .amandahosts permission [bnc#412636]
* Wed Jul 16 2008 lmichnovic@suse.cz
- removed unnecessary Requires on glibc-devel ncurses-devel
* Fri Jun 27 2008 schwab@suse.de
- Fix gnulib macros.
* Fri Apr 11 2008 schwab@suse.de
- Remove broken libtool macros.
* Fri Feb 01 2008 lmichnovic@suse.cz
- compiling with option --with-maxtapeblocksize=256 [bnc#353239]
* Fri Nov 09 2007 lmichnovic@suse.cz
- installing only *.txt documentation files
- no need for executable perms for file /usr/lib/amanda/suidlist
* Thu Jul 12 2007 lmichnovic@suse.cz
- added upstream chg-multi.patch
- fixed missing shellbang (shellbang.patch)
* Fri Jun 08 2007 lmichnovic@suse.cz
- update 2.5.2p1
  * Many IPv6 bugs fixed:
  + missing sockaddr_storage
  + missing AI_V4MAPPED and AI_ALL
  + compare of IPv4 and IPv6 v4mapped address.
  + (bsd/bsdudp): server use two sockets,
  one for IPv4 and one for IPv6
  * amflush/autoflush
  * chown/chmod
  * amstatus
  * compilation on some platform
* Thu May 17 2007 lmichnovic@suse.cz
- adjusted *no_chown.patch
* Thu May 17 2007 lmichnovic@suse.cz
- update to version 2.5.2 final
  * some more bug fixes against beta
* Tue Apr 24 2007 lmichnovic@suse.cz
- update to version 2.5.2 beta 1
  * Many bugs fixed and code cleanup
  * krb5 auth is working
  * Works with IPv6 address
  * Amanda configuration file changes
  o amanda.conf changes
  + debugging is enabled in the config file
  see all debug_* config option
  + tapetype 'readblocksize', if maxtapeblocksize is set too
  larger for your hardware
- installing HOWTO-collection.pdf as doc
- excluding static libs
* Tue Feb 13 2007 lmichnovic@suse.cz
- update to version 2.5.1p3
  * Many bugs fixed
  * amrecover improve handling of not ascii filename in index.
  * Works with tar-1.16 and exit status of 1.
  * Can define a LASTSLOT in a chg-disk config file.
  - obsoletes *overflow.patch
* Fri Feb 09 2007 ro@suse.de
- allow build as non-root
* Mon Jan 22 2007 lmichnovic@suse.cz
- added libxslt into BuildRequires
- fixed possible overflow (overflow.patch)
* Mon Jan 22 2007 lmichnovic@suse.cz
- updated to 2.5.1p2
  * Many bugs fixed
  * amoverview is working
  * dumptype starttime is working
  Amanda command changes
   - amtape accept the -o arguments
   - amgetconf --list to list all tapetype, dumptype, holdingdisk
  or interface
   - amgetconf can return a value of a specific tapetype, dumptype,
  holdingdisk or interface
* Thu Oct 19 2006 lmichnovic@suse.cz
- changed version to 2.5.1.1
- compiling with fPIC - fixes failing build on some archs
* Tue Oct 03 2006 pnemec@suse.cz
- updated to 2.5.1p1 which not contain license problem
  affected files #196765
  - many bugfixes see NEWS
- minor cleaning in specfile
* Mon Aug 28 2006 pnemec@suse.cz
- removed examples with license problems
  from source tarball #196765
* Fri Jul 07 2006 pnemec@suse.cz
- updated to 2.5.0p2
  added many new features in 2.5.0 (Auto tape labelling,
  security comunication ...)
  fixed many minors bug (in p1) and major bug (in p2)
- added pdf document with actualized howtos
* Thu Apr 06 2006 pnemec@suse.cz
- some other fix for bug #137128 SIGSEGV in amadmin
* Fri Feb 10 2006 pnemec@suse.cz
- aded *-srv.patch to fix bug #137128
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Aug 01 2005 mjancar@suse.cz
- update to 2.4.5
- add glibc-devel and ncurses-devel to Requires
* Mon Jun 20 2005 ro@suse.de
- added pie patch from FC
- use fPIC for libs needed when building binaries with fpie
* Thu Nov 18 2004 ro@suse.de
- use kerberos-devel-packages
* Tue Aug 10 2004 tcrhak@suse.cz
- update to 2.4.4p3
* Fri Feb 20 2004 tcrhak@suse.cz
- update to version 2.4.4p2
* Wed Oct 29 2003 ro@suse.de
- package according to permissions.secure and add run_permissions
* Thu Sep 18 2003 tcrhak@suse.cz
- added quotes around "grep -E" in an assignment in
  chg-manual; patch manual
- fixed script chg-zd-mtx: parse vars from config correctly,
  fixed output when mtx is not found
* Wed Jul 30 2003 stepan@suse.de
- change samba-client dependency to /usr/bin/smbclient
  to make it operable with samba tng
* Wed Jul 30 2003 aj@suse.de
- Fix chown arguments.
* Mon Jul 28 2003 tcrhak@suse.cz
- fixed script chg-zd-mtx
* Fri Jul 25 2003 tcrhak@suse.cz
- update to version 2.4.4p1
* Thu Jun 12 2003 kukuk@suse.de
- added directory to filelist
* Fri Jun 06 2003 mmj@suse.de
- Package forgotten files
- Remove files from buildroot installed elsewhere
* Mon Mar 03 2003 tcrhak@suse.cz
- added amanda libraries to filelist
* Fri Feb 28 2003 tcrhak@suse.cz
- update to version 2.4.4, that fixes many memory leaks
- added xinetd config files
* Fri Feb 14 2003 tcrhak@suse.cz
- update to version 2.4.3
- applied changes proposed for the tape changer script
  [bug #20086] - patch mtx
* Tue Oct 29 2002 ro@suse.de
- remove (old) libtool macros from acinclude.m4
* Fri Aug 30 2002 tcrhak@suse.cz
- fixed neededforbuild so that smbclient is identified by configure,
  added samba-client to Requires (bug #15818)
* Mon Jul 08 2002 mmj@suse.de
- Using useradd in the package itself.
* Wed Apr 03 2002 tcrhak@suse.cz
- build with new automake/autoconf
* Sat Mar 09 2002 ro@suse.de
- replaced lprold by lprng in neededforbuild
* Thu Nov 22 2001 tcrhak@suse.cz
- Added ps label templates (bugzilla #12270)
- Added README.SuSE
* Mon Nov 12 2001 schwab@suse.de
- Fix for automake 1.5 and autoconf 2.52.
* Mon Aug 20 2001 dan@suse.cz
- update to 2.4.2p2
* Fri May 04 2001 pblaha@suse.cz
- fix permisions 644 for .bashrc  .amandahosts and .profile
- in amanda home /var/lib/amanda/
* Fri Feb 23 2001 ro@suse.de
- added readline/readline-devel to neededforbuild (split from bash)
* Thu Jan 11 2001 sf@suse.de
- added './' and 'config' to %%{suse_update_config} to make
  it build on IA64
* Fri Jan 05 2001 smid@suse.cz
- file permission changes
- default configuration changes
* Sun Dec 03 2000 smid@suse.cz
- new version 2.4.2
* Tue Nov 21 2000 uli@suse.de
- fixed to build on PPC
* Mon Sep 25 2000 smid@suse.cz
- binaries moved to /usr/sbin
* Mon Sep 18 2000 smid@suse.cz
- Y2K bugfix
* Tue Jun 20 2000 schwab@suse.de
- Add %%suse_update_config.
* Thu May 25 2000 smid@suse.cz
- /usr/doc/packages => %%{_defaultdocdir}
* Fri Apr 07 2000 smid@suse.cz
- url added
* Thu Jan 20 2000 kukuk@suse.de
- /usr/man -> /usr/share/man
- clean up configuration and spec file
* Thu Oct 07 1999 kukuk@suse.de
- Add needed tools to needforbuild
* Mon Sep 13 1999 bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Fri Jun 25 1999 kukuk@suse.de
- Update to 2.4.1p1 from jurix
- add glibc 2.1 patch
* Sat Dec 05 1998 ro@suse.de
- disabled setresuid/setresgid (while some are still using 2.0)
* Thu Feb 05 1998 florian@suse.de
- first rpm-package of amanda for SuSE
* Thu Jan 02 1997 florian@suse.de
- first S.u.S.E.-version of amanda 2.3.0
- not really supported yet...   :-)
openSUSE Build Service is sponsored by