1 Commits

Author SHA256 Message Date
20e27a09f5 Sync changes to SLFO-1.2 branch 2025-08-20 13:44:30 +02:00
2 changed files with 55 additions and 15 deletions

View File

@@ -1,13 +1,3 @@
-------------------------------------------------------------------
Wed Jul 2 09:02:40 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
- Disable glusterfs backend.
- Delete libtcmu-runner-devel; the .so file is not generally
usable without some headers files describing the API.
- Delete /usr/sbin/rc* symlinks (outdated practice).
- Trim idempotent %if..%endif guards.
- Remove implicit %defattr, BuildRoot lines from spec.
-------------------------------------------------------------------
Sat Mar 22 01:40:04 UTC 2025 - Shawn Dunn <sfalken@opensuse.org>

View File

@@ -1,7 +1,7 @@
#
# spec file for package tcmu-runner
#
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,10 @@
#
%if 0%{?sle_version} == 0
%define build_handler_glusterfs 1
%endif
%if 0%{?sle_version} == 0 || 0%{?sle_version} >= 120300
%ifarch aarch64 x86_64
%define build_handler_rbd 1
@@ -44,6 +48,9 @@ BuildRequires: cmake >= 3.5
BuildRequires: glib2-devel
BuildRequires: glibc-devel
BuildRequires: gperftools-devel
%if 0%{?build_handler_glusterfs}
BuildRequires: glusterfs-devel
%endif
%if 0%{?build_handler_rbd}
BuildRequires: librbd-devel
%endif
@@ -69,7 +76,7 @@ by regular files or block devices. But, if we want to get fancier with
the capabilities of the device we're emulating, the kernel is not
necessarily the right place. While there are userspace libraries for
compression, encryption, and clustered storage solutions like
Ceph, these are not accessible from the kernel.
Ceph or Gluster, these are not accessible from the kernel.
The TCMU userspace-passthrough backstore allows a userspace process to
handle requests to a LUN. But since the kernel-user interface that
@@ -89,6 +96,18 @@ Summary: Runtime libraries for tcmu-runner
%description -n libtcmu2
This package contains the runtime libraries for tcmu-runner.
%if 0%{?build_handler_glusterfs}
%package handler-glusterfs
Summary: GlusterFS handler for tcmu-runner
Requires: tcmu-runner = %{version}
%description handler-glusterfs
This package contains the GlusterFS handler for tcmu-runner, which
allows for LIO/tcmu logical units to be backed by GlusterFS provisioned
storage.
%endif
%if 0%{?build_handler_rbd}
%package handler-rbd
Summary: Ceph RBD handler for tcmu-runner
Requires: tcmu-runner = %{version}
@@ -97,7 +116,9 @@ Requires: tcmu-runner = %{version}
This package contains the Ceph RADOS Block Device (RBD) handler for
tcmu-runner, which allows for LIO/tcmu logical units to be backed by
RBD images.
%endif
%if 0%{?build_handler_zbc}
%package handler-zbc
Summary: Ceph ZBC handler for tcmu-runner
Requires: tcmu-runner = %{version}
@@ -105,6 +126,15 @@ Requires: tcmu-runner = %{version}
%description handler-zbc
This package contains the Ceph RADOS ZBC disc emulation, using a
file backstore in tcmu-runner.
%endif
%package -n libtcmu-devel
Summary: Development package for libtcmu
Requires: %{name} = %{version}
Requires: libtcmu2 = %{version}
%description -n libtcmu-devel
Development header(s) and lib(s) for developing against libtcmu.
%prep
%autosetup -p1
@@ -113,7 +143,11 @@ file backstore in tcmu-runner.
CMAKE_OPTIONS="\
-DSUPPORT_SYSTEMD=1 \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
%if 0%{?build_handler_glusterfs}
-Dwith-glfs=1 \
%else
-Dwith-glfs=0 \
%endif
%if 0%{?build_handler_rbd}
-Dwith-rbd=1 \
%else
@@ -130,17 +164,20 @@ CMAKE_OPTIONS="\
"
%cmake -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \
${CMAKE_OPTIONS}
%cmake_build
make %{?_smp_mflags}
%install
%cmake_install
rm -f "%{buildroot}/%{_libdir}/libtcmu.so"
install -d -m 755 %{buildroot}/%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}/%{_sbindir}/rctcmu-runner
%post
%{run_ldconfig}
%{service_add_post tcmu-runner.service}
%postun
%{service_del_postun tcmu-runner.service}
%{run_ldconfig}
%pre
%{service_add_pre tcmu-runner.service}
@@ -148,10 +185,14 @@ rm -f "%{buildroot}/%{_libdir}/libtcmu.so"
%preun
%{service_del_preun tcmu-runner.service}
%ldconfig_scriptlets -n libtcmu2
%post -n libtcmu2 -p /sbin/ldconfig
%postun -n libtcmu2 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/tcmu-runner
%{_sbindir}/rctcmu-runner
%doc README.md
%license LICENSE.Apache2
%license LICENSE.LGPLv2.1
@@ -170,8 +211,14 @@ rm -f "%{buildroot}/%{_libdir}/libtcmu.so"
%config %{_sysconfdir}/tcmu/tcmu.conf
%files -n libtcmu2
%defattr(-,root,root)
%{_libdir}/libtcmu*.so.*
%if 0%{?build_handler_glusterfs}
%files handler-glusterfs
%{_libdir}/tcmu-runner/handler_glfs.so
%endif
%if 0%{?build_handler_rbd}
%files handler-rbd
%{_libdir}/tcmu-runner/handler_rbd.so
@@ -182,4 +229,7 @@ rm -f "%{buildroot}/%{_libdir}/libtcmu.so"
%{_libdir}/tcmu-runner/handler_file_zbc.so
%endif
%files -n libtcmu-devel
%{_libdir}/libtcmu*.so
%changelog