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

Bug#270925: marked as done (ocaml-base-nox: creates directories in /usr/local with wrong permissions)

Your message dated Fri, 29 Dec 2006 17:10:45 +0100
with message-id <45953E05.7060102@ens-lyon.org>
and subject line closing old bug
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: ocaml-base-nox
Version: 3.08.1-1
Severity: minor
Tags: patch

Hi Sven,

policy 9.1.2 says that:
- directories created by maintainer scripts under /usr/local should be 
owned by root.staff and have permissions 2775
- they must be created and deleted by postinst and prerm
With the attached patch, ocaml-base-nox creates the directories with 
correct permissions in postinst, and deletes them if empty in prerm.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.27-1-686

Versions of packages ocaml-base-nox depends on:
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an
ii  libgdbm3                    1.8.3-2      GNU dbm database routines (runtime
ii  libncurses5                 5.4-4        Shared libraries for terminal hand

-- no debconf information
diff -Nru ocaml-3.08.1/debian/ocaml-base-nox.postinst ocaml-3.08.1.new/debian/ocaml-base-nox.postinst
--- ocaml-3.08.1/debian/ocaml-base-nox.postinst	2004-09-10 02:20:48.000000000 +0200
+++ ocaml-3.08.1.new/debian/ocaml-base-nox.postinst	2004-09-10 02:10:08.000000000 +0200
@@ -1,9 +1,26 @@
-mkdir -p /usr/local/lib/ocaml/3.08/stublibs || true
+if [ ! -e /usr/local/lib/ocaml ]; then
+    if mkdir /usr/local/lib/ocaml 2>/dev/null; then
+	chown root:staff /usr/local/lib/ocaml
+	chmod 2775 /usr/local/lib/ocaml
+    fi
+if [ ! -e /usr/local/lib/ocaml/3.08 ]; then
+    if mkdir /usr/local/lib/ocaml/3.08 2>/dev/null; then
+	chown root:staff /usr/local/lib/ocaml/3.08
+	chmod 2775 /usr/local/lib/ocaml/3.08
+    fi
+if [ ! -e /usr/local/lib/ocaml/3.08/stublibs ]; then
+    if mkdir /usr/local/lib/ocaml/3.08/stublibs 2>/dev/null; then
+	chown root:staff /usr/local/lib/ocaml/3.08/stublibs
+	chmod 2775 /usr/local/lib/ocaml/3.08/stublibs
+    fi
 for i in /usr/lib/ocaml/3.06 /etc/ocaml /var/lib/ocaml; do	\
 	if [ -e $i/ld.conf ]; then				\
-		echo "Removing leftover $i.ld.conf";		\
+		echo "Removing leftover $i/ld.conf";		\
 		rm -f $i/ld.conf;				\
 		rmdir --ignore-fail-on-non-empty $i;		\
 	fi;							\
diff -Nru ocaml-3.08.1/debian/ocaml-base-nox.prerm ocaml-3.08.1.new/debian/ocaml-base-nox.prerm
--- ocaml-3.08.1/debian/ocaml-base-nox.prerm	1970-01-01 01:00:00.000000000 +0100
+++ ocaml-3.08.1.new/debian/ocaml-base-nox.prerm	2004-09-10 02:17:09.000000000 +0200
@@ -0,0 +1,5 @@
+#!/bin/sh -e
+rmdir /usr/local/lib/ocaml/3.08/stublibs 2>/dev/null || true
+rmdir /usr/local/lib/ocaml/3.08 2>/dev/null || true
+rmdir /usr/local/lib/ocaml 2>/dev/null || true

--- End Message ---
--- Begin Message ---
Package: ocaml
Version: 3.08.3-4

This bug has been fixed a while ago:

  * Create directories in /usr/local/lib with proper permissions in
    ocaml-base-nox's postinst, and remove them if empty in prerm
    (Closes: #270925).



--- End Message ---

Reply to: