Package freerdp: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
%def_with ffmpeg
# X264 backend not implemented, please review your configuration!
%def_without x264
%def_without directfb
# see https://github.com/FreeRDP/FreeRDP/issues/4348
%def_without gss
%def_without mbedtls

Name: freerdp
Version: 2.4.1
Release: alt1

Group: Networking/Remote access
Summary: Remote Desktop Protocol functionality
License: Apache-2.0
URL: http://www.freerdp.com
Packager: Andrey Cherepanov <cas@altlinux.org>

Source: %name-%version.tar
Patch2000: %name-e2k.patch

Requires: xfreerdp = %EVR
Requires: wlfreerdp = %EVR
Requires: %name-plugins-standard = %EVR

BuildRequires(pre): cmake
BuildRequires: gcc-c++
BuildRequires: extra-cmake-modules
BuildRequires: docbook-style-xsl git-core xmlto libpcre-devel
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(libpcsclite)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-cursor)
BuildRequires: pkgconfig(wayland-scanner)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xdamage)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xtst)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xinerama)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(xkbfile)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xv)
BuildRequires: pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires: pkgconfig(libpulse)
%{?_with_directfb:BuildRequires: pkgconfig(directfb)}
BuildRequires: libcups-devel libjpeg-devel zlib-devel
%{?_with_ffmpeg:BuildRequires: libavcodec-devel libavutil-devel libavresample-devel libswresample-devel}
%{?_with_x264:BuildRequires: libx264-devel}
BuildRequires: libkrb5-devel
BuildRequires: wayland-devel
%if_with mbedtls
BuildRequires: libmbedtls-devel
%endif
BuildRequires: libgsm-devel
BuildRequires: liblame-devel
BuildRequires: libfaad-devel
BuildRequires: libfaac-devel
BuildRequires: libsoxr-devel
BuildRequires: libffi-devel
BuildRequires: liborc-devel
BuildRequires: libicu-devel
BuildRequires: libcairo-devel
BuildRequires: libpixman-devel
BuildRequires: libexpat-devel
BuildRequires: libXdmcp-devel
BuildRequires: bzlib-devel
BuildRequires: libuuid-devel
BuildRequires: libudev-devel
BuildRequires: libusb-devel
BuildRequires: libdbus-glib-devel
%ifnarch %e2k
BuildRequires: patchelf
%endif

%description
freerdp implements Remote Desktop Protocol (RDP), used in a number of Microsoft
products. Rdesktop analog.

This is metapackage.

%package -n xfreerdp
Summary: Remote Desktop Protocol client
Group: Networking/Remote access
Requires: lib%name = %EVR

%description -n xfreerdp
xfreerdp is a client for Remote Desktop Protocol (RDP), used in a number of
Microsoft products.

This package contains X11 UI.

%package -n dfreerdp
Summary: Remote Desktop Protocol client
Group: Networking/Remote access
Provides: dfbfreerdp
Requires: lib%name = %EVR

%description -n dfreerdp
dfbfreerdp is a client for Remote Desktop Protocol (RDP), used in a number of
Microsoft products.

This package contains DirectFB UI.

%package -n wlfreerdp
Summary: Remote Desktop Protocol client
Group: Networking/Remote access
Requires: lib%name = %EVR

%description -n wlfreerdp
wlfreerdp is a client for Remote Desktop Protocol (RDP), used in a number of
Microsoft products.

This package contains Wayland UI.

%package -n lib%name
Summary: Core libraries implementing the RDP protocol
Group: System/Libraries

%description -n lib%name
libfreerdp can be embedded in applications.

%package -n lib%name-server
Summary: Remote Desktop Viewer server library
Group: System/Libraries

%description -n lib%name-server
FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
following the Microsoft Open Specifications. This package provides the shared
libraries used by the server.

%package -n libwinpr
Summary: Windows Portable Runtime
Group: System/Libraries

%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
Group: Development/C
Requires: libwinpr = %EVR

%description -n libwinpr-devel
The libwinpr-devel package contains libraries and header files for
developing applications that use libwinpr.

%package -n libuwac
Summary: Use wayland as a client
Group: System/Libraries

%description -n libuwac
Remote Desktop Toolkit library. Contains the libuwac libraries.

%package -n     libuwac-devel
Summary: Remote Desktop Toolkit libuwac development files
Group: Development/C
Requires: libuwac = %EVR

%description -n libuwac-devel
The libuwac-devel package contains libraries and header files for
developing applications that use libuwac.

%package plugins-standard
Summary: Plugins for handling the standard RDP channels
Group: Networking/Remote access
Requires: lib%name = %EVR

%description plugins-standard
A set of plugins to the channel manager implementing the standard virtual
channels extending RDP core functionality.  For example, sounds, clipboard
sync, disk/printer redirection, etc.

%package -n lib%name-devel
Summary: Libraries and header files for embedding and extending freerdp
Group: Development/C
Requires: lib%name = %EVR
Provides: freerdp-devel
Obsoletes: freerdp-devel

%description -n lib%name-devel
Header files and unversioned libraries for libfreerdp.

%package server
Summary: Server support for %{name}
Group: Networking/Remote access
Requires: lib%name = %EVR
Requires: lib%name-server = %EVR

%description server
The %{name}-server package contains servers which can export a desktop via
the RDP protocol.

%prep
%setup
%ifarch %e2k
%patch2000 -p1
%endif

%build
%cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_SHARED_LIBS=ON \
    -DCMAKE_SKIP_RPATH=FALSE \
    -DCMAKE_SKIP_INSTALL_RPATH=TRUE \
    -DWITH_ALSA=ON \
    -DWITH_CAIRO=ON \
    -DWITH_CUPS=ON \
    -DWITH_CHANNELS=ON \
    -DBUILTIN_CHANNELS=OFF \
    -DWITH_CLIENT_CHANNELS=ON \
    -DWITH_CLIENT=ON \
    %{?_without_directfb:-DWITH_DIRECTFB=OFF} \
    %{?_without_ffmpeg:-DWITH_FFMPEG=OFF} \
%if_with x264
    -DWITH_X264=ON \
%else
    -DWITH_X264=OFF \
%endif
    -DWITH_GSM=ON \
    %{?_without_gss:-DWITH_KERBEROS=OFF} \
    -DWITH_FAAC=ON \
    -DWITH_FAAD2=ON \
    -DWITH_GSTREAMER_1_0=ON \
    -DGSTREAMER_1_0_INCLUDE_DIRS=%{_includedir}/gstreamer-1.0 \
    -DWITH_ICU=ON \
    -DWITH_IPP=OFF \
    -DWITH_JPEG=ON \
    -DWITH_LAME=ON \
    -DWITH_LIBRARY_VERSIONING=ON \
    -DWITH_MANPAGES=ON \
    %{?_with_mbetls:-DWITH_MBEDTLS=ON} \
    -DWITH_OPENH264=OFF \
    -DWITH_OPENSSL=ON \
    -DWITH_PCSC=ON \
    -DWITH_PULSE=ON \
    -DWITH_SERVER=ON \
    -DCHANNEL_URBDRC=ON \
    -DCHANNEL_URBDRC_CLIENT=ON \
    -DWITH_SHADOW_X11=ON \
    -DWITH_SHADOW_MAC=ON \
    -DWITH_SOXR=ON \
    -DWITH_WAYLAND=ON \
    -DWITH_X11=ON \
    -DWITH_XCURSOR=ON \
    -DWITH_XEXT=ON \
    -DWITH_XI=ON \
    -DWITH_XINERAMA=ON \
    -DWITH_XKBFILE=ON \
    -DWITH_XRENDER=ON \
    -DWITH_XTEST=ON \
    -DWITH_XV=ON \
    -DWITH_ZLIB=ON \
%ifarch x86_64 %e2k
    -DWITH_SSE2=ON \
%else
    -DWITH_SSE2=OFF \
%endif
%ifarch x86_64
    -DWITH_VAAPI=%{?_with_ffmpeg:ON}%{?!_with_ffmpeg:OFF} \
%endif
%ifarch armh
    -DARM_FP_ABI=hard \
    -DWITH_NEON=OFF \
%endif
%ifarch %e2k
    -DCMAKE_C_FLAGS_RELEASE="-O%_optlevel -DNDEBUG"
%endif
    #

%cmake_build

%install
%cmakeinstall_std

