Blame virtualbox-guest-additions.spec

Hans de Goede 32e434
%global __provides_exclude_from %{_libdir}/VBoxGuestAdditions
Hans de Goede 32e434
Hans de Goede 32e434
Name:       virtualbox-guest-additions
Hans de Goede af89b1
Version:    6.0.2
Hans de Goede af89b1
Release:    1%{?dist}
Hans de Goede 32e434
Summary:    VirtualBox Guest Additions
Hans de Goede 32e434
License:    GPLv2 or (GPLv2 and CDDL)
Hans de Goede bf502b
URL:        https://www.virtualbox.org/wiki/VirtualBox
Hans de Goede 32e434
Hans de Goede bf502b
Source0:    https://download.virtualbox.org/virtualbox/%{version}/VirtualBox-%{version}.tar.bz2
Hans de Goede 32e434
Source1:    vboxservice.service
Hans de Goede 32e434
Source2:    96-vbox.preset
Hans de Goede 32e434
Source3:    VirtualBox-60-vboxguest.rules
Hans de Goede 32e434
Source4:    VBoxOGLRun.sh
Hans de Goede 32e434
Hans de Goede 32e434
# Mainline vboxsf uses an option string rather then a custom binary data struct
Hans de Goede 32e434
Patch2:     0001-VBoxServiceAutoMount-Change-Linux-mount-code-to-use-.patch
Hans de Goede 32e434
# Do not show an error dialog when not running under vbox
8643fd
Patch3:     VirtualBox-5.2.10-xclient.patch
Hans de Goede 09d8bc
# Fix build with gcc8
3cbba6
#Patch4:     VirtualBox-5.2.6-gcc8.patch
56bd2d
# From Archlinux
56bd2d
Patch10:    010-linux-4.16-mount-fixes.patch
Björn Esser cf4c00
# To fix build with Fedora 30.
Björn Esser cf4c00
Patch11:    VirtualBox-6.0.0-fix-build.patch
Hans de Goede 32e434
49394e
BuildRequires:  gcc-c++
94f1fe
BuildRequires:  kBuild >= 0.1.9998.r3093
94f1fe
BuildRequires:  python2-devel
Hans de Goede 32e434
BuildRequires:  desktop-file-utils
Hans de Goede 210826
# for xsltproc
Hans de Goede 210826
BuildRequires:  libxslt
Hans de Goede 32e434
BuildRequires:  makeself
Hans de Goede 32e434
BuildRequires:  yasm
Hans de Goede 32e434
BuildRequires:  boost-devel
Hans de Goede 32e434
BuildRequires:  libXcomposite-devel
Hans de Goede 32e434
BuildRequires:  libXmu-devel
Hans de Goede 32e434
BuildRequires:  libXrandr-devel
Hans de Goede 32e434
BuildRequires:  libXt-devel
Hans de Goede 32e434
BuildRequires:  mesa-libEGL-devel
Hans de Goede 32e434
BuildRequires:  mesa-libGL-devel
Hans de Goede 32e434
BuildRequires:  mesa-libGLU-devel
Hans de Goede 32e434
BuildRequires:  openssl-devel
Hans de Goede 32e434
BuildRequires:  pam-devel
Hans de Goede 32e434
BuildRequires:  zlib-devel
Hans de Goede 32e434
# For the OpenGL passthru libs, these are statically linked against libstdc++
Hans de Goede 32e434
# like mesa itself is to avoid trouble with game-runtimes providing their
Hans de Goede 32e434
# own older libstdc++ (e.g. steam does this)
Hans de Goede 32e434
BuildRequires:  libstdc++-static
Hans de Goede 32e434
%{?systemd_requires}
1e2bdf
BuildRequires: systemd
1e2bdf
Hans de Goede 32e434
# Obsoletes/provides for upgrade path from the rpmfusion guest-additions pkg
Hans de Goede 32e434
Obsoletes:      VirtualBox-guest-additions < %{version}-%{release}
Hans de Goede 32e434
Provides:       VirtualBox-guest-additions = %{version}-%{release}
Hans de Goede 32e434
Provides:       VirtualBox-kmod-common = %{version}-%{release}
Hans de Goede 32e434
# Virtual Box guests are always x86, no need to build for other archs
Hans de Goede 32e434
ExclusiveArch:  i686 x86_64
6555dc
# Hack to solve problem described in
6555dc
# https://bugzilla.rpmfusion.org/show_bug.cgi?id=4980#c8
6555dc
# we conflict with next (bigger, not equal or bigger) version of VirtualBox
6555dc
# to force instalation of same version VirtualBox-kmodsrc and virtualBox-guest-additions
6555dc
Conflicts:      VirtualBox-server > %{version}-%{release}
Hans de Goede 32e434
Hans de Goede 32e434
%description
Hans de Goede 32e434
VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for
Hans de Goede 32e434
enterprise as well as home use. This package contains the VirtualBox
Hans de Goede 32e434
Guest Additions which support better integration of VirtualBox guests
Hans de Goede 32e434
with the Host, including file sharing, clipboard sharing and Seamless mode.
Hans de Goede 32e434
Hans de Goede 32e434
Hans de Goede 32e434
%package        ogl
Hans de Goede 32e434
Summary:        GL pass-through support
Hans de Goede 32e434
Hans de Goede 32e434
%description    ogl
Hans de Goede 32e434
The %{name}-ogl package contains an alternate libGL.so.1
Hans de Goede 32e434
which renders GL by passing all GL commands through to the host.
Hans de Goede 32e434
Hans de Goede 32e434
To use OpenGL pass-through mode run apps using "VBoxOGLRun foo -opt1 -opt2".
Hans de Goede 32e434
Hans de Goede 32e434
Hans de Goede 32e434
%prep
Hans de Goede 32e434
%autosetup -p1 -n VirtualBox-%{version}
Hans de Goede 32e434
# Remove prebuilt binaries
Hans de Goede 32e434
find -name '*.py[co]' -delete
Hans de Goede 32e434
rm -r kBuild/
Hans de Goede 32e434
rm -r tools/
Hans de Goede 32e434
# Remove bundle X11 sources and some lib sources
Hans de Goede 32e434
rm -r src/VBox/Additions/x11/x11include/
Hans de Goede 32e434
rm -r src/VBox/Additions/x11/x11stubs/
Hans de Goede 32e434
rm include/VBox/HostServices/glext.h
Hans de Goede 32e434
rm include/VBox/HostServices/glxext.h
Hans de Goede 32e434
rm include/VBox/HostServices/wglext.h
Hans de Goede 32e434
rm -r src/libs/libxml2-2.9.*/
Hans de Goede 32e434
rm -r src/libs/libpng-1.2.*/
Hans de Goede 32e434
rm -r src/libs/zlib-1.2.8/
Hans de Goede 32e434
# CRLF->LF
Hans de Goede 32e434
sed -i 's/\r//' COPYING
Hans de Goede 32e434
Hans de Goede 32e434
Hans de Goede 32e434
%build
Hans de Goede 32e434
./configure --only-additions --disable-kmods
Hans de Goede 32e434
. ./env.sh
Hans de Goede 32e434
umask 0022
Hans de Goede 32e434
Hans de Goede 32e434
# VirtualBox build system installs and builds in the same step,
Hans de Goede 32e434
# not allways looking for the installed files to places they have
Hans de Goede 32e434
# really been installed to. Therefore we do not override any of
Hans de Goede 32e434
# the installation paths, but install the tree with the default
Hans de Goede 32e434
# layout under 'obj' and shuffle files around in %%install.
Hans de Goede 32e434
kmk %{_smp_mflags}                                             \
Hans de Goede 32e434
    KBUILD_VERBOSE=2                                           \
