SHA256
1
0
forked from pool/lvm2

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:
LiuhuaMelody Wang 2016-05-11 03:42:15 +00:00 committed by Git OBS Bridge
parent 275286d1aa
commit 8ac4ae703b
21 changed files with 4194 additions and 505 deletions

View File

@ -1,12 +1,12 @@
References: bsc#932300 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.152.orig/udev/10-dm.rules.in
+++ LVM2.2.02.120/udev/10-dm.rules.in +++ LVM2.2.02.152/udev/10-dm.rules.in
@@ -127,6 +127,11 @@ ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", @@ -138,6 +138,11 @@ ENV{DM_UDEV_RULES_VSN}="2"
# We have to ignore further rule application for inappropriate events
# and devices. But still send the notification if cookie exists. ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", ENV{DM_NAME}=="?*", SYMLINK+="(DM_DIR)/$env{DM_NAME}"
+# Reset variables for spurious events +# Reset variables for spurious events
+ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}="" +ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=""

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6299e0905dd60755c5e11c80145fe29dad2c01d51b25136f8e4015cb63b388f5
size 1902386

View File

@ -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
View 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
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlcj+EIACgkQIoGRwVZ+LBeYrACg7dMTMM+3IO9hW9a9Aj4EObtb
MKoAnjnQ4654ujnNbrwFWF3QaFhIkIXn
=qaPB
-----END PGP SIGNATURE-----

View File

@ -1,2 +1,3 @@
device-mapper libdevmapper1_03
libdevmapper-event1_03
device-mapper-devel device-mapper-devel

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e7e73182cf83099516cdf225748ac297c7368e651e232c4f23dd1fab33d1c3f6
size 5604

View File

@ -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.152.orig/libdm/datastruct/hash.c
+++ LVM2.2.02.139/libdm/datastruct/hash.c +++ LVM2.2.02.152/libdm/datastruct/hash.c
@@ -20,7 +20,7 @@ struct dm_hash_node { @@ -20,7 +20,7 @@ struct dm_hash_node {
void *data; void *data;
unsigned data_len; 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)), 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.152.orig/libdm/ioctl/libdm-iface.c
+++ LVM2.2.02.139/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 @@ -1834,7 +1834,7 @@ static struct dm_ioctl *_do_dm_ioctl(str
dmt->secure_data ? "W " : "", dmt->secure_data ? "securedata " : "",
dmt->query_inactive_table ? "I " : "", dmt->query_inactive_table ? "inactive " : "",
dmt->enable_checks ? "C" : "", dmt->enable_checks ? "enablechecks " : "",
- dmt->sector, _sanitise_message(dmt->message), - dmt->sector, _sanitise_message(dmt->message),
+ (unsigned long long int)dmt->sector, _sanitise_message(dmt->message), + (unsigned long long int)dmt->sector, _sanitise_message(dmt->message),
dmi->data_size, retry_repeat_count); dmi->data_size, retry_repeat_count);

View File

@ -8,11 +8,13 @@ Signed-off-by: NeilBrown <neilb@suse.de>
udev/10-dm.rules.in | 2 +- udev/10-dm.rules.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
--- LVM2.2.02.84.orig/udev/10-dm.rules.in Index: LVM2.2.02.152/udev/10-dm.rules.in
+++ LVM2.2.02.84/udev/10-dm.rules.in ===================================================================
@@ -14,7 +14,7 @@ --- LVM2.2.02.152.orig/udev/10-dm.rules.in
# DM_SUSPENDED - suspended state of DM device (0 or 1) +++ LVM2.2.02.152/udev/10-dm.rules.in
# DM_UDEV_RULES_VSN - DM udev rules version @@ -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"
+KERNEL=="device-mapper", NAME="(DM_DIR)/control", SYMLINK+="device-mapper" +KERNEL=="device-mapper", NAME="(DM_DIR)/control", SYMLINK+="device-mapper"

View File

@ -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

File diff suppressed because it is too large Load Diff

251
device-mapper.spec Normal file
View 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

View File

