From: Jakub Bogusz Date: Tue, 22 Sep 2020 19:47:53 +0000 (+0200) Subject: - dropped noatime patch (now --open-noatime is available upstream) X-Git-Tag: auto/th/rsync-3.2.3-2~1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=3f874dbef7124d4619ea6b9fc67c90b89d6c6293;p=packages%2Frsync.git - dropped noatime patch (now --open-noatime is available upstream) - more changes in config patch - updated dependencies --- diff --git a/rsync-config.patch b/rsync-config.patch index f756a29..58416c7 100644 --- a/rsync-config.patch +++ b/rsync-config.patch @@ -10,10 +10,58 @@ diff -ur rsync-3.0.8.orig/rsync.h rsync-3.0.8/rsync.h #define URL_PREFIX "rsync://" #define SYMLINK_PREFIX "/rsyncd-munged/" /* This MUST have a trailing slash! */ -diff -ur rsync-3.0.8.orig/rsyncd.conf.5 rsync-3.0.8/rsyncd.conf.5 ---- rsync-3.0.8.orig/rsyncd.conf.5 2011-03-26 22:37:52.000000000 +0100 -+++ rsync-3.0.8/rsyncd.conf.5 2011-04-07 10:21:07.789502107 +0200 -@@ -632,7 +632,7 @@ require that you specify a group passwor +--- rsync-3.2.3/rsync.1.orig 2020-08-07 05:57:26.000000000 +0200 ++++ rsync-3.2.3/rsync.1 2020-08-16 14:32:06.591094708 +0200 +@@ -3423,7 +3423,7 @@ + version of this option (above) for some extra details. + .IP "\fB\-\-config=FILE\fP" + This specifies an alternate config file than the default. This is only +-relevant when \fB\-\-daemon\fP is specified. The default is /etc/rsyncd.conf ++relevant when \fB\-\-daemon\fP is specified. The default is /etc/rsyncd/rsyncd.conf + unless the daemon is running over a remote shell program and the remote + user is not the super-user; in that case the default is rsyncd.conf in the + current directory (typically $HOME). +@@ -4260,7 +4260,7 @@ + .P + .SH "FILES" + .P +-/etc/rsyncd.conf or rsyncd.conf ++/etc/rsyncd/rsyncd.conf or rsyncd.conf + .P + .SH "SEE ALSO" + .P +--- rsync-3.2.3/rsync.1.md.orig 2020-07-28 00:56:48.000000000 +0200 ++++ rsync-3.2.3/rsync.1.md 2020-08-16 14:33:28.887315538 +0200 +@@ -3380,7 +3380,7 @@ + 0. `--config=FILE` + + This specifies an alternate config file than the default. This is only +- relevant when `--daemon` is specified. The default is /etc/rsyncd.conf ++ relevant when `--daemon` is specified. The default is /etc/rsyncd/rsyncd.conf + unless the daemon is running over a remote shell program and the remote + user is not the super-user; in that case the default is rsyncd.conf in the + current directory (typically $HOME). +@@ -4117,7 +4117,7 @@ + + # FILES + +-/etc/rsyncd.conf or rsyncd.conf ++/etc/rsyncd/rsyncd.conf or rsyncd.conf + + # SEE ALSO + +--- rsync-3.2.3/rsyncd.conf.5.orig 2020-08-07 05:57:26.000000000 +0200 ++++ rsync-3.2.3/rsyncd.conf.5 2020-08-16 18:54:27.322486513 +0200 +@@ -393,7 +393,7 @@ + This parameter specifies the file to use to support the "max connections" + parameter. The rsync daemon uses record locking on this file to ensure that + the max connections limit is not exceeded for the modules sharing the lock +-file. The default is \fB/var/run/rsyncd.lock\fP. ++file. The default is \fB/var/lock/rsyncd.lock\fP. + .IP "\fBread\ only\fP" + This parameter determines whether clients will be able to upload files or + not. If "read only" is true then any attempted uploads will fail. If +@@ -632,7 +632,7 @@ passwords. .IP There is no default for the "secrets file" parameter, you must choose a @@ -22,7 +70,7 @@ diff -ur rsync-3.0.8.orig/rsyncd.conf.5 rsync-3.0.8/rsyncd.conf.5 readable by "other"; see "strict modes". If the file is not found or is rejected, no logins for a "user auth" module will be possible. .IP "\fBstrict\ modes\fP" -@@ -1092,7 +1092,7 @@ that can be included into multiple modul +@@ -1092,7 +1092,7 @@ global values that will affect connections (such as \fBmotd\ file\fP), or globals that will affect other include files. .P @@ -31,7 +79,25 @@ diff -ur rsync-3.0.8.orig/rsyncd.conf.5 rsync-3.0.8/rsyncd.conf.5 .RS 4 .P .nf -@@ -1219,11 +1219,11 @@ pid file = /var/run/rsyncd.pid +@@ -1100,13 +1100,13 @@ + log file = /var/log/rsync.log + pid file = /var/lock/rsync.lock + +-&merge /etc/rsyncd.d +-&include /etc/rsyncd.d ++&merge /etc/rsyncd/rsyncd.d ++&include /etc/rsyncd/rsyncd.d + .fi + .RE + .P +-This would merge any \fB/etc/rsyncd.d/*.inc\fP files (for global values that should +-stay in effect), and then include any \fB/etc/rsyncd.d/*.conf\fP files (defining ++This would merge any \fB/etc/rsyncd/rsyncd.d/*.inc\fP files (for global values that should ++stay in effect), and then include any \fB/etc/rsyncd/rsyncd.d/*.conf\fP files (defining + modules without any global-value cross-talk). + .P + .SH "AUTHENTICATION STRENGTH" +@@ -1219,11 +1219,11 @@ path = /data/cvs comment = CVS repository (requires authentication) auth users = tridge, susan @@ -45,7 +111,7 @@ diff -ur rsync-3.0.8.orig/rsyncd.conf.5 rsync-3.0.8/rsyncd.conf.5 .RS 4 .P .nf -@@ -1234,7 +1234,7 @@ susan:herpass +@@ -1234,7 +1234,7 @@ .P .SH "FILES" .P @@ -54,3 +120,67 @@ diff -ur rsync-3.0.8.orig/rsyncd.conf.5 rsync-3.0.8/rsyncd.conf.5 .P .SH "SEE ALSO" .P +--- rsync-3.2.3/rsyncd.conf.5.md.orig 2020-08-16 14:34:12.567078905 +0200 ++++ rsync-3.2.3/rsyncd.conf.5.md 2020-08-16 18:53:50.806017673 +0200 +@@ -417,7 +417,7 @@ + This parameter specifies the file to use to support the "max connections" + parameter. The rsync daemon uses record locking on this file to ensure that + the max connections limit is not exceeded for the modules sharing the lock +- file. The default is `/var/run/rsyncd.lock`. ++ file. The default is `/var/lock/rsyncd.lock`. + + 0. `read only` + +@@ -680,7 +680,7 @@ + passwords. + + There is no default for the "secrets file" parameter, you must choose a +- name (such as `/etc/rsyncd.secrets`). The file must normally not be ++ name (such as `/etc/rsyncd/rsyncd.secrets`). The file must normally not be + readable by "other"; see "strict modes". If the file is not found or is + rejected, no logins for a "user auth" module will be possible. + +@@ -1075,17 +1075,17 @@ + global values that will affect connections (such as `motd file`), or globals + that will affect other include files. + +-For example, this is a useful /etc/rsyncd.conf file: ++For example, this is a useful /etc/rsyncd/rsyncd.conf file: + + > port = 873 + > log file = /var/log/rsync.log + > pid file = /var/lock/rsync.lock + > +-> &merge /etc/rsyncd.d +-> &include /etc/rsyncd.d ++> &merge /etc/rsyncd/rsyncd.d ++> &include /etc/rsyncd/rsyncd.d + +-This would merge any `/etc/rsyncd.d/*.inc` files (for global values that should +-stay in effect), and then include any `/etc/rsyncd.d/*.conf` files (defining ++This would merge any `/etc/rsyncd/rsyncd.d/*.inc` files (for global values that should ++stay in effect), and then include any `/etc/rsyncd/rsyncd.d/*.conf` files (defining + modules without any global-value cross-talk). + + # AUTHENTICATION STRENGTH +@@ -1189,17 +1189,17 @@ + > path = /data/cvs + > comment = CVS repository (requires authentication) + > auth users = tridge, susan +-> secrets file = /etc/rsyncd.secrets ++> secrets file = /etc/rsyncd/rsyncd.secrets + > ``` + +-The /etc/rsyncd.secrets file would look something like this: ++The /etc/rsyncd/rsyncd.secrets file would look something like this: + + > tridge:mypass + > susan:herpass + + # FILES + +-/etc/rsyncd.conf or rsyncd.conf ++/etc/rsyncd/rsyncd.conf or rsyncd.conf + + # SEE ALSO + diff --git a/rsync-noatime.patch b/rsync-noatime.patch deleted file mode 100644 index 85626ef..0000000 --- a/rsync-noatime.patch +++ /dev/null @@ -1,147 +0,0 @@ -Optionally preserve atimes. - -Based on https://bugzilla.samba.org/show_bug.cgi?id=7249#c1 by Nicolas George. - -Index: rsync-3.1.0/options.c -=================================================================== ---- rsync-3.1.0.orig/options.c -+++ rsync-3.1.0/options.c -@@ -125,6 +125,7 @@ int delay_updates = 0; - long block_size = 0; /* "long" because popt can't set an int32. */ - char *skip_compress = NULL; - item_list dparam_list = EMPTY_ITEM_LIST; -+int noatime = 0; - - /** Network address family. **/ - int default_af_hint -@@ -802,6 +803,7 @@ void usage(enum logcode F) - rprintf(F," --iconv=CONVERT_SPEC request charset conversion of filenames\n"); - #endif - rprintf(F," --checksum-seed=NUM set block/file checksum seed (advanced)\n"); -+ rprintf(F," --noatime do not alter atime when opening source files\n"); - rprintf(F," -4, --ipv4 prefer IPv4\n"); - rprintf(F," -6, --ipv6 prefer IPv6\n"); - rprintf(F," --version print version number\n"); -@@ -1019,6 +1021,7 @@ static struct poptOption long_options[] - {"iconv", 0, POPT_ARG_STRING, &iconv_opt, 0, 0, 0 }, - {"no-iconv", 0, POPT_ARG_NONE, 0, OPT_NO_ICONV, 0, 0 }, - #endif -+ {"noatime", 0, POPT_ARG_VAL, &noatime, 1, 0, 0 }, - {"ipv4", '4', POPT_ARG_VAL, &default_af_hint, AF_INET, 0, 0 }, - {"ipv6", '6', POPT_ARG_VAL, &default_af_hint, AF_INET6, 0, 0 }, - {"8-bit-output", '8', POPT_ARG_VAL, &allow_8bit_chars, 1, 0, 0 }, -@@ -2739,6 +2742,12 @@ void server_options(char **args, int *ar - if (preallocate_files && am_sender) - args[ac++] = "--preallocate"; - -+ /* -+ * Do we want remote atime preservation when we preserve local ones? -+ if (noatime) -+ args[ac++] = "--noatime"; -+ */ -+ - if (ac > MAX_SERVER_ARGS) { /* Not possible... */ - rprintf(FERROR, "argc overflow in server_options().\n"); - exit_cleanup(RERR_MALLOC); -Index: rsync-3.1.0/rsync.yo -=================================================================== ---- rsync-3.1.0.orig/rsync.yo -+++ rsync-3.1.0/rsync.yo -@@ -454,6 +454,7 @@ to the detailed description below for a - --protocol=NUM force an older protocol version to be used - --iconv=CONVERT_SPEC request charset conversion of filenames - --checksum-seed=NUM set block/file checksum seed (advanced) -+ --noatime do not alter atime when opening source files - -4, --ipv4 prefer IPv4 - -6, --ipv6 prefer IPv6 - --version print version number -@@ -2543,6 +2544,13 @@ daemon uses the charset specified in its - regardless of the remote charset you actually pass. Thus, you may feel free to - specify just the local charset for a daemon transfer (e.g. bf(--iconv=utf8)). - -+dit(bf(--noatime)) Use the O_NOATIME open flag on systems that support it. -+The effect of this flag is to avoid altering the access time (atime) of the -+opened files. -+If the system does not support the O_NOATIME flag, this option does nothing. -+Currently, systems known to support O_NOATIME are Linux >= 2.6.8 with glibc -+>= 2.3.4. -+ - dit(bf(-4, --ipv4) or bf(-6, --ipv6)) Tells rsync to prefer IPv4/IPv6 - when creating sockets. This only affects sockets that rsync has direct - control over, such as the outgoing socket when directly contacting an -diff --git a/syscall.c b/syscall.c -index c46a8b4..6620563 100644 ---- a/syscall.c -+++ b/syscall.c -@@ -42,6 +42,7 @@ extern int inplace; - extern int preallocate_files; - extern int preserve_perms; - extern int preserve_executability; -+extern int noatime; - - #ifndef S_BLKSIZE - # if defined hpux || defined __hpux__ || defined __hpux -@@ -189,6 +190,10 @@ int do_open(const char *pathname, int fl - RETURN_ERROR_IF(dry_run, 0); - RETURN_ERROR_IF_RO_OR_LO; - } -+#ifdef O_NOATIME -+ if (noatime) -+ flags |= O_NOATIME; -+#endif - - return open(pathname, flags | O_BINARY, mode); - } -Index: rsync/tls.c -=================================================================== ---- rsync.orig/tls.c -+++ rsync/tls.c -@@ -53,6 +53,7 @@ int preserve_perms = 0; - int preserve_executability = 0; - int preallocate_files = 0; - int inplace = 0; -+int noatime = 0; - - #ifdef SUPPORT_XATTRS - -Index: rsync/t_unsafe.c -=================================================================== ---- rsync.orig/t_unsafe.c -+++ rsync/t_unsafe.c -@@ -33,6 +33,10 @@ int preserve_perms = 0; - int preserve_executability = 0; - short info_levels[COUNT_INFO], debug_levels[COUNT_DEBUG]; - -+/* This is to make syscall.o shut up. */ -+int noatime = 0; -+ -+ - int - main(int argc, char **argv) - { -Index: rsync/wildtest.c -=================================================================== ---- rsync.orig/wildtest.c -+++ rsync/wildtest.c -@@ -32,6 +32,9 @@ int fnmatch_errors = 0; - - int wildmatch_errors = 0; - -+/* This is to make syscall.o shut up. */ -+int noatime = 0; -+ - typedef char bool; - - int output_iterations = 0; -Index: rsync/trimslash.c -=================================================================== ---- rsync.orig/trimslash.c -+++ rsync/trimslash.c -@@ -30,6 +30,7 @@ int preserve_perms = 0; - int preserve_executability = 0; - int preallocate_files = 0; - int inplace = 0; -+int noatime = 0; - - int - main(int argc, char **argv) diff --git a/rsync.spec b/rsync.spec index a538e5c..ea0b03a 100644 --- a/rsync.spec +++ b/rsync.spec @@ -5,7 +5,6 @@ # Conditional build: %bcond_with rsh # set remote shell command to rsh instead of ssh (old behaviour) %bcond_with fadvise # apply fadvise patch -%bcond_with noatime # apply noatime patch %bcond_with tests # perform "make test" # %ifarch alpha @@ -36,14 +35,19 @@ Source4: %{name}.sysconfig Source5: %{name}d.logrotate Patch0: %{name}-config.patch Patch1: %{name}-fadvise.patch -Patch2: %{name}-noatime.patch URL: https://rsync.samba.org/ BuildRequires: acl-devel -BuildRequires: autoconf >= 2.59 +BuildRequires: autoconf >= 2.69 BuildRequires: automake +BuildRequires: libstdc++-devel +BuildRequires: lz4-devel +BuildRequires: openssl-devel BuildRequires: popt-devel +BuildRequires: python3 >= 1:3 +BuildRequires: python3-commonmark BuildRequires: rpmbuild(macros) >= 1.318 BuildRequires: xxHash-devel >= 0.8.0 +BuildRequires: zstd-devel BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _duplicate_files_terminate_build 0 @@ -165,7 +169,6 @@ techniczna nowego algorytmu została również dołączona do pakietu. %setup -q -b1 %patch0 -p1 %{?with_fadvise:%patch1 -p1} -%{?with_noatime:%patch2 -p1} sed -i -e 's|#!/usr/bin/env bash|#!/bin/bash|' rsync-ssl @@ -175,11 +178,11 @@ cp -f /usr/share/automake/config.sub . %{__autoconf} %configure \ LIBS="-lcrypto" \ - %{?with_rsh:--with-rsh=rsh} \ - --enable-ipv6 \ --enable-acl-support \ - --enable-xattr-support \ --disable-debug \ + --enable-ipv6 \ + --enable-xattr-support \ + %{?with_rsh:--with-rsh=rsh} \ --with-rsyncd-conf=%{_sysconfdir}/rsyncd.conf %{__make} proto %{__make} @@ -255,7 +258,9 @@ fi %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/RSYNC_PROXY %config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/RSYNC_RSH %attr(755,root,root) %{_bindir}/rsync +%attr(755,root,root) %{_bindir}/rsync-ssl %{_mandir}/man1/rsync.1* +%{_mandir}/man1/rsync-ssl.1* %files -n rsyncd-inetd %defattr(644,root,root,755)