parent
09ab174a62
commit
8ff9333ae2
Binary file not shown.
Binary file not shown.
@ -0,0 +1,8 @@
|
||||
# Copyright 2019-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit acct-group
|
||||
|
||||
ACCT_GROUP_ID=362
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>robbat2@gentoo.org</email>
|
||||
<name>Robin H. Johnson</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>lists@xunil.at</email>
|
||||
<name>Stefan G. Weichinger</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>dustin@v.igoro.us</email>
|
||||
<description>Upstream. Please CC on bugs.</description>
|
||||
<name>Dustin J. Mitchell</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>c@roessner.co</email>
|
||||
<name>Christian Roessner</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>mschiff@gentoo.org</email>
|
||||
<name>Marc Schiffbauer</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,8 @@
|
||||
# Copyright 2019-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit acct-group
|
||||
|
||||
ACCT_GROUP_ID=363
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>bkohler@gentoo.org</email>
|
||||
<name>Ben Kohler</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,9 @@
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit acct-group
|
||||
|
||||
DESCRIPTION="Group for Unifi Video"
|
||||
ACCT_GROUP_ID=348
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>bkohler@gentoo.org</email>
|
||||
<name>Ben Kohler</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,9 @@
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit acct-group
|
||||
|
||||
DESCRIPTION="Group for uShare"
|
||||
ACCT_GROUP_ID=349
|
Binary file not shown.
@ -0,0 +1,12 @@
|
||||
# Copyright 2019-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit acct-user
|
||||
|
||||
ACCT_USER_ID=362
|
||||
ACCT_USER_GROUPS=( "${PN}" )
|
||||
ACCT_USER_HOME=/var/spool/amanda
|
||||
|
||||
acct-user_add_deps
|
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>robbat2@gentoo.org</email>
|
||||
<name>Robin H. Johnson</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>lists@xunil.at</email>
|
||||
<name>Stefan G. Weichinger</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>dustin@v.igoro.us</email>
|
||||
<description>Upstream. Please CC on bugs.</description>
|
||||
<name>Dustin J. Mitchell</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>c@roessner.co</email>
|
||||
<name>Christian Roessner</name>
|
||||
</maintainer>
|
||||
<maintainer type="person">
|
||||
<email>mschiff@gentoo.org</email>
|
||||
<name>Marc Schiffbauer</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,11 @@
|
||||
# Copyright 2019-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit acct-user
|
||||
|
||||
ACCT_USER_ID=363
|
||||
ACCT_USER_GROUPS=( "${PN}" )
|
||||
|
||||
acct-user_add_deps
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>bkohler@gentoo.org</email>
|
||||
<name>Ben Kohler</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,12 @@
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit acct-user
|
||||
|
||||
DESCRIPTION="User for Unifi Video"
|
||||
ACCT_USER_ID=348
|
||||
ACCT_USER_GROUPS=( unifi-video )
|
||||
|
||||
acct-user_add_deps
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>bkohler@gentoo.org</email>
|
||||
<name>Ben Kohler</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,12 @@
|
||||
# Copyright 2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit acct-user
|
||||
|
||||
DESCRIPTION="User for uShare"
|
||||
ACCT_USER_ID=349
|
||||
ACCT_USER_GROUPS=( ushare )
|
||||
|
||||
acct-user_add_deps
|
Binary file not shown.
@ -0,0 +1,11 @@
|
||||
--- a/src/eb.h
|
||||
+++ b/src/eb.h
|
||||
@@ -287,7 +287,7 @@ extern char *sslCerts; /* ssl certificates to validate the secure server */
|
||||
extern int verifyCertificates; /* is a certificate required for the ssl connection? */
|
||||
extern int displayLength; // when printing a line
|
||||
extern int formatLineLength; // when formatting html
|
||||
-bool formatOverflow;
|
||||
+extern bool formatOverflow;
|
||||
extern int webTimeout, mailTimeout;
|
||||
extern uchar browseLocal;
|
||||
extern bool sqlPresent; /* Was edbrowse compiled with SQL built in? */
|
@ -0,0 +1,23 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -249,19 +249,7 @@ if (UNIX)
|
||||
endif()
|
||||
# copy to build dir
|
||||
configure_file( ${UnixManFile} ${CMAKE_BINARY_DIR}/edbrowse.1 )
|
||||
- # find 'gzip' - warn if not...
|
||||
- find_program(GZIP_EXE gzip PATHS /bin )
|
||||
- if (GZIP_EXE)
|
||||
- # gzip it in place
|
||||
- execute_process(COMMAND ${GZIP_EXE} -f "edbrowse.1"
|
||||
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
- INPUT_FILE edbrowse.1
|
||||
- OUTPUT_FILE edbrowse.1.gz )
|
||||
- # install it
|
||||
- install(FILES ${CMAKE_BINARY_DIR}/edbrowse.1.gz DESTINATION ${UnixManDir})
|
||||
- else ()
|
||||
- message(WARNING "Unable to locate 'gzip'! No man page...")
|
||||
- endif ()
|
||||
+ install(FILES ${CMAKE_BINARY_DIR}/edbrowse.1 DESTINATION ${UnixManDir})
|
||||
# install user guide
|
||||
install(FILES doc/usersguide.html doc/usersguide_fr.html doc/sample.ebrc doc/sample_fr.ebrc doc/sample_it.ebrc DESTINATION ${UnixDocDir})
|
||||
endif ()
|
Binary file not shown.
@ -1 +1 @@
|
||||
DIST cdist-6.9.2.tar.gz 1358442 BLAKE2B c734e25e4ce32fcc1f8aef105d56e12a11906a9a031ce399d48a5f3c62ef05153e8fad231e8e2316fc860b66a10bc29a9ee42077947b00acc8ea7010ff41a0fe SHA512 7ff8274b1ac5fd4abac691991ab89613e39fd4170bd7580c1519b9a5ea7dac9ab933fd00a5b72306cc5c2307f4d24745cdd77ec9c21c02b3595796b8639019b1
|
||||
DIST cdist-6.9.3.tar.gz 1358492 BLAKE2B 04ec577629924b0a4356bfc44f0fbd3c7c8f0f15197b2fe8a62cde8e2089865a06c4d49366870be712bf0bc5d8f5c47f8c5ee3af602186ecef2c33e15af1b762 SHA512 3588cb7b98c78ff1671f1932474fd9c43e06ce075cfb0fa777903687f5ea84e7382da6014ea6230edad290de5175e3f000ea487831f1584b7efd4c97b8758dc2
|
||||
|
@ -1,10 +0,0 @@
|
||||
[Unit]
|
||||
Description=Machine Check Exception Logging Daemon
|
||||
After=syslog.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/sbin/mcelog --ignorenodev --daemon --foreground
|
||||
StandardOutput=syslog
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,58 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit linux-info systemd toolchain-funcs
|
||||
|
||||
DESCRIPTION="A tool to log and decode Machine Check Exceptions"
|
||||
HOMEPAGE="http://mcelog.org/"
|
||||
SRC_URI="https://github.com/andikleen/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="selinux"
|
||||
|
||||
RDEPEND="selinux? ( sec-policy/selinux-mcelog )"
|
||||
|
||||
# TODO: add mce-inject to the tree to support test phase
|
||||
RESTRICT="test"
|
||||
|
||||
pkg_pretend() {
|
||||
if [[ ${MERGE_TYPE} != buildonly ]]; then
|
||||
local CONFIG_CHECK="~X86_MCE"
|
||||
kernel_is -ge 4 12 && CONFIG_CHECK+=" ~X86_MCELOG_LEGACY"
|
||||
check_extra_config
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
eapply "${FILESDIR}"/${PN}-0.8_pre1-timestamp-${PN}.patch \
|
||||
"${FILESDIR}"/${PN}-129-debugflags.patch
|
||||
eapply_user
|
||||
tc-export CC
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
insinto /etc/cron.daily
|
||||
newins ${PN}.cron ${PN}
|
||||
|
||||
insinto /etc/logrotate.d/
|
||||
newins ${PN}.logrotate ${PN}
|
||||
|
||||
newinitd "${FILESDIR}"/${PN}.init-r1 ${PN}
|
||||
systemd_dounit "${FILESDIR}"/${PN}.service
|
||||
|
||||
dodoc *.pdf
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "The default configuration set is now installed in /etc/${PN}"
|
||||
einfo "you might want to edit those files."
|
||||
einfo
|
||||
einfo "A sample cronjob is installed into /etc/cron.daily"
|
||||
einfo "without executable bit (system service is the preferred method now)"
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST ps_mem-3.13.tar.gz 18331 BLAKE2B a0689a98597e02a63cc83188e717421bf873b9202c0f524165ffc838fd438c539209c2f4e6561226bda8c6f85364707d29d13519d6d3e53a6d34cb39378d2de1 SHA512 bf5affaede5f052cc878d46ef81186511a1e8f5939cd7e8560ab2df9faf4dc31566cb4172d956cdcf1e6fc5586ba3458ba1011aee3720f6b7eeb3cf40b4f90dc
|
||||
DIST ps_mem-3.13_p20200417.tar.gz 18472 BLAKE2B 43e04d0357458107fb25600024243baaec703124fc58a819c011c847a52ad6fb7384ef38a5aa965e3ae88288cca6c76a15819466839eb729a63c4492eaa4ec0d SHA512 9694cec5d696a42dfe2f60dd024f541283e2f52aafb499ee2e551574133262bb0fc4bf6eb0e7075fb1b129aff6cd8fe6968f411f56ee1d31eb6f9aebff2d9852
|
||||
|
@ -1,28 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
PYTHON_COMPAT=( python3_{6,7,8} )
|
||||
DISTUTILS_SINGLE_IMPL=1
|
||||
inherit distutils-r1 vcs-snapshot
|
||||
|
||||
COMMIT="9f54e1aa3a87ec176ce8b71f02673e0d8293b344"
|
||||
|
||||
DESCRIPTION="A utility to report core memory usage per program"
|
||||
HOMEPAGE="https://github.com/pixelb/ps_mem"
|
||||
SRC_URI="https://github.com/pixelb/${PN}/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 sparc x86"
|
||||
IUSE=""
|
||||
|
||||
python_install() {
|
||||
distutils-r1_python_install --install-scripts="${EPREFIX}/usr/sbin"
|
||||
}
|
||||
|
||||
python_install_all() {
|
||||
distutils-r1_python_install_all
|
||||
doman ${PN}.1
|
||||
}
|
Binary file not shown.
@ -1,3 +1,2 @@
|
||||
DIST file-roller-3.32.4.tar.xz 854444 BLAKE2B 04264e64af8ab4376fa6985683b16be7fef730a4e24044f726933b885aaaa6b630f347a256b09c2ce6183d0a0a392b33b4328715bf6d19cf7128c1980f9f4792 SHA512 16b5ddbdeacf4e9e61265ecff05e8f2e0034147c67ae7355d2442f9b26098ff253d24cb34c8e686c2ac031da6acac8e1e3c8a9f978e1eb2b446b1e045babafc7
|
||||
DIST file-roller-3.36.3.tar.xz 870608 BLAKE2B 4c57b99f2ca0eb4db3fac0216b63207d1664829ee54e21eb976a327bd65aec5abfd2a02b84bc80246fde131ede6ff63deaf8b63451db6a0fecc0121c8bce1a5b SHA512 41558ca8061276b1248fd3599e856051dcd69ca831fb4d8a33666dc373b4abed56e7ef204a6e041ceace05ea7234448d15bc7be8c48dc1809ac6d445de251370
|
||||
DIST file-roller-3.38.0.tar.xz 877960 BLAKE2B af1c4800e24adfb36a8f8f108740f9cad14bcd40f797b2430d00e428d723587de75be03848aca612536cee768b6b372534e0b6a322dc40d7ab1c41eef540916b SHA512 9c2e3c105397bceb08e30c9796b9242633fe49772aed2e7f67461c34a51be1493e922301b1fc29bdcb0fa50d220f4a7db2ee7642f629007ce2bef00334d7110e
|
||||
|
@ -1,96 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
inherit gnome.org gnome2-utils meson readme.gentoo-r1 xdg
|
||||
|
||||
DESCRIPTION="Archive manager for GNOME"
|
||||
HOMEPAGE="https://wiki.gnome.org/Apps/FileRoller"
|
||||
|
||||
LICENSE="GPL-2+ CC-BY-SA-3.0"
|
||||
SLOT="0"
|
||||
IUSE="libnotify nautilus packagekit"
|
||||
KEYWORDS="~alpha amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
# gdk-pixbuf used extensively in the source
|
||||
# cairo used in eggtreemultidnd.c
|
||||
# pango used in fr-window
|
||||
RDEPEND="
|
||||
>=app-arch/libarchive-3:=
|
||||
>=dev-libs/glib-2.36:2
|
||||
>=dev-libs/json-glib-0.14
|
||||
>=x11-libs/gtk+-3.13.2:3
|
||||
x11-libs/cairo
|
||||
x11-libs/gdk-pixbuf:2
|
||||
x11-libs/pango
|
||||
libnotify? ( >=x11-libs/libnotify-0.4.3:= )
|
||||
nautilus? ( >=gnome-base/nautilus-2.22.2 )
|
||||
packagekit? ( app-admin/packagekit-base )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
dev-util/glib-utils
|
||||
dev-util/itstool
|
||||
>=sys-devel/gettext-0.19.8
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
DISABLE_AUTOFORMATTING="yes"
|
||||
DOC_CONTENTS="
|
||||
${PN} is a frontend for several archiving utilities. If you want a
|
||||
particular archive format support, see ${HOMEPAGE}
|
||||
and install the relevant package. For example:
|
||||
7-zip - app-arch/p7zip
|
||||
ace - app-arch/unace
|
||||
arj - app-arch/arj
|
||||
brotli - app-arch/brotli
|
||||
cpio - app-arch/cpio
|
||||
deb - app-arch/dpkg
|
||||
iso - app-cdr/cdrtools
|
||||
jar,zip - app-arch/zip and app-arch/unzip
|
||||
lha - app-arch/lha
|
||||
lzop - app-arch/lzop
|
||||
lz4 - app-arch/lz4
|
||||
rar - app-arch/unrar or app-arch/unar
|
||||
rpm - app-arch/rpm
|
||||
unstuff - app-arch/stuffit
|
||||
zoo - app-arch/zoo"
|
||||
|
||||
PATCHES=(
|
||||
# https://gitlab.gnome.org/GNOME/file-roller/merge_requests/31
|
||||
"${FILESDIR}"/${PN}-3.32.4-fno-common.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
# File providing Gentoo package names for various archivers
|
||||
cp -v "${FILESDIR}"/3.32-packages.match data/packages.match || die
|
||||
|
||||
xdg_src_prepare
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local emesonargs=(
|
||||
-Drun-in-place=false
|
||||
$(meson_use nautilus nautilus-actions)
|
||||
$(meson_use libnotify notification)
|
||||
$(meson_use packagekit)
|
||||
-Dlibarchive=true
|
||||
)
|
||||
meson_src_configure
|
||||
}
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
readme.gentoo_create_doc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
gnome2_schemas_update
|
||||
readme.gentoo_print_elog
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
gnome2_schemas_update
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
[Package Matches]
|
||||
arj=app-arch/arj
|
||||
binutils=sys-devel/binutils
|
||||
brotli=app-arch/brotli
|
||||
bzip2=app-arch/bzip2
|
||||
cpio=app-arch/cpio
|
||||
dpkg=app-arch/dpkg
|
||||
genisoimage=app-cdr/cdrtools
|
||||
gzip=app-arch/gzip
|
||||
lha=app-arch/lha
|
||||
lrzip=app-arch/lrzip
|
||||
lz4=app-arch/lz4
|
||||
lzip=app-arch/lzip
|
||||
lzma=app-arch/xz-utils
|
||||
lzop=app-arch/lzop
|
||||
ncompress=app-arch/ncompress
|
||||
p7zip=app-arch/p7zip
|
||||
p7zip-full=
|
||||
p7zip-rar=
|
||||
rar=app-arch/rar
|
||||
rpm=app-arch/rpm
|
||||
rzip=app-arch/rzip
|
||||
zip=app-arch/zip
|
||||
zoo=app-arch/zoo
|
||||
tar=app-arch/tar
|
||||
unace=app-arch/unace
|
||||
unalz=
|
||||
unarchiver=app-arch/unar
|
||||
unrar=app-arch/unrar
|
||||
unsquashfs=sys-fs/squashfs-tools
|
||||
unstaff=
|
||||
unzip=app-arch/unzip
|
||||
xz=app-arch/xz-utils
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 55fa0fb287e7fb7cee336cac0a6c1a94e505dc84 Mon Sep 17 00:00:00 2001
|
||||
From: David Seifert <soap@gentoo.org>
|
||||
Date: Wed, 19 Feb 2020 13:18:18 +0100
|
||||
Subject: [PATCH] Fix compiling with GCC 10
|
||||
|
||||
* GCC 10 defaults to `-fno-common`.
|
||||
|
||||
Bug: https://bugs.gentoo.org/706728
|
||||
---
|
||||
src/fr-application.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/fr-application.c b/src/fr-application.c
|
||||
index c148c4f9..00ebe552 100644
|
||||
--- a/src/fr-application.c
|
||||
+++ b/src/fr-application.c
|
||||
@@ -42,7 +42,6 @@
|
||||
#define SERVICE_TIMEOUT 10
|
||||
|
||||
|
||||
-gint ForceDirectoryCreation;
|
||||
static char **remaining_args;
|
||||
static char *arg_add_to = NULL;
|
||||
static int arg_add = FALSE;
|
||||
--
|
||||
2.25.1
|
||||
|
Binary file not shown.
@ -1,487 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools perl-module user systemd toolchain-funcs
|
||||
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline:=
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
dev-lang/perl:=
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
dev-perl/JSON
|
||||
dev-perl/Encode-Locale
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba:= )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
!minimal? (
|
||||
dev-perl/XML-Simple
|
||||
virtual/mailx
|
||||
app-arch/mt-st:=
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
dev-lang/swig
|
||||
"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
|
||||
[[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
|
||||
[[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
|
||||
[[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
|
||||
[[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
|
||||
[[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
|
||||
[[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
|
||||
[[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
default_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
|
||||
|
||||
# bug with glibc-2.16.0
|
||||
sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}" || die
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-server.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
else
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
fi
|
||||
|
||||
eapply "${FILESDIR}"/${P}-slots.patch || die
|
||||
eapply "${FILESDIR}"/${P}-labelstr.patch || die
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
|
||||
myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} $(use_with kerberos krb5-security)"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perl_set_version
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
# bug #483120
|
||||
tc-export AR
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
default_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
einfo "Installing systemd service and socket files for Amanda"
|
||||
systemd_dounit "${FILESDIR}"/amanda.socket || die
|
||||
systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
/etc/amanda
|
||||
|
||||
if ! use minimal ; then
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
fi
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perl_set_version
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "systemd-users: enable and start amanda.socket or the relevant services"
|
||||
elog "regarding what auth method you use."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
elog "The only exception is when you use the authentication method 'local'."
|
||||
elog
|
||||
elog "Please note that this package no longer explicitly depends on"
|
||||
elog "virtual/inetd, as it supports modes where an inetd is not needed"
|
||||
elog "(see bug #506028 for details)."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
||||
|
||||
# We do not want the perl-module tests.
|
||||
src_test() {
|
||||
default_src_test
|
||||
}
|
@ -1,484 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools perl-module user systemd toolchain-funcs
|
||||
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline:=
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
dev-lang/perl:=
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
dev-perl/JSON
|
||||
dev-perl/Encode-Locale
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba:= )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
!minimal? (
|
||||
dev-perl/XML-Simple
|
||||
virtual/mailx
|
||||
app-arch/mt-st:=
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
dev-lang/swig
|
||||
"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
|
||||
[[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
|
||||
[[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
|
||||
[[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
|
||||
[[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
|
||||
[[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
|
||||
[[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
|
||||
[[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
default_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
|
||||
|
||||
# bug with glibc-2.16.0
|
||||
sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}" || die
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
else
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
|
||||
myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} $(use_with kerberos krb5-security)"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perl_set_version
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
# bug #483120
|
||||
tc-export AR
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
default_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
einfo "Installing systemd service and socket files for Amanda"
|
||||
systemd_dounit "${FILESDIR}"/amanda.socket || die
|
||||
systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
/etc/amanda
|
||||
|
||||
if ! use minimal ; then
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
fi
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perl_set_version
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "systemd-users: enable and start amanda.socket or the relevant services"
|
||||
elog "regarding what auth method you use."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
elog "The only exception is when you use the authentication method 'local'."
|
||||
elog
|
||||
elog "Please note that this package no longer explicitly depends on"
|
||||
elog "virtual/inetd, as it supports modes where an inetd is not needed"
|
||||
elog "(see bug #506028 for details)."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
||||
|
||||
# We do not want the perl-module tests.
|
||||
src_test() {
|
||||
default_src_test
|
||||
}
|
@ -1,484 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools perl-module user systemd toolchain-funcs
|
||||
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline:=
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
dev-lang/perl:=
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
dev-perl/JSON
|
||||
dev-perl/Encode-Locale
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba:= )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
!minimal? (
|
||||
dev-perl/XML-Simple
|
||||
virtual/mailx
|
||||
app-arch/mt-st:=
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
dev-lang/swig
|
||||
"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
|
||||
[[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
|
||||
[[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
|
||||
[[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
|
||||
[[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
|
||||
[[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
|
||||
[[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
|
||||
[[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
default_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
|
||||
|
||||
# bug with glibc-2.16.0
|
||||
sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}" || die
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
else
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
|
||||
myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} $(use_with kerberos krb5-security)"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perl_set_version
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
# bug #483120
|
||||
tc-export AR
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
default_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
einfo "Installing systemd service and socket files for Amanda"
|
||||
systemd_dounit "${FILESDIR}"/amanda.socket || die
|
||||
systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
/etc/amanda
|
||||
|
||||
if ! use minimal ; then
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
fi
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perl_set_version
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "systemd-users: enable and start amanda.socket or the relevant services"
|
||||
elog "regarding what auth method you use."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
elog "The only exception is when you use the authentication method 'local'."
|
||||
elog
|
||||
elog "Please note that this package no longer explicitly depends on"
|
||||
elog "virtual/inetd, as it supports modes where an inetd is not needed"
|
||||
elog "(see bug #506028 for details)."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
||||
|
||||
# We do not want the perl-module tests.
|
||||
src_test() {
|
||||
default_src_test
|
||||
}
|
@ -1,484 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools perl-module user systemd toolchain-funcs
|
||||
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline:=
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
dev-lang/perl:=
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
dev-perl/JSON
|
||||
dev-perl/Encode-Locale
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba:= )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
!minimal? (
|
||||
dev-perl/XML-Simple
|
||||
virtual/mailx
|
||||
app-arch/mt-st:=
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
dev-lang/swig
|
||||
"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
|
||||
[[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
|
||||
[[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
|
||||
[[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
|
||||
[[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
|
||||
[[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
|
||||
[[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
|
||||
[[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
default_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
|
||||
|
||||
# bug with glibc-2.16.0
|
||||
sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}" || die
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
else
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
|
||||
myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} $(use_with kerberos krb5-security)"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perl_set_version
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
# bug #483120
|
||||
tc-export AR
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
default_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
einfo "Installing systemd service and socket files for Amanda"
|
||||
systemd_dounit "${FILESDIR}"/amanda.socket || die
|
||||
systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
/etc/amanda
|
||||
|
||||
if ! use minimal ; then
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
fi
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perl_set_version
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "systemd-users: enable and start amanda.socket or the relevant services"
|
||||
elog "regarding what auth method you use."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
elog "The only exception is when you use the authentication method 'local'."
|
||||
elog
|
||||
elog "Please note that this package no longer explicitly depends on"
|
||||
elog "virtual/inetd, as it supports modes where an inetd is not needed"
|
||||
elog "(see bug #506028 for details)."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
||||
|
||||
# We do not want the perl-module tests.
|
||||
src_test() {
|
||||
default_src_test
|
||||
}
|
@ -1,484 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools perl-module user systemd toolchain-funcs
|
||||
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline:=
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
dev-lang/perl:=
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
dev-perl/JSON
|
||||
dev-perl/Encode-Locale
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba:= )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
!minimal? (
|
||||
dev-perl/XML-Simple
|
||||
virtual/mailx
|
||||
app-arch/mt-st:=
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
dev-lang/swig
|
||||
"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
|
||||
[[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
|
||||
[[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
|
||||
[[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
|
||||
[[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
|
||||
[[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
|
||||
[[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
|
||||
[[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
default_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
|
||||
|
||||
# bug with glibc-2.16.0
|
||||
sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}" || die
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
else
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
|
||||
myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} $(use_with kerberos krb5-security)"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perl_set_version
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
# bug #483120
|
||||
tc-export AR
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
default_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
einfo "Installing systemd service and socket files for Amanda"
|
||||
systemd_dounit "${FILESDIR}"/amanda.socket || die
|
||||
systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
/etc/amanda
|
||||
|
||||
if ! use minimal ; then
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
fi
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perl_set_version
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "systemd-users: enable and start amanda.socket or the relevant services"
|
||||
elog "regarding what auth method you use."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
elog "The only exception is when you use the authentication method 'local'."
|
||||
elog
|
||||
elog "Please note that this package no longer explicitly depends on"
|
||||
elog "virtual/inetd, as it supports modes where an inetd is not needed"
|
||||
elog "(see bug #506028 for details)."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
||||
|
||||
# We do not want the perl-module tests.
|
||||
src_test() {
|
||||
default_src_test
|
||||
}
|
@ -1,498 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools perl-module user systemd toolchain-funcs
|
||||
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal ndmp nls readline s3 samba systemd xfs"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline:=
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
dev-lang/perl:=
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
dev-perl/JSON
|
||||
dev-perl/Encode-Locale
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba:= )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
!minimal? (
|
||||
dev-perl/XML-Simple
|
||||
virtual/mailx
|
||||
app-arch/mt-st:=
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
dev-lang/swig
|
||||
"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_TAPE_DEVICE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[[ -z "${AMANDA_GROUP_GID}" ]] && AMANDA_GROUP_GID=87
|
||||
[[ -z "${AMANDA_GROUP_NAME}" ]] && AMANDA_GROUP_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_NAME}" ]] && AMANDA_USER_NAME=amanda
|
||||
[[ -z "${AMANDA_USER_UID}" ]] && AMANDA_USER_UID=87
|
||||
[[ -z "${AMANDA_USER_SH}" ]] && AMANDA_USER_SH=/bin/bash
|
||||
[[ -z "${AMANDA_USER_HOMEDIR}" ]] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[[ -z "${AMANDA_USER_GROUPS}" ]] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[[ -z "${AMANDA_SERVER}" ]] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE}" ]] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_SERVER_TAPE_DEVICE}" ]] && AMANDA_SERVER_TAPE_DEVICE="/dev/nst0"
|
||||
[[ -z "${AMANDA_SERVER_INDEX}" ]] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[[ -z "${AMANDA_TAR_LISTDIR}" ]] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[[ -z "${AMANDA_CONFIG_NAME}" ]] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[[ -z "${AMANDA_TMPDIR}" ]] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[[ -z "${AMANDA_DBGDIR}" ]] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[[ -z "${AMANDA_PORTS_UDP}" ]] && AMANDA_PORTS_UDP=
|
||||
[[ -z "${AMANDA_PORTS_TCP}" ]] && AMANDA_PORTS_TCP=
|
||||
[[ -z "${AMANDA_PORTS_BOTH}" ]] && AMANDA_PORTS_BOTH=
|
||||
[[ -z "${AMANDA_PORTS}" ]] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[[ -z "${AMANDA_TAR}" ]] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [[ -f "${EROOT}${ENVDIR}/${ENVDFILE}" ]]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${EROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval $(echo "${currentamanda}")
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
default_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am || die
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am || die
|
||||
|
||||
# bug with glibc-2.16.0
|
||||
sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h || die
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}" || die
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}" || die
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`" || die
|
||||
done
|
||||
|
||||
if use minimal; then
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
else
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1 > "${T}"/amandahosts || die
|
||||
fi
|
||||
|
||||
eapply_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_TAPE_DEVICE} for tape server."
|
||||
myconf="${myconf} --with-tape-device=${AMANDA_SERVER_TAPE_DEVICE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} $(use_with samba smbclient /usr/bin/smbclient)"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} $(use_with kerberos krb5-security)"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perl_set_version
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
# Bug #636262
|
||||
myconf="${myconf} $(use_with ndmp ndmp)"
|
||||
|
||||
# bug #483120
|
||||
tc-export AR
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
default_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
einfo "Installing systemd service and socket files for Amanda"
|
||||
systemd_dounit "${FILESDIR}"/amanda.socket
|
||||
systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service'
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
/etc/amanda
|
||||
|
||||
if ! use minimal ; then
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
fi
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes} || die
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/" || die
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perl_set_version
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -delete || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$MERGE_TYPE" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig" || die
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/" || die
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" || die
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "systemd-users: enable and start amanda.socket or the relevant services"
|
||||
elog "regarding what auth method you use."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
elog "The only exception is when you use the authentication method 'local'."
|
||||
elog
|
||||
elog "Please note that this package no longer explicitly depends on"
|
||||
elog "virtual/inetd, as it supports modes where an inetd is not needed"
|
||||
elog "(see bug #506028 for details)."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
local i
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
[ -e "${root}"/${i} ] || continue
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i} || die
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i} || die
|
||||
done
|
||||
|
||||
# amanda-security.conf is a config file with similar requirements:
|
||||
# writable only by root
|
||||
# world-readable
|
||||
# 3.3.9: introduced in /etc/amanda-security.conf
|
||||
# 3.4.2: moved to /etc/amanda/amanda-security.conf
|
||||
f=/etc/amanda/amanda-security.conf
|
||||
chown root:root "${root}""${f}" || die
|
||||
chmod u=rw,go=r "${root}""${f}" || die
|
||||
}
|
||||
|
||||
# We do not want the perl-module tests.
|
||||
src_test() {
|
||||
default_src_test
|
||||
}
|
@ -1,164 +0,0 @@
|
||||
diff --git a/installcheck/Amanda_Rest_Storages.pl b/installcheck/Amanda_Rest_Storages.pl
|
||||
index f3c699b..3e4e889 100644
|
||||
--- a/installcheck/Amanda_Rest_Storages.pl
|
||||
+++ b/installcheck/Amanda_Rest_Storages.pl
|
||||
@@ -308,6 +308,7 @@ is_deeply (Installcheck::Rest::remove_source_line($reply),
|
||||
'inventory' => [
|
||||
{'current' => 1,
|
||||
'label' => "DISKFLAT-001",
|
||||
+ 'label_match' => '1',
|
||||
'device_status' => '0',
|
||||
'reserved' => 0,
|
||||
'f_type' => '1',
|
||||
@@ -467,6 +468,7 @@ is_deeply (Installcheck::Rest::remove_source_line($reply),
|
||||
'label' => 'DISKFLAT-001',
|
||||
'datestamp' => '20140509113436',
|
||||
'write_protected' => '',
|
||||
+ 'label_match' => '1',
|
||||
'process' => 'Amanda::Rest::Storages',
|
||||
'running_on' => 'amanda-server',
|
||||
'component' => 'rest-server',
|
||||
diff --git a/installcheck/amtape.pl b/installcheck/amtape.pl
|
||||
index 1a3527f..700c5a2 100644
|
||||
--- a/installcheck/amtape.pl
|
||||
+++ b/installcheck/amtape.pl
|
||||
@@ -177,13 +177,13 @@ like($Installcheck::Run::stderr,
|
||||
ok(run('amtape', 'TESTCONF', 'show'),
|
||||
"'amtape TESTCONF show'");
|
||||
like($Installcheck::Run::stderr,
|
||||
- qr/slot +2:.*label MyTape\nslot +3/,
|
||||
+ qr/slot +2:.*label MyTape \(label do not match labelstr\)\nslot +3/,
|
||||
"'amtape TESTCONF show' ..result correct");
|
||||
|
||||
ok(run('amtape', 'TESTCONF', 'show', '2'),
|
||||
"'amtape TESTCONF show'");
|
||||
like($Installcheck::Run::stderr,
|
||||
- qr/^slot +2:.*label MyTape$/,
|
||||
+ qr/^slot +2:.*label MyTape \(label do not match labelstr\)$/,
|
||||
"'amtape TESTCONF show 2' ..result correct");
|
||||
|
||||
ok(run('amtape', 'TESTCONF', 'show', '1,3'),
|
||||
@@ -252,13 +252,13 @@ like(run_err('amtape', 'TESTCONF', 'update'),
|
||||
ok(run('amtape', 'TESTCONF', 'show'),
|
||||
"'amtape TESTCONF show'");
|
||||
like($Installcheck::Run::stderr,
|
||||
- qr/slot +2:.*label MyTape\nslot +3/,
|
||||
+ qr/slot +2:.*label MyTape \(label do not match labelstr\)\nslot +3/,
|
||||
"..result correct");
|
||||
|
||||
ok(run('amtape', 'TESTCONF', 'inventory'),
|
||||
"'amtape TESTCONF inventory'");
|
||||
like($Installcheck::Run::stdout,
|
||||
- qr/slot +1: blank\nslot +2: label MyTape \(current\)\nslot +3/,
|
||||
+ qr/slot +1: blank\nslot +2: label MyTape \(current\) \(label do not match labelstr\)\nslot +3/,
|
||||
"..result correct");
|
||||
|
||||
ok(run('amtape', 'TESTCONF', 'taper'),
|
||||
diff --git a/perl/Amanda/Changer.pm b/perl/Amanda/Changer.pm
|
||||
index 92ed9b6..4b4aad4 100644
|
||||
--- a/perl/Amanda/Changer.pm
|
||||
+++ b/perl/Amanda/Changer.pm
|
||||
@@ -60,9 +60,10 @@ sub local_message {
|
||||
} elsif ($self->{'code'} == 1100014) {
|
||||
return "$self->{'err'}";
|
||||
} elsif ($self->{'code'} == 1100015) {
|
||||
- return sprintf("slot %3s: date %-14s label %s%s", $self->{'slot'},
|
||||
+ return sprintf("slot %3s: date %-14s label %s%s%s", $self->{'slot'},
|
||||
$self->{'datestamp'}, $self->{'label'},
|
||||
- $self->{'write_protected'}?" (Write protected)":"");
|
||||
+ $self->{'write_protected'}?" (Write protected)":"",
|
||||
+ $self->{'label_match'}?"":" (label do not match labelstr)");
|
||||
} elsif ($self->{'code'} == 1100016) {
|
||||
return sprintf("slot %3s: unlabeled volume%s", $self->{'slot'},
|
||||
$self->{'write_protected'}?" (Write protected)":"");
|
||||
@@ -2014,6 +2015,13 @@ sub show {
|
||||
my $st = $dev->read_label();
|
||||
my $write_protected = !$dev->check_writable();
|
||||
if ($st == $DEVICE_STATUS_SUCCESS) {
|
||||
+ my $label_match = match_labelstr(
|
||||
+ $self->{'storage'}->{'labelstr'},
|
||||
+ $self->{'storage'}->{'autolabel'},
|
||||
+ $dev->volume_label(),
|
||||
+ $res->{'barcode'},
|
||||
+ $res->{'meta'},
|
||||
+ $self->{'storage'}->{'storage_name'});
|
||||
$params{'user_msg'}->(Amanda::Changer::Message->new(
|
||||
source_filename => __FILE__,
|
||||
source_line => __LINE__,
|
||||
@@ -2022,7 +2030,8 @@ sub show {
|
||||
slot => $last_slot,
|
||||
datestamp => $dev->volume_time(),
|
||||
label => $dev->volume_label(),
|
||||
- write_protected => $write_protected));
|
||||
+ write_protected => $write_protected,
|
||||
+ label_match => $label_match));
|
||||
} elsif ($st == $DEVICE_STATUS_VOLUME_UNLABELED) {
|
||||
$params{'user_msg'}->(Amanda::Changer::Message->new(
|
||||
source_filename => __FILE__,
|
||||
diff --git a/perl/Amanda/Rest/Storages.pm b/perl/Amanda/Rest/Storages.pm
|
||||
index 680115b..b1b59d2 100644
|
||||
--- a/perl/Amanda/Rest/Storages.pm
|
||||
+++ b/perl/Amanda/Rest/Storages.pm
|
||||
@@ -436,6 +436,17 @@ sub inventory {
|
||||
$inv->{'retention_type'} = $tl->get_retention_name($retention_type);
|
||||
}
|
||||
}
|
||||
+ for my $inv (@$inventory) {
|
||||
+ if ($inv->{label}) {
|
||||
+ $inv->{'label_match'} = Amanda::Util::match_labelstr(
|
||||
+ $storage->{'labelstr'},
|
||||
+ $storage->{'autolabel'},
|
||||
+ $inv->{'label'},
|
||||
+ $inv->{'barcode'},
|
||||
+ $inv->{'metae'},
|
||||
+ $storage->{'storage_name'});
|
||||
+ }
|
||||
+ }
|
||||
push @result_messages, Amanda::Changer::Message->new(
|
||||
source_filename => __FILE__,
|
||||
source_line => __LINE__,
|
||||
diff --git a/server-src/amtape.pl b/server-src/amtape.pl
|
||||
index b63607e..d06eefe 100644
|
||||
--- a/server-src/amtape.pl
|
||||
+++ b/server-src/amtape.pl
|
||||
@@ -30,7 +30,7 @@ use Text::Wrap;
|
||||
use Amanda::Device qw( :constants );
|
||||
use Amanda::Debug qw( :logging );
|
||||
use Amanda::Config qw( :init :getconf config_dir_relative );
|
||||
-use Amanda::Util qw( :constants );
|
||||
+use Amanda::Util qw( :constants match_labelstr );
|
||||
use Amanda::Storage;
|
||||
use Amanda::Changer;
|
||||
use Amanda::Constants;
|
||||
@@ -219,6 +219,7 @@ sub {
|
||||
for my $sl (@$inv) {
|
||||
my $line = "slot $sl->{slot}:";
|
||||
my $tle;
|
||||
+ my $meta;
|
||||
if ($sl->{'state'} == Amanda::Changer::SLOT_EMPTY) {
|
||||
$line .= " empty";
|
||||
} elsif (!defined($sl->{device_status}) && !defined($sl->{label})) {
|
||||
@@ -230,6 +231,7 @@ sub {
|
||||
if (defined $tle) {
|
||||
if ($tle->{'meta'}) {
|
||||
$line .= " ($tle->{'meta'})";
|
||||
+ $meta = $tle->{'meta'};
|
||||
}
|
||||
}
|
||||
} elsif ($sl->{'device_status'} == $DEVICE_STATUS_VOLUME_UNLABELED) {
|
||||
@@ -263,6 +265,15 @@ sub {
|
||||
$line .= " [device error]";
|
||||
}
|
||||
}
|
||||
+ if ($sl->{'label'}) {
|
||||
+ if (!match_labelstr($storage->{'labelstr'},
|
||||
+ $storage->{'autolabel'},
|
||||
+ $sl->{label},
|
||||
+ $sl->{'barcode'}, $meta,
|
||||
+ $storage->{'storage_name'})) {
|
||||
+ $line .= " (label do not match labelstr)";
|
||||
+ }
|
||||
+ }
|
||||
if (defined $tle) {
|
||||
my $retention_type = Amanda::Tapelist::get_retention_type($tle->{pool}, $tle->{label});
|
||||
$line .= " [" . $tl->get_retention_name($retention_type) . "]";
|
@ -1,16 +0,0 @@
|
||||
diff --git a/perl/Amanda/Changer/aggregate.pm b/perl/Amanda/Changer/aggregate.pm
|
||||
index a2bd962..ecf9d28 100644
|
||||
--- a/perl/Amanda/Changer/aggregate.pm
|
||||
+++ b/perl/Amanda/Changer/aggregate.pm
|
||||
@@ -391,7 +391,10 @@ sub info_key {
|
||||
my $kid = 0;
|
||||
for (@$kid_results) {
|
||||
my ($err, %kid_info) = @$_;
|
||||
- next unless exists($kid_info{'slots'});
|
||||
+ if (!exists($kid_info{'slots'})){
|
||||
+ $kid++;
|
||||
+ next;
|
||||
+ }
|
||||
my $kid_slots = $kid_info{'slots'};
|
||||
push @slots, map "$kid:$_", @{$kid_slots};
|
||||
$kid++;
|
@ -0,0 +1,13 @@
|
||||
diff --git a/common-src/testutils.h b/common-src/testutils.h
|
||||
index 31f8973..3bb376f 100644
|
||||
--- a/common-src/testutils.h
|
||||
+++ b/common-src/testutils.h
|
||||
@@ -75,7 +75,7 @@ typedef struct TestUtilsTest {
|
||||
#define tu_dbg(...) if (tu_debugging_enabled) { g_fprintf(stderr, __VA_ARGS__); }
|
||||
|
||||
/* Is debugging enabled for this test run? (set internally) */
|
||||
-int tu_debugging_enabled;
|
||||
+extern int tu_debugging_enabled;
|
||||
|
||||
/*
|
||||
* Main loop
|
@ -1,2 +1 @@
|
||||
DIST backupninja-1.0.1.tar.gz 167991 BLAKE2B 736ded9f562e894ec74e78afb9677f61889c18310b5aabe76dab7aafd550653281fc8641b416c022d49062261d67f8e6ed2aeef9c9b7054b3538c5be983bf424 SHA512 24b898526c1efa91cde6b1a0f0f7c0820c7db5b11ea36f458b45a91e94adfc77636421d7ad2245c196999886a06a3be43253e52654bc07423b1ac5571275c580
|
||||
DIST backupninja-backupninja_upstream-1.1.0.tar.gz 188991 BLAKE2B 0fb7b10b4a7e635ec29238590e1fae8778e3031cdcd906bb81c4fd97e3ddf083db0e063daadbdfd0c0efe6e2447a7704a25767f65f7229705dba8f8f64c2ee2b SHA512 bea1b024f5bb8d103618f942afa07a7677f0b1896cbef611c461ba586e98c4667112282aa57fdc195f899920072b9cde7cbf97dee7c332fff67df36bb5288f87
|
||||
|
@ -1,29 +0,0 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
inherit autotools
|
||||
|
||||
# This thing change with every release, how idiotic...
|
||||
NODE_NUMBER=275
|
||||
|
||||
DESCRIPTION="lightweight, extensible meta-backup system"
|
||||
HOMEPAGE="http://riseuplabs.org/backupninja/"
|
||||
SRC_URI="https://labs.riseup.net/code/attachments/download/${NODE_NUMBER}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
|
||||
RDEPEND="dev-util/dialog"
|
||||
DEPEND=""
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
mv configure.in configure.ac
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf --localstatedir=/var #578614
|
||||
}
|
Binary file not shown.
@ -0,0 +1,24 @@
|
||||
--- a/dvdisaster.h
|
||||
+++ b/dvdisaster.h
|
||||
@@ -425,9 +425,9 @@ typedef struct _CrcBlock
|
||||
*** forward declarations
|
||||
***/
|
||||
|
||||
-struct _RawBuffer *rawbuffer_forward;
|
||||
-struct _DefectiveSectorHeader *dsh_forward;
|
||||
-struct _DeviceHandle *dh_forward;
|
||||
+extern struct _RawBuffer *rawbuffer_forward;
|
||||
+extern struct _DefectiveSectorHeader *dsh_forward;
|
||||
+extern struct _DeviceHandle *dh_forward;
|
||||
|
||||
/***
|
||||
*** bitmap.c
|
||||
@@ -450,7 +450,7 @@ void FreeBitmap(Bitmap*);
|
||||
*** build.h
|
||||
***/
|
||||
|
||||
-int buildCount;
|
||||
+extern int buildCount;
|
||||
|
||||
/***
|
||||
*** cacheprobe.h
|
Binary file not shown.
@ -1,3 +1 @@
|
||||
DIST zulucrypt-5.1.0.tar.bz2 1610597 BLAKE2B 3b77676912f0cd8990ba307ff04309f308ec29cf76cad37ac28ebb317a7e42ee93ffe9deb1db12a80c4d5b235c2a83bc8e5ddeb6082e5f1be9d91425d06f4334 SHA512 b916d43f8c889f1593c506d95360b195f0639024463eb77b5b21b544468f99719b877d8c94725504305f307efe5cb18e203dc8f9b015bd55825dc1d4fffb42f0
|
||||
DIST zulucrypt-5.4.0.tar.bz2 1704452 BLAKE2B b0ef9e33b7261087b97186dd49672ea115c4792c04a64700cba5caa9c9e63d84818904c078a4d6663c6f420bbd19b0593af84210010821e2b8bae5f19947ffec SHA512 65361ef885b68a13f435704e0e1dbc9b7ae4df9525900ab60665c29e24574dcadb4afb27a7c595db33021c07086de92332f1a52189cfd674991b95e208040074
|
||||
DIST zulucrypt-5.4.0_pre20180223.tar.gz 2162535 BLAKE2B 7d098ec20b7f355be6ad863121f7016d6b1ccbcc133438b616cfbd805110b24ae91dc74b0c2daf3137511fcb72e0338663c3c743c6c3d2b761883c57c590c0e5 SHA512 38ea9442a48c02741e11e59759b745ce3d6d6ca5f37d8b685526be76308a8fa1f7db7fd38038e5ce50e2a8afd8740b0a683a3458cb1df6f0b70c41fbf8035c15
|
||||
DIST zulucrypt-5.5.0_pre20180223.tar.gz 2162535 BLAKE2B 7d098ec20b7f355be6ad863121f7016d6b1ccbcc133438b616cfbd805110b24ae91dc74b0c2daf3137511fcb72e0338663c3c743c6c3d2b761883c57c590c0e5 SHA512 38ea9442a48c02741e11e59759b745ce3d6d6ca5f37d8b685526be76308a8fa1f7db7fd38038e5ce50e2a8afd8740b0a683a3458cb1df6f0b70c41fbf8035c15
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- a/zuluCrypt-cli/bin/security.h
|
||||
+++ b/zuluCrypt-cli/bin/security.h
|
||||
@@ -35,7 +35,7 @@ extern "C" {
|
||||
* set the function to be called when an attempt to evelate or downgrade privileges fail
|
||||
* zuluCryptSecurityPrivilegeElevationError global variable is defined in security.c
|
||||
*/
|
||||
-void ( *zuluCryptSecurityPrivilegeElevationError )( const char * ) ;
|
||||
+extern void ( *zuluCryptSecurityPrivilegeElevationError )( const char * ) ;
|
||||
|
||||
void zuluCryptSecuritySetPrivilegeElevationErrorFunction( void ( * ) ( const char * ) ) ;
|
||||
|
@ -1,49 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit cmake-utils xdg
|
||||
|
||||
DESCRIPTION="Front end to cryptsetup"
|
||||
HOMEPAGE="https://mhogomchungu.github.io/zuluCrypt/"
|
||||
SRC_URI="https://github.com/mhogomchungu/zuluCrypt/releases/download/${PV}/zuluCrypt-${PV}.tar.bz2 -> ${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="gnome kwallet +qt5 udev"
|
||||
|
||||
REQUIRED_USE="kwallet? ( qt5 )"
|
||||
|
||||
CDEPEND="
|
||||
dev-libs/libgcrypt:0=
|
||||
sys-fs/cryptsetup:=
|
||||
gnome? ( app-crypt/libsecret )
|
||||
qt5? (
|
||||
dev-libs/libpwquality
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtnetwork:5
|
||||
dev-qt/qtwidgets:5
|
||||
kwallet? ( kde-frameworks/kwallet:5 )
|
||||
)
|
||||
"
|
||||
RDEPEND="${CDEPEND}
|
||||
udev? ( virtual/udev )"
|
||||
DEPEND="${CDEPEND}
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
S="${WORKDIR}/zuluCrypt-${PV}"
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DLIB_SUFFIX="$(get_libdir)"
|
||||
-DNOGNOME=$(usex !gnome)
|
||||
-DNOKDE=$(usex !kwallet)
|
||||
-DNOGUI=$(usex !qt5)
|
||||
-DUDEVSUPPORT=$(usex udev)
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
@ -1,51 +0,0 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit cmake-utils xdg
|
||||
|
||||
DESCRIPTION="Front end to cryptsetup"
|
||||
HOMEPAGE="https://mhogomchungu.github.io/zuluCrypt/"
|
||||
SRC_URI="https://github.com/mhogomchungu/zuluCrypt/releases/download/${PV}/zuluCrypt-${PV}.tar.bz2 -> ${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="gnome kwallet +qt5 udev"
|
||||
|
||||
REQUIRED_USE="kwallet? ( qt5 )"
|
||||
|
||||
CDEPEND="
|
||||
dev-libs/libgcrypt:0=
|
||||
sys-fs/cryptsetup:=
|
||||
gnome? ( app-crypt/libsecret )
|
||||
qt5? (
|
||||
dev-libs/libpwquality
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtnetwork:5
|
||||
dev-qt/qtwidgets:5
|
||||
kwallet? ( kde-frameworks/kwallet:5 )
|
||||
)
|
||||
"
|
||||
RDEPEND="${CDEPEND}
|
||||
udev? ( virtual/udev )"
|
||||
DEPEND="${CDEPEND}
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
S="${WORKDIR}/zuluCrypt-${PV}"
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DLIB_SUFFIX="$(get_libdir)"
|
||||
-DNOGNOME=$(usex !gnome)
|
||||
-DNOKDE=$(usex !kwallet)
|
||||
-DNOGUI=$(usex !qt5)
|
||||
-DUDEVSUPPORT=$(usex udev)
|
||||
-DINTERNAL_LXQT_WALLET=true
|
||||
-DINTERNAL_ZULUPLAY=true
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
Binary file not shown.
@ -1 +1,2 @@
|
||||
DIST conmon-2.0.20.tar.gz 64716 BLAKE2B d7eb464f5be0b117824571134f08077955f56e1637dd2cbc6b70413dc9a6f109a1b9b207f5523103f205659ac20cc65f5f2340475d771fdf4b852d6895887975 SHA512 b719e41e1ead0d38c0874a30901c5660dc8612dc7aa1c025068480846a1e458a744b55bb8d5d74d2c2ce38fdbbe03505fce216a2f2c0748740983e3272a82f0e
|
||||
DIST conmon-2.0.22.tar.gz 103371 BLAKE2B f509ba800c847886ec2350e141d2b965ff1cc09822467718fb0d94acdabdc86c6f40dff9428679e4c4171ac6a522b3ba7622d66ebd8108be1a68cbf7418d5c09 SHA512 819e1d9279c1a22388220d710b975cdeb3c0b56413afb177afe1c96b649e2dce496d5f51fe4094f572111f771102ccd0ae86f1776e99fedb2e76e6e9130c2d5c
|
||||
|
@ -0,0 +1,45 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
EGIT_COMMIT="9c34a8663b85e479e0c083801e89a2b2835228ed"
|
||||
DESCRIPTION="An OCI container runtime monitor"
|
||||
HOMEPAGE="https://github.com/containers/conmon"
|
||||
SRC_URI="https://github.com/containers/conmon/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
IUSE="systemd"
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="dev-libs/glib:=
|
||||
systemd? ( sys-apps/systemd:= )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}/${PN}-${EGIT_COMMIT}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if ! use systemd; then
|
||||
sed -e 's| $(PKG_CONFIG) --exists libsystemd-journal | false |' \
|
||||
-e 's| $(PKG_CONFIG) --exists libsystemd | false |' \
|
||||
-i Makefile || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake GIT_COMMIT="${EGIT_COMMIT}" \
|
||||
all
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" \
|
||||
PREFIX="/usr" \
|
||||
install
|
||||
dodir /usr/libexec/podman
|
||||
ln "${ED}/usr/"{bin,libexec/podman}/conmon || die
|
||||
dodoc README.md
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST podman-2.1.0.tar.gz 9444707 BLAKE2B 62dacd316a8d6ae8aab0523338d818c69cf1228120e828a89301c9fdbb98082b85328c03c61f9f2a36c7a50105ce5fd025ad2b0e9ba2705c86b0d7e263fc92a6 SHA512 eb9b0cb184138af022e6d8e145fc6c4188c75c0695e0c6e62d54112a6b143424dd0caf9686f83637d08ff1fdbc24afca564c89f8cb4ab68b8f8d07345856398e
|
||||
DIST podman-2.2.1.tar.gz 9653842 BLAKE2B 4e86903fc8fb51b9b1aa2b46704c1828b4ea11b738eccf198260c678b175e0a8699120e0280a2803f7898c9b28040a75d489ccd09ebd9c1f45d10a86e2a26c8f SHA512 4c6eda9320daf18b5f0e892c0f3019a5658d983936c25a195bcb1fbc28c18a9a65e87043faddeb47e9f62c9b445efc2906a2b7ccedca877941fadb21b1b68367
|
||||
|
@ -0,0 +1,154 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
EGIT_COMMIT="d8868746fd3f45b9bfd79e37bf2aa0c7103245fd"
|
||||
|
||||
inherit bash-completion-r1 flag-o-matic go-module
|
||||
|
||||
DESCRIPTION="Library and podman tool for running OCI-based containers in Pods"
|
||||
HOMEPAGE="https://github.com/containers/podman/"
|
||||
MY_PN=podman
|
||||
MY_P=${MY_PN}-${PV}
|
||||
SRC_URI="https://github.com/containers/podman/archive/v${PV}.tar.gz -> ${MY_P}.tar.gz"
|
||||
LICENSE="Apache-2.0 BSD BSD-2 CC-BY-SA-4.0 ISC MIT MPL-2.0"
|
||||
SLOT="0"
|
||||
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
IUSE="apparmor btrfs +fuse +rootless selinux"
|
||||
RESTRICT="test"
|
||||
|
||||
COMMON_DEPEND="
|
||||
app-crypt/gpgme:=
|
||||
>=app-emulation/conmon-2.0.0
|
||||
|| ( >=app-emulation/runc-1.0.0_rc6 app-emulation/crun )
|
||||
dev-libs/libassuan:=
|
||||
dev-libs/libgpg-error:=
|
||||
>=net-misc/cni-plugins-0.8.6
|
||||
sys-fs/lvm2
|
||||
sys-libs/libseccomp:=
|
||||
|
||||
apparmor? ( sys-libs/libapparmor )
|
||||
btrfs? ( sys-fs/btrfs-progs )
|
||||
rootless? ( app-emulation/slirp4netns )
|
||||
selinux? ( sys-libs/libselinux:= )
|
||||
"
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
dev-go/go-md2man"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
fuse? ( sys-fs/fuse-overlayfs )"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Disable installation of python modules here, since those are
|
||||
# installed by separate ebuilds.
|
||||
local makefile_sed_args=(
|
||||
-e '/^GIT_.*/d'
|
||||
-e 's/$(GO) build/$(GO) build -v -work -x/'
|
||||
-e 's/^\(install:.*\) install\.python$/\1/'
|
||||
-e 's|^pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink$|pkg/varlink/iopodman.go: pkg/varlink/io.podman.varlink|'
|
||||
)
|
||||
|
||||
has_version -b '>=dev-lang/go-1.13.9' || makefile_sed_args+=(-e 's:GO111MODULE=off:GO111MODULE=on:')
|
||||
|
||||
sed "${makefile_sed_args[@]}" -i Makefile || die
|
||||
|
||||
sed -e 's|OUTPUT="${CIRRUS_TAG:.*|OUTPUT='v${PV}'|' \
|
||||
-i hack/get_release_info.sh || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Filter unsupported linker flags
|
||||
filter-flags '-Wl,*'
|
||||
|
||||
[[ -f hack/apparmor_tag.sh ]] || die
|
||||
if use apparmor; then
|
||||
echo -e "#!/bin/sh\necho apparmor" > hack/apparmor_tag.sh || die
|
||||
else
|
||||
echo -e "#!/bin/sh\ntrue" > hack/apparmor_tag.sh || die
|
||||
fi
|
||||
|
||||
[[ -f hack/btrfs_installed_tag.sh ]] || die
|
||||
if use btrfs; then
|
||||
echo -e "#!/bin/sh\ntrue" > hack/btrfs_installed_tag.sh || die
|
||||
else
|
||||
echo -e "#!/bin/sh\necho exclude_graphdriver_btrfs" > \
|
||||
hack/btrfs_installed_tag.sh || die
|
||||
fi
|
||||
|
||||
[[ -f hack/selinux_tag.sh ]] || die
|
||||
if use selinux; then
|
||||
echo -e "#!/bin/sh\necho selinux" > hack/selinux_tag.sh || die
|
||||
else
|
||||
echo -e "#!/bin/sh\ntrue" > hack/selinux_tag.sh || die
|
||||
fi
|
||||
|
||||
# Avoid this error when generating pkg/varlink/iopodman.go:
|
||||
# cannot find package "github.com/varlink/go/varlink/idl"
|
||||
mkdir -p _output || die
|
||||
ln -snf ../vendor _output/src || die
|
||||
GO111MODULE=off GOPATH=${PWD}/_output go generate ./pkg/varlink/... || die
|
||||
rm _output/src || die
|
||||
|
||||
export -n GOCACHE GOPATH XDG_CACHE_HOME
|
||||
GOBIN="${S}/bin" \
|
||||
emake all \
|
||||
GIT_BRANCH=master \
|
||||
GIT_BRANCH_CLEAN=master \
|
||||
COMMIT_NO="${EGIT_COMMIT}" \
|
||||
GIT_COMMIT="${EGIT_COMMIT}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install
|
||||
|
||||
insinto /etc/containers
|
||||
newins test/registries.conf registries.conf.example
|
||||
newins test/policy.json policy.json.example
|
||||
|
||||
insinto /usr/share/containers
|
||||
doins vendor/github.com/containers/common/pkg/seccomp/seccomp.json
|
||||
|
||||
newinitd "${FILESDIR}"/podman.initd podman
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}/podman.logrotated" podman
|
||||
|
||||
dobashcomp completions/bash/*
|
||||
|
||||
keepdir /var/lib/containers
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
LIBPOD_ROOTLESS_UPGRADE=false
|
||||
if use rootless; then
|
||||
has_version 'app-emulation/libpod[rootless]' || LIBPOD_ROOTLESS_UPGRADE=true
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
local want_newline=false
|
||||
if [[ ! ( -e ${EROOT%/*}/etc/containers/policy.json && -e ${EROOT%/*}/etc/containers/registries.conf ) ]]; then
|
||||
elog "You need to create the following config files:"
|
||||
elog "/etc/containers/registries.conf"
|
||||
elog "/etc/containers/policy.json"
|
||||
elog "To copy over default examples, use:"
|
||||
elog "cp /etc/containers/registries.conf{.example,}"
|
||||
elog "cp /etc/containers/policy.json{.example,}"
|
||||
want_newline=true
|
||||
fi
|
||||
if [[ ${LIBPOD_ROOTLESS_UPGRADE} == true ]] ; then
|
||||
${want_newline} && elog ""
|
||||
elog "For rootless operation, you need to configure subuid/subgid"
|
||||
elog "for user running podman. In case subuid/subgid has only been"
|
||||
elog "configured for root, run:"
|
||||
elog "usermod --add-subuids 1065536-1131071 <user>"
|
||||
elog "usermod --add-subgids 1065536-1131071 <user>"
|
||||
want_newline=true
|
||||
fi
|
||||
}
|
@ -1 +1,2 @@
|
||||
DIST slirp4netns-1.1.4.tar.gz 55346 BLAKE2B 86716ec9f42ae0087e9e7d142683f53b986275bce20b5ab0a33d0cdd63778adfeeadc86e5abb52d4a7e3e89baa0440c1a99bde920eeb2ed5293046e451d8ad01 SHA512 a6a26c55bdd4f50e668f7feeee3cd1d077e1ca9bd5bad5bbb8c47b15d366af4b1f2900241bedcd5a974a7597f43b17f970662271ec1987fbb6291c50470fa0a8
|
||||
DIST slirp4netns-1.1.8.tar.gz 58022 BLAKE2B cb65af6a5298411c158dd3da8160f8e4999ce5cb6bafc85f233d4d64a58c545ff7e9db21501f718ce7990d2497a6960853ecb9ff548859b1be19f3d74e86610b SHA512 28b2dd73cfd0a0fc71338c55a7f4ae448456620a0d27eb1e7c79f2d58da2a90f2f9af363c9abf5148d4d6435f69ea26809e5f20721fec5daf4c9897bb29c3547
|
||||
|
@ -0,0 +1,40 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools
|
||||
|
||||
DESCRIPTION="User-mode networking for unprivileged network namespaces"
|
||||
HOMEPAGE="https://github.com/rootless-containers/slirp4netns"
|
||||
SRC_URI="https://github.com/rootless-containers/slirp4netns/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
KEYWORDS="~amd64 ~arm64"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
|
||||
RDEPEND="
|
||||
dev-libs/glib:2=
|
||||
dev-libs/libpcre:=
|
||||
net-libs/libslirp:=
|
||||
sys-libs/libseccomp:=
|
||||
sys-libs/libcap:="
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig"
|
||||
RESTRICT="test"
|
||||
|
||||
src_prepare() {
|
||||
# Respect AR variable for bug 722162.
|
||||
sed -e 's|^AC_PROG_CC$|AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)])\nAC_PROG_AR\n\0|' \
|
||||
-i configure.ac || die
|
||||
eautoreconf
|
||||
default
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if [[ -z ${REPLACING_VERSIONS} ]]; then
|
||||
elog "You need to have the tun kernel module loaded in order to have"
|
||||
elog "slirp4netns working"
|
||||
fi
|
||||
}
|
Binary file not shown.
@ -1,3 +1 @@
|
||||
DIST ibus-rime-1.2.tar.gz 33396 BLAKE2B 39930ea31d40e622cd69d6f5a218729f460161dd9681e49bc35a1eb9b3875b6f5acbdaf36f7cf8200440bc27ed84a2f23ec1578b19a1fe6abbbc54c7078be11c SHA512 e1851781a6d069a79d04890b5b0aa2a706e611c08df3fcb99f883eeedd4dc4eefcac207f35b5cf1d856a41f0153ec3fbb040b4e6f610727384baa19b52a64155
|
||||
DIST ibus-rime-1.3.0.tar.gz 33930 BLAKE2B 14e086382d89c990ca9f07401b68dbe26d58da061a3e8154232809ff29d766b630dcd06723bb0a8e18ebd089a640b7ab6787f8c70a6405dfa82472c1abfe5d4e SHA512 f0991184805bfe19931e297779179661f98bdfea952e310b2d8618550002cfa5bb08df05d1c5e31b535ad9959a919fdc98fa771a90d4d82b9c50e2f592cb7dfd
|
||||
DIST ibus-rime-1.4.0.tar.gz 34176 BLAKE2B 69d0392adc78b2b8935f2239c4567d001d3636d0e8ff59aca0b04b3189751a3edd0350eea9e2262b3ae3e639dbd9715c157e44727cc48ba9521801161a1508f4 SHA512 3fc24f4ce390e27d37e41775e4c075c7465cd3e90a9ab61d13ec47c2ca1c2afaafb322f327e18be573aa254a43b8cf6426415500a5d817b835bf4e0615ab9145
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- a/rime_settings.h
|
||||
+++ b/rime_settings.h
|
||||
@@ -20,7 +20,7 @@ struct IBusRimeSettings {
|
||||
struct ColorSchemeDefinition* color_scheme;
|
||||
};
|
||||
|
||||
-struct IBusRimeSettings g_ibus_rime_settings;
|
||||
+extern struct IBusRimeSettings g_ibus_rime_settings;
|
||||
|
||||
void
|
||||
ibus_rime_load_settings();
|
@ -1,34 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
DESCRIPTION="Chinese Rime Input Method Engine for IBus"
|
||||
HOMEPAGE="https://rime.im/ https://github.com/rime/ibus-rime"
|
||||
SRC_URI="http://dl.bintray.com/lotem/rime/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
CDEPEND="app-i18n/ibus
|
||||
app-i18n/librime
|
||||
x11-libs/libnotify"
|
||||
RDEPEND="${CDEPEND}
|
||||
app-i18n/rime-data"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-util/cmake
|
||||
virtual/pkgconfig"
|
||||
S="${WORKDIR}/${PN}"
|
||||
|
||||
src_prepare() {
|
||||
sed -i \
|
||||
-e "/^libexecdir/s:/lib:/libexec:" \
|
||||
-e "/^[[:space:]]*PREFIX/s:/usr:${EPREFIX}/usr:" \
|
||||
-e "s/ make/ \$(MAKE)/" \
|
||||
Makefile
|
||||
sed -i "/exec>/s:/usr/lib:${EPREFIX}/usr/libexec:" rime.xml
|
||||
|
||||
default
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
DESCRIPTION="Chinese Rime Input Method Engine for IBus"
|
||||
HOMEPAGE="https://rime.im/ https://github.com/rime/ibus-rime"
|
||||
SRC_URI="https://github.com/rime/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
CDEPEND="app-i18n/ibus
|
||||
app-i18n/librime
|
||||
x11-libs/libnotify"
|
||||
RDEPEND="${CDEPEND}
|
||||
app-i18n/rime-data"
|
||||
DEPEND="${CDEPEND}
|
||||
dev-util/cmake
|
||||
virtual/pkgconfig"
|
||||
|
||||
src_prepare() {
|
||||
sed -i \
|
||||
-e "/^libexecdir/s:/lib:/libexec:" \
|
||||
-e "/^[[:space:]]*PREFIX/s:/usr:${EPREFIX}/usr:" \
|
||||
-e "s/ make/ \$(MAKE)/" \
|
||||
Makefile
|
||||
sed -i "/exec>/s:/usr/lib:${EPREFIX}/usr/libexec:" rime.xml
|
||||
|
||||
default
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
--- a/imsettings-daemon/imsettings-server.c
|
||||
+++ b/imsettings-daemon/imsettings-server.c
|
||||
@@ -93,7 +93,7 @@ GDBusInterfaceVTable __iface_vtable = {
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
-guint signals[LAST_SIGNAL];
|
||||
+extern guint signals[LAST_SIGNAL];
|
||||
|
||||
G_DEFINE_TYPE (IMSettingsServer, imsettings_server, G_TYPE_OBJECT);
|
||||
G_LOCK_DEFINE_STATIC (logger);
|
Binary file not shown.
@ -0,0 +1,22 @@
|
||||
--- a/pommed/mactel/nv8600mgt_backlight.c
|
||||
+++ b/pommed/mactel/nv8600mgt_backlight.c
|
||||
@@ -48,7 +48,7 @@
|
||||
#include "../dbus.h"
|
||||
|
||||
|
||||
-struct _lcd_bck_info lcd_bck_info;
|
||||
+extern struct _lcd_bck_info lcd_bck_info;
|
||||
|
||||
|
||||
static int nv8600mgt_inited = 0;
|
||||
--- a/pommed/mactel/x1600_backlight.c
|
||||
+++ b/pommed/mactel/x1600_backlight.c
|
||||
@@ -45,7 +45,7 @@
|
||||
#include "../dbus.h"
|
||||
|
||||
|
||||
-struct _lcd_bck_info lcd_bck_info;
|
||||
+extern struct _lcd_bck_info lcd_bck_info;
|
||||
|
||||
static int fd = -1;
|
||||
static char *memory = NULL;
|
Binary file not shown.
@ -0,0 +1,29 @@
|
||||
--- a/src/utimer.h
|
||||
+++ b/src/utimer.h
|
||||
@@ -66,9 +66,9 @@
|
||||
#define TIMER_PRINT_RATE_MSEC 79
|
||||
#define TIMER_CHECK_RATE_MSEC 500
|
||||
|
||||
-GMainLoop *loop;
|
||||
-gboolean paused;
|
||||
-struct termios savedttystate;
|
||||
-Config ut_config;
|
||||
+extern GMainLoop *loop;
|
||||
+extern gboolean paused;
|
||||
+extern struct termios savedttystate;
|
||||
+extern Config ut_config;
|
||||
|
||||
#endif /* UTIMER_H */
|
||||
--- a/src/utils.c
|
||||
+++ b/src/utils.c
|
||||
@@ -36,6 +36,10 @@
|
||||
#include "utils.h"
|
||||
#include "utimer.h"
|
||||
|
||||
+GMainLoop *loop;
|
||||
+gboolean paused;
|
||||
+struct termios savedttystate;
|
||||
+Config ut_config;
|
||||
|
||||
gulong ul_add (gulong a, gulong b)
|
||||
{
|
@ -0,0 +1,10 @@
|
||||
--- a/src/utimer.h
|
||||
+++ b/src/utimer.h
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n-lib.h>
|
||||
+#include <locale.h>
|
||||
|
||||
#include "utils.h"
|
||||
#include "timer.h"
|
@ -0,0 +1,47 @@
|
||||
--- a/common.h
|
||||
+++ b/common.h
|
||||
@@ -23,8 +23,8 @@
|
||||
#define T_DIR 1 /* -> DIR */
|
||||
#define T_NED 2 /* DIR -> NON-EXISTENT DIR */
|
||||
|
||||
-WINDOW *mainw;
|
||||
-WINDOW *logw;
|
||||
+extern WINDOW *mainw;
|
||||
+extern WINDOW *logw;
|
||||
|
||||
struct dest_new {
|
||||
char *opath;
|
||||
--- a/log.c
|
||||
+++ b/log.c
|
||||
@@ -13,6 +13,8 @@
|
||||
#include "screen.h"
|
||||
#include "color.h"
|
||||
|
||||
+extern WINDOW *logw;
|
||||
+
|
||||
int logaddi(int code, char *base, int var, int var2) {
|
||||
|
||||
if(code == LOG_VRB && !vflag)
|
||||
--- a/misc.c
|
||||
+++ b/misc.c
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "color.h"
|
||||
#include "screen.h"
|
||||
|
||||
+extern WINDOW *logw;
|
||||
+
|
||||
int statit(char *path,struct stat *st,int cmdline) {
|
||||
if(Rflag) {
|
||||
if(pflag || ((Hflag) && !cmdline))
|
||||
--- a/screen.c
|
||||
+++ b/screen.c
|
||||
@@ -17,6 +17,9 @@
|
||||
int winw,winh,mainww;
|
||||
int mainwsbw; /* width of status bar */
|
||||
|
||||
+WINDOW *mainw;
|
||||
+WINDOW *logw;
|
||||
+
|
||||
/* create windows, draw border and title */
|
||||
void scrn_draw() {
|
||||
int dev_null;
|
@ -1 +1,2 @@
|
||||
DIST vifm-0.10.1.tar.bz2 1097998 BLAKE2B b9712d61a00761986aa54d9bc561a5125ae96f751e8ba2844adae91577ba093b1a4860071b57ab81dbed3eb52c2c91ce3316831fa44a06436ef5fa81d2739f3a SHA512 8116c4c31b01a9453684a90b26b87a33e5ec2cd2930162869507f673319d231f44e464d1056239f647531c3be5bc9bcf92045c79e5d545f9c75be11c7fe03ea2
|
||||
DIST vifm-0.11.tar.gz 1525791 BLAKE2B c2aa6d3ddd0304ce1e3a0d1c9ac3218a783bc6dd8eebf7b3346ca262811f63dac75597913ad4883c62680cb77036c2985ca4ce88989a0dd0212dce975d8ec8b8 SHA512 15ace460da6d5f9bb7a016d8bb3f3d9cba47a608da5a39defbf7d09ff9de64c90a63a44264d695fe005f2f6d27ecb07dcec8f4ed5aef15e9d8728b52f1168dbd
|
||||
|
@ -0,0 +1,82 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit autotools vim-doc xdg
|
||||
|
||||
DESCRIPTION="Console file manager with vi(m)-like keybindings"
|
||||
HOMEPAGE="https://vifm.info/"
|
||||
SRC_URI="https://github.com/vifm/vifm/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~x86"
|
||||
IUSE="developer +extended-keys gtk +magic +vim +vim-syntax X"
|
||||
|
||||
DEPEND="
|
||||
>=sys-libs/ncurses-5.9-r3:0
|
||||
magic? ( sys-apps/file )
|
||||
gtk? ( x11-libs/gtk+:2 )
|
||||
X? ( x11-libs/libX11 )"
|
||||
RDEPEND="${DEPEND}
|
||||
vim? ( || ( app-editors/vim app-editors/gvim ) )
|
||||
vim-syntax? ( || ( app-editors/vim app-editors/gvim ) )"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
$(use_enable developer) \
|
||||
$(use_enable extended-keys) \
|
||||
$(use_with magic libmagic) \
|
||||
$(use_with gtk) \
|
||||
$(use_with X X11)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
if use vim; then
|
||||
local t
|
||||
for t in app plugin; do
|
||||
insinto /usr/share/vim/vimfiles/"${t}"
|
||||
doins -r data/vim/doc/${t}/${PN}*
|
||||
done
|
||||
fi
|
||||
|
||||
if use vim-syntax; then
|
||||
local t
|
||||
for t in ftdetect ftplugin syntax; do
|
||||
insinto /usr/share/vim/vimfiles/"${t}"
|
||||
doins -r data/vim/${t}/${PN}*
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
xdg_pkg_postinst
|
||||
if use vim; then
|
||||
update_vim_helptags
|
||||
|
||||
if [[ -n ${REPLACING_VERSIONS} ]]; then
|
||||
elog
|
||||
elog "You don't need to copy or link any files for"
|
||||
elog " the vim plugin and documentation to work anymore."
|
||||
elog "If you copied any vifm files to ~/.vim/ manually"
|
||||
elog " in earlier vifm versions, please delete them."
|
||||
fi
|
||||
elog
|
||||
elog "To use vim in vifm to view the documentation"
|
||||
elog " edit ~/.vifm/vifmrc and set vimhelp instead of novimhelp"
|
||||
elog
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
xdg_pkg_postrm
|
||||
use vim && update_vim_helptags
|
||||
}
|
Binary file not shown.
@ -1,2 +1,3 @@
|
||||
DIST texstudio-3.0.0_pre20200601.tar.gz 35982392 BLAKE2B 1eed56fe21aac141df41f251621a902a20153b0eaafc995b56fa8c3fbcc213685710e45202fbb90a071a0efac591c86588d4c5fe3727e603e0a58e149ed6864e SHA512 d922f576055fc345e7e0125074c6dbb473c6fb95aa06ae1ffc15f3b89fbdc7c5a44a13d4a32b770bef10c7bae7211a4bf3a269996eda1b3a0c8fd1ed8f3c4bb1
|
||||
DIST texstudio-3.0.1-r1.tar.gz 36144393 BLAKE2B 63dad681a56ce60a90c44ab71930e8a14a7f335eb7d40f906aab2f5ca10375f768bafc3ae9023574b04c2b5196bc495ef47fb5fc9d4f6438da0a747ebd857972 SHA512 aba57d9f45af259131d3ab47463a30bec24d8fa5b30a9c574308b8a7d6c1117acb1553df20ebe5855281510f82c4d55700a0db0dffeee1b69f2afec234e18b93
|
||||
DIST texstudio-3.0.2.tar.gz 83190497 BLAKE2B b04c035e969c27a9b527a7ab62c3384120c14f4d6178da977a5a3484e0709f63337fdebc23f0231d94376ee0222e7c5724fff74c118d311388af73e1470518f7 SHA512 68581f21487f3fb3d27b64650901396e4abdb0df9edbf8796efd5b8b31cc26b5fce123a09f704bafd7994f129c392f96e5a0af46fb637a64b5230251e1517f0d
|
||||
|
@ -0,0 +1,73 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
inherit desktop prefix qmake-utils xdg
|
||||
|
||||
MY_PV="${PV/_/}"
|
||||
DESCRIPTION="Free cross-platform LaTeX editor (fork from texmakerX)"
|
||||
HOMEPAGE="https://www.texstudio.org https://github.com/texstudio-org/texstudio"
|
||||
SRC_URI="https://github.com/texstudio-org/texstudio/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${PN}-${MY_PV}"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
|
||||
IUSE="video"
|
||||
|
||||
COMMON_DEPEND="
|
||||
app-text/hunspell:=
|
||||
app-text/poppler[qt5]
|
||||
>=dev-libs/quazip-0.7.2[qt5(+)]
|
||||
dev-qt/designer:5
|
||||
dev-qt/qtcore:5
|
||||
dev-qt/qtconcurrent:5
|
||||
dev-qt/qtgui:5
|
||||
dev-qt/qtnetwork:5
|
||||
dev-qt/qtprintsupport:5
|
||||
dev-qt/qtscript:5
|
||||
dev-qt/qtsingleapplication[qt5(+),X]
|
||||
dev-qt/qtsvg:5
|
||||
dev-qt/qttest:5
|
||||
dev-qt/qtwidgets:5
|
||||
dev-qt/qtxml:5
|
||||
sys-libs/zlib
|
||||
x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
video? ( media-libs/phonon[qt5(+)] )"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
app-text/ghostscript-gpl
|
||||
app-text/psutils
|
||||
media-libs/netpbm
|
||||
virtual/latex-base"
|
||||
DEPEND="${COMMON_DEPEND}"
|
||||
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
if use video; then
|
||||
sed "/^PHONON/s:$:true:g" -i ${PN}.pro || die
|
||||
fi
|
||||
|
||||
sed \
|
||||
-e '/qtsingleapplication.pri/d' \
|
||||
-i ${PN}.pro || die
|
||||
|
||||
cp "${FILESDIR}"/texmakerx_my.pri ${PN}.pri || die
|
||||
eprefixify ${PN}.pri
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
eqmake5 USE_SYSTEM_HUNSPELL=1 USE_SYSTEM_QUAZIP=1
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local i
|
||||
for i in 16x16 22x22 32x32 48x48 64x64 128x128; do
|
||||
newicon -s ${i} utilities/${PN}${i}.png ${PN}.png
|
||||
done
|
||||
emake DESTDIR="${D}" INSTALL_ROOT="${ED}" install
|
||||
}
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue