r877 - in lvm2/trunk/debian: . patches

Bastian Blank waldi at alioth.debian.org
Thu Oct 20 17:43:19 UTC 2011


Author: waldi
Date: Thu Oct 20 17:43:18 2011
New Revision: 877

Log:
* debian/changelog: Update.
* debian/control: Add depends and breaks for /run.
* debian/lvm2.preinst: Cleanup old cache dir.
* debian/patches/dirs.patch: Change default cache dir to run dir.
* debian/rules: Set default run dir.

Modified:
   lvm2/trunk/debian/changelog
   lvm2/trunk/debian/control
   lvm2/trunk/debian/lvm2.preinst
   lvm2/trunk/debian/patches/dirs.patch
   lvm2/trunk/debian/rules

Modified: lvm2/trunk/debian/changelog
==============================================================================
--- lvm2/trunk/debian/changelog	Thu Oct 20 17:02:02 2011	(r876)
+++ lvm2/trunk/debian/changelog	Thu Oct 20 17:43:18 2011	(r877)
@@ -4,6 +4,8 @@
   * Remove lvm-common conflicts and replaces.
   * Remove grub-common breakage.
   * Remove own quilt usage.
+  * Move cache file to /run/lvm. (closes: #562234)
+    - Remove old cache dir.
 
  -- Bastian Blank <waldi at debian.org>  Sat, 15 Oct 2011 23:00:32 +0200
 

Modified: lvm2/trunk/debian/control
==============================================================================
--- lvm2/trunk/debian/control	Thu Oct 20 17:02:02 2011	(r876)
+++ lvm2/trunk/debian/control	Thu Oct 20 17:43:18 2011	(r877)
@@ -11,7 +11,8 @@
 
 Package: lvm2
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, dmsetup (>> 2:1.02.47)
+Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, dmsetup (>> 2:1.02.47), initscripts (>= 2.88dsf-13.3)
+Breaks: initramfs-tools (<< 0.99)
 Description: Linux Logical Volume Manager
  This is LVM2, the rewrite of The Linux Logical Volume Manager.  LVM
  supports enterprise level volume management of disk and disk subsystems

Modified: lvm2/trunk/debian/lvm2.preinst
==============================================================================
--- lvm2/trunk/debian/lvm2.preinst	Thu Oct 20 17:02:02 2011	(r876)
+++ lvm2/trunk/debian/lvm2.preinst	Thu Oct 20 17:43:18 2011	(r877)
@@ -16,6 +16,11 @@
             fi
             update-rc.d lvm remove >/dev/null || :
         fi
+        if dpkg --compare-versions "$2" lt 2.02.88-1; then
+            if [ -d /etc/lvm/cache ]; then
+                rm -rf /etc/lvm/cache
+            fi
+        fi
     ;;
 esac
 

Modified: lvm2/trunk/debian/patches/dirs.patch
==============================================================================
--- lvm2/trunk/debian/patches/dirs.patch	Thu Oct 20 17:02:02 2011	(r876)
+++ lvm2/trunk/debian/patches/dirs.patch	Thu Oct 20 17:43:18 2011	(r877)
@@ -1,5 +1,14 @@
 --- a/doc/example.conf.in
 +++ b/doc/example.conf.in
+@@ -84,7 +84,7 @@
+     # It is safe to delete the contents: the tools regenerate it.
+     # (The old setting 'cache' is still respected if neither of
+     # these new ones is present.)
+-    cache_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@"
++    cache_dir = "/run/lvm"
+     cache_file_prefix = ""
+ 
+     # You can turn off writing this cache file by setting this to 0.
 @@ -393,7 +393,7 @@
      # Full pathnames can be given.
  
@@ -9,3 +18,29 @@
  
      # The external locking library to load if locking_type is set to 2.
      #   locking_library = "liblvm2clusterlock.so"
+--- a/lib/commands/toolcontext.c
++++ b/lib/commands/toolcontext.c
+@@ -782,10 +782,8 @@
+ 
+ 	if (cache_dir || cache_file_prefix) {
+ 		if (dm_snprintf(cache_file, sizeof(cache_file),
+-		    "%s%s%s/%s.cache",
+-		    cache_dir ? "" : cmd->system_dir,
+-		    cache_dir ? "" : "/",
+-		    cache_dir ? : DEFAULT_CACHE_SUBDIR,
++		    "%s/%s.cache",
++		    cache_dir ? : DEFAULT_RUN_DIR,
+ 		    cache_file_prefix ? : DEFAULT_CACHE_FILE_PREFIX) < 0) {
+ 			log_error("Persistent cache filename too long.");
+ 			f3->destroy(f3);
+@@ -793,8 +791,8 @@
+ 		}
+ 	} else if (!(dev_cache = find_config_tree_str(cmd, "devices/cache", NULL)) &&
+ 		   (dm_snprintf(cache_file, sizeof(cache_file),
+-				"%s/%s/%s.cache",
+-				cmd->system_dir, DEFAULT_CACHE_SUBDIR,
++				"%s/%s.cache",
++				DEFAULT_RUN_DIR,
+ 				DEFAULT_CACHE_FILE_PREFIX) < 0)) {
+ 		log_error("Persistent cache filename too long.");
+ 		f3->destroy(f3);

Modified: lvm2/trunk/debian/rules
==============================================================================
--- lvm2/trunk/debian/rules	Thu Oct 20 17:02:02 2011	(r876)
+++ lvm2/trunk/debian/rules	Thu Oct 20 17:43:18 2011	(r877)
@@ -75,6 +75,7 @@
 		--with-device-uid=0 \
 		--with-device-gid=6 \
 		--with-device-mode=0660 \
+		--with-default-run-dir=/run/lvm \
 		--enable-applib \
 		--enable-cmdlib \
 		--enable-pkgconfig \



More information about the pkg-lvm-commits mailing list