rm -f %buildroot%_libdir/*.a \
      %buildroot%_libdir/freerdp/*.a

# workaround, add compat
ln -s freerdp2.pc %buildroot%_pkgconfigdir/freerdp.pc

%ifnarch %e2k
# Set rpath to %_libdir/freerdp2 for freerdp-proxy executable
patchelf --set-rpath %_libdir/freerdp2 %buildroot%_bindir/freerdp-proxy
%else
# Set rpath to %_libdir/freerdp2 for freerdp-proxy executable (without using patchelf)
pushd %_cmake__builddir/server/proxy
%__cc %optflags -rdynamic CMakeFiles/freerdp-proxy.dir/*.c.o -o %buildroot%_bindir/freerdp-proxy -Wl,-rpath,%_libdir/freerdp2 ../common/libfreerdp-server2.so.%version ../../client/common/libfreerdp-client2.so.%version ../../channels/rdpgfx/client/librdpgfx-client.so ../../libfreerdp/libfreerdp2.so.%version ../../winpr/libwinpr/libwinpr2.so.%version 
popd
%endif

%files

%files -n xfreerdp
%_bindir/xfreerdp
%_bindir/freerdp-proxy
%_man1dir/xfreerdp*
%_bindir/winpr-*
%_man1dir/winpr-*

%files -n wlfreerdp
%_bindir/wlfreerdp
%_man1dir/wlfreerdp*

%if_with directfb
%files -n dfreerdp
%_bindir/dfreerdp
%endif

%files server
%_bindir/freerdp-shadow-cli
%_man1dir/freerdp-shadow-cli.*

%files -n lib%name
%doc LICENSE README.md ChangeLog
%_libdir/lib%{name}2.so.*
%_libdir/lib%{name}-client2.so.*
%dir %_libdir/freerdp*
%_man7dir/wlog*

%files -n lib%name-server
%_libdir/lib%{name}-server2.so.*
%_libdir/lib%{name}-shadow-subsystem2.so.*
%_libdir/lib%{name}-shadow2.so.*

%files plugins-standard
%_libdir/freerdp*/*.so

%files -n libwinpr
%_libdir/libwinpr2.so.*
%_libdir/libwinpr-tools2.so.*

%files -n libwinpr-devel
%_libdir/cmake/WinPR*
%_includedir/winpr*
%_libdir/libwinpr2.so
%_libdir/libwinpr-tools2.so
%_pkgconfigdir/winpr*.pc

%files -n libuwac
%_libdir/libuwac0.so.*

%files -n libuwac-devel
%_libdir/cmake/uwac*
%_includedir/uwac*
%_libdir/libuwac0.so
%_pkgconfigdir/uwac*.pc

%files -n lib%name-devel
%_libdir/cmake/FreeRDP*
%_includedir/%{name}*
%_libdir/lib%{name}*.so
%_pkgconfigdir/freerdp*.pc

%changelog
* Thu Oct 21 2021 Andrey Cherepanov <cas@altlinux.org> 2.4.1-alt1
- New version.
- Security fixes:
  + CVE-2021-41159 Improper client input validation for gateway connections allows to overwrite memory
  + CVE-2021-41160 Improper region checks in all clients allow out of bound write to memory

* Thu Jul 29 2021 Ilya Kurdyukov <ilyakurdyukov@altlinux.org> 2.3.2-alt3
- Fixed build for Elbrus.