Hans de Goede 32e434
    PATH_OUT="$PWD/obj"                                        \
Hans de Goede 32e434
    TOOL_YASM_AS=yasm                                          \
Hans de Goede 32e434
    VBOX_WITH_TESTCASES=                                       \
Hans de Goede 32e434
    VBOX_WITH_VALIDATIONKIT=                                   \
Hans de Goede 32e434
    VBOX_USE_SYSTEM_XORG_HEADERS=1                             \
Hans de Goede 32e434
    VBOX_USE_SYSTEM_GL_HEADERS=1                               \
56bd2d
    VBOX_NO_LEGACY_XORG_X11=1                                  \
Hans de Goede 32e434
    SDK_VBOX_LIBPNG_INCS=""                                    \
Hans de Goede 32e434
    SDK_VBOX_LIBXML2_INCS=""                                   \
Hans de Goede 32e434
    SDK_VBOX_OPENSSL_INCS=""                                   \
2f59a4
    SDK_VBOX_OPENSSL_LIBS="ssl crypto"                         \
56bd2d
    SDK_VBOX_ZLIB_INCS=""                                      \
Hans de Goede 32e434
    VBOX_BUILD_PUBLISHER=_Fedora
Hans de Goede 32e434
Hans de Goede 32e434
Hans de Goede 32e434
%install
Hans de Goede 32e434
# The directory layout created below attempts to mimic the one of
Hans de Goede 32e434
# the commercially supported version to minimize confusion
Hans de Goede 32e434
mkdir -p %{buildroot}%{_bindir}
Hans de Goede 32e434
mkdir -p %{buildroot}%{_sbindir}
Hans de Goede 32e434
mkdir -p %{buildroot}%{_libdir}/security
Hans de Goede 32e434
mkdir -p %{buildroot}%{_libdir}/VBoxGuestAdditions
Hans de Goede 32e434
Hans de Goede 32e434
install -m 0755 -t %{buildroot}%{_sbindir}   \
Hans de Goede 32e434
    obj/bin/additions/VBoxService
