[arch-commits] Commit in lvm2/trunk (6 files)

2016-05-30 Thread Christian Hesse
Date: Monday, May 30, 2016 @ 21:33:11
  Author: eworm
Revision: 268754

upgpkg: lvm2 2.02.154-3

apply 'liblvm: allow config settings to be read without full lvm cmd' FS#49483

Added:
  lvm2/trunk/01-lvm2-make-sockets-static.patch
(from rev 268753, lvm2/trunk/lvm2-make-sockets-static.patch)
  lvm2/trunk/02-liblvm_config_settings.patch
  lvm2/trunk/03-lvm2_activation_generator.patch
(from rev 268753, lvm2/trunk/lvm2_activation_generator.patch)
Modified:
  lvm2/trunk/PKGBUILD
Deleted:
  lvm2/trunk/lvm2-make-sockets-static.patch
  lvm2/trunk/lvm2_activation_generator.patch

+
 01-lvm2-make-sockets-static.patch  |   20 +
 02-liblvm_config_settings.patch|  134 +++
 03-lvm2_activation_generator.patch |   43 +++
 PKGBUILD   |   15 ++-
 lvm2-make-sockets-static.patch |   20 -
 lvm2_activation_generator.patch|   43 ---
 6 files changed, 206 insertions(+), 69 deletions(-)

Copied: lvm2/trunk/01-lvm2-make-sockets-static.patch (from rev 268753, 
lvm2/trunk/lvm2-make-sockets-static.patch)
===
--- 01-lvm2-make-sockets-static.patch   (rev 0)
+++ 01-lvm2-make-sockets-static.patch   2016-05-30 19:33:11 UTC (rev 268754)
@@ -0,0 +1,20 @@
+diff -Nur LVM2.2.02.106.orig/scripts/dm_event_systemd_red_hat.socket.in 
LVM2.2.02.106/scripts/dm_event_systemd_red_hat.socket.in
+--- LVM2.2.02.106.orig/scripts/dm_event_systemd_red_hat.socket.in  
2014-04-10 17:38:46.0 +0200
 LVM2.2.02.106/scripts/dm_event_systemd_red_hat.socket.in   2014-04-26 
14:21:10.097269315 +0200
+@@ -8,6 +8,3 @@
+ ListenFIFO=@DEFAULT_DM_RUN_DIR@/dmeventd-client
+ SocketMode=0600
+ RemoveOnStop=true
+-
+-[Install]
+-WantedBy=sockets.target
+diff -Nur LVM2.2.02.106.orig/scripts/lvm2_lvmetad_systemd_red_hat.socket.in 
LVM2.2.02.106/scripts/lvm2_lvmetad_systemd_red_hat.socket.in
+--- LVM2.2.02.106.orig/scripts/lvm2_lvmetad_systemd_red_hat.socket.in  
2014-04-10 17:38:46.0 +0200
 LVM2.2.02.106/scripts/lvm2_lvmetad_systemd_red_hat.socket.in   
2014-04-26 14:21:15.287156152 +0200
+@@ -7,6 +7,3 @@
+ ListenStream=@DEFAULT_RUN_DIR@/lvmetad.socket
+ SocketMode=0600
+ RemoveOnStop=true
+-
+-[Install]
+-WantedBy=sysinit.target

Added: 02-liblvm_config_settings.patch
===
--- 02-liblvm_config_settings.patch (rev 0)
+++ 02-liblvm_config_settings.patch 2016-05-30 19:33:11 UTC (rev 268754)
@@ -0,0 +1,134 @@
+From 7fd4119d24eee55323e888dd78c70257d7c97a15 Mon Sep 17 00:00:00 2001
+From: David Teigland 
+Date: Tue, 17 May 2016 11:54:13 -0500
+Subject: liblvm: allow config settings to be read without full lvm cmd
+
+A program may be using liblvm2app for simply checking a config
+setting in lvm.conf.  In this case, a full lvm context is not
+needed, only cmd->cft (which are the config settings read from
+lvm.conf).
+
+lvm_config_find_bool() can now be passed a NULL lvm context
+in which case it will only create cmd->cft, check the config
+setting asked for, and destroy the cmd.
+---
+ lib/commands/toolcontext.c | 43 +++
+ lib/commands/toolcontext.h |  8 
+ liblvm/lvm_base.c  | 23 ---
+ 3 files changed, 71 insertions(+), 3 deletions(-)
+
+diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
+index 90e5d5a..1e3f14a 100644
+--- a/lib/commands/toolcontext.c
 b/lib/commands/toolcontext.c
