net-misc/rsync: Sync with Gentoo

It's from Gentoo commit 835f0179694d35eec8af5e167eaabfa789d686f7.
This commit is contained in:
Flatcar Buildbot 2022-11-28 07:15:25 +00:00
parent 2416f97f3a
commit fb0d1fe154
3 changed files with 57 additions and 8 deletions

View File

@ -11,6 +11,7 @@
<remote-id type="github">WayneD/rsync</remote-id> <remote-id type="github">WayneD/rsync</remote-id>
</upstream> </upstream>
<use> <use>
<flag name="rrsync">Install rrsync script to setup restricted rsync users via ssh logins</flag>
<flag name="stunnel">Provide helper scripts for using rsync via &gt;=<pkg>net-misc/stunnel</pkg>-4</flag> <flag name="stunnel">Provide helper scripts for using rsync via &gt;=<pkg>net-misc/stunnel</pkg>-4</flag>
<flag name="system-zlib">Use system zlib instead of bundled one. This is incompatible with older rsync releases!</flag> <flag name="system-zlib">Use system zlib instead of bundled one. This is incompatible with older rsync releases!</flag>
<flag name="xxhash">Enable <pkg>dev-libs/xxhash</pkg> support for hashing</flag> <flag name="xxhash">Enable <pkg>dev-libs/xxhash</pkg> support for hashing</flag>

View File

