2022-06-02 01:51:36 +00:00
|
|
|
%global commit e209cfeb3fe1dfac03b34041a3deefdb077e3e11
|
|
|
|
%global gittag 8.1.1.371
|
2021-05-04 19:16:26 +00:00
|
|
|
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
2022-06-07 16:47:48 +00:00
|
|
|
%define spec_release 33
|
2021-05-04 19:16:26 +00:00
|
|
|
|
|
|
|
%define kmod_name kvdo
|
|
|
|
%define kmod_driver_version %{gittag}
|
|
|
|
%define kmod_rpm_release %{spec_release}
|
2022-06-07 16:47:48 +00:00
|
|
|
%define kmod_kernel_version 5.14.0-105.el9
|
2021-05-04 19:16:26 +00:00
|
|
|
%define kmod_headers_version %(rpm -qa kernel-devel | sed 's/^kernel-devel-//')
|
|
|
|
%define kmod_kbuild_dir .
|
|
|
|
%define kmod_devel_package 0
|
|
|
|
|
|
|
|
Source0: https://github.com/dm-vdo/%{kmod_name}/archive/%{commit}/%{kmod_name}-%{shortcommit}.tar.gz
|
|
|
|
|
|
|
|
%define findpat %( echo "%""P" )
|
|
|
|
|
|
|
|
Name: kmod-kvdo
|
|
|
|
Version: %{kmod_driver_version}
|
2021-08-09 23:53:41 +00:00
|
|
|
Release: %{kmod_rpm_release}%{?dist}
|
2021-05-04 19:16:26 +00:00
|
|
|
Summary: Kernel Modules for Virtual Data Optimizer
|
|
|
|
License: GPLv2+
|
|
|
|
URL: http://github.com/dm-vdo/kvdo
|
|
|
|
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
|
BuildRequires: elfutils-libelf-devel
|
|
|
|
BuildRequires: glibc
|
|
|
|
BuildRequires: kernel-devel >= %{kmod_kernel_version}
|
|
|
|
|
|
|
|
# Disable the kernel-debug requirement for now
|
|
|
|
|
|
|
|
BuildRequires: libuuid-devel
|
|
|
|
BuildRequires: redhat-rpm-config
|
|
|
|
ExcludeArch: i686
|
|
|
|
ExcludeArch: ppc
|
|
|
|
ExcludeArch: ppc64
|
|
|
|
ExcludeArch: s390
|
|
|
|
|
|
|
|
%global kernel_source() /usr/src/kernels/%{kmod_headers_version}
|
|
|
|
|
|
|
|
%global _use_internal_dependency_generator 0
|
|
|
|
Provides: kmod-%{kmod_name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
Requires(post): %{_sbindir}/weak-modules
|
|
|
|
Requires(postun): %{_sbindir}/weak-modules
|
2022-02-03 15:33:36 +00:00
|
|
|
Requires: kernel-core-uname-r >= %{kmod_kernel_version}
|
|
|
|
Requires: kernel-modules-uname-r >= %{kmod_kernel_version}
|
2021-05-04 19:16:26 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
Virtual Data Optimizer (VDO) is a device mapper target that delivers
|
|
|
|
block-level deduplication, compression, and thin provisioning.
|
|
|
|
|
|
|
|
This package provides the kernel modules for VDO.
|
|
|
|
|
|
|
|
%pre
|
|
|
|
# During the install, check whether kvdo or uds is loaded. A warning here
|
|
|
|
# indicates that a previous install was not completely removed. This message
|
|
|
|
# is purely informational to the user.
|
|
|
|
for module in kvdo uds; do
|
|
|
|
if grep -q "^${module}" /proc/modules; then
|
|
|
|
if [ "${module}" == "kvdo" ]; then
|
|
|
|
echo "WARNING: Found ${module} module previously loaded (Version: $(cat /sys/kvdo/version 2>/dev/null || echo Unknown)). A reboot is recommended before attempting to use the newly installed module."
|
|
|
|
else
|
|
|
|
echo "WARNING: Found ${module} module previously loaded. A reboot is recommended before attempting to use the newly installed module."
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
%post
|
|
|
|
modules=( $(find /lib/modules/%{kmod_headers_version}/extra/kmod-%{kmod_name} | grep '\.ko$') )
|
|
|
|
printf '%s\n' "${modules[@]}" >> /var/lib/rpm-kmod-posttrans-weak-modules-add
|
|
|
|
|
|
|
|
%pretrans -p <lua>
|
|
|
|
posix.unlink("/var/lib/rpm-kmod-posttrans-weak-modules-add")
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
if [ -f "/var/lib/rpm-kmod-posttrans-weak-modules-add" ]; then
|
|
|
|
modules=( $(cat /var/lib/rpm-kmod-posttrans-weak-modules-add) )
|
|
|
|
rm -rf /var/lib/rpm-kmod-posttrans-weak-modules-add
|
|
|
|
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --dracut=/usr/bin/dracut --add-modules
|
|
|
|
fi
|
|
|
|
|
|
|
|
%preun
|
|
|
|
rpm -ql kmod-kvdo-%{kmod_driver_version}-%{kmod_rpm_release}%{?dist}.$(arch) | grep '\.ko$' > /var/run/rpm-kmod-%{kmod_name}-modules
|
|
|
|
# Check whether kvdo or uds is loaded, and if so attempt to remove it. A
|
|
|
|
# failure to unload means there is still something using the module. To make
|
|
|
|
# sure the user is aware, we print a warning with recommended instructions.
|
|
|
|
for module in kvdo uds; do
|
|
|
|
if grep -q "^${module}" /proc/modules; then
|
|
|
|
warnMessage="WARNING: ${module} in use. Changes will take effect after a reboot."
|
|
|
|
modprobe -r ${module} 2>/dev/null || echo ${warnMessage} && /usr/bin/true
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
%postun
|
|
|
|
modules=( $(cat /var/run/rpm-kmod-%{kmod_name}-modules) )
|
|
|
|
rm /var/run/rpm-kmod-%{kmod_name}-modules
|
|
|
|
printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --dracut=/usr/bin/dracut --remove-modules
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(644,root,root,755)
|
|
|
|
/lib/modules/%{kmod_headers_version}
|
|
|
|
/etc/depmod.d/%{kmod_name}.conf
|
|
|
|
/usr/share/doc/kmod-%{kmod_name}/greylist.txt
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -n %{kmod_name}-%{commit}
|
|
|
|
%{nil}
|
|
|
|
set -- *
|
|
|
|
mkdir source
|
|
|
|
mv "$@" source/
|
|
|
|
mkdir obj
|
|
|
|
|
|
|
|
%build
|
|
|
|
rm -rf obj
|
|
|
|
cp -r source obj
|
|
|
|
make -C %{kernel_source} M=$PWD/obj/%{kmod_kbuild_dir} V=1 \
|
|
|
|
NOSTDINC_FLAGS="-I $PWD/obj/include -I $PWD/obj/include/uapi"
|
|
|
|
# mark modules executable so that strip-to-file can strip them
|
|
|
|
find obj/%{kmod_kbuild_dir} -name "*.ko" -type f -exec chmod u+x '{}' +
|
|
|
|
|
|
|
|
whitelist="/lib/modules/kabi-current/kabi_whitelist_%{_target_cpu}"
|
|
|
|
|
|
|
|
for modules in $( find obj/%{kmod_kbuild_dir} -name "*.ko" -type f -printf "%{findpat}\n" | sed 's|\.ko$||' | sort -u ) ; do
|
|
|
|
# update depmod.conf
|
|
|
|
module_weak_path=$(echo $modules | sed 's/[\/]*[^\/]*$//')
|
|
|
|
if [ -z "$module_weak_path" ]; then
|
|
|
|
module_weak_path=%{name}
|
|
|
|
else
|
|
|
|
module_weak_path=%{name}/$module_weak_path
|
|
|
|
fi
|
|
|
|
echo "override $(echo $modules | sed 's/.*\///') $(echo %{kmod_headers_version} | sed 's/\.[^\.]*$//').* weak-updates/$module_weak_path" >> source/depmod.conf
|
|
|
|
|
|
|
|
# update greylist
|
|
|
|
nm -u obj/%{kmod_kbuild_dir}/$modules.ko | sed 's/.*U //' | sed 's/^\.//' | sort -u | while read -r symbol; do
|
|
|
|
grep -q "^\s*$symbol\$" $whitelist || echo "$symbol" >> source/greylist
|
|
|
|
done
|
|
|
|
done
|
|
|
|
sort -u source/greylist | uniq > source/greylist.txt
|
|
|
|
|
|
|
|
%install
|
|
|
|
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
|
|
|
|
export INSTALL_MOD_DIR=extra/%{name}
|
|
|
|
make -C %{kernel_source} modules_install V=1 \
|
|
|
|
M=$PWD/obj/%{kmod_kbuild_dir}
|
|
|
|
# Cleanup unnecessary kernel-generated module dependency files.
|
|
|
|
find $INSTALL_MOD_PATH/lib/modules -iname 'modules.*' -exec rm {} \;
|
|
|
|
|
|
|
|
install -m 644 -D source/depmod.conf $RPM_BUILD_ROOT/etc/depmod.d/%{kmod_name}.conf
|
|
|
|
install -m 644 -D source/greylist.txt $RPM_BUILD_ROOT/usr/share/doc/kmod-%{kmod_name}/greylist.txt
|
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%changelog
|
2022-06-07 16:47:48 +00:00
|
|
|
* Tue Jun 07 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.371-33
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-06-02 01:51:36 +00:00
|
|
|
* Wed Jun 01 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.371-32
|
|
|
|
- Rebased to newer version.
|
|
|
|
- Related: rhbz#2071648
|
|
|
|
|
2022-05-31 16:14:01 +00:00
|
|
|
* Tue May 31 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-32
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-05-28 13:07:16 +00:00
|
|
|
* Sat May 28 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-31
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-05-23 13:24:15 +00:00
|
|
|
* Mon May 23 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-30
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-05-16 13:22:15 +00:00
|
|
|
* Mon May 16 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-29
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-05-13 13:26:52 +00:00
|
|
|
* Fri May 13 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-28
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-05-12 14:32:08 +00:00
|
|
|
* Thu May 12 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-27
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-05-10 12:33:46 +00:00
|
|
|
* Tue May 10 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-26
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-05-07 15:41:00 +00:00
|
|
|
* Sat May 07 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-25
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-05-05 14:18:27 +00:00
|
|
|
* Thu May 05 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-24
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-05-04 13:52:15 +00:00
|
|
|
* Wed May 04 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-23
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-04-29 15:01:53 +00:00
|
|
|
* Fri Apr 29 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-22
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-04-22 13:28:26 +00:00
|
|
|
* Fri Apr 22 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-21
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-04-21 16:01:44 +00:00
|
|
|
* Thu Apr 21 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-20
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-04-14 01:39:16 +00:00
|
|
|
* Wed Apr 13 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-19
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-04-11 13:36:48 +00:00
|
|
|
* Mon Apr 11 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-18
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-03-28 14:48:17 +00:00
|
|
|
* Mon Mar 28 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-17
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-03-21 23:46:02 +00:00
|
|
|
* Mon Mar 21 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-16
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2060486
|
|
|
|
|
2022-02-28 16:08:23 +00:00
|
|
|
* Mon Feb 28 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-15
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2022-02-21 20:47:21 +00:00
|
|
|
* Mon Feb 21 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-14
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2022-02-16 13:30:48 +00:00
|
|
|
* Wed Feb 16 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-13
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2022-02-13 04:40:47 +00:00
|
|
|
* Sat Feb 12 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.360-12
|
|
|
|
- Fixed a compilation issue due to changes in stdarg.h.
|
|
|
|
- Resolves: rhbz#2035003
|
|
|
|
- Modified the UDS index to handle backing store changes while suspended.
|
|
|
|
- Resolves: rhbz#2007803
|
|
|
|
- Fixed a bug which prevented the resumption of a suspended read-only vdo.
|
|
|
|
- Resolves: rhbz#2004206
|
|
|
|
|
2022-02-03 15:33:36 +00:00
|
|
|
* Thu Feb 03 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.287-12
|
|
|
|
- Adjusted kernel dependencies to grab the right packages.
|
|
|
|
- Resolves: rhbz#2022464
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2022-01-31 17:10:58 +00:00
|
|
|
* Mon Jan 31 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.287-11
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2022-01-24 02:51:10 +00:00
|
|
|
* Sun Jan 23 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.1.287-10
|
|
|
|
- Eliminated uses of "master" as part of the conscious language initiative.
|
|
|
|
- Resolves: rhbz#2023970
|
|
|
|
- Fixed potential use-after-free error found by Coverity.
|
|
|
|
- Resolves: rhbz#1999056
|
|
|
|
- Fixed bug which could result in empty flushes being issued to the storage
|
|
|
|
below vdo while suspended.
|
|
|
|
- Resolves: rhbz#2013057
|
|
|
|
- Added optional table line parameters for enabling or disabling
|
|
|
|
deduplication and compression.
|
|
|
|
- Resolves: rhbz#2007444
|
|
|
|
- Adapted to kernel API changes.
|
|
|
|
- Resolves: rhbz#2035003
|
|
|
|
|
2022-01-06 17:28:23 +00:00
|
|
|
* Thu Jan 06 2022 - Andy Walsh <awalsh@redhat.com> - 8.1.0.316-10
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
2022-01-06 17:28:56 +00:00
|
|
|
- Temporarily disabled creation of sysfs nodes.
|
|
|
|
- Related: rhbz#2035003
|
2022-01-06 17:28:23 +00:00
|
|
|
|
2021-12-20 03:40:56 +00:00
|
|
|
* Sun Dec 19 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.316-9
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
2021-12-23 14:19:42 +00:00
|
|
|
- Stopped using bvec_kmap_irq as it has been removed.
|
|
|
|
- Removed usage of removed elevator constants
|
|
|
|
- Resolves: rhbz#2035003
|
2021-12-20 03:40:56 +00:00
|
|
|
|
2021-12-15 14:16:35 +00:00
|
|
|
* Wed Dec 15 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.316-8
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2021-12-09 19:02:44 +00:00
|
|
|
* Tue Dec 07 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.316-7
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2021-12-07 13:47:10 +00:00
|
|
|
* Tue Dec 07 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.316-6
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2021-11-11 15:01:36 +00:00
|
|
|
* Thu Nov 11 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.316-5
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2021-10-13 22:48:13 +00:00
|
|
|
* Wed Oct 13 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.316-4
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2021-09-30 15:05:24 +00:00
|
|
|
* Thu Sep 30 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.316-3
|
|
|
|
- Rebuilt for latest kernel.
|
|
|
|
- Related: rhbz#2000926
|
|
|
|
|
2021-08-10 00:15:03 +00:00
|
|
|
* Mon Aug 09 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.316-2
|
2021-08-09 23:53:41 +00:00
|
|
|
- Rebased to upstream candidate.
|
|
|
|
- Resolves: rhbz#1955374
|
|
|
|
|
2021-08-09 21:12:30 +00:00
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 8.1.0.316-1.1
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
2021-08-07 15:16:19 +00:00
|
|
|
* Sat Aug 07 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.316-1
|
|
|
|
- Rebased to upstream candidate.
|
|
|
|
- Resolves: rhbz#1955374
|
|
|
|
|
2021-07-30 03:17:04 +00:00
|
|
|
* Thu Jul 29 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.264-1
|
|
|
|
- Rebased to upstream candidate.
|
|
|
|
- Related: rhbz#1955374
|
|
|
|
- Fixed GCC implicit-fallthrough errors when building for latest kernel
|
|
|
|
- Resolves: rhbz#1984814
|
|
|
|
|
2021-05-05 14:23:41 +00:00
|
|
|
* Tue May 04 2021 - Andy Walsh <awalsh@redhat.com> - 8.1.0.4-1
|
2021-05-04 19:16:26 +00:00
|
|
|
- Initial build for EL9
|
|
|
|
- Related: rhbz#1955374
|