package init
This commit is contained in:
parent
264aba9ea2
commit
62c2a012fd
BIN
activate-devpay.1.gz
Normal file
BIN
activate-devpay.1.gz
Normal file
Binary file not shown.
BIN
amanda-3.5.1.tar.gz
Normal file
BIN
amanda-3.5.1.tar.gz
Normal file
Binary file not shown.
9
amanda-udp.service
Normal file
9
amanda-udp.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Amanda Backup System
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
User=amandabackup
|
||||
Group=disk
|
||||
ExecStart=/usr/sbin/amandad -auth=bsd amdump amindexd amidxtaped
|
||||
StandardInput=socket
|
||||
9
amanda-udp.socket
Normal file
9
amanda-udp.socket
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Amanda Activation Socket
|
||||
|
||||
[Socket]
|
||||
Service=amanda-udp.service
|
||||
ListenDatagram=10080
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
9
amanda.socket
Normal file
9
amanda.socket
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Amanda Activation Socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=10080
|
||||
Accept=true
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
200
amanda.spec
Normal file
200
amanda.spec
Normal file
@ -0,0 +1,200 @@
|
||||
%global _hardened_build 1
|
||||
|
||||
%define _libexecdir %{_libdir}
|
||||
%define defconfig DailySet1
|
||||
%define indexserver amandahost
|
||||
%define tapeserver %{indexserver}
|
||||
%define amanda_user amandabackup
|
||||
%define amanda_group disk
|
||||
|
||||
Name: amanda
|
||||
Version: 3.5.1
|
||||
Release: 17
|
||||
Summary: A backup solution over network to disk
|
||||
License: BSD and GPLv3+ and GPLv2+ and GPLv2
|
||||
URL: http://www.amanda.org
|
||||
Source: http://downloads.sourceforge.net/amanda/amanda-%{version}.tar.gz
|
||||
Source9: amanda.socket
|
||||
Source10: amanda@.service
|
||||
Source11: activate-devpay.1.gz
|
||||
Source12: killpgrp.8
|
||||
Source13: amanda-udp.socket
|
||||
Source14: amanda-udp.service
|
||||
Source15: kamanda.socket
|
||||
Source16: kamanda@.service
|
||||
|
||||
Patch5: patch-tirpc
|
||||
|
||||
BuildRequires: automake autoconf libtool dump xfsdump gnuplot cups
|
||||
BuildRequires: samba-client tar grep gcc-c++ readline-devel libtirpc-devel
|
||||
BuildRequires: krb5-devel rsh openssh-clients ncompress mtx mt-st
|
||||
BuildRequires: perl-devel perl-generators perl perl-Test-Simple
|
||||
BuildRequires: glib2-devel openssl-devel swig bison flex
|
||||
BuildRequires: libcurl-devel procps-ng systemd
|
||||
Requires: grep tar /bin/mail perl
|
||||
Requires(post): /sbin/ldconfig
|
||||
Requires(postun): /sbin/ldconfig
|
||||
|
||||
Provides: %{name}-libs = %{version}-%{release}
|
||||
Provides: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Provides: %{name}-client = %{version}-%{release}
|
||||
Provides: %{name}-client%{?_isa} = %{version}-%{release}
|
||||
Provides: %{name}-server = %{version}-%{release}
|
||||
Provides: %{name}-server%{?_isa} = %{version}-%{release}
|
||||
Obsoletes: %{name}-libs < %{version}-%{release}
|
||||
Obsoletes: %{name}-client < %{version}-%{release}
|
||||
Obsoletes: %{name}-server < %{version}-%{release}
|
||||
|
||||
%{?systemd_requires}
|
||||
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\(Math::BigInt\\)
|
||||
%global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{perl_vendorarch}/auto/.*\\.so$
|
||||
%global __requires_exclude ^perl\\(Dancer2\\)
|
||||
|
||||
%description
|
||||
AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a
|
||||
backup system that allows the administrator of a LAN to set up a single
|
||||
master backup server to back up multiple hosts to a single large capacity
|
||||
tape or disk drive. Amanda uses native tools (such as GNUtar, dump) for
|
||||
backup and can back up a large number of workstations running multiple
|
||||
versions of Unix/Mac OS X/Linux/Windows.
|
||||
|
||||
%package_help
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
./autogen
|
||||
|
||||
export MAILER=/bin/mail CFLAGS="$RPM_OPT_FLAGS -fPIE" LDFLAGS="$RPM_LD_FLAGS -pie"
|
||||
%configure --enable-shared \
|
||||
--disable-rpath \
|
||||
--disable-dependency-tracking \
|
||||
--disable-installperms \
|
||||
--with-amdatadir=%{_localstatedir}/lib/amanda \
|
||||
--with-amlibdir=%{_libdir} \
|
||||
--with-amperldir=%{perl_vendorarch} \
|
||||
--with-index-server=%{indexserver} \
|
||||
--with-tape-server=%{tapeserver} \
|
||||
--with-config=%{defconfig} \
|
||||
--with-gnutar-listdir=%{_localstatedir}/lib/amanda/gnutar-lists \
|
||||
--with-smbclient=%{_bindir}/smbclient \
|
||||
--with-amandates=%{_localstatedir}/lib/amanda/amandates \
|
||||
--with-user=%amanda_user \
|
||||
--with-group=%amanda_group \
|
||||
--with-tmpdir=/var/log/amanda \
|
||||
--with-gnutar=/bin/tar \
|
||||
--with-ssh-security \
|
||||
--with-rsh-security \
|
||||
--with-bsdtcp-security \
|
||||
--with-bsdudp-security \
|
||||
--with-krb5-security
|
||||
|
||||
pushd perl
|
||||
make maintainer-clean-am
|
||||
popd
|
||||
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install BINARY_OWNER=%(id -un) SETUID_GROUP=%(id -gn)
|
||||
|
||||
pushd %{buildroot}
|
||||
mkdir -p ./%{_sysconfdir}/amanda
|
||||
mkdir -p ./var/log/amanda/amandad
|
||||
mkdir -p ./%{_localstatedir}/lib/amanda
|
||||
|
||||
install -p -m 644 -D %{SOURCE9} ./%{_unitdir}/amanda.socket
|
||||
install -p -m 644 -D %{SOURCE10} ./%{_unitdir}/amanda@.service
|
||||
install -p -m 644 -D %{SOURCE13} ./%{_unitdir}/amanda-udp.socket
|
||||
install -p -m 644 -D %{SOURCE14} ./%{_unitdir}/amanda-udp.service
|
||||
install -p -m 644 -D %{SOURCE15} ./%{_unitdir}/kamanda.socket
|
||||
install -p -m 644 -D %{SOURCE16} ./%{_unitdir}/kamanda@.service
|
||||
install -D %{SOURCE11} ./%{_mandir}/man1/activate-devpay.1.gz
|
||||
install -D %{SOURCE12} ./%{_mandir}/man8/killpgrp.8
|
||||
install -m 644 ./%{_sysconfdir}/amanda/amanda-security.conf ./%{_sysconfdir}/amanda-security.conf
|
||||
popd
|
||||
|
||||
ln -s %{_libexecdir}/amanda/amandad %{buildroot}%{_sbindir}/amandad
|
||||
ln -s amrecover.8.gz %{buildroot}%{_mandir}/man8/amoldrecover.8
|
||||
|
||||
pushd %{buildroot}
|
||||
mv .%{_localstatedir}/lib/amanda/example .%{_sysconfdir}/amanda/%defconfig
|
||||
cp ${RPM_SOURCE_DIR}/amanda.crontab .%{_sysconfdir}/amanda/crontab.sample
|
||||
cp ${RPM_SOURCE_DIR}/disklist .%{_sysconfdir}/amanda/%defconfig
|
||||
rm -f .%{_sysconfdir}/amanda/%defconfig/xinetd*
|
||||
rm -f .%{_sysconfdir}/amanda/%defconfig/inetd*
|
||||
mkdir -p .%{_localstatedir}/lib/amanda/gnutar-lists
|
||||
mkdir -p .%{_localstatedir}/lib/amanda/%defconfig/index
|
||||
touch .%{_localstatedir}/lib/amanda/amandates
|
||||
popd
|
||||
|
||||
rm -rf %{buildroot}%{_datadir}/amanda
|
||||
%delete_la_and_a
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%pre
|
||||
%{_sbindir}/useradd -M -N -g %amanda_group -o -r -d %{_localstatedir}/lib/amanda -s /bin/bash \
|
||||
-c "Amanda user" -u 33 %amanda_user >/dev/null 2>&1 || :
|
||||
%{_sbindir}/gpasswd -a %amanda_user tape >/dev/null 2>&1 || :
|
||||
|
||||
%post
|
||||
%{?ldconfig}
|
||||
%systemd_post amanda.socket amanda-udp.socket kamanda.socket
|
||||
|
||||
%preun
|
||||
%systemd_preun amanda.socket amanda-udp.socket kamanda.socket
|
||||
|
||||
%postun
|
||||
%{?ldconfig}
|
||||
%systemd_postun_with_restart amanda.socket amanda-udp.socket kamanda.socket
|
||||
%ldconfig_scriptlets client server
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%license COPYRIGHT
|
||||
%doc AUTHORS README
|
||||
%dir %{_sysconfdir}/amanda/
|
||||
%{_sysconfdir}/amanda/amanda-security.conf
|
||||
%config(noreplace) %{_sysconfdir}/amanda/%defconfig/*
|
||||
%config(noreplace) %{_sysconfdir}/amanda/crontab.sample
|
||||
%attr(0644, root, root) %config(noreplace) %{_sysconfdir}/amanda-security.conf
|
||||
|
||||
%{_sbindir}/*
|
||||
%{_libdir}/*.so
|
||||
%dir %{_libexecdir}/amanda
|
||||
%{_libexecdir}/amanda/*
|
||||
%attr(4750,root,%amanda_group) %{_libexecdir}/amanda/runtar
|
||||
%attr(4750,root,%amanda_group) %{_libexecdir}/amanda/ambind
|
||||
%attr(4750,root,%amanda_group) %{_libexecdir}/amanda/rundump
|
||||
%attr(4750,root,%amanda_group) %{_libexecdir}/amanda/calcsize
|
||||
%attr(4750,root,%amanda_group) %{_libexecdir}/amanda/killpgrp
|
||||
%attr(4750,root,%amanda_group) %{_libexecdir}/amanda/application/amgtar
|
||||
%attr(4750,root,%amanda_group) %{_libexecdir}/amanda/application/amstar
|
||||
%attr(4750,root,%amanda_group) %{_libexecdir}/amanda/application/ambsdtar
|
||||
|
||||
%{_unitdir}/*.socket
|
||||
%{_unitdir}/*.service
|
||||
%{perl_vendorarch}/Amanda/
|
||||
%{perl_vendorarch}/auto/Amanda/
|
||||
|
||||
%attr(02770,%amanda_user,%amanda_group) %dir /var/log/amanda
|
||||
%attr(02770,%amanda_user,%amanda_group) %dir /var/log/amanda/amandad
|
||||
%attr(-,%amanda_user,%amanda_group) %dir %{_localstatedir}/lib/amanda/
|
||||
%attr(-,%amanda_user,%amanda_group) %dir %{_localstatedir}/lib/amanda/%defconfig/
|
||||
%attr(-,%amanda_user,%amanda_group) %dir %{_localstatedir}/lib/amanda/%defconfig/index
|
||||
%attr(-,%amanda_user,%amanda_group) %dir %{_localstatedir}/lib/amanda/template.d
|
||||
%attr(-,%amanda_user,%amanda_group) %config(noreplace) %{_localstatedir}/lib/amanda/template.d/*
|
||||
%attr(-,%amanda_user,%amanda_group) %{_localstatedir}/lib/amanda/gnutar-lists/
|
||||
%attr(-,%amanda_user,%amanda_group) %config(noreplace) %{_localstatedir}/lib/amanda/amandates
|
||||
|
||||
%files help
|
||||
%defattr(-,root,root)
|
||||
%doc NEWS
|
||||
%{_mandir}/man*
|
||||
|
||||
%changelog
|
||||
* Fri Feb 14 2020 gulining<gulining1@huawei.com> - 3.5.1-17
|
||||
- Package init
|
||||
9
amanda@.service
Normal file
9
amanda@.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Amanda Backup System
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
User=amandabackup
|
||||
Group=disk
|
||||
ExecStart=/usr/sbin/amandad -auth=bsdtcp amdump amindexd amidxtaped
|
||||
StandardInput=socket
|
||||
9
kamanda.socket
Normal file
9
kamanda.socket
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Amanda Kerberos Activation Socket
|
||||
|
||||
[Socket]
|
||||
ListenStream=10082
|
||||
Accept=true
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
9
kamanda@.service
Normal file
9
kamanda@.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Amanda Backup System
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Group=disk
|
||||
ExecStart=/usr/sbin/amandad -auth=krb5 amdump amindexd amidxtaped
|
||||
StandardInput=socket
|
||||
36
killpgrp.8
Normal file
36
killpgrp.8
Normal file
@ -0,0 +1,36 @@
|
||||
.\" This file is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
|
||||
.\" the GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this file; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
.\" MA 02111-1307 USA
|
||||
.\"
|
||||
.\" HISTORY:
|
||||
.\" 2006-05-16, created by Rodrigo Rubira Branco <rrbranco@br.ibm.com>
|
||||
.TH killpgrp 8 "May 16, 2006" "User Manuals" "User Manuals"
|
||||
.SH NAME
|
||||
killpgrp \- kill all processes in the same process group
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
.fam C
|
||||
\fBkillpgrp\fP
|
||||
.fam T
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Kills all processes in its process group when a process group leader is killed.
|
||||
.PP
|
||||
This program needs to be called by the client uid defined in amanda, and is used to kill VDUMP, VXDUMP, and XFSDUMP in a safe manner. It is called by sendsize, the amanda client software.
|
||||
.PP
|
||||
killpgrp send a SIGTERM to all processes in its process group. If a process in the group does not exit after three seconds
|
||||
and does not answer, killpgp will send a SIGKILL.
|
||||
.SH OPTIONS
|
||||
\fBkillpgrp\fP takes no arguments.
|
||||
.SH SECURITY
|
||||
\fBkillpgrp\fP needs to be setuid root unless amanda is compiled with DONT_SUID_ROOT.
|
||||
.SH SEE ALSO
|
||||
\fBamanda\fP(8)
|
||||
.SH AUTHOR
|
||||
Manpage written by Rodrigo Rubira Branco <rrbranco@br.ibm.com>
|
||||
100
patch-tirpc
Normal file
100
patch-tirpc
Normal file
@ -0,0 +1,100 @@
|
||||
diff --git a/config/amanda/amanda_configure.m4 b/config/amanda/amanda_configure.m4
|
||||
index 5b427ae..f90810f 100644
|
||||
--- a/config/amanda/amanda_configure.m4
|
||||
+++ b/config/amanda/amanda_configure.m4
|
||||
@@ -18,7 +18,6 @@ AC_PREREQ(2.64)
|
||||
# Take care of some early Amanda-specific setup
|
||||
#
|
||||
AMANDA_CONFIGURE_ARGS
|
||||
-AMANDA_INIT_SUMMARY
|
||||
AMANDA_SNAPSHOT_STAMP
|
||||
AMANDA_SPLIT_VERSION
|
||||
AMANDA_CONFIG_LOCAL
|
||||
diff --git a/config/amanda/components.m4 b/config/amanda/components.m4
|
||||
index f2a07db..7628453 100644
|
||||
--- a/config/amanda/components.m4
|
||||
+++ b/config/amanda/components.m4
|
||||
@@ -186,7 +186,21 @@ AC_DEFUN([AMANDA_WITHOUT_NDMP], [
|
||||
n | no) WANT_NDMP=false;;
|
||||
*) AC_MSG_ERROR([You must not supply an argument to --with-ndmp option.]) ;;
|
||||
esac
|
||||
- ])
|
||||
+ ])
|
||||
+ AC_CHECK_HEADERS(rpc/rpc.h, HAVE_RPC_RPC_H=1)
|
||||
+ if test x"$WANT_NDMP" = x"true"; then
|
||||
+ if test x"$HAVE_RPC_RPC_H" = x"1"; then
|
||||
+ WANT_NDMP=true
|
||||
+ else
|
||||
+ AMANDA_CHECK_TIRPC
|
||||
+ if test x"$HAVE_RPC_RPC_H" = x"1"; then
|
||||
+ WANT_NDMP=true
|
||||
+ else
|
||||
+ WANT_NDMP=false
|
||||
+ AMANDA_MSG_WARN([Disabling NDMP because rpc/rpc.h is not found])
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
])
|
||||
|
||||
# SYNOPSIS
|
||||
diff --git a/config/amanda/libs.m4 b/config/amanda/libs.m4
|
||||
index 0388c9b..a640557 100644
|
||||
--- a/config/amanda/libs.m4
|
||||
+++ b/config/amanda/libs.m4
|
||||
@@ -183,6 +183,44 @@ AC_DEFUN([AMANDA_CHECK_GLIB], [
|
||||
AMANDA_ADD_LIBS($GLIB_LIBS)
|
||||
])
|
||||
|
||||
+# SYNOPSIS
|
||||
+#
|
||||
+# AMANDA_CHECK_TIRPC
|
||||
+#
|
||||
+# OVERVIEW
|
||||
+#
|
||||
+# Search for tirpc.
|
||||
+#
|
||||
+AC_DEFUN([AMANDA_CHECK_TIRPC],
|
||||
+[
|
||||
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, [], $LOCSYSPATH:/opt/csw/bin:/usr/local/bin:/opt/local/bin)
|
||||
+
|
||||
+ tirpc_ld_flags=`$PKG_CONFIG libtirpc --libs-only-L 2>/dev/null`
|
||||
+ tirpc_lib_flags=`$PKG_CONFIG libtirpc --libs-only-l --libs-only-other 2>/dev/null`
|
||||
+ tirpc_cppflags=`$PKG_CONFIG libtirpc --cflags-only-I 2>/dev/null`
|
||||
+ tirpc_cflags=`$PKG_CONFIG libtirpc --cflags-only-other 2>/dev/null`
|
||||
+
|
||||
+ _libtirpc_save_cppflags=$CPPFLAGS
|
||||
+ CPPFLAGS="$CPPFLAGS $tirpc_cppflags"
|
||||
+ _libtirpc_save_libs=$LIBS
|
||||
+ LIBS="$LIBS $tirpc_lib_flags"
|
||||
+
|
||||
+ unset HAVE_RPC_RPC_H
|
||||
+ unset ac_cv_header_rpc_rpc_h
|
||||
+ AC_CHECK_HEADERS(rpc/rpc.h, HAVE_RPC_RPC_H=1)
|
||||
+
|
||||
+ CPPFLAGS=$_libtirpc_save_cppflags
|
||||
+ LIBS=$_libtirpc_save_libs
|
||||
+
|
||||
+ if test x"$HAVE_RPC_RPC_H" = x"1"; then
|
||||
+ AMANDA_ADD_LDFLAGS($tirpc_ld_flags)
|
||||
+ AMANDA_ADD_LIBS($tirpc_lib_flags)
|
||||
+
|
||||
+ AMANDA_ADD_CPPFLAGS($tirpc_cppflags)
|
||||
+ AMANDA_ADD_CFLAGS($tirpc_cflags)
|
||||
+ fi
|
||||
+])
|
||||
+
|
||||
# LIBCURL_CHECK_CONFIG is from the libcurl
|
||||
# distribution and licensed under the BSD license:
|
||||
# Copyright (c) 1996 - 2007, Daniel Stenberg, <daniel@haxx.se>.
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 89c4890..8d325b7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -13,6 +13,7 @@ AMANDA_VERSION
|
||||
gl_EARLY
|
||||
gl_INIT
|
||||
|
||||
+AMANDA_INIT_SUMMARY
|
||||
AMANDA_CONFIGURE
|
||||
|
||||
AC_DEFINE([USE_GETTEXT], 1, [Define to 1 if files will be processed with gettextize])
|
||||
Loading…
x
Reference in New Issue
Block a user