Blame virtualbox-guest-additions.spec

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