From 6fed3f6c1bb501c23cec8ec74804422b4e9bbc6f Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 05:57:31 -0600 Subject: [PATCH 01/14] Add a debian/.gitignore --- packages/debian/.gitignore | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 packages/debian/.gitignore diff --git a/packages/debian/.gitignore b/packages/debian/.gitignore new file mode 100644 index 0000000..7f9a468 --- /dev/null +++ b/packages/debian/.gitignore @@ -0,0 +1,7 @@ +*.debhelper +*.debhelper.log +*.substvars +debhelper-build-stamp +files +sanoid +tmp From 6a3e38b6437890a6a3fa9cdfa77614295d995a58 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 05:57:49 -0600 Subject: [PATCH 02/14] Set a Section --- packages/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/debian/control b/packages/debian/control index a64dcde..f00a26f 100644 --- a/packages/debian/control +++ b/packages/debian/control @@ -1,5 +1,5 @@ Source: sanoid -Section: unknown +Section: utils Priority: optional Maintainer: Jim Salter Build-Depends: debhelper (>= 9) From 676c08c9f49300021477bc9e203485428b7451dc Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 05:58:19 -0600 Subject: [PATCH 03/14] Run wrap-and-sort -a --- packages/debian/control | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/debian/control b/packages/debian/control index f00a26f..b2b8e5c 100644 --- a/packages/debian/control +++ b/packages/debian/control @@ -10,5 +10,9 @@ Vcs-Browser: https://github.com/jimsalterjrs/sanoid Package: sanoid Architecture: all -Depends: ${misc:Depends}, ${perl:Depends}, zfsutils-linux | zfs, libconfig-inifiles-perl, libcapture-tiny-perl +Depends: libcapture-tiny-perl, + libconfig-inifiles-perl, + zfsutils-linux | zfs, + ${misc:Depends}, + ${perl:Depends} Description: Policy-driven snapshot management and replication tools From 52912a9bb8c48b5a52307f50164aa683579a08e5 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 05:59:09 -0600 Subject: [PATCH 04/14] Use install in debian/rules Using install is more ideomatic than mkdir + cp. --- packages/debian/rules | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/packages/debian/rules b/packages/debian/rules index 8cadf58..7bd8622 100755 --- a/packages/debian/rules +++ b/packages/debian/rules @@ -9,14 +9,21 @@ DESTDIR = $(CURDIR)/debian/sanoid override_dh_auto_install: - @mkdir -p $(DESTDIR)/usr/sbin; \ - cp sanoid syncoid findoid sleepymutex $(DESTDIR)/usr/sbin; - @mkdir -p $(DESTDIR)/etc/sanoid; \ - cp sanoid.defaults.conf $(DESTDIR)/etc/sanoid; - @mkdir -p $(DESTDIR)/usr/share/doc/sanoid; \ - cp sanoid.conf $(DESTDIR)/usr/share/doc/sanoid/sanoid.conf.example; - @mkdir -p $(DESTDIR)/lib/systemd/system; \ - cp debian/sanoid-prune.service debian/sanoid.timer $(DESTDIR)/lib/systemd/system; + install -d $(DESTDIR)/etc/sanoid + install -m 664 sanoid.defaults.conf $(DESTDIR)/etc/sanoid + + install -d $(DESTDIR)/lib/systemd/system + install -m 664 debian/sanoid-prune.service debian/sanoid.timer \ + $(DESTDIR)/lib/systemd/system + + install -d $(DESTDIR)/usr/sbin + install -m 775 \ + findoid sanoid sleepymutex syncoid \ + $(DESTDIR)/usr/sbin + + install -d $(DESTDIR)/usr/share/doc/sanoid + install -m 664 sanoid.conf \ + $(DESTDIR)/usr/share/doc/sanoid/sanoid.conf.example override_dh_installinit: dh_installinit --noscripts From c86301f4fd6d9ce8b6dedf6df868ec610a436c58 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 05:59:49 -0600 Subject: [PATCH 05/14] Wrap README.Debian --- packages/debian/sanoid.README.Debian | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/debian/sanoid.README.Debian b/packages/debian/sanoid.README.Debian index afaa36b..27fadfc 100644 --- a/packages/debian/sanoid.README.Debian +++ b/packages/debian/sanoid.README.Debian @@ -1 +1,2 @@ -To start, copy the example config file in /usr/share/doc/sanoid to /etc/sanoid/sanoid.conf. +To start, copy the example config file in /usr/share/doc/sanoid to +/etc/sanoid/sanoid.conf. From 2bbf4b50c3c75ac21af8ddb2c5c5eeb5ff48d3d7 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 06:00:05 -0600 Subject: [PATCH 06/14] Remove extraneous debian/copyright boilerplate --- packages/debian/copyright | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/debian/copyright b/packages/debian/copyright index c8ea7dc..3be2046 100644 --- a/packages/debian/copyright +++ b/packages/debian/copyright @@ -26,8 +26,3 @@ License: GPL-3.0+ . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. -# Please avoid picking licenses with terms that are more restrictive than the -# packaged work, as it may make Debian's contributions unacceptable upstream. From bcf1967cb4dc1835eb5cfd5aeb0c83cde724f2fc Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 06:00:15 -0600 Subject: [PATCH 07/14] Fix the syntax in debian/copyright's Source There is no need for angle brackets around URLs. --- packages/debian/copyright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/debian/copyright b/packages/debian/copyright index 3be2046..a43a0a9 100644 --- a/packages/debian/copyright +++ b/packages/debian/copyright @@ -1,6 +1,6 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: sanoid -Source: +Source: https://github.com/jimsalterjrs/sanoid Files: * Copyright: 2017 Jim Salter From 59e181e61d2e0d9f29834fc65b2201f75d1490a4 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 06:00:45 -0600 Subject: [PATCH 08/14] Depend on systemd For sanoid to function, it needs to be run periodically. Currently, the package only has a systemd timer. --- packages/debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/debian/control b/packages/debian/control index b2b8e5c..099cd30 100644 --- a/packages/debian/control +++ b/packages/debian/control @@ -12,6 +12,7 @@ Package: sanoid Architecture: all Depends: libcapture-tiny-perl, libconfig-inifiles-perl, + systemd, zfsutils-linux | zfs, ${misc:Depends}, ${perl:Depends} From 6c4477f7729f6aba09b296219a4b1676172594ac Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 06:05:28 -0600 Subject: [PATCH 09/14] Recommends: utilities for syncoid --- packages/debian/control | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/debian/control b/packages/debian/control index 099cd30..8d4dc3b 100644 --- a/packages/debian/control +++ b/packages/debian/control @@ -16,4 +16,9 @@ Depends: libcapture-tiny-perl, zfsutils-linux | zfs, ${misc:Depends}, ${perl:Depends} +Recommends: gzip, + lzop, + mbuffer, + openssh-client | ssh-client, + pv Description: Policy-driven snapshot management and replication tools From fd9d4bc54a40695eab140386fd2b4a533b39670f Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 06:06:00 -0600 Subject: [PATCH 10/14] Bump Standards-Version (no changes) --- packages/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/debian/control b/packages/debian/control index 8d4dc3b..361435e 100644 --- a/packages/debian/control +++ b/packages/debian/control @@ -3,7 +3,7 @@ Section: utils Priority: optional Maintainer: Jim Salter Build-Depends: debhelper (>= 9) -Standards-Version: 3.9.8 +Standards-Version: 4.1.1 Homepage: https://github.com/jimsalterjrs/sanoid Vcs-Git: https://github.com/jimsalterjrs/sanoid.git Vcs-Browser: https://github.com/jimsalterjrs/sanoid From cac90382e2fc047a49d7a558cf64a2f0cec61bda Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 06:06:22 -0600 Subject: [PATCH 11/14] Use debhelper compat 10 --- packages/debian/compat | 2 +- packages/debian/control | 2 +- packages/debian/rules | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/debian/compat b/packages/debian/compat index ec63514..f599e28 100644 --- a/packages/debian/compat +++ b/packages/debian/compat @@ -1 +1 @@ -9 +10 diff --git a/packages/debian/control b/packages/debian/control index 361435e..8465243 100644 --- a/packages/debian/control +++ b/packages/debian/control @@ -2,7 +2,7 @@ Source: sanoid Section: utils Priority: optional Maintainer: Jim Salter -Build-Depends: debhelper (>= 9) +Build-Depends: debhelper (>= 10) Standards-Version: 4.1.1 Homepage: https://github.com/jimsalterjrs/sanoid Vcs-Git: https://github.com/jimsalterjrs/sanoid.git diff --git a/packages/debian/rules b/packages/debian/rules index 7bd8622..51e52af 100755 --- a/packages/debian/rules +++ b/packages/debian/rules @@ -5,7 +5,7 @@ #export DH_VERBOSE = 1 %: - dh $@ --with systemd + dh $@ DESTDIR = $(CURDIR)/debian/sanoid override_dh_auto_install: From af115dcbe200de7d6db6dd59e0f96f6bcc67a616 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 06:09:46 -0600 Subject: [PATCH 12/14] Add debian/TODO This has some notes on things that need to change before this package can be submitted to Debian. --- packages/debian/TODO | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 packages/debian/TODO diff --git a/packages/debian/TODO b/packages/debian/TODO new file mode 100644 index 0000000..1bc0fb4 --- /dev/null +++ b/packages/debian/TODO @@ -0,0 +1,12 @@ +- This package needs to be a 3.0 (quilt) format, not 3.0 (native). + - Fix the changelog + - Move the packaging out to a separate repository, or at a minimum, + a separate branch. +- Provide an extended description in debian/control +- Figure out a plan for sanoid.defaults.conf. It is not supposed to be + edited, so it shouldn't be installed in /etc. At a minimum, install + it under /usr and make a symlink, but preferably patch sanoid to look + there directly. +- Man pages are necessary for all the utilities installed. + - With these, there is probably no need to ship README.md. +- Break out syncoid into a separate package? From a7662511c8953cf86b53dbc655c35a0301ebc298 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Sun, 26 Nov 2017 06:14:16 -0600 Subject: [PATCH 13/14] Add myself to debian/copyright --- packages/debian/copyright | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/debian/copyright b/packages/debian/copyright index a43a0a9..75d3960 100644 --- a/packages/debian/copyright +++ b/packages/debian/copyright @@ -8,6 +8,7 @@ License: GPL-3.0+ Files: debian/* Copyright: 2017 Jim Salter + 2017 Richard Laager License: GPL-3.0+ License: GPL-3.0+ From 55e362c951905628d66fd3919f6798ca42535378 Mon Sep 17 00:00:00 2001 From: Richard Laager Date: Thu, 30 Nov 2017 20:20:42 -0600 Subject: [PATCH 14/14] Bump Standards-Version to 4.1.2 (no changes) --- packages/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/debian/control b/packages/debian/control index 8465243..da70b65 100644 --- a/packages/debian/control +++ b/packages/debian/control @@ -3,7 +3,7 @@ Section: utils Priority: optional Maintainer: Jim Salter Build-Depends: debhelper (>= 10) -Standards-Version: 4.1.1 +Standards-Version: 4.1.2 Homepage: https://github.com/jimsalterjrs/sanoid Vcs-Git: https://github.com/jimsalterjrs/sanoid.git Vcs-Browser: https://github.com/jimsalterjrs/sanoid