Hans de Goede 32e434
install -m 0755 -t %{buildroot}%{_bindir}    \
Hans de Goede 32e434
    obj/bin/additions/VBoxClient             \
Hans de Goede 32e434
    obj/bin/additions/VBoxControl
Hans de Goede 32e434
Hans de Goede 32e434
install -m 0755 -t %{buildroot}%{_libdir}/security \
Hans de Goede 32e434
    obj/bin/additions/pam_vbox.so
Hans de Goede 32e434
install -m 0755 -t %{buildroot}%{_libdir}/VBoxGuestAdditions \
Hans de Goede 32e434
    obj/bin/additions/VBoxOGL*.so
Hans de Goede 32e434
ln -s VBoxOGL.so %{buildroot}%{_libdir}/VBoxGuestAdditions/libGL.so.1
Hans de Goede 32e434
Hans de Goede 32e434
install -p -m 0755 -D src/VBox/Additions/x11/Installer/98vboxadd-xclient \
Hans de Goede 32e434
    %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/98vboxadd-xclient.sh
Hans de Goede 32e434
ln -s ../..%{_sysconfdir}/X11/xinit/xinitrc.d/98vboxadd-xclient.sh \
Hans de Goede 32e434
    %{buildroot}%{_bindir}/VBoxClient-all
Hans de Goede 32e434
desktop-file-install --dir=%{buildroot}%{_sysconfdir}/xdg/autostart/ \
Hans de Goede 32e434
    --remove-key=Encoding src/VBox/Additions/x11/Installer/vboxclient.desktop
Hans de Goede 32e434
desktop-file-validate \
Hans de Goede 32e434
    %{buildroot}%{_sysconfdir}/xdg/autostart/vboxclient.desktop
Hans de Goede 32e434
Hans de Goede 32e434
install -p -m 0644 -D %{SOURCE1} %{buildroot}%{_unitdir}/vboxservice.service
Hans de Goede 32e434
install -p -m 0644 -D %{SOURCE2} %{buildroot}%{_presetdir}/96-vbox.preset
Hans de Goede 32e434
install -p -m 0644 -D %{SOURCE3} %{buildroot}%{_udevrulesdir}/60-vboxguest.rules
Hans de Goede 32e434
install -p -m 0755 -D %{SOURCE4} %{buildroot}%{_bindir}/VBoxOGLRun
Hans de Goede 32e434
Hans de Goede 32e434
Hans de Goede 32e434
%pre
Hans de Goede 32e434
# Add a group "vboxsf" for Shared Folders access
Hans de Goede 32e434
# All users which want to access the auto-mounted Shared Folders have to
Hans de Goede 32e434
# be added to this group.
Hans de Goede 32e434
getent group vboxsf >/dev/null || groupadd -r vboxsf 2>&1
Hans de Goede 32e434
getent passwd vboxadd >/dev/null || \
Hans de Goede 32e434
    useradd -r -g 1 -d /var/run/vboxadd -s /sbin/nologin vboxadd 2>&1
