diff -Nru rsync-3.1.3/debian/changelog rsync-3.1.3/debian/changelog --- rsync-3.1.3/debian/changelog 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/changelog 2019-10-15 00:04:36.000000000 +0000 @@ -1,3 +1,61 @@ +rsync (3.1.3-8) unstable; urgency=medium + + * Link rrsync in /usr/bin/ + * Run upstream tests at build time: + - d/rules: Stop overriding dh_auto_test + - d/p/noatime.diff: Change patch to address test failure + * Run upstream tests on autopkgtest + * d/rsync.install: Move scripts to /usr/share/ instead of usr/share/doc/ + (closes: #911321): + - rsync.NEWS: Create file and tell about scripts new location + * d/salsa-ci.yml: Skip repro tests for now + * d/p/noatime.diff: + - Fix DEP-3 headers + - Fix typo + + -- Samuel Henrique Tue, 15 Oct 2019 01:04:36 +0100 + +rsync (3.1.3-7) unstable; urgency=low + + * Bump Standards-Version to 4.4.1 + * Add salsa-ci.yml + * Convert packaging to use debhelper: + - Automatically build dbgsym package (closes: #920052) + - Use quilt for patches: + ~ Refresh all patches + ~ Remove lintian override for lack of patch series file + ~ d/rules: Stop applying patches here, use quilt instead + - Use debhelper instead of maint scripts to deal with .init file + ~ Create symlink for .service file in debian/ because DH is not + finding it + - d/control: + ~ Add Rules-Requires-Root: no + ~ Add '${misc:Depends}' Dependency + ~ Add Pre-Depends '${misc:Pre-Depends}' + ~ Add debhelper-compat build-dependency + ~ Remove build-dependency on autotools, not needed with debelpher + - d/rules: + ~ Add export DEB_BUILD_MAINT_OPTIONS = hardening=+all + ~ Use parameter --with-included-zlib=yes on configure + ~ override_dh_auto_test: don't run make test + - d/rsync.examples: Create file and install same files as before moving + to DH + - d/rsync.install: Create file and install same files as before moving + to DH + - d/p/disable_reconfigure_req.diff: Disable reconfigure check at Makefile + * d/control: + - Remove dependency lsb-base version requirement, required version was + released in 2008 + - Remove breaks duplicity, breakable version was superseded in 2011 + - Remove base-files dependency as it is an essential package and version + required was released in 2007 + * d/rsync.default: Fix name of file + * d/rsync.lintian-overrides: + - Fix name of file + - Remove unused override + + -- Samuel Henrique Sun, 06 Oct 2019 16:47:47 +0100 + rsync (3.1.3-6) unstable; urgency=medium * Apply CVEs from 2016 to the zlib code. diff -Nru rsync-3.1.3/debian/control rsync-3.1.3/debian/control --- rsync-3.1.3/debian/control 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/control 2019-10-15 00:04:36.000000000 +0000 @@ -3,12 +3,13 @@ Priority: optional Maintainer: Paul Slootman Uploaders: Samuel Henrique -Build-Depends: autotools-dev, +Build-Depends: debhelper-compat (= 12), libacl1-dev, libattr1-dev, libpopt-dev, yodl (>= 3.08.00) -Standards-Version: 4.3.0 +Standards-Version: 4.4.1 +Rules-Requires-Root: no Homepage: https://rsync.samba.org/ Vcs-Git: https://salsa.debian.org/debian/rsync.git Vcs-Browser: https://salsa.debian.org/debian/rsync @@ -16,11 +17,10 @@ Package: rsync Architecture: any Multi-Arch: foreign -Depends: base-files (>= 4.0.1), - init-system-helpers (>= 1.18~), - lsb-base (>= 3.2-14), +Pre-Depends: ${misc:Pre-Depends} +Depends: lsb-base, + ${misc:Depends}, ${shlibs:Depends} -Breaks: duplicity (<< 0.6.11) Suggests: openssh-client, openssh-server Description: fast, versatile, remote (and local) file-copying tool diff -Nru rsync-3.1.3/debian/default rsync-3.1.3/debian/default --- rsync-3.1.3/debian/default 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/default 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -# defaults file for rsync daemon mode -# -# This file is only used for init.d based systems! -# If this system uses systemd, you can specify options etc. for rsync -# in daemon mode by copying /lib/systemd/system/rsync.service to -# /etc/systemd/system/rsync.service and modifying the copy; add required -# options to the ExecStart line. - -# start rsync in daemon mode from init.d script? -# only allowed values are "true", "false", and "inetd" -# Use "inetd" if you want to start the rsyncd from inetd, -# all this does is prevent the init.d script from printing a message -# about not starting rsyncd (you still need to modify inetd's config yourself). -RSYNC_ENABLE=false - -# which file should be used as the configuration file for rsync. -# This file is used instead of the default /etc/rsyncd.conf -# Warning: This option has no effect if the daemon is accessed -# using a remote shell. When using a different file for -# rsync you might want to symlink /etc/rsyncd.conf to -# that file. -# RSYNC_CONFIG_FILE= - -# what extra options to give rsync --daemon? -# that excludes the --daemon; that's always done in the init.d script -# Possibilities are: -# --address=123.45.67.89 (bind to a specific IP address) -# --port=8730 (bind to specified port; default 873) -RSYNC_OPTS='' - -# run rsyncd at a nice level? -# the rsync daemon can impact performance due to much I/O and CPU usage, -# so you may want to run it at a nicer priority than the default priority. -# Allowed values are 0 - 19 inclusive; 10 is a reasonable value. -RSYNC_NICE='' - -# run rsyncd with ionice? -# "ionice" does for IO load what "nice" does for CPU load. -# As rsync is often used for backups which aren't all that time-critical, -# reducing the rsync IO priority will benefit the rest of the system. -# See the manpage for ionice for allowed options. -# -c3 is recommended, this will run rsync IO at "idle" priority. Uncomment -# the next line to activate this. -# RSYNC_IONICE='-c3' - -# Don't forget to create an appropriate config file, -# else the daemon will not start. diff -Nru rsync-3.1.3/debian/init.d rsync-3.1.3/debian/init.d --- rsync-3.1.3/debian/init.d 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/init.d 1970-01-01 00:00:00.000000000 +0000 @@ -1,156 +0,0 @@ -#! /bin/sh - -### BEGIN INIT INFO -# Provides: rsyncd -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Should-Start: $named autofs -# Default-Start: 2 3 4 5 -# Default-Stop: -# Short-Description: fast remote file copy program daemon -# Description: rsync is a program that allows files to be copied to and -# from remote machines in much the same way as rcp. -# This provides rsyncd daemon functionality. -### END INIT INFO - -set -e - -# /etc/init.d/rsync: start and stop the rsync daemon - -DAEMON=/usr/bin/rsync -RSYNC_ENABLE=false -RSYNC_OPTS='' -RSYNC_DEFAULTS_FILE=/etc/default/rsync -RSYNC_CONFIG_FILE=/etc/rsyncd.conf -RSYNC_PID_FILE=/var/run/rsync.pid -RSYNC_NICE_PARM='' -RSYNC_IONICE_PARM='' - -test -x $DAEMON || exit 0 - -. /lib/lsb/init-functions - -if [ -s $RSYNC_DEFAULTS_FILE ]; then - . $RSYNC_DEFAULTS_FILE - case "x$RSYNC_ENABLE" in - xtrue|xfalse) ;; - xinetd) exit 0 - ;; - *) log_failure_msg "Value of RSYNC_ENABLE in $RSYNC_DEFAULTS_FILE must be either 'true' or 'false';" - log_failure_msg "not starting rsync daemon." - exit 1 - ;; - esac - case "x$RSYNC_NICE" in - x[0-9]|x1[0-9]) RSYNC_NICE_PARM="--nicelevel $RSYNC_NICE";; - x) ;; - *) log_warning_msg "Value of RSYNC_NICE in $RSYNC_DEFAULTS_FILE must be a value between 0 and 19 (inclusive);" - log_warning_msg "ignoring RSYNC_NICE now." - ;; - esac - case "x$RSYNC_IONICE" in - x-c[123]*) RSYNC_IONICE_PARM="$RSYNC_IONICE";; - x) ;; - *) log_warning_msg "Value of RSYNC_IONICE in $RSYNC_DEFAULTS_FILE must be -c1, -c2 or -c3;" - log_warning_msg "ignoring RSYNC_IONICE now." - ;; - esac -fi - -export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" - -rsync_start() { - if [ ! -s "$RSYNC_CONFIG_FILE" ]; then - log_failure_msg "missing or empty config file $RSYNC_CONFIG_FILE" - log_end_msg 1 - exit 0 - fi - # See ionice(1) - if [ -n "$RSYNC_IONICE_PARM" ] && [ -x /usr/bin/ionice ] && - /usr/bin/ionice "$RSYNC_IONICE_PARM" true 2>/dev/null; then - /usr/bin/ionice "$RSYNC_IONICE_PARM" -p$$ > /dev/null 2>&1 - fi - if start-stop-daemon --start --quiet --background \ - --pidfile $RSYNC_PID_FILE --make-pidfile \ - $RSYNC_NICE_PARM --exec $DAEMON \ - -- --no-detach --daemon --config "$RSYNC_CONFIG_FILE" $RSYNC_OPTS - then - rc=0 - sleep 1 - if ! kill -0 $(cat $RSYNC_PID_FILE) >/dev/null 2>&1; then - log_failure_msg "rsync daemon failed to start" - rc=1 - fi - else - rc=1 - fi - if [ $rc -eq 0 ]; then - log_end_msg 0 - else - log_end_msg 1 - rm -f $RSYNC_PID_FILE - fi -} # rsync_start - - -case "$1" in - start) - if "$RSYNC_ENABLE"; then - log_daemon_msg "Starting rsync daemon" "rsync" - if [ -s $RSYNC_PID_FILE ] && kill -0 $(cat $RSYNC_PID_FILE) >/dev/null 2>&1; then - log_progress_msg "apparently already running" - log_end_msg 0 - exit 0 - fi - rsync_start - else - if [ -s "$RSYNC_CONFIG_FILE" ]; then - [ "$VERBOSE" != no ] && log_warning_msg "rsync daemon not enabled in $RSYNC_DEFAULTS_FILE, not starting..." - fi - fi - ;; - stop) - log_daemon_msg "Stopping rsync daemon" "rsync" - start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $RSYNC_PID_FILE - RETVAL="$?" - log_end_msg $RETVAL - if [ $RETVAL != 0 ] - then - exit 1 - fi - rm -f $RSYNC_PID_FILE - ;; - - reload|force-reload) - log_warning_msg "Reloading rsync daemon: not needed, as the daemon" - log_warning_msg "re-reads the config file whenever a client connects." - ;; - - restart) - set +e - if $RSYNC_ENABLE; then - log_daemon_msg "Restarting rsync daemon" "rsync" - if [ -s $RSYNC_PID_FILE ] && kill -0 $(cat $RSYNC_PID_FILE) >/dev/null 2>&1; then - start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $RSYNC_PID_FILE - else - log_warning_msg "rsync daemon not running, attempting to start." - rm -f $RSYNC_PID_FILE - fi - rsync_start - else - if [ -s "$RSYNC_CONFIG_FILE" ]; then - [ "$VERBOSE" != no ] && log_warning_msg "rsync daemon not enabled in $RSYNC_DEFAULTS_FILE, not starting..." - fi - fi - ;; - - status) - status_of_proc -p $RSYNC_PID_FILE "$DAEMON" rsync - exit $? # notreached due to set -e - ;; - *) - echo "Usage: /etc/init.d/rsync {start|stop|reload|force-reload|restart|status}" - exit 1 -esac - -exit 0 diff -Nru rsync-3.1.3/debian/lintian.overrides rsync-3.1.3/debian/lintian.overrides --- rsync-3.1.3/debian/lintian.overrides 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/lintian.overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -rsync: embedded-library usr/bin/rsync: zlib -rsync: spelling-error-in-binary usr/bin/rsync dont don't -rsync: init.d-script-does-not-provide-itself etc/init.d/rsync -# false positive in this context -rsync: spelling-error-in-manpage usr/share/man/man1/rsync.1.gz allow to allow one to diff -Nru rsync-3.1.3/debian/patches/backup-dir-implies-backup.diff rsync-3.1.3/debian/patches/backup-dir-implies-backup.diff --- rsync-3.1.3/debian/patches/backup-dir-implies-backup.diff 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/backup-dir-implies-backup.diff 2019-10-15 00:04:36.000000000 +0000 @@ -1,6 +1,8 @@ ---- rsync-3.1.2.orig/options.c 2016-03-29 11:03:33.260097224 +0200 -+++ rsync-3.1.2/options.c 2016-03-29 11:03:43.859729633 +0200 -@@ -2121,6 +2121,7 @@ +Index: rsync/options.c +=================================================================== +--- rsync.orig/options.c ++++ rsync/options.c +@@ -2157,6 +2157,7 @@ int parse_arguments(int *argc_p, const c } if (backup_dir) { size_t len; @@ -8,9 +10,11 @@ while (*backup_dir == '.' && backup_dir[1] == '/') backup_dir += 2; if (*backup_dir == '.' && backup_dir[1] == '\0') ---- rsync-3.1.2.orig/rsync.yo 2015-12-30 11:52:56.599111311 +0100 -+++ rsync-3.1.2/rsync.yo 2016-03-29 11:04:36.767894855 +0200 -@@ -780,7 +780,7 @@ +Index: rsync/rsync.yo +=================================================================== +--- rsync.orig/rsync.yo ++++ rsync/rsync.yo +@@ -792,7 +792,7 @@ in the list so that it has a high enough your rules specify a trailing inclusion/exclusion of '*', the auto-added rule would never be reached). diff -Nru rsync-3.1.3/debian/patches/copy-devices.diff rsync-3.1.3/debian/patches/copy-devices.diff --- rsync-3.1.3/debian/patches/copy-devices.diff 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/copy-devices.diff 2019-10-15 00:04:36.000000000 +0000 @@ -9,9 +9,10 @@ make based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a -diff --git a/generator.c b/generator.c ---- a/generator.c -+++ b/generator.c +Index: rsync/generator.c +=================================================================== +--- rsync.orig/generator.c ++++ rsync/generator.c @@ -39,6 +39,7 @@ extern int preserve_acls; extern int preserve_xattrs; extern int preserve_links; @@ -20,7 +21,7 @@ extern int preserve_specials; extern int preserve_hard_links; extern int preserve_executability; -@@ -1650,7 +1651,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, +@@ -1657,7 +1658,7 @@ static void recv_generator(char *fname, goto cleanup; } @@ -29,9 +30,10 @@ if (solo_file) fname = f_name(file, NULL); rprintf(FINFO, "skipping non-regular file \"%s\"\n", fname); -diff --git a/options.c b/options.c ---- a/options.c -+++ b/options.c +Index: rsync/options.c +=================================================================== +--- rsync.orig/options.c ++++ rsync/options.c @@ -50,6 +50,7 @@ int append_mode = 0; int keep_dirlinks = 0; int copy_dirlinks = 0; @@ -40,7 +42,7 @@ int preserve_links = 0; int preserve_hard_links = 0; int preserve_acls = 0; -@@ -704,6 +705,7 @@ void usage(enum logcode F) +@@ -705,6 +706,7 @@ void usage(enum logcode F) rprintf(F," -o, --owner preserve owner (super-user only)\n"); rprintf(F," -g, --group preserve group\n"); rprintf(F," --devices preserve device files (super-user only)\n"); @@ -48,7 +50,7 @@ rprintf(F," --specials preserve special files\n"); rprintf(F," -D same as --devices --specials\n"); rprintf(F," -t, --times preserve modification times\n"); -@@ -885,6 +887,7 @@ static struct poptOption long_options[] = { +@@ -887,6 +889,7 @@ static struct poptOption long_options[] {"no-D", 0, POPT_ARG_NONE, 0, OPT_NO_D, 0, 0 }, {"devices", 0, POPT_ARG_VAL, &preserve_devices, 1, 0, 0 }, {"no-devices", 0, POPT_ARG_VAL, &preserve_devices, 0, 0, 0 }, @@ -56,7 +58,7 @@ {"specials", 0, POPT_ARG_VAL, &preserve_specials, 1, 0, 0 }, {"no-specials", 0, POPT_ARG_VAL, &preserve_specials, 0, 0, 0 }, {"links", 'l', POPT_ARG_VAL, &preserve_links, 1, 0, 0 }, -@@ -2762,6 +2765,9 @@ void server_options(char **args, int *argc_p) +@@ -2798,6 +2801,9 @@ void server_options(char **args, int *ar else if (remove_source_files) args[ac++] = "--remove-sent-files"; @@ -66,9 +68,10 @@ if (preallocate_files && am_sender) args[ac++] = "--preallocate"; -diff --git a/rsync.c b/rsync.c ---- a/rsync.c -+++ b/rsync.c +Index: rsync/rsync.c +=================================================================== +--- rsync.orig/rsync.c ++++ rsync/rsync.c @@ -33,6 +33,7 @@ extern int preserve_xattrs; extern int preserve_perms; extern int preserve_executability; @@ -77,7 +80,7 @@ extern int am_root; extern int am_server; extern int am_daemon; -@@ -404,7 +405,8 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr, +@@ -410,7 +411,8 @@ int read_ndx_and_attrs(int f_in, int f_o if (iflags & ITEM_TRANSFER) { int i = ndx - cur_flist->ndx_start; @@ -87,9 +90,10 @@ rprintf(FERROR, "received request to transfer non-regular file: %d [%s]\n", ndx, who_am_i()); -diff --git a/sender.c b/sender.c ---- a/sender.c -+++ b/sender.c +Index: rsync/sender.c +=================================================================== +--- rsync.orig/sender.c ++++ rsync/sender.c @@ -365,6 +365,20 @@ void send_files(int f_in, int f_out) exit_cleanup(RERR_FILEIO); } diff -Nru rsync-3.1.3/debian/patches/CVE-2016-9840.patch rsync-3.1.3/debian/patches/CVE-2016-9840.patch --- rsync-3.1.3/debian/patches/CVE-2016-9840.patch 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/CVE-2016-9840.patch 2019-10-15 00:04:36.000000000 +0000 @@ -15,10 +15,10 @@ inftrees.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) -diff --git a/zlib/inftrees.c b/zlib/inftrees.c -index 22fcd666..0d2670d5 100644 ---- a/zlib/inftrees.c -+++ b/zlib/inftrees.c +Index: rsync/zlib/inftrees.c +=================================================================== +--- rsync.orig/zlib/inftrees.c ++++ rsync/zlib/inftrees.c @@ -54,7 +54,7 @@ unsigned short FAR *work; code FAR *next; /* next available space in table */ const unsigned short FAR *base; /* base value table to use */ diff -Nru rsync-3.1.3/debian/patches/CVE-2016-9841.patch rsync-3.1.3/debian/patches/CVE-2016-9841.patch --- rsync-3.1.3/debian/patches/CVE-2016-9841.patch 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/CVE-2016-9841.patch 2019-10-15 00:04:36.000000000 +0000 @@ -14,10 +14,10 @@ inffast.c | 81 +++++++++++++++++++++---------------------------------- 1 file changed, 31 insertions(+), 50 deletions(-) -diff --git a/zlib/inffast.c b/zlib/inffast.c -index bda59ceb..f0d163db 100644 ---- a/zlib/inffast.c -+++ b/zlib/inffast.c +Index: rsync/zlib/inffast.c +=================================================================== +--- rsync.orig/zlib/inffast.c ++++ rsync/zlib/inffast.c @@ -10,25 +10,6 @@ #ifndef ASMINF @@ -44,7 +44,7 @@ /* Decode literal, length, and distance codes and write out the resulting literal and match bytes until either not enough input or output is -@@ -96,9 +77,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -96,9 +77,9 @@ unsigned start; /* inflate()'s s /* copy state to local variables */ state = (struct inflate_state FAR *)strm->state; @@ -56,7 +56,7 @@ beg = out - (start - strm->avail_out); end = out + (strm->avail_out - 257); #ifdef INFLATE_STRICT -@@ -119,9 +100,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -119,9 +100,9 @@ unsigned start; /* inflate()'s s input data or output space */ do { if (bits < 15) { @@ -68,7 +68,7 @@ bits += 8; } here = lcode[hold & lmask]; -@@ -134,14 +115,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -134,14 +115,14 @@ unsigned start; /* inflate()'s s Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? "inflate: literal '%c'\n" : "inflate: literal 0x%02x\n", here.val)); @@ -85,7 +85,7 @@ bits += 8; } len += (unsigned)hold & ((1U << op) - 1); -@@ -150,9 +131,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -150,9 +131,9 @@ unsigned start; /* inflate()'s s } Tracevv((stderr, "inflate: length %u\n", len)); if (bits < 15) { @@ -97,7 +97,7 @@ bits += 8; } here = dcode[hold & dmask]; -@@ -165,10 +146,10 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -165,10 +146,10 @@ unsigned start; /* inflate()'s s dist = (unsigned)(here.val); op &= 15; /* number of extra bits */ if (bits < op) { @@ -110,7 +110,7 @@ bits += 8; } } -@@ -196,30 +177,30 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -196,30 +177,30 @@ unsigned start; /* inflate()'s s #ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR if (len <= op - whave) { do { @@ -146,7 +146,7 @@ } while (--op); from = out - dist; /* rest from output */ } -@@ -230,14 +211,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -230,14 +211,14 @@ unsigned start; /* inflate()'s s if (op < len) { /* some from end of window */ len -= op; do { @@ -164,7 +164,7 @@ } while (--op); from = out - dist; /* rest from output */ } -@@ -248,35 +229,35 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -248,35 +229,35 @@ unsigned start; /* inflate()'s s if (op < len) { /* some from window */ len -= op; do { @@ -211,7 +211,7 @@ } } } -@@ -313,8 +294,8 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */ +@@ -313,8 +294,8 @@ unsigned start; /* inflate()'s s hold &= (1U << bits) - 1; /* update state and return */ diff -Nru rsync-3.1.3/debian/patches/CVE-2016-9842.patch rsync-3.1.3/debian/patches/CVE-2016-9842.patch --- rsync-3.1.3/debian/patches/CVE-2016-9842.patch 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/CVE-2016-9842.patch 2019-10-15 00:04:36.000000000 +0000 @@ -10,11 +10,11 @@ inflate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -diff --git a/zlib/inflate.c b/zlib/inflate.c -index 2889e3a0..a7184167 100644 ---- a/zlib/inflate.c -+++ b/zlib/inflate.c -@@ -1506,9 +1506,10 @@ z_streamp strm; +Index: rsync/zlib/inflate.c +=================================================================== +--- rsync.orig/zlib/inflate.c ++++ rsync/zlib/inflate.c +@@ -1525,9 +1525,10 @@ z_streamp strm; { struct inflate_state FAR *state; diff -Nru rsync-3.1.3/debian/patches/CVE-2016-9843.patch rsync-3.1.3/debian/patches/CVE-2016-9843.patch --- rsync-3.1.3/debian/patches/CVE-2016-9843.patch 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/CVE-2016-9843.patch 2019-10-15 00:04:36.000000000 +0000 @@ -18,11 +18,11 @@ crc32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -diff --git a/zlib/crc32.c b/zlib/crc32.c -index 979a7190..05733f4e 100644 ---- a/zlib/crc32.c -+++ b/zlib/crc32.c -@@ -278,7 +278,7 @@ local unsigned long crc32_little(crc, buf, len) +Index: rsync/zlib/crc32.c +=================================================================== +--- rsync.orig/zlib/crc32.c ++++ rsync/zlib/crc32.c +@@ -278,7 +278,7 @@ local unsigned long crc32_little(crc, bu } /* ========================================================================= */ @@ -31,7 +31,7 @@ c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \ crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24] #define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4 -@@ -300,7 +300,6 @@ local unsigned long crc32_big(crc, buf, len) +@@ -300,7 +300,6 @@ local unsigned long crc32_big(crc, buf, } buf4 = (const z_crc_t FAR *)(const void FAR *)buf; @@ -39,7 +39,7 @@ while (len >= 32) { DOBIG32; len -= 32; -@@ -309,7 +308,6 @@ local unsigned long crc32_big(crc, buf, len) +@@ -309,7 +308,6 @@ local unsigned long crc32_big(crc, buf, DOBIG4; len -= 4; } diff -Nru rsync-3.1.3/debian/patches/disable_reconfigure_req.diff rsync-3.1.3/debian/patches/disable_reconfigure_req.diff --- rsync-3.1.3/debian/patches/disable_reconfigure_req.diff 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/patches/disable_reconfigure_req.diff 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,38 @@ +Index: rsync/Makefile.in +=================================================================== +--- rsync.orig/Makefile.in ++++ rsync/Makefile.in +@@ -164,15 +164,6 @@ configure.sh config.h.in: configure.ac a + else \ + echo "config.h.in has CHANGED."; \ + fi +- @if test -f configure.sh.old -o -f config.h.in.old; then \ +- if test "$(MAKECMDGOALS)" = reconfigure; then \ +- echo 'Continuing with "make reconfigure".'; \ +- else \ +- echo 'You may need to run:'; \ +- echo ' make reconfigure'; \ +- exit 1; \ +- fi \ +- fi + + reconfigure: configure.sh + ./config.status --recheck +@@ -181,17 +172,6 @@ reconfigure: configure.sh + Makefile: Makefile.in config.status configure.sh config.h.in + @if test -f Makefile; then cp -p Makefile Makefile.old; else touch Makefile.old; fi + @./config.status +- @if diff Makefile Makefile.old >/dev/null 2>&1; then \ +- echo "Makefile is unchanged."; \ +- rm Makefile.old; \ +- else \ +- if test "$(MAKECMDGOALS)" = reconfigure; then \ +- echo 'Continuing with "make reconfigure".'; \ +- else \ +- echo "Makefile updated -- rerun your make command."; \ +- exit 1; \ +- fi \ +- fi + + rsync-ssl: $(srcdir)/rsync-ssl.in Makefile + sed 's;\@bindir\@;$(bindir);g' <$(srcdir)/rsync-ssl.in >rsync-ssl diff -Nru rsync-3.1.3/debian/patches/logdir.diff rsync-3.1.3/debian/patches/logdir.diff --- rsync-3.1.3/debian/patches/logdir.diff 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/logdir.diff 2019-10-15 00:04:36.000000000 +0000 @@ -1,5 +1,7 @@ ---- rsync-2.6.9.orig/support/rsyncstats.orig 2006-11-20 15:50:42.711007850 +0100 -+++ rsync-2.6.9/support/rsyncstats 2006-11-20 15:51:05.531353306 +0100 +Index: rsync/support/rsyncstats +=================================================================== +--- rsync.orig/support/rsyncstats ++++ rsync/support/rsyncstats @@ -12,7 +12,7 @@ use Getopt::Long; diff -Nru rsync-3.1.3/debian/patches/manpage-compress-level.diff rsync-3.1.3/debian/patches/manpage-compress-level.diff --- rsync-3.1.3/debian/patches/manpage-compress-level.diff 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/manpage-compress-level.diff 2019-10-15 00:04:36.000000000 +0000 @@ -1,6 +1,8 @@ ---- rsync-3.1.2.orig/rsync.yo 2015-12-30 11:47:24.180646652 +0100 -+++ rsync-3.1.2/rsync.yo 2015-12-30 11:47:27.477198899 +0100 -@@ -1907,7 +1907,9 @@ +Index: rsync/rsync.yo +=================================================================== +--- rsync.orig/rsync.yo ++++ rsync/rsync.yo +@@ -1970,7 +1970,9 @@ See the bf(--skip-compress) option for t that will not be compressed. dit(bf(--compress-level=NUM)) Explicitly set the compression level to use diff -Nru rsync-3.1.3/debian/patches/noatime.diff rsync-3.1.3/debian/patches/noatime.diff --- rsync-3.1.3/debian/patches/noatime.diff 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/noatime.diff 2019-10-15 00:04:36.000000000 +0000 @@ -1,12 +1,11 @@ -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; +Description: Optionally preserve atimes +Origin: https://bugzilla.samba.org/show_bug.cgi?id=7249 +Last-Update: 2019-10-10 +Index: rsync/options.c +=================================================================== +--- rsync.orig/options.c ++++ rsync/options.c +@@ -128,6 +128,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; @@ -14,7 +13,7 @@ /** Network address family. **/ int default_af_hint -@@ -802,6 +803,7 @@ void usage(enum logcode F) +@@ -806,6 +807,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"); @@ -22,7 +21,7 @@ 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[] +@@ -1027,6 +1029,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 @@ -30,7 +29,7 @@ {"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 +@@ -2807,6 +2810,12 @@ void server_options(char **args, int *ar if (preallocate_files && am_sender) args[ac++] = "--preallocate"; @@ -43,11 +42,11 @@ 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 +Index: rsync/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 +--- rsync.orig/rsync.yo ++++ rsync/rsync.yo +@@ -458,6 +458,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) @@ -55,7 +54,7 @@ -4, --ipv4 prefer IPv4 -6, --ipv6 prefer IPv6 --version print version number -@@ -2543,6 +2544,13 @@ daemon uses the charset specified in its +@@ -2659,6 +2660,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)). @@ -69,19 +68,19 @@ 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 -Index: rsync-3.1.0/syscall.c +Index: rsync/syscall.c =================================================================== ---- rsync-3.1.0.orig/syscall.c -+++ rsync-3.1.0/syscall.c -@@ -40,6 +40,7 @@ extern int read_only; - extern int list_only; +--- rsync.orig/syscall.c ++++ rsync/syscall.c +@@ -42,6 +42,7 @@ extern int inplace; + extern int preallocate_files; extern int preserve_perms; extern int preserve_executability; +extern int noatime; - #define RETURN_ERROR_IF(x,e) \ - do { \ -@@ -189,6 +190,10 @@ int do_open(const char *pathname, int fl + #ifndef S_BLKSIZE + # if defined hpux || defined __hpux__ || defined __hpux +@@ -201,6 +202,10 @@ int do_open(const char *pathname, int fl RETURN_ERROR_IF(dry_run, 0); RETURN_ERROR_IF_RO_OR_LO; } @@ -92,3 +91,56 @@ 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 -Nru rsync-3.1.3/debian/patches/prealloc-fix.diff rsync-3.1.3/debian/patches/prealloc-fix.diff --- rsync-3.1.3/debian/patches/prealloc-fix.diff 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/prealloc-fix.diff 2019-10-15 00:04:36.000000000 +0000 @@ -1,9 +1,11 @@ Fix --prealloc to keep file-size 0 when possible https://git.samba.org/?p=rsync.git;a=commitdiff;h=c2da3809f714d936dec1cab6d5bf8b724b9cd113 ---- rsync-3.1.3.orig/syscall.c -+++ rsync-3.1.3/syscall.c -@@ -462,7 +462,7 @@ int do_utime(const char *fname, time_t modtime, UNUSED(uint32 mod_nsec)) +Index: rsync/syscall.c +=================================================================== +--- rsync.orig/syscall.c ++++ rsync/syscall.c +@@ -467,7 +467,7 @@ int do_utime(const char *fname, time_t m OFF_T do_fallocate(int fd, OFF_T offset, OFF_T length) { diff -Nru rsync-3.1.3/debian/patches/README rsync-3.1.3/debian/patches/README --- rsync-3.1.3/debian/patches/README 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -These are the main patches to the rsync source. -(The changes to the manpages for correct hyphens -and quotes is a bit big, so not included.) - -If you're wondering about the lack of patches, the -explanation is that upstream has adopted most of them :-) - -logdir.diff - fix the location of the logdir -ssh-6-option.diff - call ssh with -6 option if rsync was called with -6, - ditto with -4 -noatime.diff - add an option --noatime to request the kernel not to - update files' access times while reading them. See - https://bugzilla.samba.org/show_bug.cgi?id=7249#c5 -manpage-compress-level.diff - describe value for --compress-level -backup-dir-implies-backup.diff - passing --backup-dir=xxx implies --backup diff -Nru rsync-3.1.3/debian/patches/series rsync-3.1.3/debian/patches/series --- rsync-3.1.3/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/patches/series 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,15 @@ +CVE-2016-9840.patch +CVE-2016-9841.patch +CVE-2016-9842.patch +CVE-2016-9843.patch +Two-spelling-mistakes-in-rsync.yo.diff +backup-dir-implies-backup.diff +copy-devices.diff +logdir.diff +manpage-compress-level.diff +noatime.diff +prealloc-fix.diff +ssh-6-option.diff +systemd-unit.diff +time-limit.diff +disable_reconfigure_req.diff diff -Nru rsync-3.1.3/debian/patches/ssh-6-option.diff rsync-3.1.3/debian/patches/ssh-6-option.diff --- rsync-3.1.3/debian/patches/ssh-6-option.diff 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/ssh-6-option.diff 2019-10-15 00:04:36.000000000 +0000 @@ -1,14 +1,16 @@ ---- a/main.c 2008-03-01 21:01:41.000000000 +0100 -+++ b/main.c 2008-03-04 18:55:10.933488013 +0100 -@@ -82,6 +82,7 @@ - #ifdef ICONV_OPTION - extern iconv_t ic_send; +Index: rsync/main.c +=================================================================== +--- rsync.orig/main.c ++++ rsync/main.c +@@ -117,6 +117,7 @@ int sender_keeps_checksum = 0; + # endif + static struct sigaction sigact; #endif +extern int default_af_hint; - uid_t our_uid; - int local_server = 0; -@@ -381,6 +382,23 @@ + struct pid_status { + pid_t pid; +@@ -454,6 +455,23 @@ static pid_t do_cmd(char *cmd, char *mac *t++ = '\0'; } diff -Nru rsync-3.1.3/debian/patches/systemd-unit.diff rsync-3.1.3/debian/patches/systemd-unit.diff --- rsync-3.1.3/debian/patches/systemd-unit.diff 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/systemd-unit.diff 2019-10-15 00:04:36.000000000 +0000 @@ -2,8 +2,10 @@ start rsync after network.target. Last-Update: 2019-01-16 ---- rsync-3.1.3.orig/packaging/systemd/rsync.service -+++ rsync-3.1.3/packaging/systemd/rsync.service +Index: rsync/packaging/systemd/rsync.service +=================================================================== +--- rsync.orig/packaging/systemd/rsync.service ++++ rsync/packaging/systemd/rsync.service @@ -1,6 +1,8 @@ [Unit] Description=fast remote file copy program daemon diff -Nru rsync-3.1.3/debian/patches/time-limit.diff rsync-3.1.3/debian/patches/time-limit.diff --- rsync-3.1.3/debian/patches/time-limit.diff 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/time-limit.diff 2019-10-15 00:04:36.000000000 +0000 @@ -10,9 +10,10 @@ make based-on: 16b49716d55a50f2e985b879b720b2c53c892a3a -diff --git a/io.c b/io.c ---- a/io.c -+++ b/io.c +Index: rsync/io.c +=================================================================== +--- rsync.orig/io.c ++++ rsync/io.c @@ -59,6 +59,7 @@ extern int preserve_hard_links; extern BOOL extra_flist_sending_enabled; extern BOOL flush_ok_after_signal; @@ -21,7 +22,7 @@ extern struct file_list *cur_flist; #ifdef ICONV_OPTION extern int filesfrom_convert; -@@ -170,11 +171,19 @@ static void check_timeout(BOOL allow_keepalive, int keepalive_flags) +@@ -170,11 +171,19 @@ static void check_timeout(BOOL allow_kee * generator might be blocked trying to send checksums, it needs to * know that the receiver is active). Thus, as long as one or the * other is successfully doing work, the generator will not timeout. */ @@ -42,10 +43,11 @@ if (allow_keepalive) { /* This may put data into iobuf.msg w/o flushing. */ maybe_send_keepalive(t, keepalive_flags); -diff --git a/options.c b/options.c ---- a/options.c -+++ b/options.c -@@ -115,6 +115,7 @@ size_t bwlimit_writemax = 0; +Index: rsync/options.c +=================================================================== +--- rsync.orig/options.c ++++ rsync/options.c +@@ -116,6 +116,7 @@ size_t bwlimit_writemax = 0; int ignore_existing = 0; int ignore_non_existing = 0; int need_messages_from_generator = 0; @@ -53,7 +55,7 @@ int max_delete = INT_MIN; OFF_T max_size = -1; OFF_T min_size = -1; -@@ -791,6 +792,8 @@ void usage(enum logcode F) +@@ -796,6 +797,8 @@ void usage(enum logcode F) rprintf(F," --password-file=FILE read daemon-access password from FILE\n"); rprintf(F," --list-only list the files instead of copying them\n"); rprintf(F," --bwlimit=RATE limit socket I/O bandwidth\n"); @@ -62,7 +64,7 @@ #ifdef HAVE_SETVBUF rprintf(F," --outbuf=N|L|B set output buffering to None, Line, or Block\n"); #endif -@@ -819,6 +822,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, +@@ -825,6 +828,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE, OPT_NO_D, OPT_APPEND, OPT_NO_ICONV, OPT_INFO, OPT_DEBUG, OPT_USERMAP, OPT_GROUPMAP, OPT_CHOWN, OPT_BWLIMIT, @@ -70,7 +72,7 @@ OPT_SERVER, OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -1014,6 +1018,8 @@ static struct poptOption long_options[] = { +@@ -1022,6 +1026,8 @@ static struct poptOption long_options[] {"no-timeout", 0, POPT_ARG_VAL, &io_timeout, 0, 0, 0 }, {"contimeout", 0, POPT_ARG_INT, &connect_timeout, 0, 0, 0 }, {"no-contimeout", 0, POPT_ARG_VAL, &connect_timeout, 0, 0, 0 }, @@ -79,7 +81,7 @@ {"rsh", 'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 }, {"rsync-path", 0, POPT_ARG_STRING, &rsync_path, 0, 0, 0 }, {"temp-dir", 'T', POPT_ARG_STRING, &tmpdir, 0, 0, 0 }, -@@ -1785,6 +1791,36 @@ int parse_arguments(int *argc_p, const char ***argv_p) +@@ -1814,6 +1820,36 @@ int parse_arguments(int *argc_p, const c return 0; #endif @@ -116,10 +118,11 @@ default: /* A large opt value means that set_refuse_options() * turned this option off. */ -@@ -2584,6 +2620,15 @@ void server_options(char **args, int *argc_p) +@@ -2618,6 +2654,15 @@ void server_options(char **args, int *ar + goto oom; args[ac++] = arg; } - ++ + if (stop_at_utime) { + long mins = (stop_at_utime - time(NULL)) / 60; + if (mins <= 0) @@ -128,14 +131,14 @@ + goto oom; + args[ac++] = arg; + } -+ + if (backup_dir) { args[ac++] = "--backup-dir"; - args[ac++] = backup_dir; -diff --git a/rsync.yo b/rsync.yo ---- a/rsync.yo -+++ b/rsync.yo -@@ -451,6 +451,8 @@ to the detailed description below for a complete description. verb( +Index: rsync/rsync.yo +=================================================================== +--- rsync.orig/rsync.yo ++++ rsync/rsync.yo +@@ -452,6 +452,8 @@ to the detailed description below for a --password-file=FILE read daemon-access password from FILE --list-only list the files instead of copying them --bwlimit=RATE limit socket I/O bandwidth @@ -144,7 +147,7 @@ --write-batch=FILE write a batched update to FILE --only-write-batch=FILE like --write-batch but w/o updating dest --read-batch=FILE read a batched update from FILE -@@ -2524,6 +2526,19 @@ files can show up as being rapidly sent when the data is quickly buffered, +@@ -2593,6 +2595,19 @@ files can show up as being rapidly sent while other can show up as very slow when the flushing of the output buffer occurs. This may be fixed in a future version. @@ -164,10 +167,11 @@ dit(bf(--write-batch=FILE)) Record a file that can later be applied to another identical destination with bf(--read-batch). See the "BATCH MODE" section for details, and also the bf(--only-write-batch) option. -diff --git a/util.c b/util.c ---- a/util.c -+++ b/util.c -@@ -115,6 +115,133 @@ void print_child_argv(const char *prefix, char **cmd) +Index: rsync/util.c +=================================================================== +--- rsync.orig/util.c ++++ rsync/util.c +@@ -115,6 +115,133 @@ void print_child_argv(const char *prefix rprintf(FCLIENT, " (%d args)\n", cnt); } @@ -301,10 +305,11 @@ /* This returns 0 for success, 1 for a symlink if symlink time-setting * is not possible, or -1 for any other error. */ int set_modtime(const char *fname, time_t modtime, uint32 mod_nsec, mode_t mode) -diff -Nurp a/proto.h b/proto.h ---- a/proto.h -+++ b/proto.h -@@ -354,6 +354,7 @@ void set_nonblocking(int fd); +Index: rsync/proto.h +=================================================================== +--- rsync.orig/proto.h ++++ rsync/proto.h +@@ -367,6 +367,7 @@ void set_nonblocking(int fd); void set_blocking(int fd); int fd_pair(int fd[2]); void print_child_argv(const char *prefix, char **cmd); diff -Nru rsync-3.1.3/debian/patches/Two-spelling-mistakes-in-rsync.yo.diff rsync-3.1.3/debian/patches/Two-spelling-mistakes-in-rsync.yo.diff --- rsync-3.1.3/debian/patches/Two-spelling-mistakes-in-rsync.yo.diff 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/patches/Two-spelling-mistakes-in-rsync.yo.diff 2019-10-15 00:04:36.000000000 +0000 @@ -5,8 +5,10 @@ Bug: https://bugzilla.samba.org/show_bug.cgi?id=13734 Last-Update: 2019-01-01 ---- rsync-3.1.3.orig/rsync.yo -+++ rsync-3.1.3/rsync.yo +Index: rsync/rsync.yo +=================================================================== +--- rsync.orig/rsync.yo ++++ rsync/rsync.yo @@ -1324,7 +1324,7 @@ batch-writing option is in effect. dit(bf(--checksum-choice=STR)) This option overrides the checksum algoriths. diff -Nru rsync-3.1.3/debian/postinst rsync-3.1.3/debian/postinst --- rsync-3.1.3/debian/postinst 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/postinst 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -#!/bin/sh -e - -action="$1" - -if [ "$action" != configure ]; then - exit 0 -fi - - -if [ -x /etc/init.d/rsync ]; then - update-rc.d rsync defaults >/dev/null - invoke-rc.d rsync restart -fi - -## from /usr/share/debhelper/autoscripts/postinst-systemd-enable : - -# This will only remove masks created by d-s-h on package removal. -deb-systemd-helper unmask rsync.service >/dev/null || true - -# was-enabled defaults to true, so new installations run enable. -if deb-systemd-helper --quiet was-enabled rsync.service; then - # Enables the unit on first installation, creates new - # symlinks on upgrades if the unit file has changed. - deb-systemd-helper enable rsync.service >/dev/null || true -else - # Update the statefile to add new symlinks (if any), which need to be - # cleaned up on purge. Also remove old symlinks. - deb-systemd-helper update-state rsync.service >/dev/null || true -fi - -exit 0 diff -Nru rsync-3.1.3/debian/postrm rsync-3.1.3/debian/postrm --- rsync-3.1.3/debian/postrm 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/postrm 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -#!/bin/sh -e -# postrm for rsync - -if [ "$1" = "purge" ] ; then - update-rc.d rsync remove >/dev/null -fi - -## from /usr/share/debhelper/autoscripts/postrm-systemd : - -if [ "$1" = "remove" ]; then - if [ -x "/usr/bin/deb-systemd-helper" ]; then - deb-systemd-helper mask rsync.service >/dev/null - fi -fi - -if [ "$1" = "purge" ]; then - if [ -x "/usr/bin/deb-systemd-helper" ]; then - deb-systemd-helper purge rsync.service >/dev/null - deb-systemd-helper unmask rsync.service >/dev/null - fi -fi -exit 0 diff -Nru rsync-3.1.3/debian/prerm rsync-3.1.3/debian/prerm --- rsync-3.1.3/debian/prerm 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/prerm 1970-01-01 00:00:00.000000000 +0000 @@ -1,42 +0,0 @@ -#!/bin/sh -e -# prerm for rsync - -pathfind() { - OLDIFS="$IFS" - IFS=: - for p in $PATH; do - if [ -x "$p/$*" ]; then - IFS="$OLDIFS" - return 0 - fi - done - IFS="$OLDIFS" - return 1 -} - - -case "$1" in - remove|deconfigure) - if [ -h /usr/doc/rsync ]; then - rm -f /usr/doc/rsync - fi - if [ -x /etc/init.d/rsync ]; then - if pathfind invoke-rc.d; then - invoke-rc.d rsync stop - else - /etc/init.d/rsync stop - fi - fi - if [ -d /run/systemd/system ]; then - deb-systemd-invoke stop rsync.service >/dev/null - fi - ;; - upgrade|failed-upgrade) - ;; - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 0 - ;; -esac - -exit 0 diff -Nru rsync-3.1.3/debian/rsync.default rsync-3.1.3/debian/rsync.default --- rsync-3.1.3/debian/rsync.default 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/rsync.default 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,47 @@ +# defaults file for rsync daemon mode +# +# This file is only used for init.d based systems! +# If this system uses systemd, you can specify options etc. for rsync +# in daemon mode by copying /lib/systemd/system/rsync.service to +# /etc/systemd/system/rsync.service and modifying the copy; add required +# options to the ExecStart line. + +# start rsync in daemon mode from init.d script? +# only allowed values are "true", "false", and "inetd" +# Use "inetd" if you want to start the rsyncd from inetd, +# all this does is prevent the init.d script from printing a message +# about not starting rsyncd (you still need to modify inetd's config yourself). +RSYNC_ENABLE=false + +# which file should be used as the configuration file for rsync. +# This file is used instead of the default /etc/rsyncd.conf +# Warning: This option has no effect if the daemon is accessed +# using a remote shell. When using a different file for +# rsync you might want to symlink /etc/rsyncd.conf to +# that file. +# RSYNC_CONFIG_FILE= + +# what extra options to give rsync --daemon? +# that excludes the --daemon; that's always done in the init.d script +# Possibilities are: +# --address=123.45.67.89 (bind to a specific IP address) +# --port=8730 (bind to specified port; default 873) +RSYNC_OPTS='' + +# run rsyncd at a nice level? +# the rsync daemon can impact performance due to much I/O and CPU usage, +# so you may want to run it at a nicer priority than the default priority. +# Allowed values are 0 - 19 inclusive; 10 is a reasonable value. +RSYNC_NICE='' + +# run rsyncd with ionice? +# "ionice" does for IO load what "nice" does for CPU load. +# As rsync is often used for backups which aren't all that time-critical, +# reducing the rsync IO priority will benefit the rest of the system. +# See the manpage for ionice for allowed options. +# -c3 is recommended, this will run rsync IO at "idle" priority. Uncomment +# the next line to activate this. +# RSYNC_IONICE='-c3' + +# Don't forget to create an appropriate config file, +# else the daemon will not start. diff -Nru rsync-3.1.3/debian/rsync.examples rsync-3.1.3/debian/rsync.examples --- rsync-3.1.3/debian/rsync.examples 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/rsync.examples 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,2 @@ +debian/logrotate.conf.rsync +debian/rsyncd.conf diff -Nru rsync-3.1.3/debian/rsync.init rsync-3.1.3/debian/rsync.init --- rsync-3.1.3/debian/rsync.init 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/rsync.init 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,156 @@ +#! /bin/sh + +### BEGIN INIT INFO +# Provides: rsyncd +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Should-Start: $named autofs +# Default-Start: 2 3 4 5 +# Default-Stop: +# Short-Description: fast remote file copy program daemon +# Description: rsync is a program that allows files to be copied to and +# from remote machines in much the same way as rcp. +# This provides rsyncd daemon functionality. +### END INIT INFO + +set -e + +# /etc/init.d/rsync: start and stop the rsync daemon + +DAEMON=/usr/bin/rsync +RSYNC_ENABLE=false +RSYNC_OPTS='' +RSYNC_DEFAULTS_FILE=/etc/default/rsync +RSYNC_CONFIG_FILE=/etc/rsyncd.conf +RSYNC_PID_FILE=/var/run/rsync.pid +RSYNC_NICE_PARM='' +RSYNC_IONICE_PARM='' + +test -x $DAEMON || exit 0 + +. /lib/lsb/init-functions + +if [ -s $RSYNC_DEFAULTS_FILE ]; then + . $RSYNC_DEFAULTS_FILE + case "x$RSYNC_ENABLE" in + xtrue|xfalse) ;; + xinetd) exit 0 + ;; + *) log_failure_msg "Value of RSYNC_ENABLE in $RSYNC_DEFAULTS_FILE must be either 'true' or 'false';" + log_failure_msg "not starting rsync daemon." + exit 1 + ;; + esac + case "x$RSYNC_NICE" in + x[0-9]|x1[0-9]) RSYNC_NICE_PARM="--nicelevel $RSYNC_NICE";; + x) ;; + *) log_warning_msg "Value of RSYNC_NICE in $RSYNC_DEFAULTS_FILE must be a value between 0 and 19 (inclusive);" + log_warning_msg "ignoring RSYNC_NICE now." + ;; + esac + case "x$RSYNC_IONICE" in + x-c[123]*) RSYNC_IONICE_PARM="$RSYNC_IONICE";; + x) ;; + *) log_warning_msg "Value of RSYNC_IONICE in $RSYNC_DEFAULTS_FILE must be -c1, -c2 or -c3;" + log_warning_msg "ignoring RSYNC_IONICE now." + ;; + esac +fi + +export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" + +rsync_start() { + if [ ! -s "$RSYNC_CONFIG_FILE" ]; then + log_failure_msg "missing or empty config file $RSYNC_CONFIG_FILE" + log_end_msg 1 + exit 0 + fi + # See ionice(1) + if [ -n "$RSYNC_IONICE_PARM" ] && [ -x /usr/bin/ionice ] && + /usr/bin/ionice "$RSYNC_IONICE_PARM" true 2>/dev/null; then + /usr/bin/ionice "$RSYNC_IONICE_PARM" -p$$ > /dev/null 2>&1 + fi + if start-stop-daemon --start --quiet --background \ + --pidfile $RSYNC_PID_FILE --make-pidfile \ + $RSYNC_NICE_PARM --exec $DAEMON \ + -- --no-detach --daemon --config "$RSYNC_CONFIG_FILE" $RSYNC_OPTS + then + rc=0 + sleep 1 + if ! kill -0 $(cat $RSYNC_PID_FILE) >/dev/null 2>&1; then + log_failure_msg "rsync daemon failed to start" + rc=1 + fi + else + rc=1 + fi + if [ $rc -eq 0 ]; then + log_end_msg 0 + else + log_end_msg 1 + rm -f $RSYNC_PID_FILE + fi +} # rsync_start + + +case "$1" in + start) + if "$RSYNC_ENABLE"; then + log_daemon_msg "Starting rsync daemon" "rsync" + if [ -s $RSYNC_PID_FILE ] && kill -0 $(cat $RSYNC_PID_FILE) >/dev/null 2>&1; then + log_progress_msg "apparently already running" + log_end_msg 0 + exit 0 + fi + rsync_start + else + if [ -s "$RSYNC_CONFIG_FILE" ]; then + [ "$VERBOSE" != no ] && log_warning_msg "rsync daemon not enabled in $RSYNC_DEFAULTS_FILE, not starting..." + fi + fi + ;; + stop) + log_daemon_msg "Stopping rsync daemon" "rsync" + start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $RSYNC_PID_FILE + RETVAL="$?" + log_end_msg $RETVAL + if [ $RETVAL != 0 ] + then + exit 1 + fi + rm -f $RSYNC_PID_FILE + ;; + + reload|force-reload) + log_warning_msg "Reloading rsync daemon: not needed, as the daemon" + log_warning_msg "re-reads the config file whenever a client connects." + ;; + + restart) + set +e + if $RSYNC_ENABLE; then + log_daemon_msg "Restarting rsync daemon" "rsync" + if [ -s $RSYNC_PID_FILE ] && kill -0 $(cat $RSYNC_PID_FILE) >/dev/null 2>&1; then + start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $RSYNC_PID_FILE + else + log_warning_msg "rsync daemon not running, attempting to start." + rm -f $RSYNC_PID_FILE + fi + rsync_start + else + if [ -s "$RSYNC_CONFIG_FILE" ]; then + [ "$VERBOSE" != no ] && log_warning_msg "rsync daemon not enabled in $RSYNC_DEFAULTS_FILE, not starting..." + fi + fi + ;; + + status) + status_of_proc -p $RSYNC_PID_FILE "$DAEMON" rsync + exit $? # notreached due to set -e + ;; + *) + echo "Usage: /etc/init.d/rsync {start|stop|reload|force-reload|restart|status}" + exit 1 +esac + +exit 0 diff -Nru rsync-3.1.3/debian/rsync.install rsync-3.1.3/debian/rsync.install --- rsync-3.1.3/debian/rsync.install 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/rsync.install 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,12 @@ +packaging/cull_options /usr/share/rsync/scripts/ +support/atomic-rsync /usr/share/rsync/scripts/ +support/cvs2includes /usr/share/rsync/scripts/ +support/file-attr-restore /usr/share/rsync/scripts/ +support/files-to-excludes /usr/share/rsync/scripts/ +support/git-set-file-times /usr/share/rsync/scripts/ +support/logfilter /usr/share/rsync/scripts/ +support/lsh /usr/share/rsync/scripts/ +support/mnt-excl /usr/share/rsync/scripts/ +support/munge-symlinks /usr/share/rsync/scripts/ +support/rrsync /usr/share/rsync/scripts/ +support/rsyncstats /usr/share/rsync/scripts/ diff -Nru rsync-3.1.3/debian/rsync.links rsync-3.1.3/debian/rsync.links --- rsync-3.1.3/debian/rsync.links 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/rsync.links 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1 @@ +/usr/share/rsync/scripts/rrsync /usr/bin/rrsync diff -Nru rsync-3.1.3/debian/rsync.lintian-overrides rsync-3.1.3/debian/rsync.lintian-overrides --- rsync-3.1.3/debian/rsync.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/rsync.lintian-overrides 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,3 @@ +rsync: embedded-library usr/bin/rsync: zlib +rsync: spelling-error-in-binary usr/bin/rsync dont don't +rsync: init.d-script-does-not-provide-itself etc/init.d/rsync diff -Nru rsync-3.1.3/debian/rsync.NEWS rsync-3.1.3/debian/rsync.NEWS --- rsync-3.1.3/debian/rsync.NEWS 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/rsync.NEWS 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,10 @@ +rsync (3.1.3-8) unstable; urgency=medium + + Some useful rsync scripts that used to be installed in + /usr/share/doc/rsync/scripts are now installed in + /usr/share/rsync/scripts. All of them have execution permission. + + The rrsync script is now deployed into /usr/bin/rrsync as a + symlink to /usr/share/rsync/scripts/rrsync. + + -- Samuel Henrique Tue, 15 Oct 2019 01:04:36 +0100 diff -Nru rsync-3.1.3/debian/rsync.service rsync-3.1.3/debian/rsync.service --- rsync-3.1.3/debian/rsync.service 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/rsync.service 2014-02-24 18:19:14.000000000 +0000 @@ -0,0 +1,9 @@ +[Unit] +Description=fast remote file copy program daemon +ConditionPathExists=/etc/rsyncd.conf + +[Service] +ExecStart=/usr/bin/rsync --daemon --no-detach + +[Install] +WantedBy=multi-user.target diff -Nru rsync-3.1.3/debian/rules rsync-3.1.3/debian/rules --- rsync-3.1.3/debian/rules 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/rules 2019-10-15 00:04:36.000000000 +0000 @@ -1,131 +1,13 @@ #!/usr/bin/make -f -# debian.rules file for rsync -# Copyright 1996 by Philip Hands. -# Copyright 2001 Colin Walters -# Based on the sample debian.rules file - for GNU Hello (1.3). -# Copyright 1994,1995 by Ian Jackson. -# I hereby give you perpetual unlimited permission to copy, -# modify and relicense this file, provided that you do not remove -# my name from the file itself. (I assert my moral right of -# paternity under the Copyright, Designs and Patents Act 1988.) - - -SHELL = /bin/bash -BINS = rsync -INSTALL = install -INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644 -INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755 -INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755 -INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755 export DEB_BUILD_MAINT_OPTIONS = hardening=+all -dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) dpkg-buildflags -CPPFLAGS := -Izlib $(shell $(dpkg_buildflags) --get CPPFLAGS) -CFLAGS := -Wall $(shell $(dpkg_buildflags) --get CFLAGS) -LDFLAGS := $(shell $(dpkg_buildflags) --get LDFLAGS) - -ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) -INSTALL_CROSS := -else -INSTALL_CROSS := INSTALLCMD='$(INSTALL) --strip-program=$(DEB_HOST_GNU_TYPE)-strip' -endif - -# keep lintian happy: -build: build-arch build-indep -build-arch: build-stamp -build-indep: build-stamp - -build-stamp: - @echo building build tree - -rm -rf debian/buildtree - mkdir debian/buildtree - cp -p * debian/buildtree || true - cp -pr lib m4 popt support testsuite zlib packaging debian/buildtree - # update config.guess/sub - cp /usr/share/misc/config.guess /usr/share/misc/config.sub debian/buildtree - # work around newer autoconf stuff (runstatedir) - touch debian/buildtree/aclocal.m4 - @echo applying misc Debian patches - for i in debian/patches/*.patch debian/patches/*.diff; do if [ -s $$i ]; then echo " $$i ..."; cat $$i | (cd debian/buildtree; patch -p1) || exit 1; fi; done - # work around newer autoconf stuff (runstatedir) - touch debian/buildtree/configure.sh debian/buildtree/config.h.in - @echo configuring - (cd debian/buildtree; ./configure --with-included-zlib=yes --prefix=/usr --mandir='$${prefix}/share/man' --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) LDFLAGS="$(LDFLAGS)") - @echo building - $(MAKE) --directory=debian/buildtree CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" all - touch build-stamp - @echo done - -clean: checkdir - -rm -f build-stamp - -rm -rf debian/buildtree - -rm -rf *~ debian/tmp debian/*~ debian/*.bak debian/files* debian/substvars - -binary-indep: checkroot build -# nothing to do - -binary-arch: checkroot build - -rm -rf debian/tmp - $(INSTALL_DIR) debian/tmp \ - debian/tmp/DEBIAN \ - debian/tmp/usr/bin \ - debian/tmp/usr/share/doc/rsync/examples \ - debian/tmp/usr/share/doc/rsync/scripts \ - debian/tmp/usr/share/man/man1 \ - debian/tmp/usr/share/man/man5 \ - debian/tmp/usr/share/lintian/overrides \ - debian/tmp/lib/systemd/system \ - debian/tmp/etc \ - debian/tmp/etc/default \ - debian/tmp/etc/init.d - # debian/tmp/usr/lib/debian-test/tests -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - $(MAKE) --directory=debian/buildtree install-strip prefix=`pwd`/debian/tmp/usr exec_prefix=`pwd`/debian/tmp/usr $(INSTALL_CROSS) -ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) - strip --strip-unneeded --remove-section=.comment --remove-section=.note debian/tmp/usr/bin/rsync -else - $(DEB_HOST_GNU_TYPE)-strip --strip-unneeded --remove-section=.comment --remove-section=.note debian/tmp/usr/bin/rsync -endif -else - $(MAKE) --directory=debian/buildtree install prefix=`pwd`/debian/tmp/usr exec_prefix=`pwd`/debian/tmp/usr -endif - $(INSTALL_FILE) debian/changelog debian/tmp/usr/share/doc/rsync/changelog.Debian - $(INSTALL_FILE) README tech_report.tex debian/tmp/usr/share/doc/rsync/ - $(INSTALL_FILE) TODO debian/tmp/usr/share/doc/rsync/ - $(INSTALL_FILE) NEWS debian/tmp/usr/share/doc/rsync/changelog - $(INSTALL_FILE) packaging/cull_options debian/tmp/usr/share/doc/rsync/scripts/ - $(INSTALL_FILE) support/atomic-rsync support/cvs2includes support/file-attr-restore support/files-to-excludes support/git-set-file-times support/logfilter support/lsh support/mnt-excl support/munge-symlinks support/rrsync support/rsyncstats debian/tmp/usr/share/doc/rsync/scripts/ - $(INSTALL_FILE) debian/README.Debian debian/tmp/usr/share/doc/rsync/ - echo -e '\n\f' >> debian/tmp/usr/share/doc/rsync/changelog - cat OLDNEWS >> debian/tmp/usr/share/doc/rsync/changelog - find debian/tmp/usr/share/doc/ debian/tmp/usr/share/man/ -name scripts -prune -o -type f -exec gzip -9frn {} + - $(INSTALL_FILE) debian/rsyncd.conf debian/logrotate.conf.rsync debian/tmp/usr/share/doc/rsync/examples/ - $(INSTALL_FILE) debian/copyright debian/tmp/usr/share/doc/rsync/ - # $(INSTALL_SCRIPT) test.sh debian/tmp/usr/lib/debian-test/tests/rsync - $(INSTALL_SCRIPT) debian/postinst debian/tmp/DEBIAN/ - $(INSTALL_SCRIPT) debian/prerm debian/tmp/DEBIAN/ - $(INSTALL_SCRIPT) debian/postrm debian/tmp/DEBIAN/ - $(INSTALL_FILE) debian/buildtree/packaging/systemd/rsync.service debian/tmp/lib/systemd/system/ - $(INSTALL_FILE) debian/default debian/tmp/etc/default/rsync - $(INSTALL_SCRIPT) debian/init.d debian/tmp/etc/init.d/rsync - $(INSTALL_FILE) debian/lintian.overrides debian/tmp/usr/share/lintian/overrides/rsync - (cd debian/tmp; find ./etc -type f | LC_ALL=C sort | sed s,.,,) > debian/tmp/DEBIAN/conffiles - (cd debian/tmp; find lib usr -type f -print0 | LC_ALL=C sort -z | xargs -0r md5sum) > debian/tmp/DEBIAN/md5sums - dpkg-shlibdeps debian/tmp/usr/bin/$(BINS) - dpkg-gencontrol -isp - chown -R root.root debian/tmp - chmod -R go=rX debian/tmp - dpkg --build debian/tmp .. - -# Below here is fairly generic really - -binary: binary-indep binary-arch - -checkdir: - @test -f rsync.c -a -f debian/rules +%: + dh $@ -checkroot: checkdir - @test 0 = `id -u` || { echo "Error: not super-user"; exit 1; } +override_dh_auto_configure: + dh_auto_configure -- --with-included-zlib=yes -.PHONY: binary binary-arch binary-indep clean checkroot checkdir build build-arch build-indep +override_dh_fixperms: + chmod a+x debian/rsync/usr/share/rsync/scripts/rrsync + dh_fixperms diff -Nru rsync-3.1.3/debian/rules-pre-dh rsync-3.1.3/debian/rules-pre-dh --- rsync-3.1.3/debian/rules-pre-dh 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/rules-pre-dh 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,131 @@ +#!/usr/bin/make -f +# debian.rules file for rsync +# Copyright 1996 by Philip Hands. +# Copyright 2001 Colin Walters +# Based on the sample debian.rules file - for GNU Hello (1.3). +# Copyright 1994,1995 by Ian Jackson. +# I hereby give you perpetual unlimited permission to copy, +# modify and relicense this file, provided that you do not remove +# my name from the file itself. (I assert my moral right of +# paternity under the Copyright, Designs and Patents Act 1988.) + + +SHELL = /bin/bash +BINS = rsync +INSTALL = install +INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644 +INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755 +INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755 +INSTALL_DIR = $(INSTALL) -p -d -o root -g root -m 755 + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS=$(DEB_BUILD_MAINT_OPTIONS) dpkg-buildflags +CPPFLAGS := -Izlib $(shell $(dpkg_buildflags) --get CPPFLAGS) +CFLAGS := -Wall $(shell $(dpkg_buildflags) --get CFLAGS) +LDFLAGS := $(shell $(dpkg_buildflags) --get LDFLAGS) + +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +INSTALL_CROSS := +else +INSTALL_CROSS := INSTALLCMD='$(INSTALL) --strip-program=$(DEB_HOST_GNU_TYPE)-strip' +endif + +# keep lintian happy: +build: build-arch build-indep +build-arch: build-stamp +build-indep: build-stamp + +build-stamp: + @echo building build tree + -rm -rf debian/buildtree + mkdir debian/buildtree + cp -p * debian/buildtree || true + cp -pr lib m4 popt support testsuite zlib packaging debian/buildtree + # update config.guess/sub + cp /usr/share/misc/config.guess /usr/share/misc/config.sub debian/buildtree + # work around newer autoconf stuff (runstatedir) + touch debian/buildtree/aclocal.m4 + @echo applying misc Debian patches + for i in debian/patches/*.patch debian/patches/*.diff; do if [ -s $$i ]; then echo " $$i ..."; cat $$i | (cd debian/buildtree; patch -p1) || exit 1; fi; done + # work around newer autoconf stuff (runstatedir) + touch debian/buildtree/configure.sh debian/buildtree/config.h.in + @echo configuring + (cd debian/buildtree; ./configure --with-included-zlib=yes --prefix=/usr --mandir='$${prefix}/share/man' --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) LDFLAGS="$(LDFLAGS)") + @echo building + $(MAKE) --directory=debian/buildtree CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" all + touch build-stamp + @echo done + +clean: checkdir + -rm -f build-stamp + -rm -rf debian/buildtree + -rm -rf *~ debian/tmp debian/*~ debian/*.bak debian/files* debian/substvars + +binary-indep: checkroot build +# nothing to do + +binary-arch: checkroot build + -rm -rf debian/tmp + $(INSTALL_DIR) debian/tmp \ + debian/tmp/DEBIAN \ + debian/tmp/usr/bin \ + debian/tmp/usr/share/doc/rsync/examples \ + debian/tmp/usr/share/doc/rsync/scripts \ + debian/tmp/usr/share/man/man1 \ + debian/tmp/usr/share/man/man5 \ + debian/tmp/usr/share/lintian/overrides \ + debian/tmp/lib/systemd/system \ + debian/tmp/etc \ + debian/tmp/etc/default \ + debian/tmp/etc/init.d + # debian/tmp/usr/lib/debian-test/tests +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + $(MAKE) --directory=debian/buildtree install-strip prefix=`pwd`/debian/tmp/usr exec_prefix=`pwd`/debian/tmp/usr $(INSTALL_CROSS) +ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + strip --strip-unneeded --remove-section=.comment --remove-section=.note debian/tmp/usr/bin/rsync +else + $(DEB_HOST_GNU_TYPE)-strip --strip-unneeded --remove-section=.comment --remove-section=.note debian/tmp/usr/bin/rsync +endif +else + $(MAKE) --directory=debian/buildtree install prefix=`pwd`/debian/tmp/usr exec_prefix=`pwd`/debian/tmp/usr +endif + $(INSTALL_FILE) debian/changelog debian/tmp/usr/share/doc/rsync/changelog.Debian + $(INSTALL_FILE) README tech_report.tex debian/tmp/usr/share/doc/rsync/ + $(INSTALL_FILE) TODO debian/tmp/usr/share/doc/rsync/ + $(INSTALL_FILE) NEWS debian/tmp/usr/share/doc/rsync/changelog + $(INSTALL_FILE) packaging/cull_options debian/tmp/usr/share/doc/rsync/scripts/ + $(INSTALL_FILE) support/atomic-rsync support/cvs2includes support/file-attr-restore support/files-to-excludes support/git-set-file-times support/logfilter support/lsh support/mnt-excl support/munge-symlinks support/rrsync support/rsyncstats debian/tmp/usr/share/doc/rsync/scripts/ + $(INSTALL_FILE) debian/README.Debian debian/tmp/usr/share/doc/rsync/ + echo -e '\n\f' >> debian/tmp/usr/share/doc/rsync/changelog + cat OLDNEWS >> debian/tmp/usr/share/doc/rsync/changelog + find debian/tmp/usr/share/doc/ debian/tmp/usr/share/man/ -name scripts -prune -o -type f -exec gzip -9frn {} + + $(INSTALL_FILE) debian/rsyncd.conf debian/logrotate.conf.rsync debian/tmp/usr/share/doc/rsync/examples/ + $(INSTALL_FILE) debian/copyright debian/tmp/usr/share/doc/rsync/ + # $(INSTALL_SCRIPT) test.sh debian/tmp/usr/lib/debian-test/tests/rsync + $(INSTALL_SCRIPT) debian/postinst debian/tmp/DEBIAN/ + $(INSTALL_SCRIPT) debian/prerm debian/tmp/DEBIAN/ + $(INSTALL_SCRIPT) debian/postrm debian/tmp/DEBIAN/ + $(INSTALL_FILE) debian/buildtree/packaging/systemd/rsync.service debian/tmp/lib/systemd/system/ + $(INSTALL_FILE) debian/default debian/tmp/etc/default/rsync + $(INSTALL_SCRIPT) debian/init.d debian/tmp/etc/init.d/rsync + $(INSTALL_FILE) debian/lintian.overrides debian/tmp/usr/share/lintian/overrides/rsync + (cd debian/tmp; find ./etc -type f | LC_ALL=C sort | sed s,.,,) > debian/tmp/DEBIAN/conffiles + (cd debian/tmp; find lib usr -type f -print0 | LC_ALL=C sort -z | xargs -0r md5sum) > debian/tmp/DEBIAN/md5sums + dpkg-shlibdeps debian/tmp/usr/bin/$(BINS) + dpkg-gencontrol -isp + chown -R root.root debian/tmp + chmod -R go=rX debian/tmp + dpkg --build debian/tmp .. + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +checkdir: + @test -f rsync.c -a -f debian/rules + +checkroot: checkdir + @test 0 = `id -u` || { echo "Error: not super-user"; exit 1; } + +.PHONY: binary binary-arch binary-indep clean checkroot checkdir build build-arch build-indep diff -Nru rsync-3.1.3/debian/salsa-ci.yml rsync-3.1.3/debian/salsa-ci.yml --- rsync-3.1.3/debian/salsa-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/salsa-ci.yml 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,7 @@ +--- +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml + +variables: + SALSA_CI_DISABLE_REPROTEST: 1 diff -Nru rsync-3.1.3/debian/source/lintian-overrides rsync-3.1.3/debian/source/lintian-overrides --- rsync-3.1.3/debian/source/lintian-overrides 2019-03-15 10:25:01.000000000 +0000 +++ rsync-3.1.3/debian/source/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -rsync source: patch-file-present-but-not-mentioned-in-series * diff -Nru rsync-3.1.3/debian/tests/control rsync-3.1.3/debian/tests/control --- rsync-3.1.3/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/tests/control 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,2 @@ +Tests: upstream-tests +Depends: @, @builddeps@ diff -Nru rsync-3.1.3/debian/tests/upstream-tests rsync-3.1.3/debian/tests/upstream-tests --- rsync-3.1.3/debian/tests/upstream-tests 1970-01-01 00:00:00.000000000 +0000 +++ rsync-3.1.3/debian/tests/upstream-tests 2019-10-15 00:04:36.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +# Create needed files for tests +./prepare-source build +./configure.sh + +# Supress gcc warnings (autopkg treats them as failures) +make tls getgroups getfsdev trimslash t_unsafe wildtest testrun 2>/dev/null + +# Run tests +rsync_bin="/usr/bin/rsync" ./runtests.sh