Merge remote-tracking branch 'fedora_robert/cleanup' into main

* fedora_robert/cleanup:
  Spec file cleanup and simplification

Conflicts:
	lvm2.spec
This commit is contained in:
Marian Csontos 2021-02-25 19:00:43 +01:00
commit 6351686168

134
lvm2.spec
View File

@ -40,15 +40,6 @@
%endif %endif
%endif %endif
%if %{enable_cluster}
%global configure_cluster --with-cluster=internal
%if %{enable_cmirror}
%global configure_cmirror --enable-cmirrord
%endif
%else
%global configure_cluster --with-cluster=internal
%endif
# Do not reset Release to 1 unless both lvm2 and device-mapper # Do not reset Release to 1 unless both lvm2 and device-mapper
# versions are increased together. # versions are increased together.
@ -60,8 +51,8 @@ Epoch: %{rhel}
Version: 2.03.11 Version: 2.03.11
Release: 1%{?dist} Release: 1%{?dist}
License: GPLv2 License: GPLv2
URL: http://sourceware.org/lvm2 URL: https://sourceware.org/lvm2/
Source0: ftp://sourceware.org/pub/lvm2/releases/LVM2.%{version}.tgz Source0: https://sourceware.org/pub/lvm2/releases/LVM2.%{version}.tgz
Patch0: lvm2-set-default-preferred_names.patch Patch0: lvm2-set-default-preferred_names.patch
Patch3: lvm2-2_03_12-lvmlockd-sscanf-buffer-size-warnings.patch Patch3: lvm2-2_03_12-lvmlockd-sscanf-buffer-size-warnings.patch
# BZ 1915497: # BZ 1915497:
@ -180,53 +171,46 @@ or more physical volumes and creating one or more logical volumes
%global _udevdir %{_prefix}/lib/udev/rules.d %global _udevdir %{_prefix}/lib/udev/rules.d
%global configure_udev --with-udevdir=%{_udevdir} --enable-udev_sync
%if %{enable_cache}
%global configure_cache --with-cache=internal
%endif
%if %{enable_thin}
%global configure_thin --with-thin=internal
%endif
%if %{enable_lockd_dlm}
%global configure_lockd_dlm --enable-lvmlockd-dlm --enable-lvmlockd-dlmcontrol
%endif
%if %{enable_lockd_sanlock}
%global configure_lockd_sanlock --enable-lvmlockd-sanlock
%endif
%if %{enable_lvmpolld}
%global configure_lvmpolld --enable-lvmpolld
%endif
%if %{enable_lvmdbusd}
%global configure_lvmdbusd --enable-dbus-service --enable-notify-dbus
%endif
%if %{enable_dmfilemapd}
%global configure_dmfilemapd --enable-dmfilemapd
%endif
%if %{enable_vdo}
%global configure_vdo --with-vdo=internal --with-vdo-format=%{_bindir}/vdoformat
%endif
%if %{enable_writecache}
%global configure_writecache --with-writecache=internal
%endif
%if %{enable_integrity}
%global configure_integrity --with-integrity=internal
%endif
# NOTE: Using CFLAGS and LDFLAGS would override the fedora default flags, thus # NOTE: Using CFLAGS and LDFLAGS would override the fedora default flags, thus
# using paths here... # using paths here...
export CPATH="%{_includedir}/readline5" export CPATH="%{_includedir}/readline5"
export LIBRARY_PATH="%{_libdir}/readline5" export LIBRARY_PATH="%{_libdir}/readline5"
%configure --with-default-dm-run-dir=%{_default_dm_run_dir} --with-default-run-dir=%{_default_run_dir} --with-default-pid-dir=%{_default_pid_dir} --with-default-locking-dir=%{_default_locking_dir} --with-usrlibdir=%{_libdir} --enable-fsadm --enable-write_install --with-user= --with-group= --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig --enable-cmdlib --enable-dmeventd --enable-blkid_wiping %{?configure_cluster} %{?configure_cmirror} %{?configure_udev} %{?configure_thin} %{?configure_cache} %{?configure_lvmpolld} %{?configure_lockd_dlm} %{?configure_lockd_sanlock} %{?configure_lvmdbusd} %{?configure_dmfilemapd} %{?configure_writecache} %{?configure_vdo} %{?configure_integrity} --disable-silent-rules %configure \
--with-default-dm-run-dir=%{_default_dm_run_dir} \
--with-default-run-dir=%{_default_run_dir} \
--with-default-pid-dir=%{_default_pid_dir} \
--with-default-locking-dir=%{_default_locking_dir} \
--with-usrlibdir=%{_libdir} \
--enable-fsadm \
--enable-write_install \
--with-user= \
--with-group= \
--with-device-uid=0 \
--with-device-gid=6 \
--with-device-mode=0660 \
--enable-pkgconfig \
--enable-cmdlib \
--enable-dmeventd \
--enable-blkid_wiping \
%if %{enable_cluster}
--with-cluster=internal \
%{?enable_cmirror:--enable-cmirrord} \
%else
--with-cluster=internal \
%endif
--with-udevdir=%{_udevdir} --enable-udev_sync \
%{?enable_thin:--with-thin=internal} \
%{?enable_cache:--with-cache=internal} \
%{?enable_lvmpolld:--enable-lvmpolld} \
%{?enable_lockd_dlm:--enable-lvmlockd-dlm --enable-lvmlockd-dlmcontrol} \
%{?enable_lockd_sanlock:--enable-lvmlockd-sanlock} \
%{?enable_lvmdbusd:--enable-dbus-service --enable-notify-dbus} \
%{?enable_dmfilemapd:--enable-dmfilemapd} \
%{?enable_writecache:--with-writecache=internal} \
%{?enable_vdo:--with-vdo=internal --with-vdo-format=%{_bindir}/vdoformat} \
%{?enable_integrity:--with-integrity=internal} \
--disable-silent-rules
%make_build %make_build
@ -279,13 +263,11 @@ systemctl start lvm2-lvmpolld.socket >/dev/null 2>&1 || :
/bin/systemctl try-restart lvm2-monitor.service > /dev/null 2>&1 || : /bin/systemctl try-restart lvm2-monitor.service > /dev/null 2>&1 || :
%files %files
%{!?_licensedir:%global license %%doc}
%license COPYING COPYING.LIB %license COPYING COPYING.LIB
%doc README VERSION WHATS_NEW %doc README VERSION WHATS_NEW
%doc doc/lvm_fault_handling.txt %doc doc/lvm_fault_handling.txt
# Main binaries # Main binaries
%defattr(555,root,root,-)
%{_sbindir}/fsadm %{_sbindir}/fsadm
%{_sbindir}/lvm %{_sbindir}/lvm
%{_sbindir}/lvmconfig %{_sbindir}/lvmconfig
@ -295,7 +277,6 @@ systemctl start lvm2-lvmpolld.socket >/dev/null 2>&1 || :
%endif %endif
# Other files # Other files
%defattr(444,root,root,-)
%{_sbindir}/lvchange %{_sbindir}/lvchange
%{_sbindir}/lvconvert %{_sbindir}/lvconvert
%{_sbindir}/lvcreate %{_sbindir}/lvcreate
@ -403,8 +384,8 @@ systemctl start lvm2-lvmpolld.socket >/dev/null 2>&1 || :
%endif %endif
%dir %{_sysconfdir}/lvm %dir %{_sysconfdir}/lvm
%ghost %{_sysconfdir}/lvm/cache/.cache %ghost %{_sysconfdir}/lvm/cache/.cache
%attr(644, -, -) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
%attr(644, -, -) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvmlocal.conf %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvmlocal.conf
%dir %{_sysconfdir}/lvm/profile %dir %{_sysconfdir}/lvm/profile
%{_sysconfdir}/lvm/profile/command_profile_template.profile %{_sysconfdir}/lvm/profile/command_profile_template.profile
%{_sysconfdir}/lvm/profile/metadata_profile_template.profile %{_sysconfdir}/lvm/profile/metadata_profile_template.profile
@ -425,7 +406,7 @@ systemctl start lvm2-lvmpolld.socket >/dev/null 2>&1 || :
%{_unitdir}/blk-availability.service %{_unitdir}/blk-availability.service
%{_unitdir}/lvm2-monitor.service %{_unitdir}/lvm2-monitor.service
%{_unitdir}/lvm2-pvscan@.service %{_unitdir}/lvm2-pvscan@.service
%attr(555, -, -) %{_prefix}/lib/systemd/system-generators/lvm2-activation-generator %{_prefix}/lib/systemd/system-generators/lvm2-activation-generator
%if %{enable_lvmpolld} %if %{enable_lvmpolld}
%{_unitdir}/lvm2-lvmpolld.socket %{_unitdir}/lvm2-lvmpolld.socket
%{_unitdir}/lvm2-lvmpolld.service %{_unitdir}/lvm2-lvmpolld.service
@ -447,7 +428,6 @@ This package contains files needed to develop applications that use
the lvm2 libraries. the lvm2 libraries.
%files devel %files devel
%defattr(444,root,root,-)
%{_libdir}/liblvm2cmd.so %{_libdir}/liblvm2cmd.so
%{_libdir}/libdevmapper-event-lvm2.so %{_libdir}/libdevmapper-event-lvm2.so
%{_includedir}/lvm2cmd.h %{_includedir}/lvm2cmd.h
@ -463,9 +443,7 @@ This package contains shared lvm2 libraries for applications.
%ldconfig_scriptlets libs %ldconfig_scriptlets libs
%files libs %files libs
%{!?_licensedir:%global license %%doc}
%license COPYING.LIB %license COPYING.LIB
%defattr(555,root,root,-)
%{_libdir}/liblvm2cmd.so.* %{_libdir}/liblvm2cmd.so.*
%{_libdir}/libdevmapper-event-lvm2.so.* %{_libdir}/libdevmapper-event-lvm2.so.*
%dir %{_libdir}/device-mapper %dir %{_libdir}/device-mapper
@ -515,9 +493,8 @@ LVM commands use lvmlockd to coordinate access to shared storage.
%systemd_postun lvmlockd.service lvmlocks.service %systemd_postun lvmlockd.service lvmlocks.service
%files lockd %files lockd
%defattr(444,root,root,-) %{_sbindir}/lvmlockd
%%attr(555, -, -) %{_sbindir}/lvmlockd %{_sbindir}/lvmlockctl
%%attr(555, -, -) %{_sbindir}/lvmlockctl
%{_mandir}/man8/lvmlockd.8.gz %{_mandir}/man8/lvmlockd.8.gz
%{_mandir}/man8/lvmlockctl.8.gz %{_mandir}/man8/lvmlockctl.8.gz
%{_unitdir}/lvmlockd.service %{_unitdir}/lvmlockd.service
@ -542,9 +519,8 @@ Requires: resource-agents >= %{resource_agents_version}
Daemon providing device-mapper-based mirrors in a shared-storage cluster. Daemon providing device-mapper-based mirrors in a shared-storage cluster.
%files -n cmirror %files -n cmirror
%defattr(555,root,root,-)
%{_sbindir}/cmirrord %{_sbindir}/cmirrord
%attr(444, -, -) %{_mandir}/man8/cmirrord.8.gz %{_mandir}/man8/cmirrord.8.gz
############################################################################## ##############################################################################
# Cmirror-standalone subpackage # Cmirror-standalone subpackage
@ -570,7 +546,6 @@ involvement (e.g. pacemaker).
%systemd_postun lvm2-cmirrord.service %systemd_postun lvm2-cmirrord.service
%files -n cmirror-standalone %files -n cmirror-standalone
%defattr(444,root,root,-)
%{_unitdir}/lvm2-cmirrord.service %{_unitdir}/lvm2-cmirrord.service
%endif %endif
@ -608,9 +583,7 @@ Daemon for access to LVM2 functionality through a D-Bus interface.
%systemd_postun lvm2-lvmdbusd.service %systemd_postun lvm2-lvmdbusd.service
%files dbusd %files dbusd
%defattr(555,root,root,-)
%{_sbindir}/lvmdbusd %{_sbindir}/lvmdbusd
%defattr(444,root,root,-)
%{_sysconfdir}/dbus-1/system.d/com.redhat.lvmdbus1.conf %{_sysconfdir}/dbus-1/system.d/com.redhat.lvmdbus1.conf
%{_datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service %{_datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service
%{_mandir}/man8/lvmdbusd.8.gz %{_mandir}/man8/lvmdbusd.8.gz
@ -626,7 +599,7 @@ Daemon for access to LVM2 functionality through a D-Bus interface.
Summary: Device mapper utility Summary: Device mapper utility
Version: %{device_mapper_version} Version: %{device_mapper_version}
License: GPLv2 License: GPLv2
URL: http://sources.redhat.com/dm URL: https://www.sourceware.org/dm/
Requires: device-mapper-libs = %{?epoch}:%{device_mapper_version}-%{release} Requires: device-mapper-libs = %{?epoch}:%{device_mapper_version}-%{release}
Requires: util-linux >= %{util_linux_version} Requires: util-linux >= %{util_linux_version}
Requires: systemd >= %{systemd_version} Requires: systemd >= %{systemd_version}
@ -639,19 +612,17 @@ This package contains the supporting userspace utility, dmsetup,
for the kernel device-mapper. for the kernel device-mapper.
%files -n device-mapper %files -n device-mapper
%{!?_licensedir:%global license %%doc}
%license COPYING COPYING.LIB %license COPYING COPYING.LIB
%doc WHATS_NEW_DM VERSION_DM README %doc WHATS_NEW_DM VERSION_DM README
%doc udev/12-dm-permissions.rules %doc udev/12-dm-permissions.rules
%defattr(444,root,root,-) %{_sbindir}/dmsetup
%attr(555, -, -) %{_sbindir}/dmsetup %{_sbindir}/blkdeactivate
%attr(555, -, -) %{_sbindir}/blkdeactivate %{_sbindir}/dmstats
%attr(555, -, -) %{_sbindir}/dmstats
%{_mandir}/man8/dmsetup.8.gz %{_mandir}/man8/dmsetup.8.gz
%{_mandir}/man8/dmstats.8.gz %{_mandir}/man8/dmstats.8.gz
%{_mandir}/man8/blkdeactivate.8.gz %{_mandir}/man8/blkdeactivate.8.gz
%if %{enable_dmfilemapd} %if %{enable_dmfilemapd}
%attr(555, -, -) %{_sbindir}/dmfilemapd %{_sbindir}/dmfilemapd
%{_mandir}/man8/dmfilemapd.8.gz %{_mandir}/man8/dmfilemapd.8.gz
%endif %endif
%{_udevdir}/10-dm.rules %{_udevdir}/10-dm.rules
@ -670,7 +641,6 @@ This package contains files needed to develop applications that use
the device-mapper libraries. the device-mapper libraries.
%files -n device-mapper-devel %files -n device-mapper-devel
%defattr(444,root,root,-)
%{_libdir}/libdevmapper.so %{_libdir}/libdevmapper.so
%{_includedir}/libdevmapper.h %{_includedir}/libdevmapper.h
%{_libdir}/pkgconfig/devmapper.pc %{_libdir}/pkgconfig/devmapper.pc
@ -687,9 +657,7 @@ This package contains the device-mapper shared library, libdevmapper.
%ldconfig_scriptlets -n device-mapper-libs %ldconfig_scriptlets -n device-mapper-libs
%files -n device-mapper-libs %files -n device-mapper-libs
%{!?_licensedir:%global license %%doc}
%license COPYING COPYING.LIB %license COPYING COPYING.LIB
%defattr(555,root,root,-)
%{_libdir}/libdevmapper.so.* %{_libdir}/libdevmapper.so.*
%package -n device-mapper-event %package -n device-mapper-event
@ -720,8 +688,7 @@ fi
%systemd_preun dm-event.service dm-event.socket %systemd_preun dm-event.service dm-event.socket
%files -n device-mapper-event %files -n device-mapper-event
%defattr(444,root,root,-) %{_sbindir}/dmeventd
%attr(555, -, -) %{_sbindir}/dmeventd
%{_mandir}/man8/dmeventd.8.gz %{_mandir}/man8/dmeventd.8.gz
%{_unitdir}/dm-event.socket %{_unitdir}/dm-event.socket
%{_unitdir}/dm-event.service %{_unitdir}/dm-event.service
@ -738,9 +705,7 @@ libdevmapper-event.
%ldconfig_scriptlets -n device-mapper-event-libs %ldconfig_scriptlets -n device-mapper-event-libs
%files -n device-mapper-event-libs %files -n device-mapper-event-libs
%{!?_licensedir:%global license %%doc}
%license COPYING.LIB %license COPYING.LIB
%defattr(555,root,root,-)
%{_libdir}/libdevmapper-event.so.* %{_libdir}/libdevmapper-event.so.*
%package -n device-mapper-event-devel %package -n device-mapper-event-devel
@ -755,7 +720,6 @@ This package contains files needed to develop applications that use
the device-mapper event library. the device-mapper event library.
%files -n device-mapper-event-devel %files -n device-mapper-event-devel
%defattr(444,root,root,-)
%{_libdir}/libdevmapper-event.so %{_libdir}/libdevmapper-event.so
%{_includedir}/libdevmapper-event.h %{_includedir}/libdevmapper-event.h
%{_libdir}/pkgconfig/devmapper-event.pc %{_libdir}/pkgconfig/devmapper-event.pc