# Can be rebuilt with FFmpeg/H264 support enabled by passing "--with=ffmpeg",
# "--with=x264" or "--with=openh264" to mock/rpmbuild; or by globally setting
# these variables:
#global _with_ffmpeg 1
#global _with_x264 1
#global _with_openh264 1
# Momentarily disable GSS support
# https://github.com/FreeRDP/FreeRDP/issues/4348
#global _with_gss 1
# Disable server support in RHEL
# https://bugzilla.redhat.com/show_bug.cgi?id=1639165
%{!?rhel:%global _with_server 1}
# Disable support for missing codecs in RHEL
%{!?rhel:%global _with_soxr 1}
%if 0%{?fedora} || 0%{?rhel} >= 8
%global _with_lame 1
%endif
Name: freerdp
Version: 2.1.1
Release: 5%{?dist}
Summary: Free implementation of the Remote Desktop Protocol (RDP)
License: ASL 2.0
URL: http://www.freerdp.com/
Source0: https://github.com/FreeRDP/FreeRDP/archive/%{version}/FreeRDP-%{version}.tar.gz
Source1: build-config.h
Patch1: winpr-library-Use-RTLD_GLOBAL-for-dlopen.patch
Patch0: Add-checks-for-bitmap-and-glyph-width-heigth-values.patch
# CVE-2021-41159 freerdp: improper client input validation for gateway connections allows to overwrite memory
Patch2: Refactored-RPC-gateway-parser.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: alsa-lib-devel
BuildRequires: cmake >= 2.8
BuildRequires: cups-devel
BuildRequires: gsm-devel
%{?_with_lame:BuildRequires: lame-devel}
BuildRequires: libicu-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: libX11-devel
BuildRequires: libXcursor-devel
BuildRequires: libXdamage-devel
BuildRequires: libXext-devel
BuildRequires: libXi-devel
BuildRequires: libXinerama-devel
BuildRequires: libxkbfile-devel
BuildRequires: libXrandr-devel
%{?_with_server:BuildRequires: libXtst-devel}
BuildRequires: libXv-devel
%{?_with_openh264:BuildRequires: openh264-devel}
%{?_with_x264:BuildRequires: x264-devel}
%{?_with_server:BuildRequires: pam-devel}
BuildRequires: xmlto
BuildRequires: zlib-devel
BuildRequires: pkgconfig(cairo)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(dbus-glib-1)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-base-1.0)
BuildRequires: pkgconfig(gstreamer-app-1.0)
BuildRequires: pkgconfig(gstreamer-audio-1.0)
BuildRequires: pkgconfig(gstreamer-fft-1.0)
BuildRequires: pkgconfig(gstreamer-pbutils-1.0)
BuildRequires: pkgconfig(gstreamer-video-1.0)
%{?_with_gss:BuildRequires: pkgconfig(krb5) >= 1.13}
BuildRequires: pkgconfig(libpcsclite)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(openssl)
%{?_with_soxr:BuildRequires: pkgconfig(soxr)}
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-scanner)
BuildRequires: pkgconfig(xkbcommon)
%{?_with_ffmpeg:
BuildRequires: pkgconfig(libavcodec) >= 57.48.101
BuildRequires: pkgconfig(libavutil)
}
Provides: xfreerdp = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: libwinpr%{?_isa} = %{version}-%{release}
%description
The xfreerdp & wlfreerdp Remote Desktop Protocol (RDP) clients from the FreeRDP
project.
xfreerdp & wlfreerdp can connect to RDP servers such as Microsoft Windows
machines, xrdp and VirtualBox.
%package libs
Summary: Core libraries implementing the RDP protocol
Requires: libwinpr%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-plugins < 2.0.0
Provides: %{name}-plugins = %{version}-%{release}
%description libs
libfreerdp-core can be embedded in applications.
libfreerdp-channels and libfreerdp-kbd might be convenient to use in X
applications together with libfreerdp-core.
libfreerdp-core can be extended with plugins handling RDP channels.
%package devel
Summary: Development files for %{name}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: pkgconfig
Requires: cmake >= 2.8
%description devel
The %{name}-devel package contains libraries and header files for developing
applications that use %{name}-libs.
%{?_with_server:
%package server
Summary: Server support for %{name}
Requires: libwinpr%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description server
The %{name}-server package contains servers which can export a desktop via
the RDP protocol.
}
%package -n libwinpr
Summary: Windows Portable Runtime
Provides: %{name}-libwinpr = %{version}-%{release}
%description -n libwinpr
WinPR provides API compatibility for applications targeting non-Windows
environments. When on Windows, the original native API is being used instead of
the equivalent WinPR implementation, without having to modify the code using it.
%package -n libwinpr-devel
Summary: Windows Portable Runtime development files
Requires: libwinpr%{?_isa} = %{version}-%{release}
Requires: pkgconfig
Requires: cmake >= 2.8
%description -n libwinpr-devel
The %{name}-libwinpr-devel package contains libraries and header files for
developing applications that use %{name}-libwinpr.
%prep
%autosetup -p1 -n FreeRDP-%{version}
# Rpmlint fixes
find . -name "*.h" -exec chmod 664 {} \;
find . -name "*.c" -exec chmod 664 {} \;
%build
%cmake %{?_cmake_skip_rpath} \
-DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
-DWITH_ALSA=ON \
-DWITH_CUPS=ON \
-DWITH_CHANNELS=ON -DBUILTIN_CHANNELS=OFF \
-DWITH_CLIENT=ON \
-DWITH_DIRECTFB=OFF \
-DWITH_FFMPEG=%{?_with_ffmpeg:ON}%{?!_with_ffmpeg:OFF} \
-DWITH_GSM=ON \
-DWITH_GSSAPI=%{?_with_gss:ON}%{?!_with_gss:OFF} \
-DWITH_GSTREAMER_1_0=ON -DWITH_GSTREAMER_0_10=OFF \
-DGSTREAMER_1_0_INCLUDE_DIRS=%{_includedir}/gstreamer-1.0 \
-DWITH_ICU=ON \
-DWITH_IPP=OFF \
-DWITH_JPEG=ON \
-DWITH_LAME=%{?_with_lame:ON}%{?!_with_lame:OFF} \
-DWITH_MANPAGES=ON \
-DWITH_OPENH264=%{?_with_openh264:ON}%{?!_with_openh264:OFF} \
-DWITH_OPENSSL=ON \
-DWITH_PCSC=ON \
-DWITH_PULSE=ON \
-DWITH_SERVER=%{?_with_server:ON}%{?!_with_server:OFF} \
-DWITH_SERVER_INTERFACE=%{?_with_server:ON}%{?!_with_server:OFF} \
-DWITH_SHADOW_X11=%{?_with_server:ON}%{?!_with_server:OFF} \
-DWITH_SHADOW_MAC=%{?_with_server:ON}%{?!_with_server:OFF} \
-DWITH_SOXR=%{?_with_soxr:ON}%{?!_with_soxr:OFF} \
-DWITH_WAYLAND=ON \
-DWITH_X11=ON \
-DWITH_X264=%{?_with_x264:ON}%{?!_with_x264:OFF} \
-DWITH_XCURSOR=ON \
-DWITH_XEXT=ON \
-DWITH_XKBFILE=ON \
-DWITH_XI=ON \
-DWITH_XINERAMA=ON \
-DWITH_XRENDER=ON \
-DWITH_XTEST=%{?_with_server:ON}%{?!_with_server:OFF} \
-DWITH_XV=ON \
-DWITH_ZLIB=ON \
%ifarch x86_64
-DWITH_SSE2=ON \
-DWITH_VAAPI=%{?_with_ffmpeg:ON}%{?!_with_ffmpeg:OFF} \
%else
-DWITH_SSE2=OFF \
%endif
%ifarch armv7hl
-DARM_FP_ABI=hard \
-DWITH_NEON=OFF \
%endif
%ifarch armv7hnl
-DARM_FP_ABI=hard \
-DWITH_NEON=ON \
%endif
%ifarch armv5tel armv6l armv7l
-DARM_FP_ABI=soft \
-DWITH_NEON=OFF \
%endif
.
%make_build
pushd winpr/tools/makecert-cli
%make_build
popd
%install
%make_install
%make_install COMPONENT=tools
find %{buildroot} -name "*.a" -delete
# build-config.h is not multilib clean and multilib-rpm-config is not available
mv $RPM_BUILD_ROOT/%{_includedir}/freerdp2/freerdp/build-config.h $RPM_BUILD_ROOT/%{_includedir}/freerdp2/freerdp/build-config-`getconf LONG_BIT`.h
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_includedir}/freerdp2/freerdp/
%files
%{_bindir}/winpr-hash
%{_bindir}/winpr-makecert
%{_bindir}/wlfreerdp
%{_bindir}/xfreerdp
%{_mandir}/man1/winpr-hash.1*
%{_mandir}/man1/winpr-makecert.1*
%{_mandir}/man1/wlfreerdp.1*
%{_mandir}/man1/xfreerdp.1*
%files libs
%license LICENSE
%doc README.md ChangeLog
%{_libdir}/freerdp2/
%{_libdir}/libfreerdp-client2.so.*
%{?_with_server:
%{_libdir}/libfreerdp-server2.so.*
%{_libdir}/libfreerdp-shadow2.so.*
%{_libdir}/libfreerdp-shadow-subsystem2.so.*
}
%{_libdir}/libfreerdp2.so.*
%{_libdir}/libuwac0.so.*
%{_mandir}/man7/wlog.*
%files devel
%{_includedir}/freerdp2
%{_includedir}/uwac0
%{_libdir}/cmake/FreeRDP2
%{_libdir}/cmake/FreeRDP-Client2
%{?_with_server:
%{_libdir}/cmake/FreeRDP-Server2
%{_libdir}/cmake/FreeRDP-Shadow2
}
%{_libdir}/cmake/uwac0
%{_libdir}/libfreerdp-client2.so
%{?_with_server:
%{_libdir}/libfreerdp-server2.so
%{_libdir}/libfreerdp-shadow2.so
%{_libdir}/libfreerdp-shadow-subsystem2.so
}
%{_libdir}/libfreerdp2.so
%{_libdir}/libuwac0.so
%{_libdir}/pkgconfig/freerdp2.pc
%{_libdir}/pkgconfig/freerdp-client2.pc
%{?_with_server:
%{_libdir}/pkgconfig/freerdp-server2.pc
%{_libdir}/pkgconfig/freerdp-shadow2.pc
}
%{_libdir}/pkgconfig/uwac0.pc
%{?_with_server:
%files server
%{_bindir}/freerdp-proxy
%{_bindir}/freerdp-shadow-cli
%{_mandir}/man1/freerdp-shadow-cli.1*
}
%files -n libwinpr
%license LICENSE
%doc README.md ChangeLog
%{_libdir}/libwinpr2.so.*
%{_libdir}/libwinpr-tools2.so.*
%files -n libwinpr-devel
%{_libdir}/cmake/WinPR2
%{_includedir}/winpr2
%{_libdir}/libwinpr2.so
%{_libdir}/libwinpr-tools2.so
%{_libdir}/pkgconfig/winpr2.pc
%{_libdir}/pkgconfig/winpr-tools2.pc
%changelog
* Tue Nov 09 2021 Jan Grulich <jgrulich@redhat.com> - 2:2.2.0-5
- Update: Refactored RPC gateway parser (rhbz#2017944)
+ fix issues discovered by Covscan
* Mon Nov 08 2021 Jan Grulich <jgrulich@redhat.com> - 2:2.2.0-4
- Refactored RPC gateway parser (rhbz#2017944)
* Fri Nov 05 2021 Felipe Borges <feborges@redhat.com> - 2.1.1-3
- Add checks for bitmap and glyph width/heigth values (rhbz#2017951)
* Mon May 25 2020 Ondrej Holy <oholy@redhat.com> - 2.1.1-2
- Update to 2.1.1 (#1834286)
* Wed May 20 2020 Ondrej Holy <oholy@redhat.com> - 2.0.0-4.rc4
- CVE-2020-11521: Fix out-of-bounds write in planar.c (#1837621)
- CVE-2020-11523: Fix integer overflow in region.c (#1837622)
- CVE-2020-11524: Fix out-of-bounds write in interleaved.c (#1837623)
* Mon Mar 30 2020 Ondrej Holy <oholy@redhat.com> - 2.0.0-2.rc4
- Fix SCARD_INSUFFICIENT_BUFFER error (#1765199)
* Wed Feb 20 2019 Ondrej Holy <oholy@redhat.com> - 2.0.0-1.rc4
- Update to 2.0.0-rc4 (#1291254)
* Wed Jan 31 2018 Ondrej Holy <oholy@redhat.com> - 1.0.2-15
- Fix smartcard usage in manpage (#1428041)
* Thu Nov 23 2017 Ondrej Holy <oholy@redhat.com> - 1.0.2-14
- Add FIPS mode support (#1363811)
* Thu Oct 5 2017 Ondrej Holy <oholy@redhat.com> - 1.0.2-13
- Fix NTLM on big endian (#1204742)
- Fix colors on big endian (#1308810)
* Thu Sep 21 2017 Ondrej Holy <oholy@redhat.com> - 1.0.2-12
- Add description for available plugins (#1428041)
* Thu Sep 7 2017 Ondrej Holy <oholy@redhat.com> - 1.0.2-11
- Use boolean types defined stdbool.h (#1404575)
- Prevent stucked keys on focus out and unmap events (#1415069)
- Fix crashes when copying images (#1417536)
- Enable TLS 1.1 connections and later (#1312967)
* Mon Apr 18 2016 Ondrej Holy <oholy@redhat.com> - 1.0.2-10
- Add support for wildcard certificates (#1275241)
* Wed Apr 6 2016 Ondrej Holy <oholy@redhat.com> - 1.0.2-9
- Fix crash if requested bitmap isn't in cache (#1311164)
* Wed Apr 6 2016 Ondrej Holy <oholy@redhat.com> - 1.0.2-8
- Fix crash if pulseaudio device isn't specified (#1067543)
* Fri Jan 15 2016 Ondrej Holy <oholy@redhat.com> - 1.0.2-7
- Fix crashes in pulseaudio
- Resolves: #1210049
* Thu Mar 19 2015 Ondrej Holy <oholy@redhat.com> - 1.0.2-6
- Fix crash during CA verification caused by invalid pointer dereference
- Resolves: #1186916
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.0.2-5
- Mass rebuild 2014-01-24
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.0.2-4
- Mass rebuild 2013-12-27
* Thu Dec 19 2013 Soren Sandmann <ssp@redhat.com> - 1.0.2-3
- Man page fixes
- Document that multiple connections don't work (988294)
- Document the list of plugins (988307, 988308)
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jan 02 2013 Mads Kiilerich <mads@kiilerich.com> - 1.0.2-1
- freerdp-1.0.2
* Sun Sep 30 2012 Mads Kiilerich <mads@kiilerich.com> - 1.0.1-7
- merge f17 1.0.1-6 - Backport fix for bug 816692
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Wed Feb 29 2012 Mads Kiilerich <mads@kiilerich.com> - 1.0.1-5
- Use new upstream tar with standard naming
- Use _isa for subpackage dependencies
* Tue Feb 28 2012 Mads Kiilerich <mads@kiilerich.com> - 1.0.1-4
- Include patch for sending invalid extra data
* Tue Feb 28 2012 Mads Kiilerich <mads@kiilerich.com> - 1.0.1-3
- Install a freedesktop .desktop file and a high-res icon instead of relying on
_NET_WM_ICON
* Sat Feb 25 2012 Mads Kiilerich <mads@kiilerich.com> - 1.0.1-2
- Explicit build requirement for xmlto - needed for EL6
* Wed Feb 22 2012 Mads Kiilerich <mads@kiilerich.com> - 1.0.1-1
- FreeRDP-1.0.1 - major upstream rewrite and relicensing under Apache license
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Jan 28 2011 Mads Kiilerich <mads@kiilerich.com> - 0.8.2-2
- rebuild on rawhide because of broken dependencies
* Tue Nov 16 2010 Mads Kiilerich <mads@kiilerich.com> - 0.8.2-1
- freerdp-0.8.2
* Mon Nov 08 2010 Mads Kiilerich <mads@kiilerich.com> - 0.8.1-2
- make -devel require pkgconfig
- first official Fedora package
* Sun Nov 07 2010 Mads Kiilerich <mads@kiilerich.com> - 0.8.1-1
- freerdp-0.8.1
* Sat Sep 25 2010 Mads Kiilerich <mads@kiilerich.com> - 0.7.4-2
- hack the generated libtool to not set rpath on x86_64
- configure with alsa explicitly
* Tue Aug 24 2010 Mads Kiilerich <mads@kiilerich.com> - 0.7.4-1
- freerdp-0.7.4
- cleanup of packaging structure
* Wed Jul 28 2010 Mads Kiilerich <mads@kiilerich.com> - 0.7.3-1
- 0.7.3
- fix some minor pylint warnings
* Fri Jul 23 2010 Mads Kiilerich <mads@kiilerich.com> - 0.7.2-2
- 0.7.2
- Address many comments from cwickert:
- - cleanup of old formatting, alignment with spectemplate-lib.spec and
cwickert spec from #616193
- - add alsa as build requirement
- - remove superfluous configure options and disable static libs
- - add missing rpm groups
* Sun Jun 13 2010 Mads Kiilerich <mads@kiilerich.com> - 0.7.0-1
- First official release, first review request