Re: git: 0d316feccaf8 - main - sysutils/cpdup-FreeBSD: Add FreeBSD fork of cpdup
Date: Wed, 26 Feb 2025 07:38:40 UTC
On 26/02/25 05:06, Cy Schubert wrote:
> In message <202502252200.51PM0JNl002582@gitrepo.freebsd.org>, Guido Falsi
> write
> s:
>> The branch main has been updated by madpilot:
>>
>> URL: https://cgit.FreeBSD.org/ports/commit/?id=0d316feccaf89c1bd804d600127442
>> 6a7135c93a
>>
>> commit 0d316feccaf89c1bd804d6001274426a7135c93a
>> Author: Guido Falsi <madpilot@FreeBSD.org>
>> AuthorDate: 2025-02-25 21:58:58 +0000
>> Commit: Guido Falsi <madpilot@FreeBSD.org>
>> CommitDate: 2025-02-25 21:58:58 +0000
>>
>> sysutils/cpdup-FreeBSD: Add FreeBSD fork of cpdup
>>
>> Add a fork of cpdup, including patches to support copy_file_range(2)
>> and allowing to choose checksum algorithm.
>>
>> Thanks to mm for providing the required patches to the fork.
>>
>> Assign port to cpdup maintainer
>>
>> Approved by: Gianmarco Giovannelli <gmarco@giovannelli.it> (maintainer
>> )
>> ---
>> sysutils/Makefile | 1 +
>> sysutils/cpdup-FreeBSD/Makefile | 22 ++++++++++++++++++++++
>> sysutils/cpdup-FreeBSD/distinfo | 3 +++
>> sysutils/cpdup-FreeBSD/files/patch-Makefile.bsd | 11 +++++++++++
>> sysutils/cpdup-FreeBSD/pkg-descr | 9 +++++++++
>> sysutils/cpdup/Makefile | 2 ++
>> 6 files changed, 48 insertions(+)
>>
>> diff --git a/sysutils/Makefile b/sysutils/Makefile
>> index e9cf3cf53bb3..ea8c5a687551 100644
>> --- a/sysutils/Makefile
>> +++ b/sysutils/Makefile
>> @@ -236,6 +236,7 @@
>> SUBDIR += coreos-ct
>> SUBDIR += coreutils
>> SUBDIR += cpdup
>> + SUBDIR += cpdup-FreeBSD
>> SUBDIR += cpu-microcode
>> SUBDIR += cpu-microcode-amd
>> SUBDIR += cpu-microcode-intel
>> diff --git a/sysutils/cpdup-FreeBSD/Makefile b/sysutils/cpdup-FreeBSD/Makefil
>> e
>> new file mode 100644
>> index 000000000000..e98c449cd03a
>> --- /dev/null
>> +++ b/sysutils/cpdup-FreeBSD/Makefile
>> @@ -0,0 +1,22 @@
>> +PORTNAME= cpdup
>> +DISTVERSION= 1.0.0
>> +CATEGORIES= sysutils
>> +PKGNAMESUFFIX= -FreeBSD
>> +
>> +MAINTAINER= gmarco@giovannelli.it
>> +COMMENT= Comprehensive filesystem mirroring and backup program
>> +WWW= https://github.com/freebsd/cpdup
>> +
>> +LICENSE= BSD3CLAUSE
>> +
>> +USES= ssl tar:xz
>> +USE_GITHUB= yes
>> +GH_ACCOUNT= freebsd
>> +MAKEFILE= Makefile.bsd
>> +
>> +CONFLICTS_INSTALL= cpdup
>> +
>> +PLIST_FILES= bin/cpdup \
>> + share/man/man1/cpdup.1.gz
>> +
>> +.include <bsd.port.mk>
>> diff --git a/sysutils/cpdup-FreeBSD/distinfo b/sysutils/cpdup-FreeBSD/distinf
>> o
>> new file mode 100644
>> index 000000000000..427084c3b7ec
>> --- /dev/null
>> +++ b/sysutils/cpdup-FreeBSD/distinfo
>> @@ -0,0 +1,3 @@
>> +TIMESTAMP = 1739815106
>> +SHA256 (freebsd-cpdup-1.0.0_GH0.tar.gz) = 216d7416f23df392a4218120ee8b4d66dd
>> ab04f7c3677b8bfd7c6fea8383aa26
>> +SIZE (freebsd-cpdup-1.0.0_GH0.tar.gz) = 45939
>> diff --git a/sysutils/cpdup-FreeBSD/files/patch-Makefile.bsd b/sysutils/cpdup
>> -FreeBSD/files/patch-Makefile.bsd
>> new file mode 100644
>> index 000000000000..89789d24a958
>> --- /dev/null
>> +++ b/sysutils/cpdup-FreeBSD/files/patch-Makefile.bsd
>> @@ -0,0 +1,11 @@
>> +--- Makefile.bsd.orig 2023-11-30 11:20:48 UTC
>> ++++ Makefile.bsd
>> +@@ -11,7 +11,7 @@ BINDIR?= ${PREFIX}/bin
>> + CFLAGS+= -D_ST_FLAGS_PRESENT_
>> + PREFIX?= /usr/local
>> + BINDIR?= ${PREFIX}/bin
>> +-MANDIR?= ${PREFIX}/man/man
>> ++MANDIR?= ${PREFIX}/share/man/man
>> +
>> + .include <bsd.prog.mk>
>> +
>> diff --git a/sysutils/cpdup-FreeBSD/pkg-descr b/sysutils/cpdup-FreeBSD/pkg-de
>> scr
>> new file mode 100644
>> index 000000000000..f432acb29e51
>> --- /dev/null
>> +++ b/sysutils/cpdup-FreeBSD/pkg-descr
>> @@ -0,0 +1,9 @@
>> +cpdup-FreeBSD is a FreeBSD fork of cpdup, a powerful filesystem mirroring
>> +and backup utility which also has file integrity testing features, supports
>> +incremental backups, and remote mirroring via ssh.
>> +
>> +This fork supports copy_file_range(2) and allows choosing checksum
>> +algorithm.
>> +
>> +Note: This port does not copy (or mirror) any FreeBSD supported ACL
>> +types and Extended Attributes nor MAC labels.
>> diff --git a/sysutils/cpdup/Makefile b/sysutils/cpdup/Makefile
>> index e25e3c69aef2..51e2ad7e8a15 100644
>> --- a/sysutils/cpdup/Makefile
>> +++ b/sysutils/cpdup/Makefile
>> @@ -15,6 +15,8 @@ GH_TUPLE= DragonFlyBSD:${PORTNAME}:v${PORTVERSION}
>> MAKEFILE= GNUmakefile
>> MAKE_ARGS+= LIBS="-L${OPENSSLLIB} -lcrypto"
>>
>> +CONFLICTS_INSTALL= cpdup-FreeBSD
>> +
>> PLIST_FILES= bin/cpdup share/man/man1/cpdup.1.gz
>>
>> post-patch:
>>
>
> This fails to build under poudriere.
>
> ===> Staging for cpdup-FreeBSD-1.0.0
> ===> Generating temporary packing list
> install -s -o root -g wheel -m 555 cpdup /wrkdirs/usr/ports/sysutils/cpdu
> p-FreeBSD/work/stage/usr/local/bin/cpdup
> install: /wrkdirs/usr/ports/sysutils/cpdup-FreeBSD/work/stage/usr/local/bin/
> cpdup: chown/chgrp: Operation not permitted
> *** Error code 71
>
> Stop.
> make: stopped making "install" in /wrkdirs/usr/ports/sysutils/cpdup-FreeBSD/
> work/cpdup-1.0.0
> *** Error code 1
>
> Stop.
> make: stopped making "stage" in /usr/ports/sysutils/cpdup-FreeBSD
> =>> Cleaning up wrkdir
> ===> Cleaning for cpdup-FreeBSD-1.0.0
>
> You need to add USES=uidfix to your Makefile.
>
>
Thanks for reporting!
Strange it has been working fine in my poudriere, anyway I'm going to
add the suggested fix shortly.
--
Guido Falsi <madpilot@FreeBSD.org>