Accepting request 461233 from Base:System

1

OBS-URL: https://build.opensuse.org/request/show/461233
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lvm2?expand=0&rev=100
This commit is contained in:
Dominique Leuenberger 2017-03-03 16:33:25 +00:00 committed by Git OBS Bridge
commit f2b0336dc8
6 changed files with 450 additions and 184 deletions

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Fri Feb 24 10:57:16 UTC 2017 - zren@suse.com
- Improve the layout and readability of spec files
* Place subpackages' sections at the bottom of spec file, making
the layout more reasonable: 1. main package's spec sections are
contiguous without a break; 2. subpackage's spec spections can
also be placed together.
* Get rid of wild-card usage in %files section; spec file is a
perfect place for packager to know what files are exactly delivered
with each RPMs; staring at wild-card doesn't give much information.
* Put bsc#xxx at previous line of each SUSE patch at my best, some
are still missing.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 23 06:27:55 UTC 2017 - zren@suse.com Thu Feb 23 06:27:55 UTC 2017 - zren@suse.com

View File

@ -19,9 +19,12 @@
### COMMON-DEF-BEGIN ### ### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.168 %define lvm2_version 2.02.168
%define device_mapper_version 1.02.137 %define device_mapper_version 1.02.137
%define thin_provisioning_version 0.5.6
### COMMON-DEF-END ### ### COMMON-DEF-END ###
%define libname libdevmapper1_03 %define libname libdevmapper1_03
%define libname_event libdevmapper-event1_03 %define libname_event libdevmapper-event1_03
Name: device-mapper Name: device-mapper
Version: %{device_mapper_version} Version: %{device_mapper_version}
Release: 0 Release: 0
@ -32,15 +35,17 @@ Url: http://www.sourceware.org/lvm2/
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz
Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc
Source99: baselibs.conf Source99: baselibs.conf
### COMMON-PATCH-BEGIN ### ### COMMON-PATCH-BEGIN ###
# Upstream patches first # Upstream patches
# 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
#bsc#952300
Patch1004: sys_mount_instead_linux_fs.diff Patch1004: sys_mount_instead_linux_fs.diff
#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, patch7,8
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
@ -53,43 +58,50 @@ 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 #bnc873538
Patch1015: fix-closedown-before-thread-finish.patch Patch1015: fix-closedown-before-thread-finish.patch
#suse, bnc#870824 #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.patch
#bsc#935623
Patch1018: dmeventd-fix-dso-name-wrong-compare.patch Patch1018: dmeventd-fix-dso-name-wrong-compare.patch
#bsc#960044
Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
#suse, bnc#707253(also merged patch for bnc#479104) #bsc#479104,bnc#707253
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-link.patch Patch2002: device-mapper-link.patch
#suse, bnc#78902,bnc#789019,bnc#789020 #bnc#78902,bnc#789019,bnc#789020
Patch2003: udev_rules-update.diff Patch2003: udev_rules-update.diff
#suse, bnc#875233 #bnc#875233
Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch
#FATE#318413
Patch2005: fsadm-add-support-for-btrfs.patch Patch2005: fsadm-add-support-for-btrfs.patch
#bnc909358
Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch
#bsc#932300
Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
#bsc#940298
Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch
# bnc#960744 #bnc#960744
Patch2009: pvcreate-enhance-the-error-message.patch Patch2009: pvcreate-enhance-the-error-message.patch
# bnc#990538 bnc#986734 #bnc#990538,bnc#986734
Patch2010: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch Patch2010: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
#PATCH-FIX-SUSE, bnc#950089 #bnc#950089
Patch2011: lvm2-testsuite.patch Patch2011: lvm2-testsuite.patch
# simplify special case for the md rules #bsc#1012973
Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: suse-module-tools BuildRequires: suse-module-tools
BuildRequires: thin-provisioning-tools >= 0.5.6 BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(libselinux)
BuildRequires: pkgconfig(libsepol) BuildRequires: pkgconfig(libsepol)
BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
Requires: thin-provisioning-tools >= 0.5.6 Requires: thin-provisioning-tools >= %{thin_provisioning_version}
Requires(post): coreutils Requires(post): coreutils
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires} %{?systemd_requires}
@ -97,32 +109,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
Programs and man pages for configuring and using the device mapper. Programs and man pages for configuring and using the device mapper.
%package -n %{libname}
Summary: Library for device-mapper
Group: System/Libraries
Conflicts: %{name} < %{version}
%description -n %{libname}
Device mapper main shared library
%package -n %{libname_event}
Summary: Event library for device-mapper
Group: System/Libraries
Conflicts: %{name} < %{version}
%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 %prep
%setup -q -n LVM2.%{lvm2_version} %setup -q -n LVM2.%{lvm2_version}
### COMMON-PREP-BEGIN ### ### COMMON-PREP-BEGIN ###
@ -161,6 +147,7 @@ Files needed for software development using the device mapper
%build %build
extra_opts="" extra_opts=""
### COMMON-CONFIG-BEGIN ### ### COMMON-CONFIG-BEGIN ###
export PATH=$PATH:/sbin:%{_prefix}/sbin 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
@ -184,6 +171,7 @@ sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
--with-thin-repair=%{_sbindir}/thin_repair \ --with-thin-repair=%{_sbindir}/thin_repair \
$extra_opts $extra_opts
### COMMON-CONFIG-END ### ### COMMON-CONFIG-END ###
make %{?_smp_mflags} device-mapper make %{?_smp_mflags} device-mapper
%install %install
@ -210,6 +198,9 @@ rm %{buildroot}%{_mandir}/man8/lvm2-activation-generator.8
mkdir -p %{buildroot}/sbin mkdir -p %{buildroot}/sbin
ln -s %{_sbindir}/dmsetup %{buildroot}/sbin/dmsetup ln -s %{_sbindir}/dmsetup %{buildroot}/sbin/dmsetup
%pre
%service_add_pre dm-event.service dm-event.socket
%post %post
%service_add_post dm-event.service dm-event.socket %service_add_post dm-event.service dm-event.socket
%{?regenerate_initrd_post} %{?regenerate_initrd_post}
@ -217,9 +208,6 @@ ln -s %{_sbindir}/dmsetup %{buildroot}/sbin/dmsetup
%posttrans %posttrans
%{?regenerate_initrd_posttrans} %{?regenerate_initrd_posttrans}
%pre
%service_add_pre dm-event.service dm-event.socket
%preun %preun
%service_del_preun dm-event.service dm-event.socket %service_del_preun dm-event.service dm-event.socket
@ -227,21 +215,6 @@ ln -s %{_sbindir}/dmsetup %{buildroot}/sbin/dmsetup
%service_del_postun dm-event.service dm-event.socket %service_del_postun dm-event.service dm-event.socket
%{?regenerate_initrd_post} %{?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 %files
%defattr(-,root,root) %defattr(-,root,root)
%doc COPYING COPYING.LIB README %doc COPYING COPYING.LIB README
@ -260,11 +233,64 @@ ln -s %{_sbindir}/dmsetup %{buildroot}/sbin/dmsetup
%{_sbindir}/rcdm-event %{_sbindir}/rcdm-event
%{_unitdir}/dm-event.service %{_unitdir}/dm-event.service
##############################################################################
# Library for device-mapper
##############################################################################
%package -n %{libname}
Summary: Library for device-mapper
Group: System/Libraries
Conflicts: %{name} < %{version}
%description -n %{libname}
Device mapper main shared library
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libdevmapper.so.1.03
%{_libdir}/libdevmapper.so.1.02
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
##############################################################################
# Event library for device-mapper
##############################################################################
%package -n %{libname_event}
Summary: Event library for device-mapper
Group: System/Libraries
Conflicts: %{name} < %{version}
%description -n %{libname_event}
Device mapper event daemon shared library
%files -n %{libname_event}
%defattr(-,root,root)
%{_libdir}/libdevmapper-event.so.1.03
%{_libdir}/libdevmapper-event.so.1.02
%post -n %{libname_event} -p /sbin/ldconfig
%postun -n %{libname_event} -p /sbin/ldconfig
##############################################################################
# Development package for the device mapper
##############################################################################
%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
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libdevmapper.so %{_libdir}/libdevmapper.so
%{_libdir}/libdevmapper-event.so %{_libdir}/libdevmapper-event.so
%{_includedir}/libdevmapper*.h %{_includedir}/libdevmapper.h
%{_libdir}/pkgconfig/devmapper*.pc %{_includedir}/libdevmapper-event.h
%{_libdir}/pkgconfig/devmapper.pc
%{_libdir}/pkgconfig/devmapper-event.pc
%changelog %changelog

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Fri Feb 24 10:57:16 UTC 2017 - zren@suse.com
- Improve the layout and readability of spec files
* Place subpackages' sections at the bottom of spec file, making
the layout more reasonable: 1. main package's spec sections are
contiguous without a break; 2. subpackage's spec spections can
also be placed together.
* Get rid of wild-card usage in %files section; spec file is a
perfect place for packager to know what files are exactly delivered
with each RPMs; staring at wild-card doesn't give much information.
* Put bsc#xxx at previous line of each SUSE patch at my best, some
are still missing.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 23 06:27:55 UTC 2017 - zren@suse.com Thu Feb 23 06:27:55 UTC 2017 - zren@suse.com

View File

@ -19,7 +19,9 @@
### COMMON-DEF-BEGIN ### ### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.168 %define lvm2_version 2.02.168
%define device_mapper_version 1.02.137 %define device_mapper_version 1.02.137
%define thin_provisioning_version 0.5.6
### COMMON-DEF-END ### ### COMMON-DEF-END ###
Name: lvm2-clvm Name: lvm2-clvm
Version: %{lvm2_version} Version: %{lvm2_version}
Release: 0 Release: 0
@ -31,15 +33,17 @@ Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz
Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc Source1: ftp://sources.redhat.com/pub/lvm2/LVM2.%{lvm2_version}.tgz.asc
Source2: clvmd.ocf Source2: clvmd.ocf
Source3: cmirrord.ocf Source3: cmirrord.ocf
### COMMON-PATCH-BEGIN ### ### COMMON-PATCH-BEGIN ###
# Upstream patches first # Upstream patches
# 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
#bsc#952300
Patch1004: sys_mount_instead_linux_fs.diff Patch1004: sys_mount_instead_linux_fs.diff
#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, patch7,8
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
@ -52,38 +56,45 @@ 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 #bnc873538
Patch1015: fix-closedown-before-thread-finish.patch Patch1015: fix-closedown-before-thread-finish.patch
#suse, bnc#870824 #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.patch
#bsc#935623
Patch1018: dmeventd-fix-dso-name-wrong-compare.patch Patch1018: dmeventd-fix-dso-name-wrong-compare.patch
#bsc#960044
Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
#suse, bnc#707253(also merged patch for bnc#479104) #bsc#479104,bnc#707253
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-link.patch Patch2002: device-mapper-link.patch
#suse, bnc#78902,bnc#789019,bnc#789020 #bnc#78902,bnc#789019,bnc#789020
Patch2003: udev_rules-update.diff Patch2003: udev_rules-update.diff
#suse, bnc#875233 #bnc#875233
Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch
#FATE#318413
Patch2005: fsadm-add-support-for-btrfs.patch Patch2005: fsadm-add-support-for-btrfs.patch
#bnc909358
Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch
#bsc#932300
Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
#bsc#940298
Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch
# bnc#960744 #bnc#960744
Patch2009: pvcreate-enhance-the-error-message.patch Patch2009: pvcreate-enhance-the-error-message.patch
# bnc#990538 bnc#986734 #bnc#990538,bnc#986734
Patch2010: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch Patch2010: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
#PATCH-FIX-SUSE, bnc#950089 #bnc#950089
Patch2011: lvm2-testsuite.patch Patch2011: lvm2-testsuite.patch
# simplify special case for the md rules #bsc#1012973
Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
BuildRequires: libcorosync-devel BuildRequires: libcorosync-devel
BuildRequires: libdlm-devel BuildRequires: libdlm-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: thin-provisioning-tools >= 0.5.6 BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: pkgconfig(devmapper) BuildRequires: pkgconfig(devmapper)
BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libudev)
Requires: corosync Requires: corosync
@ -96,19 +107,9 @@ Provides: cmirrord = %{version}
%description %description
A daemon for using LVM2 Logival Volumes in a clustered environment. 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 %prep
%setup -q -n LVM2.%{lvm2_version} %setup -q -n LVM2.%{lvm2_version}
### COMMON-PREP-BEGIN ### ### COMMON-PREP-BEGIN ###
%patch1001 -p1 %patch1001 -p1
%patch1002 -p1 %patch1002 -p1
@ -152,6 +153,7 @@ extra_opts="
--with-cluster=internal --with-cluster=internal
--enable-cmirrord --enable-cmirrord
" "
### COMMON-CONFIG-BEGIN ### ### COMMON-CONFIG-BEGIN ###
export PATH=$PATH:/sbin:%{_prefix}/sbin 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
@ -175,6 +177,7 @@ sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
--with-thin-repair=%{_sbindir}/thin_repair \ --with-thin-repair=%{_sbindir}/thin_repair \
$extra_opts $extra_opts
### COMMON-CONFIG-END ### ### COMMON-CONFIG-END ###
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
@ -208,17 +211,31 @@ rm %{buildroot}%{_mandir}/man8/lvm2-activation-generator.8
%dir %{_libexecdir}/ocf/resource.d %dir %{_libexecdir}/ocf/resource.d
%dir %{_libexecdir}/ocf/resource.d/lvm2 %dir %{_libexecdir}/ocf/resource.d/lvm2
%{_libexecdir}/ocf/resource.d/lvm2/clvmd %{_libexecdir}/ocf/resource.d/lvm2/clvmd
%{_mandir}/man8/clvmd.8.*
%{_unitdir}/lvm2-clvmd.service %{_unitdir}/lvm2-clvmd.service
%{_unitdir}/lvm2-cluster-activation.service %{_unitdir}/lvm2-cluster-activation.service
%{_libexecdir}/systemd/lvm2-cluster-activation %{_libexecdir}/systemd/lvm2-cluster-activation
%{_mandir}/man8/clvmd.8.gz
##############################################################################
# Clustered RAID 1 support using device-mapper and corosync
##############################################################################
%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.
%files -n lvm2-cmirrord %files -n lvm2-cmirrord
%defattr(-,root,root) %defattr(-,root,root)
%{_sbindir}/cmirrord %{_sbindir}/cmirrord
%{_sbindir}/rclvm2-cmirrord
%{_libexecdir}/ocf/resource.d/lvm2/cmirrord %{_libexecdir}/ocf/resource.d/lvm2/cmirrord
%{_mandir}/man8/cmirrord.8.*
%{_libexecdir}/systemd/system/lvm2-cmirrord.service %{_libexecdir}/systemd/system/lvm2-cmirrord.service
%{_sbindir}/rclvm2-cmirrord
%{_mandir}/man8/cmirrord.8.*
%changelog %changelog

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Fri Feb 24 10:57:16 UTC 2017 - zren@suse.com
- Improve the layout and readability of spec files
* Place subpackages' sections at the bottom of spec file, making
the layout more reasonable: 1. main package's spec sections are
contiguous without a break; 2. subpackage's spec spections can
also be placed together.
* Get rid of wild-card usage in %files section; spec file is a
perfect place for packager to know what files are exactly delivered
with each RPMs; staring at wild-card doesn't give much information.
* Put bsc#xxx at previous line of each SUSE patch at my best, some
are still missing.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 23 06:27:55 UTC 2017 - zren@suse.com Thu Feb 23 06:27:55 UTC 2017 - zren@suse.com

