Accepting request 264976 from Base:System

1

OBS-URL: https://build.opensuse.org/request/show/264976
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lvm2?expand=0&rev=78
This commit is contained in:
Dominique Leuenberger 2014-12-16 13:47:30 +00:00 committed by Git OBS Bridge
commit 9bf3612f74
2 changed files with 91 additions and 214 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Dec 8 21:19:13 UTC 2014 - jengelh@inai.de
- spec: replace some shell variables and paths by rpm macros
- shorten filelists by using wildcards
-------------------------------------------------------------------
Wed Dec 3 03:23:47 UTC 2014 - jeffm@suse.com

299
lvm2.spec
View File

@ -20,26 +20,14 @@
%define device_mapper_version 1.02.92
%define thin_provisioning_version 0.4.1
Url: http://www.sourceware.org/lvm2/
Name: lvm2
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libaio-devel
BuildRequires: libcorosync-devel
BuildRequires: libdlm-devel
BuildRequires: libselinux-devel
BuildRequires: readline-devel
BuildRequires: suse-module-tools
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(udev)
Requires: device-mapper >= 1.02.90
Provides: lvm
Version: %{lvm2_version}
Release: 0
Summary: Logical Volume Manager Tools
License: GPL-2.0 and LGPL-2.1
Group: System/Base
Url: http://www.sourceware.org/lvm2/
Source: ftp://sources.redhat.com/pub/%{name}/LVM2.%{version}.tgz
Source42: ftp://sources.redhat.com/pub/%{name}/LVM2.%{version}.tgz.asc
Source1: lvm.conf
@ -99,6 +87,18 @@ Patch2004: udev_rules-update.diff
Patch2005: udev-Check-for-DM_NR_VALID_PATHS.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libaio-devel
BuildRequires: libcorosync-devel
BuildRequires: libdlm-devel
BuildRequires: libselinux-devel
BuildRequires: readline-devel
BuildRequires: suse-module-tools
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(udev)
Requires: device-mapper >= 1.02.90
Provides: lvm = %version-%release
# Not a real replacement but we drop evms
Provides: evms = 2.5.5
Provides: evms-devel = 2.5.5
@ -172,7 +172,7 @@ autoreconf -fvi
--enable-selinux \
--with-clvmd=corosync \
--with-cluster=internal \
--datarootdir=/usr/share \
--datarootdir="%_datadir" \
--with-default-locking-dir=/run/lock/lvm \
--enable-cmirrord \
--enable-lvmetad \
@ -188,7 +188,7 @@ autoreconf -fvi
--with-thin-check=/sbin/thin_check \
--with-thin-dump=%{_sbindir}/thin_dump \
--with-thin-repair=%{_sbindir}/thin_repair \
--with-udev-prefix=/usr/
--with-udev-prefix="%_prefix/"
export SUSE_ASNEEDED=0
@ -201,50 +201,46 @@ popd
pushd thin-provisioning-tools-%{thin_provisioning_version}
autoreconf -fiv
%configure --sbindir=/sbin --prefix=/usr
%configure --sbindir=/sbin --prefix="%_prefix"
make %{?_smp_mflags}
popd
%install
%makeinstall
make install_system_dirs DESTDIR=$RPM_BUILD_ROOT
make install_systemd_units DESTDIR=$RPM_BUILD_ROOT
make install_systemd_generators DESTDIR=$RPM_BUILD_ROOT
make install_tmpfiles_configuration DESTDIR=$RPM_BUILD_ROOT
%make_install
make install_system_dirs DESTDIR="%buildroot"
make install_systemd_units DESTDIR="%buildroot"
make install_systemd_generators DESTDIR="%buildroot"
make install_tmpfiles_configuration DESTDIR="%buildroot"
# Is this directory used anymore?
install -d -m 755 $RPM_BUILD_ROOT/etc/lvm/metadata
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/lvm
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/usr/sbin
install -m755 -D %{S:8} $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/lvm2/clvmd
install -m755 -D %{S:10} $RPM_BUILD_ROOT/usr/lib/ocf/resource.d/lvm2/cmirrord
install -d -m 755 "%buildroot/%_sysconfdir/lvm/metadata"
install -m 644 %{SOURCE1} "%buildroot/%_sysconfdir/lvm/"
mkdir -p "%buildroot/%_initddir"
mkdir -p "%buildroot/%_sbindir"
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"
pushd $RPM_BUILD_ROOT/%_lib
pushd "%buildroot/%_lib"
ln -sf liblvm2cmd.so.2.02 liblvm2cmd.so
ln -sf liblvm2app.so.2.2 liblvm2app.so
ln -sf device-mapper/libdevmapper-event-lvm2mirror.so libdevmapper-event-lvm2mirror.so.2.02
ln -sf device-mapper/libdevmapper-event-lvm2snapshot.so libdevmapper-event-lvm2snapshot.so.2.02
ln -sf device-mapper/libdevmapper-event-lvm2raid.so libdevmapper-event-lvm2raid.so.2.02
ln -sf device-mapper/libdevmapper-event-lvm2thin.so libdevmapper-event-lvm2thin.so.2.02
ln -sf device-mapper/libdevmapper-event-lvm2mirror.so libdevmapper-event-lvm2mirror.so
ln -sf device-mapper/libdevmapper-event-lvm2snapshot.so libdevmapper-event-lvm2snapshot.so
ln -sf device-mapper/libdevmapper-event-lvm2raid.so libdevmapper-event-lvm2raid.so
ln -sf device-mapper/libdevmapper-event-lvm2thin.so libdevmapper-event-lvm2thin.so
for i in libdevmapper-event-lvm2{mirror,raid,snapshot,thin}; do
ln -sf "device-mapper/$i.so" "$i.so"
ln -sf "device-mapper/$i.so" "$i.so.2.02"
done
popd
pushd $RPM_BUILD_ROOT/usr/sbin
pushd "%buildroot/%_sbindir"
ln -sf ../../sbin/lvm lvm
popd
#csm-convert
pushd bnz
install -m755 -D csm-converter $RPM_BUILD_ROOT/usr/sbin/csm-converter
install -m755 -D csm-converter-helper $RPM_BUILD_ROOT/usr/sbin/csm-converter-helper
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
pushd thin-provisioning-tools-%{thin_provisioning_version}
%makeinstall
%make_install
popd
%pre
@ -268,16 +264,16 @@ popd
%files
%defattr(-,root,root)
%doc README WHATS_NEW doc/*
%dir /etc/lvm
%dir /etc/lvm/backup
%dir /etc/lvm/archive
%dir /etc/lvm/metadata
%dir /etc/lvm/profile
%dir /etc/lvm/cache
%dir %{_sysconfdir}/lvm
%dir %{_sysconfdir}/lvm/backup
%dir %{_sysconfdir}/lvm/archive
%dir %{_sysconfdir}/lvm/metadata
%dir %{_sysconfdir}/lvm/profile
%dir %{_sysconfdir}/lvm/cache
%dir /usr/lib/systemd/system-generators
%dir /usr/lib/tmpfiles.d
%ghost /etc/lvm/cache/.cache
/etc/lvm/profile/*.profile
%ghost %{_sysconfdir}/lvm/cache/.cache
%{_sysconfdir}/lvm/profile/*.profile
%{_udevdir}/rules.d/11-dm-lvm.rules
%{_udevdir}/rules.d/69-dm-lvm-metad.rules
%{_unitdir}/blk-availability.service
@ -286,133 +282,32 @@ popd
%{_unitdir}/lvm2-lvmetad.service
%{_unitdir}/lvm2-pvscan@.service
%{_tmpfilesdir}/lvm2.conf
%config /etc/lvm/lvm.conf
%config %{_sysconfdir}/lvm/lvm.conf
/usr/lib/systemd/system-generators/lvm2-activation-generator
/sbin/blkdeactivate
/sbin/fsadm
/sbin/lvchange
/sbin/lvconvert
/sbin/lvcreate
/sbin/lvdisplay
/sbin/lvextend
/sbin/lvm
/sbin/lvmchange
/sbin/lvmdiskscan
/sbin/lvmdump
/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
/sbin/lvmconf
/sbin/lvmetad
/usr/sbin/lvm
/sbin/lv*
/sbin/pv*
/sbin/vg*
%_sbindir/lvm
%dir /%_lib/device-mapper
/%_lib/device-mapper/libdevmapper-event-lvm2mirror.so
/%_lib/device-mapper/libdevmapper-event-lvm2snapshot.so
/%_lib/device-mapper/libdevmapper-event-lvm2raid.so
/%_lib/device-mapper/libdevmapper-event-lvm2thin.so
/%_lib/libdevmapper-event-lvm2mirror.so
/%_lib/libdevmapper-event-lvm2snapshot.so
/%_lib/libdevmapper-event-lvm2raid.so
/%_lib/libdevmapper-event-lvm2thin.so
/%_lib/device-mapper/libdevmapper-event-lvm2*.so
/%_lib/libdevmapper-event-lvm2*.so
/%_lib/liblvm2cmd.so
/%_lib/liblvm2cmd.so.2.02
/%_lib/liblvm2app.so
/%_lib/liblvm2app.so.2.2
/%_libdir/liblvm2app.so
/%_libdir/liblvm2cmd.so
/%_lib/libdevmapper-event-lvm2mirror.so.2.02
/%_lib/libdevmapper-event-lvm2snapshot.so.2.02
/%_lib/libdevmapper-event-lvm2raid.so.2.02
/%_lib/libdevmapper-event-lvm2thin.so.2.02
/%_lib/libdevmapper-event-lvm2*.so.2.02
/%_libdir/libdevmapper-event-lvm2.so
/%_lib/libdevmapper-event-lvm2.so.2.02
%{_mandir}/man5/lvm.conf.5.gz
%{_mandir}/man8/blkdeactivate.8.gz
%{_mandir}/man8/fsadm.8.gz
%{_mandir}/man8/lvchange.8.gz
%{_mandir}/man8/lvcreate.8.gz
%{_mandir}/man8/lvconvert.8.gz
%{_mandir}/man8/lvdisplay.8.gz
%{_mandir}/man8/lvmdump.8.gz
%{_mandir}/man8/lvextend.8.gz
%{_mandir}/man8/lvm.8.gz
%{_mandir}/man8/lvmchange.8.gz
%{_mandir}/man8/lvmdiskscan.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}/man7/lvmcache.7.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/lvmconf.8.gz
%{_mandir}/man8/lvmsadc.8.gz
%{_mandir}/man8/lvmsar.8.gz
%{_mandir}/man8/lvmetad.8.gz
%{_mandir}/man7/lvmthin.7.gz
%{_mandir}/man8/lvm-dumpconfig.8.gz
%{_mandir}/man8/lvm2-activation-generator.8.gz
%_mandir/man5/lvm.conf.5.gz
%_mandir/man8/blkdeactivate.8.gz
%_mandir/man8/fsadm.8.gz
%_mandir/man8/lv*.8*
%_mandir/man8/pv*.8*
%_mandir/man8/vg*.8*
%_mandir/man7/lvm*.7*
%package clvm
Url: http://sources.redhat.com/cluster/clvm/
@ -434,15 +329,15 @@ A daemon for using LVM2 Logival Volumes in a clustered environment.
%files clvm
%defattr(-,root,root)
/usr/sbin/clvmd
%{_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
/usr/sbin/csm-converter
/usr/sbin/csm-converter-helper
%{_sbindir}/csm-converter
%{_sbindir}/csm-converter-helper
%{_unitdir}/lvm2-clvmd.service
%{_unitdir}/lvm2-cluster-activation.service
/usr/lib/systemd/lvm2-cluster-activation
@ -465,7 +360,7 @@ A daemon for using LVM2 Logival Volumes in a clustered environment.
%files cmirrord
%defattr(-,root,root)
/usr/sbin/cmirrord
%{_sbindir}/cmirrord
/usr/lib/ocf/resource.d/lvm2/cmirrord
%{_mandir}/man8/cmirrord.8.gz
/usr/lib/systemd/system/lvm2-cmirrord.service
@ -483,8 +378,8 @@ This package provides development files for the LVM2 Logical Volume Manager.
%files devel
%defattr(-,root,root)
/usr/include/lvm2cmd.h
/usr/include/lvm2app.h
%_includedir/lvm2cmd.h
%_includedir/lvm2app.h
%_libdir/pkgconfig/lvm2app.pc
##########################################
@ -542,42 +437,20 @@ mapper.
/%_lib/libdevmapper-event.so.1.03
/sbin/dmsetup
/sbin/dmeventd
/usr/sbin/thin_check
/usr/sbin/thin_dump
/usr/sbin/thin_restore
/usr/sbin/thin_metadata_size
/usr/sbin/thin_repair
/usr/sbin/thin_rmap
%{_mandir}/man8/dmsetup.8.gz
%{_mandir}/man8/dmeventd.8.gz
%{_mandir}/man8/thin_check.8.gz
%{_mandir}/man8/thin_dump.8.gz
%{_mandir}/man8/thin_restore.8.gz
%{_mandir}/man8/thin_metadata_size.8.gz
%{_mandir}/man8/thin_repair.8.gz
%{_mandir}/man8/thin_rmap.8.gz
%{_udevrulesdir}/10-dm.rules
%{_udevrulesdir}/13-dm-disk.rules
%{_udevrulesdir}/95-dm-notify.rules
%{_unitdir}/dm-event.socket
%{_unitdir}/dm-event.service
/usr/sbin/cache_check
/usr/sbin/cache_dump
/usr/sbin/cache_metadata_size
/usr/sbin/cache_repair
/usr/sbin/cache_restore
/usr/sbin/era_check
/usr/sbin/era_dump
/usr/sbin/era_invalidate
/usr/sbin/era_restore
/usr/sbin/pdata_tools
/usr/share/man/man8/cache_check.8.gz
/usr/share/man/man8/cache_dump.8.gz
/usr/share/man/man8/cache_repair.8.gz
/usr/share/man/man8/cache_restore.8.gz
/usr/share/man/man8/era_check.8.gz
/usr/share/man/man8/era_dump.8.gz
/usr/share/man/man8/era_invalidate.8.gz
%_sbindir/thin_*
%_mandir/man8/dmsetup.8.gz
%_mandir/man8/dmeventd.8.gz
%_mandir/man8/thin_*.8*
%_udevrulesdir/10-dm.rules
%_udevrulesdir/13-dm-disk.rules
%_udevrulesdir/95-dm-notify.rules
%_unitdir/dm-event.socket
%_unitdir/dm-event.service
%_sbindir/cache_*
%_sbindir/era_*
%_sbindir/pdata_tools
%_mandir/man8/cache_*.8*
%_mandir/man8/era_*.8*
%package -n device-mapper-devel
Summary: Development package for the device mapper
@ -591,12 +464,10 @@ Files needed for software development using the device mapper
%files -n device-mapper-devel
%defattr(-,root,root)
/%_libdir/libdevmapper.so
/%_libdir/libdevmapper-event.so
%attr(644, root, root) %_libdir/libdevmapper.a
/usr/include/libdevmapper.h
/usr/include/libdevmapper-event.h
/%_libdir/pkgconfig/devmapper-event.pc
/%_libdir/pkgconfig/devmapper.pc
%_libdir/libdevmapper.so
%_libdir/libdevmapper-event.so
%_libdir/libdevmapper.a
%_includedir/libdevmapper*.h
%_libdir/pkgconfig/devmapper*.pc
%changelog