Bug#409335: [Pkg-cups-devel] Bug#409335: cupsys: packages must not ship directories under /usr/local

2007-02-02 Thread Martin-Éric Racine

On 2/2/07, Frank Küster [EMAIL PROTECTED] wrote:

tags 409335 patch
thanks

Steve Langasek [EMAIL PROTECTED] wrote:

 The change requested in 408154 is a policy violation.  Packages are not
 allowed to ship any directories under the /usr/local heirarchy; they must be
 created in the postinst and removed in the prerm.

 This bug now blocks getting the fix for RC bug 403703 into etch, so please
 revert the change.

Instead of just reverting, you could also apply this simple patch:
+
+  * Use dh_usrlocal to install files in /usr/local in the maintainer
+scripts, instead of shipping them in the deb


Unless I misunderstood the man page, dh_usrlocal is meant for software
that builds into /usr/local, which we don't. We're only adding a local
directory in case others need it to install their own PPD.

We probably should not ship any directory in /usr/local or /opt
anyhow. It should be up to the third-party or local applications that
actually supply the PPD to create them.

Even worse, those PPD directories are not only used by CUPS; other
PostScript applications and printer daemons use them too. The proper
solution would be to add those directories to the filesystem skeleton
used by debian-installer and to the FHS specs.

--
Martin-Éric Racine
http://q-funk.iki.fi


Bug#409335: [Pkg-cups-devel] Bug#409335: cupsys: packages must not ship directories under /usr/local

2007-02-02 Thread Kenshi Muto
At Fri, 2 Feb 2007 10:58:38 +0200,
Martin-Éric Racine wrote:
 On 2/2/07, Frank Küster [EMAIL PROTECTED] wrote:
  Steve Langasek [EMAIL PROTECTED] wrote:
   The change requested in 408154 is a policy violation.  Packages are not
   allowed to ship any directories under the /usr/local heirarchy; they must 
   be
   created in the postinst and removed in the prerm.
  
   This bug now blocks getting the fix for RC bug 403703 into etch, so please
   revert the change.

Hm, I understand the situation.

  Instead of just reverting, you could also apply this simple patch:
  +
  +  * Use dh_usrlocal to install files in /usr/local in the maintainer
  +scripts, instead of shipping them in the deb
 
 Unless I misunderstood the man page, dh_usrlocal is meant for software
 that builds into /usr/local, which we don't. We're only adding a local
 directory in case others need it to install their own PPD.

I think so too.

 We probably should not ship any directory in /usr/local or /opt
 anyhow. It should be up to the third-party or local applications that
 actually supply the PPD to create them.
 Even worse, those PPD directories are not only used by CUPS; other
 PostScript applications and printer daemons use them too. The proper
 solution would be to add those directories to the filesystem skeleton
 used by debian-installer and to the FHS specs.

Even so, we have to locate symlink on /usr/share/ppd for
third parties (by postinst?).
I checked source code and thought it was bit terrible to
add tweak code to support additional directory.

I'm considering whether it is ok or not from policy view to
provide symlink against /usr/local/share/ppd and /opt/ppd.
It will become a missing link if user hasn't these two directories.

Thanks,
-- 
Kenshi Muto
[EMAIL PROTECTED]



Bug#409335: [Pkg-cups-devel] Bug#409335: cupsys: packages must not ship directories under /usr/local

2007-02-02 Thread Kenshi Muto
At Fri, 02 Feb 2007 18:57:08 +0900,
Kenshi Muto wrote:
 I'm considering whether it is ok or not from policy view to
 provide symlink against /usr/local/share/ppd and /opt/ppd.
 It will become a missing link if user hasn't these two directories.

Here is a proposal patch.

Index: cupsys.postinst
===
--- cupsys.postinst (revision 418)
+++ cupsys.postinst (working copy)
@@ -206,6 +206,14 @@
if [ -f /etc/cups/printers.conf ]; then
  chown root:lp /etc/cups/printers.conf ; chmod 600 
/etc/cups/printers.conf
fi
+   # Add symlink to local files required by LSB
+   if [ ! -e /usr/share/ppd/1-local-admin ]; then
+ ln -s /usr/local/share/ppd /usr/share/ppd/1-local-admin
+   fi
+   if [ ! -e /usr/share/ppd/2-third-party ]; then
+ ln -s /opt/share/ppd /usr/share/ppd/2-third-party
+   fi
+
 ;;
 
 abort-upgrade|abort-remove|abort-deconfigure)
Index: cupsys.dirs
===
--- cupsys.dirs (revision 425)
+++ cupsys.dirs (working copy)
@@ -7,5 +7,3 @@
 var/cache/cups/ppd
 usr/share/ppd/cups-included
 usr/lib/cups/driver
-usr/local/share/ppd
-opt/share/ppd
Index: changelog
===
--- changelog   (revision 427)
+++ changelog   (working copy)
@@ -1,6 +1,16 @@
-cupsys (1.2.7-3) UNRELEASED; urgency=high
+cupsys (1.2.7-4) unstable; urgency=high
 
   [ Kenshi Muto ]
+  * Stopped providing /usr/local/share/ppd and /opt/share/ppd.
+This was policy violation (closes: #409335)
+Instead of it, cupsys just make the symlinks on /usr/share/ppd
+against these directories.
+
+ -- Kenshi Muto [EMAIL PROTECTED]  Fri,  2 Feb 2007 18:16:24 +0900
+
+cupsys (1.2.7-3) unstable; urgency=high
+
+  [ Kenshi Muto ]
   * removed STR2137 patch. This patch corruted some
 Postscript files. (closes: #403703) This was a release 
 critical bug.
Index: rules
===
--- rules   (revision 425)
+++ rules   (working copy)
@@ -71,10 +71,6 @@
  mv $$i $(DEB_DESTDIR)/../cupsys/usr/share/ppd/cups-included/$$m/; \
done
 
-   # Add symlink to local files required by LSB
-   ln -s /usr/local/share/ppd 
$(DEB_DESTDIR)/../cupsys/usr/share/ppd/1-local-admin
-   ln -s /opt/share/ppd 
$(DEB_DESTDIR)/../cupsys/usr/share/ppd/2-third-party
-
# Compatibility for programs which still look in the old location
#ln -s ../../ppd/cups-included 
$(DEB_DESTDIR)/../cupsys/usr/share/cups/model/cups-included
#ln -s ../cups/model 
$(DEB_DESTDIR)/../cupsys/usr/share/ppd/cups-transitional-dir
Index: cupsys.prerm
===
--- cupsys.prerm(revision 383)
+++ cupsys.prerm(working copy)
@@ -23,6 +23,12 @@
 if [ -L /usr/lib/cups/backend/smb ]; then
 rm -f /usr/lib/cups/backend/smb 2/dev/null || true
 fi
+   if [ -L /usr/share/ppd/1-local-admin ]; then
+ rm -f /usr/share/ppd/1-local-admin
+   fi
+   if [ -L /usr/share/ppd/2-third-party ]; then
+ rm -f /usr/share/ppd/2-third-party
+   fi
 ;;
 upgrade|deconfigure)
 ;;

Thanks,
-- 
Kenshi Muto
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#409335: [Pkg-cups-devel] Bug#409335: cupsys: packages must not ship directories under /usr/local

2007-02-02 Thread Frank Küster
Kenshi Muto [EMAIL PROTECTED] wrote:

 At Fri, 2 Feb 2007 10:58:38 +0200,
 Martin-Éric Racine wrote:
 On 2/2/07, Frank Küster [EMAIL PROTECTED] wrote:
  Steve Langasek [EMAIL PROTECTED] wrote:
   The change requested in 408154 is a policy violation.  Packages are not
   allowed to ship any directories under the /usr/local heirarchy; they 
   must be
   created in the postinst and removed in the prerm.
  
   This bug now blocks getting the fix for RC bug 403703 into etch, so 
   please
   revert the change.

 Hm, I understand the situation.

  Instead of just reverting, you could also apply this simple patch:
  +
  +  * Use dh_usrlocal to install files in /usr/local in the maintainer
  +scripts, instead of shipping them in the deb
 
 Unless I misunderstood the man page, dh_usrlocal is meant for software
 that builds into /usr/local, which we don't. We're only adding a local
 directory in case others need it to install their own PPD.

 I think so too.

No, you both are wrong.  No Debian package is allowed to build into
/usr/local.  However, they may *provide* empty directories below
/usr/local, see the Debian Policy 9.1.2 Site-specific programs.  Here,
provide means to create/remove them in maintainer scripts, exiting
gracefully if /usr/local is mounted read-only.  dh_usrlocal is exactly
for this, as you can see from the manpage:

*** 
dh_usrlocal is a debhelper program that can be used for
building packages that will provide a subdirectory in /usr/local when
installed   
*** 

or by just trying the patch...

 We probably should not ship any directory in /usr/local or /opt
 anyhow. 

You should, as correctly requested in #408154, and (at least for
/usr/local) suggested in the Debian policy

 Even worse, those PPD directories are not only used by CUPS; other
 PostScript applications and printer daemons use them too. The proper
 solution would be to add those directories to the filesystem skeleton
 used by debian-installer and to the FHS specs.

No, before this can be done you'd have to change Debian Policy, who
currently leaves this to individual packages.

Regards, Frank
-- 
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Bug#409335: [Pkg-cups-devel] Bug#409335: cupsys: packages must not ship directories under /usr/local

2007-02-02 Thread Kenshi Muto
 *** 
 dh_usrlocal is a debhelper program that can be used for
 building packages that will provide a subdirectory in /usr/local when
 installed   
 *** 
 
 or by just trying the patch...

I'm so sorry. I tried just now. Yeah, it's cool as vorlon said.
I'll apply your patch. :)

Thanks,
-- 
Kenshi Muto
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]