375
lvm2.spec
View File

@ -19,10 +19,13 @@
### COMMON-DEF-BEGIN ### ### COMMON-DEF-BEGIN ###
%define lvm2_version 2.02.168 %define lvm2_version 2.02.168
%define device_mapper_version 1.02.137 %define device_mapper_version 1.02.137
%define thin_provisioning_version 0.5.6
### COMMON-DEF-END ### ### COMMON-DEF-END ###
%define _udevdir %(pkg-config --variable=udevdir udev) %define _udevdir %(pkg-config --variable=udevdir udev)
%define applib liblvm2app2_2 %define applib liblvm2app2_2
%define cmdlib liblvm2cmd2_02 %define cmdlib liblvm2cmd2_02
Name: lvm2 Name: lvm2
Version: %{lvm2_version} Version: %{lvm2_version}
Release: 0 Release: 0
@ -33,15 +36,17 @@ Url: http://www.sourceware.org/lvm2/
Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz Source: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
Source1: lvm.conf Source1: lvm.conf
Source42: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz.asc Source42: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz.asc
### COMMON-PATCH-BEGIN ### ### COMMON-PATCH-BEGIN ###
# Upstream patches first # Upstream patches
# 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
#bsc#952300
Patch1004: sys_mount_instead_linux_fs.diff Patch1004: sys_mount_instead_linux_fs.diff
#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, patch7,8
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
@ -54,41 +59,47 @@ 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 #bnc873538
Patch1015: fix-closedown-before-thread-finish.patch Patch1015: fix-closedown-before-thread-finish.patch
#suse, bnc#870824 #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.patch
#bsc#935623
Patch1018: dmeventd-fix-dso-name-wrong-compare.patch Patch1018: dmeventd-fix-dso-name-wrong-compare.patch
#bsc#960044
Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch Patch1019: lvm2-lvmetad.service-add-Also-lvm2-lvmetad.socket.patch
#suse, bnc#707253(also merged patch for bnc#479104) #bsc#479104,bnc#707253
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-link.patch Patch2002: device-mapper-link.patch
#suse, bnc#78902,bnc#789019,bnc#789020 #bnc#78902,bnc#789019,bnc#789020
Patch2003: udev_rules-update.diff Patch2003: udev_rules-update.diff
#suse, bnc#875233 #bnc#875233
Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch Patch2004: udev-Check-for-DM_NR_VALID_PATHS.patch
#FATE#318413
Patch2005: fsadm-add-support-for-btrfs.patch Patch2005: fsadm-add-support-for-btrfs.patch
#bnc909358
Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch Patch2006: Import-ID_FS_XXX-variables-bnc909358.patch
#bsc#932300
Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch Patch2007: 10-dm.rules-Reset-state-variable-for-spurious-events.patch
#bsc#940298
Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch Patch2008: libdm-iface-not-output-error-message-inside-retry-loop.patch
# bnc#960744 #bnc#960744
Patch2009: pvcreate-enhance-the-error-message.patch Patch2009: pvcreate-enhance-the-error-message.patch
# bnc#990538 bnc#986734 #bnc#990538,bnc#986734
Patch2010: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch Patch2010: 69-dm-lvm-metad.rules-Do-not-process-rules-for-multi.patch
#PATCH-FIX-SUSE, bnc#950089 #bnc#950089
Patch2011: lvm2-testsuite.patch Patch2011: lvm2-testsuite.patch
# simplify special case for the md rules #bsc#1012973
Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch Patch2012: simplify-special-case-for-md-in-69-dm-lvm-metadata.patch
### COMMON-PATCH-END ### ### COMMON-PATCH-END ###
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: libaio-devel BuildRequires: libaio-devel
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: readline-devel BuildRequires: readline-devel
BuildRequires: systemd BuildRequires: thin-provisioning-tools >= %{thin_provisioning_version}
BuildRequires: thin-provisioning-tools >= 0.5.6
BuildRequires: pkgconfig(blkid) BuildRequires: pkgconfig(blkid)
BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(systemd)
@ -104,44 +115,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
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
Conflicts: %{name} < %{version}
%description -n %{applib}
LVM library for applications api
%package -n %{cmdlib}
Summary: LVM2 command line library
Group: System/Libraries
Conflicts: %{name} < %{version}
%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.
%package testsuite
Summary: LVM2 Testsuite
Group: Development/Libraries/C and C++
Requires: %{applib} = %{version}
Requires: %{cmdlib} = %{version}
Requires: lvm2 = %{version}
%description testsuite
An extensive functional testsuite for the LVM2 Logical Volume Manager.
%prep %prep
%setup -q -n LVM2.%{version} %setup -q -n LVM2.%{version}
### COMMON-PREP-BEGIN ### ### COMMON-PREP-BEGIN ###
@ -189,6 +162,7 @@ extra_opts="
--with-default-pid-dir=/run --with-default-pid-dir=/run
--with-default-run-dir=/run/lvm --with-default-run-dir=/run/lvm
" "
### COMMON-CONFIG-BEGIN ### ### COMMON-CONFIG-BEGIN ###
export PATH=$PATH:/sbin:%{_prefix}/sbin 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
@ -212,6 +186,7 @@ sed -ie "s/%{device_mapper_version}/1.03.01/g" VERSION_DM
--with-thin-repair=%{_sbindir}/thin_repair \ --with-thin-repair=%{_sbindir}/thin_repair \
$extra_opts $extra_opts
### COMMON-CONFIG-END ### ### COMMON-CONFIG-END ###
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
@ -287,63 +262,256 @@ 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 VERSION WHATS_NEW
%dir %{_sysconfdir}/lvm %doc doc/lvm_fault_handling.txt
%dir %{_sysconfdir}/lvm/cache # Main binaries
%dir %{_sysconfdir}/lvm/profile %{_sbindir}/blkdeactivate
%ghost %{_sysconfdir}/lvm/cache/.cache %{_sbindir}/fsadm
%config %{_sysconfdir}/lvm/profile/*.profile %{_sbindir}/lvm
%config %{_sysconfdir}/lvm/lvmlocal.conf %{_sbindir}/lvmconf
%{_sbindir}/lvmconfig
%{_sbindir}/lvmdump
%{_sbindir}/lvmetad
# Other files
%{_sbindir}/lvchange
%{_sbindir}/lvconvert
%{_sbindir}/lvcreate
%{_sbindir}/lvdisplay
%{_sbindir}/lvextend
%{_sbindir}/lvmchange
%{_sbindir}/lvmdiskscan
%{_sbindir}/lvmsadc
%{_sbindir}/lvmsar
%{_sbindir}/lvreduce
%{_sbindir}/lvremove
%{_sbindir}/lvrename
%{_sbindir}/lvresize
%{_sbindir}/lvs
%{_sbindir}/lvscan
%{_sbindir}/pvchange
%{_sbindir}/pvck
%{_sbindir}/pvcreate
%{_sbindir}/pvdisplay
%{_sbindir}/pvmove
%{_sbindir}/pvremove
%{_sbindir}/pvresize
%{_sbindir}/pvs
%{_sbindir}/pvscan
%{_sbindir}/vgcfgbackup
%{_sbindir}/vgcfgrestore
%{_sbindir}/vgchange
%{_sbindir}/vgck
%{_sbindir}/vgconvert
%{_sbindir}/vgcreate
%{_sbindir}/vgdisplay
%{_sbindir}/vgexport
%{_sbindir}/vgextend
%{_sbindir}/vgimport
%{_sbindir}/vgimportclone
%{_sbindir}/vgmerge
%{_sbindir}/vgmknodes
%{_sbindir}/vgreduce
%{_sbindir}/vgremove
%{_sbindir}/vgrename
%{_sbindir}/vgs
%{_sbindir}/vgscan
%{_sbindir}/vgsplit
%{_sbindir}/rcblk-availability
%{_sbindir}/rclvm2-lvmetad
%{_sbindir}/rclvm2-monitor
# compat symlinks in /sbin
/sbin/lvm
/sbin/lvmconf
/sbin/lvmconfig
/sbin/lvmdump
/sbin/lvmetad
/sbin/lvchange
/sbin/lvconvert
/sbin/lvcreate
/sbin/lvdisplay
/sbin/lvextend
/sbin/lvmchange
/sbin/lvmdiskscan
/sbin/lvmsadc
/sbin/lvmsar
/sbin/lvreduce
/sbin/lvremove
/sbin/lvrename
/sbin/lvresize
/sbin/lvs
/sbin/lvscan
/sbin/pvchange
/sbin/pvck
/sbin/pvcreate
/sbin/pvdisplay
/sbin/pvmove
/sbin/pvremove
/sbin/pvresize
/sbin/pvs
/sbin/pvscan
/sbin/vgcfgbackup
/sbin/vgcfgrestore
/sbin/vgchange
/sbin/vgck
/sbin/vgconvert
/sbin/vgcreate
/sbin/vgdisplay
/sbin/vgexport
/sbin/vgextend
/sbin/vgimport
/sbin/vgimportclone
/sbin/vgmerge
/sbin/vgmknodes
/sbin/vgreduce
/sbin/vgremove
/sbin/vgrename
/sbin/vgs
/sbin/vgscan
/sbin/vgsplit
%{_mandir}/man5/lvm.conf.5.gz
%{_mandir}/man7/lvmcache.7.gz
%{_mandir}/man7/lvmraid.7.gz
%{_mandir}/man7/lvmreport.7.gz
%{_mandir}/man7/lvmthin.7.gz
%{_mandir}/man7/lvmsystemid.7.gz
%{_mandir}/man8/fsadm.8.gz
%{_mandir}/man8/lvchange.8.gz
%{_mandir}/man8/lvconvert.8.gz
%{_mandir}/man8/lvcreate.8.gz
%{_mandir}/man8/lvdisplay.8.gz
%{_mandir}/man8/lvextend.8.gz
%{_mandir}/man8/lvm.8.gz
%{_mandir}/man8/lvm2-activation-generator.8.gz
%{_mandir}/man8/lvm-config.8.gz
%{_mandir}/man8/lvmconfig.8.gz
%{_mandir}/man8/lvm-dumpconfig.8.gz
%{_mandir}/man8/lvmchange.8.gz
%{_mandir}/man8/lvmconf.8.gz
%{_mandir}/man8/lvmdiskscan.8.gz
%{_mandir}/man8/lvmdump.8.gz
%{_mandir}/man8/lvm-fullreport.8.gz
%{_mandir}/man8/lvmsadc.8.gz
%{_mandir}/man8/lvmsar.8.gz
%{_mandir}/man8/lvreduce.8.gz
%{_mandir}/man8/lvremove.8.gz
%{_mandir}/man8/lvrename.8.gz
%{_mandir}/man8/lvresize.8.gz
%{_mandir}/man8/lvs.8.gz
%{_mandir}/man8/lvscan.8.gz
%{_mandir}/man8/pvchange.8.gz
%{_mandir}/man8/pvck.8.gz
%{_mandir}/man8/pvcreate.8.gz
%{_mandir}/man8/pvdisplay.8.gz
%{_mandir}/man8/pvmove.8.gz
%{_mandir}/man8/pvremove.8.gz
%{_mandir}/man8/pvresize.8.gz
%{_mandir}/man8/pvs.8.gz
%{_mandir}/man8/pvscan.8.gz
%{_mandir}/man8/vgcfgbackup.8.gz
%{_mandir}/man8/vgcfgrestore.8.gz
%{_mandir}/man8/vgchange.8.gz
%{_mandir}/man8/vgck.8.gz
%{_mandir}/man8/vgconvert.8.gz
%{_mandir}/man8/vgcreate.8.gz
%{_mandir}/man8/vgdisplay.8.gz
%{_mandir}/man8/vgexport.8.gz
%{_mandir}/man8/vgextend.8.gz
%{_mandir}/man8/vgimport.8.gz
%{_mandir}/man8/vgimportclone.8.gz
%{_mandir}/man8/vgmerge.8.gz
%{_mandir}/man8/vgmknodes.8.gz
%{_mandir}/man8/vgreduce.8.gz
%{_mandir}/man8/vgremove.8.gz
%{_mandir}/man8/vgrename.8.gz
%{_mandir}/man8/vgs.8.gz
%{_mandir}/man8/vgscan.8.gz
%{_mandir}/man8/vgsplit.8.gz
%{_mandir}/man8/lvmetad.8.gz
%{_mandir}/man8/lvm-lvpoll.8.gz
%{_mandir}/man8/blkdeactivate.8.gz
%{_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
%dir %{_sysconfdir}/lvm
%config(noreplace) %{_sysconfdir}/lvm/lvm.conf
%config(noreplace) %{_sysconfdir}/lvm/lvmlocal.conf
%dir %{_sysconfdir}/lvm/profile
%{_sysconfdir}/lvm/profile/command_profile_template.profile
%{_sysconfdir}/lvm/profile/metadata_profile_template.profile
%{_sysconfdir}/lvm/profile/thin-generic.profile
%{_sysconfdir}/lvm/profile/thin-performance.profile
%{_sysconfdir}/lvm/profile/cache-mq.profile
%{_sysconfdir}/lvm/profile/cache-smq.profile
%{_sysconfdir}/lvm/profile/lvmdbusd.profile
%dir %{_sysconfdir}/lvm/cache
%ghost %{_sysconfdir}/lvm/cache/.cache
%dir %{_sysconfdir}/lvm/archive
%dir %{_sysconfdir}/lvm/backup
%ghost %dir /run/lock/lvm
%ghost %dir /run/lvm
%{_tmpfilesdir}/%{name}.conf
%{_unitdir}/blk-availability.service %{_unitdir}/blk-availability.service
%{_unitdir}/lvm2-monitor.service %{_unitdir}/lvm2-monitor.service
%{_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 %{_prefix}/lib/systemd/system-generators/lvm2-activation-generator
%{_tmpfilesdir}/lvm2.conf
%config(noreplace) %{_sysconfdir}/lvm/lvm.conf
%{_sbindir}/blkdeactivate
%{_sbindir}/fsadm
%{_sbindir}/lv*
%{_sbindir}/pv*
%{_sbindir}/vg*
/sbin/lv*
/sbin/pv*
/sbin/vg*
%{_sbindir}/rcblk-availability
%{_sbindir}/rclvm2-lvmetad
%{_sbindir}/rclvm2-monitor
%dir %{_libdir}/device-mapper %dir %{_libdir}/device-mapper
%{_libdir}/device-mapper/libdevmapper-event-lvm2*.so %{_libdir}/device-mapper/libdevmapper-event-lvm2*.so
%{_libdir}/libdevmapper-event-lvm2*.so %{_libdir}/libdevmapper-event-lvm2*.so
%{_libdir}/libdevmapper-event-lvm2*.so.2.02 %{_libdir}/libdevmapper-event-lvm2*.so.2.02
%{_libdir}/libdevmapper-event-lvm2.so
%{_mandir}/man5/lvm.conf.5%{ext_man} ##############################################################################
%{_mandir}/man8/blkdeactivate.8%{ext_man} # LVM2 application api library
%{_mandir}/man8/fsadm.8%{ext_man} ##############################################################################
%{_mandir}/man8/lv*.8* %package -n %{applib}
%{_mandir}/man8/pv*.8* Summary: LVM2 application api library
%{_mandir}/man8/vg*.8* Group: System/Libraries
%{_mandir}/man7/lvm*.7* Conflicts: %{name} < %{version}
%ghost %dir /run/lock/lvm
%ghost %dir /run/lvm %description -n %{applib}
LVM library for applications api
%post -n %{applib} -p /sbin/ldconfig
%postun -n %{applib} -p /sbin/ldconfig
%files -n %{applib}
%defattr(-,root,root)
%{_libdir}/liblvm2app.so.*
##############################################################################
# LVM2 command line library
##############################################################################
%package -n %{cmdlib}
Summary: LVM2 command line library
Group: System/Libraries
Conflicts: %{name} < %{version}
%description -n %{cmdlib}
The lvm2 command line library allows building programs that manage
lvm devices without invoking a separate program.
%post -n %{cmdlib} -p /sbin/ldconfig
%postun -n %{cmdlib} -p /sbin/ldconfig
%files -n %{cmdlib}
%defattr(-,root,root)
%{_libdir}/liblvm2cmd.so.*
##############################################################################
# Development files for LVM2
##############################################################################
%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.
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
@ -353,8 +521,21 @@ popd
%{_libdir}/liblvm2app.so %{_libdir}/liblvm2app.so
%{_libdir}/liblvm2cmd.so %{_libdir}/liblvm2cmd.so
##############################################################################
# LVM2 Testsuite
##############################################################################
%package testsuite
Summary: LVM2 Testsuite
Group: Development/Libraries/C and C++
Requires: %{applib} = %{version}
Requires: %{cmdlib} = %{version}
Requires: lvm2 = %{version}
%description testsuite
An extensive functional testsuite for the LVM2 Logical Volume Manager.
%files testsuite %files testsuite
%defattr(-,root,root,-) %defattr(-,root,root)
%{_datarootdir}/lvm2-testsuite/ %{_datarootdir}/lvm2-testsuite/
%{_libexecdir}/lvm2-testsuite/ %{_libexecdir}/lvm2-testsuite/
%{_bindir}/lvm2-testsuite %{_bindir}/lvm2-testsuite