[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#767390: Bug#767248: dbconfig-common: removes any permissions from generated include files on upgrade



>> I think this patch doesn't work when installing a new package (it does
>> work on upgrades). So I think the two added lines need to be within an
>> 'if [ -e "$outputfile" ] ; then' statement.
> I figured that and re-created the patch - apparently, I uploaded the old one :(.
>

Turns out it is not enough either.

Attached is (the only) working patch, which leaves anything but the
contents of any existing file intact.

DO NOT UPLOAD the previous patch, as it indeed breaks another code flow.

-nik

-- 
Dominik George (Vorstandsvorsitzender, Pädagogischer Leiter)
Teckids e.V. - Erkunden, Entdecken, Erfinden.
https://www.teckids.org

diff -Nru dbconfig-common-1.8.47+nmu2/dbconfig-generate-include dbconfig-common-1.8.47+nmu3/dbconfig-generate-include
--- dbconfig-common-1.8.47+nmu2/dbconfig-generate-include	2014-10-13 21:05:57.000000000 +0200
+++ dbconfig-common-1.8.47+nmu3/dbconfig-generate-include	2014-10-31 12:32:40.000000000 +0100
@@ -408,7 +408,7 @@
 		ucf --debconf-ok "$tmpout" "$outputfile" >&2
 		rm -f "$tmpout"
 	else
-		mv "$tmpout" "$outputfile"
+		cat "$tmpout" >"$outputfile"
 	fi
 	check_permissions
 	[ "$owner" ] && chown $owner $outputfile
diff -Nru dbconfig-common-1.8.47+nmu2/debian/changelog dbconfig-common-1.8.47+nmu3/debian/changelog
--- dbconfig-common-1.8.47+nmu2/debian/changelog	2014-10-13 21:31:13.000000000 +0200
+++ dbconfig-common-1.8.47+nmu3/debian/changelog	2014-10-29 16:43:27.000000000 +0100
@@ -1,3 +1,11 @@
+dbconfig-common (1.8.47+nmu3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Do not remove permissions from include files on upgrade,
+    thanks to Simon Bruder. (Closes: #767248)
+
+ -- Dominik George <nik@naturalnet.de>  Wed, 29 Oct 2014 16:38:19 +0100
+
 dbconfig-common (1.8.47+nmu2) unstable; urgency=low
 
   * Non-maintainer upload.

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: