Control: tag -1 + patch

On Sat, 06 Dec 2014 23:59:35 +0100, intrigeri wrote:

> > These files must be moved to /usr/share/$PACKAGE and may be symlinked
> > from /usr/share/doc/$PACKAGE.
> After a quick glance at the source, it seems quite doable to move
> stuff from debian/fex.examples to debian/fex.install and
> debian/fex.links, and to adjust debian/rules accordingly.

Ack, thanks for this investigation.

Attached is a patch implementing this change.
Comments welcome, I'm also happy to NMU in case the maintainers are
busy.


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Funny van Dannen: Saufen
diff -Nru fex-20140917/debian/changelog fex-20140917/debian/changelog
--- fex-20140917/debian/changelog	2014-09-23 22:28:23.000000000 +0200
+++ fex-20140917/debian/changelog	2014-12-10 16:59:29.000000000 +0100
@@ -1,3 +1,17 @@
+fex (20140917-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix "postinst uses /usr/share/doc content (Policy 12.3)":
+    install templates into /usr/share/fex/templates instead
+    - install files via debian/fex.install into new location
+    - use new file location in debian/fex.postinst
+    - drop debian/fex.examples and remove dh_installexamples call
+      from debian/rules
+    - create symlinks in /usr/share/doc/fex/examples via debian/fex.links
+    (Closes: #771727)
+
+ -- gregor herrmann <gre...@debian.org>  Wed, 10 Dec 2014 16:59:23 +0100
+
 fex (20140917-1) unstable; urgency=medium
 
   * New upstream release: 20140917
diff -Nru fex-20140917/debian/fex.examples fex-20140917/debian/fex.examples
--- fex-20140917/debian/fex.examples	2014-09-23 22:28:23.000000000 +0200
+++ fex-20140917/debian/fex.examples	1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-etc/xinetd_fex
-lib/fex.ph 
diff -Nru fex-20140917/debian/fex.install fex-20140917/debian/fex.install
--- fex-20140917/debian/fex.install	2014-09-23 22:28:23.000000000 +0200
+++ fex-20140917/debian/fex.install	2014-12-09 22:53:29.000000000 +0100
@@ -17,3 +17,5 @@
 lib/fex.pp usr/share/fex/lib
 lib/fup.pl etc/fex
 locale/export/* usr/share/fex/locale
+etc/xinetd_fex usr/share/fex/templates
+lib/fex.ph  usr/share/fex/templates
diff -Nru fex-20140917/debian/fex.links fex-20140917/debian/fex.links
--- fex-20140917/debian/fex.links	2014-09-23 22:28:23.000000000 +0200
+++ fex-20140917/debian/fex.links	2014-12-09 22:59:02.000000000 +0100
@@ -4,3 +4,5 @@
 /usr/bin/fac /usr/share/fex/bin/fac
 /usr/bin/fexsend /usr/share/fex/bin/fexsend
 /usr/share/javascript/jquery/jquery.js /usr/share/fex/htdocs/FAQ/jquery.js
+/usr/share/fex/templates/fex.ph /usr/share/doc/fex/examples/fex.ph
+/usr/share/fex/templates/xinetd_fex /usr/share/doc/fex/examples/xinetd_fex
diff -Nru fex-20140917/debian/fex.postinst fex-20140917/debian/fex.postinst
--- fex-20140917/debian/fex.postinst	2014-09-23 22:28:23.000000000 +0200
+++ fex-20140917/debian/fex.postinst	2014-12-09 23:00:02.000000000 +0100
@@ -122,10 +122,10 @@
     if [ ! -f /etc/fex/fex.ph ];then
         if [ -z "$myhostname" ];then
             echo 'Initializing /etc/fex/fex.ph WITHOUT hostname (Please correct before using F*EX)'
-            zcat /usr/share/doc/fex/examples/fex.ph.gz >/var/lib/fex/fex.ph
+            cat /usr/share/fex/templates/fex.ph >/var/lib/fex/fex.ph
         else
             echo 'Initializing /etc/fex/fex.ph with correcting hostname (using: '${myhostname}')'
-            zcat /usr/share/doc/fex/examples/fex.ph.gz|sed -e 's/^\$hostname.*/\$hostname = '"'${myhostname}'"';/' >/var/lib/fex/fex.ph
+            cat /usr/share/fex/templates/fex.ph|sed -e 's/^\$hostname.*/\$hostname = '"'${myhostname}'"';/' >/var/lib/fex/fex.ph
         fi
         # make sure we reset ucf here..
         ucfr --purge fex /etc/fex/fex.ph
@@ -215,7 +215,7 @@
     chown -R fex:fex /usr/share/fex/ /var/lib/fex/ /var/log/fex/ /var/spool/fex/
     chmod 0750 /usr/share/fex/ /var/lib/fex/ /var/log/fex/ /var/spool/fex/
     if [ -d /etc/xinetd.d ];then
-        ucf --debconf-ok /usr/share/doc/fex/examples/xinetd_fex /etc/xinetd.d/fex
+        ucf --debconf-ok /usr/share/fex/templates/xinetd_fex /etc/xinetd.d/fex
         remainingsrv=`grep -r /usr/share/fex/bin/fexsrv /etc/xinetd.d|grep -v '^/etc/xinetd.d/fex:'|sed -e 's#^/etc/xinetd.d/\([^:]\+\):.*#\1#'|grep -v 'fex.*-*'||true`
         if [ ! -z "$remainingsrv" ];then
             echo "User-defined services in xinetd not updated: ${remainingsrv}. Please update yourself!"
diff -Nru fex-20140917/debian/htdocs.md5/20140917-1.1 fex-20140917/debian/htdocs.md5/20140917-1.1
--- fex-20140917/debian/htdocs.md5/20140917-1.1	1970-01-01 01:00:00.000000000 +0100
+++ fex-20140917/debian/htdocs.md5/20140917-1.1	2014-12-09 23:16:41.000000000 +0100
@@ -0,0 +1,24 @@
+1e38bd24ee23cb82c3f0820bc710093d  htdocs/FAQ/admin.faq
+6d3b691d1e3b1786c0bf735604fb9817  htdocs/FAQ/admin.html
+6d3b691d1e3b1786c0bf735604fb9817  htdocs/FAQ/all.html
+6d580fdc7eb75e7b8073472702e5cd27  htdocs/FAQ/faq.pl
+18ea97a73b75ac6a09cd6176405575c9  htdocs/FAQ/local.faq
+6d3b691d1e3b1786c0bf735604fb9817  htdocs/FAQ/local.html
+6260621528c7c6ef6e5c37402dfe1aaf  htdocs/FAQ/meta.faq
+6d3b691d1e3b1786c0bf735604fb9817  htdocs/FAQ/meta.html
+8efac8c29f2493f7cf587397a3383573  htdocs/FAQ/misc.faq
+6d3b691d1e3b1786c0bf735604fb9817  htdocs/FAQ/misc.html
+ea3930c927a37b86abb10a3d28e68d9d  htdocs/FAQ/user.faq
+6d3b691d1e3b1786c0bf735604fb9817  htdocs/FAQ/user.html
+8fef1010d65fcae7afcc991d0a889378  htdocs/SEX.html
+1f3d7acc70377496f95c5adddaf4ca7b  htdocs/action-fex-camel.gif
+9518c02523c765d590465393659bfa13  htdocs/dynamic.html
+d41d8cd98f00b204e9800998ecf8427e  htdocs/favicon.ico
+5ed818abbfacb608f3d73523dc34b8e7  htdocs/features.html
+54c81afa02df999d3f096685caa5258a  htdocs/fup_template.html
+bdf9506feb34a5f22eb302e48ba9d9df  htdocs/index.html
+ad8a95bba8dd1a61d70bd38611bc2059  htdocs/logo.jpg
+f71d20196d4caf35b6a670db8c70b03d  htdocs/robots.txt
+968a8facfcdd185ad696b86b67ec63ff  htdocs/small_logo.jpg
+863744e12ec319a227c113b3c189c41f  htdocs/sup.html
+9c4136f2a7158d704e9999f052104377  htdocs/tools.html
diff -Nru fex-20140917/debian/rules fex-20140917/debian/rules
--- fex-20140917/debian/rules	2014-09-23 22:28:23.000000000 +0200
+++ fex-20140917/debian/rules	2014-12-09 22:55:46.000000000 +0100
@@ -59,7 +59,6 @@
 	(cd debian/htdocs.md5;tar czf ../fex/usr/share/fex/.md5/htdocs.tgz *)
 	dh_installcron
 	dh_installdebconf
-	dh_installexamples
 	dh_installlogrotate
 	dh_installman -pfex-utils debian/man-fex-utils/*.1
 	dh_installman -pfex debian/man-fex/*.1

Attachment: signature.asc
Description: Digital Signature

Reply via email to