mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-22 16:29:05 -07:00
net-misc/rsync-bpc: fix several modernc issues and warnings
This commit fixes implicit function declaration errors and other modernc issues. It also fixes several warnings about deprecated or wrongly used headers. Configuration options added by these fixes are also adopted by adding some new use flags. Closes: https://bugs.gentoo.org/900312 Closes: https://bugs.gentoo.org/944357 Closes: https://bugs.gentoo.org/854612 Signed-off-by: Dennis Eisele <kernlpanic@dennis-eisele.de> Part-of: https://github.com/gentoo/gentoo/pull/42908 Closes: https://github.com/gentoo/gentoo/pull/42908 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST rsync-bpc-3.1.3.0.tar.gz 883808 BLAKE2B 56cb299fb75219043364344d6575a443e32b5992a00f6691dde0f6b99c9b54d73d74bbef8dc98a9c927643985031e027df89d4aa1969d493e624290f28cb19f0 SHA512 24ae86c6108720d7f0ba6d144053ccba6499623018bc2bcff8f1d8e289f9c015f80e73244e965a7fcdccb5f9b2a876f1a54ceed42a19a80fd7c87c6b05c7701d
|
||||
DIST rsync-bpc_p20250706.tar.gz 890984 BLAKE2B 150e50722f55f55e4888c37eef8024ac1585fd7acfd04b6d3daf1e8c0de55162a76f07cbdc38032aa867c9f1138ed403a398ffff26fee479a6e8da2abe95f58d SHA512 97699afd832e3ce1c280396ac78651eb821e8da48cf297aab884edbc63de0ee33862093823d7cb40e115b5577f63060b5700ca76e76c7bcd8b7efeee59888529
|
||||
|
||||
@@ -1,14 +1,30 @@
|
||||
--- rsync-bpc-3.1.3.0/configure.ac.old 2025-02-21 20:05:47.000000000 -0600
|
||||
+++ rsync-bpc-3.1.3.0/configure.ac 2025-02-21 20:02:27.000000000 -0600
|
||||
@@ -852,7 +852,9 @@
|
||||
|
||||
AC_CACHE_CHECK([if gettimeofday takes tz argument],rsync_cv_HAVE_GETTIMEOFDAY_TZ,[
|
||||
From 7ea8fe71a2e2f0ed4013cb9dcdea046c846e3c14 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Hasenack <andreas.hasenack@canonical.com>
|
||||
Date: Wed, 17 Apr 2024 20:49:13 -0300
|
||||
Subject: [PATCH] configure.ac: fix gettimeofday() args detection
|
||||
|
||||
The configure check for gettimeofday() was failing not because of the
|
||||
arguments, but because exit() was undeclared.
|
||||
|
||||
conftest.c: In function 'main':
|
||||
conftest.c:177:20: error: implicit declaration of function 'exit' [-Werror=implicit-function-declaration]
|
||||
177 | struct timeval tv; exit(gettimeofday(&tv, NULL));
|
||||
| ^~~~
|
||||
conftest.c:174:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
|
||||
---
|
||||
configure.ac | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index cc685cb..b240cbe 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1148,6 +1148,7 @@ AC_CACHE_CHECK([if gettimeofday takes tz argument],rsync_cv_HAVE_GETTIMEOFDAY_TZ
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>
|
||||
-#include <unistd.h>]], [[struct timeval tv; exit(gettimeofday(&tv, NULL));]])],[rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes],[rsync_cv_HAVE_GETTIMEOFDAY_TZ=no])])
|
||||
+#ifdef HAVE_UNISTD_H
|
||||
+#include <unistd.h>
|
||||
+#endif]], [[struct timeval tv; return gettimeofday(&tv, NULL);]])],[rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes],[rsync_cv_HAVE_GETTIMEOFDAY_TZ=no])])
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
+#include <stdlib.h>
|
||||
#endif]], [[struct timeval tv; return gettimeofday(&tv, NULL);]])],[rsync_cv_HAVE_GETTIMEOFDAY_TZ=yes],[rsync_cv_HAVE_GETTIMEOFDAY_TZ=no])])
|
||||
if test x"$rsync_cv_HAVE_GETTIMEOFDAY_TZ" != x"no"; then
|
||||
AC_DEFINE(HAVE_GETTIMEOFDAY_TZ, 1, [Define to 1 if gettimeofday() takes a time-zone arg])
|
||||
fi
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
From 6466b0b0c537d135cf10fecb598bfd6d40194e37 Mon Sep 17 00:00:00 2001
|
||||
From: Dennis Eisele <kernlpanic@dennis-eisele.de>
|
||||
Date: Sun, 6 Jul 2025 17:57:24 +0200
|
||||
Subject: [PATCH] hlink.c: fix function pointer cast in qsort()
|
||||
|
||||
Proposed-by: Charalampos Mitrodimas <charmitro@posteo.net>
|
||||
---
|
||||
hlink.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hlink.c b/hlink.c
|
||||
index 5a1e342..43ce6ec 100644
|
||||
--- a/hlink.c
|
||||
+++ b/hlink.c
|
||||
@@ -121,7 +121,7 @@ static void match_gnums(int32 *ndx_list, int ndx_count)
|
||||
int32 gnum, gnum_next;
|
||||
|
||||
qsort(ndx_list, ndx_count, sizeof ndx_list[0],
|
||||
- (int (*)()) hlink_compare_gnum);
|
||||
+ (int (*)(const void*, const void*)) hlink_compare_gnum);
|
||||
|
||||
if ( inc_recurse && prior_hlinks && hlink_nlinks ) {
|
||||
for (from = 0; from < ndx_count; from++) {
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
From f31696ea58bac1e24c6a64fb854cba3441690c20 Mon Sep 17 00:00:00 2001
|
||||
From: Dennis Eisele <kernlpanic@dennis-eisele.de>
|
||||
Date: Sun, 6 Jul 2025 22:56:01 +0200
|
||||
Subject: [PATCH] Prevent xattr warning
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Proposed-by: Holger Hoffstätte <holger@applied-asynchrony.com>
|
||||
---
|
||||
Makefile.in | 1 +
|
||||
lib/sysxattrs.h | 6 +++---
|
||||
2 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index de70a44..6117a4f 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -83,6 +83,7 @@ $(BPCOBJ): backuppc/backuppc.h
|
||||
$(OBJS): $(HEADERS)
|
||||
$(CHECK_OBJS): $(HEADERS)
|
||||
|
||||
+tls.o xattrs.o: lib/sysxattrs.h
|
||||
flist.o: rounding.h
|
||||
|
||||
rounding.h: rounding.c rsync.h proto.h
|
||||
diff --git a/lib/sysxattrs.h b/lib/sysxattrs.h
|
||||
index 428421a..024bbd1 100644
|
||||
--- a/lib/sysxattrs.h
|
||||
+++ b/lib/sysxattrs.h
|
||||
@@ -1,9 +1,9 @@
|
||||
#ifdef SUPPORT_XATTRS
|
||||
|
||||
-#if defined HAVE_ATTR_XATTR_H
|
||||
-#include <attr/xattr.h>
|
||||
-#elif defined HAVE_SYS_XATTR_H
|
||||
+#if defined HAVE_SYS_XATTR_H
|
||||
#include <sys/xattr.h>
|
||||
+#elif defined HAVE_ATTR_XATTR_H
|
||||
+#include <attr/xattr.h>
|
||||
#elif defined HAVE_SYS_EXTATTR_H
|
||||
#include <sys/extattr.h>
|
||||
#endif
|
||||
|
||||
@@ -12,4 +12,9 @@
|
||||
<upstream>
|
||||
<remote-id type="github">backuppc/rsync-bpc</remote-id>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="acl">Enable acl support</flag>
|
||||
<flag name="xxhash">Enable support for xxhash</flag>
|
||||
<flag name="lz4">Enable support for lz4</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
51
net-misc/rsync-bpc/rsync-bpc-3.1.3.0_p20250706.ebuild
Normal file
51
net-misc/rsync-bpc/rsync-bpc-3.1.3.0_p20250706.ebuild
Normal file
@@ -0,0 +1,51 @@
|
||||
# Copyright 2022-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit autotools
|
||||
|
||||
COMMIT=ed6c77370ebd6e2bbd986606757146941ada6857
|
||||
MY_P=${PN}-${COMMIT}
|
||||
|
||||
DESCRIPTION="Rsync-bpc is a customized version of rsync that is used as part of BackupPC"
|
||||
HOMEPAGE="https://github.com/backuppc/rsync-bpc"
|
||||
SRC_URI="https://github.com/backuppc/rsync-bpc/archive/ed6c77370ebd6e2bbd986606757146941ada6857.tar.gz -> ${PN}_p20250706.tar.gz"
|
||||
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="acl lz4 xxhash"
|
||||
|
||||
RDEPEND="
|
||||
virtual/ssh
|
||||
>=dev-libs/popt-1.5
|
||||
acl? ( virtual/acl )
|
||||
lz4? ( app-arch/lz4:= )
|
||||
xxhash? ( >=dev-libs/xxhash-0.8 )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-3.1.3.0-fix-gettimeofday-error.patch" #874666
|
||||
"${FILESDIR}/${PN}-3.1.3.0-fix-qsort-call.patch" #944357
|
||||
"${FILESDIR}/${PN}-3.1.3.0-fix-xattr-warning.patch" #854612
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
sed -i -e 's/AC_HEADER_MAJOR_FIXED/AC_HEADER_MAJOR/' configure.ac
|
||||
eaclocal -I m4
|
||||
eautoconf -o configure.sh
|
||||
}
|
||||
|
||||
src_configure(){
|
||||
econf \
|
||||
--disable-md2man \
|
||||
--without-included-popt \
|
||||
--enable-ipv6 \
|
||||
$(use_enable acl acl-support) \
|
||||
$(use_enable lz4) \
|
||||
$(use_enable xxhash)
|
||||
}
|
||||
Reference in New Issue
Block a user