1 Star 0 Fork 5

ocs-commit-check/lvm2

forked from OpenCloudOS Stream/lvm2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
lvm2.spec 16.45 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
%global enable_lvmlockd 1
%global enable_lockd_dlm %{enable_lvmlockd}
%global enable_lockd_sanlock %{enable_lvmlockd}
%global device_mapper_version 1.02.195
%global lvm2_version 2.03.21
%global _udevdir %{_prefix}/lib/udev/rules.d
Summary: The userspace toolset that provide logical volume management facilities
Name: lvm2
Version: %{lvm2_version}
Release: 7%{?dist}
License: GPLv2
URL: https://sourceware.org/lvm2/
Source0: https://sourceware.org/pub/lvm2/releases/LVM2.%{lvm2_version}.tgz
BuildRequires: make gcc gcc-c++
BuildRequires: libselinux-devel libsepol-devel libblkid-devel
BuildRequires: ncurses-devel libedit-devel libaio-devel
%if %{enable_lockd_dlm}
BuildRequires: dlm-devel
%endif
%if %{enable_lockd_sanlock}
BuildRequires: sanlock-devel
%endif
BuildRequires: module-init-tools pkgconfig systemd-devel systemd-units
BuildRequires: python3-devel python3-setuptools python3-dbus python3-pyudev
BuildRequires: device-mapper-persistent-data
Requires: %{name}-libs = %{lvm2_version}-%{release}
Requires: bash module-init-tools device-mapper-persistent-data
Requires(post): systemd-units systemd-sysv
Requires(preun): systemd-units
Requires(postun): systemd-units
%description
The Logical Volume Manager (LVM) provides tools to create virtual block
devices from physical devices. Virtual devices may be easier to manage
than physical devices, and can have capabilities beyond what the physical
devices provide themselves. A Volume Group (VG) is a collection of one or
more physical devices, each called a Physical Volume (PV). A Logical
Volume (LV) is a virtual block device that can be used by the system or
applications. Each block of data in an LV is stored on one or more PV in
the VG, according to algorithms implemented by Device Mapper (DM) in the
kernel.
%package devel
Summary: Development libraries and headers
License: LGPLv2
Requires: %{name} = %{lvm2_version}-%{release}
Requires: device-mapper-devel = %{device_mapper_version}-%{release}
Requires: device-mapper-event-devel = %{device_mapper_version}-%{release}
Requires: pkgconfig
%description devel
This package contains files needed to develop applications that use
the lvm2 libraries.
%package libs
Summary: Shared libraries for lvm2 tools
License: LGPLv2
Requires: device-mapper-event = %{device_mapper_version}-%{release}
%description libs
This package contains shared libraries for lvm2 tools.
%if %{enable_lockd_dlm} || %{enable_lockd_sanlock}
%package lockd
Summary: LVM locking daemon
Requires: lvm2 = %{lvm2_version}-%{release}
%if %{enable_lockd_dlm}
Requires: dlm-lib
%endif
%if %{enable_lockd_sanlock}
Requires: sanlock-lib
%endif
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description lockd
LVM commands use lvmlockd to coordinate access to shared storage.
When LVM is used on devices shared by multiple hosts, locks will:
• coordinate reading and writing of LVM metadata
• validate caching of LVM metadata
• prevent conflicting activation of logical volumes
lvmlockd uses an external lock manager to perform basic locking.
Lock manager (lock type) options are:
• sanlock: places locks on disk within LVM storage.
• dlm: uses network communication and a cluster manager.
%endif
%package dbusd
Summary: LVM2 D-Bus daemon
License: GPLv2
Requires: lvm2 >= %{lvm2_version}-%{release}
Requires: dbus python3-dbus python3-pyudev python3-gobject-base
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
BuildArch: noarch
%description dbusd
Lvmdbusd is a service which provides a D-Bus API to the logical volume manager (LVM).
%package -n device-mapper
Summary: Device mapper utility
Version: %{device_mapper_version}
License: GPLv2
URL: https://www.sourceware.org/dm/
Requires: device-mapper-libs = %{device_mapper_version}-%{release}
Requires: util-linux-core systemd
%description -n device-mapper
The Device-mapper is a component of the linux kernel (since version 2.6)
that supports logical volume management. This package contains the supporting
userspace utility, dmsetup, for the kernel device-mapper.
%package -n device-mapper-devel
Summary: Development libraries and headers for device-mapper
Version: %{device_mapper_version}
License: LGPLv2
Requires: device-mapper = %{device_mapper_version}-%{release}
Requires: pkgconfig
%description -n device-mapper-devel
This package contains files needed to develop applications that use
the device-mapper libraries.
%package -n device-mapper-libs
Summary: Device-mapper shared library
Version: %{device_mapper_version}
License: LGPLv2
Requires: device-mapper = %{device_mapper_version}-%{release}
%description -n device-mapper-libs
This package contains the device-mapper shared library, libdevmapper.
%package -n device-mapper-event
Summary: Device-mapper event daemon
Version: %{device_mapper_version}
Requires: device-mapper = %{device_mapper_version}-%{release}
Requires: device-mapper-event-libs = %{device_mapper_version}-%{release}
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description -n device-mapper-event
Dmeventd is the event monitoring daemon for device-mapper
devices. Library plugins can register and carry out actions
triggered when particular events occur.
%package -n device-mapper-event-libs
Summary: Device-mapper event daemon shared library
Version: %{device_mapper_version}
License: LGPLv2
%description -n device-mapper-event-libs
This package contains the device-mapper event daemon shared library,
libdevmapper-event.
%package -n device-mapper-event-devel
Summary: Development libraries and headers for the device-mapper event daemon
Version: %{device_mapper_version}
License: LGPLv2
Requires: device-mapper-event = %{device_mapper_version}-%{release}
Requires: pkgconfig
%description -n device-mapper-event-devel
This package contains files needed to develop applications that use
the device-mapper event library.
%package testsuite
Summary: LVM2 Testsuite
License: LGPLv2 and GPLv2 and BSD-2-Clause
%description testsuite
An extensive functional testsuite for LVM2.
%prep
%autosetup -n LVM2.%{lvm2_version}
%build
%configure \
--with-default-dm-run-dir=/run \
--with-default-run-dir=/run/lvm \
--with-default-pid-dir=/run \
--with-default-locking-dir=/run/lock/lvm \
--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 \
--disable-readline \
--enable-editline \
--with-cache=internal \
--with-cluster=internal \
--with-udevdir=%{_udevdir} --enable-udev_sync \
--enable-lvmpolld \
--with-thin=internal \
--enable-dbus-service --enable-notify-dbus \
--enable-dmfilemapd \
%if %{enable_lockd_dlm}
--enable-lvmlockd-dlm --enable-lvmlockd-dlmcontrol \
%endif
%if %{enable_lockd_sanlock}
--enable-lvmlockd-sanlock \
%endif
--with-writecache=internal \
--with-vdo=internal --with-vdo-format=%{_bindir}/vdoformat \
--with-integrity=internal \
--disable-silent-rules
%make_build
%install
%make_install
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 -C test
%check
make run-unit-test
%post
%systemd_post blk-availability.service lvm2-monitor.service
if [ "$1" = "1" ] ; then
systemctl enable lvm2-monitor.service
systemctl start lvm2-monitor.service >/dev/null 2>&1 || :
fi
%systemd_post lvm2-lvmpolld.socket
systemctl enable lvm2-lvmpolld.socket
systemctl start lvm2-lvmpolld.socket >/dev/null 2>&1 || :
%preun
%systemd_preun blk-availability.service lvm2-monitor.service
%systemd_preun lvm2-lvmpolld.service lvm2-lvmpolld.socket
%postun
%systemd_postun lvm2-monitor.service
%systemd_postun_with_restart lvm2-lvmpolld.service
%if %{enable_lockd_dlm} || %{enable_lockd_sanlock}
%post lockd
%systemd_post lvmlockd.service lvmlocks.service
%preun lockd
%systemd_preun lvmlockd.service lvmlocks.service
%postun lockd
%systemd_postun lvmlockd.service lvmlocks.service
%endif
%post dbusd
%systemd_post lvm2-lvmdbusd.service
%preun dbusd
%systemd_preun lvm2-lvmdbusd.service
%postun dbusd
%systemd_postun lvm2-lvmdbusd.service
%post -n device-mapper-event
%systemd_post dm-event.socket
systemctl enable dm-event.socket
systemctl start dm-event.socket >/dev/null 2>&1 || :
if [ -e /run/dmeventd.pid ]; then
%{_sbindir}/dmeventd -R || echo "Failed to restart dmeventd daemon. Please, try manual restart."
fi
%preun -n device-mapper-event
%systemd_preun dm-event.service dm-event.socket
%files
%license COPYING COPYING.LIB
%doc README VERSION WHATS_NEW doc/lvm_fault_handling.txt
%defattr(444,root,root,-)
%{_udevdir}/11-dm-lvm.rules
%{_udevdir}/69-dm-lvm.rules
%dir %{_sysconfdir}/lvm
%ghost %{_sysconfdir}/lvm/cache/.cache
%attr(644, -, -) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf
%attr(644, -, -) %config(noreplace) %verify(not md5 mtime size) %{_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
%{_sysconfdir}/lvm/profile/vdo-small.profile
%dir %{_sysconfdir}/lvm/backup
%dir %{_sysconfdir}/lvm/cache
%dir %{_sysconfdir}/lvm/archive
%dir /run/lock/lvm
%dir /run/lvm
%{_tmpfilesdir}/%{name}.conf
%{_unitdir}/blk-availability.service
%{_unitdir}/lvm2-monitor.service
%{_unitdir}/lvm2-lvmpolld.socket
%{_unitdir}/lvm2-lvmpolld.service
%{_libexecdir}/lvresize_fs_helper
%defattr(555,root,root,-)
%{_sbindir}/fsadm
%{_sbindir}/lvm
%{_sbindir}/lvmconfig
%{_sbindir}/lvmdevices
%{_sbindir}/lvmdump
%{_sbindir}/lvmpolld
%{_sbindir}/lvm_import_vdo
%defattr(444,root,root,-)
%{_sbindir}/lvchange
%{_sbindir}/lvconvert
%{_sbindir}/lvcreate
%{_sbindir}/lvdisplay
%{_sbindir}/lvextend
%{_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}/vgimportdevices
%{_sbindir}/vgmerge
%{_sbindir}/vgmknodes
%{_sbindir}/vgreduce
%{_sbindir}/vgremove
%{_sbindir}/vgrename
%{_sbindir}/vgs
%{_sbindir}/vgscan
%{_sbindir}/vgsplit
%{_mandir}/man5/lvm.conf.5.gz
%{_mandir}/man7/lvmautoactivation.7.gz
%{_mandir}/man7/lvmcache.7.gz
%{_mandir}/man7/lvmraid.7.gz
%{_mandir}/man7/lvmreport.7.gz
%{_mandir}/man7/lvmthin.7.gz
%{_mandir}/man7/lvmvdo.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/lvm-config.8.gz
%{_mandir}/man8/lvmconfig.8.gz
%{_mandir}/man8/lvmdevices.8.gz
%{_mandir}/man8/lvm-dumpconfig.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/lvm_import_vdo.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/vgimportdevices.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/lvmpolld.8.gz
%{_mandir}/man8/lvm-lvpoll.8.gz
%files devel
%defattr(444,root,root,-)
%{_includedir}/lvm2cmd.h
%{_libdir}/liblvm2cmd.so
%{_libdir}/libdevmapper-event-lvm2.so
%files libs
%license COPYING.LIB
%defattr(555,root,root,-)
%{_libdir}/liblvm2cmd.so.*
%{_libdir}/libdevmapper-event-lvm2.so.*
%dir %{_libdir}/device-mapper
%{_libdir}/device-mapper/libdevmapper-event-lvm2mirror.so
%{_libdir}/device-mapper/libdevmapper-event-lvm2snapshot.so
%{_libdir}/device-mapper/libdevmapper-event-lvm2raid.so
%{_libdir}/device-mapper/libdevmapper-event-lvm2thin.so
%{_libdir}/device-mapper/libdevmapper-event-lvm2vdo.so
%{_libdir}/libdevmapper-event-lvm2mirror.so
%{_libdir}/libdevmapper-event-lvm2snapshot.so
%{_libdir}/libdevmapper-event-lvm2raid.so
%{_libdir}/libdevmapper-event-lvm2thin.so
%{_libdir}/libdevmapper-event-lvm2vdo.so
%if %{enable_lockd_dlm} || %{enable_lockd_sanlock}
%files lockd
%defattr(444,root,root,-)
%{_unitdir}/lvmlockd.service
%{_unitdir}/lvmlocks.service
%attr(555, -, -) %{_sbindir}/lvmlockd
%attr(555, -, -) %{_sbindir}/lvmlockctl
%{_mandir}/man8/lvmlockd.8.gz
%{_mandir}/man8/lvmlockctl.8.gz
%endif
%files dbusd
%defattr(555,root,root,-)
%{_sbindir}/lvmdbusd
%defattr(444,root,root,-)
%{_sysconfdir}/dbus-1/system.d/com.redhat.lvmdbus1.conf
%{_datadir}/dbus-1/system-services/com.redhat.lvmdbus1.service
%{_mandir}/man8/lvmdbusd.8.gz
%{_unitdir}/lvm2-lvmdbusd.service
%{python3_sitelib}/lvmdbusd/*
%files -n device-mapper
%license COPYING COPYING.LIB
%doc WHATS_NEW_DM VERSION_DM README
%doc udev/12-dm-permissions.rules
%defattr(444,root,root,-)
%{_udevdir}/10-dm.rules
%{_udevdir}/13-dm-disk.rules
%{_udevdir}/95-dm-notify.rules
%defattr(555,root,root,-)
%{_sbindir}/dmsetup
%{_sbindir}/blkdeactivate
%{_sbindir}/dmstats
%{_sbindir}/dmfilemapd
%defattr(444,root,root,-)
%{_mandir}/man8/dmsetup.8.gz
%{_mandir}/man8/dmstats.8.gz
%{_mandir}/man8/blkdeactivate.8.gz
%{_mandir}/man8/dmfilemapd.8.gz
%files -n device-mapper-devel
%defattr(444,root,root,-)
%{_includedir}/libdevmapper.h
%{_libdir}/libdevmapper.so
%{_libdir}/pkgconfig/devmapper.pc
%files -n device-mapper-libs
%license COPYING COPYING.LIB
%defattr(555,root,root,-)
%{_libdir}/libdevmapper.so.*
%files -n device-mapper-event
%defattr(444,root,root,-)
%{_unitdir}/dm-event.socket
%{_unitdir}/dm-event.service
%attr(555, -, -) %{_sbindir}/dmeventd
%{_mandir}/man8/dmeventd.8.gz
%files -n device-mapper-event-libs
%license COPYING.LIB
%defattr(555,root,root,-)
%{_libdir}/libdevmapper-event.so.*
%files -n device-mapper-event-devel
%defattr(444,root,root,-)
%{_includedir}/libdevmapper-event.h
%{_libdir}/libdevmapper-event.so
%{_libdir}/pkgconfig/devmapper-event.pc
%files testsuite
%license COPYING COPYING.LIB COPYING.BSD
%{_datadir}/lvm2-testsuite/
%{_libexecdir}/lvm2-testsuite/
%{_bindir}/lvm2-testsuite
%changelog
* Thu Sep 26 2024 OpenCloudOS Release Engineering <[email protected]> - 2.03.21-7
- Rebuilt for clarifying the packages requirement in BaseOS and AppStream
* Fri Aug 16 2024 OpenCloudOS Release Engineering <[email protected]> - 2.03.21-6
- Rebuilt for loongarch release
* Tue Sep 19 2023 OpenCloudOS Release Engineering <[email protected]> - 2.03.21-5
- Rebuilt for python 3.11
* Fri Sep 08 2023 OpenCloudOS Release Engineering <[email protected]> - 2.03.21-4
- Rebuilt for OpenCloudOS Stream 23.09
* Thu Aug 24 2023 Shuo Wang <[email protected]> - 2.03.21-3
- Rebuilt for sanlock 3.8.5
* Fri Apr 28 2023 OpenCloudOS Release Engineering <[email protected]> - 2.03.21-2
- Rebuilt for OpenCloudOS Stream 23.05
* Thu Apr 27 2023 Xiaojie Chen <[email protected]> - 2.03.21-1
- Update to version 2.03.21
- Enable lockd_dlm
* Fri Mar 31 2023 OpenCloudOS Release Engineering <[email protected]> - 2.03.16-2
- Rebuilt for OpenCloudOS Stream 23
* Thu Jun 2 2022 Xiaojie Chen <[email protected]> - 2.03.16-1
- Initial build
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ocs-commit-check/lvm2.git
[email protected]:ocs-commit-check/lvm2.git
ocs-commit-check
lvm2
lvm2
master

搜索帮助