diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2013-09-12 21:08:43 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2013-09-12 21:08:43 +0000 |
commit | a7547478e686f6d02656cc52d0c853ee12892f7e (patch) | |
tree | e9abd347f48f3a707cdea379c00d5dca404d3a56 /sys-fs/lvm2/files | |
parent | respect LINGUAS (bug #483316) (diff) | |
download | gentoo-2-a7547478e686f6d02656cc52d0c853ee12892f7e.tar.gz gentoo-2-a7547478e686f6d02656cc52d0c853ee12892f7e.tar.bz2 gentoo-2-a7547478e686f6d02656cc52d0c853ee12892f7e.zip |
Version bump.
(Portage version: 2.2.2/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
Diffstat (limited to 'sys-fs/lvm2/files')
6 files changed, 287 insertions, 0 deletions
diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-ignored_loop.patch b/sys-fs/lvm2/files/lvm2-2.02.100-ignored_loop.patch new file mode 100644 index 000000000000..cb0172718cb1 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.100-ignored_loop.patch @@ -0,0 +1,32 @@ +From cac49725c9a2a1f5c0e48235a07f168d98458ace Mon Sep 17 00:00:00 2001 +From: Peter Rajnoha <prajnoha@redhat.com> +Date: Fri, 16 Aug 2013 13:45:00 +0000 +Subject: udev: fix lvmetad rules to not ignore loop device configuration + +If loop device is first configured on systems where /dev/loop-control +is used to dynamically create the loop device itself, there's an +ADD+CHANGE even generated. But next time the existing /dev/loop[0-9]* +is reused, there's only a CHANGE event since the device representing +it is already present in kernel (so no ADD event in this case). + +We can't ignore this CHANGE event for loop devices! This is a regression +caused by 756bcabbfe297688ba240a880bc2b55265ad33f0. We already had +a similar problem with MD devices which was fixed by +2ac217d408470dcecb69b83d9cbf7a254747fa5b (but that one was +only an intra-release fix). +--- +diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in +index a0e48a1..d5087e3 100644 +--- a/udev/69-dm-lvm-metad.rules.in ++++ b/udev/69-dm-lvm-metad.rules.in +@@ -21,7 +21,7 @@ SUBSYSTEM!="block", GOTO="lvm_end" + ENV{ID_FS_TYPE}!="LVM2_member|LVM1_member", GOTO="lvm_end" + + ACTION=="remove", GOTO="lvm_scan" +-ACTION=="change", KERNEL=="md[0-9]*", GOTO="lvm_scan" ++ACTION=="change", KERNEL=="md[0-9]*|loop[0-9]*", GOTO="lvm_scan" + + # If the PV is not a dm device, scan only after device addition (ADD event) + KERNEL!="dm-[0-9]*", ACTION!="add", GOTO="lvm_end" +-- +cgit v0.9.2 diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-lvm_path.patch b/sys-fs/lvm2/files/lvm2-2.02.100-lvm_path.patch new file mode 100644 index 000000000000..85c73209a35a --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.100-lvm_path.patch @@ -0,0 +1,31 @@ +http://bugs.gentoo.org/479626 + +From 8cbbe851a80e8d99dc886ce9b44834137731d8ce Mon Sep 17 00:00:00 2001 +From: Michael Stapelberg <stapelberg@debian.org> +Date: Thu, 15 Aug 2013 07:57:30 +0000 +Subject: systemd: use LVM_PATH instead of hardcoded value in activation generator + +--- +diff --git a/scripts/lvm2_activation_generator_systemd_red_hat.c b/scripts/lvm2_activation_generator_systemd_red_hat.c +index 17bc71a..9d4b581 100644 +--- a/scripts/lvm2_activation_generator_systemd_red_hat.c ++++ b/scripts/lvm2_activation_generator_systemd_red_hat.c +@@ -22,6 +22,7 @@ + #include <fcntl.h> + #include <limits.h> /* For PATH_MAX for musl libc */ + #include "lvm2app.h" ++#include "configure.h" /* for LVM_PATH */ + + #define KMSG_DEV_PATH "/dev/kmsg" + #define LVM_CONF_USE_LVMETAD "global/use_lvmetad" +@@ -150,7 +151,7 @@ static int generate_unit(const char *dir, int unit) + "[Service]\n", f); + } + +- fputs("ExecStart=/usr/sbin/lvm vgchange -aay --sysinit\n" ++ fputs("ExecStart=" LVM_PATH " vgchange -aay --sysinit\n" + "Type=oneshot\n", f); + + if (fclose(f) < 0) { +-- +cgit v0.9.2 diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-pvmove_segfault.patch b/sys-fs/lvm2/files/lvm2-2.02.100-pvmove_segfault.patch new file mode 100644 index 000000000000..84293148e803 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.100-pvmove_segfault.patch @@ -0,0 +1,31 @@ +From c0f987949b8a0bbbbe7f06694f59f710a73814da Mon Sep 17 00:00:00 2001 +From: Alasdair G Kergon <agk@redhat.com> +Date: Wed, 28 Aug 2013 21:56:23 +0000 +Subject: activation: Fix segfault with inactive pvmove LV. + +Set flag to avoid recursion back through an inactive pvmove LV when +populating deptree. +--- +diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c +index 294606c..11be421 100644 +--- a/lib/activate/dev_manager.c ++++ b/lib/activate/dev_manager.c +@@ -1763,11 +1763,13 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, + return_0; + + /* Add any LVs referencing a PVMOVE LV unless told not to. */ +- if (dm->track_pvmove_deps && lv->status & PVMOVE) ++ if (dm->track_pvmove_deps && lv->status & PVMOVE) { ++ dm->track_pvmove_deps = 0; + dm_list_iterate_items(sl, &lv->segs_using_this_lv) +- if (!_cached_info(dm->mem, dtree, sl->seg->lv, 0) && +- !_add_lv_to_dtree(dm, dtree, sl->seg->lv, origin_only)) ++ if (!_add_lv_to_dtree(dm, dtree, sl->seg->lv, origin_only)) + return_0; ++ dm->track_pvmove_deps = 1; ++ } + + /* Adding LV head of replicator adds all other related devs */ + if (lv_is_replicator_dev(lv) && +-- +cgit v0.9.2 diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-respect_ar_and_cc.patch b/sys-fs/lvm2/files/lvm2-2.02.100-respect_ar_and_cc.patch new file mode 100644 index 000000000000..483f25898d6a --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.100-respect_ar_and_cc.patch @@ -0,0 +1,20 @@ +GNU make always defaults CC to "cc", so using "?=" with the CC variable +will never override the internal make value. since @CC@ comes from the +configure script, and that respects the $CC env var, don't bother trying +to handle it in make too. it's not like we do this with any other build +variable after all. + +Ditto for AR as per http://bugs.gentoo.org/444082 + +--- a/make.tmpl.in ++++ b/make.tmpl.in +@@ -17,7 +17,8 @@ + + @SET_MAKE@ + +-CC ?= @CC@ ++AR = @GENTOO_AR@ ++CC = @CC@ + RANLIB = @RANLIB@ + INSTALL = @INSTALL@ + MKDIR_P = @MKDIR_P@ diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch b/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch new file mode 100644 index 000000000000..e7a4aea7d0c7 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.100-selinux_and_udev_static.patch @@ -0,0 +1,93 @@ +diff -ur LVM2.2.02.100.orig/configure.in LVM2.2.02.100/configure.in +--- LVM2.2.02.100.orig/configure.in 2013-08-13 13:44:43.000000000 +0300 ++++ LVM2.2.02.100/configure.in 2013-09-12 23:23:19.365329440 +0300 +@@ -954,6 +954,7 @@ + pkg_config_init + fi + PKG_CHECK_MODULES(UDEV, libudev >= 143, [UDEV_PC="libudev"]) ++ UDEV_STATIC_LIBS=`$PKG_CONFIG --static --libs libudev` + AC_DEFINE([UDEV_SYNC_SUPPORT], 1, [Define to 1 to enable synchronisation with udev processing.]) + fi + +@@ -1199,19 +1200,32 @@ + if test x$SELINUX = xyes; then + AC_CHECK_LIB([sepol], [sepol_check_context], [ + AC_DEFINE([HAVE_SEPOL], 1, [Define to 1 if sepol_check_context is available.]) +- SELINUX_LIBS="-lsepol"]) ++ SEPOL_LIBS="-lsepol"]) + +- AC_CHECK_LIB([selinux], [is_selinux_enabled], [ +- AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout) +- AC_CHECK_HEADERS([selinux/label.h]) +- AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) +- SELINUX_LIBS="-lselinux $SELINUX_LIBS" ++ dnl -- init pkgconfig if required ++ if test x$PKGCONFIG_INIT != x1; then ++ pkg_config_init ++ fi ++ PKG_CHECK_MODULES(SELINUX, libselinux, [ + SELINUX_PC="libselinux" +- HAVE_SELINUX=yes ], [ +- AC_MSG_WARN(Disabling selinux) +- SELINUX_LIBS= +- SELINUX_PC= +- HAVE_SELINUX=no ]) ++ SELINUX_STATIC_LIBS=`$PKG_CONFIG --static --libs libselinux` ++ SELINUX_LIBS="$SELINUX_LIBS $SEPOL_LIBS" ++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) ++ ],[ ++ dnl -- old non-pkgconfig method, is buggy with static builds ++ AC_CHECK_LIB([selinux], [is_selinux_enabled], [ ++ AC_CHECK_HEADERS([selinux/selinux.h],, hard_bailout) ++ AC_CHECK_HEADERS([selinux/label.h]) ++ AC_DEFINE([HAVE_SELINUX], 1, [Define to 1 to include support for selinux.]) ++ SELINUX_LIBS="-lselinux $SEPOL_LIBS" ++ SELINUX_STATIC_LIBS="$SELINUX_LIBS" ++ SELINUX_PC="libselinux" ++ HAVE_SELINUX=yes ], [ ++ AC_MSG_WARN(Disabling selinux) ++ SELINUX_LIBS= ++ SELINUX_PC= ++ HAVE_SELINUX=no ]) ++ ]) + fi + + ################################################################################ +@@ -1615,6 +1629,7 @@ + AC_SUBST(SALCK_CFLAGS) + AC_SUBST(SALCK_LIBS) + AC_SUBST(SELINUX_LIBS) ++AC_SUBST(UDEV_STATIC_LIBS) + AC_SUBST(SELINUX_PC) + AC_SUBST(SNAPSHOTS) + AC_SUBST(STATICDIR) +@@ -1625,6 +1640,7 @@ + AC_SUBST(THIN_DUMP_CMD) + AC_SUBST(THIN_REPAIR_CMD) + AC_SUBST(UDEV_LIBS) ++AC_SUBST(UDEV_STATIC_LIBS) + AC_SUBST(UDEV_PC) + AC_SUBST(UDEV_RULES) + AC_SUBST(UDEV_SYNC) +diff -ur LVM2.2.02.100.orig/make.tmpl.in LVM2.2.02.100/make.tmpl.in +--- LVM2.2.02.100.orig/make.tmpl.in 2013-08-13 13:44:43.000000000 +0300 ++++ LVM2.2.02.100/make.tmpl.in 2013-09-12 23:22:58.125328808 +0300 +@@ -32,7 +32,7 @@ + + LIBS = @LIBS@ + # Extra libraries always linked with static binaries +-STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) ++STATIC_LIBS = $(SELINUX_STATIC_LIBS) $(UDEV_STATIC_LIBS) + DEFS += @DEFS@ + # FIXME set this only where it's needed, not globally? + CFLAGS += @CFLAGS@ @UDEV_CFLAGS@ +@@ -46,7 +46,9 @@ + PTHREAD_LIBS = @PTHREAD_LIBS@ + READLINE_LIBS = @READLINE_LIBS@ + SELINUX_LIBS = @SELINUX_LIBS@ ++SELINUX_STATIC_LIBS = @SELINUX_STATIC_LIBS@ + UDEV_LIBS = @UDEV_LIBS@ ++UDEV_STATIC_LIBS = @UDEV_STATIC_LIBS@ + TESTING = @TESTING@ + + # Setup directory variables diff --git a/sys-fs/lvm2/files/lvm2-2.02.100-vg_free_segfault.patch b/sys-fs/lvm2/files/lvm2-2.02.100-vg_free_segfault.patch new file mode 100644 index 000000000000..0bfc551cda21 --- /dev/null +++ b/sys-fs/lvm2/files/lvm2-2.02.100-vg_free_segfault.patch @@ -0,0 +1,80 @@ +From c29c64f20dadbd9076d8729bd3d0cb724c4b39b0 Mon Sep 17 00:00:00 2001 +From: Tony Asleson <tasleson@redhat.com> +Date: Wed, 14 Aug 2013 20:14:42 +0000 +Subject: lvm2app: lvm_list_pvs_free seg. fault when no PVs + +When the system has no PVs we don't have access to +the cmd pointer and it remains NULL which causes +a seg. fault when we try to free the VG lock. + +Signed-off-by: Tony Asleson <tasleson@redhat.com> +--- +diff --git a/liblvm/lvm_pv.c b/liblvm/lvm_pv.c +index 2bd0ac0..e67e1eb 100644 +--- a/liblvm/lvm_pv.c ++++ b/liblvm/lvm_pv.c +@@ -65,6 +65,7 @@ struct lvm_property_value lvm_pvseg_get_property(const pvseg_t pvseg, + struct lvm_list_wrapper + { + unsigned long magic; ++ struct cmd_context *cmd; + struct dm_list pvslist; + struct dm_list vgslist; + }; +@@ -84,6 +85,11 @@ struct dm_list *lvm_list_pvs(lvm_t libh) + struct lvm_list_wrapper *rc = NULL; + struct cmd_context *cmd = (struct cmd_context *)libh; + ++ /* ++ * This memory will get cleared when the library handle ++ * gets closed, don't try to free is as it doesn't work ++ * like malloc/free do. ++ */ + if (!(rc = dm_pool_zalloc(cmd->mem, sizeof(*rc)))) { + log_errno(ENOMEM, "Memory allocation fail for pv list."); + return NULL; +@@ -95,9 +101,14 @@ struct dm_list *lvm_list_pvs(lvm_t libh) + dm_list_init(&rc->pvslist); + dm_list_init(&rc->vgslist); + if( !get_pvs_perserve_vg(cmd, &rc->pvslist, &rc->vgslist) ) { +- dm_pool_free(cmd->mem, rc); + return NULL; + } ++ ++ /* ++ * If we have no PVs we still need to have access to cmd ++ * pointer in the free call. ++ */ ++ rc->cmd = cmd; + rc->magic = 0xF005BA11; + } + +@@ -109,7 +120,6 @@ int lvm_list_pvs_free(struct dm_list *pvlist) + struct lvm_list_wrapper *to_delete; + struct vg_list *vgl; + struct pv_list *pvl; +- struct cmd_context *cmd = NULL; + + if (pvlist) { + to_delete = dm_list_struct_base(pvlist, struct lvm_list_wrapper, pvslist); +@@ -119,17 +129,14 @@ int lvm_list_pvs_free(struct dm_list *pvlist) + } + + dm_list_iterate_items(vgl, &to_delete->vgslist) { +- cmd = vgl->vg->cmd; + release_vg(vgl->vg); + } + + dm_list_iterate_items(pvl, &to_delete->pvslist) + free_pv_fid(pvl->pv); + +- unlock_vg(cmd, VG_GLOBAL); +- ++ unlock_vg(to_delete->cmd, VG_GLOBAL); + to_delete->magic = 0xA5A5A5A5; +- dm_pool_free(cmd->mem, to_delete); + } + + return 0; +-- +cgit v0.9.2 |