Blame SPECS/kmod-vbox-guest-additions.spec

aac1c3
%global pkg vbox-guest-additions
aac1c3
aac1c3
%global driver_version 5.14.0-1.el9
aac1c3
Kmods SIG a85b7b
%global kernel_version 5.14.0-83.el9
aac1c3
aac1c3
%global debug_package %{nil}
aac1c3
aac1c3
%global __spec_install_post \
aac1c3
  %{?__debug_package:%{__debug_install_post}} \
aac1c3
  %{__arch_install_post} \
aac1c3
  %{__os_install_post} \
aac1c3
  %{__mod_compress_install_post}
aac1c3
aac1c3
%global __mod_compress_install_post find %{buildroot}/lib/modules -type f -name \*.ko -exec xz \{\} \\;
aac1c3
aac1c3
aac1c3
Name:             kmod-%{pkg}
aac1c3
Version:          5.14.0.1
Kmods SIG a85b7b
Release:          14%{?dist}
aac1c3
Summary:          Virtual Box Guest Additions
aac1c3
aac1c3
License:          GPLv2 and (GPLv2 or CDDL-1.0) and MIT
aac1c3
URL:              https://www.kernel.org/
aac1c3
aac1c3
Source0:          %{pkg}-%{driver_version}.tar.xz
aac1c3
Patch9997:        9997-enable-vboxguest.patch
aac1c3
Patch9998:        9998-enable-vboxsf.patch
aac1c3
Patch9999:        9999-enable-vboxvideo.patch
aac1c3
aac1c3
ExclusiveArch:    x86_64
aac1c3
aac1c3
BuildRequires:    elfutils-libelf-devel
aac1c3
BuildRequires:    gcc
aac1c3
BuildRequires:    kernel-rpm-macros
aac1c3
BuildRequires:    kmod
aac1c3
BuildRequires:    make
aac1c3
BuildRequires:    redhat-rpm-config
aac1c3
BuildRequires:    xz
aac1c3
aac1c3
BuildRequires:    kernel-abi-stablelists = %{kernel_version}
aac1c3
BuildRequires:    kernel-devel = %{kernel_version}
aac1c3
BuildRequires:    kernel-devel-uname-r = %{kernel_version}.%{_arch}
aac1c3
aac1c3
Requires:         kernel >= %{kernel_version}
aac1c3
Requires:         kernel-uname-r >= %{kernel_version}.%{_arch}
aac1c3
Requires:         kernel-modules >= %{kernel_version}
aac1c3
Requires:         kernel-modules-uname-r >= %{kernel_version}.%{_arch}
aac1c3
aac1c3
Provides:         installonlypkg(kernel-module)
aac1c3
Provides:         kernel-modules >= %{kernel_version}.%{_arch}
aac1c3
aac1c3
Requires(post):   %{_sbindir}/depmod
aac1c3
Requires(postun): %{_sbindir}/depmod
aac1c3
aac1c3
Requires(post):   %{_sbindir}/weak-modules
aac1c3
Requires(postun): %{_sbindir}/weak-modules
aac1c3
aac1c3
Supplements:      virtualbox-guest-additions
aac1c3
Recommends:       virtualbox-guest-additions
aac1c3
aac1c3
aac1c3
%description
aac1c3
This package provides the following drivers:
aac1c3
aac1c3
Driver (vboxguest) for the Virtual Box Guest PCI device used in Virtual Box
aac1c3
virtual machines. Enabling this driver will add support for Virtual Box Guest
aac1c3
integration features such as copy-and-paste, seamless mode and OpenGL
aac1c3
pass-through.
aac1c3
aac1c3
Driver (vboxfs) required to mount folders exported by the Virtual Box host to
aac1c3
be shared with guests.
aac1c3
aac1c3
KMS driver (vboxvideo) for the virtual Graphics Card used in Virtual Box
aac1c3
virtual machines.
aac1c3
aac1c3
aac1c3
%prep
aac1c3
%autosetup -p1 -n %{pkg}-%{driver_version}
aac1c3
aac1c3
aac1c3
%build
aac1c3
pushd src
aac1c3
%{__make} -C /usr/src/kernels/%{kernel_version}.%{_arch} %{?_smp_mflags} M=$PWD modules
aac1c3
popd
aac1c3
aac1c3
aac1c3
%install
aac1c3
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/virt/vboxguest src/vboxguest/vboxguest.ko
aac1c3
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/fs src/vboxsf/vboxsf.ko
aac1c3
%{__install} -D -t %{buildroot}/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/gpu/drm/vboxvideo src/vboxvideo/vboxvideo.ko
aac1c3
aac1c3
# Make .ko objects temporarily executable for automatic stripping
aac1c3
find %{buildroot}/lib/modules -type f -name \*.ko -exec chmod u+x \{\} \+
aac1c3
aac1c3
aac1c3
%clean
aac1c3
%{__rm} -rf %{buildroot}
aac1c3
aac1c3
aac1c3
%post
aac1c3
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
aac1c3
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/virt/vboxguest/vboxguest.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
aac1c3
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/fs/vboxsf/vboxsf.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
aac1c3
printf '%s\n' "/lib/modules/%{kernel_version}.%{_arch}/extra/drivers/gpu/drm/vboxvideo/vboxvideo.ko.xz" >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
aac1c3
aac1c3
aac1c3
%preun
aac1c3
mkdir -p %{_localstatedir}/lib/rpm-state/sig-kmods
aac1c3
rpm -ql kmod-%{pkg}-%{?epoch:%{epoch}:}%{version}-%{release}.%{_arch} | grep '/lib/modules/%{kernel_version}.%{_arch}/.*\.ko\.xz$' >> %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
aac1c3
aac1c3
aac1c3
%postun
aac1c3
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove ]
aac1c3
then
aac1c3
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove) )
aac1c3
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove
aac1c3
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
aac1c3
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules
aac1c3
fi
aac1c3
aac1c3
aac1c3
%pretrans -p <lua>
aac1c3
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add")
aac1c3
posix.unlink("%{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-remove")
aac1c3
aac1c3
aac1c3
%posttrans
aac1c3
if [ -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add ]
aac1c3
then
aac1c3
    modules=( $(cat %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add) )
