diffstat for etckeeper-1.18.10 etckeeper-1.18.10

 changelog                                                           |   29 +++
 control                                                             |   21 +-
 copyright                                                           |    2 
 patches/0001-Add-breezy-python3-plugin.patch                        |   74 ++++++++++
 patches/0002-Default-to-UTF8-encoding-for-consistent-ordering.patch |   35 ++++
 patches/series                                                      |    2 
 rules                                                               |    4 
 7 files changed, 148 insertions(+), 19 deletions(-)

diff -Nru etckeeper-1.18.10/debian/changelog etckeeper-1.18.10/debian/changelog
--- etckeeper-1.18.10/debian/changelog	2019-01-16 19:51:37.000000000 +0100
+++ etckeeper-1.18.10/debian/changelog	2019-10-28 14:06:44.000000000 +0100
@@ -1,3 +1,22 @@
+etckeeper (1.18.10-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Import patches from Ubuntu (Closes: #928177):
+    + Use a UTF-8 encoding, to ensure stable sorting.
+    + Add a Breezy plugin, using Python3.
+  * Replace bzr dependencies with brz (bzr is now a transitional package).
+  * d/control:
+    + Bump Standards-Version to 4.4.1, no changes needed.
+    + Set Rules-Requires-Root: no.
+    + Drop Conflicts against a very old version of bzr.
+    + Drop version requirements against very old versions, all satisfied
+      in oldoldstable.
+    + Bump debhelper compat level to 12.
+  * Build using Python3 instead of Python2 (Closes: #811180, #921447)
+    (This stops installing the bzr plugin, instead installing the brz one).
+
+ -- Mattia Rizzolo <mattia@debian.org>  Mon, 28 Oct 2019 14:06:44 +0100
+
 etckeeper (1.18.10-1) unstable; urgency=medium
 
   * New upstream release
@@ -414,7 +433,7 @@
 
 etckeeper (0.56) unstable; urgency=low
 
-  * Converted to use dh_python2. Closes: #616800 
+  * Converted to use dh_python2. Closes: #616800
   * Handle files with % in their names.
 
  -- Joey Hess <joeyh@debian.org>  Tue, 12 Jul 2011 14:38:09 -0400
@@ -458,7 +477,7 @@
   * Add .pyc and .pyo files to ignore.
   * Add lvm/backup and lvm/cache to ignore. Closes: #462355
   * Avoid warning about special or hard linked files that are ignored
-    by hg. Thanks Sjoerd Mullender for patch. 
+    by hg. Thanks Sjoerd Mullender for patch.
     Closes: https://bugzilla.redhat.com/show_bug.cgi?id=688991
 
  -- Joey Hess <joeyh@debian.org>  Fri, 18 Mar 2011 15:37:54 -0400
@@ -680,7 +699,7 @@
   * Run etckeeper init on initial install. Closes: #505772
     (The idea being that if someone doesn't want to use git, they can
     immediatly uninit to easily reverse this.)
-  * Document how to change the VCS used by etckeeper, without preserving 
+  * Document how to change the VCS used by etckeeper, without preserving
     any history. Preserving history left as an exersise for the reader.
     Closes: #515237
   * Implement list-installed for rpm.
@@ -707,7 +726,7 @@
     comment block. (You may want to add such a comment block to your existing
     .gitignore, or delete the file and regenerate it.)
   * Run etckeeper update-ignore on upgrade.
-  * Fix handling of -d in recursive calls to etckeeper 
+  * Fix handling of -d in recursive calls to etckeeper
 
  -- Joey Hess <joeyh@debian.org>  Sat, 14 Feb 2009 01:21:22 -0500
 
@@ -835,7 +854,7 @@
   [ Jelmer Vernooij ]
   * Support for the new bzr pre-commit hook. This requires bzr version 1.4.
     Closes: #473069
-  * Remove pointless commit.d/40bzr-rm script. 
+  * Remove pointless commit.d/40bzr-rm script.
 
   [ Joey Hess ]
   * debhelper v7; rules file minimisation
diff -Nru etckeeper-1.18.10/debian/control etckeeper-1.18.10/debian/control
--- etckeeper-1.18.10/debian/control	2019-01-16 19:51:37.000000000 +0100
+++ etckeeper-1.18.10/debian/control	2019-10-28 14:04:42.000000000 +0100
@@ -1,31 +1,30 @@
 Source: etckeeper
 Section: admin
 Priority: optional
-Build-Depends: debhelper-compat (= 11),
+Build-Depends: debhelper-compat (= 12),
                bats,
-               bzr (>= 1.5~),
+               brz,
                dh-python,
-               dpkg-dev (>= 1.9.0),
                fakeroot,
                git,
-               python,
+               python3:any,
 Maintainer: Antoine Beaupré <anarcat@debian.org>
-Standards-Version: 4.3.0
+Standards-Version: 4.4.1
+Rules-Requires-Root: no
 Vcs-Git: https://git.joeyh.name/git/etckeeper.git
 Vcs-Browser: https://git.joeyh.name/index.cgi/etckeeper.git/
 Homepage: https://etckeeper.branchable.com/
 
 Package: etckeeper
 Architecture: all
-Depends: git (>= 1:1.7) | mercurial | bzr (>= 1.5~) | darcs,
+Depends: git | mercurial | brz | darcs,
          ${misc:Depends},
-         ${python:Depends},
+         ${python3:Depends},
 Recommends: cron-daemon
-Suggests: sudo (>= 1.7.4p4)
-Conflicts: bzr (<< 1.5~)
-Description: store /etc in git, mercurial, bzr or darcs
+Suggests: sudo
+Description: store /etc in git, mercurial, brz or darcs
  The etckeeper program is a tool to let /etc be stored in a git, mercurial,
- bzr or darcs repository. It hooks into APT to automatically commit changes
+ brz or darcs repository. It hooks into APT to automatically commit changes
  made to /etc during package upgrades. It tracks file metadata that version
  control systems do not normally support, but that is important for /etc, such
  as the permissions of /etc/shadow. It's quite modular and configurable, while
diff -Nru etckeeper-1.18.10/debian/copyright etckeeper-1.18.10/debian/copyright
--- etckeeper-1.18.10/debian/copyright	2019-01-16 19:51:37.000000000 +0100
+++ etckeeper-1.18.10/debian/copyright	2019-10-28 13:57:55.000000000 +0100
@@ -1,4 +1,4 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
 Copyright: © 2007-2014 Joey Hess <id@joeyh.name> and contributors
diff -Nru etckeeper-1.18.10/debian/patches/0001-Add-breezy-python3-plugin.patch etckeeper-1.18.10/debian/patches/0001-Add-breezy-python3-plugin.patch
--- etckeeper-1.18.10/debian/patches/0001-Add-breezy-python3-plugin.patch	1970-01-01 01:00:00.000000000 +0100
+++ etckeeper-1.18.10/debian/patches/0001-Add-breezy-python3-plugin.patch	2019-10-28 13:46:23.000000000 +0100
@@ -0,0 +1,74 @@
+From b5919d7919dda614c3c3c76ba126f45e205494bd Mon Sep 17 00:00:00 2001
+From: Dimitri John Ledkov <xnox@ubuntu.com>
+Date: Mon, 29 Apr 2019 14:11:09 +0100
+Subject: [PATCH 1/3] Add breezy python3 plugin
+
+---
+ Makefile                  |  3 +++
+ debian/changelog          |  6 ++++++
+ debian/control            |  6 +++---
+ etckeeper-brz/__init__.py | 34 ++++++++++++++++++++++++++++++++++
+ 4 files changed, 46 insertions(+), 3 deletions(-)
+ create mode 100644 etckeeper-brz/__init__.py
+
+--- a/Makefile
++++ b/Makefile
+@@ -16,11 +16,13 @@
+ INSTALL_EXE=${INSTALL}
+ INSTALL_DATA=${INSTALL} -m 0644
+ PYTHON=python
++PYTHON3=python3
+ FAKEROOT := $(shell command -v fakeroot 2> /dev/null)
+ TESTDIR := $(shell mktemp -u -d)
+ 
+ build: etckeeper.spec etckeeper.version
+ 	-$(PYTHON) ./etckeeper-bzr/__init__.py build || echo "** bzr support not built"
++	-$(PYTHON3) ./etckeeper-brz/__init__.py build || echo "** brz support not built"
+ 	-$(PYTHON) ./etckeeper-dnf/etckeeper.py build || echo "** DNF support not built"
+ 
+ install: etckeeper.version
+@@ -66,6 +68,7 @@
+ 	$(INSTALL) zypper-etckeeper.py $(DESTDIR)$(prefix)/lib/zypp/plugins/commit/zypper-etckeeper.py
+ endif
+ 	-$(PYTHON) ./etckeeper-bzr/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** bzr support not installed"
++	-$(PYTHON3) ./etckeeper-brz/__init__.py install --root=$(DESTDIR) ${PYTHON_INSTALL_OPTS} || echo "** brz support not installed"
+ 	echo "** installation successful"
+ 
+ clean: etckeeper.spec etckeeper.version
+--- /dev/null
++++ b/etckeeper-brz/__init__.py
+@@ -0,0 +1,34 @@
++#
++# Breezy plugin that runs etckeeper pre-commit when necessary
++
++"""Runs etckeeper pre-commit when necessary."""
++
++from breezy.errors import BzrError
++import os
++
++def etckeeper_startcommit_hook(tree):
++    abspath = getattr(tree, "abspath", None)
++    if abspath is None or not os.path.exists(abspath(".etckeeper")):
++        # Only run the commit hook when this is an etckeeper branch
++        return
++    import subprocess
++    ret = subprocess.call(["etckeeper", "pre-commit", abspath(".")])
++    if ret != 0:
++        raise BzrError("etckeeper pre-commit failed")
++
++try:
++    from breezy.hooks import install_lazy_named_hook
++except ImportError:
++    from breezy.mutabletree import MutableTree
++    MutableTree.hooks.install_named_hook('start_commit',
++        etckeeper_startcommit_hook, 'etckeeper')
++else:
++    install_lazy_named_hook(
++        "breezy.mutabletree", "MutableTree.hooks",
++        'start_commit', etckeeper_startcommit_hook, 'etckeeper')
++
++if __name__ == "__main__":
++    from distutils.core import setup
++    setup(name="brz-etckeeper",
++          packages=["breezy.plugins.etckeeper"],
++          package_dir={"breezy.plugins.etckeeper":"etckeeper-brz"})
diff -Nru etckeeper-1.18.10/debian/patches/0002-Default-to-UTF8-encoding-for-consistent-ordering.patch etckeeper-1.18.10/debian/patches/0002-Default-to-UTF8-encoding-for-consistent-ordering.patch
--- etckeeper-1.18.10/debian/patches/0002-Default-to-UTF8-encoding-for-consistent-ordering.patch	1970-01-01 01:00:00.000000000 +0100
+++ etckeeper-1.18.10/debian/patches/0002-Default-to-UTF8-encoding-for-consistent-ordering.patch	2019-10-28 13:43:06.000000000 +0100
@@ -0,0 +1,35 @@
+From 10d74939aeff32d6638b905ec248ccd6f37fe512 Mon Sep 17 00:00:00 2001
+From: Dimitri John Ledkov <xnox@ubuntu.com>
+Date: Mon, 29 Apr 2019 14:11:51 +0100
+Subject: [PATCH 2/3] Default to UTF8 encoding, for consistent ordering
+
+---
+ debian/changelog              | 1 +
+ etckeeper                     | 4 ++++
+ pre-commit.d/30store-metadata | 2 +-
+ 3 files changed, 6 insertions(+), 1 deletion(-)
+
+--- a/etckeeper
++++ b/etckeeper
+@@ -54,6 +54,10 @@
+ if [ ! -z "$AVOID_SPECIAL_FILE_WARNING" ]; then
+ 	export AVOID_SPECIAL_FILE_WARNING
+ fi
++if [ -z "en_GB.UTF-8" ]; then
++	# Default to UTF8 encoding, if unset
++	export LANG=C.UTF-8
++fi
+ 
+ if [ ! -z "$PUSH_REMOTE" ]; then
+ 	export PUSH_REMOTE
+--- a/pre-commit.d/30store-metadata
++++ b/pre-commit.d/30store-metadata
+@@ -2,7 +2,7 @@
+ set -e
+ 
+ # Make sure sort always sorts in same order.
+-LANG=C
++LANG=C.UTF-8
+ export LANG
+ 
+ filter_ignore() {
diff -Nru etckeeper-1.18.10/debian/patches/series etckeeper-1.18.10/debian/patches/series
--- etckeeper-1.18.10/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ etckeeper-1.18.10/debian/patches/series	2019-10-28 13:40:24.000000000 +0100
@@ -0,0 +1,2 @@
+0001-Add-breezy-python3-plugin.patch
+0002-Default-to-UTF8-encoding-for-consistent-ordering.patch
diff -Nru etckeeper-1.18.10/debian/rules etckeeper-1.18.10/debian/rules
--- etckeeper-1.18.10/debian/rules	2019-01-16 19:51:37.000000000 +0100
+++ etckeeper-1.18.10/debian/rules	2019-10-28 14:03:45.000000000 +0100
@@ -3,11 +3,11 @@
 export PYTHON_INSTALL_OPTS=--install-layout=deb
 
 %:
-	dh $@ --with python2
+	dh $@ --with python3
 
 override_dh_installdocs:
 	dh_installdocs -X.gitignore
 
 override_dh_auto_install:
 	dh_auto_install
-	rm debian/etckeeper/usr/lib/python2.7/dist-packages/bzrlib/plugins/etckeeper/__init__.pyc
+	find debian/etckeeper -name '__pycache__' -print0 | xargs -0 -r rm -rv
