[pkg-remote-commits] [xrdp] 01/01: Update rm_conffile calls for keymap files.

Dominik George natureshadow-guest at moszumanska.debian.org
Fri Dec 23 01:23:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

natureshadow-guest pushed a commit to branch master
in repository xrdp.

commit 5143905de6dd57b5383c28a6a298aad9c41788f8
Author: Dominik George <nik at naturalnet.de>
Date:   Fri Dec 23 02:22:54 2016 +0100

    Update rm_conffile calls for keymap files.
    
    Adds a shell script that generates the list from the Git packaging repo.
---
 debian/changelog                      |  3 +-
 debian/copyright                      |  4 +++
 debian/generate-keymap-rm-conffile.sh | 57 +++++++++++++++++++++++++++++++++++
 debian/xrdp.maintscript               | 37 ++++++++++++-----------
 4 files changed, 83 insertions(+), 18 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8f85ff2..4824168 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,12 +10,13 @@ xrdp (0.9.1-1) UNRELEASED; urgency=medium
   * Replaced debian/rules get-orig-source with uscan.
   * Re-enabled watch file.
   * Turned into MUT package.
+  * Update list of keymap conffiles to be removed on upgrade. (Closes: #845701, #847844)
 
   [ Thorsten Glaser ]
 
   * xrdp Recommends fuse, so that remote drive sharing actually works.
 
- -- Dominik George <nik at naturalnet.de>  Thu, 22 Dec 2016 22:24:42 +0100
+ -- Dominik George <nik at naturalnet.de>  Fri, 23 Dec 2016 02:20:06 +0100
 
 xrdp (0.9.1~2016121126+git5171fa7-1) unstable; urgency=medium
 
diff --git a/debian/copyright b/debian/copyright
index 4aa2dc6..bac3c87 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -695,6 +695,10 @@ Files: xorg/tests/xdemo/yosemite.bmp
 Copyright: 2015, 2016, mirabilos <m at mirbsd.org>
 License: MirOS
 
+Files: debian/generate-keymap-rm-conffile.sh
+Copyright: Dominik George <nik at naturalnet.de>
+License: Expat
+
 Files: debian/*
 Copyright: Dominik George <nik at naturalnet.de>
  Thorsten Glaser <tg at mirbsd.org>
diff --git a/debian/generate-keymap-rm-conffile.sh b/debian/generate-keymap-rm-conffile.sh
new file mode 100644
index 0000000..29d20c6
--- /dev/null
+++ b/debian/generate-keymap-rm-conffile.sh
@@ -0,0 +1,57 @@
+#!/bin/mksh
+#-
+# Copyright (c) 2016 Dominik George <nik at naturalnet.de>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#-
+# This script parses upstream versions from debian/changelog and then
+# analyses the corresponding upstream git tags for xrdp keymap files
+# that have been removed since the last version. It outputs the result
+# in the format suitable for adding to debian/xrdp.maintscript.
+
+# Pipe all upstream versions to co-process in chronological order
+dpkg-parsechangelog -s 0.6.1-1 | \
+    grep "^ xrdp" | \
+    sed 's/^ xrdp (\(.*\)-.*) .*/\1/' | \
+    tac | uniq |&
+
+# Files for comparison lists
+temp1=$(mktemp)
+temp2=$(mktemp)
+
+# Iterate over all upstream versions
+prev_version=
+while read -rp version; do
+	if [[ -n $prev_version ]]; then
+		mv "$temp2" "$temp1"
+
+		# Analyse git tree of that upstream tag
+		git ls-tree --name-only upstream/${version//\~/_} -- instfiles/ | \
+		    grep -o "km-.*.ini" | sort >"$temp2"
+
+		# Compare file lists and output rm_conffile directives
+		for file in $(comm -23 "$temp1" "$temp2"); do
+			print -r -- "rm_conffile /etc/xrdp/$file $version~"
+		done
+	fi
+	prev_version=version
+done
+
+# Clean up
+rm -f "$temp1" "$temp2"
diff --git a/debian/xrdp.maintscript b/debian/xrdp.maintscript
index 115ccef..a9ab80f 100644
--- a/debian/xrdp.maintscript
+++ b/debian/xrdp.maintscript
@@ -1,19 +1,22 @@
 mv_conffile /etc/pam.d/sesman /etc/pam.d/xrdp-sesman 0.9~
 rm_conffile /etc/pam.d/xrdp-sesman 0.9~
-rm_conffile /etc/xrdp/km-0407.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0409.ini 0.9.1~
-rm_conffile /etc/xrdp/km-040a.ini 0.9.1~
-rm_conffile /etc/xrdp/km-040c.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0410.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0411.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0414.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0415.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0416.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0419.ini 0.9.1~
-rm_conffile /etc/xrdp/km-041d.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0807.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0809.ini 0.9.1~
-rm_conffile /etc/xrdp/km-080c.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0813.ini 0.9.1~
-rm_conffile /etc/xrdp/km-0816.ini 0.9.1~
-rm_conffile /etc/xrdp/km-100c.ini 0.9.1~
+rm_conffile /etc/xrdp/km-0407.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0409.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-040a.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-040c.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0410.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0411.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0414.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0415.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0416.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0419.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-041d.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0807.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0809.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-080c.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0813.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-0816.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-100c.ini 0.9.1~20161119+gite8308d5~
+rm_conffile /etc/xrdp/km-e0010411.ini 0.9.1~2016121126+git5171fa7~
+rm_conffile /etc/xrdp/km-e0200411.ini 0.9.1~2016121126+git5171fa7~
+rm_conffile /etc/xrdp/km-e0210411.ini 0.9.1~2016121126+git5171fa7~

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-remote/packages/xrdp.git



More information about the pkg-remote-commits mailing list