@ -21,10 +21,10 @@ Lidong
scripts/fsadm.sh | 104 ++++++++++++++++++++++++++++++++++++++++++++++--------- scripts/fsadm.sh | 104 ++++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 88 insertions(+), 16 deletions(-) 1 file changed, 88 insertions(+), 16 deletions(-)
diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh Index: LVM2.2.02.152/scripts/fsadm.sh
index f4ea796..765f9dc 100755 ===================================================================
--- a/scripts/fsadm.sh --- LVM2.2.02.152.orig/scripts/fsadm.sh
+++ b/scripts/fsadm.sh +++ LVM2.2.02.152/scripts/fsadm.sh
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
# ext2/ext3/ext4: resize2fs, tune2fs # ext2/ext3/ext4: resize2fs, tune2fs
# reiserfs: resize_reiserfs, reiserfstune # reiserfs: resize_reiserfs, reiserfstune
@ -49,9 +49,9 @@ index f4ea796..765f9dc 100755
+UUID= +UUID=
+BTRFS_DEVID= +BTRFS_DEVID=
PROCMOUNTS="/proc/mounts" PROCMOUNTS="/proc/mounts"
PROCSELFMOUNTINFO="/proc/self/mountinfo"
NULL="$DM_DEV_DIR/null" NULL="$DM_DEV_DIR/null"
@@ -148,7 +153,7 @@ cleanup() {
@@ -147,7 +152,7 @@ cleanup() {
export _FSADM_YES _FSADM_EXTOFF export _FSADM_YES _FSADM_EXTOFF
unset FSADM_RUNNING unset FSADM_RUNNING
test -n "$LVM_BINARY" && PATH=$_SAVEPATH test -n "$LVM_BINARY" && PATH=$_SAVEPATH
@ -60,7 +60,7 @@ index f4ea796..765f9dc 100755
fi fi
# error exit status for break # error exit status for break
@@ -198,27 +203,62 @@ detect_fs() { @@ -207,6 +212,34 @@ detect_fs() {
verbose "\"$FSTYPE\" filesystem found on \"$VOLUME\"" verbose "\"$FSTYPE\" filesystem found on \"$VOLUME\""
} }
@ -92,52 +92,23 @@ index f4ea796..765f9dc 100755
+ IFS=$STR_IFS + 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 # check if the given device is already mounted and where
# FIXME: resolve swap usage and device stacking # FIXME: resolve swap usage and device stacking
detect_mounted() { detect_mounted() {
- test -e "$PROCMOUNTS" || error "Cannot detect mounted device \"$VOLUME\"" - if test -e "$PROCSELFMOUNTINFO"; then
+ if test "$FSTYPE" = "btrfs" ; then + if test "$FSTYPE" = "btrfs" ; then
+ check_findmnt || error "Need 'findmnt' utility to work with btrfs filesystem" + check_findmnt || error "Need 'findmnt' utility to work with btrfs filesystem"
+ detect_fs_uuid || verbose "Can't get fs UUID from \"$VOLUME\" volume" + detect_fs_uuid || verbose "Can't get fs UUID from \"$VOLUME\" volume"
+ detect_mounted_findmnt + detect_mounted_findmnt
+ + elif test -e "$PROCSELFMOUNTINFO"; then
+ else detect_mounted_with_proc_self_mountinfo
+ test -e "$PROCMOUNTS" || error "Cannot detect mounted device \"$VOLUME\"" elif test -e "$PROCMOUNTS"; then
detect_mounted_with_proc_mounts
- MOUNTED=$("$GREP" "^$VOLUME[ \t]" "$PROCMOUNTS") @@ -396,6 +433,31 @@ resize_xfs() {
+ 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() {
fi fi
} }
@ -169,7 +140,7 @@ index f4ea796..765f9dc 100755
#################### ####################
# Resize filesystem # Resize filesystem
#################### ####################
@@ -384,6 +449,7 @@ resize() { @@ -412,6 +474,7 @@ resize() {
"ext3"|"ext2"|"ext4") resize_ext $NEWSIZE ;; "ext3"|"ext2"|"ext4") resize_ext $NEWSIZE ;;
"reiserfs") resize_reiser $NEWSIZE ;; "reiserfs") resize_reiser $NEWSIZE ;;
"xfs") resize_xfs $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" ;; *) error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool" ;;
esac || error "Resize $FSTYPE failed" esac || error "Resize $FSTYPE failed"
cleanup 0 cleanup 0
@@ -441,6 +507,12 @@ check() { @@ -469,6 +532,12 @@ check() {
# Think about better way.... # Think about better way....
dry "$XFS_REPAIR" -n -o force_geometry "$VOLUME" dry "$XFS_REPAIR" -n -o force_geometry "$VOLUME"
fi ;; fi ;;
@ -190,7 +161,7 @@ index f4ea796..765f9dc 100755
*) # check if executed from interactive shell environment *) # check if executed from interactive shell environment
case "$-" in case "$-" in
*i*) dry "$FSCK" $YES $FORCE "$VOLUME" ;; *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" \ for i in "$TUNE_EXT" "$RESIZE_EXT" "$TUNE_REISER" "$RESIZE_REISER" \
"$TUNE_XFS" "$RESIZE_XFS" "$MOUNT" "$UMOUNT" "$MKDIR" \ "$TUNE_XFS" "$RESIZE_XFS" "$MOUNT" "$UMOUNT" "$MKDIR" \
"$RMDIR" "$BLOCKDEV" "$BLKID" "$GREP" "$READLINK" \ "$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!" test -n "$i" || error "Required command definitions in the script are missing!"
done done
--
1.8.1.4

1669
lvm2-clvm.changes Normal file

File diff suppressed because it is too large Load Diff

236
lvm2-clvm.spec Normal file
View 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

View File

@ -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 Mon Mar 7 01:53:34 UTC 2016 - lwang@suse.com

508
lvm2.spec
View File

@ -1,7 +1,7 @@
# #
# spec file for package lvm2 # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,11 +16,13 @@
# #
%define lvm2_version 2.02.141 ### COMMON-DEF-BEGIN ###
%define device_mapper_version 1.02.115 %define lvm2_version 2.02.152
%define device_mapper_version 1.02.124
%bcond_without clvm ### COMMON-DEF-END ###
%define _udevdir %(pkg-config --variable=udevdir udev)
%define applib liblvm2app2_2
%define cmdlib liblvm2cmd2_02
Name: lvm2 Name: lvm2
Version: %{lvm2_version} Version: %{lvm2_version}
Release: 0 Release: 0
@ -28,104 +30,100 @@ Summary: Logical Volume Manager Tools
License: GPL-2.0 and LGPL-2.1 License: GPL-2.0 and LGPL-2.1
Group: System/Base Group: System/Base
Url: http://www.sourceware.org/lvm2/ Url: http://www.sourceware.org/lvm2/
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
Source: ftp://sources.redhat.com/pub/%{name}/LVM2.%{version}.tgz
Source42: ftp://sources.redhat.com/pub/%{name}/LVM2.%{version}.tgz.asc
Source1: lvm.conf Source1: lvm.conf
Source8: clvmd.ocf Source42: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz.asc
Source10: cmirrord.ocf ### COMMON-PATCH-BEGIN ###
Source14: baselibs.conf
Source16: csm-converter.tar.gz
# Upstream patches first # Upstream patches first
# SUSE patches 1000- for LVM, 2000- for device mapper
Patch1001: improve_probing.diff Patch1001: improve_probing.diff
Patch1002: no-inc-audit.diff Patch1002: no-inc-audit.diff
Patch1004: sys_mount_instead_linux_fs.diff Patch1004: sys_mount_instead_linux_fs.diff
#suse #suse
Patch1005: display-dm-name-for-lv-name.diff Patch1005: display-dm-name-for-lv-name.diff
Patch1006: device-mapper-type_punning.diff Patch1006: device-mapper-type_punning.diff
#fate312248, patch6,7 #fate312248, patch6,7
Patch1007: make-mirror-legs-on-different-tag-pvs.patch Patch1007: make-mirror-legs-on-different-tag-pvs.patch
Patch1008: improve-mirror-legs-on-different-tag-pvs.patch Patch1008: improve-mirror-legs-on-different-tag-pvs.patch
#fate#315092 #fate#315092
Patch1009: cmirrord_improvment_performance.patch Patch1009: cmirrord_improvment_performance.patch
#fate#314367, patch10,11 #fate#314367, patch10,11
Patch1010: cluster_support_mirrord_log.diff Patch1010: cluster_support_mirrord_log.diff
Patch1011: lvconvert-cluster-mirrored-disk-failed.patch Patch1011: lvconvert-cluster-mirrored-disk-failed.patch
#forward-port from sle11 #forward-port from sle11
Patch1012: suppress_format1_size_warning.diff Patch1012: suppress_format1_size_warning.diff
Patch1013: pvmove_support_clustered_vg.diff Patch1013: pvmove_support_clustered_vg.diff
# Never upstream # Never upstream
Patch1014: cmirrord_remove_date_time_from_compilation.patch Patch1014: cmirrord_remove_date_time_from_compilation.patch
#suse, bnc873538 #suse, bnc873538
Patch1015: fix-closedown-before-thread-finish.patch Patch1015: fix-closedown-before-thread-finish.patch
#suse, bnc#870824 #suse, bnc#870824
Patch1016: use-mirrortype-asdefault-whenclvmdrunning.patch Patch1016: use-mirrortype-asdefault-whenclvmdrunning.patch
Patch1017: version-plugins-in-libdir.patch
Patch1017: version-plugins-in-libdir
Patch1018: dmeventd-fix-dso-name-wrong-compare.patch Patch1018: dmeventd-fix-dso-name-wrong-compare.patch
Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
# device-mapper patches
#suse, bnc#707253(also merged patch for bnc#479104) #suse, bnc#707253(also merged patch for bnc#479104)
Patch2000: device-mapper-dmsetup-export.patch Patch2000: device-mapper-dmsetup-export.patch
Patch2001: device-mapper-gcc-warnings.patch Patch2001: device-mapper-gcc-warnings.patch
Patch2002: device-mapper-static.patch Patch2002: device-mapper-link.patch
Patch2003: device-mapper-link
#suse, bnc#78902,bnc#789019,bnc#789020 #suse, bnc#78902,bnc#789019,bnc#789020
Patch2004: udev_rules-update.diff Patch2003: udev_rules-update.diff
#suse, bnc#875233 #suse, bnc#875233
Patch2005: udev-Check-for-DM_NR_VALID_PATHS.patch Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch
Patch2007: fsadm-add-support-for-btrfs.patch Patch2005: fsadm-add-support-for-btrfs.patch
Patch2008: Import-ID_FS_XXX-variables-bnc909358.patch Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch
Patch2009: 10-dm.rules-Reset-state-variable-for-spurious-events.patch Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
Patch2010: libdm-iface-not-output-error-message-inside-retry-loop.patch Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch
### COMMON-PATCH-END ###
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libaio-devel BuildRequires: libaio-devel
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: pkg-config
BuildRequires: pkgconfig
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: suse-module-tools BuildRequires: systemd
BuildRequires: systemd-rpm-macros BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(udev) BuildRequires: pkgconfig(udev)
Requires: device-mapper >= 1.02.90 Requires: device-mapper >= %{device_mapper_version}
Requires(post): coreutils Requires(post): coreutils
Requires(postun): coreutils Requires(postun): coreutils
Provides: lvm = %version-%release Provides: lvm = %{version}
# Not a real replacement but we drop evms BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: evms = 2.5.5 %{?systemd_requires}
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
%description %description
Programs and man pages for configuring and using the LVM2 Logical Programs and man pages for configuring and using the LVM2 Logical
Volume Manager. 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 %prep
%setup -q -n LVM2.%{version} -a 16 %setup -q -n LVM2.%{version}
### COMMON-PREP-BEGIN ###
%patch1001 -p1 %patch1001 -p1
%patch1002 -p1 %patch1002 -p1
%patch1004 -p1 %patch1004 -p1
@ -140,9 +138,7 @@ Volume Manager.
%patch1013 -p1 %patch1013 -p1
%patch1014 -p1 %patch1014 -p1
%patch1015 -p1 %patch1015 -p1
%if %{with clvm}
%patch1016 -p1 %patch1016 -p1
%endif
%patch1017 -p1 %patch1017 -p1
%patch1018 -p1 %patch1018 -p1
%patch1019 -p1 %patch1019 -p1
@ -153,99 +149,56 @@ Volume Manager.
%patch2003 -p1 %patch2003 -p1
%patch2004 -p1 %patch2004 -p1
%patch2005 -p1 %patch2005 -p1
%patch2006 -p1
%patch2007 -p1 %patch2007 -p1
%patch2008 -p1 %patch2008 -p1
%patch2009 -p1 ### COMMON-PREP-END ###
%patch2010 -p1
%build %build
#set path so that thin_check can be found extra_opts="
#export before configure due to bnc#779965 --enable-cmdlib
export MODPROBE_CMD=/sbin/modprobe --enable-applib
export CFLAGS="$RPM_OPT_FLAGS" --enable-realtime
export PATH=$PATH:/sbin:/usr/sbin --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 sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
autoreconf -fvi
%configure \ %configure \
--prefix=/ \ --enable-dmeventd --enable-cmdlib \
--bindir=/bin \ --enable-udev_rules --enable-udev_sync \
--libdir=/%_lib \ --with-udev-prefix="%{_prefix}/" \
--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-selinux \ --enable-selinux \
%if %{with clvm} --enable-pkgconfig \
--with-clvmd=corosync \ --with-usrlibdir=%{_libdir} \
--with-cluster=internal \ --with-usrsbindir=%{_sbindir} \
--enable-cmirrord \
%endif
--datarootdir="%_datadir" \
--enable-lvmetad \
--with-default-locking-dir=/run/lock/lvm \
--with-default-pid-dir=/run \
--with-default-dm-run-dir=/run \ --with-default-dm-run-dir=/run \
--with-default-run-dir=/run/lvm \
--with-tmpfilesdir=%{_tmpfilesdir} \ --with-tmpfilesdir=%{_tmpfilesdir} \
--with-thin=internal \ --with-thin=internal \
--with-device-gid=6 \ --with-device-gid=6 \
--with-device-mode=0640 \ --with-device-mode=0640 \
--with-device-uid=0 \ --with-device-uid=0 \
--with-dmeventd-path=/sbin/dmeventd \ --with-dmeventd-path=%{_sbindir}/dmeventd \
--with-thin-check=%{_sbindir}/thin_check \ --with-thin-check=%{_sbindir}/thin_check \
--with-thin-dump=%{_sbindir}/thin_dump \ --with-thin-dump=%{_sbindir}/thin_dump \
--with-thin-repair=%{_sbindir}/thin_repair \ --with-thin-repair=%{_sbindir}/thin_repair \
--with-udev-prefix="%_prefix/" $extra_opts
### COMMON-CONFIG-END ###
export SUSE_ASNEEDED=0
make %{?_smp_mflags} make %{?_smp_mflags}
%if %{with clvm}
#csm convert
pushd bnz
make %{?_smp_mflags}
popd
%endif
%install %install
%make_install %make_install
make install_system_dirs DESTDIR="%buildroot" make install_system_dirs DESTDIR=%{buildroot}
make install_systemd_units DESTDIR="%buildroot" make install_systemd_units DESTDIR=%{buildroot}
make install_systemd_generators DESTDIR="%buildroot" make install_systemd_generators DESTDIR=%{buildroot}
make install_tmpfiles_configuration DESTDIR="%buildroot" make install_tmpfiles_configuration DESTDIR=%{buildroot}
# Is this directory used anymore? # Install configuration file
install -d -m 755 "%buildroot/%_sysconfdir/lvm/metadata" install -m 644 %{SOURCE1} "%{buildroot}/%{_sysconfdir}/lvm/"
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"
#csm-convert pushd "%{buildroot}/%{_libdir}"
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"
ln -sf liblvm2cmd.so.2.02 liblvm2cmd.so ln -sf liblvm2cmd.so.2.02 liblvm2cmd.so
ln -sf liblvm2app.so.2.2 liblvm2app.so ln -sf liblvm2app.so.2.2 liblvm2app.so
for i in libdevmapper-event-lvm2{mirror,raid,snapshot,thin}; do 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 done
popd popd
pushd "%buildroot/%_sbindir" #rc compat symlinks
ln -sf ../../sbin/lvm lvm ln -s service %{buildroot}%{_sbindir}/rcblk-availability
popd 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 %pre
%service_add_pre blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service %service_add_pre blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service
@ -265,6 +238,9 @@ popd
/sbin/ldconfig /sbin/ldconfig
%{?regenerate_initrd_post} %{?regenerate_initrd_post}
%service_add_post blk-availability.service lvm2-monitor.service lvm2-lvmetad.socket lvm2-lvmetad.service %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 %posttrans
%{?regenerate_initrd_posttrans} %{?regenerate_initrd_posttrans}
@ -277,20 +253,28 @@ popd
%{?regenerate_initrd_post} %{?regenerate_initrd_post}
%service_del_postun blk-availability.service lvm2-monitor.service lvm2-lvmetad.service %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 %files
%defattr(-,root,root) %defattr(-,root,root)
%doc README WHATS_NEW doc/* %doc README WHATS_NEW doc/*
%dir %{_sysconfdir}/lvm %dir %{_sysconfdir}/lvm
%dir %{_sysconfdir}/lvm/backup
%dir %{_sysconfdir}/lvm/archive
%dir %{_sysconfdir}/lvm/metadata
%dir %{_sysconfdir}/lvm/profile
%dir %{_sysconfdir}/lvm/cache %dir %{_sysconfdir}/lvm/cache
%dir /usr/lib/systemd/system-generators %dir %{_sysconfdir}/lvm/profile
%dir /usr/lib/tmpfiles.d
%ghost %{_sysconfdir}/lvm/cache/.cache %ghost %{_sysconfdir}/lvm/cache/.cache
%{_sysconfdir}/lvm/profile/*.profile %config %{_sysconfdir}/lvm/profile/*.profile
%{_sysconfdir}/lvm/lvmlocal.conf %config %{_sysconfdir}/lvm/lvmlocal.conf
%{_udevdir}/rules.d/11-dm-lvm.rules %{_udevdir}/rules.d/11-dm-lvm.rules
%{_udevdir}/rules.d/69-dm-lvm-metad.rules %{_udevdir}/rules.d/69-dm-lvm-metad.rules
%{_unitdir}/blk-availability.service %{_unitdir}/blk-availability.service
@ -298,218 +282,38 @@ popd
%{_unitdir}/lvm2-lvmetad.socket %{_unitdir}/lvm2-lvmetad.socket
%{_unitdir}/lvm2-lvmetad.service %{_unitdir}/lvm2-lvmetad.service
%{_unitdir}/lvm2-pvscan@.service %{_unitdir}/lvm2-pvscan@.service
%{_libexecdir}/systemd/system-generators/lvm2-activation-generator
%{_tmpfilesdir}/lvm2.conf %{_tmpfilesdir}/lvm2.conf
%config(noreplace) %{_sysconfdir}/lvm/lvm.conf %config(noreplace) %{_sysconfdir}/lvm/lvm.conf
/usr/lib/systemd/system-generators/lvm2-activation-generator %{_sbindir}/blkdeactivate
/sbin/blkdeactivate %{_sbindir}/fsadm
/sbin/fsadm %{_sbindir}/lv*
/sbin/lv* %{_sbindir}/pv*
/sbin/pv* %{_sbindir}/vg*
/sbin/vg* %{_sbindir}/rcblk-availability
%_sbindir/lvm %{_sbindir}/rclvm2-lvmetad
%dir /%_lib/device-mapper %{_sbindir}/rclvm2-monitor
/%_lib/device-mapper/libdevmapper-event-lvm2*.so %dir %{_libdir}/device-mapper
/%_lib/libdevmapper-event-lvm2*.so %{_libdir}/device-mapper/libdevmapper-event-lvm2*.so
/%_lib/liblvm2cmd.so %{_libdir}/libdevmapper-event-lvm2*.so
/%_lib/liblvm2cmd.so.2.02 %{_libdir}/libdevmapper-event-lvm2*.so.2.02
/%_lib/liblvm2app.so %{_libdir}/libdevmapper-event-lvm2.so
/%_lib/liblvm2app.so.2.2 %{_mandir}/man5/lvm.conf.5.*
/%_libdir/liblvm2app.so %{_mandir}/man8/blkdeactivate.8.*
/%_libdir/liblvm2cmd.so %{_mandir}/man8/fsadm.8.gz
/%_lib/libdevmapper-event-lvm2*.so.2.02 %{_mandir}/man8/lv*.8*
/%_libdir/libdevmapper-event-lvm2.so %{_mandir}/man8/pv*.8*
%_mandir/man5/lvm.conf.5.gz %{_mandir}/man8/vg*.8*
%_mandir/man8/blkdeactivate.8.gz %{_mandir}/man7/lvm*.7*
%_mandir/man8/fsadm.8.gz %ghost %dir /run/lock/lvm
%_mandir/man8/lv*.8* %ghost %dir /run/lvm
%_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.
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%_includedir/lvm2cmd.h %{_includedir}/lvm2cmd.h
%_includedir/lvm2app.h %{_includedir}/lvm2app.h
%_libdir/pkgconfig/lvm2app.pc %{_libdir}/pkgconfig/lvm2app.pc
%{_libdir}/liblvm2app.so
########################################## %{_libdir}/liblvm2cmd.so
# 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
%changelog %changelog

22
pre_checkin.sh Normal file
View 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

View File

@ -18,22 +18,10 @@ Signed-off-by: Hannes Reinecke <hare@suse.de>
udev/69-dm-lvm-metad.rules.in | 1 + udev/69-dm-lvm-metad.rules.in | 1 +
3 files changed, 3 insertions(+), 1 deletion(-) 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.152.orig/udev/13-dm-disk.rules.in
+++ LVM2.2.02.111/udev/10-dm.rules.in +++ LVM2.2.02.152/udev/13-dm-disk.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
@@ -18,10 +18,12 @@ SYMLINK+="disk/by-id/dm-name-$env{DM_NAM @@ -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" 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" ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS+="link_priority=-100"
OPTIONS+="watch" OPTIONS+="watch"
ENV{DM_TARGET_TYPES}=="*snapshot-origin*", OPTIONS+="link_priority=-90" 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.152.orig/udev/69-dm-lvm-metad.rules.in
+++ LVM2.2.02.111/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 @@ -47,6 +47,7 @@ ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="dis
# DM device: # DM device:

View File

@ -2,10 +2,10 @@
tools/lvcreate.c | 28 ++++++++++++++++++++++++++-- tools/lvcreate.c | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-) 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.152.orig/tools/lvcreate.c
+++ LVM2.2.02.139/tools/lvcreate.c +++ LVM2.2.02.152/tools/lvcreate.c
@@ -639,6 +639,28 @@ static int _read_activation_params(struc @@ -639,6 +639,28 @@ static int _read_activation_params(struc
return 1; return 1;
} }
@ -15,7 +15,7 @@ Index: LVM2.2.02.139/tools/lvcreate.c
+ int fd; + int fd;
+ struct flock lock; + struct flock lock;
+ +
+ if((fd = open(CLVMD_PIDFILE, O_RDONLY)) < 0) + if((fd = open("/var/run/cmirrord.pid", O_RDONLY)) < 0)
+ return 0; + return 0;
+ +
+ lock.l_type = F_WRLCK; + lock.l_type = F_WRLCK;