Hans de Goede 32e434
Hans de Goede 32e434
%post
Hans de Goede 32e434
%systemd_post vboxservice.service
Hans de Goede 32e434
Hans de Goede 32e434
%preun
Hans de Goede 32e434
%systemd_preun vboxservice.service
Hans de Goede 32e434
Hans de Goede 32e434
%postun
Hans de Goede 32e434
%systemd_postun_with_restart vboxservice.service
Hans de Goede 32e434
Hans de Goede 32e434
Hans de Goede 32e434
%files
Hans de Goede 32e434
%license COPYING*
Hans de Goede 32e434
%{_bindir}/VBoxClient
Hans de Goede 32e434
%{_bindir}/VBoxControl
Hans de Goede 32e434
%{_bindir}/VBoxClient-all
Hans de Goede 32e434
%{_sbindir}/VBoxService
Hans de Goede 32e434
%{_libdir}/security/pam_vbox.so
Hans de Goede 32e434
%{_sysconfdir}/X11/xinit/xinitrc.d/98vboxadd-xclient.sh
Hans de Goede 32e434
%{_sysconfdir}/xdg/autostart/vboxclient.desktop
Hans de Goede 32e434
%{_unitdir}/vboxservice.service
Hans de Goede 32e434
%{_presetdir}/96-vbox.preset
Hans de Goede 32e434
%{_udevrulesdir}/60-vboxguest.rules
Hans de Goede 32e434
Hans de Goede 32e434
%files ogl
Hans de Goede 32e434
%license COPYING*
Hans de Goede 32e434
%{_bindir}/VBoxOGLRun
Hans de Goede 32e434
%{_libdir}/VBoxGuestAdditions
Hans de Goede 32e434
Hans de Goede 32e434
Hans de Goede 32e434
%changelog
Hans de Goede af89b1
* Wed Jan 23 2019 Hans de Goede <hdegoede@redhat.com> - 6.0.2-1
Hans de Goede af89b1
- Update Virtualbox Guest Additions to 6.0.2, security fix version
Hans de Goede af89b1
Björn Esser ce8952
* Mon Jan 14 2019 Björn Esser <besser82@fedoraproject.org> - 6.0.0-2
Björn Esser ce8952
- Rebuilt for libcrypt.so.2 (#1666033)
Björn Esser cf4c00
- Add a patch to fix build on Fedora 30
Björn Esser ce8952
8c7d23
* Thu Dec 20 2018 Sérgio Basto <sergio@serjux.com> - 6.0.0-1
8c7d23
- VirtualBox 6.0.0
8c7d23
3cbba6
* Mon Nov 12 2018 Sérgio Basto <sergio@serjux.com> - 5.2.22-1
3cbba6
- Update Virtualbox Guest Additions to 5.2.22, security fix version
3cbba6
abda82
* Sat Oct 20 2018 Sérgio Basto <sergio@serjux.com> - 5.2.20-1
abda82
- Update Virtualbox Guest Additions to 5.2.20, bugfix version
abda82
e4a441
* Thu Aug 30 2018 Sérgio Basto <sergio@serjux.com> - 5.2.18-1
e4a441
- Update Virtualbox Guest Additions to 5.2.18
e4a441
6555dc
* Wed Aug 01 2018 Sérgio Basto <sergio@serjux.com> - 5.2.16-2
6555dc
- Force instalation of same version VirtualBox-kmodsrc and
6555dc
  virtualBox-guest-additions
6555dc
ded9f4
* Sat Jul 21 2018 Sérgio Basto <sergio@serjux.com> - 5.2.16-1
ded9f4
- Update Virtualbox Guest Additions to 5.2.16
ded9f4
Fedora Release Engineering 1f2541
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.14-2
Fedora Release Engineering 1f2541
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
49394e
- https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
Fedora Release Engineering 1f2541
4b547c
* Mon Jul 02 2018 Sérgio Basto <sergio@serjux.com> - 5.2.14-1
4b547c
- Update Virtualbox Guest Additions to 5.2.14
4b547c
56bd2d
* Sat May 12 2018 Sérgio Basto <sergio@serjux.com> - 5.2.12-1
56bd2d
- Update to 5.2.12
56bd2d
8643fd
* Sun Apr 22 2018 Sérgio Basto <sergio@serjux.com> - 5.2.10-1
8643fd
- Update to 5.2.10
8643fd
Hans de Goede bf502b
* Thu Mar  1 2018 Hans de Goede <hdegoede@redhat.com> - 5.2.8-1
Hans de Goede bf502b
- Update to 5.2.8
Hans de Goede bf502b
- Use https for all URLs
Hans de Goede bf502b
Hans de Goede 32e434
* Wed Feb  7 2018 Hans de Goede <hdegoede@redhat.com> - 5.2.6-4
Hans de Goede 32e434
- Do not use pkg-config for includes, as pkg-config prefixes an unwanted -I
Hans de Goede 32e434
- Fix /etc/X11/xinit/xinitrc.d/98vboxadd-xclient.sh to now show an error
Hans de Goede 32e434
  notification when not running under vbox, as we will be part of the
Hans de Goede 32e434
  Workstation livecd which may run anywhere
Hans de Goede 32e434
Hans de Goede 32e434
* Mon Jan 29 2018 Hans de Goede <hdegoede@redhat.com> - 5.2.6-3
Hans de Goede 32e434
- Update to 5.2.6
Hans de Goede 32e434
- Drop VirtualBox-4.3.0-no-bundles.patch, set make variables instead
Hans de Goede 32e434
- Adjust automount vboxservice for mainline vboxsf filesystem driver
Hans de Goede 32e434
- Drop mount.vboxsf, the mainline vboxsf filesystem driver works with the
Hans de Goede 32e434
  regular mount binary
Hans de Goede 32e434
- Drop commented out Requires: kernel, this is bad idea (rhbz#1534595)
Hans de Goede 32e434
- Use pkgconfig to get include/libs instead of hardcoding (rhbz#1534595)
Hans de Goede 32e434
- Rename to lowercaps virtualbox-guest-additions, add Obsoletes / Provides
Hans de Goede 32e434
  for upgradepath from rpmfusion (rhbz#1534595)
Hans de Goede 32e434
- Add Provides: VirtualBox-kmod-common for rpmfusion upgradepath (rhbz#1534595)
Hans de Goede 32e434
- Latest rpmfusion Release is 2, set our Release field to 3
Hans de Goede 32e434
Hans de Goede 32e434
* Sun Nov 26 2017 Hans de Goede <hdegoede@redhat.com> - 5.2.2-1
Hans de Goede 32e434
- Update to 5.2.2
Hans de Goede 32e434
Hans de Goede 32e434
* Thu Sep 21 2017 Hans de Goede <hdegoede@redhat.com> - 5.2.0-0.1.svn68769
Hans de Goede 32e434
- Switch to a 5.2 svn snapshot, as 5.2 has a new /dev/vboxguest ioctl API
Hans de Goede 32e434
  which the mainline version of the vboxguest drivers implement
Hans de Goede 32e434
Hans de Goede 32e434
* Mon Aug 28 2017 Hans de Goede <hdegoede@redhat.com> - 5.1.26-3
Hans de Goede 32e434
- Put the libGL.so.1 replacement libs and VBoxOGLRun scripts in an -ogl
Hans de Goede 32e434
  subpackage, so that people can install both the i686 and x86_64 versions.
Hans de Goede 32e434
- Filter out libGL.so.1 provides
Hans de Goede 32e434
Hans de Goede 32e434
* Mon Aug 14 2017 Hans de Goede <hdegoede@redhat.com> - 5.1.26-2
Hans de Goede 32e434
- Initial Fedora package based on the guest-addition parts of the
Hans de Goede 32e434
  rpmfusion VirtualBox package