+@@ -1776,6 +1776,49 @@ bad:
+   return 0;
+ }
+ 
++void destroy_config_context(struct cmd_context *cmd)
++{
++  _destroy_config(cmd);
++
++  if (cmd->mem)
++  dm_pool_destroy(cmd->mem);
++  if (cmd->libmem)
++  dm_pool_destroy(cmd->libmem);
++
++  dm_free(cmd);
++}
++
++/*
++ * A "config context" is a very light weight toolcontext that
++ * is only used for reading config settings from lvm.conf.
++ */
++struct cmd_context *create_config_context(void)
++{
++  struct cmd_context *cmd;
++
++  if (!(cmd = dm_zalloc(sizeof(*cmd
++  goto_out;
++
++  strcpy(cmd->system_dir, DEFAULT_SYS_DIR);
++
++  if (!_get_env_vars(cmd))
++  goto_out;
++
++  if (!(cmd->libmem = dm_pool_create("library", 4 * 1024)))
++  goto_out;
++
++  dm_list_init(>config_files);
++
++  if (!_init_lvm_conf(cmd))
++  goto_out;
++
++  return cmd;
++out:
++  if (cmd)
++  destroy_config_context(cmd);
++  return NULL;
++}
++
+ /* Entry point */
+ struct cmd_context *create_toolcontext(unsigned is_long_lived,
+  const char *system_dir,
+diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h
+index c3b9b2e..2cecf27 100644
+--- a/lib/commands/toolcontext.h
 b/lib/commands/toolcontext.h
+@@ 

[arch-commits] Commit in lvm2/trunk (6 files)

2012-11-03 Thread Thomas Bächler
Date: Saturday, November 3, 2012 @ 14:33:00
  Author: thomas
Revision: 170157

upgpkg: lvm2 2.02.98-3: small fix to lvmetad.socket and move everything to /usr

Modified:
  lvm2/trunk/PKGBUILD
  lvm2/trunk/dmeventd.service
  lvm2/trunk/lvm-monitoring.service
  lvm2/trunk/lvm2_install
  lvm2/trunk/lvmetad.service
  lvm2/trunk/lvmetad.socket

+
 PKGBUILD   |   15 +++
 dmeventd.service   |4 ++--
 lvm-monitoring.service |6 +++---
 lvm2_install   |6 +++---
 lvmetad.service|4 ++--
 lvmetad.socket |2 +-
 6 files changed, 18 insertions(+), 19 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2012-11-03 18:29:36 UTC (rev 170156)
+++ PKGBUILD2012-11-03 18:33:00 UTC (rev 170157)
@@ -5,7 +5,7 @@
 pkgbase=lvm2
 pkgname=('lvm2' 'device-mapper')
 pkgver=2.02.98
-pkgrel=2
+pkgrel=3
 arch=('i686' 'x86_64')
 url=http://sourceware.org/lvm2/;
 license=('GPL2' 'LGPL2.1')
@@ -22,22 +22,21 @@
 lvmetad.socket)
 sha1sums=('077425115b164c335a9930df745943e9ea666a8a'
   '4713c852fc668e6fbd36ff7c6b5675b10a95a0f8'
-  '2960759b411e93fb2377b6a259eb71d426b51dd9'
+  '8008547b133af89f79461a6df5412539ed3f26b7'
   'ff0fdf0a3005a41acd4b36865056109effc3474b'
   'f6a554eea9557c3c236df2943bb6e7e723945c41'
   'ccefad65fde3d50331a42b0e90a1539dc7c8b9e4'
-  '7c3e1ce29ac80698c1b558ac3a2848da84ea7d8d'
+  'cbc64f377fbb1c1a9ff53bc6ca85c324075499b7'
   '1d56f47a81350ae37ffbf61ee036fe31f4c5d504'
-  '2fa406422a99cc3adcdfe6d59f4836fd0e55b17f'
-  'c6073a48495376a33ee0ace5c3c9c32a5f559ddf'
-  '370f497c28754169e427c8419bceb73f1cf64757')
+  'ae945cae2d71b286439a9945876acb78dc9eeaf7'
+  '460b094e8689298ed59842d1abcee5d4e706e1d7'
+  'fcfc265e3b10294cc4b10949a342e9db4310b186')
 
 build() {
   cd ${srcdir}/LVM2.${pkgver}
   unset LDFLAGS
 
-  ./configure --prefix=/ --sbindir=/sbin --sysconfdir=/etc 
--localstatedir=/var --datarootdir=/usr/share \
---includedir=/usr/include --with-usrlibdir=/usr/lib --libdir=/usr/lib 
--with-udev-prefix=/usr \
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 
--with-udev-prefix=/usr \
 --with-systemdsystemunitdir=/usr/lib/systemd/system 
--with-default-pid-dir=/run \
 --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm \
 --enable-pkgconfig --enable-readline --enable-dmeventd --enable-cmdlib 
--enable-applib \

Modified: dmeventd.service
===
--- dmeventd.service2012-11-03 18:29:36 UTC (rev 170156)
+++ dmeventd.service2012-11-03 18:33:00 UTC (rev 170157)
@@ -7,8 +7,8 @@
 
 [Service]
 Type=forking
-ExecStart=/sbin/dmeventd
-ExecReload=/sbin/dmeventd -R
+ExecStart=/usr/sbin/dmeventd
+ExecReload=/usr/sbin/dmeventd -R
 Environment=SD_ACTIVATION=1
 PIDFile=/run/dmeventd.pid
 OOMScoreAdjust=-1000

Modified: lvm-monitoring.service
===
--- lvm-monitoring.service  2012-11-03 18:29:36 UTC (rev 170156)
+++ lvm-monitoring.service  2012-11-03 18:33:00 UTC (rev 170157)
@@ -10,9 +10,9 @@
 [Service]
 Type=oneshot
 Environment=LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
-ExecStart=/sbin/lvm vgchange --monitor y
-ExecStop=/sbin/lvm vgchange --monitor n
+ExecStart=/usr/sbin/lvm vgchange --monitor y
+ExecStop=/usr/sbin/lvm vgchange --monitor n
 RemainAfterExit=yes
 
 [Install]
-WantedBy=sysinit.target
\ No newline at end of file
+WantedBy=sysinit.target

Modified: lvm2_install
===
--- lvm2_install2012-11-03 18:29:36 UTC (rev 170156)
+++ lvm2_install2012-11-03 18:33:00 UTC (rev 170157)
@@ -6,9 +6,9 @@
 add_module $mod
 done
 
-add_binary /sbin/lvm
-add_binary /sbin/lvmetad
-add_binary /sbin/dmsetup
+add_binary /usr/sbin/lvm
+add_binary /usr/sbin/lvmetad
+add_binary /usr/sbin/dmsetup
 add_file /usr/lib/udev/rules.d/10-dm.rules
 add_file /usr/lib/udev/rules.d/13-dm-disk.rules
 add_file /usr/lib/udev/rules.d/95-dm-notify.rules

Modified: lvmetad.service
===
--- lvmetad.service 2012-11-03 18:29:36 UTC (rev 170156)
+++ lvmetad.service 2012-11-03 18:33:00 UTC (rev 170157)
@@ -9,8 +9,8 @@
 [Service]
 Type=forking
 NonBlocking=true
-ExecStart=/sbin/lvmetad
-ExecReload=/sbin/lvmetad -R
+ExecStart=/usr/sbin/lvmetad
+ExecReload=/usr/sbin/lvmetad -R
 Environment=SD_ACTIVATION=1
 Restart=on-abort
 PIDFile=/run/lvmetad.pid

Modified: lvmetad.socket
===
--- lvmetad.socket  2012-11-03 18:29:36 UTC (rev 170156)
+++ lvmetad.socket  2012-11-03 18:33:00 UTC (rev 170157)
@@ -1,7 +1,7 @@
 [Unit]
 Description=LVM2 metadata daemon