2 # Copyright (C) 2005-2012 Zmanda Incorporated.
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # You should have received a copy of the GNU General Public License along
16 # with this program; if not, write to the Free Software Foundation, Inc.,
17 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
20 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
25 %{?srpm_only: %define build_srpm 1}
27 # Pkg-config sometimes needs its own path set, and we need to allow users to
28 # override our guess during detection. This macro takes care of that.
29 # If no --define PKG_CONFIG_PATH was passed and env var $PKG_CONFIG_PATH is
30 # set then use the env var.
31 %{!?PKG_CONFIG_PATH: %{expand:%(echo ${PKG_CONFIG_PATH:+"%%define PKG_CONFIG_PATH $PKG_CONFIG_PATH"})}}
33 %{?PKG_CONFIG_PATH:%{echo:PKG_CONFIG_PATH = %{PKG_CONFIG_PATH}\n}}
35 # LDFLAGS: newer gnu linkers can use "-Wl,--as-needed", while older ones,
36 # like rhel3 and sles9 can't.
37 %define enable_as_needed --enable-as-needed
39 # Define which Distribution we are building:
40 # Try to detect the distribution we are building:
41 %if %{_vendor} == redhat
42 # Fedora symlinks /etc/fedora-release to /etc/redhat-release for at least
43 # fc3-8. So RHEL and Fedora look at the same file. Different versions have
44 # different numbers of spaces; hence the use of $3 vs. $4..
45 %if %(awk '$1 == "Fedora" { exit 1; }' /etc/redhat-release; echo $?)
48 %define distver %(awk '{print $4}' /etc/redhat-release)
50 # if macro cannot have an empty test and we're just testing the existance
51 %if %{?fedora:yes}%{!?fedora:no} == yes
52 # In theory this should be more reliable than awking for distver.
53 %define distver %{fedora}
55 %if "%{dist}" == "fedora"
57 %define requires_libtermcap Requires: libtermcap.so.2
63 %if %{_host_cpu} == x86_64 && %{_target_cpu} == i686
64 # Do nothing if PKG_CONFIG_PATH was set by the user above.
65 %{!?PKG_CONFIG_PATH: %define PKG_CONFIG_PATH /usr/lib/pkgconfig}
68 %if %(awk '$1 == "Red" && $7 ~ /3.*/ { exit 1; }' /etc/redhat-release; echo $?)
73 %define requires_libtermcap Requires: libtermcap.so.2
75 %define without_ipv6 --without-ipv6
76 %undefine enable_as_needed
77 %define prereq_sharutils PreReq: sharutils
79 %if %(awk '$1 == "Red" && $7 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
84 %define requires_libtermcap Requires: libtermcap.so.2
86 %define prereq_sharutils PreReq: sharutils
88 %if %(awk '$1 == "CentOS" && $3 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
93 %define requires_libtermcap Requires: libtermcap.so.2
95 %define prereq_sharutils PreReq: sharutils
97 %if %(awk '$1 == "Red" && $7 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
103 %if %(awk '$1 == "CentOS" && $3 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
109 %if %(awk '$1 == "Red" && $7 ~ /6.*/ { exit 1; }' /etc/redhat-release; echo $?)
116 # If dist is undefined, we didn't detect.
117 %{!?dist:%define dist unknown}
119 # Detect Suse variants.
120 %if %{_vendor} == "suse"
122 %define disttag %(awk '$1=="openSUSE" { print "suse"; } $1=="SUSE" {$3=="Enterprise" ? TAG="sles" : TAG="suse" ; print TAG}' /etc/SuSE-release)
123 # use printf to be sure rpm gets a number type
124 %define distver %(awk '$1=="openSUSE" { printf("%d", $2); } $1=="SUSE" {$3=="Enterprise" ? VER=$5 : VER=$3 ; printf("%d", VER)}' /etc/SuSE-release)
127 %undefine enable_as_needed
130 %define prereq_sharutils PreReq: sharutils
134 # Set options per distribution
135 %if %{dist} == redhat || %{dist} == fedora
136 %define rpm_group Applications/Archiving
137 %define requires_initscripts Requires: initscripts
140 %define rpm_group Productivity/Archiving/Backup
143 # Let's die if we haven't detected the distro. This might save some frustration.
144 # RPM does not provide a way to exit gracefully, hence the tag_to_cause_exit.
145 %{!?distver: %{error:"Your distribution and its version were not detected."}; %tag_to_cause_exit }
146 # Set minimum tar version if it wasn't set in the per-distro section
147 %{!?tarver: %define tarver 1.15}
149 # Define the native binary data encoder (for create_amkey)
150 %define encoder %({ command -v base64 2>/dev/null; } || { command -v uuencode 2>/dev/null; })
152 %define packer %(%{__id_u} -n)
154 # --- Definitions ---
156 # Define amanda_version using the value determined by
157 # packaging/common/substitute.pl.
158 %{!?amanda_version: %define amanda_version %%VERSION%% }
159 %{!?amanda_release: %define amanda_release 1}
160 %define amanda_version_info "Amanda Community Edition - version %{amanda_version}"
161 %define amanda_user amandabackup
162 %define amanda_group disk
164 Summary: The Amanda Backup and Archiving System
166 Version: %{amanda_version}
167 %define rpm_release %{amanda_release}.%{disttag}%{distver}
169 %define rpm_release %{amanda_release}
171 Release: %{rpm_release}
172 Source: %{name}-%{version}.tar.gz
173 License: http://wiki.zmanda.com/index.php/Amanda_Copyright
175 Packager: www.zmanda.com
176 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{packer}-buildroot
178 # TODO - Need required versions for these:
179 BuildRequires: autoconf
180 BuildRequires: automake
181 BuildRequires: binutils
185 BuildRequires: glib2 >= 2.2.0
186 BuildRequires: glib2-devel
187 BuildRequires: gettext
188 BuildRequires: readline
189 # Note: newer distros have changed most *-devel to lib*-devel, and added a
190 # provides tag for backwards compat.
191 BuildRequires: readline-devel
192 BuildRequires: %{curl} >= 7.10.0
193 BuildRequires: %{curl}-devel >= 7.10.0
194 BuildRequires: openssl
195 BuildRequires: openssl-devel
196 BuildRequires: perl(ExtUtils::Embed)
200 Requires: /usr/bin/id
201 Requires: /sbin/ldconfig
203 Requires: /usr/sbin/useradd
204 Requires: /usr/sbin/usermod
209 Requires: %{curl} >= 7.10.0
212 Requires: perl >= 5.6.0
213 Requires: tar >= %{tarver}
215 %{?requires_libtermcap}
216 %{?requires_initscripts}
218 %package backup_client
219 Summary: The Amanda Backup and Archiving Client
224 %{?requires_libtermcap}
225 %{?requires_initscripts}
227 Requires: perl >= 5.6.0
228 Requires: tar >= %{tarver}
230 Provides: amanda-backup_client = %{amanda_version}
231 Provides: libamclient-%{version}.so = %{amanda_version}
232 Provides: libamanda-%{version}.so = %{amanda_version}
233 Conflicts: amanda-backup_server
234 # Native package names
235 Obsoletes: amanda, amanda-client, amanda-server
237 %package backup_server
238 Summary: The Amanda Backup and Archiving Server
243 %{?requires_libtermcap}
244 %{?requires_initscripts}
246 Requires: perl >= 5.6.0
247 Requires: tar >= %{tarver}
248 Provides: amanda-backup_server = %{amanda_version}
249 Provides: libamclient-%{version}.so = %{amanda_version}
250 Provides: libamanda-%{version}.so = %{amanda_version}
251 Provides: libamserver-%{version}.so = %{amanda_version}
252 Provides: libamtape-%{version}.so = %{amanda_version}
253 Provides: libamdevice-%{version}.so = %{amanda_version}
254 Conflicts: amanda-backup_client
255 # Native package names
256 Obsoletes: amanda, amanda-client, amanda-server
257 # --- Package descriptions ---
260 Amanda is the leading Open-Source Backup and Archiving software.
262 The amanda-backup_server package should be installed on the Amanda server, i.e.
263 the machine attached to backup media (such as a tape drive or disk
264 drives) where backups will be written. The amanda-backup_server package
265 includes Amanda client. The amanda-backup_client package needs
266 to be installed on every system that is being backed up.
268 Amanda Forums is located at: http://forums.zmanda.com/
269 Amanda Documentation is available at: http://wiki.zmanda.com/
273 %description backup_server
274 Amanda is the leading Open-Source Backup and Archiving software.
276 This package contains the Amanda server. The amanda-backup_server package
277 should be installed on the Amanda server, i.e. the machine attached
278 to backup media (such as a tape drive or disk drives) where backups
279 will be written. The amanda-backup_server package includes Amanda client.
281 Amanda Forums is located at: http://forums.zmanda.com/
282 Amanda Documentation is available at: http://wiki.zmanda.com/
286 %description backup_client
287 Amanda is the leading Open-Source Backup and Archiving software.
289 This package contains the Amanda client. The amanda-backup_client package
290 needs to be installed on every system that is being backed up.
292 Amanda Forums is located at: http://forums.zmanda.com/
293 Amanda Documentation is available at: http://wiki.zmanda.com/
295 # --- Directory setup ---
297 # Configure directories:
299 %define EPREFIX %{PREFIX}
300 %define BINDIR %{EPREFIX}/bin
301 %define SBINDIR %{EPREFIX}/sbin
302 %define LIBEXECDIR %{EPREFIX}/libexec
303 %define AMLIBEXECDIR %{LIBEXECDIR}/amanda
304 %define DATADIR %{PREFIX}/share
305 %define SYSCONFDIR /etc
306 %define LOCALSTATEDIR /var
307 %define AMANDATES %{AMANDAHOMEDIR}/amandates
308 %define AMANDAHOMEDIR %{LOCALSTATEDIR}/lib/amanda
310 %define LIBDIR %{EPREFIX}/lib64
312 %define LIBDIR %{EPREFIX}/lib
314 %define AMLIBDIR %{LIBDIR}/amanda
315 %define INCLUDEDIR %{PREFIX}/include
316 %define MANDIR %{DATADIR}/man
317 %define LOGDIR /var/log/amanda
318 %define PERLSITELIB %(eval "`perl -V:installsitelib`"; echo $installsitelib)
319 %define AMDATADIR /var/lib/amanda
321 # Installation directories:
322 %define ROOT_SBINDIR %{buildroot}/%{SBINDIR}
323 %define ROOT_LIBEXECDIR %{buildroot}/%{LIBEXECDIR}
324 %define ROOT_DATADIR %{buildroot}/%{DATADIR}
325 %define ROOT_LOCALSTATEDIR %{buildroot}/%{LOCALSTATEDIR}
326 %define ROOT_SYSCONFDIR %{buildroot}/%{SYSCONFDIR}
327 %define ROOT_AMANDAHOMEDIR %{buildroot}/%{AMANDAHOMEDIR}
328 %define ROOT_LIBDIR %{buildroot}/%{LIBDIR}
329 %define ROOT_MANDIR %{buildroot}/%{MANDIR}
330 %define ROOT_LOGDIR %{buildroot}/%{LOGDIR}
331 %define ROOT_AMDATADIR %{buildroot}/%{AMDATADIR}
337 # --- Configure and compile ---
340 %define config_user %{amanda_user}
341 %define config_group %{amanda_group}
343 # Set PKG_CONFIG_PATH=some/path if some/path was set on the command line, or by
344 # the platform detection bits.
345 # without_ipv6 should only be defined on rhel3.
346 # LDFLAGS macro is defined except on rhel3.
347 # --enable-as-needed must be conditional until configure tests whether
348 # ld can accept --as-needed.
350 %{?PKG_CONFIG_PATH: PKG_CONFIG_PATH=%PKG_CONFIG_PATH} \
351 CFLAGS="%{optflags} -g -pipe" CXXFLAGS="%{optflags}" \
352 %{?LDFLAGS:LDFLAGS="${LDFLAGS} %{?LDFLAGS:%LDFLAGS}"} \
353 %{?enable_as_needed:%{enable_as_needed}} \
356 --sysconfdir=%{SYSCONFDIR} \
357 --sharedstatedir=%{LOCALSTATEDIR} \
358 --localstatedir=%{LOCALSTATEDIR} \
360 --includedir=%{INCLUDEDIR} \
362 --with-amdatadir=%{AMDATADIR} \
363 --with-gnuplot=/usr/bin/gnuplot \
364 --with-gnutar-listdir=%{AMANDAHOMEDIR}/gnutar-lists \
365 --with-index-server=localhost \
366 --with-tape-server=localhost \
367 --with-user=%{config_user} \
368 --with-group=%{config_group} \
369 --with-owner=%{packer} \
371 --with-bsd-security \
372 --with-bsdtcp-security \
373 --with-bsdudp-security \
374 --with-ssh-security \
375 --with-debugging=%{LOGDIR} \
377 --disable-installperms \
380 make -s LIBTOOLFLAGS=--silent
382 # --- Install to buildroot ---
385 if [ "%{buildroot}" != "/" ]; then
386 if [ -d "%{buildroot}" ] ; then
390 echo "BuildRoot was somehow set to / !"
394 make -s -j1 LIBTOOLFLAGS=--silent DESTDIR=%{buildroot} install
396 rm -f %{ROOT_AMANDAHOMEDIR}/example/inetd.conf.amandaclient
397 mkdir %{buildroot}/{etc,var/log}
398 mkdir %{ROOT_LOCALSTATEDIR}/amanda
399 mkdir %{ROOT_SYSCONFDIR}/amanda
400 mkdir %{ROOT_AMANDAHOMEDIR}/gnutar-lists
403 echo "%{amanda_version_info}" >%{ROOT_AMANDAHOMEDIR}/amanda-release
405 # --- Clean up buildroot ---
408 if [ "%{buildroot}" != "/" ]; then
409 if [ -d "%{buildroot}" ] ; then
413 echo "BuildRoot was somehow set to / !"
417 # --- Pre/post (un)installation scripts ---
419 # Define script variables
420 # Some versions of rpmbuild do not like multi-line macros in spec files. ugly.
421 %define script_vars amanda_user=%{amanda_user}; amanda_group=%{amanda_group}; AMANDAHOMEDIR=%{AMANDAHOMEDIR}; os=Linux; wanted_shell=/bin/bash; dist=%{dist}; LOGDIR=%{LOGDIR}; INSTALL_LOG=$LOGDIR/install.log; SYSCONFDIR=%{SYSCONFDIR}; SBINDIR=%{SBINDIR}; encoder=%{encoder};
422 # --- Pre/post (un)installation scripts ---
425 ##########################################
426 LOGFILE=`mktemp /tmp/amanda_server-preinst.log.XXXXXXXXXXX`
427 if [ $? -ne 0 ]; then
428 echo "Unable to create log file!"
434 # See packaging/common/ for shell function libraries.
435 # ---------- Common functions ------------
437 %%PRE_INST_FUNCTIONS%%
439 # -------- End Common functions ----------
440 logger "Preparing to install: Amanda Server %%VERSION%%"
442 check_user_group "${amanda_group}" || add_group "${amanda_group}"
443 check_user_supplemental_group "tape" || add_group "tape"
444 check_user_shell "${wanted_shell}"
445 check_user_homedir "${AMANDAHOMEDIR}"
446 check_homedir || create_homedir
449 logger "Preinstall done."
450 cat $LOGFILE > $INSTALL_LOG && rm $LOGFILE || \
451 echo "Amanda preinstall logs can be found in '$LOGFILE'."
454 ##########################################
455 LOGFILE=`mktemp /tmp/amanda_server-postinst.log.XXXXXXXXXXX`
456 if [ $? -ne 0 ]; then
457 echo "Unable to create log file!"
461 AMANDATES=%{AMANDATES}
463 # ---------- Common functions ------------
465 %%POST_INST_FUNCTIONS%%
467 # -------- End Common functions ----------
470 check_xinetd "amandaserver"
472 0) backup_xinetd "amandaserver"
473 install_xinetd "amandaserver"
475 1) install_xinetd "amandaserver" ;;
476 2) logger "Xinetd config not installed: either xinetd config is not present or xinetd.d is a file." ;;
477 *) logger "bad return from check_xinetd"; exit 1 ;;
480 # Amanda servers should not have the client xinetd installed.
481 check_xinetd "amandaclient"
483 0) backup_xinetd "amandaclient" ;;
486 check_superserver_running "xinetd"
487 [ "$?" = "0" ] && action=restart || action=start
488 reload_xinetd $action
491 create_ampassphrase || \
492 logger "Info: amcryptsimple and amcrpyt will not work until .am_passphrase is created"
495 logger "Info: amcrypt will not work until keys are created."
496 # Checks permissions, but only tries decrypting if both .am_passphrase
497 # and .gnupg/am_key.gpg exist.
500 check_amandahosts_entry root amindexd amidxtaped
501 check_amandahosts_entry ${amanda_user} amdump
502 check_amandahosts_perms
503 create_ssh_key server
504 create_ssh_key client
509 logger "Amanda installation complete."
510 cat $LOGFILE >> $INSTALL_LOG && {
512 echo "Amanda installation log can be found in '${INSTALL_LOG}'.";
514 echo "Amanda postinstall logs can be found in '$LOGFILE'."
516 %postun backup_server
517 ##########################################
518 LOGFILE=`mktemp /tmp/amanda_server-remove.log.XXXXXXXXXXX`
519 if [ $? -ne 0 ]; then
520 echo "Unable to create log file!"
525 # ---------- Common functions ------------
527 %%POST_RM_FUNCTIONS%%
529 # -------- End Common functions ----------
531 # Check for parameter to script (are we upgrading?)
532 if [ $1 -gt 0 ]; then
540 # See http://fedoraproject.org/wiki/Packaging/ScriptletSnippets for the reason
541 # we only remove xinetd on uninstall.
542 if [ "$action" = "uninstall" ]; then
543 # Check for and remove existing xinetd configs
544 check_xinetd "amandaserver"
545 if [ $? -eq 0 ] ; then
546 rm_xinetd "amandaserver"
547 check_superserver_running "xinetd" && reload_xinetd
549 check_inetd "amandaserver"
550 if [ $? -eq 0 ] ; then
551 rm_inetd "amandaserver"
552 check_superserver_running "inetd" && reload_inetd
554 if [ -f ${SYSCONFDIR}/amandates ]; then
555 logger "Removing ${SYSCONFDIR}/amandates..."
556 rm -rf ${SYSCONFDIR}/amandates
558 if [ -d ${SYSCONFDIR}/amanda ]; then
559 logger "Removing ${SYSCONFDIR}/amanda if empty..."
560 rmdir ${SYSCONFDIR}/amanda 2> /dev/null || true
562 if [ -d /var/lib/amanda/gnutar-lists ]; then
563 rm -rf /var/lib/amanda/gnutar-lists
564 # Remove ${amanda_user} from sensitive groups.
565 if which deluser >/dev/null 2>&1 ; then
566 for group in tape; do
567 # only call deluser when amandabackup is in $group
568 if getent group "$group" |
569 awk -F: '{ print $4 }' |
570 awk -F, '{ for (i=1; i <= NF; i++ ) print $i }' |
571 grep "^${amanda_user}$" > /dev/null; then
572 deluser ${amanda_user} $group || true
576 echo "Amanda removal log can be found in '$LOGFILE'."
581 ##########################################
582 LOGFILE=`mktemp /tmp/amanda_client-preinst.log.XXXXXXXXXXX`
583 if [ $? -ne 0 ]; then
584 echo "Unable to create log file!"
589 # ---------- Common functions ------------
591 %%PRE_INST_FUNCTIONS%%
593 # -------- End Common functions ----------
594 logger "Preparing to install: %{amanda_version_info}"
596 check_user_group "${amanda_group}" || add_group "${amanda_group}"
597 check_user_shell "${wanted_shell}"
598 check_user_homedir "${AMANDAHOMEDIR}"
599 check_homedir || create_homedir
602 logger "Preinstall done."
603 cat $LOGFILE >> $INSTALL_LOG && rm $LOGFILE || \
604 echo "Amanda preinstall logs can be found in '$LOGFILE'."
607 ##########################################
608 LOGFILE=`mktemp /tmp/amanda_client-postinst.log.XXXXXXXXXXX`
609 if [ $? -ne 0 ]; then
610 echo "Unable to create log file!"
614 AMANDATES=%{AMANDATES}
616 # ---------- Common functions ------------
618 %%POST_INST_FUNCTIONS%%
620 # -------- End Common functions ----------
623 check_xinetd "amandaclient"
625 0) backup_xinetd "amandaclient"
626 install_xinetd "amandaclient"
628 1) install_xinetd "amandaclient" ;;
629 2) logger "Xinetd config not installed: either xinetd config is not present or xinetd.d is a file." ;;
630 *) logger "bad return from check_xinetd"; exit 1 ;;
633 # Amanda clients should not have the server xinetd installed.
634 check_xinetd "amandaserver"
636 0) backup_xinetd "amandaserver" ;;
642 create_ampassphrase || \
643 logger "Info: amcryptsimple and amcrpyt will not work until .am_passphrase is created"
646 logger "Info: amcrypt will not work until keys are created."
647 # Checks permissions, but only tries decrypting if both .am_passphrase
648 # and .gnupg/am_key.gpg exist.
651 check_amandahosts_entry ${amanda_user} amdump
652 check_amandahosts_perms
653 create_ssh_key server
654 create_ssh_key client
659 logger "Amanda installation complete."
660 cat $LOGFILE >> $INSTALL_LOG && {
662 echo "Amanda installation log can be found in '${INSTALL_LOG}'.";
664 echo "Amanda postinstall logs can be found in '$LOGFILE'."
666 echo "`date +'%b %e %Y %T'`: Sending anonymous distribution and version information to Zmanda" >> ${INSTALL_LOG}
667 if [ -x /usr/bin/wget ]; then
668 /usr/bin/wget -q -o /dev/null -O - --timeout=5 http://www.zmanda.com/amanda-tips.php\?version=%{amanda_version}\&os=%{disttag}%{distver}\&type=client
671 %postun backup_client
672 ##########################################
673 LOGFILE=`mktemp /tmp/amanda_client-remove.log.XXXXXXXXXXX`
674 if [ $? -ne 0 ]; then
675 echo "Unable to create log file!"
680 # ---------- Common functions ------------
682 %%POST_RM_FUNCTIONS%%
684 # -------- End Common functions ----------
687 # Check for parameter to script (are we upgrading?)
688 if [ $1 -gt 0 ]; then
696 # See http://fedoraproject.org/wiki/Packaging/ScriptletSnippets for the reason
697 # we only remove xinetd on uninstall.
698 if [ "$action" = "uninstall" ]; then
699 # Check for and remove existing xinetd configs
700 check_xinetd "amandaclient"
701 if [ $? -eq 0 ] ; then
702 rm_xinetd "amandaclient"
705 check_inetd "amandaclient"
706 if [ $? -eq 0 ] ; then
707 rm_inetd "amandaclient"
710 if [ -f ${SYSCONFDIR}/amandates ]; then
711 logger "Removing ${SYSCONFDIR}/amandates..."
712 rm -rf ${SYSCONFDIR}/amandates
714 if [ -d ${SYSCONFDIR}/amanda ]; then
715 logger "Removing ${SYSCONFDIR}/amanda if empty..."
716 rmdir ${SYSCONFDIR}/amanda 2> /dev/null || true
718 if [ -d ${AMANDAHOMEDIR} ]; then
719 logger "Removing ${AMANDAHOMEDIR}..."
720 rm -rf ${AMANDAHOMEDIR}
722 # Remove ${amanda_user} from sensitive groups.
723 if which deluser >/dev/null 2>&1 ; then
724 for group in tape; do
725 # only call deluser when amandabackup is in $group
726 if getent group "$group" |
727 awk -F: '{ print $4 }' |
728 awk -F, '{ for (i=1; i <= NF; i++ ) print $i }' |
729 grep "^${amanda_user}$" > /dev/null; then
730 deluser ${amanda_user} $group || true
734 echo "Amanda removal log can be found in '$LOGFILE'."
739 # --- Files to install ---
740 # Notes: Do not use wildcards on directories not wholly owned by amanda. An
741 # uninstall of the software will attempt to delete whatever matches here.
742 %defattr(0755,%{amanda_user},%{amanda_group},0755)
745 %{PERLSITELIB}/auto/Amanda
746 %defattr(4750,root,disk)
747 %{AMLIBEXECDIR}/application/amgtar
748 %{AMLIBEXECDIR}/application/amstar
749 %{AMLIBEXECDIR}/calcsize
750 %{AMLIBEXECDIR}/killpgrp
751 %{AMLIBEXECDIR}/rundump
752 %{AMLIBEXECDIR}/runtar
753 %defattr(0750,%{amanda_user},%{amanda_group},0750)
757 %{SBINDIR}/amgpgcrypt
758 %{SBINDIR}/amoldrecover
761 %defattr(0644,%{amanda_user},%{amanda_group},0755)
762 %{LOCALSTATEDIR}/amanda
763 %{PERLSITELIB}/Amanda
764 %{AMLIBEXECDIR}/amcat.awk
765 %{AMANDAHOMEDIR}/gnutar-lists
766 %doc %{AMANDAHOMEDIR}/amanda-release
767 %doc %{AMANDAHOMEDIR}/example/xinetd.amandaclient
768 %doc %{AMANDAHOMEDIR}/example/xinetd.amandaserver
769 %doc %{AMANDAHOMEDIR}/example/amanda-client.conf
770 %doc %{AMANDAHOMEDIR}/template.d/README
771 %doc %{AMANDAHOMEDIR}/template.d/dumptypes
772 %defattr(0644,root,root,0755)
774 %{MANDIR}/man5/amanda.conf.5.gz
775 %{MANDIR}/man5/amanda-client.conf.5.gz
776 %{MANDIR}/man7/amanda-devices.7.gz
777 %{MANDIR}/man7/amanda-applications.7.gz
778 %{MANDIR}/man7/amanda-scripts.7.gz
779 %{MANDIR}/man8/amaespipe.8.gz
780 %{MANDIR}/man8/amanda.8.gz
781 %{MANDIR}/man8/amcheckdump.8.gz
782 %{MANDIR}/man8/amcrypt*
783 %{MANDIR}/man8/amgpgcrypt.8.gz
784 %{MANDIR}/man8/amrecover.8.gz
785 %doc %{DATADIR}/amanda
788 %defattr(0755,%{amanda_user},%{amanda_group})
791 %{PERLSITELIB}/Amanda
792 %{PERLSITELIB}/auto/Amanda
794 %{LOCALSTATEDIR}/amanda
796 %defattr(4750,root,disk)
797 %{AMLIBEXECDIR}/application/amgtar
798 %{AMLIBEXECDIR}/application/amstar
799 %{AMLIBEXECDIR}/calcsize
800 %{AMLIBEXECDIR}/killpgrp
801 %{AMLIBEXECDIR}/rundump
802 %{AMLIBEXECDIR}/runtar
803 %{AMLIBEXECDIR}/dumper
804 %{AMLIBEXECDIR}/planner
807 %defattr(0750,%{amanda_user},%{amanda_group},0750)
810 # Files in standard dirs must be listed explicitly
811 %{SBINDIR}/activate-devpay
814 %{SBINDIR}/amcrypt-ossl
815 %{SBINDIR}/amcrypt-ossl-asym
816 %{SBINDIR}/amcryptsimple
817 %{SBINDIR}/amgpgcrypt
818 %{SBINDIR}/amoldrecover
820 %defattr(0644,%{amanda_user},%{amanda_group})
821 %{AMLIBEXECDIR}/amcat.awk
822 %{AMLIBEXECDIR}/amplot.awk
823 %{AMLIBEXECDIR}/amplot.g
824 %{AMLIBEXECDIR}/amplot.gp
825 %doc %{AMANDAHOMEDIR}/amanda-release
826 %docdir %{AMANDAHOMEDIR}/example
827 %docdir %{AMANDAHOMEDIR}/template.d
828 %defattr(0644,root,root,0755)
831 %{MANDIR}/man5/disklist.5.gz
832 %{MANDIR}/man5/tapelist.5.gz
835 %{MANDIR}/man8/script-email.8.gz
836 %doc %{DATADIR}/amanda
841 * %%DATE%% Dan Locks <dwlocks at zmanda dot com> %{version}
843 * Fri Aug 20 2010 Dan Locks <dwlocks at zmanda dot com> 3.2.0alpha
844 - use %%VERSION% macro instead of reading a file. error reported by ssgelm
845 * Thu Aug 19 2010 Dan Locks <dwlocks at zmanda dot com> 3.2.0alpha
846 - Added detection of openSuSE 11 as suggested by ssgelm