2 # Copyright (C) 2005 Zmanda Incorporated.
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 as published
7 # by the Free Software Foundation.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # You should have received a copy of the GNU General Public License along
15 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # Contact information: Zmanda Inc, 465 S Mathlida Ave, Suite 300
19 # Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
24 %{?srpm_only: %define build_srpm 1}
26 # Pkg-config sometimes needs its own path set, and we need to allow users to
27 # override our guess during detection. This macro takes care of that.
28 # If no --define PKG_CONFIG_PATH was passed and env var $PKG_CONFIG_PATH is
29 # set then use the env var.
30 %{!?PKG_CONFIG_PATH: %{expand:%(echo ${PKG_CONFIG_PATH:+"%%define PKG_CONFIG_PATH $PKG_CONFIG_PATH"})}}
32 %{?PKG_CONFIG_PATH:%{echo:PKG_CONFIG_PATH = %{PKG_CONFIG_PATH}}}
34 # Define which Distribution we are building:
35 # Try to detect the distribution we are building:
36 %if %{_vendor} == redhat
37 # Fedora symlinks /etc/fedora-release to /etc/redhat-release for at least
38 # fc3-8. So RHEL and Fedora look at the same file. Different versions have
39 # different numbers of spaces; hence the use if $3 vs. $4..
40 %if %(awk '$1 == "Fedora" && $4 ~ /3.*/ { exit 1; }' /etc/redhat-release; echo $?)
45 %if %(awk '$1 == "Fedora" && $4 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
50 %if %(awk '$1 == "Fedora" && $4 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
55 %if %(awk '$1 == "Fedora" && $4 ~ /6.*/ { exit 1; }' /etc/redhat-release; echo $?)
60 %if %(awk '$1 == "Fedora" && $3 ~ /7.*/ { exit 1; }' /etc/redhat-release; echo $?)
65 # if macro cannot have an empty test and we're just testing the existance
66 %if %{?fedora:yes}%{!?fedora:no} == yes
69 %define distver %{fedora}
70 %if %{_host_cpu} == x86_64 && %{_target_cpu} == i686
71 # Do nothing if PKG_CONFIG_PATH was set by the user above.
72 %{!?PKG_CONFIG_PATH: %define PKG_CONFIG_PATH /usr/lib/pkgconfig}
75 %if %(awk '$1 == "Red" && $7 ~ /3.*/ { exit 1; }' /etc/redhat-release; echo $?)
81 %if %(awk '$1 == "Red" && $7 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
87 %if %(awk '$1 == "CentOS" && $3 ~ /4.*/ { exit 1; }' /etc/redhat-release; echo $?)
93 %if %(awk '$1 == "Red" && $7 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
98 %if %(awk '$1 == "CentOS" && $3 ~ /5.*/ { exit 1; }' /etc/redhat-release; echo $?)
104 # If dist is undefined, we didn't detect.
105 %{!?dist:%define dist unknown}
107 # Detect Suse variants. Suse gives us some nice macros in their rpms
108 %if %{_vendor} == "suse"
110 %if %{sles_version} == 0
112 %if %{suse_version} == 910
115 %if %{suse_version} == 1000
118 %if %{suse_version} == 1010
121 # Written against SLES11-beta2, which is using SUSE11's rpm system.
122 # This will change when they release, I assume.
123 %if %{suse_version} == 1100
124 # assume it's sles11 in disguise, for now
128 %if %{suse_version} == 1110
133 # sles versions are simple integers, just like we want
134 %define distver %{sles_version}
137 # If dist is undefined, we didn't detect.
138 %{!?dist:%define dist unknown}
141 # Set options per distribution
142 %if %{dist} == redhat || %{dist} == fedora
143 %define rpm_group Applications/Archiving
144 %define xinetd_reload restart
147 %define rpm_group Productivity/Archiving/Backup
148 %define xinetd_reload restart
151 # Let's die if we haven't detected the distro. This might save some frustration.
152 # RPM does not provide a way to exit gracefully, hence the tag_to_cause_exit.
153 %{!?distver: %{error:"Your distribution and its version were not detected."}; %tag_to_cause_exit }
154 # Set minimum tar version if it wasn't set in the per-distro section
155 %{!?tarver: %define tarver 1.15}
157 %define packer %(%{__id_u} -n)
159 # --- Definitions ---
161 # Define amanda_version if it is not already defined.
162 %{!?amanda_version: %define amanda_version 2.6.1}
163 %{!?amanda_release: %define amanda_release 1}
164 %define amanda_version_info "Amanda Community Edition - version %{amanda_version}"
165 %define amanda_user amandabackup
166 %define amanda_group disk
167 %define udpportrange "700,740"
168 %define tcpportrange "11000,11040"
169 %define low_tcpportrange "700,710"
171 Summary: The Amanda Backup and Archiving System
173 Version: %{amanda_version}
174 %define rpm_release %{amanda_release}.%{disttag}%{distver}
176 %define rpm_release %{amanda_release}
178 Release: %{rpm_release}
179 Source: %{name}-%{version}.tar.gz
180 License: http://wiki.zmanda.com/index.php/Amanda_Copyright
182 Packager: www.zmanda.com
183 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{packer}-buildroot
185 # TODO - Need required versions for these:
186 BuildRequires: autoconf
187 BuildRequires: automake
188 BuildRequires: binutils
192 BuildRequires: glibc >= 2.2.0
193 BuildRequires: readline
194 BuildRequires: readline-devel
195 BuildRequires: curl >= 7.10.0
196 BuildRequires: curl-devel >= 7.10.0
197 BuildRequires: openssl
198 BuildRequires: openssl-devel
199 BuildRequires: perl(ExtUtils::Embed)
202 Requires: /usr/bin/id
203 Requires: /sbin/ldconfig
205 Requires: /usr/sbin/useradd
206 Requires: /usr/sbin/usermod
212 Requires: libnsl.so.1
213 Requires: curl >= 7.10.0
216 Requires: perl >= 5.6.0
217 Requires: tar >= %{tarver}
219 %if %{dist} == redhat || %{dist} == fedora
221 Requires: libtermcap.so.2
223 Requires: initscripts
225 Provides: amanda-backup_client = %{amanda_version}, amanda-backup_server = %{amanda_version}
227 %package backup_client
228 Summary: The Amanda Backup and Archiving Client
233 %if %{dist} == redhat || %{dist}== fedora
235 Requires: libtermcap.so.2
237 Requires: initscripts
242 Requires: libnsl.so.1
243 Requires: perl >= 5.6.0
244 Requires: tar >= %{tarver}
246 Provides: amanda-backup_client = %{amanda_version}
247 Provides: libamclient-%{version}.so = %{amanda_version}
248 Provides: libamanda-%{version}.so = %{amanda_version}
249 Conflicts: amanda-backup_server
251 %package backup_server
252 Summary: The Amanda Backup and Archiving Server
259 Requires: libnsl.so.1
260 %if %{dist} == redhat || %{dist}== fedora
262 Requires: libtermcap.so.2
264 Requires: initscripts
267 Requires: perl >= 5.6.0
268 Requires: tar >= %{tarver}
269 Provides: amanda-backup_server = %{amanda_version}
270 Provides: libamclient-%{version}.so = %{amanda_version}
271 Provides: libamanda-%{version}.so = %{amanda_version}
272 Provides: libamserver-%{version}.so = %{amanda_version}
273 Provides: librestore-%{version}.so = %{amanda_version}
274 Provides: libamtape-%{version}.so = %{amanda_version}
275 Provides: libamdevice-%{version}.so = %{amanda_version}
277 # --- Package descriptions ---
280 Amanda is the leading Open-Source Backup and Archiving software.
282 The amanda-backup_server package should be installed on the Amanda server, i.e.
283 the machine attached to backup media (such as a tape drive or disk
284 drives) where backups will be written. The amanda-backup_server package
285 includes Amanda client. The amanda-backup_client package needs
286 to be installed on every system that is being backed up.
288 Amanda Forums is located at: http://forums.zmanda.com/
289 Amanda Documentation is available at: http://wiki.zmanda.com/
293 %description backup_server
294 Amanda is the leading Open-Source Backup and Archiving software.
296 This package contains the Amanda server. The amanda-backup_server package
297 should be installed on the Amanda server, i.e. the machine attached
298 to backup media (such as a tape drive or disk drives) where backups
299 will be written. The amanda-backup_server package includes Amanda client.
301 Amanda Forums is located at: http://forums.zmanda.com/
302 Amanda Documentation is available at: http://wiki.zmanda.com/
306 %description backup_client
307 Amanda is the leading Open-Source Backup and Archiving software.
309 This package contains the Amanda client. The amanda-backup_client package
310 needs to be installed on every system that is being backed up.
312 Amanda Forums is located at: http://forums.zmanda.com/
313 Amanda Documentation is available at: http://wiki.zmanda.com/
315 # --- Directory setup ---
317 # Configure directories:
319 %define EPREFIX %{PREFIX}
320 %define BINDIR %{EPREFIX}/bin
321 %define SBINDIR %{EPREFIX}/sbin
322 %define LIBEXECDIR %{EPREFIX}/libexec
323 %define AMLIBEXECDIR %{LIBEXECDIR}/amanda
324 %define DATADIR %{PREFIX}/share
325 %define SYSCONFDIR /etc
326 %define LOCALSTATEDIR /var
327 %define AMANDATES %{AMANDAHOMEDIR}/amandates
328 %define AMANDAHOMEDIR %{LOCALSTATEDIR}/lib/amanda
330 %define LIBDIR %{EPREFIX}/lib64
332 %define LIBDIR %{EPREFIX}/lib
334 %define AMLIBDIR %{LIBDIR}/amanda
335 %define INCLUDEDIR %{PREFIX}/include
336 %define MANDIR %{DATADIR}/man
337 %define LOGDIR /var/log/amanda
338 %define PERLSITELIB %(eval "`perl -V:installsitelib`"; echo $installsitelib)
339 %define AMDATADIR /var/lib/amanda
341 # Installation directories:
342 %define ROOT_SBINDIR %{buildroot}/%{SBINDIR}
343 %define ROOT_LIBEXECDIR %{buildroot}/%{LIBEXECDIR}
344 %define ROOT_DATADIR %{buildroot}/%{DATADIR}
345 %define ROOT_LOCALSTATEDIR %{buildroot}/%{LOCALSTATEDIR}
346 %define ROOT_SYSCONFDIR %{buildroot}/%{SYSCONFDIR}
347 %define ROOT_AMANDAHOMEDIR %{buildroot}/%{AMANDAHOMEDIR}
348 %define ROOT_LIBDIR %{buildroot}/%{LIBDIR}
349 %define ROOT_MANDIR %{buildroot}/%{MANDIR}
350 %define ROOT_LOGDIR %{buildroot}/%{LOGDIR}
351 %define ROOT_AMDATADIR %{buildroot}/%{AMDATADIR}
357 # --- Configure and compile ---
360 %define config_user %{amanda_user}
361 %define config_group %{amanda_group}
363 %if %{disttag} == rhel && %{distver} == 3
365 CFLAGS="%{optflags} -g" CXXFLAGS="%{optflags}" \
368 --sysconfdir=%{SYSCONFDIR} \
369 --sharedstatedir=%{LOCALSTATEDIR} \
370 --localstatedir=%{LOCALSTATEDIR} \
372 --includedir=%{INCLUDEDIR} \
373 --with-amdatadir=%{AMDATADIR} \
374 --with-gnuplot=/usr/bin/gnuplot \
375 --with-gnutar-listdir=%{AMANDAHOMEDIR}/gnutar-lists \
376 --with-index-server=localhost \
377 --with-tape-server=localhost \
378 --with-user=%{config_user} \
379 --with-group=%{config_group} \
380 --with-owner=%{packer} \
382 --with-bsd-security \
383 --with-bsdtcp-security \
384 --with-bsdudp-security \
385 --with-ssh-security \
386 --with-udpportrange=%{udpportrange} \
387 --with-tcpportrange=%{tcpportrange} \
388 --with-low-tcpportrange=%{low_tcpportrange} \
389 --with-debugging=%{LOGDIR} \
391 --disable-installperms \
394 # This confusing macro results in PKG_CONFIG_PATH=some/path if some/path
395 # was set on the command line, or by the platform detection bits.
397 %{?PKG_CONFIG_PATH: PKG_CONFIG_PATH=%PKG_CONFIG_PATH} \
398 CFLAGS="%{optflags} -g" CXXFLAGS="%{optflags}" \
401 --sysconfdir=%{SYSCONFDIR} \
402 --sharedstatedir=%{LOCALSTATEDIR} \
403 --localstatedir=%{LOCALSTATEDIR} \
405 --includedir=%{INCLUDEDIR} \
406 --with-amdatadir=%{AMDATADIR} \
407 --with-star=/usr/bin/star \
408 --with-gnuplot=/usr/bin/gnuplot \
409 --with-gnutar=/bin/tar \
410 --with-gnutar-listdir=%{AMANDAHOMEDIR}/gnutar-lists \
411 --with-index-server=localhost \
412 --with-tape-server=localhost \
413 --with-user=%{config_user} \
414 --with-group=%{config_group} \
415 --with-owner=%{packer} \
417 --with-bsd-security \
418 --with-bsdtcp-security \
419 --with-bsdudp-security \
420 --with-ssh-security \
421 --with-udpportrange=%{udpportrange} \
422 --with-tcpportrange=%{tcpportrange} \
423 --with-low-tcpportrange=%{low_tcpportrange} \
424 --with-debugging=%{LOGDIR} \
426 --disable-installperms
431 # --- Install to buildroot ---
434 if [ "%{buildroot}" != "/" ]; then
435 if [ -d "%{buildroot}" ] ; then
439 echo "BuildRoot was somehow set to / !"
443 make -j1 DESTDIR=%{buildroot} install
445 rm -rf %{ROOT_DATADIR}/amanda
446 rm -f %{ROOT_AMANDAHOMEDIR}/example/inetd.conf.amandaclient
447 mkdir %{buildroot}/{etc,var/log}
448 mkdir %{ROOT_LOCALSTATEDIR}/amanda
449 mkdir %{ROOT_SYSCONFDIR}/amanda
450 mkdir %{ROOT_AMANDAHOMEDIR}/gnutar-lists
453 echo "%{amanda_version_info}" >%{ROOT_AMANDAHOMEDIR}/amanda-release
455 # --- Clean up buildroot ---
458 if [ "%{buildroot}" != "/" ]; then
459 if [ -d "%{buildroot}" ] ; then
463 echo "BuildRoot was somehow set to / !"
467 # --- Pre/post (un)installation scripts ---
470 TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX`
471 if [ $? -ne 0 ]; then
472 echo "Unable to mktemp!" 1>&2
476 INSTALL_LOG="${LOGDIR}/install.log"
477 INSTALL_ERR="${LOGDIR}/install.err"
479 echo "`date +'%b %e %Y %T'`: Preparing to install: %{amanda_version_info}" >${TMPFILE}
481 # Check for the 'amanda' user
482 echo "`date +'%b %e %Y %T'`: Checking for '%{amanda_user}' user..." >>${TMPFILE}
483 if [ "`id -u %{amanda_user} > /dev/null 2>&1 && echo 0 || echo 1`" != "0" ] ; then
484 useradd -c "Amanda" -M -g %{amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user}
485 if [ %{dist} = "SuSE" ]; then
488 # Lock the amanda account until admin sets password
489 passwd -l %{amanda_user} >>/dev/null
492 if [ ${PASSWD_EXIT} -eq 0 ] ; then
493 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
494 echo "`date +'%b %e %Y %T'`: The '%{amanda_user}; user account has been successfully created." >>${TMPFILE}
495 echo "`date +'%b %e %Y %T'`: Furthermore, the account has been automatically locked for you" >>${TMPFILE}
496 echo "`date +'%b %e %Y %T'`: for security purposes. Once a password for the '%{amanda_user}'" >>${TMPFILE}
497 echo "`date +'%b %e %Y %T'`: account has been set, the user can be unlocked by issuing" >>${TMPFILE}
498 echo "`date +'%b %e %Y %T'`: the following command as root.:" >>${TMPFILE}
499 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
500 echo "`date +'%b %e %Y %T'`: # passwd -u %{amanda_user}" >>${TMPFILE}
501 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
502 echo "`date +'%b %e %Y %T'`: If this is not a new installation of Amanda and you have" >>${TMPFILE}
503 echo "`date +'%b %e %Y %T'`: pre-existing Amanda configurations in %{SYSCONFDIR}/amanda" >>${TMPFILE}
504 echo "`date +'%b %e %Y %T'`: you should ensure that 'dumpuser' is set to '%{amanda_user}'" >>${TMPFILE}
505 echo "`date +'%b %e %Y %T'`: in those configurations. Additionally, you should ensure" >>${TMPFILE}
506 echo "`date +'%b %e %Y %T'`: that %{AMANDAHOMEDIR}/.amandahosts on your client systems" >>${TMPFILE}
507 echo "`date +'%b %e %Y %T'`: is properly configured to allow connections for the user" >>${TMPFILE}
508 echo "`date +'%b %e %Y %T'`: '%{amanda_user}'." >>${TMPFILE}
509 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
512 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
513 echo "`date +'%b %e %Y %T'`: !!! !!!" >>${TMPFILE}
514 echo "`date +'%b %e %Y %T'`: !!! The '%{amanda_user}' user account for this system has been !!!" >>${TMPFILE}
515 echo "`date +'%b %e %Y %T'`: !!! created, however the user has no password set. For !!!" >>${TMPFILE}
516 echo "`date +'%b %e %Y %T'`: !!! security purposes this account is normally locked !!!" >>${TMPFILE}
517 echo "`date +'%b %e %Y %T'`: !!! after creation. Unfortunately, when locking this !!!" >>${TMPFILE}
518 echo "`date +'%b %e %Y %T'`: !!! account an error occurred. To ensure the security !!!" >>${TMPFILE}
519 echo "`date +'%b %e %Y %T'`: !!! of your system you should set a password for the !!!" >>${TMPFILE}
520 echo "`date +'%b %e %Y %T'`: !!! user account '%{amanda_user}' immediately! To set such a !!!" >>${TMPFILE}
521 echo "`date +'%b %e %Y %T'`: !!! password, please issue the following command.: !!!" >>${TMPFILE}
522 echo "`date +'%b %e %Y %T'`: !!! !!!" >>${TMPFILE}
523 echo "`date +'%b %e %Y %T'`: !!! # passwd %{amanda_user} !!!" >>${TMPFILE}
524 echo "`date +'%b %e %Y %T'`: !!! !!!" >>${TMPFILE}
525 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
529 # log information about 'amanda' user parameters
530 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
531 echo "`date +'%b %e %Y %T'`: The Amanda backup software is configured to operate as the" >>${TMPFILE}
532 echo "`date +'%b %e %Y %T'`: user '%{amanda_user}'. This user exists on your system and has not" >>${TMPFILE}
533 echo "`date +'%b %e %Y %T'`: been modified. To ensure that Amanda functions properly," >>${TMPFILE}
534 echo "`date +'%b %e %Y %T'`: please see that the following parameters are set for that" >>${TMPFILE}
535 echo "`date +'%b %e %Y %T'`: user.:" >>${TMPFILE}
536 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
537 echo "`date +'%b %e %Y %T'`: SHELL: /bin/sh" >>${TMPFILE}
538 echo "`date +'%b %e %Y %T'`: HOME: %{AMANDAHOMEDIR}" >>${TMPFILE}
539 echo "`date +'%b %e %Y %T'`: Default group: %{amanda_group}" >>${TMPFILE}
540 echo "`date +'%b %e %Y %T'`: Verifying %{amanda_user} parameters :" >>${TMPFILE}
542 if [ "`id -gn %{amanda_user}`" != "disk" ] ; then
543 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
544 echo "`date +'%b %e %Y %T'`: !!! user 'amandabackup' is not part of the disk group,Pl !!!" >>${TMPFILE}
545 echo "`date +'%b %e %Y %T'`: !!! make sure it is corrected before start using amanda !!!" >>${TMPFILE}
546 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
548 echo "`date +'%b %e %Y %T'`: Verified group name of user 'amandabackup'" >>${TMPFILE}
551 if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f7`" != "/bin/sh" ] ; then
552 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
553 echo "`date +'%b %e %Y %T'`: !!! user 'amandabackup' default shell should be set to !!!" >>${TMPFILE}
554 echo "`date +'%b %e %Y %T'`: !!! /bin/sh, pl correct before start using Amanda !!!" >>${TMPFILE}
555 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
557 echo "`date +'%b %e %Y %T'`: Verified Default shell for user 'amandabackup'" >>${TMPFILE}
560 if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f6`" != "%{AMANDAHOMEDIR}" ] ; then
561 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
562 echo "`date +'%b %e %Y %T'`: !!! user 'amandabackup' home directory should be set to !!!" >>${TMPFILE}
563 echo "`date +'%b %e %Y %T'`: !!! %{AMANDAHOMEDIR} Pl correct before using Amanda !!!" >>${TMPFILE}
564 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
566 echo "`date +'%b %e %Y %T'`: Verified Default home directory for user amandabackup" >>${TMPFILE}
568 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
571 if [ -d %{AMANDAHOMEDIR} ] ; then
572 echo -n "`date +'%b %e %Y %T'`: Checking ownership of '%{AMANDAHOMEDIR}'... " >>${TMPFILE}
573 if [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[3]}'`" = "%{amanda_user}" ] && \
574 [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[4]}'`" = "%{amanda_group}" ] ; then
575 echo "correct." >>${TMPFILE}
578 echo "incorrect!" >>${TMPFILE}
579 echo "`date +'%b %e %Y %T'`: Please ensure that the directory '%{AMANDAHOMEDIR}' is owned by" >>${TMPFILE}
580 echo "`date +'%b %e %Y %T'`: the user '%{amanda_user}' and group '%{amanda_group}'." >>${TMPFILE}
586 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
587 if [ ! -e ${LOGDIR} ] ; then
588 # create log directory
589 mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
590 chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
591 elif [ ! -d ${LOGDIR} ] ; then
592 mv ${LOGDIR} ${LOGDIR}.rpmsave >>${TMPFILE} 2>&1
593 mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
594 chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
595 mv ${LOGDIR}.rpmsave ${LOGDIR}/ >>${TMPFILE} 2>&1
598 if [ ${PASSWD_OK} -eq 1 ] || [ ${VARLIB_OK} -eq 1 ] ; then
600 cat ${TMPFILE} >>${INSTALL_ERR}
601 echo "Please review '${INSTALL_ERR}' to correct errors which have prevented the Amanda installaton." >&2
602 echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
606 cat ${TMPFILE} >>${INSTALL_LOG}
609 echo "`date +'%b %e %Y %T'`: === Amanda installation started. ===" >${TMPFILE}
612 cat ${TMPFILE} >>${INSTALL_LOG}
613 if [ -f "${TMPFILE}" ]; then
618 TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX
619 if [ $? -ne 0 ]; then
620 echo "Unable to mktemp!" 1>&2
624 INSTALL_LOG="${LOGDIR}/install.log"
625 INSTALL_ERR="${LOGDIR}/install.err"
627 echo -n "`date +'%b %e %Y %T'`: Updating library cache..." >${TMPFILE}
628 /sbin/ldconfig >>${TMPFILE} 2>&1
629 echo "done." >>${TMPFILE}
631 cat ${TMPFILE} >>${INSTALL_LOG}
633 if [ -e /etc/xinetd.d ] && [ -d /etc/xinetd.d ] ; then
634 if [ ! -f /etc/xinetd.d/amandaserver ] ; then
635 cp %{AMANDAHOMEDIR}/example/xinetd.amandaserver /etc/xinetd.d/amandaserver
636 chmod 0644 /etc/xinetd.d/amandaserver >>${TMPFILE} 2>&1
637 if [ -f /etc/xinetd.d/amandaclient ] ; then
638 rm /etc/xinetd.d/amandaclient
640 echo -n "`date +'%b %e %Y %T'`: Reloading xinetd configuration..." >${TMPFILE}
641 if [ "%{xinetd_reload}" == "reload" ] ; then
642 /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
644 if [ ${ret_val} -ne 0 ] ; then
645 echo -n "reload failed. Attempting restart..." >>${TMPFILE}
646 /etc/init.d/xinetd restart >>${TMPFILE} 2>&1
650 /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
653 if [ ${ret_val} -eq 0 ] ; then
654 echo "success." >>${TMPFILE}
656 cat ${TMPFILE} >>${INSTALL_LOG}
658 echo "failed. Please check your system logs." >>${TMPFILE}
660 cat ${TMPFILE} >>${INSTALL_ERR}
665 echo "`date +'%b %e %Y %T'`: Installing '%{AMANDATES}'." >${TMPFILE}
667 if [ ! -f %{AMANDATES} ] ; then
668 touch %{AMANDATES} >>${TMPFILE} 2>&1
670 if [ ${ret_val} -eq 0 ]; then
671 echo "`date +'%b %e %Y %T'`: The file '%{AMANDATES}' has been created." >>${TMPFILE}
674 if [ ${ret_val} -eq 0 ]; then
675 echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{AMANDATES}'." >>${TMPFILE}
676 chown %{amanda_user}:%{amanda_group} %{AMANDATES} >>${TMPFILE} 2>&1
677 chmod 0640 %{AMANDATES} >>${TMPFILE} 2>&1
678 if [ -x /sbin/restorecon ] ; then
679 /sbin/restorecon %{AMANDATES} >>${TMPFILE} 2>&1
682 if [ ${ret_val} -eq 0 ]; then
683 echo "`date +'%b %e %Y %T'`: '%{AMANDATES}' Installation successful." >>${TMPFILE}
685 cat ${TMPFILE} >>${INSTALL_LOG}
687 echo "`date +'%b %e %Y %T'`: '%{AMANDATES}' Installation failed." >>${TMPFILE}
689 cat ${TMPFILE} >>${INSTALL_ERR}
693 # Install .gnupg directory
694 echo "`date +'%b %e %Y %T'`: Installing '%{AMANDAHOMEDIR}/.gnupg'." >${TMPFILE}
696 if [ ! -d %{AMANDAHOMEDIR}/.gnupg ] ; then
697 echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' will be created." >>${TMPFILE}
698 mkdir %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
700 if [ ${ret_val} -eq 0 ]; then
701 echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' created successfully." >>${TMPFILE}
703 echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' creation failed." >>${TMPFILE}
706 if [ ${ret_val} -eq 0 ]; then
707 echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{AMANDAHOMEDIR}/.gnupg'." >>${TMPFILE}
708 chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
710 if [ ${ret_val} -eq 0 ]; then
711 chmod 700 %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
715 if [ ${ret_val} -eq 0 ]; then
716 echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation successful." >>${TMPFILE}
718 cat ${TMPFILE} >>${INSTALL_LOG}
720 echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation failed." >>${TMPFILE}
722 cat ${TMPFILE} >>${INSTALL_ERR}
725 # Install .amandahosts
726 echo "`date +'%b %e %Y %T'`: Checking '%{AMANDAHOMEDIR}/.amandahosts' file." >${TMPFILE}
727 if [ ! -f %{AMANDAHOMEDIR}/.amandahosts ] ; then
728 touch %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
730 for host in localhost localhost.localdomain ; do
731 if [ -z "`grep \"^${host}[[:blank:]]\+root[[:blank:]]\+amindexd[[:blank:]]\+amidxtaped\" %{AMANDAHOMEDIR}/.amandahosts`" ] ; then
732 echo "${host} root amindexd amidxtaped" >>%{AMANDAHOMEDIR}/.amandahosts
734 if [ -z "`grep \"^${host}[[:blank:]]\+%{amanda_user}[[:blank:]]\+amdump\" %{AMANDAHOMEDIR}/.amandahosts`" ] ; then
735 echo "${host} %{amanda_user} amdump" >>%{AMANDAHOMEDIR}/.amandahosts
738 chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
739 chmod 0600 %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
741 cat ${TMPFILE} >>${INSTALL_LOG}
743 # SSH RSA key generation for amdump
744 KEYDIR="%{AMANDAHOMEDIR}/.ssh"
745 KEYFILE="id_rsa_amdump"
746 COMMENT="%{amanda_user}@server"
747 if [ ! -d ${KEYDIR} ] ; then
748 if [ -f ${KEYDIR} ] ; then
749 echo "`date +'%b %e %Y %T'`: Directory '${KEYDIR}' exists as a file. Renaming to '${KEYDIR}.rpmsave'." >${TMPFILE}
750 mv ${KEYDIR} ${KEYDIR}.rpmsave
752 cat ${TMPFILE} >>${INSTALL_LOG}
754 echo "`date +'%b %e %Y %T'`: Creating directory '${KEYDIR}'." >${TMPFILE}
755 mkdir ${KEYDIR} >>${TMPFILE} 2>&1
757 cat ${TMPFILE} >>${INSTALL_LOG}
759 if [ ! -f ${KEYDIR}/${KEYFILE} ] ; then
760 echo "`date +'%b %e %Y %T'`: Creating ssh RSA key in '${KEYDIR}/${KEYFILE}'" >${TMPFILE}
762 cat ${TMPFILE} >>${INSTALL_LOG}
763 ssh-keygen -q -C $COMMENT -t rsa -f ${KEYDIR}/${KEYFILE} -N '' >>${TMPFILE} 2>&1
765 cat ${TMPFILE} >>${INSTALL_LOG}
767 echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '${KEYDIR}' and '${KEYDIR}/${KEYFILE}*'" >${TMPFILE}
768 chown %{amanda_user}:%{amanda_group} ${KEYDIR} ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
769 chmod 0750 ${KEYDIR} >>${TMPFILE} 2>&1
770 chmod 0600 ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
772 cat ${TMPFILE} >>${INSTALL_LOG}
774 # SSH RSA key generation on client for amrecover
775 KEYDIR="%{AMANDAHOMEDIR}/.ssh"
776 KEYFILE="id_rsa_amrecover"
777 COMMENT="root@client"
778 if [ ! -d ${KEYDIR} ] ; then
779 if [ -f ${KEYDIR} ] ; then
780 echo "`date +'%b %e %Y %T'`: Directory '${KEYDIR}' exists as a file. Renaming to '${KEYDIR}.rpmsave'." >${TMPFILE}
781 mv ${KEYDIR} ${KEYDIR}.rpmsave >>${TMPFILE} 2>&1
783 cat ${TMPFILE} >>${INSTALL_LOG}
785 echo "`date +'%b %e %Y %T'`: Creating directory '${KEYDIR}'." >${TMPFILE}
786 mkdir ${KEYDIR} >>${TMPFILE} 2>&1
788 cat ${TMPFILE} >>${INSTALL_LOG}
790 if [ ! -f ${KEYDIR}/${KEYFILE} ] ; then
791 echo "`date +'%b %e %Y %T'`: Creating ssh RSA key in '${KEYDIR}/${KEYFILE}'" >${TMPFILE}
792 ssh-keygen -q -C $COMMENT -t rsa -f ${KEYDIR}/${KEYFILE} -N '' >>${TMPFILE} 2>&1
794 cat ${TMPFILE} >>${INSTALL_LOG}
796 echo "`date +'%b %e %Y %T'`: Setting permissions for '${KEYDIR}'" >${TMPFILE}
797 chown %{amanda_user}:%{amanda_group} ${KEYDIR} >>${TMPFILE} 2>&1
798 chmod 0750 ${KEYDIR} >>${TMPFILE} 2>&1
799 chmod 0600 ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
801 cat ${TMPFILE} >>${INSTALL_LOG}
803 # environment variables (~amandabackup/.profile)
804 echo "`date +'%b %e %Y %T'`: Checking for '%{AMANDAHOMEDIR}/.profile' and ensuring correct environment." >${TMPFILE}
805 if [ ! -f %{AMANDAHOMEDIR}/.profile ] ; then
806 touch %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
808 if [ -z "`grep PATH %{AMANDAHOMEDIR}/.profile | grep '%{SBINDIR}'`" ] ; then
809 echo "export PATH=\"\$PATH:%{SBINDIR}\"" >>%{AMANDAHOMEDIR}/.profile 2>>${TMPFILE}
811 echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '%{AMANDAHOMEDIR}/.profile'" >>${TMPFILE}
812 chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
813 chmod 0640 %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
815 cat ${TMPFILE} >>${INSTALL_LOG}
817 echo "`date +'%b %e %Y %T'`: Sending anonymous distribution and version information to Zmanda" >> ${INSTALL_LOG}
818 if [ -x /usr/bin/wget ]; then
819 /usr/bin/wget -q -o /dev/null -O - --timeout=5 http://www.zmanda.com/amanda-tips.php\?version=%{amanda_version}\&os=%{disttag}%{distver}\&type=server
822 echo "`date +'%b %e %Y %T'`: === Amanda installation complete. ===" >${TMPFILE}
825 cat ${TMPFILE} >>${INSTALL_LOG}
826 if [ -f "${TMPFILE}" ]; then
830 echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
834 TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX`
835 if [ $? -ne 0 ]; then
836 echo "Unable to mktemp!" 1>&2
841 INSTALL_LOG="${LOGDIR}/install.log"
842 INSTALL_ERR="${LOGDIR}/install.err"
844 echo "`date +'%b %e %Y %T'`: Preparing to install: %{amanda_version_info}" >${TMPFILE}
846 # Check for the 'amanda' user
847 echo "`date +'%b %e %Y %T'`: Checking for '%{amanda_user}' user..." >>${TMPFILE}
848 if [ "`id -u %{amanda_user} > /dev/null 2>&1 && echo 0 || echo 1`" != "0" ] ; then
849 useradd -c "Amanda" -M -g %{amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user}
850 if [ %{dist} = "SuSE" ]; then
853 # Lock the amanda account until admin sets password
854 passwd -l %{amanda_user} >>/dev/null
857 if [ ${PASSWD_EXIT} -eq 0 ] ; then
858 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
859 echo "`date +'%b %e %Y %T'`: The '%{amanda_user}; user account has been successfully created." >>${TMPFILE}
860 echo "`date +'%b %e %Y %T'`: Furthermore, the account has been automatically locked for you" >>${TMPFILE}
861 echo "`date +'%b %e %Y %T'`: for security purposes. Once a password for the '%{amanda_user}'" >>${TMPFILE}
862 echo "`date +'%b %e %Y %T'`: account has been set, the user can be unlocked by issuing" >>${TMPFILE}
863 echo "`date +'%b %e %Y %T'`: the following command as root.:" >>${TMPFILE}
864 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
865 echo "`date +'%b %e %Y %T'`: # passwd -u %{amanda_user}" >>${TMPFILE}
866 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
867 echo "`date +'%b %e %Y %T'`: If this is not a new installation of Amanda and you have" >>${TMPFILE}
868 echo "`date +'%b %e %Y %T'`: pre-existing Amanda configurations in %{SYSCONFDIR}/amanda" >>${TMPFILE}
869 echo "`date +'%b %e %Y %T'`: you should ensure that 'dumpuser' is set to '%{amanda_user}'" >>${TMPFILE}
870 echo "`date +'%b %e %Y %T'`: in those configurations. Additionally, you should ensure" >>${TMPFILE}
871 echo "`date +'%b %e %Y %T'`: that %{AMANDAHOMEDIR}/.amandahosts on your client systems" >>${TMPFILE}
872 echo "`date +'%b %e %Y %T'`: is properly configured to allow connections for the user" >>${TMPFILE}
873 echo "`date +'%b %e %Y %T'`: '%{amanda_user}'." >>${TMPFILE}
874 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
877 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
878 echo "`date +'%b %e %Y %T'`: !!! !!!" >>${TMPFILE}
879 echo "`date +'%b %e %Y %T'`: !!! The '%{amanda_user}' user account for this system has been !!!" >>${TMPFILE}
880 echo "`date +'%b %e %Y %T'`: !!! created, however the user has no password set. For !!!" >>${TMPFILE}
881 echo "`date +'%b %e %Y %T'`: !!! security purposes this account is normally locked !!!" >>${TMPFILE}
882 echo "`date +'%b %e %Y %T'`: !!! after creation. Unfortunately, when locking this !!!" >>${TMPFILE}
883 echo "`date +'%b %e %Y %T'`: !!! account an error occurred. To ensure the security !!!" >>${TMPFILE}
884 echo "`date +'%b %e %Y %T'`: !!! of your system you should set a password for the !!!" >>${TMPFILE}
885 echo "`date +'%b %e %Y %T'`: !!! user account '%{amanda_user}' immediately! To set such a !!!" >>${TMPFILE}
886 echo "`date +'%b %e %Y %T'`: !!! password, please issue the following command.: !!!" >>${TMPFILE}
887 echo "`date +'%b %e %Y %T'`: !!! !!!" >>${TMPFILE}
888 echo "`date +'%b %e %Y %T'`: !!! # passwd %{amanda_user} !!!" >>${TMPFILE}
889 echo "`date +'%b %e %Y %T'`: !!! !!!" >>${TMPFILE}
890 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
894 # log information about 'amanda' user parameters
895 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
896 echo "`date +'%b %e %Y %T'`: The Amanda backup software is configured to operate as the" >>${TMPFILE}
897 echo "`date +'%b %e %Y %T'`: user '%{amanda_user}'. This user exists on your system and has not" >>${TMPFILE}
898 echo "`date +'%b %e %Y %T'`: been modified. To ensure that Amanda functions properly," >>${TMPFILE}
899 echo "`date +'%b %e %Y %T'`: please see that the following parameters are set for that" >>${TMPFILE}
900 echo "`date +'%b %e %Y %T'`: user.:" >>${TMPFILE}
901 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
902 echo "`date +'%b %e %Y %T'`: SHELL: /bin/sh" >>${TMPFILE}
903 echo "`date +'%b %e %Y %T'`: HOME: %{AMANDAHOMEDIR}" >>${TMPFILE}
904 echo "`date +'%b %e %Y %T'`: Default group: %{amanda_group}" >>${TMPFILE}
905 echo "`date +'%b %e %Y %T'`: Verifying %{amanda_user} parameters :" >>${TMPFILE}
907 if [ "`id -gn %{amanda_user}`" != "disk" ] ; then
908 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
909 echo "`date +'%b %e %Y %T'`: !!! user 'amandabackup' is not part of the disk group,Pl !!!" >>${TMPFILE}
910 echo "`date +'%b %e %Y %T'`: !!! make sure it is corrected before start using Amanda !!!" >>${TMPFILE}
911 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
913 echo "`date +'%b %e %Y %T'`: Verified group name of user 'amandabackup'" >>${TMPFILE}
916 if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f7`" != "/bin/sh" ] ; then
917 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
918 echo "`date +'%b %e %Y %T'`: !!! user 'amandabackup' default shell should be set to !!!" >>${TMPFILE}
919 echo "`date +'%b %e %Y %T'`: !!! /bin/sh, pl correct before start using Amanda !!!" >>${TMPFILE}
920 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
922 echo "`date +'%b %e %Y %T'`: Verified Default shell for user 'amandabackup'" >>${TMPFILE}
925 if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f6`" != "%{AMANDAHOMEDIR}" ] ; then
926 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
927 echo "`date +'%b %e %Y %T'`: !!! user 'amandabackup' home directory should be set to !!!" >>${TMPFILE}
928 echo "`date +'%b %e %Y %T'`: !!! %{AMANDAHOMEDIR} Pl correct before using Amanda !!!" >>${TMPFILE}
929 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
931 echo "`date +'%b %e %Y %T'`: Verified Default home directory for user amandabackup" >>${TMPFILE}
933 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
936 if [ -d %{AMANDAHOMEDIR} ] ; then
937 echo -n "`date +'%b %e %Y %T'`: Checking ownership of '%{AMANDAHOMEDIR}'... " >>${TMPFILE}
938 if [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[3]}'`" = "%{amanda_user}" ] && \
939 [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[4]}'`" = "%{amanda_group}" ] ; then
940 echo "correct." >>${TMPFILE}
943 echo "incorrect!" >>${TMPFILE}
944 echo "`date +'%b %e %Y %T'`: Please ensure that the directory '%{AMANDAHOMEDIR}' is owned by" >>${TMPFILE}
945 echo "`date +'%b %e %Y %T'`: the user '%{amanda_user}' and group '%{amanda_group}'." >>${TMPFILE}
951 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
953 if [ ! -e ${LOGDIR} ] ; then
954 # create log directory
955 mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
956 chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
957 elif [ ! -d ${LOGDIR} ] ; then
958 mv ${LOGDIR} ${LOGDIR}.rpmsave >>${TMPFILE} 2>&1
959 mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
960 chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
961 mv ${LOGDIR}.rpmsave ${LOGDIR}/ >>${TMPFILE} 2>&1
963 if [ ${PASSWD_OK} -eq 1 ] || [ ${VARLIB_OK} -eq 1 ] ; then
965 cat ${TMPFILE} >>${INSTALL_ERR}
966 echo "Please review '${INSTALL_ERR}' to correct errors which have prevented the Amanda installaton." >&2
967 echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
971 cat ${TMPFILE} >>${INSTALL_LOG}
974 echo "`date +'%b %e %Y %T'`: === Amanda backup server installation started. ===" >${TMPFILE}
977 cat ${TMPFILE} >>${INSTALL_LOG}
978 if [ -f "${TMPFILE}" ]; then
982 TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX`
983 if [ $? -ne 0 ]; then
984 echo "Unable to mktemp!" 1>&2
988 INSTALL_LOG="${LOGDIR}/install.log"
989 INSTALL_ERR="${LOGDIR}/install.err"
991 echo -n "`date +'%b %e %Y %T'`: Updating system library cache..." >${TMPFILE}
993 echo "done." >>${TMPFILE}
995 cat ${TMPFILE} >>${INSTALL_LOG}
997 if [ -e /etc/xinetd.d ] && [ -d /etc/xinetd.d ] ; then
998 if [ ! -f /etc/xinetd.d/amandaserver ] ; then
999 cp %{AMANDAHOMEDIR}/example/xinetd.amandaserver /etc/xinetd.d/amandaserver
1000 chmod 0644 /etc/xinetd.d/amandaserver >>${TMPFILE} 2>&1
1001 if [ -f /etc/xinetd.d/amandaclient ] ; then
1002 rm /etc/xinetd.d/amandaclient
1005 echo -n "`date +'%b %e %Y %T'`: Reloading xinetd configuration..." >${TMPFILE}
1006 if [ "%{xinetd_reload}" == "reload" ] ; then
1007 /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
1009 if [ ${ret_val} -ne 0 ] ; then
1010 echo -n "reload failed. Attempting restart..." >>${TMPFILE}
1011 /etc/init.d/xinetd restart >>${TMPFILE} 2>&1
1015 /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
1018 if [ ${ret_val} -eq 0 ] ; then
1019 echo "success." >>${TMPFILE}
1021 cat ${TMPFILE} >>${INSTALL_LOG}
1023 echo "failed. Please check your system logs." >>${TMPFILE}
1025 cat ${TMPFILE} >>${INSTALL_ERR}
1030 echo "`date +'%b %e %Y %T'`: Installing '%{AMANDATES}'." >${TMPFILE}
1032 if [ ! -f %{AMANDATES} ] ; then
1033 touch %{AMANDATES} >>${TMPFILE} 2>&1
1035 if [ ${ret_val} -eq 0 ]; then
1036 echo "`date +'%b %e %Y %T'`: The file '%{AMANDATES}' has been created." >>${TMPFILE}
1039 if [ ${ret_val} -eq 0 ]; then
1040 echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{AMANDATES}'." >>${TMPFILE}
1041 chown %{amanda_user}:%{amanda_group} %{AMANDATES} >>${TMPFILE} 2>&1
1042 chmod 0640 %{AMANDATES} >>${TMPFILE} 2>&1
1044 if [ ${ret_val} -eq 0 ]; then
1045 echo "`date +'%b %e %Y %T'`: '%{AMANDATES}' Installation successful." >>${TMPFILE}
1047 cat ${TMPFILE} >>${INSTALL_LOG}
1049 echo "`date +'%b %e %Y %T'`: '%{AMANDATES}' Installation failed." >>${TMPFILE}
1051 cat ${TMPFILE} >>${INSTALL_ERR}
1054 # Install .amandahosts to server
1055 echo "`date +'%b %e %Y %T'`: Checking '%{AMANDAHOMEDIR}/.amandahosts' file." >${TMPFILE}
1056 if [ ! -f %{AMANDAHOMEDIR}/.amandahosts ] ; then
1057 touch %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
1059 for host in localhost localhost.localdomain ; do
1060 if [ -z "`grep \"^${host}[[:blank:]]\+root[[:blank:]]\+amindexd[[:blank:]]\+amidxtaped\" %{AMANDAHOMEDIR}/.amandahosts`" ] ; then
1061 echo "${host} root amindexd amidxtaped" >>%{AMANDAHOMEDIR}/.amandahosts
1063 if [ -z "`grep \"^${host}[[:blank:]]\+%{amanda_user}[[:blank:]]\+amdump\" %{AMANDAHOMEDIR}/.amandahosts`" ] ; then
1064 echo "${host} %{amanda_user} amdump" >>%{AMANDAHOMEDIR}/.amandahosts
1067 chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
1068 chmod 0600 %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
1070 cat ${TMPFILE} >>${INSTALL_LOG}
1072 # Install amanda client configuration file
1073 echo "`date +'%b %e %Y %T'`: Checking '%{SYSCONFDIR}/amanda/amanda-client.conf' file." >${TMPFILE}
1074 if [ ! -f %{SYSCONFDIR}/amanda/amanda-client.conf ] ; then
1075 cp %{AMANDAHOMEDIR}/example/amanda-client.conf %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
1077 chown %{amanda_user}:%{amanda_group} %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
1078 chmod 0600 %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
1080 cat ${TMPFILE} >>${INSTALL_LOG}
1082 # install am_passphrase file to server
1083 echo "`date +'%b %e %Y %T'`: Checking '%{AMANDAHOMEDIR}/.am_passphrase' file." >${TMPFILE}
1084 if [ ! -f %{AMANDAHOMEDIR}/.am_passphrase ] ; then
1085 echo "`date +'%b %e %Y %T'`: Create '%{AMANDAHOMEDIR}/.am_passphrase' file." >${TMPFILE}
1086 touch %{AMANDAHOMEDIR}/.am_passphrase >>${TMPFILE} 2>&1
1087 phrase=`echo $RANDOM | md5sum | awk '{print $1}'`
1088 echo ${phrase} >>%{AMANDAHOMEDIR}/.am_passphrase
1090 chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.am_passphrase >>${TMPFILE} 2>&1
1091 chmod 0700 %{AMANDAHOMEDIR}/.am_passphrase >>${TMPFILE} 2>&1
1094 cat ${TMPFILE} >>${INSTALL_LOG}
1096 # Install .gnupg directory
1097 echo "`date +'%b %e %Y %T'`: Installing '%{AMANDAHOMEDIR}/.gnupg'." >${TMPFILE}
1099 if [ ! -d %{AMANDAHOMEDIR}/.gnupg ] ; then
1100 echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' will be created." >>${TMPFILE}
1101 mkdir %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
1103 if [ ${ret_val} -eq 0 ]; then
1104 echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' created successfully." >>${TMPFILE}
1106 echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' creation failed." >>${TMPFILE}
1109 if [ ${ret_val} -eq 0 ]; then
1110 echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{AMANDAHOMEDIR}/.gnupg'." >>${TMPFILE}
1111 chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
1113 if [ ${ret_val} -eq 0 ]; then
1114 chmod 700 %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
1118 if [ ${ret_val} -eq 0 ]; then
1119 echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation successful." >>${TMPFILE}
1121 cat ${TMPFILE} >>${INSTALL_LOG}
1123 echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation failed." >>${TMPFILE}
1125 cat ${TMPFILE} >>${INSTALL_ERR}
1128 # SSH RSA key generation on server for amdump
1129 KEYDIR="%{AMANDAHOMEDIR}/.ssh"
1130 KEYFILE="id_rsa_amdump"
1131 COMMENT="%{amanda_user}@server"
1132 if [ ! -d ${KEYDIR} ] ; then
1133 if [ -f ${KEYDIR} ] ; then
1134 echo "`date +'%b %e %Y %T'`: Directory '${KEYDIR}' exists as a file. Renaming to '${KEYDIR}.rpmsave'." >${TMPFILE}
1135 mv ${KEYDIR} ${KEYDIR}.rpmsave >>${TMPFILE} 2>&1
1137 cat ${TMPFILE} >>${INSTALL_LOG}
1139 echo "`date +'%b %e %Y %T'`: Creating directory '${KEYDIR}'." >${TMPFILE}
1140 mkdir ${KEYDIR} >>${TMPFILE} 2>&1
1142 cat ${TMPFILE} >>${INSTALL_LOG}
1144 if [ ! -f ${KEYDIR}/${KEYFILE} ] ; then
1145 echo "`date +'%b %e %Y %T'`: Creating ssh RSA key in '${KEYDIR}/${KEYFILE}'" >${TMPFILE}
1146 ssh-keygen -q -C $COMMENT -t rsa -f ${KEYDIR}/${KEYFILE} -N '' >>${TMPFILE} 2>&1
1148 cat ${TMPFILE} >>${INSTALL_LOG}
1150 echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '${KEYDIR}' and '${KEYDIR}/${KEYFILE}*'" >${TMPFILE}
1151 chown %{amanda_user}:%{amanda_group} ${KEYDIR} ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
1152 chmod 0750 ${KEYDIR} >>${TMPFILE} 2>&1
1153 chmod 0600 ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
1155 cat ${TMPFILE} >>${INSTALL_LOG}
1157 # SSH RSA key generation on client for amrecover
1158 KEYDIR="%{AMANDAHOMEDIR}/.ssh"
1159 KEYFILE="id_rsa_amrecover"
1160 COMMENT="root@client"
1161 if [ ! -d ${KEYDIR} ] ; then
1162 if [ -f ${KEYDIR} ] ; then
1163 echo "`date +'%b %e %Y %T'`: Directory '${KEYDIR}' exists as a file. Renaming to '${KEYDIR}.rpmsave'." >${TMPFILE}
1164 mv ${KEYDIR} ${KEYDIR}.rpmsave >>${TMPFILE} 2>&1
1166 cat ${TMPFILE} >>${INSTALL_LOG}
1168 echo "`date +'%b %e %Y %T'`: Creating directory '${KEYDIR}'." >${TMPFILE}
1169 mkdir ${KEYDIR} >>${TMPFILE} 2>&1
1171 cat ${TMPFILE} >>${INSTALL_LOG}
1173 if [ ! -f ${KEYDIR}/${KEYFILE} ] ; then
1174 echo "`date +'%b %e %Y %T'`: Creating ssh RSA key in '${KEYDIR}/${KEYFILE}'" >${TMPFILE}
1175 ssh-keygen -q -C $COMMENT -t rsa -f ${KEYDIR}/${KEYFILE} -N '' >>${TMPFILE} 2>&1
1177 cat ${TMPFILE} >>${INSTALL_LOG}
1179 echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '${KEYDIR}'" >${TMPFILE}
1180 chown %{amanda_user}:%{amanda_group} ${KEYDIR} >>${TMPFILE} 2>&1
1181 chmod 0750 ${KEYDIR} >>${TMPFILE} 2>&1
1182 chmod 0600 ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
1184 cat ${TMPFILE} >>${INSTALL_LOG}
1186 # environment variables (~amandabackup/.profile)
1187 echo "`date +'%b %e %Y %T'`: Checking for '%{AMANDAHOMEDIR}/.profile' and ensuring correct environment." >${TMPFILE}
1188 if [ ! -f %{AMANDAHOMEDIR}/.profile ] ; then
1189 touch %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
1191 if [ -z "`grep PATH %{AMANDAHOMEDIR}/.profile | grep '%{SBINDIR}'`" ] ; then
1192 echo "export PATH=\"\$PATH:%{SBINDIR}\"" >>%{AMANDAHOMEDIR}/.profile 2>>${TMPFILE}
1195 cat ${TMPFILE} >>${INSTALL_LOG}
1197 echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '%{AMANDAHOMEDIR}/.profile'" >${TMPFILE}
1198 chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
1199 chmod 0640 %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
1201 cat ${TMPFILE} >>${INSTALL_LOG}
1203 echo "`date +'%b %e %Y %T'`: Sending anonymous distribution and version information to Zmanda" >> ${INSTALL_LOG}
1204 if [ -x /usr/bin/wget ]; then
1205 /usr/bin/wget -q -o /dev/null -O - --timeout=5 http://www.zmanda.com/amanda-tips.php\?version=%{amanda_version}\&os=%{disttag}%{distver}\&type=server
1208 echo "`date +'%b %e %Y %T'`: === Amanda backup server installation complete. ===" >${TMPFILE}
1211 cat ${TMPFILE} >>${INSTALL_LOG}
1213 if [ -f "${TMPFILE}" ]; then
1214 rm -f "${TMPFILE}" >>${TMPFILE} 2>&1
1217 echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
1218 %postun backup_server
1221 TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX`
1222 if [ $? -ne 0 ]; then
1223 echo "Unable to mktemp!" 1>&2
1227 INSTALL_LOG="${LOGDIR}/install.log"
1228 INSTALL_ERR="${LOGDIR}/install.err"
1230 echo "`date +'%b %e %Y %T'`: Preparing to install: %{amanda_version_info}" >${TMPFILE}
1232 # Check for the 'amanda' user
1233 echo "`date +'%b %e %Y %T'`: Checking for '%{amanda_user}' user..." >>${TMPFILE}
1234 if [ "`id -u %{amanda_user} > /dev/null 2>&1 && echo 0 || echo 1`" != "0" ] ; then
1235 useradd -c "Amanda" -M -g %{amanda_group} -d %{AMANDAHOMEDIR} -s /bin/sh %{amanda_user} >>${TMPFILE} 2>&1
1236 if [ %{dist} = "SuSE" ]; then
1239 # Lock the amanda account until admin sets password
1240 passwd -l %{amanda_user} >>/dev/null
1243 if [ ${PASSWD_EXIT} -eq 0 ] ; then
1244 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
1245 echo "`date +'%b %e %Y %T'`: The '%{amanda_user}; user account has been successfully created." >>${TMPFILE}
1246 echo "`date +'%b %e %Y %T'`: Furthermore, the account has been automatically locked for you" >>${TMPFILE}
1247 echo "`date +'%b %e %Y %T'`: for security purposes. Once a password for the '%{amanda_user}'" >>${TMPFILE}
1248 echo "`date +'%b %e %Y %T'`: account has been set, the user can be unlocked by issuing" >>${TMPFILE}
1249 echo "`date +'%b %e %Y %T'`: the following command as root.:" >>${TMPFILE}
1250 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
1251 echo "`date +'%b %e %Y %T'`: # passwd -u %{amanda_user}" >>${TMPFILE}
1252 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
1253 echo "`date +'%b %e %Y %T'`: If this is not a new installation of Amanda and you have" >>${TMPFILE}
1254 echo "`date +'%b %e %Y %T'`: pre-existing Amanda configurations in %{SYSCONFDIR}/amanda" >>${TMPFILE}
1255 echo "`date +'%b %e %Y %T'`: you should ensure that 'dumpuser' is set to '%{amanda_user}'" >>${TMPFILE}
1256 echo "`date +'%b %e %Y %T'`: in those configurations. Additionally, you should ensure" >>${TMPFILE}
1257 echo "`date +'%b %e %Y %T'`: that %{AMANDAHOMEDIR}/.amandahosts on your client systems" >>${TMPFILE}
1258 echo "`date +'%b %e %Y %T'`: is properly configured to allow connections for the user" >>${TMPFILE}
1259 echo "`date +'%b %e %Y %T'`: '%{amanda_user}'." >>${TMPFILE}
1260 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
1263 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
1264 echo "`date +'%b %e %Y %T'`: !!! !!!" >>${TMPFILE}
1265 echo "`date +'%b %e %Y %T'`: !!! The '%{amanda_user}' user account for this system has been !!!" >>${TMPFILE}
1266 echo "`date +'%b %e %Y %T'`: !!! created, however the user has no password set. For !!!" >>${TMPFILE}
1267 echo "`date +'%b %e %Y %T'`: !!! security purposes this account is normally locked !!!" >>${TMPFILE}
1268 echo "`date +'%b %e %Y %T'`: !!! after creation. Unfortunately, when locking this !!!" >>${TMPFILE}
1269 echo "`date +'%b %e %Y %T'`: !!! account an error occurred. To ensure the security !!!" >>${TMPFILE}
1270 echo "`date +'%b %e %Y %T'`: !!! of your system you should set a password for the !!!" >>${TMPFILE}
1271 echo "`date +'%b %e %Y %T'`: !!! user account '%{amanda_user}' immediately! To set such a !!!" >>${TMPFILE}
1272 echo "`date +'%b %e %Y %T'`: !!! password, please issue the following command.: !!!" >>${TMPFILE}
1273 echo "`date +'%b %e %Y %T'`: !!! !!!" >>${TMPFILE}
1274 echo "`date +'%b %e %Y %T'`: !!! # passwd %{amanda_user} !!!" >>${TMPFILE}
1275 echo "`date +'%b %e %Y %T'`: !!! !!!" >>${TMPFILE}
1276 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
1280 # log information about 'amanda' user parameters
1281 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
1282 echo "`date +'%b %e %Y %T'`: The Amanda backup software is configured to operate as the" >>${TMPFILE}
1283 echo "`date +'%b %e %Y %T'`: user '%{amanda_user}'. This user exists on your system and has not" >>${TMPFILE}
1284 echo "`date +'%b %e %Y %T'`: been modified. To ensure that Amanda functions properly," >>${TMPFILE}
1285 echo "`date +'%b %e %Y %T'`: please see that the following parameters are set for that" >>${TMPFILE}
1286 echo "`date +'%b %e %Y %T'`: user.:" >>${TMPFILE}
1287 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
1288 echo "`date +'%b %e %Y %T'`: SHELL: /bin/sh" >>${TMPFILE}
1289 echo "`date +'%b %e %Y %T'`: HOME: %{AMANDAHOMEDIR}" >>${TMPFILE}
1290 echo "`date +'%b %e %Y %T'`: Default group: %{amanda_group}" >>${TMPFILE}
1291 echo "`date +'%b %e %Y %T'`: Verifying %{amanda_user} parameters :" >>${TMPFILE}
1293 if [ "`id -gn %{amanda_user}`" != "disk" ] ; then
1294 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
1295 echo "`date +'%b %e %Y %T'`: !!! user 'amandabackup' is not part of the disk group,Pl !!!" >>${TMPFILE}
1296 echo "`date +'%b %e %Y %T'`: !!! make sure it is corrected before start using Amanda !!!" >>${TMPFILE}
1297 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
1299 echo "`date +'%b %e %Y %T'`: Verified group name of user 'amandabackup'" >>${TMPFILE}
1302 if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f7`" != "/bin/sh" ] ; then
1303 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
1304 echo "`date +'%b %e %Y %T'`: !!! user 'amandabackup' default shell should be set to !!!" >>${TMPFILE}
1305 echo "`date +'%b %e %Y %T'`: !!! /bin/sh, pl correct before start using Amanda !!!" >>${TMPFILE}
1306 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
1308 echo "`date +'%b %e %Y %T'`: Verified Default shell for user 'amandabackup'" >>${TMPFILE}
1311 if [ "`grep ^%{amanda_user} /etc/passwd|cut -d: -f6`" != "%{AMANDAHOMEDIR}" ] ; then
1312 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
1313 echo "`date +'%b %e %Y %T'`: !!! user 'amandabackup' home directory should be set to !!!" >>${TMPFILE}
1314 echo "`date +'%b %e %Y %T'`: !!! %{AMANDAHOMEDIR} Pl correct before using Amanda !!!" >>${TMPFILE}
1315 echo "`date +'%b %e %Y %T'`: !!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!" >>${TMPFILE}
1317 echo "`date +'%b %e %Y %T'`: Verified Default home directory for user amandabackup" >>${TMPFILE}
1319 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
1322 if [ -d %{AMANDAHOMEDIR} ] ; then
1323 echo -n "`date +'%b %e %Y %T'`: Checking ownership of '%{AMANDAHOMEDIR}'... " >>${TMPFILE}
1324 if [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[3]}'`" = "%{amanda_user}" ] && \
1325 [ "`ls -dl %{AMANDAHOMEDIR} | awk '//{split($_,x); print x[4]}'`" = "%{amanda_group}" ] ; then
1326 echo "correct." >>${TMPFILE}
1329 echo "incorrect!" >>${TMPFILE}
1330 echo "`date +'%b %e %Y %T'`: Please ensure that the directory '%{AMANDAHOMEDIR}' is owned by" >>${TMPFILE}
1331 echo "`date +'%b %e %Y %T'`: the user '%{amanda_user}' and group '%{amanda_group}'." >>${TMPFILE}
1337 echo "`date +'%b %e %Y %T'`:" >>${TMPFILE}
1339 if [ ! -e ${LOGDIR} ] ; then
1340 # create log directory
1341 mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
1342 chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
1343 elif [ ! -d ${LOGDIR} ] ; then
1344 mv ${LOGDIR} ${LOGDIR}.rpmsave >>${TMPFILE} 2>&1
1345 mkdir -m 0750 ${LOGDIR} >>${TMPFILE} 2>&1
1346 chown %{amanda_user}:%{amanda_group} ${LOGDIR} >>${TMPFILE} 2>&1
1347 mv ${LOGDIR}.rpmsave ${LOGDIR}/ >>${TMPFILE} 2>&1
1349 if [ ${PASSWD_OK} -eq 1 ] || [ ${VARLIB_OK} -eq 1 ] ; then
1351 cat ${TMPFILE} >>${INSTALL_ERR}
1352 echo "Please review '${INSTALL_ERR}' to correct errors which have prevented the Amanda installaton." >&2
1353 echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
1357 cat ${TMPFILE} >>${INSTALL_LOG}
1360 echo "`date +'%b %e %Y %T'`: === Amanda backup client installation started. ===" >${TMPFILE}
1363 cat ${TMPFILE} >>${INSTALL_LOG}
1365 if [ -f "${TMPFILE}" ]; then
1370 TMPFILE=`mktemp /tmp/rpm-amanda.XXXXXXXXXXX`
1371 if [ $? -ne 0 ]; then
1372 echo "Unable to mktemp!" 1>&2
1376 INSTALL_LOG="${LOGDIR}/install.log"
1377 INSTALL_ERR="${LOGDIR}/install.err"
1379 echo -n "`date +'%b %e %Y %T'`: Updating system library cache..." >${TMPFILE}
1381 echo "done." >>${TMPFILE}
1383 cat ${TMPFILE} >>${INSTALL_LOG}
1385 if [ -e /etc/xinetd.d ] && [ -d /etc/xinetd.d ] ; then
1386 if [ ! -f /etc/xinetd.d/amandaclient ] ; then
1387 cp %{AMANDAHOMEDIR}/example/xinetd.amandaclient /etc/xinetd.d/amandaclient
1389 echo -n "`date +'%b %e %Y %T'`: Reloading xinetd configuration..." >${TMPFILE}
1390 if [ "%{xinetd_reload}" == "reload" ] ; then
1391 /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
1393 if [ ${ret_val} -ne 0 ] ; then
1394 echo -n "reload failed. Attempting restart..." >>${TMPFILE}
1395 /etc/init.d/xinetd restart >>${TMPFILE} 2>&1
1399 /etc/init.d/xinetd %{xinetd_reload} >>${TMPFILE} 2>&1
1402 if [ ${ret_val} -eq 0 ] ; then
1403 echo "success." >>${TMPFILE}
1405 cat ${TMPFILE} >>${INSTALL_LOG}
1407 echo "failed. Please check your system logs." >>${TMPFILE}
1409 cat ${TMPFILE} >>${INSTALL_LOG}
1414 echo "`date +'%b %e %Y %T'`: Installing '%{AMANDATES}'." >${TMPFILE}
1416 if [ ! -f %{AMANDATES} ] ; then
1417 touch %{AMANDATES} >>${TMPFILE} 2>&1
1419 if [ ${ret_val} -eq 0 ]; then
1420 echo "`date +'%b %e %Y %T'`: The file '%{AMANDATES}' has been created." >>${TMPFILE}
1423 if [ ${ret_val} -eq 0 ]; then
1424 echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{AMANDATES}'." >>${TMPFILE}
1425 chown %{amanda_user}:%{amanda_group} %{AMANDATES} >>${TMPFILE} 2>&1
1426 chmod 0640 %{AMANDATES} >>${TMPFILE} 2>&1
1428 if [ ${ret_val} -eq 0 ]; then
1429 echo "`date +'%b %e %Y %T'`: '%{AMANDATES}' Installation successful." >>${TMPFILE}
1431 cat ${TMPFILE} >>${INSTALL_LOG}
1433 echo "`date +'%b %e %Y %T'`: '%{AMANDATES}' Installation failed." >>${TMPFILE}
1435 cat ${TMPFILE} >>${INSTALL_ERR}
1438 # Install .amandahosts to client
1439 echo "`date +'%b %e %Y %T'`: Checking '%{AMANDAHOMEDIR}/.amandahosts' file." >${TMPFILE}
1440 if [ ! -f %{AMANDAHOMEDIR}/.amandahosts ] ; then
1441 touch %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
1443 for host in localhost localhost.localdomain ; do
1444 if [ -z "`grep \"^${host}[[:blank:]]\+\" %{AMANDAHOMEDIR}/.amandahosts | grep \"[[:blank:]]\+%{amanda_user}[[:blank:]]\+amdump\"`" ] ; then
1445 echo "${host} %{amanda_user} amdump" >>%{AMANDAHOMEDIR}/.amandahosts
1448 chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
1449 chmod 0600 %{AMANDAHOMEDIR}/.amandahosts >>${TMPFILE} 2>&1
1451 cat ${TMPFILE} >>${INSTALL_LOG}
1453 # Install amanda client configuration file
1454 echo "`date +'%b %e %Y %T'`: Checking '%{SYSCONFDIR}/amanda/amanda-client.conf' file." >${TMPFILE}
1455 if [ ! -f %{SYSCONFDIR}/amanda/amanda-client.conf ] ; then
1456 cp %{AMANDAHOMEDIR}/example/amanda-client.conf %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
1458 chown %{amanda_user}:%{amanda_group} %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
1459 chmod 0600 %{SYSCONFDIR}/amanda/amanda-client.conf >>${TMPFILE} 2>&1
1461 cat ${TMPFILE} >>${INSTALL_LOG}
1463 # Install .gnupg directory
1464 echo "`date +'%b %e %Y %T'`: Installing '%{AMANDAHOMEDIR}/.gnupg'." >${TMPFILE}
1466 if [ ! -d %{AMANDAHOMEDIR}/.gnupg ] ; then
1467 echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' will be created." >>${TMPFILE}
1468 mkdir %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
1470 if [ ${ret_val} -eq 0 ]; then
1471 echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' created successfully." >>${TMPFILE}
1473 echo "`date +'%b %e %Y %T'`: The directory '%{AMANDAHOMEDIR}/.gnupg' creation failed." >>${TMPFILE}
1476 if [ ${ret_val} -eq 0 ]; then
1477 echo "`date +'%b %e %Y %T'`: Ensuring correct permissions for '%{AMANDAHOMEDIR}/.gnupg'." >>${TMPFILE}
1478 chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
1480 if [ ${ret_val} -eq 0 ]; then
1481 chmod 700 %{AMANDAHOMEDIR}/.gnupg >>${TMPFILE} 2>&1
1485 if [ ${ret_val} -eq 0 ]; then
1486 echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation successful." >>${TMPFILE}
1488 cat ${TMPFILE} >>${INSTALL_LOG}
1490 echo "`date +'%b %e %Y %T'`: '%{AMANDAHOMEDIR}/.gnupg' Installation failed." >>${TMPFILE}
1492 cat ${TMPFILE} >>${INSTALL_ERR}
1495 # SSH RSA key generation on client for amrecover
1496 KEYDIR="%{AMANDAHOMEDIR}/.ssh"
1497 KEYFILE="id_rsa_amrecover"
1498 COMMENT="root@client"
1499 if [ ! -d ${KEYDIR} ] ; then
1500 if [ -f ${KEYDIR} ] ; then
1501 echo "`date +'%b %e %Y %T'`: Directory '${KEYDIR}' exists as a file. Renaming to '${KEYDIR}.rpmsave'." >${TMPFILE}
1502 mv ${KEYDIR} ${KEYDIR}.rpmsave >>${TMPFILE} 2>&1
1504 cat ${TMPFILE} >>${INSTALL_LOG}
1506 echo "`date +'%b %e %Y %T'`: Creating directory '${KEYDIR}'." >${TMPFILE}
1507 mkdir ${KEYDIR} >>${TMPFILE} 2>&1
1509 cat ${TMPFILE} >>${INSTALL_LOG}
1511 if [ ! -f ${KEYDIR}/${KEYFILE} ] ; then
1512 echo "`date +'%b %e %Y %T'`: Creating ssh RSA key in '${KEYDIR}/${KEYFILE}'" >${TMPFILE}
1513 ssh-keygen -q -C $COMMENT -t rsa -f ${KEYDIR}/${KEYFILE} -N '' >>${TMPFILE} 2>&1
1515 cat ${TMPFILE} >>${INSTALL_LOG}
1517 echo "`date +'%b %e %Y %T'`: Setting permissions for '${KEYDIR}' and '${KEYDIR}/${KEYFILE}*'" >${TMPFILE}
1518 chown %{amanda_user}:%{amanda_group} ${KEYDIR} >>${TMPFILE} 2>&1
1519 chmod 0750 ${KEYDIR} >>${TMPFILE} 2>&1
1520 chmod 0600 ${KEYDIR}/${KEYFILE}* >>${TMPFILE} 2>&1
1522 cat ${TMPFILE} >>${INSTALL_LOG}
1524 # environment variables (~amandabackup/.profile)
1525 echo "`date +'%b %e %Y %T'`: Checking for '%{AMANDAHOMEDIR}/.profile' and ensuring correct environment." >${TMPFILE}
1526 if [ ! -f %{AMANDAHOMEDIR}/.profile ] ; then
1527 touch %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
1529 if [ -z "`grep PATH %{AMANDAHOMEDIR}/.profile | grep '%{SBINDIR}'`" ] ; then
1530 echo "export PATH=\"\$PATH:%{SBINDIR}\"" >>%{AMANDAHOMEDIR}/.profile 2>>${TMPFILE}
1533 cat ${TMPFILE} >>${INSTALL_LOG}
1534 echo "`date +'%b %e %Y %T'`: Setting ownership and permissions for '%{AMANDAHOMEDIR}/.profile'" >${TMPFILE}
1535 chown %{amanda_user}:%{amanda_group} %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
1536 chmod 0640 %{AMANDAHOMEDIR}/.profile >>${TMPFILE} 2>&1
1538 cat ${TMPFILE} >>${INSTALL_LOG}
1540 echo "`date +'%b %e %Y %T'`: Sending anonymous distribution and version information to Zmanda" >> ${INSTALL_LOG}
1541 if [ -x /usr/bin/wget ]; then
1542 /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
1545 echo "`date +'%b %e %Y %T'`: === Amanda backup client installation complete. ===" >>${TMPFILE}
1547 cat ${TMPFILE} >>${INSTALL_LOG}
1549 if [ -f "${TMPFILE}" ]; then
1553 echo "Amanda installation log can be found in '${INSTALL_LOG}' and errors (if any) in '${INSTALL_ERR}'."
1554 %postun backup_client
1557 # --- Files to install ---
1558 # Notes: Do not use wildcards on directories not wholly owned by amanda. An
1559 # uninstall of the software will attempt to delete whatever matches here.
1560 %files backup_client
1561 %defattr(0755,%{amanda_user},%{amanda_group},0755)
1564 %{PERLSITELIB}/auto/Amanda
1565 %defattr(4750,root,disk)
1566 %{AMLIBEXECDIR}/application/amgtar
1567 %{AMLIBEXECDIR}/application/amstar
1568 %{AMLIBEXECDIR}/calcsize
1569 %{AMLIBEXECDIR}/killpgrp
1570 %{AMLIBEXECDIR}/rundump
1571 %{AMLIBEXECDIR}/runtar
1572 %defattr(0750,%{amanda_user},%{amanda_group})
1574 %{SBINDIR}/amaespipe
1576 %{SBINDIR}/amgpgcrypt
1577 %{SBINDIR}/amoldrecover
1578 %{SBINDIR}/amrecover
1579 %defattr(0644,%{amanda_user},%{amanda_group},0755)
1580 %{LOCALSTATEDIR}/amanda
1581 %{PERLSITELIB}/Amanda
1582 %{SYSCONFDIR}/amanda
1584 %{MANDIR}/man5/amanda.conf.5.gz
1585 %{MANDIR}/man5/amanda-client.conf.5.gz
1586 %{MANDIR}/man7/amanda-devices.7.gz
1587 %{MANDIR}/man7/amanda-applications.7.gz
1588 %{MANDIR}/man7/amanda-scripts.7.gz
1589 %{MANDIR}/man8/amaespipe.8.gz
1590 %{MANDIR}/man8/amanda.8.gz
1591 %{MANDIR}/man8/amcheckdump.8.gz
1592 %{MANDIR}/man8/amcrypt*
1593 %{MANDIR}/man8/amgpgcrypt.8.gz
1594 %{MANDIR}/man8/amrecover.8.gz
1595 %{AMLIBEXECDIR}/amcat.awk
1596 %{AMANDAHOMEDIR}/gnutar-lists
1597 %doc %{AMANDAHOMEDIR}/amanda-release
1598 %doc %{AMANDAHOMEDIR}/example/xinetd.amandaclient
1599 %doc %{AMANDAHOMEDIR}/example/xinetd.amandaserver
1600 %doc %{AMANDAHOMEDIR}/example/amanda-client.conf
1601 %doc %{AMANDAHOMEDIR}/template.d/README
1602 %doc %{AMANDAHOMEDIR}/template.d/dumptypes
1604 %files backup_server
1605 %defattr(0755,%{amanda_user},%{amanda_group})
1606 %{SYSCONFDIR}/amanda
1609 %{PERLSITELIB}/Amanda
1610 %{PERLSITELIB}/auto/Amanda
1612 %{LOCALSTATEDIR}/amanda
1614 %defattr(4750,root,disk)
1615 %{AMLIBEXECDIR}/calcsize
1616 %{AMLIBEXECDIR}/killpgrp
1617 %{AMLIBEXECDIR}/rundump
1618 %{AMLIBEXECDIR}/runtar
1619 %{AMLIBEXECDIR}/dumper
1620 %{AMLIBEXECDIR}/planner
1622 %defattr(0750,%{amanda_user},%{amanda_group})
1624 %{SBINDIR}/activate-devpay
1625 %{SBINDIR}/amaespipe
1627 %{SBINDIR}/amgpgcrypt
1628 %{SBINDIR}/amoldrecover
1629 %{SBINDIR}/amrecover
1630 %defattr(0644,%{amanda_user},%{amanda_group})
1631 %{AMLIBEXECDIR}/amcat.awk
1632 %{AMLIBEXECDIR}/amplot.awk
1633 %{AMLIBEXECDIR}/amplot.g
1634 %{AMLIBEXECDIR}/amplot.gp
1637 %{MANDIR}/man5/disklist.5.gz
1638 %{MANDIR}/man5/tapelist.5.gz
1641 %{MANDIR}/man8/script-email.8.gz
1642 %doc %{AMANDAHOMEDIR}/amanda-release
1643 %docdir %{AMANDAHOMEDIR}/example
1644 %docdir %{AMANDAHOMEDIR}/template.d
1649 * Mon Sep 15 2008 Dan Locks <dwlocks at zmanda dot com> 2.6.1alpha
1650 - Added detection of CentOS 4 and 5 as suggested by dswartz
1651 - graceful failure when Distro/version is not detected correctly
1652 * Thu Jun 12 2008 Dan Locks <dwlocks at zmanda dot com> 2.6.1alpha
1653 - install amgtar and amstar suid root
1654 * Mon Jun 09 2008 Dan Locks <dwlocks at zmanda dot com> 2.6.1alpha
1655 - Replaced individual SBINDIR/am... entries with SBINDIR/am* in %%files
1656 * Fri May 02 2008 Dan Locks <dwlocks at zmanda dot com>
1657 - Changed instances of ${ to %%{ where applicable
1658 * Tue Mar 11 2008 Dan Locks <dwlocks at zmanda dot com>
1659 - fixed many rpmlint complaints
1660 - added --quiet to configure statements
1661 - added PERLSITELIB to definitions section and perl files to %%files section
1662 * Wed Feb 13 2008 Dan Locks <dwlocks at zmanda dot com>
1663 - added an environment check for PKG_CONFIG_PATH
1664 - added PKG_CONFIG_PATH conditional to handle cross comp on FC8 (environment
1665 var is used if provided)
1666 * Fri Feb 01 2008 Dan Locks <dwlocks at zmanda dot com>
1667 - Removed amplot executable and manpages from client installation
1668 - Added amcheckdump.8 manpage
1669 - Fixed %%{LOCALSTATEDIR}/amanda dir creation.
1670 * Wed Jan 23 2008 Dan Locks <dwlocks at zmanda dot com>
1671 - Change %%{SYSCONFDIR}/amanda/amandates to %%{LOCALSTATEDIR}/amanda/amandates,
1672 and added %%{LOCALSTATEDIR}/amanda to the files lists.
1673 * Mon Jan 14 2008 Dan Locks <dwlocks at zmanda dot com>
1674 - Updates for perlified amanda, file location moves, gpg setup.
1675 * Tue Nov 13 2007 Paddy Sreenivasan <paddy at zmanda dot com>
1676 - Added SYSCONFDIR to client rpm
1677 - Set xinetd and amanda-client.conf configuration files as part of postinstall
1678 * Thu Nov 8 2007 Dan Locks <dwlocks at zmanda dot com>
1679 - Added Linux distribution detection
1680 * Wed Nov 7 2007 Paddy Sreenivasan <paddy at zmanda dot com>
1681 - Added amserverconfig, amaddclient, amgpgcrypt, amcryptsimple and libamdevice.
1682 - Added amanda configuration template files
1683 * Fri Sep 21 2007 Paddy Sreenivasan <paddy at zmanda dot com>
1684 - Remove libamserver, libamtape from client rpm
1685 * Wed Sep 19 2007 Paddy Sreenivasan <paddy at zmanda dot com>
1687 * Tue Jun 26 2007 Kevin Till <ktill at zmanda dot com>
1688 - set debug log to /var/log/amanda
1689 * Fri Jan 12 2007 Paddy Sreenivasan <paddy at zmanda dot com>
1690 - Added label templates
1691 * Thu Dec 07 2006 Paddy Sreenivasan <paddy at zmanda dot com>
1692 - Application API changes
1693 * Fri Jun 16 2006 Kevin Till <ktill at zmanda dot com>
1694 - make install will install necessary example files.
1696 * Wed Jun 07 2006 Paddy Sreenivasan <paddy at zmanda dot com> -
1697 - Added amoldrecover and amanda-client.conf man page.
1698 * Thu Jun 01 2006 Kevin Till <ktill at zmanda dot com> -
1699 - Added amcrypt-ossl, amcrypt-ossl-asym by Ben Slusky.
1700 * Thu May 18 2006 Paddy Sreenivasan <paddy at zmanda dot com> -
1701 - Added SLES10, RHEL3 build options.
1702 * Tue May 09 2006 Chris Lee <cmlee at zmanda dot com> -
1703 - Added amanda-release file to amandabackup home directory.
1704 - Installation message logging cleanup.
1705 * Thu Apr 27 2006 Paddy Sreenivasan <paddy at zmanda dot com> -
1706 - Removed dependency on tar version.
1707 - Moved log directory creation after backup user creation.
1708 * Wed Apr 19 2006 Chris Lee <cmlee at zmanda dot com> -
1709 - Added informative message to note the location of pre- and post-
1710 - install script logs files.
1711 * Mon Apr 17 2006 Chris Lee <cmlee at zmanda dot com> -
1712 - Reworked installation message logging and reporting.
1713 * Fri Apr 14 2006 Chris Lee <cmlee at zmanda dot com> -
1714 - Changed behavior for creating required localhost entries in the
1715 - amandahosts file to check for these entries even when the file
1717 * Wed Apr 12 2006 Chris Lee <cmlee at zmanda dot com> -
1718 - Removed pre-install check for "disk" group. This group should exist
1719 - by default on almost all modern distributions.
1720 * Tue Apr 11 2006 Chris Lee <cmlee at zmanda dot com> -
1721 - Added amandahosts entry for "localhost" without domain.
1722 * Fri Apr 07 2006 Chris Lee <cmlee at zmanda dot com> -
1723 - Changed default entries in .amandahosts to use "localdomain" instead
1725 - Updated amanda_version and release.
1726 * Mon Apr 03 2006 Chris Lee <cmlee at zmanda dot com> -
1727 - Added example amanda.conf to files.
1728 * Thu Mar 16 2006 Chris Lee <cmlee at zmanda dot com> -
1729 - Corrected an issue with pre-install scripts wrt bug #218.
1730 - Corrected an issue with post-install scripts and added testing .profile
1731 - in amandabackup's home directory for setting environment variables wrt
1733 * Mon Mar 13 2006 Chris Lee <cmlee at zmanda dot com> -
1734 - Corrected a syntactical error with setting ownership of amandates file
1736 * Wed Mar 08 2006 Chris Lee <cmlee at zmanda dot com> -
1737 - Added pre-install scripts to verify proper ownership of
1738 - amandabackup home directory.
1739 * Thu Feb 2 2006 Paddy Sreenivasan <paddy at zmanda dot com> -
1740 - Require xinetd. Require termcap and initscripts for Fedora and Redhat.
1741 * Mon Jan 09 2006 Chris Lee <cmlee at zmanda dot com> -
1742 - Pre/post install scripts updated:
1743 - o Resolved an issue where an empty amandates file was installed
1744 - even if the file already existed on the system.
1745 - o If .amandahosts does not exist a default is now created.
1746 - The Amanda user account has been changed to 'amandabackup' for
1747 - additional security.
1748 * Tue Jan 03 2006 Paddy Sreenivasan <paddy at zmanda dot com> -
1749 - Removed amandates from files list.
1750 * Thu Dec 29 2005 Chris Lee <cmlee at zmanda dot com> -
1751 - Corrected dependency for awk to "/bin/awk".
1752 * Thu Dec 29 2005 Kevin Till <ktill at zmanda dot com> -
1753 - add man pages for amcrypt and amaespipe
1754 * Thu Dec 29 2005 Chris Lee <cmlee at zmanda dot com> -
1755 - Updated dependancy info to depend on tar >= 1.15.
1756 - Included dependancies from top-level package in backup_client and
1757 - backup_server packages.
1758 - Reorganized files lists for readability (alphabetically).
1759 - Updated backup_client files list to include some missing files per
1761 - Updated pre- and post-install to handle potential issue when
1762 - /var/log/amanda exists and is a file rather than a directory.
1763 - Corrected permissions for /var/log/amanda in pre-install scripts
1764 - per bug #78 and 13 December change.
1765 * Thu Dec 22 2005 Paddy Sreenivasan <paddy at zmanda dot com> -
1766 - Added amaespipe and amcrypt
1767 - Added sles9 build definitions
1768 * Tue Dec 13 2005 Chris Lee <cmlee at zmanda dot com> -
1769 - Changed permissions for /var/log/amanda, removing set group id bit.
1770 - Added /etc/amandates to backup_client package.
1771 * Thu Dec 08 2005 Chris Lee <cmlee at zmanda dot com> -
1772 - Corrected an issue with detection of existing 'amanda' user account.
1773 - Corrected ownership of setuid executables per Bug #66.
1774 - Moved the gnutar and noop files to the backup_client package (where
1776 - Removed amqde from files list.
1777 - Added logging features to pre- and post-install scripts.
1778 * Wed Dec 07 2005 Chris Lee <cmlee at zmanda dot com> -
1779 - Changed a number of directory and file permissions from amanda:root
1780 - to amanda:disk in response to Bug #57.
1781 * Fri Dec 02 2005 Chris Lee <cmlee at zmanda dot com> -
1782 - Corrected SYSCONFDIR path definition. Closes Bug #58.
1783 * Mon Nov 28 2005 Chris Lee <cmlee at zmanda dot com> -
1784 - Really fixed user creation preinstall scripts.
1785 * Wed Nov 23 2005 Paddy Sreenivasan <paddy at zmanda dot com> -
1786 - Updated package description.
1787 - Changed Group for packages.
1788 * Tue Nov 22 2005 Chris Lee <cmlee at zmanda dot com> -
1789 - Corrected dependancy packaging issue with amanda libraries.
1790 - Fixed creation of amanda user on systems which it does not exist.
1791 - Corrected Group definition for SuSE.
1792 - Updated descriptions to include amanda-libs package.
1793 - Updated release number to 2.
1794 * Tue Nov 08 2005 Chris Lee <cmlee at zmanda dot com> -
1795 - Permissions changes: now using user=amanda, group=disk
1796 * Sun Oct 30 2005 Chris Lee <cmlee at zmanda dot com> -
1797 - Parameters to configure options --with-user and --with-group changed
1798 - such that when test_build is set to '1' the username of the user who
1799 - runs rpmbuild is used for both values. If test_build is set to '0'
1800 - then root is used for both values.
1801 - The release field was also changed to automatically reflect the
1802 - distribution and distribution release version for which the RPM was
1804 * Tue Oct 18 2005 Chris Lee <cmlee at zmanda dot com> -
1805 - Initial RPM SPEC file created.