* Thu Jul 08 2021 Andrey Cherepanov <cas@altlinux.org> 2.3.2-alt2
- FTBFS: disable build with mbedtls-3.0.0 (https://github.com/FreeRDP/FreeRDP/issues/7163).

* Tue Mar 16 2021 Andrey Cherepanov <cas@altlinux.org> 2.3.2-alt1
- New version.

* Wed Mar 03 2021 Andrey Cherepanov <cas@altlinux.org> 2.3.1-alt1
- New version.

* Thu Feb 25 2021 Andrey Cherepanov <cas@altlinux.org> 2.3.0-alt1
- New version.

* Tue Jul 21 2020 Andrey Cherepanov <cas@altlinux.org> 2.2.0-alt1
- New version.
- Fixes:
  + CVE-2020-15103 - Integer overflow due to missing input sanitation in rdpegfx channel

* Wed Jul 01 2020 Andrey Cherepanov <cas@altlinux.org> 2.1.2-alt2
- Fix connect to Windows 7 (see https://github.com/FreeRDP/FreeRDP/issues/6299).

* Tue Jun 23 2020 Andrey Cherepanov <cas@altlinux.org> 2.1.2-alt1
- New version.
- Fixes:
  + CVE-2020-4033 Out of bound read in RLEDECOMPRESS
  + CVE-2020-4031 Use-After-Free in gdi_SelectObject
  + CVE-2020-4032 Integer casting vulnerability in `update_recv_secondary_order`
  + CVE-2020-4030 OOB read in `TrioParse`
  + CVE-2020-11099 OOB Read in license_read_new_or_upgrade_license_packet
  + CVE-2020-11098 Out-of-bound read in glyph_cache_put
  + CVE-2020-11097 OOB read in ntlm_av_pair_get
  + CVE-2020-11095 Global OOB read in update_recv_primary_order
  + CVE-2020-11096 Global OOB read in update_read_cache_bitmap_v3_order
  + Gateway RPC fixes for windows
  + Fixed resource fee race resulting in double free in USB redirection
  + Fixed wayland client crashes
  + Fixed X11 client mouse mapping issues (X11 mapping on/off)
  + Some proxy related improvements (capture module)
  + Code cleanup (use getlogin_r, ...)

* Wed May 20 2020 Andrey Cherepanov <cas@altlinux.org> 2.1.1-alt1
- New version.
- Fixes:
  + CVE: GHSL-2020-100 OOB Read in ntlm_read_ChallengeMessage
  + CVE: GHSL-2020-101 OOB Read in security_fips_decrypt due to uninitialized value
  + CVE: GHSL-2020-102 OOB Write in crypto_rsa_common

* Sun May 10 2020 Andrey Cherepanov <cas@altlinux.org> 2.1.0-alt1
- New version (2.1.0) (Fixes: CVE-2020-11039, CVE-2020-11038, CVE-2020-11043, CVE-2020-11040, CVE-2020-11041, CVE-2020-11019, CVE-2020-11017, CVE-2020-11018).

* Fri Apr 10 2020 Andrey Cherepanov <cas@altlinux.org> 2.0.0-alt5
- New version (2.0.0) (Fixes: CVE-2020-11521, CVE-2020-11522, CVE-2020-11523, CVE-2020-11524, CVE-2020-11525, CVE-2020-11526).

* Wed Nov 20 2019 Andrey Cherepanov <cas@altlinux.org> 2.0.0-alt4.git20190806
- Enable support of icu and vaapi.
- Build liburbdrc-client.so (ALT #34230).
- Change maintainer.
- Set package license according to SPDX.

* Mon Aug 12 2019 Andrey Cherepanov <cas@altlinux.org> 2.0.0-alt3.git20190806
- New snapshot from upstream git repository.
- Build from upstream git.
- Enable support of ffmpeg, wayland, mbedtls, gsm, lame, faad, faac, soxr.

* Sat Jun 22 2019 Igor Vlasenko <viy@altlinux.ru> 2.0.0-alt2.git20181120
- NMU: remove rpm-build-ubt from BR:

* Wed Nov 21 2018 Pavel Nakonechnyi <zorg@altlinux.org> 2.0.0-alt1.git20181120
- Fifth release candidate for 2.0.0:
- multiple CVE fixes
- various bugfixes and improvements

* Thu Aug 30 2018 Grigory Ustinov <grenka@altlinux.org> 2.0.0-alt1.git20180801.S1.1
- NMU: Rebuild with new openssl 1.1.0.

* Thu Aug 02 2018 Pavel Nakonechnyi <zorg@altlinux.org> 2.0.0-alt1.git20180801.S1
- Fourth release candidate for 2.0.0

* Tue Apr 17 2018 Pavel Nakonechnyi <zorg@altlinux.org> 2.0.0-alt1.git20180411.S1
- Third release candidate for 2.0.0
- Fix gstreamer-1.0 detection is not needed now

* Tue Sep 26 2017 Alexey Shabalin <shaba@altlinux.ru> 2.0.0-alt1.git20170724.S1
- Fix gstreamer-1.0 detection
- increase release number for allow backport to p8

* Wed Jul 26 2017 Alexey Shabalin <shaba@altlinux.ru> 2.0.0-alt0.git20170724
- First release candidate for 2.0.0

* Wed Jan 11 2017 Alexey Shabalin <shaba@altlinux.ru> 2.0.0-alt0.git20170109.2
- move libfreerdp-shadow.so.* to libfreerdp-server package

* Tue Jan 10 2017 Alexey Shabalin <shaba@altlinux.ru> 2.0.0-alt0.git20170109
- upstream git snapshot 8fd926f08524bcdad8adbb5d908ebb1ad2ce6106

* Tue Apr 12 2016 Alexey Shabalin <shaba@altlinux.ru> 2.0.0-alt0.git20160411
- upstream git snapshot 11d113872fe254a2472e99a40f8be7237d5a82d3

* Wed Apr 06 2016 Alexey Shabalin <shaba@altlinux.ru> 2.0.0-alt0.git20160331
- upstream git snapshot a0d9969a3030a8056eacbe8b2e7362274d0a9c4b
- drop directfb dfreerdp package
- build with wayland support
- build with gstreamer-1.0 support
- split libwinpr,librdtk,libuwac library and devel files
- build server package

* Mon Jun 15 2015 Mikhail Kolchin <mvk@altlinux.org> 1.1.0-alt2.beta1
- disable gstreamer support (ALT #31013)

* Sun Mar 22 2015 Mikhail Kolchin <mvk@altlinux.org> 1.1.0-alt1.beta1
- stable-1.1 snapshot 770c67d340d5f0a7b48d53a1ae0fc23aff748fc4

* Wed Oct 02 2013 Sergey V Turchin <zerg@altlinux.org> 1.0.2-alt4
- fix typo for compile on arm

* Wed Oct 02 2013 Sergey V Turchin <zerg@altlinux.org> 1.0.2-alt3
- don't build ffmpeg module (ALT#29416)

* Mon Sep 30 2013 Sergey V Turchin <zerg@altlinux.org> 1.0.2-alt2
- separate patches
- fix compile flags

* Wed Sep 18 2013 Andrey Cherepanov <cas@altlinux.org> 1.0.2-alt1
- New verson (ALT #28716)
- Pack freerdp keymaps

* Thu Mar 22 2012 Slava Dubrovskiy <dubrsl@altlinux.org> 1.0.1-alt2
- Build git fd465f551c34b1ae415f76be4aefeb0fef770de7

* Tue Feb 07 2012 Slava Dubrovskiy <dubrsl@altlinux.org> 1.0.1-alt1
- New release

* Tue Jan 17 2012 Slava Dubrovskiy <dubrsl@altlinux.org> 1.0.0-alt2
- New release

* Sun Jan 08 2012 Slava Dubrovskiy <dubrsl@altlinux.org> 1.0-alt1.beta5
- New version

* Sat Dec 10 2011 Slava Dubrovskiy <dubrsl@altlinux.org> 1.0-alt1.beta3
- New version

* Sat Nov 12 2011 Slava Dubrovskiy <dubrsl@altlinux.org> 1.0-alt1.beta1
- New version (ALT #24784)
- Update spec for use cmake
- Change license
- Rename subpackage dfbfreerdp -> dfreerdp

* Mon Nov 15 2010 Slava Dubrovskiy <dubrsl@altlinux.org> 0.8.2-alt1
- new version

* Thu Oct 28 2010 Mykola Grechukh <gns@altlinux.ru> 0.8.1-alt2
- added patch

* Thu Oct 28 2010 Mykola Grechukh <gns@altlinux.ru> 0.8.1-alt1
- new version

* Fri Aug 06 2010 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7.3-alt2
- Rename subpackage freerdp-devel -> libfreerdp-devel

* Thu Aug 05 2010 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7.3-alt1
- New version

* Fri Jul 16 2010 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7.2-alt2
- Fix undefined symbols

* Fri Jul 16 2010 Slava Dubrovskiy <dubrsl@altlinux.org> 0.7.2-alt1
- Build for ALT

* Tue Mar 16 2010 Mads Kiilerich <mads@kiilerich.com> - 0.0.1-1
- Initial "upstream" freerdp spec - made and tested for Fedora 12