--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: ocaml-base-nox: creates directories in /usr/local with wrong permissions
- From: Julien Cristau <julien.cristau@ens-lyon.fr>
- Date: Fri, 10 Sep 2004 03:09:22 +0200
- Message-id: <20040910010922.5A85F93704@localhost.localdomain>
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
Locale: LANG=C, LC_CTYPE=C
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 @@
#!/bin/sh
-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
+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
+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
+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 ---