On 2024/07/01 18:32, Bryan Vyhmeister wrote: > I updated the title based on the discussion and what this patch actually > does now. I have a particular project that needs zstd compression with > rsync. I can modify the port in my own tree to build zstd into the port > but I would prefer not to have to maintain a private package repository. > Based on the information about zstd out there, it might be a benefit as > the compression in a lot of scenarios where rsync is used. The > discussion led to the suggestion of adding zstd, lz4, and iconv into the > standard rsync build and then adding a -minimal flavor that keeps those > options out. I have been running rsync this way and it works great. Any > feedback on this?
Running on my anoncvs/reposync server. It would be nice to have something more cpu-efficient than the rather heavier gzip compression in the package binaries. With the port setup this way, someone running "pkg_add rsync" will get the choice between rsync-3.3.0p1-minimal and rsync-3.3.0p1. Does that seem acceptable to people who complained last time zstd/lz4 were enabled in the rsync port? (the commit log doesn't mention names). One small problem, it needs @pkgpath net/rsync,iconv in the PLIST for the standard (!mimimal) flavour so that updates work sensibly (add a PFRAG.no-minimal file containing that line, and !%%minimal%% in PLIST so that it gets included, check with "make print-plist | grep pkgpath" and "FLAVOR=minimal make print-plist | grep pkgpath"). > Index: net/rsync/Makefile > =================================================================== > RCS file: /cvs/ports/net/rsync/Makefile,v > retrieving revision 1.103 > diff -u -p -u -r1.103 Makefile > --- net/rsync/Makefile 6 May 2024 12:23:48 -0000 1.103 > +++ net/rsync/Makefile 26 Jun 2024 21:50:12 -0000 > @@ -3,15 +3,15 @@ COMMENT = mirroring/synchronization over > DISTNAME = rsync-3.3.0 > CATEGORIES = net > HOMEPAGE = https://rsync.samba.org/ > -REVISION = 0 > +REVISION = 1 > > -FLAVORS = iconv > +FLAVORS = minimal > FLAVOR ?= > > # GPLv3 > PERMIT_PACKAGE = Yes > > -WANTLIB = c crypto > +WANTLIB = c crypto iconv lz4 zstd > > SITES = https://rsync.samba.org/ftp/rsync/src/ \ > https://ftp.funet.fi/pub/mirrors/samba.org/pub/rsync/src/ > @@ -25,9 +25,7 @@ BUILD_DEPENDS = textproc/py-commonmark${ > > SEPARATE_BUILD =Yes > CONFIGURE_STYLE =gnu > -CONFIGURE_ARGS =--disable-lz4 \ > - --disable-zstd \ > - --with-included-popt \ > +CONFIGURE_ARGS =--with-included-popt \ > --with-included-zlib \ > --with-rrsync \ > --with-rsyncd-conf="${SYSCONFDIR}/rsyncd.conf" \ > @@ -35,7 +33,10 @@ CONFIGURE_ARGS =--disable-lz4 \ > --with-nobody-user=_rsync \ > --with-nobody-group=_rsync > CONFIGURE_ENV +=CPPFLAGS="-I${LOCALBASE}/include -DXXH_INLINE_ALL=1" \ > - ac_cv_search_XXH64_createState="" > + LDFLAGS='-L${LOCALBASE}/lib' ac_cv_search_XXH64_createState="" > +LIB_DEPENDS += archivers/lz4 \ > + archivers/zstd \ > + converters/libiconv > > .include <bsd.port.arch.mk> > > @@ -43,10 +44,11 @@ CONFIGURE_ENV +=CPPFLAGS="-I${LOCALBASE} > CONFIGURE_ARGS +=--enable-md5-asm > .endif > > -.if ${FLAVOR:Miconv} > -CONFIGURE_ENV +=LDFLAGS='-L${LOCALBASE}/lib' > -LIB_DEPENDS += converters/libiconv > -WANTLIB += iconv > +.if ${FLAVOR:Mminimal} > +CONFIGURE_ARGS +=--disable-lz4 \ > + --disable-zstd > +WANTLIB = c crypto > +LIB_DEPENDS = > .endif > > DOCDIR = ${PREFIX}/share/doc/rsync > Index: net/rsync/pkg/DESCR > =================================================================== > RCS file: /cvs/ports/net/rsync/pkg/DESCR,v > retrieving revision 1.6 > diff -u -p -u -r1.6 DESCR > --- net/rsync/pkg/DESCR 26 Apr 2024 13:26:27 -0000 1.6 > +++ net/rsync/pkg/DESCR 26 Jun 2024 21:50:12 -0000 > @@ -7,11 +7,12 @@ its delta-transfer algorithm, which redu > over the network by sending only the differences between the source > files and the existing files in the destination. Rsync is widely > used for backups and mirroring and as an improved copy command for > -everyday use. > +everyday use. This also includes options for lz4 and zstd compression > +as well as iconv for people wanting to bring files from other OSes > +with more versatile filenames. > > -Flavor: iconv > - extra dependency, for people wanting to bring files from other OSes with > - more versatile filenames. > +Flavor: minimal > + without any extra dependencies of iconv, lz4, and zstd. > > To use the rrsync wrapper, python3 should be installed. > >