[med-svn] r12054 - trunk/packages/biomaj-watcher/trunk/debian

Olivier Sallou osallou at alioth.debian.org
Wed Aug 15 07:59:39 UTC 2012


Author: osallou
Date: 2012-08-15 07:59:38 +0000 (Wed, 15 Aug 2012)
New Revision: 12054

Added:
   trunk/packages/biomaj-watcher/trunk/debian/setperms.sh
   trunk/packages/biomaj-watcher/trunk/debian/unsetperms.sh
Modified:
   trunk/packages/biomaj-watcher/trunk/debian/changelog
   trunk/packages/biomaj-watcher/trunk/debian/install
   trunk/packages/biomaj-watcher/trunk/debian/postinst
   trunk/packages/biomaj-watcher/trunk/debian/postrm
   trunk/packages/biomaj-watcher/trunk/debian/prerm
Log:
fix ownership permissions

Modified: trunk/packages/biomaj-watcher/trunk/debian/changelog
===================================================================
--- trunk/packages/biomaj-watcher/trunk/debian/changelog	2012-08-15 07:59:01 UTC (rev 12053)
+++ trunk/packages/biomaj-watcher/trunk/debian/changelog	2012-08-15 07:59:38 UTC (rev 12054)
@@ -1,3 +1,13 @@
+biomaj-watcher (1.2.0-9) UNRELEASED; urgency=low
+
+  [ Olivier Sallou ]
+  * modifies ownership/permissions of files from the biomaj package (Closes: #682490).
+    - debian/postinst, debian/setperms.sh, debian/unsetperms.sh
+  * debian/control: Transition package to use default java implementation (Closes: #683530).
+    - Thanks to James Page (james.page at ubuntu.com)
+
+ -- Olivier Sallou <osallou at debian.org>  Sun, 24 Jun 2012 15:33:54 +0200
+
 biomaj-watcher (1.2.0-8) unstable; urgency=low
 
   [Martin Bagge <brother at bsnet.se>, debian-l10n-swedish]

Modified: trunk/packages/biomaj-watcher/trunk/debian/install
===================================================================
--- trunk/packages/biomaj-watcher/trunk/debian/install	2012-08-15 07:59:01 UTC (rev 12053)
+++ trunk/packages/biomaj-watcher/trunk/debian/install	2012-08-15 07:59:38 UTC (rev 12054)
@@ -3,3 +3,5 @@
 usr/share/java
 var/log/biomaj-watcher
 etc/biomaj-watcher
+debian/setperms.sh usr/share/biomaj-watcher/bin
+debian/unsetperms.sh usr/share/biomaj-watcher/bin

Modified: trunk/packages/biomaj-watcher/trunk/debian/postinst
===================================================================
--- trunk/packages/biomaj-watcher/trunk/debian/postinst	2012-08-15 07:59:01 UTC (rev 12053)
+++ trunk/packages/biomaj-watcher/trunk/debian/postinst	2012-08-15 07:59:38 UTC (rev 12054)
@@ -5,6 +5,10 @@
 # Source debconf library.
 . /usr/share/debconf/confmodule
 
+set_perms() {
+ find $1 | xargs -n 1 /usr/share/biomaj-watcher/bin/setperms.sh
+}
+
 case "$1" in
     configure)
 
@@ -49,13 +53,20 @@
       cp /usr/share/biomaj/lib/biomaj.jar /var/lib/tomcat6/shared/biomaj.jar
 
 
-      chown -R tomcat6 /etc/biomaj/db_properties
+      # Update configuration files
+      set_perms /etc/biomaj/db_properties
+      # Update generated banks
+      set_perms /var/lib/biomaj
+      # Update logs
+      set_perms /var/log/biomaj
+
+      #chown -R tomcat6 /etc/biomaj/db_properties
       chown -R tomcat6 /usr/share/java/webapps/biomaj-watcher
-      chmod -R 775 /etc/biomaj/db_properties
-      chown -R tomcat6 /var/log/biomaj
-      chmod -R 775 /var/log/biomaj
-      chown -R tomcat6 /var/lib/biomaj
-      chmod -R 775 /var/lib/biomaj
+      #chmod -R 775 /etc/biomaj/db_properties
+      #chown -R tomcat6 /var/log/biomaj
+      #chmod -R 775 /var/log/biomaj
+      #chown -R tomcat6 /var/lib/biomaj
+      #chmod -R 775 /var/lib/biomaj
       chown -R tomcat6 /etc/biomaj-watcher
       # Update context
       java -cp $biomajwatcher_root/bin UpdateToBiomaj1_2 /usr/share/java/webapps/biomaj-watcher admin

Modified: trunk/packages/biomaj-watcher/trunk/debian/postrm
===================================================================
--- trunk/packages/biomaj-watcher/trunk/debian/postrm	2012-08-15 07:59:01 UTC (rev 12053)
+++ trunk/packages/biomaj-watcher/trunk/debian/postrm	2012-08-15 07:59:38 UTC (rev 12054)
@@ -5,6 +5,10 @@
 # Source debconf library.
 . /usr/share/debconf/confmodule
 
+unset_perms() {
+    find $1 | xargs -n 1 /usr/share/biomaj-watcher/bin/unsetperms.sh
+}
+
 case "$1" in
     upgrade)
     ;;