@ -37,8 +37,9 @@ fi
LICENSE="GPL-3" LICENSE="GPL-3"
SLOT="0" SLOT="0"
IUSE="acl examples iconv lz4 ssl stunnel system-zlib xattr xxhash zstd" IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr xxhash zstd"
REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )"
REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND=" RDEPEND="
>=dev-libs/popt-1.5 >=dev-libs/popt-1.5
@ -48,6 +49,12 @@ RDEPEND="
dev-lang/perl dev-lang/perl
) )
lz4? ( app-arch/lz4:= ) lz4? ( app-arch/lz4:= )
rrsync? (
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/bracex[${PYTHON_USEDEP}]
')
)
ssl? ( dev-libs/openssl:= ) ssl? ( dev-libs/openssl:= )
system-zlib? ( sys-libs/zlib ) system-zlib? ( sys-libs/zlib )
xattr? ( kernel_linux? ( sys-apps/attr ) ) xattr? ( kernel_linux? ( sys-apps/attr ) )
@ -55,7 +62,10 @@ RDEPEND="
zstd? ( >=app-arch/zstd-1.4:= ) zstd? ( >=app-arch/zstd-1.4:= )
iconv? ( virtual/libiconv )" iconv? ( virtual/libiconv )"
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"
BDEPEND="examples? ( ${PYTHON_DEPS} )" BDEPEND="
examples? ( ${PYTHON_DEPS} )
rrsync? ( ${PYTHON_DEPS} )
"
if [[ ${PV} == *9999 ]] ; then if [[ ${PV} == *9999 ]] ; then
BDEPEND+=" ${PYTHON_DEPS} BDEPEND+=" ${PYTHON_DEPS}
@ -69,7 +79,7 @@ fi
pkg_setup() { pkg_setup() {
# - USE=examples needs Python itself at runtime, but nothing else # - USE=examples needs Python itself at runtime, but nothing else
# - 9999 needs commonmark at build time # - 9999 needs commonmark at build time
if [[ ${PV} == *9999 ]] || use examples ; then if [[ ${PV} == *9999 ]] || use examples || use rrsync; then
python-single-r1_pkg_setup python-single-r1_pkg_setup
fi fi
} }
@ -82,6 +92,17 @@ src_prepare() {
eautoconf -o configure.sh eautoconf -o configure.sh
eautoheader && touch config.h.in eautoheader && touch config.h.in
fi 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() { src_configure() {
@ -92,6 +113,7 @@ src_configure() {
$(use_enable acl acl-support) $(use_enable acl acl-support)
$(use_enable iconv) $(use_enable iconv)
$(use_enable lz4) $(use_enable lz4)
$(use_with rrsync)
$(use_enable ssl openssl) $(use_enable ssl openssl)
$(use_with !system-zlib included-zlib) $(use_with !system-zlib included-zlib)
$(use_enable xattr xattr-support) $(use_enable xattr xattr-support)
@ -126,7 +148,9 @@ src_install() {
# Install the useful contrib scripts # Install the useful contrib scripts
if use examples ; then if use examples ; then
python_fix_shebang support/ # 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 exeinto /usr/share/rsync
doexe support/* doexe support/*

View File

@ -37,8 +37,9 @@ fi
LICENSE="GPL-3" LICENSE="GPL-3"
SLOT="0" SLOT="0"
IUSE="acl examples iconv lz4 ssl stunnel system-zlib xattr xxhash zstd" IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr xxhash zstd"
REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )"
REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND=" RDEPEND="
>=dev-libs/popt-1.5 >=dev-libs/popt-1.5
@ -48,6 +49,12 @@ RDEPEND="
dev-lang/perl dev-lang/perl
) )
lz4? ( app-arch/lz4:= ) lz4? ( app-arch/lz4:= )
rrsync? (
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/bracex[${PYTHON_USEDEP}]
')
)
ssl? ( dev-libs/openssl:= ) ssl? ( dev-libs/openssl:= )
system-zlib? ( sys-libs/zlib ) system-zlib? ( sys-libs/zlib )
xattr? ( kernel_linux? ( sys-apps/attr ) ) xattr? ( kernel_linux? ( sys-apps/attr ) )
@ -55,7 +62,10 @@ RDEPEND="
zstd? ( >=app-arch/zstd-1.4:= ) zstd? ( >=app-arch/zstd-1.4:= )
iconv? ( virtual/libiconv )" iconv? ( virtual/libiconv )"
DEPEND="${RDEPEND}" DEPEND="${RDEPEND}"
BDEPEND="examples? ( ${PYTHON_DEPS} )" BDEPEND="
examples? ( ${PYTHON_DEPS} )
rrsync? ( ${PYTHON_DEPS} )
"
if [[ ${PV} == *9999 ]] ; then if [[ ${PV} == *9999 ]] ; then
BDEPEND+=" ${PYTHON_DEPS} BDEPEND+=" ${PYTHON_DEPS}
@ -69,7 +79,7 @@ fi
pkg_setup() { pkg_setup() {
# - USE=examples needs Python itself at runtime, but nothing else # - USE=examples needs Python itself at runtime, but nothing else
# - 9999 needs commonmark at build time # - 9999 needs commonmark at build time
if [[ ${PV} == *9999 ]] || use examples ; then if [[ ${PV} == *9999 ]] || use examples || use rrsync; then
python-single-r1_pkg_setup python-single-r1_pkg_setup
fi fi
} }
@ -82,6 +92,17 @@ src_prepare() {
eautoconf -o configure.sh eautoconf -o configure.sh
eautoheader && touch config.h.in eautoheader && touch config.h.in
fi 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() { src_configure() {
@ -92,6 +113,7 @@ src_configure() {
$(use_enable acl acl-support) $(use_enable acl acl-support)
$(use_enable iconv) $(use_enable iconv)
$(use_enable lz4) $(use_enable lz4)
$(use_with rrsync)
$(use_enable ssl openssl) $(use_enable ssl openssl)
$(use_with !system-zlib included-zlib) $(use_with !system-zlib included-zlib)
$(use_enable xattr xattr-support) $(use_enable xattr xattr-support)
@ -126,7 +148,9 @@ src_install() {
# Install the useful contrib scripts # Install the useful contrib scripts
if use examples ; then if use examples ; then
python_fix_shebang support/ # 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 exeinto /usr/share/rsync
doexe support/* doexe support/*