-
Notifications
You must be signed in to change notification settings - Fork 7
/
chromium.spec
2712 lines (2356 loc) · 105 KB
/
chromium.spec
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
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# This package depends on automagic byte compilation
# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
%global _python_bytecompile_extra 1
# This is faster when it works, but it doesn't always.
%ifarch aarch64
%global use_jumbo 0
%else
%global use_jumbo 1
%endif
# We usually want this.
%global build_headless 1
# NEVER EVER EVER turn this on in official builds
%global freeworld 1
# Some people wish not to use the Fedora Google API keys. Mmkay.
# Expect stuff to break in weird ways if you disable.
%global useapikeys 1
# Leave this alone, please.
%global target out/Release
%global headlesstarget out/Headless
%global remotingtarget out/Remoting
# Debuginfo packages aren't very useful here. If you need to debug
# you should do a proper debug build (not implemented in this spec yet)
%global debug_package %{nil}
# %%{nil} for Stable; -beta for Beta; -dev for Devel
# dash in -beta and -dev is intentional !
%global chromium_channel %{nil}
%global chromium_menu_name Chromium
%global chromium_browser_channel chromium-browser%{chromium_channel}
%global chromium_path %{_libdir}/chromium-browser%{chromium_channel}
%global crd_path %{_libdir}/chrome-remote-desktop
# We don't want any libs in these directories to generate Provides
# Requires is trickier.
%global __provides_exclude_from %{chromium_path}/.*\\.so|%{chromium_path}/lib/.*\\.so|%{chromium_path}/lib/.*\\.so.*
%if 0%{?rhel} == 7
%global privlibs libEGL|libGLESv2|libVkICD_mock_icd|libVkLayer_core_validation|libVkLayer_object_tracker|libVkLayer_parameter_validation|libVkLayer_threading|libVkLayer_unique_objects|libaccessibility|libandroid_mojo_bindings_shared|libanimation|libapdu|libaura|libaura_extra|libbase|libbase_i18n|libbindings|libbindings_base|libblink_android_mojo_bindings_shared|libblink_common|libblink_controller|libblink_core|libblink_core_mojo_bindings_shared|libblink_embedded_frame_sink_mojo_bindings_shared|libblink_modules|libblink_mojo_bindings_shared|libblink_platform|libbluetooth|libboringssl|libbrowser_ui_views|libcaptive_portal|libcapture_base|libcapture_lib|libcatalog_lib|libcbor|libcc|libcc_animation|libcc_base|libcc_debug|libcc_mojo_embedder|libcc_paint|libcdm_manager|libcertificate_matching|libchrome_features|libchromium_sqlite3|libclearkeycdm|libclient|libcloud_policy_proto_generated_compile|libcodec|libcolor_space|libcommon|libcompositor|libcontent|libcontent_common_mojo_bindings_shared|libcontent_public_common_mojo_bindings_shared|libcontent_service_cpp|libcontent_service_mojom|libcontent_service_mojom_shared|libcrash_key|libcrcrypto|libdbus|libdevice_base|libdevice_event_log|libdevice_features|libdevice_gamepad|libdevice_vr|libdevice_vr_mojo_bindings|libdevice_vr_mojo_bindings_blink|libdevice_vr_mojo_bindings_shared|libdevices|libdiscardable_memory_client|libdiscardable_memory_common|libdiscardable_memory_service|libdisplay|libdisplay_types|libdisplay_util|libdomain_reliability|libembedder|libembedder_switches|libevents|libevents_base|libevents_devices_x11|libevents_ozone_layout|libevents_x|libextras|libfido|libfingerprint|libfreetype_harfbuzz|libgamepad_mojom|libgamepad_mojom_blink|libgamepad_mojom_shared|libgamepad_shared_typemap_traits|libgcm|libgeometry|libgeometry_skia|libgesture_detection|libgfx|libgfx_ipc|libgfx_ipc_buffer_types|libgfx_ipc_color|libgfx_ipc_geometry|libgfx_ipc_skia|libgfx_switches|libgfx_x11|libgin|libgl_in_process_context|libgl_init|libgl_wrapper|libgles2|libgles2_implementation|libgles2_utils|libgpu|libgpu_ipc_service|libgtkui|libheadless|libhost|libicui18n|libicuuc|libinterfaces_shared|libipc|libipc_mojom|libipc_mojom_shared|libkeycodes_x11|libkeyed_service_content|libkeyed_service_core|liblearning_common|liblearning_impl|libleveldatabase|liblive_tab_count_metrics|libmanager|libmedia_blink|libmedia_gpu|libmedia_mojo_services|libmedia_session_cpp|libmedia_webrtc|libmemory_instrumentation|libmessage_center|libmessage_support|libmetrics_cpp|libmidi|libmirclient.so.9|libmirclient.so.9.TOC|libmirroring_service|libmojo_base_lib|libmojo_base_mojom|libmojo_base_mojom_blink|libmojo_base_mojom_shared|libmojo_base_shared_typemap_traits|libmojo_core_embedder|libmojo_core_embedder_internal|libmojo_core_ports|libmojo_cpp_platform|libmojo_ime_lib|libmojo_mojom_bindings|libmojo_mojom_bindings_shared|libmojo_public_system|libmojo_public_system_cpp|libmojom_core_shared|libmojom_modules_shared|libmojom_platform_shared|libnative_theme|libnet|libnet_with_v8|libnetwork_cpp|libnetwork_cpp_base|libnetwork_service|libnetwork_session_configurator|libonc|libos_crypt|libperfetto|libplatform|libplatform_window_handler_libs|libpolicy_component|libpolicy_proto|libppapi_host|libppapi_proxy|libppapi_shared|libprefs|libprinting|libprotobuf_lite|libproxy_config|libpublic|librange|libraster|libresource_coordinator_cpp|libresource_coordinator_cpp_base|libresource_coordinator_cpp_features|libresource_coordinator_public_mojom|libresource_coordinator_public_mojom_blink|libresource_coordinator_public_mojom_shared|libsandbox|libsandbox_services|libscheduling_metrics|libseccomp_bpf|libservice|libservice_manager_cpp|libservice_manager_cpp_types|libservice_manager_mojom|libservice_manager_mojom_blink|libservice_manager_mojom_constants|libservice_manager_mojom_constants_blink|libservice_manager_mojom_constants_shared|libservice_manager_mojom_shared|libservice_manager_mojom_traits|libsessions|libshared_memory_support|libshell_dialogs|libskia|libsnapshot|libspeech_recognition_error_code_mojom|libspeech_recognition_error_code_mojom_blink|libspeech_recognition_error_code_mojom_shared|libsql|libstartup_tracing|libstorage_browser|libstorage_common|libstub_window|libsuid_sandbox_client|libsurface|libtracing|libtracing_cpp|libtracing_mojom|libtracing_mojom_shared|libui_accessibility_ax_mojom|libui_accessibility_ax_mojom_blink|libui_accessibility_ax_mojom_shared|libui_base|libui_base_clipboard|libui_base_clipboard_types|libui_base_ime|libui_base_ime_linux|libui_base_ime_types|libui_base_x|libui_data_pack|libui_devtools|libui_message_center_cpp|libui_touch_selection|libui_views_mus_lib|liburl|liburl_ipc|liburl_matcher|libusb_shared|libuser_manager|libuser_prefs|libv8|libv8_libbase|libv8_libplatform|libviews|libviz_common|libviz_resource_format_utils|libviz_vulkan_context_provider|libvr_base|libvr_common|libvr_ui|libvulkan_init|libvulkan_wrapper|libvulkan_x11|libweb_dialogs|libweb_feature_mojo_bindings_mojom|libweb_feature_mojo_bindings_mojom_blink|libweb_feature_mojo_bindings_mojom_shared|libwebdata_common|libwebgpu|libwebview|libwm|libwm_public|libwtf|libx11_events_platform|libx11_window|libzygote|libmedia|libffmpeg|libfontconfig
%else
%global privlibs libEGL|libGLESv2|libVkICD_mock_icd|libVkLayer_core_validation|libVkLayer_object_tracker|libVkLayer_parameter_validation|libVkLayer_threading|libVkLayer_unique_objects|libaccessibility|libandroid_mojo_bindings_shared|libanimation|libapdu|libaura|libaura_extra|libbase|libbase_i18n|libbindings|libbindings_base|libblink_android_mojo_bindings_shared|libblink_common|libblink_controller|libblink_core|libblink_core_mojo_bindings_shared|libblink_embedded_frame_sink_mojo_bindings_shared|libblink_modules|libblink_mojo_bindings_shared|libblink_platform|libbluetooth|libboringssl|libbrowser_ui_views|libcaptive_portal|libcapture_base|libcapture_lib|libcatalog_lib|libcbor|libcc|libcc_animation|libcc_base|libcc_debug|libcc_mojo_embedder|libcc_paint|libcdm_manager|libcertificate_matching|libchrome_features|libchromium_sqlite3|libclearkeycdm|libclient|libcloud_policy_proto_generated_compile|libcodec|libcolor_space|libcommon|libcompositor|libcontent|libcontent_common_mojo_bindings_shared|libcontent_public_common_mojo_bindings_shared|libcontent_service_cpp|libcontent_service_mojom|libcontent_service_mojom_shared|libcrash_key|libcrcrypto|libdbus|libdevice_base|libdevice_event_log|libdevice_features|libdevice_gamepad|libdevice_vr|libdevice_vr_mojo_bindings|libdevice_vr_mojo_bindings_blink|libdevice_vr_mojo_bindings_shared|libdevices|libdiscardable_memory_client|libdiscardable_memory_common|libdiscardable_memory_service|libdisplay|libdisplay_types|libdisplay_util|libdomain_reliability|libembedder|libembedder_switches|libevents|libevents_base|libevents_devices_x11|libevents_ozone_layout|libevents_x|libextras|libfido|libfingerprint|libfreetype_harfbuzz|libgamepad_mojom|libgamepad_mojom_blink|libgamepad_mojom_shared|libgamepad_shared_typemap_traits|libgcm|libgeometry|libgeometry_skia|libgesture_detection|libgfx|libgfx_ipc|libgfx_ipc_buffer_types|libgfx_ipc_color|libgfx_ipc_geometry|libgfx_ipc_skia|libgfx_switches|libgfx_x11|libgin|libgl_in_process_context|libgl_init|libgl_wrapper|libgles2|libgles2_implementation|libgles2_utils|libgpu|libgpu_ipc_service|libgtkui|libheadless|libhost|libicui18n|libicuuc|libinterfaces_shared|libipc|libipc_mojom|libipc_mojom_shared|libkeycodes_x11|libkeyed_service_content|libkeyed_service_core|liblearning_common|liblearning_impl|libleveldatabase|liblive_tab_count_metrics|libmanager|libmedia_blink|libmedia_gpu|libmedia_mojo_services|libmedia_session_cpp|libmedia_webrtc|libmemory_instrumentation|libmessage_center|libmessage_support|libmetrics_cpp|libmidi|libmirclient.so.9|libmirclient.so.9.TOC|libmirroring_service|libmojo_base_lib|libmojo_base_mojom|libmojo_base_mojom_blink|libmojo_base_mojom_shared|libmojo_base_shared_typemap_traits|libmojo_core_embedder|libmojo_core_embedder_internal|libmojo_core_ports|libmojo_cpp_platform|libmojo_ime_lib|libmojo_mojom_bindings|libmojo_mojom_bindings_shared|libmojo_public_system|libmojo_public_system_cpp|libmojom_core_shared|libmojom_modules_shared|libmojom_platform_shared|libnative_theme|libnet|libnet_with_v8|libnetwork_cpp|libnetwork_cpp_base|libnetwork_service|libnetwork_session_configurator|libonc|libos_crypt|libperfetto|libplatform|libplatform_window_handler_libs|libpolicy_component|libpolicy_proto|libppapi_host|libppapi_proxy|libppapi_shared|libprefs|libprinting|libprotobuf_lite|libproxy_config|libpublic|librange|libraster|libresource_coordinator_cpp|libresource_coordinator_cpp_base|libresource_coordinator_cpp_features|libresource_coordinator_public_mojom|libresource_coordinator_public_mojom_blink|libresource_coordinator_public_mojom_shared|libsandbox|libsandbox_services|libscheduling_metrics|libseccomp_bpf|libservice|libservice_manager_cpp|libservice_manager_cpp_types|libservice_manager_mojom|libservice_manager_mojom_blink|libservice_manager_mojom_constants|libservice_manager_mojom_constants_blink|libservice_manager_mojom_constants_shared|libservice_manager_mojom_shared|libservice_manager_mojom_traits|libsessions|libshared_memory_support|libshell_dialogs|libskia|libsnapshot|libspeech_recognition_error_code_mojom|libspeech_recognition_error_code_mojom_blink|libspeech_recognition_error_code_mojom_shared|libsql|libstartup_tracing|libstorage_browser|libstorage_common|libstub_window|libsuid_sandbox_client|libsurface|libtracing|libtracing_cpp|libtracing_mojom|libtracing_mojom_shared|libui_accessibility_ax_mojom|libui_accessibility_ax_mojom_blink|libui_accessibility_ax_mojom_shared|libui_base|libui_base_clipboard|libui_base_clipboard_types|libui_base_ime|libui_base_ime_linux|libui_base_ime_types|libui_base_x|libui_data_pack|libui_devtools|libui_message_center_cpp|libui_touch_selection|libui_views_mus_lib|liburl|liburl_ipc|liburl_matcher|libusb_shared|libuser_manager|libuser_prefs|libv8|libv8_libbase|libv8_libplatform|libviews|libviz_common|libviz_resource_format_utils|libviz_vulkan_context_provider|libvr_base|libvr_common|libvr_ui|libvulkan_init|libvulkan_wrapper|libvulkan_x11|libweb_dialogs|libweb_feature_mojo_bindings_mojom|libweb_feature_mojo_bindings_mojom_blink|libweb_feature_mojo_bindings_mojom_shared|libwebdata_common|libwebgpu|libwebview|libwm|libwm_public|libwtf|libx11_events_platform|libx11_window|libzygote|libmedia|libffmpeg
%endif
%global __requires_exclude ^(%{privlibs})\\.so*
# If we build with shared on, then chrome-remote-desktop depends on chromium libs.
# If we build with shared off, then users cannot swap out libffmpeg (and i686 gets a lot harder to build)
%global shared 1
# We should not need to turn this on. The app in the webstore _should_ work.
%global build_remoting_app 0
# Build Chrome Remote Desktop
%global build_remote_desktop 1
# AddressSanitizer mode
# https://www.chromium.org/developers/testing/addresssanitizer
#%if 0%%{?fedora} >= 28
#%%global asan 1
#%else
%global asan 0
#%endif
# nacl/pnacl are soon to be dead. We're just killing them off early.
%global killnacl 1
%if 0%{?killnacl}
%global nacl 0
%global nonacl 1
%else
# TODO: Try arm (nacl disabled)
%if 0%{?fedora}
%ifarch i686
%global nacl 0
%global nonacl 1
%else
%global nacl 1
%global nonacl 0
%endif
%endif
%endif
%if 0
# Chromium's fork of ICU is now something we can't unbundle.
# This is left here to ease the change if that ever switches.
BuildRequires: libicu-devel >= 5.4
%global bundleicu 0
%else
%global bundleicu 1
%endif
%global bundlere2 1
# The libxml_utils code depends on the specific bundled libxml checkout
# which is not compatible with the current code in the Fedora package as of
# 2017-06-08.
%global bundlelibxml 1
%if 0%{?fedora} >= 28
# Enable vaapi
%global vaapi 1
%endif
%if 0%{?rhel} == 7
%global bundleopus 1
%global bundlelibusbx 1
%global bundleharfbuzz 1
%global bundlelibwebp 1
%global bundlelibpng 1
%global bundlelibjpeg 1
%global bundlefreetype 1
%global bundlelibdrm 1
%global bundlefontconfig 1
%else
%global bundleharfbuzz 0
%global bundleopus 1
%global bundlelibusbx 0
%global bundlelibwebp 0
%global bundlelibpng 0
%global bundlelibjpeg 0
%global bundlefreetype 0
%global bundlelibdrm 0
%global bundlefontconfig 0
%endif
# Needs at least harfbuzz 1.8.6 now.
# 2018-10-24
%if 0%{?fedora} < 30
%global bundleharfbuzz 1
%else
%global bundleharfbuzz 0
%endif
### Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
### Note: These are for Fedora use ONLY.
### For your own distribution, please get your own set of keys.
### http://lists.debian.org/debian-legal/2013/11/msg00006.html
%if %{useapikeys}
%global api_key AIzaSyDUIXvzVrt5OkVsgXhQ6NFfvWlA44by-aw
%global default_client_id 449907151817.apps.googleusercontent.com
%global default_client_secret miEreAep8nuvTdvLums6qyLK
%global chromoting_client_id 449907151817-8vnlfih032ni8c4jjps9int9t86k546t.apps.googleusercontent.com
%else
%global api_key %nil
%global default_client_id %nil
%global default_client_secret %nil
%global chromoting_client_id %nil
%endif
Name: chromium%{chromium_channel}
Version: 73.0.3683.103
%if 0%{?rhel} == 7
Release: 1%{?dist}
%else
Release: 1%{?dist}.R
%endif
Epoch: 1
Summary: A WebKit (Blink) powered web browser
Url: http://www.chromium.org/Home
License: BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
### Chromium Fedora Patches ###
Patch0: chromium-67.0.3396.62-gcc5.patch
Patch1: chromium-45.0.2454.101-linux-path-max.patch
Patch2: chromium-55.0.2883.75-addrfix.patch
Patch4: chromium-68.0.3440.106-notest.patch
# In file included from ../linux/directory.c:21:
# In file included from ../../../../native_client/src/nonsfi/linux/abi_conversion.h:20:
# ../../../../native_client/src/nonsfi/linux/linux_syscall_structs.h:44:13: error: GNU-style inline assembly is disabled
# __asm__ __volatile__("mov %%gs, %0" : "=r"(gs));
# ^
# 1 error generated.
Patch6: chromium-47.0.2526.80-pnacl-fgnu-inline-asm.patch
# Ignore broken nacl open fd counter
Patch7: chromium-47.0.2526.80-nacl-ignore-broken-fd-counter.patch
# Use libusb_interrupt_event_handler from current libusbx (1.0.21-0.1.git448584a)
Patch9: chromium-48.0.2564.116-libusb_interrupt_event_handler.patch
# Ignore deprecations in cups 2.2
# https://bugs.chromium.org/p/chromium/issues/detail?id=622493
Patch12: chromium-55.0.2883.75-cups22.patch
# Use PIE in the Linux sandbox (from openSUSE via Russian Fedora)
Patch15: chromium-70.0.3538.67-sandbox-pie.patch
# Use /etc/chromium for master_prefs
Patch18: chromium-68.0.3440.106-master-prefs-path.patch
# Disable MADV_FREE (if set by glibc)
# https://bugzilla.redhat.com/show_bug.cgi?id=1361157
Patch19: chromium-52.0.2743.116-unset-madv_free.patch
# Use gn system files
Patch20: chromium-67.0.3396.62-gn-system.patch
# Fix last commit position issue
# https://groups.google.com/a/chromium.org/forum/#!topic/gn-dev/7nlJv486bD4
Patch21: chromium-60.0.3112.78-last-commit-position.patch
# Fix issue where timespec is not defined when sys/stat.h is included.
Patch22: chromium-53.0.2785.92-boringssl-time-fix.patch
# I wouldn't have to do this if there was a standard way to append extra compiler flags
Patch24: chromium-63.0.3289.84-nullfix.patch
# Add explicit includedir for jpeglib.h
Patch25: chromium-54.0.2840.59-jpeg-include-dir.patch
# On i686, pass --no-keep-memory --reduce-memory-overheads to ld.
Patch26: chromium-59.0.3071.86-i686-ld-memory-tricks.patch
# obj/content/renderer/renderer/child_frame_compositing_helper.o: In function `content::ChildFrameCompositingHelper::OnSetSurface(cc::SurfaceId const&, gfx::Size const&, float, cc::SurfaceSequence const&)':
# /builddir/build/BUILD/chromium-54.0.2840.90/out/Release/../../content/renderer/child_frame_compositing_helper.cc:214: undefined reference to `cc_blink::WebLayerImpl::setOpaque(bool)'
#Patch27: chromium-63.0.3289.84-setopaque.patch
# Revert https://chromium.googlesource.com/chromium/src/+/b794998819088f76b4cf44c8db6940240c563cf4%5E%21/#F0
# https://bugs.chromium.org/p/chromium/issues/detail?id=712737
# https://bugzilla.redhat.com/show_bug.cgi?id=1446851
Patch36: chromium-58.0.3029.96-revert-b794998819088f76b4cf44c8db6940240c563cf4.patch
# Correctly compile the stdatomic.h in ffmpeg with gcc 4.8
Patch37: chromium-64.0.3282.119-ffmpeg-stdatomic.patch
# Nacl can't die soon enough
Patch39: chromium-66.0.3359.81-system-clang.patch
# Do not prefix libpng functions
Patch42: chromium-60.0.3112.78-no-libpng-prefix.patch
# Do not mangle libjpeg
Patch43: chromium-60.0.3112.78-jpeg-nomangle.patch
# Do not mangle zlib
Patch45: chromium-60.0.3112.78-no-zlib-mangle.patch
# Apply these changes to work around EPEL7 compiler issues
Patch46: chromium-62.0.3202.62-kmaxskip-constexpr.patch
Patch47: chromium-60.0.3112.90-vulkan-force-c99.patch
# Fix libavutil include pathing to find arch specific timer.h
# For some reason, this only fails on aarch64. No idea why.
Patch50: chromium-60.0.3112.113-libavutil-timer-include-path-fix.patch
# from gentoo
Patch53: chromium-61.0.3163.79-gcc-no-opt-safe-math.patch
# Only needed when glibc 2.26.90 or later is used
Patch57: chromium-63.0.3289.84-aarch64-glibc-2.26.90.patch
# From gentoo
Patch62: chromium-65.0.3325.146-gcc5-r3.patch
# To use round with gcc, you need to #include <cmath>
Patch65: chromium-65.0.3325.146-gcc-round-fix.patch
# Include proper headers to invoke memcpy()
Patch67: chromium-65.0.3325.146-memcpy-fix.patch
# Work around gcc8 bug in gn
Patch68: chromium-64.0.3282.167-gcc8-fabi11.patch
# From Gentoo
Patch69: chromium-math.h-r0.patch
Patch70: chromium-stdint.patch
# Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80654
# crbug.com/784732#27
# https://chromium-review.googlesource.com/c/chromium/src/+/927942
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-GCC-PlaybackImageProvider-Settings-do-not-provide-co.patch
Patch81: chromium-65.0.3325.146-GCC-PlaybackImageProvider-Settings-do-not-provide-co.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-GCC-explicitely-std-move-to-base-Optional-instead-of.patch
Patch82: chromium-65.0.3325.146-GCC-explicitely-std-move-to-base-Optional-instead-of.patch
# https://github.com/lgsvl/meta-lgsvl-browser/blob/ac93e7622be66946c76504be6a1db8d644ae1e43/recipes-browser/chromium/files/0001-GCC-IDB-methods-String-renamed-to-GetString.patch
Patch83: chromium-65.0.3325.146-GCC-IDB-methods-String-renamed-to-GetString.patch
# ../../mojo/public/cpp/bindings/associated_interface_ptr_info.h:48:43: error: cannot convert 'const mojo::ScopedInterfaceEndpointHandle' to 'bool' in return
Patch85: chromium-68.0.3440.106-boolfix.patch
# From Debian
Patch86: chromium-67.0.3396.62-skia-aarch64-buildfix.patch
# Use lstdc++ on EPEL7 only
Patch87: chromium-65.0.3325.162-epel7-stdc++.patch
# Clang Gentoo patch: ftp://mirror.yandex.ru/gentoo-portage/www-client/chromium/files/chromium-clang-r2.patch
# GCC8 has changed the alignof operator to return the minimal alignment required by the target ABI
# instead of the preferred alignment. This means int64_t is now 4 on i686 (instead of 8).
# Use __alignof__ to get the value we expect (and chromium checks for).
Patch98: chromium-69.0.3497.81-gcc8-alignof.patch
# https://chromium.googlesource.com/crashpad/crashpad/+/26ef5c910fc7e2edb441f1d2b39944195342dee9
Patch99: chromium-67.0.3396.62-crashpad-aarch64-buildfix.patch
# RHEL 7 has a bug in its python2.7 which does not propely handle exec with a tuple
# https://bugs.python.org/issue21591
Patch100: chromium-67.0.3396.62-epel7-use-old-python-exec-syntax.patch
Patch101: chromium-71.0.3578.98-widevine-r3.patch
# Add "Russian Fedora" to the user agent string
Patch102: chromium-72.0.3626.109-russianfedora-user-agent.patch
# Try to fix version.py for Rawhide
Patch103: chromium-67.0.3396.99-py3fix.patch
Patch104: chromium-71.0.3578.30-py2-bootstrap.patch
# Fix default on redeclaration error
# https://chromium.googlesource.com/chromium/src/+/122692ccee62223f266a988c575ae687e3f4c056%5E%21/#F0
Patch111: chromium-68.0.3440.106-fix-default-on-redeclaration.patch
Patch500: chromium-clang-r2.patch
# ftp://mirror.yandex.ru/gentoo-portage/www-client/chromium/files/chromium-clang-r4.patch
Patch501: chromium-clang-r4.patch
# ftp://mirror.yandex.ru/gentoo-portage/www-client/chromium/files/chromium-ffmpeg-clang.patch
Patch502: chromium-ffmpeg-clang.patch
# Vaapi Patches
# https://copr-dist-git.fedorainfracloud.org/cgit/hellbangerkarna/Chromium-Vaapi/chromium.git/
# https://copr-dist-git.fedorainfracloud.org/cgit/hellbangerkarna/Chromium-Vaapi/chromium.git/plain/vaapi.patch?id=d5d9240a5cdae20663bfa124c85f4cc1e3d6c85d
Patch599: vaapi.patch
Patch600: chromium-libva1.patch
Patch601: chromium-73.0.3683.75-vaapi-i686-fpermissive.patch
# drop rsp clobber, which breaks gcc9 (thanks to Jeff Law)
Patch602: chromium-71.0.3578.98-gcc9-drop-rsp-clobber.patch
# Disable fontconfig cache magic that breaks remoting
Patch617: chromium-70.0.3538.67-disable-fontconfig-cache-magic.patch
Patch618: chromium-70.0.3538.67-memory-screenozone.patch
# Thank you Gentoo.
#
Patch628: chromium-73-gcc-0.patch
Patch629: chromium-73-gcc-1.patch
Patch630: chromium-73-gcc-2.patch
Patch631: chromium-73-gcc-3.patch
Patch632: chromium-73-gcc-4.patch
Patch633: chromium-73-gcc-5.patch
Patch634: chromium-73-gcc-6.patch
# Disable -fno-delete-null-pointer-checks
Patch635: chromium-73.0.3683.75-disable-fno-delete-null-pointer-checks.patch
# Add #include <cstring> to get pipewire code to build
Patch636: chromium-73.0.3683.75-pipewire-cstring-fix.patch
# Conditionalize header-hygiene flags for clang
Patch637: chromium-73.0.3683.75-no-header-hygiene.patch
# Add missing #include <limits> needed to build crashpad for aarch64
Patch638: chromium-73.0.3683.75-aarch64-crashpad-limits.patch
# el7 only patch
Patch639: chromium-73.0.3683.75-el7-fix-noexcept.patch
# Use chromium-latest.py to generate clean tarball from released build tarballs, found here:
# http://build.chromium.org/buildbot/official/
# For Chromium Fedora use chromium-latest.py --stable --ffmpegclean --ffmpegarm
# If you want to include the ffmpeg arm sources append the --ffmpegarm switch
# https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%%{version}.tar.xz
%if %{freeworld}
Source0: https://commondatastorage.googleapis.com/chromium-browser-official/chromium-%{version}.tar.xz
%else
Source0: chromium-%{version}-clean.tar.xz
%endif
Source3: chromium-browser.sh
Source4: %{chromium_browser_channel}.desktop
# Also, only used if you want to reproduce the clean tarball.
Source5: clean_ffmpeg.sh
Source6: chromium-latest.py
Source7: get_free_ffmpeg_source_files.py
# Get the names of all tests (gtests) for Linux
# Usage: get_linux_tests_name.py chromium-%%{version} --spec
Source8: get_linux_tests_names.py
# GNOME stuff
Source9: chromium-browser.xml
Source11: [email protected]
Source13: master_preferences
# Unpackaged fonts
Source14: https://fontlibrary.org/assets/downloads/gelasio/4d610887ff4d445cbc639aae7828d139/gelasio.zip
Source15: http://download.savannah.nongnu.org/releases/freebangfont/MuktiNarrow-0.94.tar.bz2
Source16: https://github.com/web-platform-tests/wpt/raw/master/fonts/Ahem.ttf
Source17: GardinerModBug.ttf
Source18: GardinerModCat.ttf
# We can assume gcc and binutils.
BuildRequires: gcc-c++
%if 0%{?asan}
BuildRequires: clang
BuildRequires: llvm
%endif
BuildRequires: alsa-lib-devel
BuildRequires: atk-devel
BuildRequires: bison
BuildRequires: cups-devel
BuildRequires: dbus-devel
BuildRequires: desktop-file-utils
BuildRequires: expat-devel
BuildRequires: flex
BuildRequires: fontconfig-devel
BuildRequires: GConf2-devel
BuildRequires: glib2-devel
BuildRequires: gtk2-devel
BuildRequires: glibc-devel
BuildRequires: gperf
%if 0%{?bundleharfbuzz}
#nothing
%else
BuildRequires: harfbuzz-devel >= 2.3.0
%endif
BuildRequires: libatomic
BuildRequires: libcap-devel
%if 0%{?bundlelibdrm}
#nothing
%else
BuildRequires: libdrm-devel
%endif
BuildRequires: libgcrypt-devel
BuildRequires: libudev-devel
BuildRequires: libusb-devel
BuildRequires: libXdamage-devel
BuildRequires: libXScrnSaver-devel
BuildRequires: libXtst-devel
%if 0%{?fedora} >= 30
BuildRequires: minizip-compat-devel
%else
BuildRequires: minizip-devel
%endif
BuildRequires: nodejs
BuildRequires: nss-devel >= 3.26
BuildRequires: pciutils-devel
BuildRequires: pulseaudio-libs-devel
# For screen sharing on Wayland, currently Fedora only thing - no epel
%if 0%{?fedora}
BuildRequires: pkgconfig(libpipewire-0.2)
%endif
%if 0%{vaapi}
BuildRequires: libva-devel
%endif
# for /usr/bin/appstream-util
BuildRequires: libappstream-glib
# Fedora turns on NaCl
# NaCl needs these
BuildRequires: libstdc++-devel, openssl-devel
%if 0%{?nacl}
BuildRequires: nacl-gcc, nacl-binutils, nacl-newlib
BuildRequires: nacl-arm-gcc, nacl-arm-binutils, nacl-arm-newlib
# pNaCl needs this monster
# It's possible that someday this dep will stabilize, but
# right now, it needs to be updated everytime chromium bumps
# a major version.
BuildRequires: chromium-native_client >= 52.0.2743.82
%ifarch x86_64
# Really, this is what we want:
# BuildRequires: glibc-devel(x86-32) libgcc(x86-32)
# But, koji only offers glibc32. Maybe that's enough.
# This BR will pull in either glibc.i686 or glibc32.
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so
%endif
%endif
# Fedora tries to use system libs whenever it can.
BuildRequires: bzip2-devel
BuildRequires: dbus-glib-devel
BuildRequires: elfutils-libelf-devel
BuildRequires: flac-devel
%if 0%{?bundlefreetype}
# nothing
%else
BuildRequires: freetype-devel
%endif
BuildRequires: hwdata
BuildRequires: kernel-headers
BuildRequires: libevent-devel
BuildRequires: libffi-devel
BuildRequires: vulkan-devel
%if 0%{?bundleicu}
# If this is true, we're using the bundled icu.
# We'd like to use the system icu every time, but we cannot always do that.
%else
# Not newer than 54 (at least not right now)
BuildRequires: libicu-devel = 54.1
%endif
%if 0%{?bundlelibjpeg}
# If this is true, we're using the bundled libjpeg
# which we need to do because the RHEL 7 libjpeg doesn't work for chromium anymore
%else
BuildRequires: libjpeg-devel
%endif
%if 0%{?bundlelibpng}
# If this is true, we're using the bundled libpng
# which we need to do because the RHEL 7 libpng doesn't work right anymore
%else
BuildRequires: libpng-devel
%endif
%if 0
# see https://code.google.com/p/chromium/issues/detail?id=501318
BuildRequires: libsrtp-devel >= 1.4.4
%endif
BuildRequires: libudev-devel
%if %{bundlelibusbx}
# Do nothing
%else
Requires: libusbx >= 1.0.21-0.1.git448584a
BuildRequires: libusbx-devel >= 1.0.21-0.1.git448584a
%endif
# We don't use libvpx anymore because Chromium loves to
# use bleeding edge revisions here that break other things
# ... so we just use the bundled libvpx.
%if %{bundlelibwebp}
# Do nothing
%else
BuildRequires: libwebp-devel
%endif
BuildRequires: libxslt-devel
# Same here, it seems.
# BuildRequires: libyuv-devel
BuildRequires: mesa-libGL-devel
%if %{bundleopus}
# Do nothing
%else
BuildRequires: opus-devel
%endif
BuildRequires: perl(Switch)
BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pulseaudio-libs-devel
BuildRequires: python2-devel
%if 0%{?fedora} > 27
BuildRequires: python2-beautifulsoup4
BuildRequires: python2-beautifulsoup
BuildRequires: python2-html5lib
BuildRequires: python2-markupsafe
BuildRequires: python2-ply
%else
BuildRequires: python-beautifulsoup4
BuildRequires: python-BeautifulSoup
BuildRequires: python-html5lib
BuildRequires: python-markupsafe
BuildRequires: python-ply
%endif
BuildRequires: python2-simplejson
%if 0%{?bundlere2}
# Using bundled bits, do nothing.
%else
Requires: re2 >= 20160401
BuildRequires: re2-devel >= 20160401
%endif
BuildRequires: speech-dispatcher-devel
BuildRequires: yasm
BuildRequires: zlib-devel
BuildRequires: pkgconfig(gnome-keyring-1)
# remote desktop needs this
BuildRequires: pam-devel
BuildRequires: systemd
%if 0%{?rhel} == 7
Source100: https://github.com/google/fonts/blob/master/apache/arimo/Arimo-Bold.ttf
Source101: https://github.com/google/fonts/blob/master/apache/arimo/Arimo-BoldItalic.ttf
Source102: https://github.com/google/fonts/blob/master/apache/arimo/Arimo-Italic.ttf
Source103: https://github.com/google/fonts/blob/master/apache/arimo/Arimo-Regular.ttf
Source104: https://github.com/google/fonts/blob/master/apache/cousine/Cousine-Bold.ttf
Source105: https://github.com/google/fonts/blob/master/apache/cousine/Cousine-BoldItalic.ttf
Source106: https://github.com/google/fonts/blob/master/apache/cousine/Cousine-Italic.ttf
Source107: https://github.com/google/fonts/blob/master/apache/cousine/Cousine-Regular.ttf
Source108: https://github.com/google/fonts/blob/master/apache/tinos/Tinos-Bold.ttf
Source109: https://github.com/google/fonts/blob/master/apache/tinos/Tinos-BoldItalic.ttf
Source110: https://github.com/google/fonts/blob/master/apache/tinos/Tinos-Italic.ttf
Source111: https://github.com/google/fonts/blob/master/apache/tinos/Tinos-Regular.ttf
Source112: https://releases.pagure.org/lohit/lohit-gurmukhi-ttf-2.91.2.tar.gz
Source113: https://noto-website-2.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip
%else
BuildRequires: google-croscore-arimo-fonts
BuildRequires: google-croscore-cousine-fonts
BuildRequires: google-croscore-tinos-fonts
BuildRequires: google-noto-sans-cjk-jp-fonts
BuildRequires: lohit-gurmukhi-fonts
%endif
BuildRequires: dejavu-sans-fonts
BuildRequires: thai-scalable-garuda-fonts
BuildRequires: lohit-devanagari-fonts
BuildRequires: lohit-tamil-fonts
BuildRequires: google-noto-sans-khmer-fonts
# using the built from source version on aarch64
BuildRequires: ninja-build
# Yes, java is needed as well..
BuildRequires: java-1.8.0-openjdk-headless
%if 0%{?rhel} == 7
BuildRequires: devtoolset-8-toolchain, devtoolset-8-libatomic-devel
%endif
# There is a hardcoded check for nss 3.26 in the chromium code (crypto/nss_util.cc)
Requires: nss%{_isa} >= 3.26
Requires: nss-mdns%{_isa}
# GTK modules it expects to find for some reason.
Requires: libcanberra-gtk3%{_isa}
%if 0%{?fedora}
# This enables support for u2f tokens
Requires: u2f-hidraw-policy
%endif
%if 0%{vaapi}
Requires: libva
%endif
# Once upon a time, we tried to split these out... but that's not worth the effort anymore.
Provides: chromium-ffmpegsumo = %{epoch}:%{version}-%{release}
Obsoletes: chromium-ffmpegsumo <= 35.0.1916.114
# This is a lie. v8 has its own version... but I'm being lazy and not using it here.
# Barring Google getting much faster on the v8 side (or much slower on the Chromium side)
# the true v8 version will be much smaller than the Chromium version that it came from.
Provides: chromium-v8 = %{epoch}:%{version}-%{release}
Obsoletes: chromium-v8 <= 3.25.28.18
# This is a lie. webrtc never had any real version. 0.2 is greater than 0.1
Provides: webrtc = 0.2
Obsoletes: webrtc <= 0.1
%if 0%{?shared}
Requires: chromium-libs%{_isa} = %{epoch}:%{version}-%{release}
# This is broken out so it can be replaced.
Requires: chromium-libs-media%{_isa} = %{epoch}:%{version}-%{release}
# Nothing to do here. chromium-libs is real.
%else
Provides: chromium-libs = %{epoch}:%{version}-%{release}
Obsoletes: chromium-libs <= %{epoch}:%{version}-%{release}
%endif
ExclusiveArch: x86_64 i686
# Bundled bits (I'm sure I've missed some)
Provides: bundled(angle) = 2422
Provides: bundled(bintrees) = 1.0.1
# This is a fork of openssl.
Provides: bundled(boringssl)
Provides: bundled(brotli) = 222564a95d9ab58865a096b8d9f7324ea5f2e03e
Provides: bundled(bspatch)
Provides: bundled(cacheinvalidation) = 20150720
Provides: bundled(colorama) = 799604a104
Provides: bundled(crashpad)
Provides: bundled(dmg_fp)
Provides: bundled(expat) = 2.2.0
Provides: bundled(fdmlibm) = 5.3
# Don't get too excited. MPEG and other legally problematic stuff is stripped out.
Provides: bundled(ffmpeg) = 3.2git
Provides: bundled(fips181) = 2.2.3
%if 0%{?bundlefontconfig}
Provides: bundled(fontconfig) = 2.12.6
%endif
Provides: bundled(gperftools) = svn144
%if 0%{?bundleharfbuzz}
Provides: bundled(harfbuzz) = 2.3.0
%endif
Provides: bundled(hunspell) = 1.6.0
Provides: bundled(iccjpeg)
%if 0%{?bundleicu}
Provides: bundled(icu) = 58.1
%endif
Provides: bundled(kitchensink) = 1
Provides: bundled(leveldb) = 1.20
Provides: bundled(libaddressinput) = 0
%if 0%{?bundlelibdrm}
Provides: bundled(libdrm) = 2.4.85
%endif
Provides: bundled(libevent) = 1.4.15
Provides: bundled(libjingle) = 9564
%if 0%{?bundlelibjpeg}
Provides: bundled(libjpeg-turbo) = 1.4.90
%endif
Provides: bundled(libphonenumber) = a4da30df63a097d67e3c429ead6790ad91d36cf4
%if 0%{?bundlelibpng}
Provides: bundled(libpng) = 1.6.22
%endif
Provides: bundled(libsrtp) = 1.5.2
%if %{bundlelibusbx}
Provides: bundled(libusbx) = 1.0.17
%endif
Provides: bundled(libvpx) = 1.6.0
%if %{bundlelibwebp}
Provides: bundled(libwebp) = 0.6.0
%endif
%if %{bundlelibxml}
# Well, it's actually newer than 2.9.4 and has code in it that has been reverted upstream... but eh.
Provides: bundled(libxml) = 2.9.4
%endif
Provides: bundled(libXNVCtrl) = 302.17
Provides: bundled(libyuv) = 1651
Provides: bundled(lzma) = 15.14
Provides: bundled(libudis86) = 1.7.1
Provides: bundled(mesa) = 9.0.3
Provides: bundled(NSBezierPath) = 1.0
Provides: bundled(mozc)
Provides: bundled(mt19937ar) = 2002.1.26
%if %{bundleopus}
Provides: bundled(opus) = 1.1.3
%endif
Provides: bundled(ots) = 8d70cffebbfa58f67a5c3ed0e9bc84dccdbc5bc0
Provides: bundled(protobuf) = 3.0.0.beta.3
Provides: bundled(qcms) = 4
%if 0%{?bundlere2}
Provides: bundled(re2)
%endif
Provides: bundled(sfntly) = 04740d2600193b14aa3ef24cd9fbb3d5996b9f77
Provides: bundled(skia)
Provides: bundled(SMHasher) = 0
Provides: bundled(snappy) = 1.1.4-head
Provides: bundled(speech-dispatcher) = 0.7.1
Provides: bundled(sqlite) = 3.17patched
Provides: bundled(superfasthash) = 0
Provides: bundled(talloc) = 2.0.1
Provides: bundled(usrsctp) = 0
Provides: bundled(v8) = 5.9.211.31
Provides: bundled(webrtc) = 90usrsctp
Provides: bundled(woff2) = 445f541996fe8376f3976d35692fd2b9a6eedf2d
Provides: bundled(xdg-mime)
Provides: bundled(xdg-user-dirs)
Provides: bundled(x86inc) = 0
# Provides: bundled(zlib) = 1.2.11
# For selinux scriptlet
Requires(post): /usr/sbin/semanage
Requires(post): /usr/sbin/restorecon
%description
Chromium is an open-source web browser, powered by WebKit (Blink).
%package common
Summary: Files needed for both the headless_shell and full Chromium
# Chromium needs an explicit Requires: minizip-compat
# We put it here to cover headless too.
%if 0%{?fedora} >= 30
Requires: minizip-compat%{_isa}
%else
Requires: minizip%{_isa}
%endif
%description common
%{summary}.
%if 0%{?shared}
%package libs
Summary: Shared libraries used by chromium (and chrome-remote-desktop)
Requires: chromium-common%{_isa} = %{epoch}:%{version}-%{release}
Requires: chromium-libs-media%{_isa} = %{epoch}:%{version}
Obsoletes: chromium-widevinecdm-plugin < 23.0.0.207
%description libs
Shared libraries used by chromium (and chrome-remote-desktop).
%if %{freeworld}
%package libs-media-freeworld
Summary: Chromium media libraries built with all possible codecs
Provides: chromium-libs-media = %{epoch}:%{version}-%{release}
Provides: chromium-libs-media%{_isa} = %{epoch}:%{version}-%{release}
Obsoletes: chromium-libs-media < %{epoch}:%{version}-%{release}
%description libs-media-freeworld
Chromium media libraries built with all possible codecs. Chromium is an
open-source web browser, powered by WebKit (Blink). This package replaces
the default chromium-libs-media package, which is limited in what it
can include.
%else
%package libs-media
Summary: Shared libraries used by the chromium media subsystem
Requires: chromium-libs%{_isa} = %{epoch}:%{version}
%description libs-media
Shared libraries used by the chromium media subsystem.
%endif
%endif
%if %{build_remote_desktop}
%package -n chrome-remote-desktop
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires: xorg-x11-server-Xvfb
Requires: python2-psutil
%if 0%{?shared}
Requires: chromium-libs%{_isa} = %{epoch}:%{version}-%{release}
%endif
Summary: Remote desktop support for google-chrome & chromium
%description -n chrome-remote-desktop
Remote desktop support for google-chrome & chromium.
%endif
%package -n chromedriver
Summary: WebDriver for Google Chrome/Chromium
%if 0%{?shared}
Requires: chromium-libs%{_isa} = %{epoch}:%{version}-%{release}
%endif
# From Russian Fedora (minus the epoch)
Provides: chromedriver-stable = %{epoch}:%{version}-%{release}
Conflicts: chromedriver-testing
Conflicts: chromedriver-unstable
%description -n chromedriver
WebDriver is an open source tool for automated testing of webapps across many
browsers. It provides capabilities for navigating to web pages, user input,
JavaScript execution, and more. ChromeDriver is a standalone server which
implements WebDriver's wire protocol for Chromium. It is being developed by
members of the Chromium and WebDriver teams.
%package headless
Summary: A minimal headless shell built from Chromium
Requires: chromium-common%{_isa} = %{epoch}:%{version}-%{release}
%description headless
A minimal headless client built from Chromium. headless_shell is built
without support for alsa, cups, dbus, gconf, gio, kerberos, pulseaudio, or
udev.
%prep
%setup -q -n chromium-%{version}
# Fix Russian Translation
sed -i 's@адежный@адёжный@g' components/strings/components_strings_ru.xtb
### Chromium Fedora Patches ###
%patch0 -p1 -b .gcc5
%patch1 -p1 -b .pathmax
%patch2 -p1 -b .addrfix
# %patch4 -p1 -b .notest
# %%patch6 -p1 -b .gnu-inline
%patch7 -p1 -b .ignore-fd-count
%patch9 -p1 -b .modern-libusbx
%patch12 -p1 -b .cups22
%patch15 -p1 -b .sandboxpie
%patch18 -p1 -b .etc
# %%patch19 -p1 -b .madv_free
%patch20 -p1 -b .gnsystem
##%patch21 -p1 -b .lastcommit
%patch22 -p1 -b .timefix
%patch24 -p1 -b .nullfix
%patch25 -p1 -b .jpegfix
%patch26 -p1 -b .ldmemory
#%%patch27 -p1 -b .setopaque
###%patch31 -p1 -b .permissive
###%patch33 -p1 -b .gcc7
%patch36 -p1 -b .revert
%patch37 -p1 -b .ffmpeg-stdatomic
%patch39 -p1 -b .system-clang
%patch42 -p1 -b .noprefix
%patch43 -p1 -b .nomangle
%patch45 -p1 -b .nozmangle
%if 0%{?rhel} == 7
%patch46 -p1 -b .kmaxskip
# %%patch47 -p1 -b .c99
%endif
%patch50 -p1 -b .pathfix
%patch53 -p1 -b .nogccoptmath
# %%if 0%%{?fedora} >= 28
# %%patch57 -p1 -b .aarch64glibc
# %%endif
#%patch62 -p1 -b .gcc5-r3
###%patch63 -p1 -b .nolibc++
%patch65 -p1 -b .gcc-round-fix
%patch67 -p1 -b .memcpyfix
%if ! 0%{?asan}
##%patch68 -p1 -b .fabi11
%endif
#%patch81 -p1 -b .pipcc
#%patch82 -p1 -b .explicit-std-move
####%patch83 -p1 -b .GetString
%patch85 -p1 -b .boolfix
#%patch86 -p1 -b .aarch64fix
%if 0%{?rhel} == 7
%patch87 -p1 -b .epel7
%endif
%patch98 -p1 -b .gcc8-alignof
##%patch99 -p1 -b .crashpad-aarch64-fix
%if 0%{?rhel} == 7
#%%patch100 -p1 -b .oldexec
%endif
%patch101 -p1 -b .widevine
%patch102 -p1 -b .fedora-user-agent
%patch103 -p1 -b .py3fix
%patch104 -p1 -b .py2
%patch111 -p1 -b .fix-default-redeclaration
#%%if 0%%{?asan}
#%%patch500 -p1 -b .clang-r2
#%%patch501 -p1 -b .clang-r4
#%%patch502 -p1 -b .clang-ffmpeg
#%%endif
%if 0%{vaapi}
%patch599 -p1 -b .vaapi
%if 0%{?fedora} < 28
%patch600 -p1 -b .libva1
%endif
%ifarch i686
%patch601 -p1 -b .i686permissive
%endif
%endif
%patch617 -p1 -b .nofc
%patch618 -p1 -b .memory
%patch628 -p1 -b .gentoogcc0
%patch629 -p1 -b .gentoogcc1
%patch630 -p1 -b .gentoogcc2
%patch631 -p1 -b .gentoogcc3
%patch632 -p1 -b .gentoogcc4
%patch633 -p1 -b .gentoogcc5
%patch634 -p1 -b .gentoogcc6
%patch635 -p1 -b .disable-ndnpc
%patch636 -p1 -b .cstring-fix
%patch637 -p1 -b .nohh
%patch638 -p1 -b .aarch64-limits
%if 0%{?rhel} == 7
%patch639 -p1 -b .el7-noexcept
%endif
# Change shebang in all relevant files in this directory and all subdirectories
# See `man find` for how the `-exec command {} +` syntax works
find -type f -exec sed -iE '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python2}=' {} +
export CFLAGS="%{optflags} -fpermissive"
export CXXFLAGS="%{optflags} -fpermissive"
%if 0%{?asan}
export CC="clang"
export CXX="clang++"
%else
export CC="gcc"
export CXX="g++"
%endif
export AR="ar"
export RANLIB="ranlib"
rm -rf buildtools/third_party/libc++/BUILD.gn
%if 0%{?nacl}
# prep the nacl tree
mkdir -p out/Release/gen/sdk/linux_x86/nacl_x86_newlib
cp -a --no-preserve=context /usr/%{_arch}-nacl/* out/Release/gen/sdk/linux_x86/nacl_x86_newlib
mkdir -p out/Release/gen/sdk/linux_x86/nacl_arm_newlib
cp -a --no-preserve=context /usr/arm-nacl/* out/Release/gen/sdk/linux_x86/nacl_arm_newlib
# Not sure if we need this or not, but better safe than sorry.
pushd out/Release/gen/sdk/linux_x86
ln -s nacl_x86_newlib nacl_x86_newlib_raw
ln -s nacl_arm_newlib nacl_arm_newlib_raw
popd
mkdir -p out/Release/gen/sdk/linux_x86/nacl_x86_newlib/bin
pushd out/Release/gen/sdk/linux_x86/nacl_x86_newlib/bin
ln -s /usr/bin/x86_64-nacl-gcc gcc
ln -s /usr/bin/x86_64-nacl-gcc x86_64-nacl-gcc
ln -s /usr/bin/x86_64-nacl-g++ g++
ln -s /usr/bin/x86_64-nacl-g++ x86_64-nacl-g++
# ln -s /usr/bin/x86_64-nacl-ar ar
ln -s /usr/bin/x86_64-nacl-ar x86_64-nacl-ar
# ln -s /usr/bin/x86_64-nacl-as as
ln -s /usr/bin/x86_64-nacl-as x86_64-nacl-as
# ln -s /usr/bin/x86_64-nacl-ranlib ranlib
ln -s /usr/bin/x86_64-nacl-ranlib x86_64-nacl-ranlib
# Cleanups
rm addr2line
ln -s /usr/bin/x86_64-nacl-addr2line addr2line
rm c++filt
ln -s /usr/bin/x86_64-nacl-c++filt c++filt
rm gprof
ln -s /usr/bin/x86_64-nacl-gprof gprof
rm readelf
ln -s /usr/bin/x86_64-nacl-readelf readelf
rm size
ln -s /usr/bin/x86_64-nacl-size size
rm strings
ln -s /usr/bin/x86_64-nacl-strings strings
popd
mkdir -p out/Release/gen/sdk/linux_x86/nacl_arm_newlib/bin
pushd out/Release/gen/sdk/linux_x86/nacl_arm_newlib/bin
ln -s /usr/bin/arm-nacl-gcc gcc
ln -s /usr/bin/arm-nacl-gcc arm-nacl-gcc
ln -s /usr/bin/arm-nacl-g++ g++
ln -s /usr/bin/arm-nacl-g++ arm-nacl-g++
ln -s /usr/bin/arm-nacl-ar arm-nacl-ar
ln -s /usr/bin/arm-nacl-as arm-nacl-as
ln -s /usr/bin/arm-nacl-ranlib arm-nacl-ranlib
popd
touch out/Release/gen/sdk/linux_x86/nacl_x86_newlib/stamp.untar out/Release/gen/sdk/linux_x86/nacl_x86_newlib/stamp.prep
touch out/Release/gen/sdk/linux_x86/nacl_x86_newlib/nacl_x86_newlib.json
touch out/Release/gen/sdk/linux_x86/nacl_arm_newlib/stamp.untar out/Release/gen/sdk/linux_x86/nacl_arm_newlib/stamp.prep
touch out/Release/gen/sdk/linux_x86/nacl_arm_newlib/nacl_arm_newlib.json
pushd out/Release/gen/sdk/linux_x86/
mkdir -p pnacl_newlib pnacl_translator
# Might be able to do symlinks here, but eh.
cp -a --no-preserve=context /usr/pnacl_newlib/* pnacl_newlib/
cp -a --no-preserve=context /usr/pnacl_translator/* pnacl_translator/
for i in lib/libc.a lib/libc++.a lib/libg.a lib/libm.a; do
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/x86_64_bc-nacl/$i
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/i686_bc-nacl/$i
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/le32-nacl/$i
done
for i in lib/libpthread.a lib/libnacl.a; do
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/le32-nacl/$i
done
for i in lib/clang/3.7.0/lib/x86_64_bc-nacl/libpnaclmm.a lib/clang/3.7.0/lib/i686_bc-nacl/libpnaclmm.a; do
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/$i
done
for i in lib/clang/3.7.0/lib/le32-nacl/libpnaclmm.a lib/clang/3.7.0/lib/le32-nacl/libgcc.a; do
/usr/pnacl_newlib/bin/pnacl-ranlib pnacl_newlib/$i
done
popd
mkdir -p native_client/toolchain/.tars/linux_x86
touch native_client/toolchain/.tars/linux_x86/pnacl_translator.json
pushd native_client/toolchain
ln -s ../../out/Release/gen/sdk/linux_x86 linux_x86
popd
mkdir -p third_party/llvm-build/Release+Asserts/bin
pushd third_party/llvm-build/Release+Asserts/bin
ln -sf /usr/bin/clang clang
ln -sf /usr/bin/clang++ clang++
popd
%endif
# Unpack fonts
pushd third_party/test_fonts
mkdir test_fonts
cd test_fonts
unzip %{SOURCE14}
tar xf %{SOURCE15}
mv MuktiNarrow0.94/MuktiNarrow.ttf .
rm -rf MuktiNarrow0.94