@@ -26,6 +30,7 @@
       rm -f /etc/tomcat6/Catalina/localhost/BmajWatcher#logs.xml
       rm -f /usr/share/java/webapps/biomaj-watcher/WEB-INF/lib/*.jar
       rm -rf /etc/biomaj-watcher
+
     ;;
 
     *)

Modified: trunk/packages/biomaj-watcher/trunk/debian/prerm
===================================================================
--- trunk/packages/biomaj-watcher/trunk/debian/prerm	2012-08-15 07:59:01 UTC (rev 12053)
+++ trunk/packages/biomaj-watcher/trunk/debian/prerm	2012-08-15 07:59:38 UTC (rev 12054)
@@ -5,8 +5,25 @@
 # Source debconf library.
 . /usr/share/debconf/confmodule
 
+unset_perms() {
+    find $1 | xargs -n 1 /usr/share/biomaj-watcher/bin/unsetperms.sh
+}
 
+
 case "$1" in
+    remove)
+      # Update configuration files
+      unset_perms /etc/biomaj/db_properties/
+      # Update generated banks
+      unset_perms /var/lib/biomaj/
+      # Update logs
+      unset_perms /var/log/biomaj/
+    ;;
+    *)
+    ;;
+esac    
+
+case "$1" in
     upgrade)
     ;;
     remove|upgrade|deconfigure)

Added: trunk/packages/biomaj-watcher/trunk/debian/setperms.sh
===================================================================
--- trunk/packages/biomaj-watcher/trunk/debian/setperms.sh	                        (rev 0)
+++ trunk/packages/biomaj-watcher/trunk/debian/setperms.sh	2012-08-15 07:59:38 UTC (rev 12054)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+if ! dpkg-statoverride --list "$1" >/dev/null; then
+  dpkg-statoverride --update --add tomcat6 root 0775  $1
+fi


Property changes on: trunk/packages/biomaj-watcher/trunk/debian/setperms.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/packages/biomaj-watcher/trunk/debian/unsetperms.sh
===================================================================
--- trunk/packages/biomaj-watcher/trunk/debian/unsetperms.sh	                        (rev 0)
+++ trunk/packages/biomaj-watcher/trunk/debian/unsetperms.sh	2012-08-15 07:59:38 UTC (rev 12054)
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+dpkg-statoverride --remove "$1" >/dev/null 2>/dev/null || true


Property changes on: trunk/packages/biomaj-watcher/trunk/debian/unsetperms.sh
___________________________________________________________________
Added: svn:executable
   + *




More information about the debian-med-commit mailing list