repo/gentoo:master commit in: net-misc/rsync/files/, net-misc/rsync/
"Sam James" <[email protected]>
| Newsgroups | gmane.linux.gentoo.cvs |
|---|---|
| Message-ID | <1786671853.64d0b6f2df8a82228891b3dd6c2af9cade877c9a.sam@gentoo> |
commit: 64d0b6f2df8a82228891b3dd6c2af9cade877c9a Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Aug 14 01:43:56 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Aug 14 01:44:13 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64d0b6f2 net-misc/rsync: drop 3.4.1-r2, 3.4.1-r3, 3.4.2, 3.4.3 Bug: https://bugs.gentoo.org/972779 Bug: https://bugs.gentoo.org/975525 Signed-off-by: Sam James <sam <AT> gentoo.org> net-misc/rsync/Manifest | 6 - .../rsync/files/rsync-3.4.1-CVE-2025-10158.patch | 31 --- net-misc/rsync/files/rsync-3.4.1-c23.patch | 20 -- .../rsync-3.4.1-fix-uninitialized-mul_one.patch | 202 ------------------- net-misc/rsync/files/rsync-3.4.1-glibc-2.43.patch | 77 -------- net-misc/rsync/rsync-3.4.1-r2.ebuild | 207 -------------------- net-misc/rsync/rsync-3.4.1-r3.ebuild | 213 --------------------- net-misc/rsync/rsync-3.4.2.ebuild | 200 ------------------- net-misc/rsync/rsync-3.4.3.ebuild | 200 ------------------- 9 files changed, 1156 deletions(-) diff --git a/net-misc/rsync/Manifest b/net-misc/rsync/Manifest index bc8a7ad642f8..0b2a7fe5af1d 100644 --- a/net-misc/rsync/Manifest +++ b/net-misc/rsync/Manifest @@ -1,9 +1,3 @@ -DIST rsync-3.4.1.tar.gz 1172739 BLAKE2B 79c1cad697547059ee241e20c26d7f97bed3ad062deb856d31a617fead333a2d9f62c7c47c1efaf70033dbc358fe547d034c35e8181abb51a1fc893557882bc7 SHA512 a3ecde4843ddb795308dca88581b868ac0221eb6f88a1477d7a9a2ecb4e4686042966bdddbab40866f90a4715d3104daa7b83222ddf0f3387b796a86bde8e5c2 -DIST rsync-3.4.1.tar.gz.asc 862 BLAKE2B 5684bd57423e8e43b973c2c416c4897901a3a8b33c22690eaedc609109088e1d5d70f5cf5deaafefc69f547d198b5f8b17f3c484211d545095b19dac7e0bc7d3 SHA512 c83e187c88110b6119a023d239c76291f15124760fd245ead17e747424946e7864187aae96af6f5930cb84beff7308b99daa0566f306c9f2de51e2475704c320 -DIST rsync-3.4.2.tar.gz 1190383 BLAKE2B bfc8aa3dc3b75de5e81519eab6d505ebd4d05ebc79c3336ebc925486fa6267cd13a37844d0817183cec68215788bc07e4a281f716bcd0bc7d93daa995df9122c SHA512 74f623e7f5234ffc12fc60d30f4439bc18796404c866365b7c3bfda87f42b33fc01ce6060187534b6b47d799f5b47fcdb84717faff88b6ce30eb230f1b93afe7 -DIST rsync-3.4.2.tar.gz.asc 862 BLAKE2B b6cc8bbb94fae5111143c9b0fe7aeca07b29494011060b7b00d98d2e6058f1d0474cc87f8db8d2d2812f1b039a4eb6ec386e4d706ee99bc4396ba995da14acae SHA512 c89f24640438566387aeee553c133859667c3e225439c3f113346241e3802c0652ebf6ab6005cc0f412a0f6e4bc055d76dd422691c3f024f347813183f66076e -DIST rsync-3.4.3.tar.gz 1216482 BLAKE2B 0bafded6a76a2cedcc6b1f37610c785fa05e62955a43ecb85b8522183a902be3b86157eccbf502116177be0efe19f3051d93cdca5e5734f4a3fbc8bca9878a4f SHA512 1bf2d7cea7a42c9cd070ffaa5e9e029fbce2c18973d8e946f2a6a91c781d2f3ff2449a8ff2431206396caf1f7d9901865f10772c09019d93318e26196160644f -DIST rsync-3.4.3.tar.gz.asc 862 BLAKE2B dd5ac2de65a02742fb52ff2d7188e0ac5f04d336ba2439b2b05464141f14db805c8074869bd946266d42093aa105ef8c0606edf1348b75cbfd1cac626a100576 SHA512 66686d6bcb365a4a75aaffde3d8675d13a22243f70f55c56c4ca6b805fe3d2d24ebd093a29027cc27fcde87bd2319ba3835f8c76cb35fa6de41d3dfa1c694a14 DIST rsync-3.4.4.tar.gz 1223040 BLAKE2B f4eec8d1077e1cc7eec8cd39dcac4643f7608231f5aa6390cb53104efa1602873a333d9e6cba5d1bb2aeff6c3bf9bccd80370a2105a9cc982b49aae9f39f3bde SHA512 cf9a838b1f019b70fd67fa2c293f267be3f24e579c2ea33177ec7afc502c97ce0b613ff0854088c0eb28acd14ee0a75706ae8445115cef4669bd586c505d8453 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 diff --git a/net-misc/rsync/files/rsync-3.4.1-CVE-2025-10158.patch b/net-misc/rsync/files/rsync-3.4.1-CVE-2025-10158.patch deleted file mode 100644 index 23687b43d9cd..000000000000 --- a/net-misc/rsync/files/rsync-3.4.1-CVE-2025-10158.patch +++ /dev/null @@ -1,31 +0,0 @@ -https://bugs.gentoo.org/967677 -https://github.com/RsyncProject/rsync/commit/797e17fc4a6f15e3b1756538a9f812b63942686f - -From 797e17fc4a6f15e3b1756538a9f812b63942686f Mon Sep 17 00:00:00 2001 -From: Andrew Tridgell <[email protected]> -Date: Sat, 23 Aug 2025 17:26:53 +1000 -Subject: [PATCH] fixed an invalid access to files array - -this was found by Calum Hutton from Rapid7. It is a real bug, but -analysis shows it can't be leverged into an exploit. Worth fixing -though. - -Many thanks to Calum and Rapid7 for finding and reporting this ---- - sender.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/sender.c b/sender.c -index a4d46c39e..b1588b701 100644 ---- a/sender.c -+++ b/sender.c -@@ -262,6 +262,8 @@ void send_files(int f_in, int f_out) - - if (ndx - cur_flist->ndx_start >= 0) - file = cur_flist->files[ndx - cur_flist->ndx_start]; -+ else if (cur_flist->parent_ndx < 0) -+ exit_cleanup(RERR_PROTOCOL); - else - file = dir_flist->files[cur_flist->parent_ndx]; - if (F_PATHNAME(file)) { - diff --git a/net-misc/rsync/files/rsync-3.4.1-c23.patch b/net-misc/rsync/files/rsync-3.4.1-c23.patch deleted file mode 100644 index 111847c0e163..000000000000 --- a/net-misc/rsync/files/rsync-3.4.1-c23.patch +++ /dev/null @@ -1,20 +0,0 @@ -https://github.com/RsyncProject/rsync/pull/716 - -From 026ef4cd09660c0a096e285e668b4ba7cd396509 Mon Sep 17 00:00:00 2001 -From: Michal Ruprich <[email protected]> -Date: Fri, 17 Jan 2025 12:37:57 +0100 -Subject: [PATCH] bool is a keyword in C23 - ---- a/wildtest.c -+++ b/wildtest.c -@@ -32,7 +32,9 @@ int fnmatch_errors = 0; - - int wildmatch_errors = 0; - -+#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L - typedef char bool; -+#endif - - int output_iterations = 0; - int explode_mod = 0; - diff --git a/net-misc/rsync/files/rsync-3.4.1-fix-uninitialized-mul_one.patch b/net-misc/rsync/files/rsync-3.4.1-fix-uninitialized-mul_one.patch deleted file mode 100644 index d6bf6b0baf8b..000000000000 --- a/net-misc/rsync/files/rsync-3.4.1-fix-uninitialized-mul_one.patch +++ /dev/null @@ -1,202 +0,0 @@ -https://github.com/RsyncProject/rsync/commit/aa142f08ef31d3ffa8d6b3b8af16d00324a98c1b - -From: Andrew Tridgell <[email protected]> -Date: Sun, 1 Mar 2026 08:42:04 +1100 -Subject: [PATCH] fix uninitialized mul_one in AVX2 checksum and add SIMD checksum test - -The AVX2 get_checksum1_avx2_64() read mul_one before initializing it, -which is undefined behavior. Replace the cmpeq/abs trick with -_mm256_set1_epi8(1) to match the SSSE3 and SSE2 versions. - -Add a TEST_SIMD_CHECKSUM1 test mode that verifies all SIMD paths -(SSE2, SSSE3, AVX2, and the full dispatch chain) produce identical -results to the C reference, across multiple buffer sizes with both -aligned and unaligned buffers. - -Co-Authored-By: Claude Opus 4.6 <noreply-IarDGxEC4Up8UrSeD/[email protected]> ---- - Makefile.in | 11 +++- - simd-checksum-x86_64.cpp | 115 ++++++++++++++++++++++++++++++++++- - testsuite/simd-checksum.test | 11 ++++ - 3 files changed, 134 insertions(+), 3 deletions(-) - create mode 100755 testsuite/simd-checksum.test - -diff --git a/Makefile.in b/Makefile.in -index 6340403be..6f188ee8a 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -57,7 +57,8 @@ TLS_OBJ = tls.o syscall.o util2.o t_stub.o lib/compat.o lib/snprintf.o lib/perms - - # Programs we must have to run the test cases - CHECK_PROGS = rsync$(EXEEXT) tls$(EXEEXT) getgroups$(EXEEXT) getfsdev$(EXEEXT) \ -- testrun$(EXEEXT) trimslash$(EXEEXT) t_unsafe$(EXEEXT) wildtest$(EXEEXT) -+ testrun$(EXEEXT) trimslash$(EXEEXT) t_unsafe$(EXEEXT) wildtest$(EXEEXT) \ -+ simdtest$(EXEEXT) - - CHECK_SYMLINKS = testsuite/chown-fake.test testsuite/devices-fake.test testsuite/xattrs-hlink.test - -@@ -326,6 +327,14 @@ wildtest.o: wildtest.c t_stub.o lib/wildmatch.c rsync.h config.h - wildtest$(EXEEXT): wildtest.o lib/compat.o lib/snprintf.o @BUILD_POPT@ - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ wildtest.o lib/compat.o lib/snprintf.o @BUILD_POPT@ $(LIBS) - -+simdtest$(EXEEXT): simd-checksum-x86_64.cpp $(HEADERS) -+ @if test x"@ROLL_SIMD@" != x; then \ -+ $(CXX) -I. $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -DTEST_SIMD_CHECKSUM1 \ -+ -o $@ $(srcdir)/simd-checksum-x86_64.cpp @ROLL_ASM@ $(LIBS); \ -+ else \ -+ touch $@; \ -+ fi -+ - testsuite/chown-fake.test: - ln -s chown.test $(srcdir)/testsuite/chown-fake.test - -diff --git a/simd-checksum-x86_64.cpp b/simd-checksum-x86_64.cpp -index d649091ea..99391cbe4 100644 ---- a/simd-checksum-x86_64.cpp -+++ b/simd-checksum-x86_64.cpp -@@ -347,8 +347,7 @@ __attribute__ ((target("avx2"))) MVSTATIC int32 get_checksum1_avx2_64(schar* buf - __m128i tmp = _mm_load_si128((__m128i*) mul_t1_buf); - __m256i mul_t1 = _mm256_cvtepu8_epi16(tmp); - __m256i mul_const = _mm256_broadcastd_epi32(_mm_cvtsi32_si128(4 | (3 << 8) | (2 << 16) | (1 << 24))); -- __m256i mul_one; -- mul_one = _mm256_abs_epi8(_mm256_cmpeq_epi16(mul_one,mul_one)); // set all vector elements to 1 -+ __m256i mul_one = _mm256_set1_epi8(1); - - for (; i < (len-64); i+=64) { - // Load ... 4*[int8*16] -@@ -548,6 +547,118 @@ int main() { - #pragma clang optimize on - #endif /* BENCHMARK_SIMD_CHECKSUM1 */ - -+#ifdef TEST_SIMD_CHECKSUM1 -+ -+static uint32 checksum_via_default(char *buf, int32 len) -+{ -+ uint32 s1 = 0, s2 = 0; -+ get_checksum1_default_1((schar*)buf, len, 0, &s1, &s2); -+ return (s1 & 0xffff) + (s2 << 16); -+} -+ -+static uint32 checksum_via_sse2(char *buf, int32 len) -+{ -+ int32 i; -+ uint32 s1 = 0, s2 = 0; -+ i = get_checksum1_sse2_32((schar*)buf, len, 0, &s1, &s2); -+ get_checksum1_default_1((schar*)buf, len, i, &s1, &s2); -+ return (s1 & 0xffff) + (s2 << 16); -+} -+ -+static uint32 checksum_via_ssse3(char *buf, int32 len) -+{ -+ int32 i; -+ uint32 s1 = 0, s2 = 0; -+ i = get_checksum1_ssse3_32((schar*)buf, len, 0, &s1, &s2); -+ get_checksum1_default_1((schar*)buf, len, i, &s1, &s2); -+ return (s1 & 0xffff) + (s2 << 16); -+} -+ -+static uint32 checksum_via_avx2(char *buf, int32 len) -+{ -+ int32 i; -+ uint32 s1 = 0, s2 = 0; -+#ifdef USE_ROLL_ASM -+ i = get_checksum1_avx2_asm((schar*)buf, len, 0, &s1, &s2); -+#else -+ i = get_checksum1_avx2_64((schar*)buf, len, 0, &s1, &s2); -+#endif -+ get_checksum1_default_1((schar*)buf, len, i, &s1, &s2); -+ return (s1 & 0xffff) + (s2 << 16); -+} -+ -+int main() -+{ -+ static const int sizes[] = {1, 4, 31, 32, 33, 63, 64, 65, 128, 129, 256, 700, 1024, 4096, 65536}; -+ int num_sizes = sizeof(sizes) / sizeof(sizes[0]); -+ int max_size = sizes[num_sizes - 1]; -+ int failures = 0; -+ -+ /* Allocate with extra bytes for unaligned test */ -+ unsigned char *raw = (unsigned char *)malloc(max_size + 64 + 1); -+ if (!raw) { -+ fprintf(stderr, "malloc failed\n"); -+ return 1; -+ } -+ -+ /* Fill with deterministic data */ -+ for (int i = 0; i < max_size + 64 + 1; i++) -+ raw[i] = (i + (i % 3) + (i % 11)) % 256; -+ -+ /* Test with aligned buffer (64-byte aligned) */ -+ unsigned char *aligned = raw + (64 - ((uintptr_t)raw % 64)); -+ -+ /* Test with unaligned buffer (+1 byte offset) */ -+ unsigned char *unaligned = aligned + 1; -+ -+ struct { const char *name; unsigned char *buf; } buffers[] = { -+ {"aligned", aligned}, -+ {"unaligned", unaligned}, -+ }; -+ -+ for (int b = 0; b < 2; b++) { -+ char *buf = (char *)buffers[b].buf; -+ const char *bname = buffers[b].name; -+ -+ for (int s = 0; s < num_sizes; s++) { -+ int32 len = sizes[s]; -+ uint32 ref = checksum_via_default(buf, len); -+ uint32 cs_sse2 = checksum_via_sse2(buf, len); -+ uint32 cs_ssse3 = checksum_via_ssse3(buf, len); -+ uint32 cs_avx2 = checksum_via_avx2(buf, len); -+ uint32 cs_auto = get_checksum1(buf, len); -+ -+ if (cs_sse2 != ref) { -+ printf("FAIL %-9s size=%5d: SSE2=%08x ref=%08x\n", bname, len, cs_sse2, ref); -+ failures++; -+ } -+ if (cs_ssse3 != ref) { -+ printf("FAIL %-9s size=%5d: SSSE3=%08x ref=%08x\n", bname, len, cs_ssse3, ref); -+ failures++; -+ } -+ if (cs_avx2 != ref) { -+ printf("FAIL %-9s size=%5d: AVX2=%08x ref=%08x\n", bname, len, cs_avx2, ref); -+ failures++; -+ } -+ if (cs_auto != ref) { -+ printf("FAIL %-9s size=%5d: auto=%08x ref=%08x\n", bname, len, cs_auto, ref); -+ failures++; -+ } -+ } -+ } -+ -+ free(raw); -+ -+ if (failures) { -+ printf("%d checksum mismatches!\n", failures); -+ return 1; -+ } -+ printf("All SIMD checksum tests passed.\n"); -+ return 0; -+} -+ -+#endif /* TEST_SIMD_CHECKSUM1 */ -+ - #endif /* } USE_ROLL_SIMD */ - #endif /* } __cplusplus */ - #endif /* } __x86_64__ */ -diff --git a/testsuite/simd-checksum.test b/testsuite/simd-checksum.test -new file mode 100755 -index 000000000..cf7dba2ec ---- /dev/null -+++ b/testsuite/simd-checksum.test -@@ -0,0 +1,11 @@ -+#!/bin/sh -+ -+# Test SIMD checksum implementations against the C reference -+ -+. "$suitedir/rsync.fns" -+ -+if ! test -x "$TOOLDIR/simdtest"; then -+ test_skipped "simdtest not built (SIMD not available)" -+fi -+ -+"$TOOLDIR/simdtest" diff --git a/net-misc/rsync/files/rsync-3.4.1-glibc-2.43.patch b/net-misc/rsync/files/rsync-3.4.1-glibc-2.43.patch deleted file mode 100644 index b4e53fb167e7..000000000000 --- a/net-misc/rsync/files/rsync-3.4.1-glibc-2.43.patch +++ /dev/null @@ -1,77 +0,0 @@ -Manual backport of https://github.com/RsyncProject/rsync/pull/867 - ---- a/access.c -+++ b/access.c -@@ -99,7 +99,7 @@ static void make_mask(char *mask, int pl - return; - } - --static int match_address(const char *addr, const char *tok) -+static int match_address(const char *addr, char *tok) - { - char *p; - struct addrinfo hints, *resa, *rest; ---- a/checksum.c -+++ b/checksum.c -@@ -176,7 +176,7 @@ void parse_checksum_choice(int final_cal - if (valid_checksums.negotiated_nni) - xfer_sum_nni = file_sum_nni = valid_checksums.negotiated_nni; - else { -- char *cp = checksum_choice ? strchr(checksum_choice, ',') : NULL; -+ const char *cp = checksum_choice ? strchr(checksum_choice, ',') : NULL; - if (cp) { - xfer_sum_nni = parse_csum_name(checksum_choice, cp - checksum_choice); - file_sum_nni = parse_csum_name(cp+1, -1); ---- a/compat.c -+++ b/compat.c -@@ -131,7 +131,7 @@ static const char *client_info; - * of that protocol for it to be advertised as available. */ - static void check_sub_protocol(void) - { -- char *dot; -+ const char *dot; - int their_protocol, their_sub; - int our_sub = get_subprotocol_version(); - -@@ -414,7 +414,7 @@ static const char *getenv_nstr(int ntype - env_str = ntype == NSTR_COMPRESS ? "zlib" : protocol_version >= 30 ? "md5" : "md4"; - - if (am_server && env_str) { -- char *cp = strchr(env_str, '&'); -+ const char *cp = strchr(env_str, '&'); - if (cp) - env_str = cp + 1; - } ---- a/exclude.c -+++ b/exclude.c -@@ -904,7 +904,7 @@ static int rule_matches(const char *fnam - { - int slash_handling, str_cnt = 0, anchored_match = 0; - int ret_match = ex->rflags & FILTRULE_NEGATE ? 0 : 1; -- char *p, *pattern = ex->pattern; -+ const char *p, *pattern = ex->pattern; - const char *strings[16]; /* more than enough */ - const char *name = fname + (*fname == '/'); - ---- a/io.c -+++ b/io.c -@@ -1159,7 +1159,7 @@ void set_io_timeout(int secs) - static void check_for_d_option_error(const char *msg) - { - static char rsync263_opts[] = "BCDHIKLPRSTWabceghlnopqrtuvxz"; -- char *colon; -+ const char *colon; - int saw_d = 0; - - if (*msg != 'r' ---- a/loadparm.c -+++ b/loadparm.c -@@ -178,7 +178,7 @@ static char *expand_vars(const char *str - - for (t = buf, f = str; bufsize && *f; ) { - if (*f == '%' && isUpper(f+1)) { -- char *percent = strchr(f+1, '%'); -+ const char *percent = strchr(f+1, '%'); - if (percent && percent - f < bufsize) { - char *val; - strlcpy(t, f+1, percent - f); diff --git a/net-misc/rsync/rsync-3.4.1-r2.ebuild b/net-misc/rsync/rsync-3.4.1-r2.ebuild deleted file mode 100644 index 052f932664c2..000000000000 --- a/net-misc/rsync/rsync-3.4.1-r2.ebuild +++ /dev/null @@ -1,207 +0,0 @@ -# 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_{11..13} ) -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/WayneD/rsync.git" - inherit autotools git-r3 - - REQUIRED_USE="${PYTHON_REQUIRED_USE}" -else - 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" - 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" - fi - - SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz - verify-sig? ( https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz.asc )" - S="${WORKDIR}"/${P/_/} -fi - -LICENSE="GPL-3" -SLOT="0" -IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr +xxhash zstd" -REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" -REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )" - -# attr is autodetected and then dropped by -Wl,--as-needed: -# https://github.com/RsyncProject/rsync/pull/753 -RDEPEND=" - >=dev-libs/popt-1.19 - acl? ( virtual/acl ) - examples? ( - ${PYTHON_DEPS} - dev-lang/perl - ) - 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:= ) - iconv? ( virtual/libiconv )" -DEPEND="${RDEPEND}" -BDEPEND=" - examples? ( ${PYTHON_DEPS} ) - rrsync? ( ${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 - -PATCHES=( - "${FILESDIR}"/${PN}-3.4.1-c23.patch - "${FILESDIR}"/${PN}-3.4.1-CVE-2025-10158.patch -) - -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; 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 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) - ) - - # https://github.com/WayneD/rsync/pull/428 - if is-flagq -fsanitize=undefined ; then - sed -E -i \ - -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ - byteorder.h || die - append-flags -DCAREFUL_ALIGNMENT - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - emake DESTDIR="${D}" install - - newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd - newinitd "${FILESDIR}"/rsyncd.init.d-r1 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 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 -} - -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 -} diff --git a/net-misc/rsync/rsync-3.4.1-r3.ebuild b/net-misc/rsync/rsync-3.4.1-r3.ebuild deleted file mode 100644 index b02c3a09509d..000000000000 --- a/net-misc/rsync/rsync-3.4.1-r3.ebuild +++ /dev/null @@ -1,213 +0,0 @@ -# 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_{11..14} ) -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/WayneD/rsync.git" - inherit autotools git-r3 - - REQUIRED_USE="${PYTHON_REQUIRED_USE}" -else - 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" - 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" - fi - - SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz - verify-sig? ( https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz.asc )" - S="${WORKDIR}"/${P/_/} -fi - -LICENSE="GPL-3" -SLOT="0" -IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr +xxhash zstd" -REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" -REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )" - -# attr is autodetected and then dropped by -Wl,--as-needed: -# https://github.com/RsyncProject/rsync/pull/753 -RDEPEND=" - >=dev-libs/popt-1.19 - acl? ( virtual/acl ) - examples? ( - ${PYTHON_DEPS} - dev-lang/perl - ) - 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:= ) - iconv? ( virtual/libiconv )" -DEPEND="${RDEPEND}" -BDEPEND=" - examples? ( ${PYTHON_DEPS} ) - rrsync? ( ${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 - -PATCHES=( - "${FILESDIR}"/${PN}-3.4.1-c23.patch - "${FILESDIR}"/${PN}-3.4.1-CVE-2025-10158.patch - "${FILESDIR}"/${PN}-3.4.1-fix-uninitialized-mul_one.patch - "${FILESDIR}"/${PN}-3.4.1-glibc-2.43.patch -) - -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; 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 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) - ) - - # https://github.com/WayneD/rsync/pull/428 - if is-flagq -fsanitize=undefined ; then - sed -E -i \ - -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ - byteorder.h || die - append-flags -DCAREFUL_ALIGNMENT - fi - - # workaround for autoconf-2.73 using C23: - # https://bugs.gentoo.org/972320 - append-cflags -std=gnu17 - - econf "${myeconfargs[@]}" -} - -src_install() { - emake DESTDIR="${D}" install - - newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd - newinitd "${FILESDIR}"/rsyncd.init.d-r1 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 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 -} - -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 -} diff --git a/net-misc/rsync/rsync-3.4.2.ebuild b/net-misc/rsync/rsync-3.4.2.ebuild deleted file mode 100644 index 6c68357a2a5c..000000000000 --- a/net-misc/rsync/rsync-3.4.2.ebuild +++ /dev/null @@ -1,200 +0,0 @@ -# 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_{11..14} ) -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/WayneD/rsync.git" - inherit autotools git-r3 - - REQUIRED_USE="${PYTHON_REQUIRED_USE}" -else - 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" - 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" - fi - - SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz - verify-sig? ( https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz.asc )" - S="${WORKDIR}"/${P/_/} -fi - -LICENSE="GPL-3" -SLOT="0" -IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr +xxhash zstd" -REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" -REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND=" - >=dev-libs/popt-1.19 - acl? ( virtual/acl ) - examples? ( - ${PYTHON_DEPS} - dev-lang/perl - ) - 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:= ) - iconv? ( virtual/libiconv )" -DEPEND="${RDEPEND}" -BDEPEND=" - examples? ( ${PYTHON_DEPS} ) - rrsync? ( ${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; 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 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) - ) - - # https://github.com/WayneD/rsync/pull/428 - if is-flagq -fsanitize=undefined ; then - sed -E -i \ - -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ - byteorder.h || die - append-flags -DCAREFUL_ALIGNMENT - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - emake DESTDIR="${D}" install - - newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd - newinitd "${FILESDIR}"/rsyncd.init.d-r1 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 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 -} - -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 -} diff --git a/net-misc/rsync/rsync-3.4.3.ebuild b/net-misc/rsync/rsync-3.4.3.ebuild deleted file mode 100644 index d445ea8ae4cd..000000000000 --- a/net-misc/rsync/rsync-3.4.3.ebuild +++ /dev/null @@ -1,200 +0,0 @@ -# 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_{11..14} ) -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/WayneD/rsync.git" - inherit autotools git-r3 - - REQUIRED_USE="${PYTHON_REQUIRED_USE}" -else - 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" - 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" - fi - - SRC_URI="https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz - verify-sig? ( https://rsync.samba.org/ftp/rsync/${SRC_DIR}/${P/_/}.tar.gz.asc )" - S="${WORKDIR}"/${P/_/} -fi - -LICENSE="GPL-3" -SLOT="0" -IUSE="acl examples iconv lz4 rrsync ssl stunnel system-zlib xattr +xxhash zstd" -REQUIRED_USE+=" examples? ( ${PYTHON_REQUIRED_USE} )" -REQUIRED_USE+=" rrsync? ( ${PYTHON_REQUIRED_USE} )" - -RDEPEND=" - >=dev-libs/popt-1.19 - acl? ( virtual/acl ) - examples? ( - ${PYTHON_DEPS} - dev-lang/perl - ) - 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:= ) - iconv? ( virtual/libiconv )" -DEPEND="${RDEPEND}" -BDEPEND=" - examples? ( ${PYTHON_DEPS} ) - rrsync? ( ${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; 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 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) - ) - - # https://github.com/WayneD/rsync/pull/428 - if is-flagq -fsanitize=undefined ; then - sed -E -i \ - -e 's:#define CAREFUL_ALIGNMENT (0|1):#define CAREFUL_ALIGNMENT 1:' \ - byteorder.h || die - append-flags -DCAREFUL_ALIGNMENT - fi - - econf "${myeconfargs[@]}" -} - -src_install() { - emake DESTDIR="${D}" install - - newconfd "${FILESDIR}"/rsyncd.conf.d rsyncd - newinitd "${FILESDIR}"/rsyncd.init.d-r1 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 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 -} - -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 -}