[Pkg-sks-commit] r174 - in sks/trunk/sks/debian: . patches

chrism at alioth.debian.org chrism at alioth.debian.org
Thu Jun 19 15:16:31 UTC 2008


Author: chrism
Date: 2008-06-19 15:16:28 +0000 (Thu, 19 Jun 2008)
New Revision: 174

Removed:
   sks/trunk/sks/debian/patches/510_sane_logfile_names
Modified:
   sks/trunk/sks/debian/changelog
   sks/trunk/sks/debian/patches/500_debian_fhs
   sks/trunk/sks/debian/sks.postinst
Log:
[project @ 176]
Update 500_debian_fhs for new log filenames.
Remove 510_sane_logfile_names.
Rename logfiles in postinst.

Original author: weasel
Date: 2005-08-24 16:21:47.663884+00:00

Modified: sks/trunk/sks/debian/changelog
===================================================================
--- sks/trunk/sks/debian/changelog	2008-06-19 15:16:20 UTC (rev 173)
+++ sks/trunk/sks/debian/changelog	2008-06-19 15:16:28 UTC (rev 174)
@@ -5,8 +5,11 @@
   * Add some comments to etc/sks/{membership,mailsyn,sksconf}.
   * New upstream patch incorporates the following patches:
     - 212_do_not_export_zerolen_packets
+  * Update 500_debian_fhs for new log filenames.
+  * Remove 510_sane_logfile_names.
+  * Rename logfiles in postinst.
 
- -- Peter Palfrader <weasel at debian.org>  Wed, 24 Aug 2005 18:08:42 +0200
+ -- Peter Palfrader <weasel at debian.org>  Wed, 24 Aug 2005 18:21:30 +0200
 
 sks (1.0.9-0.6) UNRELEASED; urgency=low
 

Modified: sks/trunk/sks/debian/patches/500_debian_fhs
===================================================================
--- sks/trunk/sks/debian/patches/500_debian_fhs	2008-06-19 15:16:20 UTC (rev 173)
+++ sks/trunk/sks/debian/patches/500_debian_fhs	2008-06-19 15:16:28 UTC (rev 174)
@@ -5,8 +5,8 @@
  
  let set_logfile extension = 
    if !Settings.filelog then
--    let fname = (Filename.concat !Settings.basedir "log") ^ extension in
-+    let fname = (Filename.concat !Settings.basedir "/var/log/sks/log") ^ extension in
+-    let fname = (Filename.concat !Settings.basedir extension) ^ ".log" in
++    let fname = (Filename.concat !Settings.basedir "/var/log/sks/") ^ extension ^ ".log" in
      stored_logfile_name := Some fname;
      logfile := open_out_gen [ Open_wronly; Open_creat; Open_append; ] 
        0o600 fname;

Deleted: sks/trunk/sks/debian/patches/510_sane_logfile_names
===================================================================
--- sks/trunk/sks/debian/patches/510_sane_logfile_names	2008-06-19 15:16:20 UTC (rev 173)
+++ sks/trunk/sks/debian/patches/510_sane_logfile_names	2008-06-19 15:16:28 UTC (rev 174)
@@ -1,12 +0,0 @@
-diff -ruN sks-1.0.9-old/common.ml sks-1.0.9/common.ml
---- sks-1.0.9-old/common.ml	2004-10-18 22:52:50.000000000 +0200
-+++ sks-1.0.9/common.ml	2004-10-18 22:52:51.000000000 +0200
-@@ -81,7 +81,7 @@
- 
- let set_logfile extension = 
-   if !Settings.filelog then
--    let fname = (Filename.concat !Settings.basedir "/var/log/sks/log") ^ extension in
-+    let fname = (Filename.concat !Settings.basedir "/var/log/sks/sks") ^ extension ^ ".log" in
-     stored_logfile_name := Some fname;
-     logfile := open_out_gen [ Open_wronly; Open_creat; Open_append; ] 
-       0o600 fname;

Modified: sks/trunk/sks/debian/sks.postinst
===================================================================
--- sks/trunk/sks/debian/sks.postinst	2008-06-19 15:16:20 UTC (rev 173)
+++ sks/trunk/sks/debian/sks.postinst	2008-06-19 15:16:28 UTC (rev 174)
@@ -38,12 +38,11 @@
     debian-sks
 fi
 
-# ch{owning,moding} things around
-# note that sks creates files/dirs with 600/700
-# permissions as default. so let's stick with it for the
-# installation. We will do nothing across upgrades.
-
 if [ "$2" = "" ]; then
+    # ch{owning,moding} things around
+    # note that sks creates files/dirs with 600/700
+    # permissions as default. so let's stick with it for the
+    # installation. We will do nothing across upgrades.
     for i in lib log run spool; do
 	chown -R debian-sks:debian-sks /var/$i/sks
 	chmod -R 700 /var/$i/sks
@@ -53,13 +52,22 @@
     chmod -R g+rX /var/log/sks
     chmod    g+s  /var/log/sks
 else
-    # fix permissions of logs after 1.0.9-0.1
     if [ "$1" = "configure" ]; then
+	# fix permissions of logs after 1.0.9-0.1
 	if dpkg --compare-versions "$2" lt "1.0.9-0.2" ; then
 	    chgrp -R adm /var/log/sks
 	    chmod -R g+rX /var/log/sks
 	    chmod    g+s  /var/log/sks
 	fi
+	# 1.0.10 renamed log files from /var/log/sks/sks.foo.log to /var/log/sks/foo.log,
+	# so be nice and rename things for the admin.
+	if dpkg --compare-versions "$2" lt "1.0.10" ; then
+	    for i in `ls -1 /var/log/sks/`; do
+		if echo "$i" | grep -q '^sks\.'; then
+		    mv /var/log/sks/"$i" /var/log/sks/`echo "$i" | sed -e 's/^sks.//'`
+		fi
+	    done
+	fi
     fi
 fi
 




More information about the Pkg-sks-commit mailing list