mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
net-misc/rsync: add 3.5.1
Note that >=gemato-20.15 is needed for verify-sig to pass here (bug #983021). Changes: * Fix the logrotate config to be less opinionated (bug #549852). * Fix LICENSE (bug #912728). * Use /run in init script (bug #685318). * Add systemd socket file for systemd (bug #601792). Bug: https://bugs.gentoo.org/980780 Bug: https://bugs.gentoo.org/980782 Bug: https://bugs.gentoo.org/983021 Closes: https://bugs.gentoo.org/549852 Closes: https://bugs.gentoo.org/601792 Closes: https://bugs.gentoo.org/685318 Closes: https://bugs.gentoo.org/912728 Closes: https://bugs.gentoo.org/980789 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -2,3 +2,5 @@ DIST rsync-3.4.4.tar.gz 1223040 BLAKE2B f4eec8d1077e1cc7eec8cd39dcac4643f7608231
|
||||
DIST rsync-3.4.4.tar.gz.asc 862 BLAKE2B 309fd306467658aad511fe18477af7133fafe7d15a291ba4a837eeaf9312ebd5bbbb41a1aca0a09d37183d3b3e42331d70ba91d7cd1bedbf4c33599a64a1086f SHA512 e65262cb8360cf5c1d81601127367290afbf2fedad3b667299ea7c1c2e850a3f2475e3849ccc3dfe289f86445ebdb657c45619036b3e049faba00582d1af52bc
|
||||
DIST rsync-3.5.0.tar.gz 1892222 BLAKE2B 1a0aaddd9555c14e2b026f4ac9aff0c0b7760a5809fc80c7872b382a0b9b4719dcc0d382c0e43439955efd855ffa2dff101c10a86529b88fd380205cc9506179 SHA512 6c5bada017e4e5f5b451058e2d1863174a1807796525ef4188c1f40358ccbdd36604fd2275dceb1cc6a95ac04da211501553353026c48594c5a79eedb27ce68d
|
||||
DIST rsync-3.5.0.tar.gz.asc 862 BLAKE2B 4f3b40be1010901683f780b8d966d871e18a007c1c43b27b2cdbe41864110d0f9e2bf8b1b2a702e3e7efa988830f9201afe7a6013aa72ca330b8c48a055c84a8 SHA512 e7f29570bc33a67f28ebf089ed70e4c6a77e6f82dffad3b7059b775448b33cb915a8edde85640d076c17a0410bb0104a6f0587f5cc46bb8040ff9b8250f3c3f2
|
||||
DIST rsync-3.5.1.tar.gz 1932807 BLAKE2B 513d03ddadf484424c90755f8d3a947993fdbac3fd7e7b2cdc675e25096f376d7086318be904efd32071d4ba27a06bdaf2875a2086e94f7bd5a7cc9fbdf065ef SHA512 76f3c60eb12bbde9dd0edfb35c2584526298efea8eace446cbfc11791a593e3716daae313ae6ea30598c03f6c30f38492a4248482351b807ba653a23c808a4aa
|
||||
DIST rsync-3.5.1.tar.gz.asc 1032 BLAKE2B e72a9de37245a94a14b30fd570451ff478274cb0e8c2d457c2fc5c77d77c7fcd0688f132d2944253ae33385d7eef72716b36cc67004f16c114d5f9ecb52f7365 SHA512 4e17119f1d45d18ad64eee53b44dbac73109d73e9fd85c18b8ea0aee77809cb1e9abc9b7cd3388fd3fec496c88dffb6857d3b41f617d9833cbdb67f8eafc8444
|
||||
|
||||
11
net-misc/rsync/files/rsyncd.init.d-r2
Normal file
11
net-misc/rsync/files/rsyncd.init.d-r2
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
command="/usr/bin/rsync"
|
||||
command_args="--daemon ${RSYNC_OPTS}"
|
||||
pidfile="/run/${SVCNAME}.pid"
|
||||
|
||||
depend() {
|
||||
use net
|
||||
}
|
||||
5
net-misc/rsync/files/rsyncd.logrotate-r1
Normal file
5
net-misc/rsync/files/rsyncd.logrotate-r1
Normal file
@@ -0,0 +1,5 @@
|
||||
/var/log/rsync.log {
|
||||
notifempty
|
||||
missingok
|
||||
copytruncate
|
||||
}
|
||||
226
net-misc/rsync/rsync-3.5.1.ebuild
Normal file
226
net-misc/rsync/rsync-3.5.1.ebuild
Normal file
@@ -0,0 +1,226 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
# Uncomment when introducing a patch which touches configure
|
||||
RSYNC_NEEDS_AUTOCONF=1
|
||||
PYTHON_COMPAT=( python3_{12..15} )
|
||||
inherit flag-o-matic prefix python-single-r1 systemd
|
||||
|
||||
DESCRIPTION="File transfer program to keep remote files into sync"
|
||||
HOMEPAGE="https://rsync.samba.org/"
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
EGIT_REPO_URI="https://github.com/RsyncProject/rsync.git"
|
||||
inherit autotools git-r3
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
else
|
||||
# For >3.5.1, see https://github.com/RsyncProject/rsync/issues/1097
|
||||
# releases might be signed by non-tridge.
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/andrewtridgell.asc
|
||||
inherit verify-sig
|
||||
|
||||
if [[ -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then
|
||||
inherit autotools
|
||||
fi
|
||||
|
||||
if [[ ${PV} == *_pre* ]] ; then
|
||||
SRC_DIR="src-previews"
|
||||
# Upstream make some private tarballs available for security releases
|
||||
# for testing.
|
||||
SRC_URI="
|
||||
${PN}-v${PV/_pre/-test}.tar.gz
|
||||
verify-sig? ( ${PN}-v${PV/_pre/-test}.tar.gz.asc )
|
||||
"
|
||||
S="${WORKDIR}"/${PN}-v${PV/_pre/-test}
|
||||
|
||||
RESTRICT="fetch"
|
||||
else
|
||||
SRC_DIR="src"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~arm64-macos ~x64-macos ~x64-solaris"
|
||||
|
||||
SRC_URI="
|
||||
https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz
|
||||
https://github.com/RsyncProject/rsync/releases/download/v${PV}/${P/_/}.tar.gz
|
||||
verify-sig? (
|
||||
https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz.asc
|
||||
https://github.com/RsyncProject/rsync/releases/download/v${PV}/${P/_/}.tar.gz.asc
|
||||
)
|
||||
"
|
||||
S="${WORKDIR}"/${P/_/}
|
||||
fi
|
||||
fi
|
||||
|
||||
# GPL-2 for init script
|
||||
LICENSE="GPL-3 GPL-3+ GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="acl examples iconv idn lz4 rrsync ssl stunnel system-zlib test xattr +xxhash zstd"
|
||||
RESTRICT+=" !test? ( test )"
|
||||
REQUIRED_USE+="
|
||||
examples? ( ${PYTHON_REQUIRED_USE} )
|
||||
rrsync? ( ${PYTHON_REQUIRED_USE} )
|
||||
test? ( ${PYTHON_REQUIRED_USE} )
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-libs/popt-1.19
|
||||
acl? ( >=virtual/acl-2.4.0 )
|
||||
examples? (
|
||||
${PYTHON_DEPS}
|
||||
dev-lang/perl
|
||||
)
|
||||
iconv? ( virtual/libiconv )
|
||||
idn? ( net-dns/libidn2:= )
|
||||
lz4? ( app-arch/lz4:= )
|
||||
rrsync? (
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/bracex[${PYTHON_USEDEP}]
|
||||
')
|
||||
)
|
||||
ssl? ( dev-libs/openssl:= )
|
||||
system-zlib? ( virtual/zlib:= )
|
||||
xxhash? ( >=dev-libs/xxhash-0.8 )
|
||||
zstd? ( >=app-arch/zstd-1.4:= )
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
examples? ( ${PYTHON_DEPS} )
|
||||
rrsync? ( ${PYTHON_DEPS} )
|
||||
test? ( ${PYTHON_DEPS} )
|
||||
"
|
||||
|
||||
if [[ ${PV} == *9999 ]] ; then
|
||||
BDEPEND+="
|
||||
${PYTHON_DEPS}
|
||||
$(python_gen_cond_dep '
|
||||
dev-python/commonmark[${PYTHON_USEDEP}]
|
||||
')
|
||||
"
|
||||
else
|
||||
BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-andrewtridgell )"
|
||||
fi
|
||||
|
||||
pkg_setup() {
|
||||
# - USE=examples needs Python itself at runtime, but nothing else
|
||||
# - 9999 needs commonmark at build time
|
||||
if [[ ${PV} == *9999 ]] || use examples || use rrsync || use test ; then
|
||||
python-single-r1_pkg_setup
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
sed -i -e 's/AC_HEADER_MAJOR_FIXED/AC_HEADER_MAJOR/' configure.ac
|
||||
|
||||
if [[ ${PV} == *9999 || -n ${RSYNC_NEEDS_AUTOCONF} ]] ; then
|
||||
eaclocal -I m4
|
||||
eautoconf -o configure.sh
|
||||
eautoheader && touch config.h.in
|
||||
fi
|
||||
|
||||
if use examples || use rrsync; then
|
||||
python_fix_shebang support/
|
||||
fi
|
||||
|
||||
if [[ -f rrsync.1 ]]; then
|
||||
# If the pre-build rrsync.1 man page exists, then link to it
|
||||
# from support/rrsync.1 to avoid rsync's build system attempting
|
||||
# re-creating the man page (bug #883049).
|
||||
ln -s ../rrsync.1 support/rrsync.1 || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
--with-rsyncd-conf="${EPREFIX}"/etc/rsyncd.conf
|
||||
--without-included-popt
|
||||
--enable-ipv6
|
||||
$(use_enable acl acl-support)
|
||||
$(use_enable iconv)
|
||||
$(use_enable idn)
|
||||
$(use_enable lz4)
|
||||
$(use_with rrsync)
|
||||
$(use_enable ssl openssl)
|
||||
$(use_with !system-zlib included-zlib)
|
||||
$(use_enable xattr xattr-support)
|
||||
$(use_enable xxhash)
|
||||
$(use_enable zstd)
|
||||
)
|
||||
|
||||
if is-flagq -fsanitize=undefined ; then
|
||||
append-flags -DCAREFUL_ALIGNMENT
|
||||
fi
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd
|
||||
newinitd "${FILESDIR}"/rsyncd.init.d-r2 rsyncd
|
||||
|
||||
dodoc NEWS.md README.md TODO tech_report.tex
|
||||
|
||||
insinto /etc
|
||||
newins "${FILESDIR}"/rsyncd.conf-3.2.7-r5 rsyncd.conf
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}"/rsyncd.logrotate-r1 rsyncd
|
||||
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd
|
||||
|
||||
# Install stunnel helpers
|
||||
if use stunnel ; then
|
||||
emake DESTDIR="${D}" install-ssl-daemon
|
||||
fi
|
||||
|
||||
# Install the useful contrib scripts
|
||||
if use examples ; then
|
||||
# The 'rrsync' script is installed conditionally via the 'rrysnc'
|
||||
# USE flag, and not via the 'examples' USE flag.
|
||||
rm support/rrsync* || die
|
||||
|
||||
exeinto /usr/share/rsync
|
||||
doexe support/*
|
||||
|
||||
rm -f "${ED}"/usr/share/rsync/{Makefile*,*.c}
|
||||
fi
|
||||
|
||||
eprefixify "${ED}"/etc/{,xinetd.d}/rsyncd*
|
||||
|
||||
systemd_newunit packaging/systemd/rsync.service rsyncd.service
|
||||
systemd_newunit packaging/systemd/rsync@.service 'rsyncd@.service'
|
||||
systemd_newunit packaging/systemd/rsync.socket rsyncd.socket
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if grep -Eqis '^[[:space:]]use chroot[[:space:]]*=[[:space:]]*(no|0|false)' \
|
||||
"${EROOT}"/etc/rsyncd.conf "${EROOT}"/etc/rsync/rsyncd.conf ; then
|
||||
ewarn "You have disabled chroot support in your rsyncd.conf. This"
|
||||
ewarn "is a security risk which you should fix. Please check your"
|
||||
ewarn "/etc/rsyncd.conf file and fix the setting 'use chroot'."
|
||||
fi
|
||||
|
||||
if use stunnel ; then
|
||||
einfo "Please install \">=net-misc/stunnel-4\" in order to use stunnel feature."
|
||||
einfo
|
||||
einfo "You maybe have to update the certificates configured in"
|
||||
einfo "${EROOT}/etc/stunnel/rsync.conf"
|
||||
fi
|
||||
|
||||
if use system-zlib ; then
|
||||
ewarn "Using system-zlib is incompatible with <rsync-3.1.1 when"
|
||||
ewarn "using the --compress option."
|
||||
ewarn
|
||||
ewarn "When syncing with >=rsync-3.1.1 built with bundled zlib,"
|
||||
ewarn "and the --compress option, add --new-compress (-zz)."
|
||||
ewarn
|
||||
ewarn "For syncing the portage tree, add:"
|
||||
ewarn "PORTAGE_RSYNC_EXTRA_OPTS=\"--new-compress\" to make.conf"
|
||||
fi
|
||||
}
|
||||
@@ -16,6 +16,8 @@ if [[ ${PV} == *9999 ]] ; then
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
else
|
||||
# For >3.5.1, see https://github.com/RsyncProject/rsync/issues/1097
|
||||
# releases might be signed by non-tridge.
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/andrewtridgell.asc
|
||||
inherit verify-sig
|
||||
|
||||
@@ -50,9 +52,10 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
LICENSE="GPL-3"
|
||||
# GPL-2 for init script
|
||||
LICENSE="GPL-3 GPL-3+ GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib test xattr +xxhash zstd"
|
||||
IUSE="acl examples iconv idn lz4 rrsync ssl stunnel system-zlib test xattr +xxhash zstd"
|
||||
RESTRICT+=" !test? ( test )"
|
||||
REQUIRED_USE+="
|
||||
examples? ( ${PYTHON_REQUIRED_USE} )
|
||||
@@ -67,6 +70,8 @@ RDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
dev-lang/perl
|
||||
)
|
||||
iconv? ( virtual/libiconv )
|
||||
idn? ( net-dns/libidn2:= )
|
||||
lz4? ( app-arch/lz4:= )
|
||||
rrsync? (
|
||||
${PYTHON_DEPS}
|
||||
@@ -78,7 +83,7 @@ RDEPEND="
|
||||
system-zlib? ( virtual/zlib:= )
|
||||
xxhash? ( >=dev-libs/xxhash-0.8 )
|
||||
zstd? ( >=app-arch/zstd-1.4:= )
|
||||
iconv? ( virtual/libiconv )"
|
||||
"
|
||||
DEPEND="${RDEPEND}"
|
||||
BDEPEND="
|
||||
examples? ( ${PYTHON_DEPS} )
|
||||
@@ -135,6 +140,7 @@ src_configure() {
|
||||
--enable-ipv6
|
||||
$(use_enable acl acl-support)
|
||||
$(use_enable iconv)
|
||||
$(use_enable idn)
|
||||
$(use_enable lz4)
|
||||
$(use_with rrsync)
|
||||
$(use_enable ssl openssl)
|
||||
@@ -155,7 +161,7 @@ src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd
|
||||
newinitd "${FILESDIR}"/rsyncd.init.d-r1 rsyncd
|
||||
newinitd "${FILESDIR}"/rsyncd.init.d-r2 rsyncd
|
||||
|
||||
dodoc NEWS.md README.md TODO tech_report.tex
|
||||
|
||||
@@ -163,7 +169,7 @@ src_install() {
|
||||
newins "${FILESDIR}"/rsyncd.conf-3.2.7-r5 rsyncd.conf
|
||||
|
||||
insinto /etc/logrotate.d
|
||||
newins "${FILESDIR}"/rsyncd.logrotate rsyncd
|
||||
newins "${FILESDIR}"/rsyncd.logrotate-r1 rsyncd
|
||||
|
||||
insinto /etc/xinetd.d
|
||||
newins "${FILESDIR}"/rsyncd.xinetd-3.0.9-r1 rsyncd
|
||||
@@ -188,6 +194,8 @@ src_install() {
|
||||
eprefixify "${ED}"/etc/{,xinetd.d}/rsyncd*
|
||||
|
||||
systemd_newunit packaging/systemd/rsync.service rsyncd.service
|
||||
systemd_newunit packaging/systemd/rsync@.service 'rsyncd@.service'
|
||||
systemd_newunit packaging/systemd/rsync.socket rsyncd.socket
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
|
||||
Reference in New Issue
Block a user