Add config options for systemd files
This commit is contained in:
parent
3d7b66474e
commit
c13eaf6b70
22
lvm2.spec
22
lvm2.spec
@ -2,16 +2,25 @@
|
|||||||
%define enable_cluster 1
|
%define enable_cluster 1
|
||||||
|
|
||||||
%if "%{fedora}" == "12"
|
%if "%{fedora}" == "12"
|
||||||
|
%define enable_systemd 0
|
||||||
%define enable_udev 0
|
%define enable_udev 0
|
||||||
%define configure_default_data_alignment --with-default-data-alignment=0
|
%define configure_default_data_alignment --with-default-data-alignment=0
|
||||||
%else
|
%else
|
||||||
%if "%{fedora}" == "13"
|
%if "%{fedora}" == "13"
|
||||||
|
%define enable_systemd 0
|
||||||
%define enable_udev 1
|
%define enable_udev 1
|
||||||
%define udev_version 153-1
|
%define udev_version 153-1
|
||||||
%define configure_default_data_alignment --with-default-data-alignment=0
|
%define configure_default_data_alignment --with-default-data-alignment=0
|
||||||
%else
|
%else
|
||||||
|
%if "%{fedora}" == "14"
|
||||||
|
%define enable_systemd 0
|
||||||
%define enable_udev 1
|
%define enable_udev 1
|
||||||
%define udev_version 158-1
|
%define udev_version 158-1
|
||||||
|
%else
|
||||||
|
%define enable_systemd 1
|
||||||
|
%define enable_udev 1
|
||||||
|
%define udev_version 158-1
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -30,12 +39,14 @@
|
|||||||
Summary: Userland logical volume management tools
|
Summary: Userland logical volume management tools
|
||||||
Name: lvm2
|
Name: lvm2
|
||||||
Version: 2.02.84
|
Version: 2.02.84
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
URL: http://sources.redhat.com/lvm2
|
URL: http://sources.redhat.com/lvm2
|
||||||
Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
|
Source0: ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
|
||||||
|
%if %{enable_systemd}
|
||||||
Source1: %{name}-tmpfiles.conf
|
Source1: %{name}-tmpfiles.conf
|
||||||
|
%endif
|
||||||
Patch0: lvm2-set-default-preferred_names.patch
|
Patch0: lvm2-set-default-preferred_names.patch
|
||||||
|
|
||||||
BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
|
BuildRequires: libselinux-devel >= 1.30.19-4, libsepol-devel
|
||||||
@ -52,7 +63,9 @@ BuildRequires: pkgconfig
|
|||||||
BuildRequires: libudev-devel
|
BuildRequires: libudev-devel
|
||||||
%endif
|
%endif
|
||||||
Requires: %{name}-libs = %{version}-%{release}
|
Requires: %{name}-libs = %{version}-%{release}
|
||||||
|
%if %{enable_systemd}
|
||||||
Requires: initscripts
|
Requires: initscripts
|
||||||
|
%endif
|
||||||
Requires: module-init-tools
|
Requires: module-init-tools
|
||||||
Requires(post): chkconfig
|
Requires(post): chkconfig
|
||||||
Requires(preun): chkconfig
|
Requires(preun): chkconfig
|
||||||
@ -89,8 +102,10 @@ make %{?_smp_mflags}
|
|||||||
make install DESTDIR=$RPM_BUILD_ROOT
|
make install DESTDIR=$RPM_BUILD_ROOT
|
||||||
make install_system_dirs DESTDIR=$RPM_BUILD_ROOT
|
make install_system_dirs DESTDIR=$RPM_BUILD_ROOT
|
||||||
make install_initscripts DESTDIR=$RPM_BUILD_ROOT
|
make install_initscripts DESTDIR=$RPM_BUILD_ROOT
|
||||||
|
%if %{enable_systemd}
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
|
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
|
||||||
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
|
install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
@ -215,7 +230,9 @@ fi
|
|||||||
%dir %{_localstatedir}/lock/lvm
|
%dir %{_localstatedir}/lock/lvm
|
||||||
%dir %{_localstatedir}/run/lvm
|
%dir %{_localstatedir}/run/lvm
|
||||||
%{_sysconfdir}/rc.d/init.d/lvm2-monitor
|
%{_sysconfdir}/rc.d/init.d/lvm2-monitor
|
||||||
|
%if %{enable_systemd}
|
||||||
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
|
%config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Library and Development subpackages
|
# Library and Development subpackages
|
||||||
@ -475,6 +492,9 @@ the device-mapper event library.
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 6 2011 Zdenek Kabelac <zkabelac@redhat.com> - 2.02.84-2
|
||||||
|
- Merge rawhide spec file and make systemd initscripts configurable.
|
||||||
|
|
||||||
* Wed Feb 9 2011 Alasdair Kergon <agk@redhat.com> - 2.02.84-1
|
* Wed Feb 9 2011 Alasdair Kergon <agk@redhat.com> - 2.02.84-1
|
||||||
- Fix big-endian CRC32 checksumming broken since 2.02.75. If affected,
|
- Fix big-endian CRC32 checksumming broken since 2.02.75. If affected,
|
||||||
ensure metadata backups in /etc/lvm/backup are up-to-date (vgcfgbackup)
|
ensure metadata backups in /etc/lvm/backup are up-to-date (vgcfgbackup)
|
||||||
|
Loading…
Reference in New Issue
Block a user