From 6cb9b63d21641496801831908f0d5693165b3219 Mon Sep 17 00:00:00 2001 From: twojstaryzdomu Date: Sat, 26 Feb 2022 21:08:35 +0100 Subject: [PATCH] Added deb package build configuration --- debian/compat | 1 + debian/control | 16 ++++++++ debian/patches/00_liblz4_install.patch | 11 ++++++ debian/patches/disable_reconfigure_req.diff | 41 +++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 3 ++ debian/watch | 3 ++ options.c | 10 +++++ 8 files changed, 86 insertions(+) create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/patches/00_liblz4_install.patch create mode 100644 debian/patches/disable_reconfigure_req.diff create mode 100644 debian/patches/series create mode 100644 debian/rules create mode 100644 debian/watch diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..b4de39476 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..9ed2d6c01 --- /dev/null +++ b/debian/control @@ -0,0 +1,16 @@ +Source: rsync +Section: unknown +Priority: optional +Maintainer: unknown +Build-Depends: debhelper (>= 11) +Standards-Version: 4.1.3 +Homepage: https://github.com/twojstaryzdomu/rsync +Vcs-Git: https://github.com/twojstaryzdomu/rsync.git +Vcs-Browser: https://github.com/twojstaryzdomu/rsync + + +Package: rsync +Section: unknown +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: rsync description diff --git a/debian/patches/00_liblz4_install.patch b/debian/patches/00_liblz4_install.patch new file mode 100644 index 000000000..d36c9da1c --- /dev/null +++ b/debian/patches/00_liblz4_install.patch @@ -0,0 +1,11 @@ +--- a/INSTALL.md ++++ b/INSTALL.md +@@ -100,7 +100,7 @@ like. + > sudo apt install -y attr libattr1-dev + > sudo apt install -y libxxhash-dev + > sudo apt install -y libzstd-dev +- > sudo apt install -y libzlz4-dev ++ > sudo apt install -y liblz4-dev + > sudo apt install -y libssl-dev + + - For CentOS (use EPEL for python3-pip): diff --git a/debian/patches/disable_reconfigure_req.diff b/debian/patches/disable_reconfigure_req.diff new file mode 100644 index 000000000..883446f36 --- /dev/null +++ b/debian/patches/disable_reconfigure_req.diff @@ -0,0 +1,41 @@ +Description: Remove need to run reconfigure target +Author: Samuel Henrique +Forwarded: not-needed +Index: rsync/Makefile.in +=================================================================== +--- rsync.orig/Makefile.in ++++ rsync/Makefile.in +@@ -193,15 +193,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 + + .PHONY: reconfigure + reconfigure: configure.sh +@@ -215,17 +206,6 @@ restatus: + 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 + + stunnel-rsyncd.conf: $(srcdir)/stunnel-rsyncd.conf.in Makefile + sed 's;\@bindir\@;$(bindir);g' <$(srcdir)/stunnel-rsyncd.conf.in >stunnel-rsyncd.conf diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000..64f95cb45 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +00_liblz4_install.patch disable_reconfigure_req.diff diff --git a/debian/rules b/debian/rules new file mode 100644 index 000000000..cbe925d75 --- /dev/null +++ b/debian/rules @@ -0,0 +1,3 @@ +#!/usr/bin/make -f +%: + dh $@ diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000..6c67a454c --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/rsync-$1\.tar\.gz/ \ + https://github.com/twojstaryzdomu/rsync/releases .*/v?(\d\S+)\.tar\.gz diff --git a/options.c b/options.c index 74d56b9c7..3a8dedf52 100644 --- a/options.c +++ b/options.c @@ -1377,6 +1377,16 @@ int parse_arguments(int *argc_p, const char ***argv_p) * only special cases are returned and listed here. */ switch (opt) { + case 'L': + if(update_links && copy_links) { + rprintf(FERROR, "L/--copy-links conflicts with --update-links.\n"); + exit_cleanup(RERR_SYNTAX); + } + else { + snprintf(err_buf, sizeof err_buf, "update_links: %d\n", update_links); + snprintf(err_buf, sizeof err_buf, "copy_links: %d\n", copy_links); + } + case 'V': version_opt_cnt++; break;