aac1c3
    rm -f %{_localstatedir}/lib/rpm-state/sig-kmods/weak-modules-add
aac1c3
    rmdir --ignore-fail-on-non-empty %{_localstatedir}/lib/rpm-state/sig-kmods
aac1c3
    printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules
aac1c3
fi
aac1c3
aac1c3
aac1c3
%files
aac1c3
%defattr(644,root,root,755)
aac1c3
/lib/modules/%{kernel_version}.%{_arch}
aac1c3
%license LICENSES
aac1c3
aac1c3
aac1c3
%changelog
Kmods SIG a85b7b
* Thu May 26 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-14
Kmods SIG a85b7b
- Rebuild for 5.14.0-83.el9
Kmods SIG a85b7b
Kmods SIG fde49d
* Fri Apr 22 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-13
Kmods SIG fde49d
- Rebuild for 5.14.0-79.el9
Kmods SIG fde49d
Kmods SIG 7564b4
* Tue Apr 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-12
Kmods SIG 7564b4
- Rebuild for 5.14.0-77.el9
Kmods SIG 7564b4
Kmods SIG 818973
* Tue Mar 22 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-11
Kmods SIG 818973
- Rebuild for 5.14.0-73.el9
Kmods SIG 818973
Kmods SIG 853b70
* Sun Feb 20 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-10
Kmods SIG 853b70
- Rebuild for 5.14.0-62.el9
Kmods SIG 853b70
Kmods SIG 8b5bf4
* Fri Feb 18 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-9
Kmods SIG 8b5bf4
- Rebuild for 5.14.0-60.el9
Kmods SIG 8b5bf4
Kmods SIG e0d329
* Tue Feb 15 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-8
Kmods SIG e0d329
- Rebuild for 5.14.0-58.el9
Kmods SIG e0d329
Kmods SIG c9e9b4
* Sat Feb 12 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-7
Kmods SIG c9e9b4
- Rebuild for 5.14.0-57.el9
Kmods SIG c9e9b4
Kmods SIG b17497
* Thu Feb 10 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-6
Kmods SIG b17497
- Rebuild for 5.14.0-56.el9
Kmods SIG b17497
Kmods SIG 80187d
* Mon Feb 07 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-5
Kmods SIG 80187d
- Rebuild for 5.14.0-55.el9
Kmods SIG 80187d
Kmods SIG 205705
* Wed Feb 02 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-4
Kmods SIG 205705
- Rebuild for 5.14.0-51.el9
Kmods SIG 205705
Kmods SIG 59adeb
* Thu Jan 27 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-3
Kmods SIG 59adeb
- Rebuild for 5.14.0-48.el9
Kmods SIG 59adeb
Kmods SIG a15329
* Tue Jan 25 2022 Kmods SIG <sig-kmods@centosproject.org> - 5.14.0.1-2
Kmods SIG a15329
- Rebuild for 5.14.0-47.el9
Kmods SIG a15329
aac1c3
* Fri Jan 21 2022 Peter Georg <peter.georg@physik.uni-regensburg.de> - 5.14.0.1-1
aac1c3
- Use EL kernel source and versioning
aac1c3
- kABI tracking kmod package (kernel >= 5.14.0-44.el9)