Accepting request 393600 from home:scarabeus_iv:branches:Base:System
- Update patch use-mirrortype-asdefault-whenclvmdrunning.patch to match up the patches/pvmove_support_clustered_vg.diff and not use the define declared only when building clvm codebase; it is still broken if someone changes the PID location, but at least it now does not depend on clvm code - Regenerate_initrd in post of the lvm2 main pkg - Update baselibs to point to split-out devicemapper libraries - Keep in sync the common configuration options that are shared among all the variants dm/lvm2/clvm - Provide symlinks to 1.02 versions of dm and dm-event libs * this should sort out binary packages without the need of double rebuilding - Update to 2.02.152 release, read WHATS_NEW for detailed log. - Refresh patches: * 10-dm.rules-Reset-state-variable-for-spurious-events.patch * device-mapper-gcc-warnings.patch * device-mapper-link.patch * udev-Check-for-DM_NR_VALID_PATHS.patch - Slightly tweak btrfs patch as the code changed for the detection: * fsadm-add-support-for-btrfs.patch - Build and install properly cluster files - Remove csm-converter.tar.gz as the evms was last present on sle10 and thus migration is bit out of scope today - Add pre_checkin.sh to allow syncing of patches between packages: workflow = add everything to lvm2.spec and run pre_checkin.sh OBS-URL: https://build.opensuse.org/request/show/393600 OBS-URL: https://build.opensuse.org/package/show/Base:System/lvm2?expand=0&rev=150
This commit is contained in:
parent
275286d1aa
commit
8ac4ae703b
@ -1,12 +1,12 @@
|
||||
References: bsc#932300
|
||||
---
|
||||
Index: LVM2.2.02.120/udev/10-dm.rules.in
|
||||
Index: LVM2.2.02.152/udev/10-dm.rules.in
|
||||
===================================================================
|
||||
--- LVM2.2.02.120.orig/udev/10-dm.rules.in
|
||||
+++ LVM2.2.02.120/udev/10-dm.rules.in
|
||||
@@ -127,6 +127,11 @@ ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1",
|
||||
# We have to ignore further rule application for inappropriate events
|
||||
# and devices. But still send the notification if cookie exists.
|
||||
--- LVM2.2.02.152.orig/udev/10-dm.rules.in
|
||||
+++ LVM2.2.02.152/udev/10-dm.rules.in
|
||||
@@ -138,6 +138,11 @@ ENV{DM_UDEV_RULES_VSN}="2"
|
||||
|
||||
ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", ENV{DM_NAME}=="?*", SYMLINK+="(DM_DIR)/$env{DM_NAME}"
|
||||
|
||||
+# Reset variables for spurious events
|
||||
+ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=""
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6299e0905dd60755c5e11c80145fe29dad2c01d51b25136f8e4015cb63b388f5
|
||||
size 1902386
|
@ -1,7 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.14 (GNU/Linux)
|
||||
|
||||
iEYEABECAAYFAlaldhAACgkQIoGRwVZ+LBd+JgCfX58yWPrTHz0LwNzX5FHvvdNT
|
||||
7MsAoJET99QghzwYv9refV2KXs2G5Laj
|
||||
=BMDt
|
||||
-----END PGP SIGNATURE-----
|
3
LVM2.2.02.152.tgz
Normal file
3
LVM2.2.02.152.tgz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2a7ff6252c8d024f27d4bfc881bf6162198c806d2b75ea166f2797b573be7b4d
|
||||
size 2008985
|
7
LVM2.2.02.152.tgz.asc
Normal file
7
LVM2.2.02.152.tgz.asc
Normal file
@ -0,0 +1,7 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.14 (GNU/Linux)
|
||||
|
||||
iEYEABECAAYFAlcj+EIACgkQIoGRwVZ+LBeYrACg7dMTMM+3IO9hW9a9Aj4EObtb
|
||||
MKoAnjnQ4654ujnNbrwFWF3QaFhIkIXn
|
||||
=qaPB
|
||||
-----END PGP SIGNATURE-----
|
@ -1,2 +1,3 @@
|
||||
device-mapper
|
||||
libdevmapper1_03
|
||||
libdevmapper-event1_03
|
||||
device-mapper-devel
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e7e73182cf83099516cdf225748ac297c7368e651e232c4f23dd1fab33d1c3f6
|
||||
size 5604
|
@ -1,7 +1,7 @@
|
||||
Index: LVM2.2.02.139/libdm/datastruct/hash.c
|
||||
Index: LVM2.2.02.152/libdm/datastruct/hash.c
|
||||
===================================================================
|
||||
--- LVM2.2.02.139.orig/libdm/datastruct/hash.c
|
||||
+++ LVM2.2.02.139/libdm/datastruct/hash.c
|
||||
--- LVM2.2.02.152.orig/libdm/datastruct/hash.c
|
||||
+++ LVM2.2.02.152/libdm/datastruct/hash.c
|
||||
@@ -20,7 +20,7 @@ struct dm_hash_node {
|
||||
void *data;
|
||||
unsigned data_len;
|
||||
@ -30,14 +30,14 @@ Index: LVM2.2.02.139/libdm/datastruct/hash.c
|
||||
}
|
||||
|
||||
void *dm_hash_get_data(struct dm_hash_table *t __attribute__((unused)),
|
||||
Index: LVM2.2.02.139/libdm/ioctl/libdm-iface.c
|
||||
Index: LVM2.2.02.152/libdm/ioctl/libdm-iface.c
|
||||
===================================================================
|
||||
--- LVM2.2.02.139.orig/libdm/ioctl/libdm-iface.c
|
||||
+++ LVM2.2.02.139/libdm/ioctl/libdm-iface.c
|
||||
--- LVM2.2.02.152.orig/libdm/ioctl/libdm-iface.c
|
||||
+++ LVM2.2.02.152/libdm/ioctl/libdm-iface.c
|
||||
@@ -1834,7 +1834,7 @@ static struct dm_ioctl *_do_dm_ioctl(str
|
||||
dmt->secure_data ? "W " : "",
|
||||
dmt->query_inactive_table ? "I " : "",
|
||||
dmt->enable_checks ? "C" : "",
|
||||
dmt->secure_data ? "securedata " : "",
|
||||
dmt->query_inactive_table ? "inactive " : "",
|
||||
dmt->enable_checks ? "enablechecks " : "",
|
||||
- dmt->sector, _sanitise_message(dmt->message),
|
||||
+ (unsigned long long int)dmt->sector, _sanitise_message(dmt->message),
|
||||
dmi->data_size, retry_repeat_count);
|
||||
|
@ -8,11 +8,13 @@ Signed-off-by: NeilBrown <neilb@suse.de>
|
||||
udev/10-dm.rules.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- LVM2.2.02.84.orig/udev/10-dm.rules.in
|
||||
+++ LVM2.2.02.84/udev/10-dm.rules.in
|
||||
@@ -14,7 +14,7 @@
|
||||
# DM_SUSPENDED - suspended state of DM device (0 or 1)
|
||||
# DM_UDEV_RULES_VSN - DM udev rules version
|
||||
Index: LVM2.2.02.152/udev/10-dm.rules.in
|
||||
===================================================================
|
||||
--- LVM2.2.02.152.orig/udev/10-dm.rules.in
|
||||
+++ LVM2.2.02.152/udev/10-dm.rules.in
|
||||
@@ -28,7 +28,7 @@
|
||||
# Also, keep in mind that recent rules may also require recent
|
||||
# subsystem-specific binaries.
|
||||
|
||||
-KERNEL=="device-mapper", NAME="(DM_DIR)/control"
|
||||
+KERNEL=="device-mapper", NAME="(DM_DIR)/control", SYMLINK+="device-mapper"
|
@ -1,28 +0,0 @@
|
||||
Index: LVM2.2.02.109/libdm/Makefile.in
|
||||
===================================================================
|
||||
--- LVM2.2.02.109.orig/libdm/Makefile.in
|
||||
+++ LVM2.2.02.109/libdm/Makefile.in
|
||||
@@ -39,9 +39,9 @@ INCLUDES += @VALGRIND_CFLAGS@
|
||||
|
||||
INCLUDES = -I$(srcdir)/$(interface)
|
||||
|
||||
-ifeq ("@STATIC_LINK@", "yes")
|
||||
+#ifeq ("@STATIC_LINK@", "yes")
|
||||
LIB_STATIC = $(interface)/libdevmapper.a
|
||||
-endif
|
||||
+#endif
|
||||
|
||||
LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX)
|
||||
LIB_VERSION = $(LIB_VERSION_DM)
|
||||
@@ -71,9 +71,9 @@ libdevmapper.$(LIB_SUFFIX) libdevmapper.
|
||||
|
||||
INSTALL_TYPE = install_dynamic
|
||||
|
||||
-ifeq ("@STATIC_LINK@", "yes")
|
||||
+#ifeq ("@STATIC_LINK@", "yes")
|
||||
INSTALL_TYPE += install_static
|
||||
-endif
|
||||
+#endif
|
||||
|
||||
ifeq ("@PKGCONFIG@", "yes")
|
||||
INSTALL_TYPE += install_pkgconfig
|
1669
device-mapper.changes
Normal file
1669
device-mapper.changes
Normal file
File diff suppressed because it is too large
Load Diff
251
device-mapper.spec
Normal file
251
device-mapper.spec
Normal file
@ -0,0 +1,251 @@
|
||||
#
|
||||
# spec file for package device-mapper
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
### COMMON-DEF-BEGIN ###
|
||||
%define lvm2_version 2.02.152
|
||||
%define device_mapper_version 1.02.124
|
||||
### COMMON-DEF-END ###
|
||||
%define libname libdevmapper1_03
|
||||
%define libname_event libdevmapper-event1_03
|
||||
Name: device-mapper
|
||||
Version: %{device_mapper_version}
|
||||
Release: 0
|
||||
Summary: Device Mapper Tools
|
||||
License: GPL-2.0 and LGPL-2.1
|
||||
Group: System/Base
|
||||
Url: http://www.sourceware.org/lvm2/
|
||||
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz
|
||||
Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc
|
||||
Source99: baselibs.conf
|
||||
### COMMON-PATCH-BEGIN ###
|
||||
# Upstream patches first
|
||||
Patch1001: improve_probing.diff
|
||||
Patch1002: no-inc-audit.diff
|
||||
Patch1004: sys_mount_instead_linux_fs.diff
|
||||
#suse
|
||||
Patch1005: display-dm-name-for-lv-name.diff
|
||||
Patch1006: device-mapper-type_punning.diff
|
||||
#fate312248, patch6,7
|
||||
Patch1007: make-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1008: improve-mirror-legs-on-different-tag-pvs.patch
|
||||
#fate#315092
|
||||
Patch1009: cmirrord_improvment_performance.patch
|
||||
#fate#314367, patch10,11
|
||||
Patch1010: cluster_support_mirrord_log.diff
|
||||
Patch1011: lvconvert-cluster-mirrored-disk-failed.patch
|
||||
#forward-port from sle11
|
||||
Patch1012: suppress_format1_size_warning.diff
|
||||
Patch1013: pvmove_support_clustered_vg.diff
|
||||
# Never upstream
|
||||
Patch1014: cmirrord_remove_date_time_from_compilation.patch
|
||||
#suse, bnc873538
|
||||
Patch1015: fix-closedown-before-thread-finish.patch
|
||||
#suse, bnc#870824
|
||||
Patch1016: use-mirrortype-asdefault-whenclvmdrunning.patch
|
||||
Patch1017: version-plugins-in-libdir.patch
|
||||
Patch1018: dmeventd-fix-dso-name-wrong-compare.patch
|
||||
Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
||||
#suse, bnc#707253(also merged patch for bnc#479104)
|
||||
Patch2000: device-mapper-dmsetup-export.patch
|
||||
Patch2001: device-mapper-gcc-warnings.patch
|
||||
Patch2002: device-mapper-link.patch
|
||||
#suse, bnc#78902,bnc#789019,bnc#789020
|
||||
Patch2003: udev_rules-update.diff
|
||||
#suse, bnc#875233
|
||||
Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
Patch2005: fsadm-add-support-for-btrfs.patch
|
||||
Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch
|
||||
Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
|
||||
Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch
|
||||
### COMMON-PATCH-END ###
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: suse-module-tools
|
||||
BuildRequires: pkgconfig(libselinux)
|
||||
BuildRequires: pkgconfig(libsepol)
|
||||
BuildRequires: pkgconfig(libudev)
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
Requires: thin-provisioning-tools >= 0.5.6
|
||||
Requires(post): coreutils
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{?systemd_requires}
|
||||
|
||||
%description
|
||||
Programs and man pages for configuring and using the device mapper.
|
||||
|
||||
%package -n %{libname}
|
||||
Summary: Library for device-mapper
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{libname}
|
||||
Device mapper main shared library
|
||||
|
||||
%package -n %{libname_event}
|
||||
Summary: Event library for device-mapper
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{libname_event}
|
||||
Device mapper event daemon shared library
|
||||
|
||||
%package devel
|
||||
Summary: Development package for the device mapper
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{libname_event} = %{device_mapper_version}
|
||||
Requires: %{libname} = %{device_mapper_version}
|
||||
Requires: device-mapper = %{device_mapper_version}
|
||||
|
||||
%description devel
|
||||
Files needed for software development using the device mapper
|
||||
|
||||
%prep
|
||||
%setup -q -n LVM2.%{lvm2_version}
|
||||
### COMMON-PREP-BEGIN ###
|
||||
%patch1001 -p1
|
||||
%patch1002 -p1
|
||||
%patch1004 -p1
|
||||
%patch1005 -p1
|
||||
%patch1006 -p1
|
||||
%patch1007 -p1
|
||||
%patch1008 -p1
|
||||
%patch1009 -p1
|
||||
%patch1010 -p1
|
||||
%patch1011 -p1
|
||||
%patch1012 -p1
|
||||
%patch1013 -p1
|
||||
%patch1014 -p1
|
||||
%patch1015 -p1
|
||||
%patch1016 -p1
|
||||
%patch1017 -p1
|
||||
%patch1018 -p1
|
||||
%patch1019 -p1
|
||||
|
||||
%patch2000 -p1
|
||||
%patch2001 -p1
|
||||
%patch2002 -p1
|
||||
%patch2003 -p1
|
||||
%patch2004 -p1
|
||||
%patch2005 -p1
|
||||
%patch2006 -p1
|
||||
%patch2007 -p1
|
||||
%patch2008 -p1
|
||||
### COMMON-PREP-END ###
|
||||
|
||||
%build
|
||||
extra_opts=""
|
||||
### COMMON-CONFIG-BEGIN ###
|
||||
export PATH=$PATH:/sbin:%{_prefix}/sbin
|
||||
sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
|
||||
%configure \
|
||||
--enable-dmeventd --enable-cmdlib \
|
||||
--enable-udev_rules --enable-udev_sync \
|
||||
--with-udev-prefix="%{_prefix}/" \
|
||||
--enable-selinux \
|
||||
--enable-pkgconfig \
|
||||
--with-usrlibdir=%{_libdir} \
|
||||
--with-usrsbindir=%{_sbindir} \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-tmpfilesdir=%{_tmpfilesdir} \
|
||||
--with-thin=internal \
|
||||
--with-device-gid=6 \
|
||||
--with-device-mode=0640 \
|
||||
--with-device-uid=0 \
|
||||
--with-dmeventd-path=%{_sbindir}/dmeventd \
|
||||
--with-thin-check=%{_sbindir}/thin_check \
|
||||
--with-thin-dump=%{_sbindir}/thin_dump \
|
||||
--with-thin-repair=%{_sbindir}/thin_repair \
|
||||
$extra_opts
|
||||
### COMMON-CONFIG-END ###
|
||||
make %{?_smp_mflags} device-mapper
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} \
|
||||
install_device-mapper \
|
||||
install_systemd_units install_systemd_generators
|
||||
|
||||
ln -s service %{buildroot}/%{_sbindir}/rcdm-event
|
||||
|
||||
# provide 1.02 compat links for the shared libraries
|
||||
# this is needed for various binary packages
|
||||
ln -s libdevmapper.so.1.03 %{buildroot}/%{_libdir}/libdevmapper.so.1.02
|
||||
ln -s libdevmapper-event.so.1.03 %{buildroot}/%{_libdir}/libdevmapper-event.so.1.02
|
||||
|
||||
# remove blkd, will be in lvm2 proper
|
||||
# without force on purpose to detect changes and fail if it happens
|
||||
rm %{buildroot}%{_sbindir}/blkdeactivate
|
||||
rm %{buildroot}%{_unitdir}/blk-availability.service
|
||||
rm %{buildroot}%{_unitdir}/lvm2-monitor.service
|
||||
rm %{buildroot}%{_mandir}/man8/blkdeactivate.8
|
||||
rm %{buildroot}%{_mandir}/man8/lvm2-activation-generator.8
|
||||
|
||||
%post
|
||||
%service_add_post dm-event.service dm-event.socket
|
||||
%{?regenerate_initrd_post}
|
||||
|
||||
%posttrans
|
||||
%{?regenerate_initrd_posttrans}
|
||||
|
||||
%pre
|
||||
%service_add_pre dm-event.service dm-event.socket
|
||||
|
||||
%preun
|
||||
%service_del_preun dm-event.service dm-event.socket
|
||||
|
||||
%postun
|
||||
%service_del_postun dm-event.service dm-event.socket
|
||||
%{?regenerate_initrd_post}
|
||||
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
%post -n %{libname_event} -p /sbin/ldconfig
|
||||
%postun -n %{libname_event} -p /sbin/ldconfig
|
||||
|
||||
%files -n %{libname}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libdevmapper.so.1.03
|
||||
%{_libdir}/libdevmapper.so.1.02
|
||||
|
||||
%files -n %{libname_event}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libdevmapper-event.so.1.03
|
||||
%{_libdir}/libdevmapper-event.so.1.02
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING COPYING.LIB README
|
||||
%doc udev/12-dm-permissions.rules
|
||||
%{_sbindir}/dmsetup
|
||||
%{_sbindir}/dmeventd
|
||||
%{_sbindir}/dmstats
|
||||
%{_mandir}/man8/dmstats.8.*
|
||||
%{_mandir}/man8/dmsetup.8.*
|
||||
%{_mandir}/man8/dmeventd.8.*
|
||||
%{_udevrulesdir}/10-dm.rules
|
||||
%{_udevrulesdir}/13-dm-disk.rules
|
||||
%{_udevrulesdir}/95-dm-notify.rules
|
||||
%{_unitdir}/dm-event.socket
|
||||
%{_sbindir}/rcdm-event
|
||||
%{_unitdir}/dm-event.service
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/libdevmapper.so
|
||||
%{_libdir}/libdevmapper-event.so
|
||||
%{_includedir}/libdevmapper*.h
|
||||
%{_libdir}/pkgconfig/devmapper*.pc
|
||||
|
||||
%changelog
|
@ -21,10 +21,10 @@ Lidong
|
||||
scripts/fsadm.sh | 104 ++++++++++++++++++++++++++++++++++++++++++++++---------
|
||||
1 file changed, 88 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
|
||||
index f4ea796..765f9dc 100755
|
||||
--- a/scripts/fsadm.sh
|
||||
+++ b/scripts/fsadm.sh
|
||||
Index: LVM2.2.02.152/scripts/fsadm.sh
|
||||
===================================================================
|
||||
--- LVM2.2.02.152.orig/scripts/fsadm.sh
|
||||
+++ LVM2.2.02.152/scripts/fsadm.sh
|
||||
@@ -22,6 +22,7 @@
|
||||
# ext2/ext3/ext4: resize2fs, tune2fs
|
||||
# reiserfs: resize_reiserfs, reiserfstune
|
||||
@ -49,9 +49,9 @@ index f4ea796..765f9dc 100755
|
||||
+UUID=
|
||||
+BTRFS_DEVID=
|
||||
PROCMOUNTS="/proc/mounts"
|
||||
PROCSELFMOUNTINFO="/proc/self/mountinfo"
|
||||
NULL="$DM_DEV_DIR/null"
|
||||
|
||||
@@ -147,7 +152,7 @@ cleanup() {
|
||||
@@ -148,7 +153,7 @@ cleanup() {
|
||||
export _FSADM_YES _FSADM_EXTOFF
|
||||
unset FSADM_RUNNING
|
||||
test -n "$LVM_BINARY" && PATH=$_SAVEPATH
|
||||
@ -60,7 +60,7 @@ index f4ea796..765f9dc 100755
|
||||
fi
|
||||
|
||||
# error exit status for break
|
||||
@@ -198,27 +203,62 @@ detect_fs() {
|
||||
@@ -207,6 +212,34 @@ detect_fs() {
|
||||
verbose "\"$FSTYPE\" filesystem found on \"$VOLUME\""
|
||||
}
|
||||
|
||||
@ -92,52 +92,23 @@ index f4ea796..765f9dc 100755
|
||||
+ IFS=$STR_IFS
|
||||
+}
|
||||
+
|
||||
detect_mounted_with_proc_self_mountinfo() {
|
||||
MOUNTED=$("$GREP" "^[0-9]* [0-9]* $MAJORMINOR " "$PROCSELFMOUNTINFO")
|
||||
|
||||
@@ -243,7 +276,11 @@ detect_mounted_with_proc_mounts() {
|
||||
# check if the given device is already mounted and where
|
||||
# FIXME: resolve swap usage and device stacking
|
||||
detect_mounted() {
|
||||
- test -e "$PROCMOUNTS" || error "Cannot detect mounted device \"$VOLUME\""
|
||||
- if test -e "$PROCSELFMOUNTINFO"; then
|
||||
+ if test "$FSTYPE" = "btrfs" ; then
|
||||
+ check_findmnt || error "Need 'findmnt' utility to work with btrfs filesystem"
|
||||
+ detect_fs_uuid || verbose "Can't get fs UUID from \"$VOLUME\" volume"
|
||||
+ detect_mounted_findmnt
|
||||
+
|
||||
+ else
|
||||
+ test -e "$PROCMOUNTS" || error "Cannot detect mounted device \"$VOLUME\""
|
||||
|
||||
- MOUNTED=$("$GREP" "^$VOLUME[ \t]" "$PROCMOUNTS")
|
||||
+ MOUNTED=$("$GREP" "^$VOLUME[ \t]" "$PROCMOUNTS")
|
||||
|
||||
- # for empty string try again with real volume name
|
||||
- test -z "$MOUNTED" && MOUNTED=$("$GREP" "^$RVOLUME[ \t]" "$PROCMOUNTS")
|
||||
+ # for empty string try again with real volume name
|
||||
+ test -z "$MOUNTED" && MOUNTED=$("$GREP" "^$RVOLUME[ \t]" "$PROCMOUNTS")
|
||||
|
||||
- # cut device name prefix and trim everything past mountpoint
|
||||
- # echo translates \040 to spaces
|
||||
- MOUNTED=${MOUNTED#* }
|
||||
- MOUNTED=$(echo -n -e ${MOUNTED%% *})
|
||||
+ # cut device name prefix and trim everything past mountpoint
|
||||
+ # echo translates \040 to spaces
|
||||
+ MOUNTED=${MOUNTED#* }
|
||||
+ MOUNTED=$(echo -n -e ${MOUNTED%% *})
|
||||
|
||||
- # for systems with different device names - check also mount output
|
||||
- if test -z "$MOUNTED" ; then
|
||||
- MOUNTED=$(LC_ALL=C "$MOUNT" | "$GREP" "^$VOLUME[ \t]")
|
||||
- test -z "$MOUNTED" && MOUNTED=$(LC_ALL=C "$MOUNT" | "$GREP" "^$RVOLUME[ \t]")
|
||||
- MOUNTED=${MOUNTED##* on }
|
||||
- MOUNTED=${MOUNTED% type *} # allow type in the mount name
|
||||
+ # for systems with different device names - check also mount output
|
||||
+ if test -z "$MOUNTED" ; then
|
||||
+ MOUNTED=$(LC_ALL=C "$MOUNT" | "$GREP" "^$VOLUME[ \t]")
|
||||
+ test -z "$MOUNTED" && MOUNTED=$(LC_ALL=C "$MOUNT" | "$GREP" "^$RVOLUME[ \t]")
|
||||
+ MOUNTED=${MOUNTED##* on }
|
||||
+ MOUNTED=${MOUNTED% type *} # allow type in the mount name
|
||||
+ fi
|
||||
fi
|
||||
|
||||
test -n "$MOUNTED"
|
||||
@@ -368,6 +408,31 @@ resize_xfs() {
|
||||
+ elif test -e "$PROCSELFMOUNTINFO"; then
|
||||
detect_mounted_with_proc_self_mountinfo
|
||||
elif test -e "$PROCMOUNTS"; then
|
||||
detect_mounted_with_proc_mounts
|
||||
@@ -396,6 +433,31 @@ resize_xfs() {
|
||||
fi
|
||||
}
|
||||
|
||||
@ -169,7 +140,7 @@ index f4ea796..765f9dc 100755
|
||||
####################
|
||||
# Resize filesystem
|
||||
####################
|
||||
@@ -384,6 +449,7 @@ resize() {
|
||||
@@ -412,6 +474,7 @@ resize() {
|
||||
"ext3"|"ext2"|"ext4") resize_ext $NEWSIZE ;;
|
||||
"reiserfs") resize_reiser $NEWSIZE ;;
|
||||
"xfs") resize_xfs $NEWSIZE ;;
|
||||
@ -177,7 +148,7 @@ index f4ea796..765f9dc 100755
|
||||
*) error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool" ;;
|
||||
esac || error "Resize $FSTYPE failed"
|
||||
cleanup 0
|
||||
@@ -441,6 +507,12 @@ check() {
|
||||
@@ -469,6 +532,12 @@ check() {
|
||||
# Think about better way....
|
||||
dry "$XFS_REPAIR" -n -o force_geometry "$VOLUME"
|
||||
fi ;;
|
||||
@ -190,7 +161,7 @@ index f4ea796..765f9dc 100755
|
||||
*) # check if executed from interactive shell environment
|
||||
case "$-" in
|
||||
*i*) dry "$FSCK" $YES $FORCE "$VOLUME" ;;
|
||||
@@ -462,7 +534,7 @@ test -n "$FSADM_RUNNING" && exit 0
|
||||
@@ -490,7 +559,7 @@ test -n "$FSADM_RUNNING" && exit 0
|
||||
for i in "$TUNE_EXT" "$RESIZE_EXT" "$TUNE_REISER" "$RESIZE_REISER" \
|
||||
"$TUNE_XFS" "$RESIZE_XFS" "$MOUNT" "$UMOUNT" "$MKDIR" \
|
||||
"$RMDIR" "$BLOCKDEV" "$BLKID" "$GREP" "$READLINK" \
|
||||
@ -199,6 +170,3 @@ index f4ea796..765f9dc 100755
|
||||
test -n "$i" || error "Required command definitions in the script are missing!"
|
||||
done
|
||||
|
||||
--
|
||||
1.8.1.4
|
||||
|
||||
|
1669
lvm2-clvm.changes
Normal file
1669
lvm2-clvm.changes
Normal file
File diff suppressed because it is too large
Load Diff
236
lvm2-clvm.spec
Normal file
236
lvm2-clvm.spec
Normal file
@ -0,0 +1,236 @@
|
||||
#
|
||||
# spec file for package lvm2-clvm
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
### COMMON-DEF-BEGIN ###
|
||||
%define lvm2_version 2.02.152
|
||||
%define device_mapper_version 1.02.124
|
||||
### COMMON-DEF-END ###
|
||||
Name: lvm2-clvm
|
||||
Version: %{lvm2_version}
|
||||
Release: 0
|
||||
Summary: Clustered LVM2
|
||||
License: GPL-2.0 and LGPL-2.1
|
||||
Group: Productivity/Clustering/HA
|
||||
Url: http://sources.redhat.com/cluster/clvm/
|
||||
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz
|
||||
Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc
|
||||
Source2: clvmd.ocf
|
||||
Source3: cmirrord.ocf
|
||||
### COMMON-PATCH-BEGIN ###
|
||||
# Upstream patches first
|
||||
Patch1001: improve_probing.diff
|
||||
Patch1002: no-inc-audit.diff
|
||||
Patch1004: sys_mount_instead_linux_fs.diff
|
||||
#suse
|
||||
Patch1005: display-dm-name-for-lv-name.diff
|
||||
Patch1006: device-mapper-type_punning.diff
|
||||
#fate312248, patch6,7
|
||||
Patch1007: make-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1008: improve-mirror-legs-on-different-tag-pvs.patch
|
||||
#fate#315092
|
||||
Patch1009: cmirrord_improvment_performance.patch
|
||||
#fate#314367, patch10,11
|
||||
Patch1010: cluster_support_mirrord_log.diff
|
||||
Patch1011: lvconvert-cluster-mirrored-disk-failed.patch
|
||||
#forward-port from sle11
|
||||
Patch1012: suppress_format1_size_warning.diff
|
||||
Patch1013: pvmove_support_clustered_vg.diff
|
||||
# Never upstream
|
||||
Patch1014: cmirrord_remove_date_time_from_compilation.patch
|
||||
#suse, bnc873538
|
||||
Patch1015: fix-closedown-before-thread-finish.patch
|
||||
#suse, bnc#870824
|
||||
Patch1016: use-mirrortype-asdefault-whenclvmdrunning.patch
|
||||
Patch1017: version-plugins-in-libdir.patch
|
||||
Patch1018: dmeventd-fix-dso-name-wrong-compare.patch
|
||||
Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
||||
#suse, bnc#707253(also merged patch for bnc#479104)
|
||||
Patch2000: device-mapper-dmsetup-export.patch
|
||||
Patch2001: device-mapper-gcc-warnings.patch
|
||||
Patch2002: device-mapper-link.patch
|
||||
#suse, bnc#78902,bnc#789019,bnc#789020
|
||||
Patch2003: udev_rules-update.diff
|
||||
#suse, bnc#875233
|
||||
Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
Patch2005: fsadm-add-support-for-btrfs.patch
|
||||
Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch
|
||||
Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
|
||||
Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch
|
||||
### COMMON-PATCH-END ###
|
||||
BuildRequires: libcorosync-devel
|
||||
BuildRequires: libdlm-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(devmapper)
|
||||
BuildRequires: pkgconfig(libudev)
|
||||
Requires: corosync
|
||||
Requires: device-mapper >= %{device_mapper_version}
|
||||
Requires: lvm2 = %{version}
|
||||
Requires: lvm2-cmirrord
|
||||
Obsoletes: cmirrord < %{version}
|
||||
Provides: cmirrord = %{version}
|
||||
|
||||
%description
|
||||
A daemon for using LVM2 Logival Volumes in a clustered environment.
|
||||
|
||||
%package -n lvm2-cmirrord
|
||||
Summary: Clustered RAID 1 support using device-mapper and corosync
|
||||
Group: Productivity/Clustering/HA
|
||||
Requires: corosync
|
||||
Requires: device-mapper >= %{device_mapper_version}
|
||||
Requires: lvm2 = %{version}
|
||||
Requires: lvm2-clvm
|
||||
|
||||
%description -n lvm2-cmirrord
|
||||
A daemon for using LVM2 Logival Volumes in a clustered environment.
|
||||
|
||||
%prep
|
||||
%setup -q -n LVM2.%{lvm2_version}
|
||||
### COMMON-PREP-BEGIN ###
|
||||
%patch1001 -p1
|
||||
%patch1002 -p1
|
||||
%patch1004 -p1
|
||||
%patch1005 -p1
|
||||
%patch1006 -p1
|
||||
%patch1007 -p1
|
||||
%patch1008 -p1
|
||||
%patch1009 -p1
|
||||
%patch1010 -p1
|
||||
%patch1011 -p1
|
||||
%patch1012 -p1
|
||||
%patch1013 -p1
|
||||
%patch1014 -p1
|
||||
%patch1015 -p1
|
||||
%patch1016 -p1
|
||||
%patch1017 -p1
|
||||
%patch1018 -p1
|
||||
%patch1019 -p1
|
||||
|
||||
%patch2000 -p1
|
||||
%patch2001 -p1
|
||||
%patch2002 -p1
|
||||
%patch2003 -p1
|
||||
%patch2004 -p1
|
||||
%patch2005 -p1
|
||||
%patch2006 -p1
|
||||
%patch2007 -p1
|
||||
%patch2008 -p1
|
||||
### COMMON-PREP-END ###
|
||||
|
||||
%build
|
||||
extra_opts="
|
||||
--with-default-locking-dir=/run/lock/lvm
|
||||
--with-default-pid-dir=/run
|
||||
--with-default-run-dir=/run/lvm
|
||||
--with-clvmd=corosync
|
||||
--with-cluster=internal
|
||||
--enable-cmirrord
|
||||
"
|
||||
### COMMON-CONFIG-BEGIN ###
|
||||
export PATH=$PATH:/sbin:%{_prefix}/sbin
|
||||
sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
|
||||
%configure \
|
||||
--enable-dmeventd --enable-cmdlib \
|
||||
--enable-udev_rules --enable-udev_sync \
|
||||
--with-udev-prefix="%{_prefix}/" \
|
||||
--enable-selinux \
|
||||
--enable-pkgconfig \
|
||||
--with-usrlibdir=%{_libdir} \
|
||||
--with-usrsbindir=%{_sbindir} \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-tmpfilesdir=%{_tmpfilesdir} \
|
||||
--with-thin=internal \
|
||||
--with-device-gid=6 \
|
||||
--with-device-mode=0640 \
|
||||
--with-device-uid=0 \
|
||||
--with-dmeventd-path=%{_sbindir}/dmeventd \
|
||||
--with-thin-check=%{_sbindir}/thin_check \
|
||||
--with-thin-dump=%{_sbindir}/thin_dump \
|
||||
--with-thin-repair=%{_sbindir}/thin_repair \
|
||||
$extra_opts
|
||||
### COMMON-CONFIG-END ###
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} \
|
||||
install_cluster \
|
||||
install_systemd_units install_systemd_generators
|
||||
make DESTDIR=%{buildroot} install -C daemons/cmirrord
|
||||
|
||||
# ocf files
|
||||
install -m755 -D %{SOURCE2} "%{buildroot}/%{_libexecdir}/ocf/resource.d/lvm2/clvmd"
|
||||
install -m755 -D %{SOURCE3} "%{buildroot}/%{_libexecdir}/ocf/resource.d/lvm2/cmirrord"
|
||||
|
||||
# rc services symlinks
|
||||
ln -s service %{buildroot}%{_sbindir}/rclvm2-cluster-activation
|
||||
ln -s service %{buildroot}%{_sbindir}/rclvm2-clvmd
|
||||
ln -s service %{buildroot}%{_sbindir}/rclvm2-cmirrord
|
||||
|
||||
# remove files from lvm2 split due to systemd_generators picking them up
|
||||
rm %{buildroot}%{_unitdir}/blk-availability.service
|
||||
rm %{buildroot}%{_unitdir}/dm-event.service
|
||||
rm %{buildroot}%{_unitdir}/dm-event.socket
|
||||
rm %{buildroot}%{_unitdir}/lvm2-monitor.service
|
||||
rm %{buildroot}%{_mandir}/man8/lvm2-activation-generator.8
|
||||
|
||||
%pre
|
||||
%service_add_pre lvm2-cluster-activation.service lvm2-clvmd.service
|
||||
|
||||
%post
|
||||
%service_add_post lvm2-cluster-activation.service lvm2-clvmd.service
|
||||
|
||||
%preun
|
||||
%service_del_preun lvm2-cluster-activation.service lvm2-clvmd.service
|
||||
|
||||
%postun
|
||||
%service_del_postun lvm2-cluster-activation.service lvm2-clvmd.service
|
||||
|
||||
%pre -n lvm2-cmirrord
|
||||
%service_add_pre lvm2-cmirrord.service lvm2-cluster-activation.service
|
||||
|
||||
%post -n lvm2-cmirrord
|
||||
%service_add_post lvm2-cmirrord.service lvm2-cluster-activation.service
|
||||
|
||||
%preun -n lvm2-cmirrord
|
||||
%service_del_preun lvm2-cmirrord.service lvm2-cluster-activation.service
|
||||
|
||||
%postun -n lvm2-cmirrord
|
||||
%service_del_postun lvm2-cmirrord.service lvm2-cluster-activation.service
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%{_sbindir}/clvmd
|
||||
%{_sbindir}/rclvm2-cluster-activation
|
||||
%{_sbindir}/rclvm2-clvmd
|
||||
%dir %{_libexecdir}/ocf
|
||||
%dir %{_libexecdir}/ocf/resource.d
|
||||
%dir %{_libexecdir}/ocf/resource.d/lvm2
|
||||
%{_libexecdir}/ocf/resource.d/lvm2/clvmd
|
||||
%{_mandir}/man8/clvmd.8.*
|
||||
%{_unitdir}/lvm2-clvmd.service
|
||||
%{_unitdir}/lvm2-cluster-activation.service
|
||||
%{_libexecdir}/systemd/lvm2-cluster-activation
|
||||
|
||||
%files -n lvm2-cmirrord
|
||||
%defattr(-,root,root)
|
||||
%{_sbindir}/cmirrord
|
||||
%{_sbindir}/rclvm2-cmirrord
|
||||
%{_libexecdir}/ocf/resource.d/lvm2/cmirrord
|
||||
%{_mandir}/man8/cmirrord.8.*
|
||||
%{_libexecdir}/systemd/system/lvm2-cmirrord.service
|
||||
|
||||
%changelog
|
110
lvm2.changes
110
lvm2.changes
@ -1,3 +1,113 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 4 10:36:40 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Update patch use-mirrortype-asdefault-whenclvmdrunning.patch
|
||||
to match up the patches/pvmove_support_clustered_vg.diff and not
|
||||
use the define declared only when building clvm codebase;
|
||||
it is still broken if someone changes the PID location, but at least
|
||||
it now does not depend on clvm code
|
||||
- Regenerate_initrd in post of the lvm2 main pkg
|
||||
- Update baselibs to point to split-out devicemapper libraries
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 4 09:27:30 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Keep in sync the common configuration options that are shared among
|
||||
all the variants dm/lvm2/clvm
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 14:03:30 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Provide symlinks to 1.02 versions of dm and dm-event libs
|
||||
* this should sort out binary packages without the need of double
|
||||
rebuilding
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 13:23:52 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Update to 2.02.152 release, read WHATS_NEW for detailed log.
|
||||
- Refresh patches:
|
||||
* 10-dm.rules-Reset-state-variable-for-spurious-events.patch
|
||||
* device-mapper-gcc-warnings.patch
|
||||
* device-mapper-link.patch
|
||||
* udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
- Slightly tweak btrfs patch as the code changed for the detection:
|
||||
* fsadm-add-support-for-btrfs.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 12:55:34 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Build and install properly cluster files
|
||||
- Remove csm-converter.tar.gz as the evms was last present on sle10
|
||||
and thus migration is bit out of scope today
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 09:23:48 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Add pre_checkin.sh to allow syncing of patches between packages:
|
||||
workflow = add everything to lvm2.spec and run pre_checkin.sh
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 2 17:41:55 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Refresh patch use-mirrortype-asdefault-whenclvmdrunning.patch to
|
||||
work without clvm code enabled
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 2 17:29:09 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Regenerate lvm2 tmpfiles after install so they won't populate just
|
||||
after the reboot
|
||||
- Split out lvm2 libraries to separate subpkgs per standards
|
||||
- Rename versioning of plugins patch:
|
||||
* version-plugins-in-libdir -> version-plugins-in-libdir.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 2 16:51:09 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Remove evms provides/obsoletes, last seen on sle10
|
||||
- Mark configs as such
|
||||
- Ghost the during-run created dirs
|
||||
- Install rcbla compat service symlinks
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 2 15:13:35 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Sync with device-mapper.spec, build only lvm and wipe devicemapper
|
||||
binaries
|
||||
- Install in /usr there is no technical reason to keep this out
|
||||
of /usr
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 2 13:23:49 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Split out device-mapper and clvm to separate spec files
|
||||
* No factual changes just deletion in the spec to keep it out
|
||||
of interacting with those parts
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 29 11:05:04 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Do not explicitely require expat it is only used by thin_provisioning
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 28 20:40:17 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- There is no factual reason to keep the device mapper out of /usr
|
||||
so just match everything else
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 28 20:12:48 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Remove device-mapper-static.patch as there should be no need to
|
||||
have static library here and it can be reenabled with some explanation
|
||||
if needed
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 28 19:57:54 UTC 2016 - tchvatal@suse.com
|
||||
|
||||
- Rename device-mapper-link to device-mapper-link.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 7 01:53:34 UTC 2016 - lwang@suse.com
|
||||
|
||||
|
508
lvm2.spec
508
lvm2.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package lvm2
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,11 +16,13 @@
|
||||
#
|
||||
|
||||
|
||||
%define lvm2_version 2.02.141
|
||||
%define device_mapper_version 1.02.115
|
||||
|
||||
%bcond_without clvm
|
||||
|
||||
### COMMON-DEF-BEGIN ###
|
||||
%define lvm2_version 2.02.152
|
||||
%define device_mapper_version 1.02.124
|
||||
### COMMON-DEF-END ###
|
||||
%define _udevdir %(pkg-config --variable=udevdir udev)
|
||||
%define applib liblvm2app2_2
|
||||
%define cmdlib liblvm2cmd2_02
|
||||
Name: lvm2
|
||||
Version: %{lvm2_version}
|
||||
Release: 0
|
||||
@ -28,104 +30,100 @@ Summary: Logical Volume Manager Tools
|
||||
License: GPL-2.0 and LGPL-2.1
|
||||
Group: System/Base
|
||||
Url: http://www.sourceware.org/lvm2/
|
||||
|
||||
Source: ftp://sources.redhat.com/pub/%{name}/LVM2.%{version}.tgz
|
||||
Source42: ftp://sources.redhat.com/pub/%{name}/LVM2.%{version}.tgz.asc
|
||||
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
|
||||
Source1: lvm.conf
|
||||
Source8: clvmd.ocf
|
||||
Source10: cmirrord.ocf
|
||||
Source14: baselibs.conf
|
||||
Source16: csm-converter.tar.gz
|
||||
|
||||
Source42: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz.asc
|
||||
### COMMON-PATCH-BEGIN ###
|
||||
# Upstream patches first
|
||||
|
||||
# SUSE patches 1000- for LVM, 2000- for device mapper
|
||||
Patch1001: improve_probing.diff
|
||||
Patch1002: no-inc-audit.diff
|
||||
Patch1004: sys_mount_instead_linux_fs.diff
|
||||
|
||||
#suse
|
||||
Patch1005: display-dm-name-for-lv-name.diff
|
||||
Patch1006: device-mapper-type_punning.diff
|
||||
|
||||
#fate312248, patch6,7
|
||||
Patch1007: make-mirror-legs-on-different-tag-pvs.patch
|
||||
Patch1008: improve-mirror-legs-on-different-tag-pvs.patch
|
||||
|
||||
#fate#315092
|
||||
Patch1009: cmirrord_improvment_performance.patch
|
||||
|
||||
#fate#314367, patch10,11
|
||||
Patch1010: cluster_support_mirrord_log.diff
|
||||
Patch1011: lvconvert-cluster-mirrored-disk-failed.patch
|
||||
|
||||
#forward-port from sle11
|
||||
Patch1012: suppress_format1_size_warning.diff
|
||||
Patch1013: pvmove_support_clustered_vg.diff
|
||||
|
||||
# Never upstream
|
||||
Patch1014: cmirrord_remove_date_time_from_compilation.patch
|
||||
|
||||
#suse, bnc873538
|
||||
Patch1015: fix-closedown-before-thread-finish.patch
|
||||
#suse, bnc#870824
|
||||
Patch1016: use-mirrortype-asdefault-whenclvmdrunning.patch
|
||||
|
||||
Patch1017: version-plugins-in-libdir
|
||||
Patch1017: version-plugins-in-libdir.patch
|
||||
Patch1018: dmeventd-fix-dso-name-wrong-compare.patch
|
||||
Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
|
||||
|
||||
# device-mapper patches
|
||||
#suse, bnc#707253(also merged patch for bnc#479104)
|
||||
Patch2000: device-mapper-dmsetup-export.patch
|
||||
Patch2001: device-mapper-gcc-warnings.patch
|
||||
Patch2002: device-mapper-static.patch
|
||||
Patch2003: device-mapper-link
|
||||
Patch2002: device-mapper-link.patch
|
||||
#suse, bnc#78902,bnc#789019,bnc#789020
|
||||
Patch2004: udev_rules-update.diff
|
||||
Patch2003: udev_rules-update.diff
|
||||
#suse, bnc#875233
|
||||
Patch2005: udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
Patch2007: fsadm-add-support-for-btrfs.patch
|
||||
Patch2008: Import-ID_FS_XXX-variables-bnc909358.patch
|
||||
Patch2009: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
|
||||
Patch2010: libdm-iface-not-output-error-message-inside-retry-loop.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch
|
||||
Patch2005: fsadm-add-support-for-btrfs.patch
|
||||
Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch
|
||||
Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
|
||||
Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch
|
||||
### COMMON-PATCH-END ###
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libaio-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: suse-module-tools
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: systemd
|
||||
BuildRequires: pkgconfig(libudev)
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
BuildRequires: pkgconfig(udev)
|
||||
Requires: device-mapper >= 1.02.90
|
||||
Requires: device-mapper >= %{device_mapper_version}
|
||||
Requires(post): coreutils
|
||||
Requires(postun): coreutils
|
||||
Provides: lvm = %version-%release
|
||||
# Not a real replacement but we drop evms
|
||||
Provides: evms = 2.5.5
|
||||
Provides: evms-devel = 2.5.5
|
||||
Provides: evms-gui = 2.5.5
|
||||
Provides: evms-ha = 2.5.5
|
||||
Obsoletes: evms <= 2.5.5
|
||||
Obsoletes: evms-devel <= 2.5.5
|
||||
Obsoletes: evms-gui <= 2.5.5
|
||||
Obsoletes: evms-ha <= 2.5.5
|
||||
%define _udevdir %(pkg-config --variable=udevdir udev)
|
||||
|
||||
%if %{defined systemd_requires}
|
||||
%{systemd_requires}
|
||||
%endif
|
||||
Provides: lvm = %{version}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{?systemd_requires}
|
||||
|
||||
%description
|
||||
Programs and man pages for configuring and using the LVM2 Logical
|
||||
Volume Manager.
|
||||
|
||||
%package -n %{applib}
|
||||
Summary: LVM2 application api library
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{applib}
|
||||
LVM library for applications api
|
||||
|
||||
%package -n %{cmdlib}
|
||||
Summary: LVM2 command line library
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{cmdlib}
|
||||
The lvm2 command line library allows building programs that manage
|
||||
lvm devices without invoking a separate program.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for LVM2
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{applib} = %{version}
|
||||
Requires: %{cmdlib} = %{version}
|
||||
Requires: lvm2 = %{version}
|
||||
Recommends: device-mapper-devel
|
||||
|
||||
%description devel
|
||||
This package provides development files for the LVM2 Logical Volume Manager.
|
||||
|
||||
%prep
|
||||
%setup -q -n LVM2.%{version} -a 16
|
||||
|
||||
%setup -q -n LVM2.%{version}
|
||||
### COMMON-PREP-BEGIN ###
|
||||
%patch1001 -p1
|
||||
%patch1002 -p1
|
||||
%patch1004 -p1
|
||||
@ -140,9 +138,7 @@ Volume Manager.
|
||||
%patch1013 -p1
|
||||
%patch1014 -p1
|
||||
%patch1015 -p1
|
||||
%if %{with clvm}
|
||||
%patch1016 -p1
|
||||
%endif
|
||||
%patch1017 -p1
|
||||
%patch1018 -p1
|
||||
%patch1019 -p1
|
||||
@ -153,99 +149,56 @@ Volume Manager.
|
||||
%patch2003 -p1
|
||||
%patch2004 -p1
|
||||
%patch2005 -p1
|
||||
%patch2006 -p1
|
||||
%patch2007 -p1
|
||||
%patch2008 -p1
|
||||
%patch2009 -p1
|
||||
%patch2010 -p1
|
||||
### COMMON-PREP-END ###
|
||||
|
||||
%build
|
||||
#set path so that thin_check can be found
|
||||
#export before configure due to bnc#779965
|
||||
export MODPROBE_CMD=/sbin/modprobe
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export PATH=$PATH:/sbin:/usr/sbin
|
||||
extra_opts="
|
||||
--enable-cmdlib
|
||||
--enable-applib
|
||||
--enable-realtime
|
||||
--enable-lvmetad
|
||||
--with-default-locking-dir=/run/lock/lvm
|
||||
--with-default-pid-dir=/run
|
||||
--with-default-run-dir=/run/lvm
|
||||
"
|
||||
### COMMON-CONFIG-BEGIN ###
|
||||
export PATH=$PATH:/sbin:%{_prefix}/sbin
|
||||
sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
|
||||
autoreconf -fvi
|
||||
%configure \
|
||||
--prefix=/ \
|
||||
--bindir=/bin \
|
||||
--libdir=/%_lib \
|
||||
--with-usrlibdir=%_libdir \
|
||||
--with-usrsbindir=%_sbindir \
|
||||
--sbindir=/sbin \
|
||||
--enable-dmeventd \
|
||||
--enable-udev_sync \
|
||||
--enable-udev_rules \
|
||||
--enable-cmdlib \
|
||||
--enable-applib \
|
||||
--enable-dmeventd \
|
||||
--enable-realtime \
|
||||
--enable-pkgconfig \
|
||||
--enable-dmeventd --enable-cmdlib \
|
||||
--enable-udev_rules --enable-udev_sync \
|
||||
--with-udev-prefix="%{_prefix}/" \
|
||||
--enable-selinux \
|
||||
%if %{with clvm}
|
||||
--with-clvmd=corosync \
|
||||
--with-cluster=internal \
|
||||
--enable-cmirrord \
|
||||
%endif
|
||||
--datarootdir="%_datadir" \
|
||||
--enable-lvmetad \
|
||||
--with-default-locking-dir=/run/lock/lvm \
|
||||
--with-default-pid-dir=/run \
|
||||
--enable-pkgconfig \
|
||||
--with-usrlibdir=%{_libdir} \
|
||||
--with-usrsbindir=%{_sbindir} \
|
||||
--with-default-dm-run-dir=/run \
|
||||
--with-default-run-dir=/run/lvm \
|
||||
--with-tmpfilesdir=%{_tmpfilesdir} \
|
||||
--with-thin=internal \
|
||||
--with-device-gid=6 \
|
||||
--with-device-mode=0640 \
|
||||
--with-device-uid=0 \
|
||||
--with-dmeventd-path=/sbin/dmeventd \
|
||||
--with-dmeventd-path=%{_sbindir}/dmeventd \
|
||||
--with-thin-check=%{_sbindir}/thin_check \
|
||||
--with-thin-dump=%{_sbindir}/thin_dump \
|
||||
--with-thin-repair=%{_sbindir}/thin_repair \
|
||||
--with-udev-prefix="%_prefix/"
|
||||
|
||||
export SUSE_ASNEEDED=0
|
||||
|
||||
$extra_opts
|
||||
### COMMON-CONFIG-END ###
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%if %{with clvm}
|
||||
#csm convert
|
||||
pushd bnz
|
||||
make %{?_smp_mflags}
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
%make_install
|
||||
make install_system_dirs DESTDIR="%buildroot"
|
||||
make install_systemd_units DESTDIR="%buildroot"
|
||||
make install_systemd_generators DESTDIR="%buildroot"
|
||||
make install_tmpfiles_configuration DESTDIR="%buildroot"
|
||||
# Is this directory used anymore?
|
||||
install -d -m 755 "%buildroot/%_sysconfdir/lvm/metadata"
|
||||
install -m 644 %{SOURCE1} "%buildroot/%_sysconfdir/lvm/"
|
||||
mkdir -p "%buildroot/%_initddir"
|
||||
mkdir -p "%buildroot/%_sbindir"
|
||||
%if %{with clvm}
|
||||
install -m755 -D %{S:8} "%buildroot/%_prefix/lib/ocf/resource.d/lvm2/clvmd"
|
||||
install -m755 -D %{S:10} "%buildroot/%_prefix/lib/ocf/resource.d/lvm2/cmirrord"
|
||||
make install_system_dirs DESTDIR=%{buildroot}
|
||||
make install_systemd_units DESTDIR=%{buildroot}
|
||||
make install_systemd_generators DESTDIR=%{buildroot}
|
||||
make install_tmpfiles_configuration DESTDIR=%{buildroot}
|
||||
# Install configuration file
|
||||
install -m 644 %{SOURCE1} "%{buildroot}/%{_sysconfdir}/lvm/"
|
||||
|
||||
#csm-convert
|
||||
pushd bnz
|
||||
install -m755 -D csm-converter "%buildroot/%_sbindir/csm-converter"
|
||||
install -m755 -D csm-converter-helper "%buildroot/%_sbindir/csm-converter-helper"
|
||||
mv README.csm-converter ..
|
||||
popd
|
||||
%endif
|
||||
|
||||
# Make sure libdevmapper.so.1.02 libdevmapper-event.so.1.02 still available
|
||||
# on Tumbleweed, as virtualbox.org didn't update their RPMs yet.
|
||||
rm -f libdm/ioctl/libdevmapper.so daemons/dmeventd/libdevmapper-event.so
|
||||
sed -i "s/1.03.01/%{device_mapper_version}/" VERSION_DM
|
||||
make device-mapper
|
||||
make install_device-mapper DESTDIR=%{buildroot}
|
||||
|
||||
pushd "%buildroot/%_lib"
|
||||
pushd "%{buildroot}/%{_libdir}"
|
||||
ln -sf liblvm2cmd.so.2.02 liblvm2cmd.so
|
||||
ln -sf liblvm2app.so.2.2 liblvm2app.so
|
||||
for i in libdevmapper-event-lvm2{mirror,raid,snapshot,thin}; do
|
||||
@ -254,9 +207,29 @@ for i in libdevmapper-event-lvm2{mirror,raid,snapshot,thin}; do
|
||||
done
|
||||
popd
|
||||
|
||||
pushd "%buildroot/%_sbindir"
|
||||
ln -sf ../../sbin/lvm lvm
|
||||
popd
|
||||
#rc compat symlinks
|
||||
ln -s service %{buildroot}%{_sbindir}/rcblk-availability
|
||||
ln -s service %{buildroot}%{_sbindir}/rclvm2-lvmetad
|
||||
ln -s service %{buildroot}%{_sbindir}/rclvm2-monitor
|
||||
|
||||
# Remove devicemapper binaries, plain rm so we fail if something change
|
||||
rm %{buildroot}%{_sbindir}/dmsetup
|
||||
rm %{buildroot}%{_sbindir}/dmeventd
|
||||
rm %{buildroot}%{_sbindir}/dmstats
|
||||
rm %{buildroot}%{_mandir}/man8/dmstats.8
|
||||
rm %{buildroot}%{_mandir}/man8/dmsetup.8
|
||||
rm %{buildroot}%{_mandir}/man8/dmeventd.8
|
||||
rm %{buildroot}%{_udevrulesdir}/10-dm.rules
|
||||
rm %{buildroot}%{_udevrulesdir}/13-dm-disk.rules
|
||||
rm %{buildroot}%{_udevrulesdir}/95-dm-notify.rules
|
||||
rm %{buildroot}%{_unitdir}/dm-event.socket
|
||||
rm %{buildroot}%{_unitdir}/dm-event.service
|
||||
rm %{buildroot}%{_libdir}/libdevmapper.so.1.03
|
||||
rm %{buildroot}%{_libdir}/libdevmapper-event.so.1.03
|
||||
rm %{buildroot}%{_libdir}/libdevmapper.so
|
||||
rm %{buildroot}%{_libdir}/libdevmapper-event.so
|
||||
rm %{buildroot}%{_includedir}/libdevmapper*.h
|
||||
rm %{buildroot}%{_libdir}/pkgconfig/devmapper*.pc
|
||||
|
||||
%pre
|
||||
%service_add_pre blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service
|
||||
@ -265,6 +238,9 @@ popd
|
||||
/sbin/ldconfig
|
||||
%{?regenerate_initrd_post}
|
||||
%service_add_post blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service
|
||||
# Use %%tmpfiles_create when 13.2 is oldest in support scope
|
||||
/usr/bin/systemd-tmpfiles --create %{_tmpfilesdir}/lvm2.conf || :
|
||||
%{?regenerate_initrd_post}
|
||||
|
||||
%posttrans
|
||||
%{?regenerate_initrd_posttrans}
|
||||
@ -277,20 +253,28 @@ popd
|
||||
%{?regenerate_initrd_post}
|
||||
%service_del_postun blk-availability.service lvm2-monitor.service lvm2-lvmetad.service
|
||||
|
||||
%post -n %{applib} -p /sbin/ldconfig
|
||||
%postun -n %{applib} -p /sbin/ldconfig
|
||||
%post -n %{cmdlib} -p /sbin/ldconfig
|
||||
%postun -n %{cmdlib} -p /sbin/ldconfig
|
||||
|
||||
%files -n %{applib}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/liblvm2app.so.*
|
||||
|
||||
%files -n %{cmdlib}
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/liblvm2cmd.so.*
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README WHATS_NEW doc/*
|
||||
%dir %{_sysconfdir}/lvm
|
||||
%dir %{_sysconfdir}/lvm/backup
|
||||
%dir %{_sysconfdir}/lvm/archive
|
||||
%dir %{_sysconfdir}/lvm/metadata
|
||||
%dir %{_sysconfdir}/lvm/profile
|
||||
%dir %{_sysconfdir}/lvm/cache
|
||||
%dir /usr/lib/systemd/system-generators
|
||||
%dir /usr/lib/tmpfiles.d
|
||||
%dir %{_sysconfdir}/lvm/profile
|
||||
%ghost %{_sysconfdir}/lvm/cache/.cache
|
||||
%{_sysconfdir}/lvm/profile/*.profile
|
||||
%{_sysconfdir}/lvm/lvmlocal.conf
|
||||
%config %{_sysconfdir}/lvm/profile/*.profile
|
||||
%config %{_sysconfdir}/lvm/lvmlocal.conf
|
||||
%{_udevdir}/rules.d/11-dm-lvm.rules
|
||||
%{_udevdir}/rules.d/69-dm-lvm-metad.rules
|
||||
%{_unitdir}/blk-availability.service
|
||||
@ -298,218 +282,38 @@ popd
|
||||
%{_unitdir}/lvm2-lvmetad.socket
|
||||
%{_unitdir}/lvm2-lvmetad.service
|
||||
%{_unitdir}/lvm2-pvscan@.service
|
||||
%{_libexecdir}/systemd/system-generators/lvm2-activation-generator
|
||||
%{_tmpfilesdir}/lvm2.conf
|
||||
%config(noreplace) %{_sysconfdir}/lvm/lvm.conf
|
||||
/usr/lib/systemd/system-generators/lvm2-activation-generator
|
||||
/sbin/blkdeactivate
|
||||
/sbin/fsadm
|
||||
/sbin/lv*
|
||||
/sbin/pv*
|
||||
/sbin/vg*
|
||||
%_sbindir/lvm
|
||||
%dir /%_lib/device-mapper
|
||||
/%_lib/device-mapper/libdevmapper-event-lvm2*.so
|
||||
/%_lib/libdevmapper-event-lvm2*.so
|
||||
/%_lib/liblvm2cmd.so
|
||||
/%_lib/liblvm2cmd.so.2.02
|
||||
/%_lib/liblvm2app.so
|
||||
/%_lib/liblvm2app.so.2.2
|
||||
/%_libdir/liblvm2app.so
|
||||
/%_libdir/liblvm2cmd.so
|
||||
/%_lib/libdevmapper-event-lvm2*.so.2.02
|
||||
/%_libdir/libdevmapper-event-lvm2.so
|
||||
%_mandir/man5/lvm.conf.5.gz
|
||||
%_mandir/man8/blkdeactivate.8.gz
|
||||
%_mandir/man8/fsadm.8.gz
|
||||
%_mandir/man8/lv*.8*
|
||||
%_mandir/man8/pv*.8*
|
||||
%_mandir/man8/vg*.8*
|
||||
%_mandir/man7/lvm*.7*
|
||||
|
||||
%if %{with clvm}
|
||||
%package clvm
|
||||
Url: http://sources.redhat.com/cluster/clvm/
|
||||
Version: %{lvm2_version}
|
||||
Release: 0
|
||||
BuildRequires: libcorosync-devel
|
||||
BuildRequires: libdlm-devel
|
||||
Requires: corosync
|
||||
Requires: device-mapper >= 1.02.25
|
||||
Requires: lvm2 = %{version}
|
||||
Requires: lvm2-cmirrord
|
||||
Obsoletes: cmirrord < %{version}
|
||||
Provides: cmirrord = %{version}
|
||||
Summary: Clustered LVM2
|
||||
Group: Productivity/Clustering/HA
|
||||
|
||||
%description clvm
|
||||
A daemon for using LVM2 Logival Volumes in a clustered environment.
|
||||
|
||||
%pre clvm
|
||||
%service_add_pre lvm2-cluster-activation.service lvm2-clvmd.service
|
||||
|
||||
%post clvm
|
||||
%service_add_post lvm2-cluster-activation.service lvm2-clvmd.service
|
||||
|
||||
%preun clvm
|
||||
%service_del_preun lvm2-cluster-activation.service lvm2-clvmd.service
|
||||
|
||||
%postun clvm
|
||||
%service_del_postun lvm2-cluster-activation.service lvm2-clvmd.service
|
||||
|
||||
%files clvm
|
||||
%defattr(-,root,root)
|
||||
%{_sbindir}/clvmd
|
||||
%dir /usr/lib/ocf
|
||||
%dir /usr/lib/ocf/resource.d
|
||||
%dir /usr/lib/ocf/resource.d/lvm2
|
||||
/usr/lib/ocf/resource.d/lvm2/clvmd
|
||||
%{_mandir}/man8/clvmd.8.gz
|
||||
%doc README.csm-converter
|
||||
%{_sbindir}/csm-converter
|
||||
%{_sbindir}/csm-converter-helper
|
||||
%{_unitdir}/lvm2-clvmd.service
|
||||
%{_unitdir}/lvm2-cluster-activation.service
|
||||
/usr/lib/systemd/lvm2-cluster-activation
|
||||
|
||||
%package cmirrord
|
||||
Url: http://www.sourceware.org/lvm2/
|
||||
Version: %{lvm2_version}
|
||||
Release: 0
|
||||
Requires: corosync
|
||||
Requires: device-mapper >= 1.02.25
|
||||
Requires: lvm2 = %{version}
|
||||
Requires: lvm2-clvm
|
||||
Summary: Clustered RAID 1 support using device-mapper and corosync
|
||||
Group: Productivity/Clustering/HA
|
||||
|
||||
%description cmirrord
|
||||
A daemon for using LVM2 Logival Volumes in a clustered environment.
|
||||
|
||||
%pre cmirrord
|
||||
%service_add_pre lvm2-cmirrord.service lvm2-cluster-activation.service
|
||||
|
||||
%post cmirrord
|
||||
%service_add_post lvm2-cmirrord.service lvm2-cluster-activation.service
|
||||
|
||||
%preun cmirrord
|
||||
%service_del_preun lvm2-cmirrord.service lvm2-cluster-activation.service
|
||||
|
||||
%postun cmirrord
|
||||
%service_del_postun lvm2-cmirrord.service lvm2-cluster-activation.service
|
||||
|
||||
%files cmirrord
|
||||
%defattr(-,root,root)
|
||||
%{_sbindir}/cmirrord
|
||||
/usr/lib/ocf/resource.d/lvm2/cmirrord
|
||||
%{_mandir}/man8/cmirrord.8.gz
|
||||
/usr/lib/systemd/system/lvm2-cmirrord.service
|
||||
%endif
|
||||
|
||||
%package devel
|
||||
Version: %{lvm2_version}
|
||||
Release: 0
|
||||
Requires: lvm2 = %{version}
|
||||
Summary: Development files for LVM2
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
%description devel
|
||||
This package provides development files for the LVM2 Logical Volume Manager.
|
||||
|
||||
%{_sbindir}/blkdeactivate
|
||||
%{_sbindir}/fsadm
|
||||
%{_sbindir}/lv*
|
||||
%{_sbindir}/pv*
|
||||
%{_sbindir}/vg*
|
||||
%{_sbindir}/rcblk-availability
|
||||
%{_sbindir}/rclvm2-lvmetad
|
||||
%{_sbindir}/rclvm2-monitor
|
||||
%dir %{_libdir}/device-mapper
|
||||
%{_libdir}/device-mapper/libdevmapper-event-lvm2*.so
|
||||
%{_libdir}/libdevmapper-event-lvm2*.so
|
||||
%{_libdir}/libdevmapper-event-lvm2*.so.2.02
|
||||
%{_libdir}/libdevmapper-event-lvm2.so
|
||||
%{_mandir}/man5/lvm.conf.5.*
|
||||
%{_mandir}/man8/blkdeactivate.8.*
|
||||
%{_mandir}/man8/fsadm.8.gz
|
||||
%{_mandir}/man8/lv*.8*
|
||||
%{_mandir}/man8/pv*.8*
|
||||
%{_mandir}/man8/vg*.8*
|
||||
%{_mandir}/man7/lvm*.7*
|
||||
%ghost %dir /run/lock/lvm
|
||||
%ghost %dir /run/lvm
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%_includedir/lvm2cmd.h
|
||||
%_includedir/lvm2app.h
|
||||
%_libdir/pkgconfig/lvm2app.pc
|
||||
|
||||
##########################################
|
||||
# Subpackage: device-mapper
|
||||
##########################################
|
||||
%package -n device-mapper
|
||||
|
||||
%ifarch ppc64
|
||||
Obsoletes: device-mapper-64bit
|
||||
%endif
|
||||
Version: %{device_mapper_version}
|
||||
Release: 0
|
||||
Summary: Device Mapper Tools
|
||||
Group: System/Base
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: libexpat-devel
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: libsepol-devel
|
||||
BuildRequires: libstdc++-devel
|
||||
BuildRequires: suse-module-tools
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: pkgconfig(libudev)
|
||||
Requires: expat
|
||||
Requires: thin-provisioning-tools >= 0.5.6
|
||||
Requires(post): coreutils
|
||||
Requires(postun): coreutils
|
||||
PreReq: %insserv_prereq %fillup_prereq
|
||||
|
||||
%description -n device-mapper
|
||||
Programs, libraries, and man pages for configuring and using the device
|
||||
mapper.
|
||||
|
||||
%post -n device-mapper
|
||||
%service_add_post dm-event.service dm-event.socket
|
||||
/sbin/ldconfig
|
||||
%{?regenerate_initrd_post}
|
||||
|
||||
%posttrans -n device-mapper
|
||||
%{?regenerate_initrd_posttrans}
|
||||
|
||||
%pre -n device-mapper
|
||||
%service_add_pre dm-event.service dm-event.socket
|
||||
|
||||
%preun -n device-mapper
|
||||
%service_del_preun dm-event.service dm-event.socket
|
||||
|
||||
%postun -n device-mapper
|
||||
%service_del_postun dm-event.service dm-event.socket
|
||||
%{?regenerate_initrd_post}
|
||||
/sbin/ldconfig
|
||||
|
||||
%files -n device-mapper
|
||||
%defattr(-,root,root)
|
||||
%doc INSTALL COPYING COPYING.LIB README
|
||||
%doc udev/12-dm-permissions.rules
|
||||
/%_lib/libdevmapper.so.1.03
|
||||
/%_lib/libdevmapper-event.so.1.03
|
||||
/%_lib/libdevmapper.so.1.02
|
||||
/%_lib/libdevmapper-event.so.1.02
|
||||
/sbin/dmsetup
|
||||
/sbin/dmeventd
|
||||
/sbin/dmstats
|
||||
%_mandir/man8/dmstats.8.*
|
||||
%_mandir/man8/dmsetup.8.gz
|
||||
%_mandir/man8/dmeventd.8.gz
|
||||
%_udevrulesdir/10-dm.rules
|
||||
%_udevrulesdir/13-dm-disk.rules
|
||||
%_udevrulesdir/95-dm-notify.rules
|
||||
%_unitdir/dm-event.socket
|
||||
%_unitdir/dm-event.service
|
||||
|
||||
%package -n device-mapper-devel
|
||||
Summary: Development package for the device mapper
|
||||
Group: Development/Libraries/C and C++
|
||||
Version: %{device_mapper_version}
|
||||
Release: 0
|
||||
Requires: device-mapper = %{device_mapper_version}
|
||||
|
||||
%description -n device-mapper-devel
|
||||
Files needed for software development using the device mapper
|
||||
|
||||
%files -n device-mapper-devel
|
||||
%defattr(-,root,root)
|
||||
%_libdir/libdevmapper.so
|
||||
%_libdir/libdevmapper-event.so
|
||||
%_libdir/libdevmapper.a
|
||||
%_includedir/libdevmapper*.h
|
||||
%_libdir/pkgconfig/devmapper*.pc
|
||||
%{_includedir}/lvm2cmd.h
|
||||
%{_includedir}/lvm2app.h
|
||||
%{_libdir}/pkgconfig/lvm2app.pc
|
||||
%{_libdir}/liblvm2app.so
|
||||
%{_libdir}/liblvm2cmd.so
|
||||
|
||||
%changelog
|
||||
|
22
pre_checkin.sh
Normal file
22
pre_checkin.sh
Normal file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
master="lvm2.spec"
|
||||
sections="COMMON-DEF COMMON-PATCH COMMON-PREP COMMON-CONFIG"
|
||||
for slave in device-mapper.spec lvm2-clvm.spec; do
|
||||
{
|
||||
prev=1
|
||||
for section in $sections; do
|
||||
begin="/$section-BEGIN/"
|
||||
end="/$section-END/"
|
||||
sed -n -e "${prev},${begin}p" $slave
|
||||
sed -n -e "${begin},${end}p" $master | head -n -1 | tail -n +2
|
||||
prev=$end
|
||||
done
|
||||
sed -n -e "${prev},\$p" $slave
|
||||
} > $slave.tmp && mv $slave.tmp $slave
|
||||
done
|
||||
|
||||
# changelogs
|
||||
|
||||
cp lvm2.changes lvm2-clvm.changes
|
||||
cp lvm2.changes device-mapper.changes
|
@ -18,22 +18,10 @@ Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||
udev/69-dm-lvm-metad.rules.in | 1 +
|
||||
3 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: LVM2.2.02.111/udev/10-dm.rules.in
|
||||
Index: LVM2.2.02.152/udev/13-dm-disk.rules.in
|
||||
===================================================================
|
||||
--- LVM2.2.02.111.orig/udev/10-dm.rules.in
|
||||
+++ LVM2.2.02.111/udev/10-dm.rules.in
|
||||
@@ -126,7 +126,6 @@ ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1",
|
||||
|
||||
# We have to ignore further rule application for inappropriate events
|
||||
# and devices. But still send the notification if cookie exists.
|
||||
-ENV{DM_UUID}=="mpath-?*", ENV{DM_ACTION}=="PATH_FAILED", GOTO="dm_disable"
|
||||
|
||||
# Avoid processing and scanning a DM device in the other (foreign)
|
||||
# rules if it is in suspended state. However, we still keep 'disk'
|
||||
Index: LVM2.2.02.111/udev/13-dm-disk.rules.in
|
||||
===================================================================
|
||||
--- LVM2.2.02.111.orig/udev/13-dm-disk.rules.in
|
||||
+++ LVM2.2.02.111/udev/13-dm-disk.rules.in
|
||||
--- LVM2.2.02.152.orig/udev/13-dm-disk.rules.in
|
||||
+++ LVM2.2.02.152/udev/13-dm-disk.rules.in
|
||||
@@ -18,10 +18,12 @@ SYMLINK+="disk/by-id/dm-name-$env{DM_NAM
|
||||
ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}", OPTIONS+="string_escape=replace"
|
||||
|
||||
@ -47,10 +35,10 @@ Index: LVM2.2.02.111/udev/13-dm-disk.rules.in
|
||||
ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100"
|
||||
OPTIONS+="watch"
|
||||
ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90"
|
||||
Index: LVM2.2.02.111/udev/69-dm-lvm-metad.rules.in
|
||||
Index: LVM2.2.02.152/udev/69-dm-lvm-metad.rules.in
|
||||
===================================================================
|
||||
--- LVM2.2.02.111.orig/udev/69-dm-lvm-metad.rules.in
|
||||
+++ LVM2.2.02.111/udev/69-dm-lvm-metad.rules.in
|
||||
--- LVM2.2.02.152.orig/udev/69-dm-lvm-metad.rules.in
|
||||
+++ LVM2.2.02.152/udev/69-dm-lvm-metad.rules.in
|
||||
@@ -47,6 +47,7 @@ ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="dis
|
||||
|
||||
# DM device:
|
||||
|
@ -2,10 +2,10 @@
|
||||
tools/lvcreate.c | 28 ++++++++++++++++++++++++++--
|
||||
1 file changed, 26 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: LVM2.2.02.139/tools/lvcreate.c
|
||||
Index: LVM2.2.02.152/tools/lvcreate.c
|
||||
===================================================================
|
||||
--- LVM2.2.02.139.orig/tools/lvcreate.c
|
||||
+++ LVM2.2.02.139/tools/lvcreate.c
|
||||
--- LVM2.2.02.152.orig/tools/lvcreate.c
|
||||
+++ LVM2.2.02.152/tools/lvcreate.c
|
||||
@@ -639,6 +639,28 @@ static int _read_activation_params(struc
|
||||
return 1;
|
||||
}
|
||||
@ -15,7 +15,7 @@ Index: LVM2.2.02.139/tools/lvcreate.c
|
||||
+ int fd;
|
||||
+ struct flock lock;
|
||||
+
|
||||
+ if((fd = open(CLVMD_PIDFILE, O_RDONLY)) < 0)
|
||||
+ if((fd = open("/var/run/cmirrord.pid", O_RDONLY)) < 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ lock.l_type = F_WRLCK;
|
||||
|
Loading…
Reference in New Issue
Block a user