diff --git a/.gitignore b/.gitignore index 8de46f2..fc6f236 100644 --- a/.gitignore +++ b/.gitignore @@ -1,426 +1,260 @@ -firefox-langpacks-3.6.4-20100622.tar.bz2 -firefox-3.6.4.source.tar.bz2 -/firefox-3.6.9.source.tar.bz2 -/firefox-langpacks-3.6.9-20100906.tar.bz2 -/firefox-3.6.11.source.tar.bz2 -/firefox-langpacks-3.6.11-20101019.tar.bz2 -/firefox-3.6.12.source.tar.bz2 -/firefox-langpacks-3.6.12-20101027.tar.bz2 -/firefox-3.6.13.source.tar.bz2 -/firefox-langpacks-3.6.13-20101210.tar.bz2 -/firefox-3.6.14.source.tar.bz2 -/firefox-langpacks-3.6.14-20110301.tar.bz2 -/firefox-3.6.15.source.tar.bz2 -/firefox-langpacks-3.6.15-20110307.tar.bz2 -/firefox-3.6.16.source.tar.bz2 -/firefox-langpacks-3.6.16-20110322.tar.xz -/firefox-langpacks-3.6.17-20110428.tar.xz -/firefox-3.6.17.source.tar.bz2 -/firefox-3.6.18.source.tar.bz2 -/firefox-langpacks-3.6.18-20110621.tar.xz -/firefox-3.6.22.source.tar.bz2 -/firefox-langpacks-3.6.22-20110906.tar.xz -/firefox-langpacks-3.6.20-20110816.tar.xz -/firefox-3.6.20.source.tar.bz2 -/firefox-7.0.source.tar.bz2 -/firefox-langpacks-7.0-20110927.tar.xz -/firefox-7.0.1.source.tar.bz2 -/firefox-langpacks-7.0.1-20110930.tar.xz -/firefox-8.0.source.tar.bz2 -/firefox-langpacks-8.0-20111108.tar.xz -/firefox-9.0b5.source.tar.bz2 -/firefox-langpacks-9.0b5-20111215.tar.xz -/firefox-9.0.source.tar.bz2 -/firefox-langpacks-9.0-20111220.tar.xz -/firefox-9.0.1.source.tar.bz2 -/firefox-langpacks-9.0.1-20111223.tar.xz +/firefox-7.0b6.source.tar.bz2 +/firefox-langpacks-7.0b6-20110919.tar.bz2 +/firefox-langpacks-8.0-20111004.tar.bz2 +/firefox-langpacks-8.0-20111007.tar.bz2 +/firefox-8.0b2.source.tar.bz2 +/firefox-8.0b3.source.tar.bz2 +/firefox-langpacks-8.0-20111014.tar.bz2 /firefox-10.0.source.tar.bz2 -/firefox-langpacks-10.0-20120131.tar.xz -/firefox-10.0.1.source.tar.bz2 -/firefox-langpacks-10.0.1-20120209.tar.xz -/firefox-11.0.source.tar.bz2 -/firefox-langpacks-11.0-20120313.tar.xz -/firefox-12.0.source.tar.bz2 -/firefox-langpacks-12.0-20120424.tar.xz -/firefox-13.0.source.tar.bz2 -/firefox-langpacks-13.0-20120604.tar.xz -/firefox-13.0.1.source.tar.bz2 -/firefox-langpacks-13.0.1-20120616.tar.xz -/firefox-14.0.1.source.tar.bz2 -/firefox-langpacks-14.0.1-20120716.tar.xz -/firefox-15.0.source.tar.bz2 -/firefox-langpacks-15.0-20120827.tar.xz -/firefox-15.0.1.source.tar.bz2 -/firefox-langpacks-15.0.1-20120911.tar.xz -/firefox-16.0.source.tar.bz2 -/firefox-langpacks-16.0-20121008.tar.xz -/firefox-16.0.1.source.tar.bz2 -/firefox-langpacks-16.0.1-20121011.tar.xz -/firefox-16.0.2.source.tar.bz2 -/firefox-langpacks-16.0.2-20121026.tar.xz -/firefox-langpacks-17.0-20121119.tar.xz -/firefox-17.0.source.tar.bz2 -/firefox-17.0.1.source.tar.bz2 -/firefox-langpacks-17.0.1-20121129.tar.xz -/firefox-langpacks-18.0-20130109.tar.xz -/firefox-18.0.source.tar.bz2 -/firefox-18.0.1.source.tar.bz2 -/firefox-langpacks-18.0.1-20130125.tar.xz -/firefox-18.0.2.source.tar.bz2 -/firefox-langpacks-18.0.2-20130206.tar.xz -/firefox-19.0.source.tar.bz2 -/firefox-langpacks-19.0-20130219.tar.xz -/firefox-19.0.2.source.tar.bz2 -/firefox-langpacks-19.0.2-20130311.tar.xz -/firefox-langpacks-20.0-20130401.tar.xz -/firefox-20.0.source.tar.bz2 -/firefox-21.0.source.tar.bz2 -/firefox-langpacks-21.0-20130514.tar.xz -/firefox-22.0.source.tar.bz2 -/firefox-langpacks-22.0-20130621.tar.xz -/firefox-23.0.source.tar.bz2 -/firefox-langpacks-23.0-20130731.tar.xz -/firefox-langpacks-23.0-20130805.tar.xz -/firefox-23.0.1.source.tar.bz2 -/firefox-langpacks-23.0.1-20130819.tar.xz -/firefox-langpacks-24.0-20130913.tar.xz -/firefox-24.0.source.tar.bz2 -/firefox-25.0.source.tar.bz2 -/firefox-langpacks-25.0-20131024.tar.xz -/firefox-langpacks-25.0-20131030.tar.xz -/firefox-26.0.source.tar.bz2 -/firefox-langpacks-26.0-20131209.tar.xz -/firefox-27.0.source.tar.bz2 -/firefox-langpacks-27.0-20140203.tar.xz -/firefox-27.0.1.source.tar.bz2 -/firefox-langpacks-27.0.1-20140224.tar.xz -/firefox-28.0.source.tar.bz2 -/firefox-langpacks-28.0-20140318.tar.xz -/firefox-29.0.source.tar.bz2 -/firefox-langpacks-29.0-20140422.tar.xz -/firefox-29.0.1.source.tar.bz2 -/firefox-langpacks-29.0.1-20140514.tar.xz -/firefox-30.0.source.tar.bz2 -/firefox-langpacks-30.0-20140604.tar.xz -/firefox-31.0.source.tar.bz2 -/firefox-langpacks-31.0-20140717.tar.xz -/firefox-32.0.source.tar.bz2 -/firefox-langpacks-32.0-20140826.tar.xz -/firefox-32.0.1.source.tar.bz2 -/firefox-langpacks-32.0.1-20140915.tar.xz -/firefox-32.0.2.source.tar.bz2 -/firefox-langpacks-32.0.2-20140918.tar.xz -/firefox-langpacks-33.0-20141014.tar.xz -/firefox-33.0.source.tar.bz2 -/firefox-33.1.source.tar.bz2 -/firefox-langpacks-33.1-20141111.tar.xz -/firefox-34.0.source.tar.bz2 -/firefox-langpacks-34.0-20141201.tar.xz -/firefox-35.0.source.tar.bz2 -/firefox-langpacks-35.0-20150106.tar.xz -/firefox-langpacks-35.0-20150109.tar.xz -/firefox-35.0.1.source.tar.bz2 -/firefox-langpacks-35.0.1-20150123.tar.xz -/firefox-36.0.source.tar.bz2 -/firefox-langpacks-36.0-20150220.tar.xz -/firefox-36.0.1.source.tar.bz2 -/firefox-langpacks-36.0.1-20150309.tar.xz -/firefox-36.0.3.source.tar.bz2 -/firefox-langpacks-36.0.3-20150320.tar.xz -/firefox-36.0.4.source.tar.bz2 -/firefox-langpacks-36.0.4-20150321.tar.xz -/firefox-langpacks-37.0-20150327.tar.xz -/firefox-37.0.source.tar.bz2 -/firefox-langpacks-37.0.1-20150407.tar.xz -/firefox-37.0.1.source.tar.bz2 -/firefox-37.0.2.source.tar.bz2 -/firefox-langpacks-37.0.2-20150416.tar.xz +/firefox-langpacks-10-20120128.tar.bz2 +/firefox-langpacks-10.0-20120129.tar.bz2 +/firefox-10.0esr.source.tar.bz2 +/firefox-langpacks-10-20120207.tar.bz2 +/firefox-langpacks-10.0-20120207.tar.bz2 +/firefox-10.0.1esr.source.tar.bz2 +/firefox-langpacks-10.0.1esr-20120209.tar.bz2 +/firefox-10.0.3esr.source.tar.bz2 +/firefox-langpacks-10.0.3-20120306.tar.bz2 +/firefox-langpacks-10.0.3esr-20120306.tar.bz2 +/firefox-10.0.7esr.source.tar.bz2 +/firefox-langpacks-10.0.7esr-20120825.tar.bz2 +/firefox-10.0.8esr.source.tar.bz2 +/firefox-langpacks-10.0.8esr-20121008.tar.bz2 +/firefox-17.0.1esr.source.tar.bz2 +/firefox-langpacks-17.0.1esr-20121220.tar.bz2 +/firefox-17.0.2esr.source.tar.bz2 +/firefox-langpacks-17.0.2esr-20130110.tar.bz2 +/firefox-langpacks-17.0.4esr-20130313.tar.bz2 +/firefox-17.0.4esr.source.tar.bz2 +/firefox-17.0.5esr.source.tar.bz2 +/firefox-langpacks-17.0.5esr-20130329.tar.bz2 +/firefox-17.0.6esr.source.tar.bz2 +/firefox-langpacks-17.0.6esr-20130517.tar.bz2 +/firefox-17.0.7esr.source.tar.bz2 +/firefox-langpacks-17.0.7esr-20130620.tar.bz2 +/firefox-17.0.9esr.source.tar.bz2 +/firefox-langpacks-17.0.9esr-20130912.tar.bz2 +/firefox-24.0esr.source.tar.bz2 +/firefox-langpacks-24.0-20131031.tar.bz2 +/firefox-langpacks-24.0esr-20131031.tar.bz2 +/firefox-24.1.0esr.source.tar.bz2 +/firefox-langpacks-24.1.0esr-20131106.tar.bz2 +/firefox-24.3.0esr.source.tar.bz2 +/firefox-langpacks-24.3.0esr-20140130.tar.bz2 +/firefox-24.4.0esr.source.tar.bz2 +/firefox-langpacks-24.4.0esr-20140318.tar.bz2 +/firefox-24.5.0esr.source.tar.bz2 +/firefox-langpacks-24.5.0esr-20140422.tar.bz2 +/firefox-24.6.0esr.source.tar.bz2 +/firefox-langpacks-24.6.0esr-20140604.tar.bz2 +/firefox-31.0esr.source.tar.bz2 +/firefox-langpacks-31.0esr-20140721.tar.bz2 +/firefox-langpacks-31.1.0esr-20140828.tar.bz2 +/firefox-31.1.0esr.source.tar.bz2 +/firefox-31.2.0esr.source.tar.bz2 +/firefox-langpacks-31.2.0esr-20141007.tar.bz2 +/firefox-langpacks-31.2.0esr-20141013.tar.bz2 +/firefox-31.3.0esr.source.tar.bz2 +/firefox-langpacks-33.3.0esr-20141126.tar.bz2 +/firefox-langpacks-31.3.0esr-20141126.tar.bz2 +/firefox-31.4.0esr.source.tar.bz2 +/firefox-langpacks-31.4.0esr-20150106.tar.bz2 +/firefox-langpacks-31.5.0esr-20150218.tar.bz2 +/firefox-31.5.0esr.source.tar.bz2 +/firefox-langpacks-37.9.0esr-20150218.tar.bz2 +/firefox-37.9.0esr.source.tar.bz2 +/devhelp-2.28.1-6.el6_6.src.rpm +/yasm-1.2.0-3.el7_0.src.rpm +/firefox-38.0b1.source.tar.bz2 +/firefox-langpacks-38.0b1-20150401.tar.bz2 +/firefox-langpacks-38.0b3-20150410.tar.bz2 +/firefox-38.0b3.source.tar.bz2 +/firefox-langpacks-38.0b5-20150420.tar.bz2 +/firefox-38.0b5.source.tar.bz2 +/firefox-38.0b6.source.tar.bz2 +/firefox-langpacks-38.0b6-20150421.tar.bz2 +/firefox-38.0b8.source.tar.bz2 +/firefox-langpacks-38.0b8-20150427.tar.bz2 /firefox-38.0.source.tar.bz2 -/firefox-langpacks-38.0-20150505.tar.bz2 -/firefox-langpacks-38.0-20150505.tar.xz -/firefox-langpacks-38.0-20150511.tar.xz -/firefox-38.0.1.source.tar.bz2 -/firefox-langpacks-38.0.1-20150518.tar.xz -/firefox-38.0.5.source.tar.bz2 -/firefox-langpacks-38.0.5-20150603.tar.xz -/firefox-39.0.source.tar.bz2 -/firefox-langpacks-39.0-20150623.tar.xz -/firefox-langpacks-39.0-20150625.tar.xz -/firefox-langpacks-39.0-20150630.tar.xz -/firefox-langpacks-39.0-20150702.tar.xz -/firefox-39.0.3.source.tar.bz2 -/firefox-langpacks-39.0.3-20150806.tar.xz -/firefox-40.0.source.tar.bz2 -/firefox-langpacks-40.0-20150807.tar.xz -/firefox-langpacks-40.0-20150811.tar.xz -/firefox-40.0.3.source.tar.bz2 -/firefox-langpacks-40.0.3-20150827.tar.xz -/firefox-41.0.source.tar.xz -/firefox-langpacks-41.0-20150915.tar.xz -/firefox-langpacks-41.0-20150917.tar.xz -/firefox-langpacks-41.0-20150918.tar.xz -/firefox-langpacks-41.0.1-20150929.tar.xz -/firefox-41.0.1.source.tar.xz -/firefox-langpacks-41.0.1-20150930.tar.xz -/firefox-41.0.2.source.tar.xz -/firefox-langpacks-41.0.2-20151015.tar.xz -/firefox-42.0.source.tar.xz -/firefox-langpacks-42.0-20151029.tar.xz -/firefox-langpacks-42.0-20151030.tar.xz -/firefox-43.0.source.tar.xz -/firefox-langpacks-43.0-20151210.tar.xz -/firefox-43.0.3.source.tar.xz -/firefox-langpacks-43.0.3-20151229.tar.xz -/firefox-43.0.4.source.tar.xz -/firefox-langpacks-43.0.4-20160114.tar.xz -/firefox-44.0.source.tar.xz -/firefox-langpacks-44.0-20160121.tar.xz -/firefox-langpacks-44.0-20160125.tar.xz -/firefox-44.0.1.source.tar.xz -/firefox-langpacks-44.0.1-20160205.tar.xz -/firefox-langpacks-44.0.1-20160208.tar.xz -/firefox-44.0.2.source.tar.xz -/firefox-langpacks-44.0.2-20160210.tar.xz -/firefox-langpacks-44.0.2-20160211.tar.xz +/firefox-langpacks-38.0-20150504.tar.bz2 +/firefox-38.0esr.source.tar.bz2 +/firefox-langpacks-38.0esr-20150506.tar.bz2 +/firefox-38.0.1esr.source.tar.bz2 +/firefox-langpacks-38.0.1esr-20150515.tar.bz2 +/firefox-38.1.0esr.source.tar.bz2 +/firefox-langpacks-38.1.0esr-20150625.tar.bz2 +/firefox-38.2.0esr.source.tar.bz2 +/firefox-langpacks-38.2.0esr-20150804.tar.bz2 +/firefox-38.1.1esr.source.tar.bz2 +/firefox-langpacks-38.1.1esr-20150806.tar.bz2 +/firefox-langpacks-38.2.0esr-20150807.tar.bz2 +/firefox-38.2.1esr.source.tar.bz2 +/firefox-langpacks-38.2.1-20150826.tar.bz2 +/firefox-langpacks-38.2.1esr-20150826.tar.bz2 +/firefox-38.3.0esr.source.tar.bz2 +/firefox-langpacks-38.3.0esr-20150915.tar.bz2 +/firefox-langpacks-38.3.0esr-20150917.tar.bz2 +/firefox-38.4.0esr.source.tar.bz2 +/firefox-langpacks-38.4.0esr-20151029.tar.bz2 +/firefox-38.5.0esr.source.tar.bz2 +/firefox-langpacks-38.5.0esr-20151211.tar.bz2 +/gcc48-4.8.2-15.el6.src.rpm +/firefox-langpacks-38.5.0esr-20151215.tar.bz2 +/firefox-45.0aurora.source.tar.bz2 +/firefox-langpacks-45.0aurora-20151215.tar.bz2 +/yasm-1.2.0.tar.gz +/yasm-1.2.0-3.el7.src.rpm +/Python-2.7.8.tgz +/devtoolset-2-binutils-2.23.52.0.1-10.el5.src.rpm +/yasm-1.2.0-3.el5.src.rpm +/gcc48-4.8.2-16.el5.src.rpm +/firefox-45.0b1.source.tar.xz +/firefox-langpacks-45.0b1-20160129.tar.xz +/firefox-langpacks-45.0b3-20160208.tar.xz +/firefox-45.0b3.source.tar.xz +/firefox-langpacks-45.0b5-20160212.tar.xz +/firefox-45.0b5.source.tar.xz +/firefox-langpacks-45.0b8-20160222.tar.xz +/firefox-45.0b8.source.tar.xz +/firefox-45.0b10.source.tar.xz +/firefox-langpacks-45.0b10-20160229.tar.xz /firefox-45.0.source.tar.xz /firefox-langpacks-45.0-20160302.tar.xz -/firefox-langpacks-45.0-20160304.tar.xz -/firefox-langpacks-45.0.1-20160316.tar.xz -/firefox-45.0.1.source.tar.xz -/firefox-45.0.2.source.tar.xz -/firefox-langpacks-45.0.2-20160411.tar.xz -/firefox-46.0.source.tar.xz -/firefox-langpacks-46.0-20160425.tar.xz -/firefox-46.0.1.source.tar.xz -/firefox-langpacks-46.0.1-20160503.tar.xz -/firefox-47.0.source.tar.xz -/firefox-langpacks-47.0-20160601.tar.xz -/firefox-langpacks-47.0-20160603.tar.xz -/firefox-langpacks-47.0-20160606.tar.xz -/firefox-47.0.1.source.tar.xz -/firefox-langpacks-47.0.1-20160711.tar.xz -/firefox-langpacks-48.0-20160726.tar.xz -/firefox-48.0.source.tar.xz -/firefox-langpacks-48.0-20160727.tar.xz -/firefox-langpacks-48.0.1-20160819.tar.xz -/firefox-48.0.1.source.tar.xz -/firefox-49.0.source.tar.xz -/firefox-langpacks-49.0-20160906.tar.xz -/firefox-langpacks-49.0-20160908.tar.xz -/firefox-langpacks-49.0-20160919.tar.xz -/firefox-49.0.2.source.tar.xz -/firefox-langpacks-49.0.2-20161031.tar.xz -/firefox-50.0.source.tar.xz -/firefox-langpacks-50.0-20161110.tar.xz -/firefox-50.0.1.source.tar.xz -/firefox-langpacks-50.0.1-20161128.tar.xz -/firefox-50.0.2.source.tar.xz -/firefox-langpacks-50.0.2-20161130.tar.xz -/firefox-50.1.0.source.tar.xz -/firefox-langpacks-50.1.0-20161213.tar.xz -/firefox-51.0.source.tar.xz -/firefox-langpacks-51.0-20170118.tar.xz -/firefox-langpacks-51.0-20170119.tar.xz -/firefox-51.0.1.source.tar.xz -/firefox-langpacks-51.0.1-20170125.tar.xz -/firefox-langpacks-51.0.1-20170126.tar.xz -/firefox-52.0.source.tar.xz -/firefox-langpacks-52.0-20170303.tar.xz -/firefox-52.0.2.source.tar.xz -/firefox-langpacks-52.0.2-20170329.tar.xz -/firefox-53.0.2.source.tar.xz -/firefox-langpacks-53.0.2-20170505.tar.xz -/firefox-53.0.3.source.tar.xz -/firefox-langpacks-53.0.3-20170526.tar.xz -/firefox-54.0.source.tar.xz -/firefox-langpacks-54.0-20170608.tar.xz -/firefox-langpacks-54.0-20170613.tar.xz -/firefox-54.0.1.source.tar.xz -/firefox-langpacks-54.0.1-20170725.tar.xz -/firefox-55.0.source.tar.xz -/firefox-langpacks-55.0-20170802.tar.xz -/firefox-langpacks-55.0-20170807.tar.xz -/firefox-55.0.1.source.tar.xz -/firefox-langpacks-55.0.1-20170814.tar.xz -/firefox-55.0.2.source.tar.xz -/firefox-langpacks-55.0.2-20170818.tar.xz -/firefox-55.0.3.source.tar.xz -/firefox-langpacks-55.0.3-20170901.tar.xz -/firefox-56.0.source.tar.xz -/firefox-langpacks-56.0-20170925.tar.xz -/firefox-langpacks-56.0-20170927.tar.xz -/firefox-57.0b5.source.tar.xz -/firefox-langpacks-57.0b5-20171005.tar.xz -/firefox-57.0b6.source.tar.xz -/firefox-langpacks-57.0b6-20171009.tar.xz -/firefox-57.0b7.source.tar.xz -/firefox-langpacks-57.0b7-20171011.tar.xz -/firefox-57.0b8.source.tar.xz -/firefox-langpacks-57.0b8-20171016.tar.xz -/firefox-57.0b9.source.tar.xz -/firefox-langpacks-57.0b9-20171019.tar.xz -/firefox-57.0b11.source.tar.xz -/firefox-langpacks-57.0b11-20171024.tar.xz -/firefox-57.0b12.source.tar.xz -/firefox-langpacks-57.0b12-20171030.tar.xz -/firefox-57.0b14.source.tar.xz -/firefox-langpacks-57.0b14-20171106.tar.xz -/firefox-57.0.source.tar.xz -/firefox-langpacks-57.0-20171109.tar.xz -/firefox-langpacks-57.0-20171113.tar.xz -/firefox-57.0.1.source.tar.xz -/firefox-langpacks-57.0.1-20171130.tar.xz -/firefox-57.0.3.source.tar.xz -/firefox-langpacks-57.0.3-20180102.tar.xz -/firefox-57.0.4.source.tar.xz -/firefox-langpacks-57.0.4-20180104.tar.xz -/firefox-58.0.source.tar.xz -/firefox-langpacks-58.0-20180123.tar.xz -/firefox-58.0.1.source.tar.xz -/firefox-langpacks-58.0.1-20180130.tar.xz -/2f6a4d2cf42c9d59626061d45c043817cb220814.tar.bz2 -/firefox-langpacks-59.0-20180306.tar.xz +/firefox-45.0esr.source.tar.xz +/firefox-langpacks-45.0esr-20160307.tar.xz +/firefox-45.0.1esr.source.tar.xz +/firefox-langpacks-45.0.1esr-20160406.tar.xz +/firefox-45.0.2esr.source.tar.xz +/firefox-langpacks-45.0.2esr-20160412.tar.xz +/firefox-45.1.0esr.source.tar.xz +/firefox-langpacks-45.1.0esr-20160421.tar.xz +/firefox-45.1.1esr.source.tar.xz +/firefox-langpacks-45.1.1esr-20160504.tar.xz +/firefox-45.2.0esr.source.tar.xz +/firefox-langpacks-45.2.0esr-20160603.tar.xz +/firefox-45.3.0esr.source.tar.xz +/firefox-langpacks-45.3.0esr-20160727.tar.xz +/firefox-45.4.0esr.source.tar.xz +/firefox-langpacks-45.4.0esr-20160907.tar.xz +/firefox-45.5.0esr.source.tar.xz +/firefox-langpacks-45.5.0esr-20161108.tar.xz +/firefox-52.0-0.1.el7.src.rpm +/firefox-langpacks-52.0esr-20161108.tar.xz +/firefox-52.0esr.source.tar.xz +/firefox-52.0b1.source.tar.xz +/firefox-langpacks-52.0b1-20170127.tar.xz +/firefox-52.0b2.source.tar.xz +/firefox-langpacks-52.0b2-20170131.tar.xz +/firefox-52.0b3.source.tar.xz +/firefox-langpacks-52.0b3-20170206.tar.xz +/firefox-52.0b8.source.tar.xz +/firefox-langpacks-52.0b8-20170221.tar.xz +/firefox-52.0b9.source.tar.xz +/firefox-langpacks-52.0b9-20170227.tar.xz +/firefox-langpacks-52.0esr-20170228.tar.xz +/firefox-langpacks-52.0esr-20170306.tar.xz /c61f5f5ead48c78a80c80db5c489bdc7cfaf8175.tar.bz2 -/firefox-langpacks-59.0-20180312.tar.xz -/firefox-langpacks-59.0.1-20180317.tar.xz -/3db9e3d52b17563efca181ccbb50deb8660c59ae.tar.bz2 -/239e434d6d2b8e1e2b697c3416d1e96d48fe98e5.tar.bz2 -/firefox-langpacks-59.0.2-20180327.tar.xz -/firefox-60.0b13.source.tar.xz -/firefox-langpacks-60.0b13-20180418.tar.xz +/firefox-langpacks-60.0b3-20180313.tar.xz +/gtk3-private-3.22.26-1.el6.src.rpm +/Python-2.7.13.tar.xz +/firefox-60.0b11.source.tar.xz +/firefox-langpacks-60.0b11-20180411.tar.xz /firefox-60.0b15.source.tar.xz -/firefox-langpacks-60.0b15-20180426.tar.xz -/firefox-60.0b16.source.tar.xz -/firefox-langpacks-60.0b16-20180427.tar.xz +/firefox-langpacks-60.0b15-20180425.tar.xz /firefox-60.0.source.tar.xz /firefox-langpacks-60.0-20180502.tar.xz -/firefox-langpacks-60.0-20180507.tar.xz -/firefox-60.0.1.source.tar.xz -/firefox-langpacks-60.0.1-20180523.tar.xz -/firefox-60.0.2.source.tar.xz -/firefox-langpacks-60.0.2-20180611.tar.xz -/firefox-61.0.source.tar.xz -/firefox-langpacks-61.0-20180619.tar.xz -/firefox-langpacks-61.0-20180622.tar.xz -/firefox-61.0.1.source.tar.xz -/firefox-langpacks-61.0.1-20180710.tar.xz -/firefox-langpacks-61.0.2-20180809.tar.xz -/firefox-61.0.2.source.tar.xz -/firefox-langpacks-62.0-20180828.tar.xz -/firefox-62.0.source.tar.xz -/firefox-62.0.2.source.tar.xz -/firefox-langpacks-62.0.2-20180924.tar.xz -/firefox-62.0.3.source.tar.xz -/firefox-langpacks-62.0.3-20181002.tar.xz -/firefox-63.0.source.tar.xz -/firefox-langpacks-63.0-20181018.tar.xz +/firefox-60.0esr.source.tar.xz +/firefox-langpacks-60.0esr-20180503.tar.xz +/firefox-langpacks-60.0esr-20180506.tar.xz +/libffi-3.0.13-18.el7_3.src.rpm +/firefox-60.1.0esr.source.tar.xz +/firefox-langpacks-60.1.0esr-20180620.tar.xz +/firefox-langpacks-60.1.0esr-20180622.tar.xz +/firefox-60.2.0esr.source.tar.xz +/firefox-langpacks-60.2.0esr-20180831.tar.xz +/firefox-nightly.tar.bz2 +/firefox-68.0b3.source.tar.xz +/firefox-langpacks-68.0b3-20190521.tar.xz +/Python-3.6.8.tar.xz /cbindgen-vendor.tar.xz -/firefox-langpacks-63.0.1-20181101.tar.xz -/firefox-63.0.1.source.tar.xz -/firefox-63.0.3.source.tar.xz -/firefox-langpacks-63.0.3-20181115.tar.xz -/firefox-64.0.source.tar.xz -/firefox-langpacks-64.0-20181204.tar.xz -/firefox-64.0.2.source.tar.xz -/firefox-langpacks-64.0.2-20190110.tar.xz -/firefox-65.0.source.tar.xz -/firefox-langpacks-65.0-20190128.tar.xz -/firefox-65.0.1.source.tar.xz -/firefox-langpacks-65.0.1-20190215.tar.xz -/firefox-65.0.2.source.tar.xz -/firefox-langpacks-65.0.2-20190301.tar.xz -/firefox-66.0.source.tar.xz -/firefox-langpacks-66.0-20190312.tar.xz -/firefox-langpacks-66.0-20190315.tar.xz -/firefox-66.0.1.source.tar.xz -/firefox-langpacks-66.0.1-20190322.tar.xz -/firefox-66.0.2.source.tar.xz -/firefox-langpacks-66.0.2-20190401.tar.xz -/firefox-langpacks-66.0.3-20190410.tar.xz -/firefox-66.0.3.source.tar.xz -/firefox-langpacks-66.0.4-20190505.tar.xz -/firefox-66.0.4.source.tar.xz -/firefox-66.0.5.source.tar.xz -/firefox-langpacks-66.0.5-20190508.tar.xz -/firefox-67.0.source.tar.xz -/firefox-langpacks-67.0-20190515.tar.xz -/firefox-langpacks-67.0-20190517.tar.xz -/firefox-67.0.2.source.tar.xz -/firefox-langpacks-67.0.2-20190611.tar.xz -/firefox-langpacks-67.0.3-20190618.tar.xz -/firefox-67.0.3.source.tar.xz -/firefox-67.0.4.source.tar.xz -/firefox-langpacks-67.0.4-20190620.tar.xz -/firefox-68.0.source.tar.xz -/firefox-langpacks-68.0-20190702.tar.xz -/firefox-langpacks-68.0-20190708.tar.xz -/firefox-68.0.1.source.tar.xz -/firefox-langpacks-68.0.1-20190722.tar.xz -/firefox-68.0.2.source.tar.xz -/firefox-langpacks-68.0.2-20190814.tar.xz -/firefox-69.0.source.tar.xz -/firefox-langpacks-69.0-20190829.tar.xz -/firefox-69.0.1.source.tar.xz -/firefox-langpacks-69.0.1-20190918.tar.xz -/firefox-langpacks-69.0.2-20191003.tar.xz -/firefox-69.0.2.source.tar.xz -/firefox-69.0.3.source.tar.xz -/firefox-langpacks-69.0.3-20191010.tar.xz -/firefox-70.0.source.tar.xz -/firefox-langpacks-70.0-20191018.tar.xz -/firefox-70.0.1.source.tar.xz -/firefox-langpacks-70.0.1-20191101.tar.xz -/firefox-71.0b12.source.tar.xz -/firefox-71.0.source.tar.xz -/firefox-langpacks-71.0-20191126.tar.xz -/firefox-langpacks-71.0-20191202.tar.xz -/firefox-72.0.source.tar.xz -/firefox-langpacks-72.0-20200103.tar.xz -/firefox-langpacks-72.0-20200106.tar.xz -/firefox-72.0.1.source.tar.xz -/firefox-langpacks-72.0.1-20200108.tar.xz -/firefox-72.0.2.source.tar.xz -/firefox-langpacks-72.0.2-20200120.tar.xz -/firefox-73.0.source.tar.xz -/firefox-langpacks-73.0-20200211.tar.xz -/firefox-73.0.1.source.tar.xz -/firefox-langpacks-73.0.1-20200220.tar.xz -/firefox-74.0.source.tar.xz -/firefox-langpacks-74.0-20200303.tar.xz -/firefox-langpacks-74.0-20200309.tar.xz -/firefox-langpacks-74.0-20200310.tar.xz -/firefox-74.0.1.source.tar.xz -/firefox-langpacks-74.0.1-20200404.tar.xz -/firefox-75.0.source.tar.xz -/firefox-langpacks-75.0-20200406.tar.xz -/firefox-76.0.source.tar.xz -/firefox-langpacks-76.0-20200502.tar.xz -/firefox-76.0.1.source.tar.xz -/firefox-langpacks-76.0.1-20200508.tar.xz -/firefox-77.0.source.tar.xz -/firefox-langpacks-77.0-20200529.tar.xz -/firefox-langpacks-77.0-20200602.tar.xz -/firefox-77.0.1.source.tar.xz -/firefox-langpacks-77.0.1-20200603.tar.xz -/firefox-78.0.source.tar.xz -/firefox-langpacks-78.0-20200629.tar.xz -/firefox-78.0.1.source.tar.xz -/firefox-langpacks-78.0.1-20200701.tar.xz -/firefox-78.0.2.source.tar.xz -/firefox-langpacks-78.0.2-20200709.tar.xz -/firefox-79.0.source.tar.xz -/firefox-langpacks-79.0-20200727.tar.xz -/firefox-80.0.source.tar.xz -/firefox-langpacks-80.0-20200818.tar.xz -/firefox-langpacks-80.0-20200820.tar.xz -/firefox-80.0.1.source.tar.xz -/firefox-langpacks-80.0.1-20200901.tar.xz -/firefox-81.0.source.tar.xz -/firefox-langpacks-81.0-20200915.tar.xz -/firefox-langpacks-81.0-20200921.tar.xz -/firefox-81.0.1.source.tar.xz -/firefox-langpacks-81.0.1-20200930.tar.xz -/firefox-81.0.2.source.tar.xz -/firefox-langpacks-81.0.2-20201012.tar.xz -/firefox-82.0.source.tar.xz -/firefox-langpacks-82.0-20201015.tar.xz +/nodejs-8.11.4-1.fc27.src.rpm +/firefox-68.0b13.source.tar.xz +/firefox-langpacks-68.0b13-20190625.tar.xz +/firefox-68.0esr.source.tar.xz +/firefox-langpacks-68.0esr-20190716.tar.xz +/addon-751081-latest.xpi +/firefox-68.0.1esr.source.tar.xz +/firefox-langpacks-68.0.1esr-20190726.tar.xz +/firefox-68.1.0esr.source.tar.xz +/firefox-langpacks-68.1.0esr-20190828.tar.xz +/openssl-1.0.2k-19.el7_7.src.rpm +/openssl-1.0.2k-19.bundle.el7_7.src.rpm +/openssl-1.0.2k-19.1.bundle.el7_7.src.rpm +/openssl-1.0.2k-19.2.bundle.el7_7.src.rpm +/openssl-1.0.2k-19.3.bundle.el7_7.src.rpm +/openssl-1.0.2k-19.4.bundle.el7_7.src.rpm +/openssl-1.0.2k-19.5.bundle.el7_7.src.rpm +/openssl-1.0.2k-19.6.bundle.el7_7.src.rpm +/nodejs-8.11.4-1.1.fc27.src.rpm +/nodejs-8.11.4-1.2.fc27.src.rpm +/nodejs-8.11.4-1.3.fc27.src.rpm +/firefox-68.2.0esr.source.tar.xz +/firefox-langpacks-68.2.0esr-20191017.tar.xz +/firefox-68.3.0esr.source.tar.xz +/firefox-langpacks-68.3.0esr-20191127.tar.xz +/firefox-68.4.0esr.source.tar.xz +/firefox-langpacks-68.4.0esr-20200103.tar.xz +/firefox-68.4.1esr.source.tar.xz +/firefox-langpacks-68.4.1esr-20200108.tar.xz +/firefox-68.5.0esr.source.tar.xz +/firefox-langpacks-68.5.0esr-20200205.tar.xz +/firefox-langpacks-68.5.0esr-20200207.tar.xz +/firefox-68.6.0esr.source.tar.xz +/firefox-langpacks-68.6.0esr-20200304.tar.xz +/firefox-68.7.0esr.source.tar.xz +/firefox-langpacks-68.7.0esr-20200402.tar.xz +/firefox-68.6.1esr.source.tar.xz +/firefox-langpacks-68.6.1esr-20200406.tar.xz +/firefox-langpacks-68.7.0esr-20200407.tar.xz +/firefox-68.8.0esr.source.tar.xz +/firefox-langpacks-68.8.0esr-20200429.tar.xz +/firefox-68.9.0esr.source.tar.xz +/firefox-langpacks-68.9.0esr-20200529.tar.xz +/firefox-68.10.0esr.source.tar.xz +/firefox-langpacks-68.10.0esr-20200626.tar.xz +/firefox-68.11.0esr.source.tar.xz +/firefox-langpacks-68.11.0esr-20200724.tar.xz +/firefox-78.0b3.source.tar.xz +/firefox-langpacks-78.0b3-20200605.tar.xz +/firefox-78.0b8.source.tar.xz +/firefox-langpacks-78.0b8-20200617.tar.xz +/nodejs-12.16.1-1.fc31.src.rpm +/nodejs-12.16.3-1.fc33.src.rpm +/nodejs-10.21.0-3.el8_0.src.rpm +/firefox-78.0esr.source.tar.xz +/firefox-langpacks-78.0esr-20200626.tar.xz +/firefox-78.0.1esr.source.tar.xz +/firefox-langpacks-78.0.1esr-20200707.tar.xz +/nspr-4.25.0-1.el8_0.src.rpm +/nss-3.53.0-1.el8_0.src.rpm +/nss-3.53.1-3.el8_0.src.rpm +/firefox-78.1.0esr.source.tar.xz +/firefox-langpacks-78.1.0esr-20200723.tar.xz +/firefox-78.2.0esr.source.tar.xz +/firefox-langpacks-78.2.0esr-20200818.tar.xz +/cbindgen-vendor-0.14.3.tar.xz +/nodejs-10.21.0-4.fc32.src.rpm +/nss-3.53.1-3.fc32.src.rpm +/firefox-78.3.0esr.source.tar.xz +/firefox-langpacks-78.3.0esr-20200918.tar.xz +/nodejs-10.21.0-5.fc32.src.rpm +/firefox-78.4.0esr.source.tar.xz +/firefox-langpacks-78.4.0esr-20201016.tar.xz +/firefox-78.4.1esr.source.tar.xz +/firefox-langpacks-78.4.1esr-20201109.tar.xz +/firefox-78.5.0esr.source.tar.xz +/firefox-langpacks-78.5.0esr-20201118.tar.xz +/firefox-78.6.0esr.source.tar.xz +/firefox-langpacks-78.6.0esr-20201210.tar.xz +/firefox-78.6.1esr.source.tar.xz +/firefox-langpacks-78.6.1esr-20210106.tar.xz diff --git a/build-aarch64-skia.patch b/build-aarch64-skia.patch deleted file mode 100644 index a63e3e8..0000000 --- a/build-aarch64-skia.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff -up firefox-72.0/gfx/skia/skia/include/private/SkHalf.h.aarch64-skia firefox-72.0/gfx/skia/skia/include/private/SkHalf.h ---- firefox-72.0/gfx/skia/skia/include/private/SkHalf.h.aarch64-skia 2020-01-02 22:33:02.000000000 +0100 -+++ firefox-72.0/gfx/skia/skia/include/private/SkHalf.h 2020-01-03 09:00:37.537296105 +0100 -@@ -40,7 +40,7 @@ static inline Sk4h SkFloatToHalf_finite_ - - static inline Sk4f SkHalfToFloat_finite_ftz(uint64_t rgba) { - Sk4h hs = Sk4h::Load(&rgba); --#if !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) -+#if 0 // !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) - float32x4_t fs; - asm ("fcvtl %[fs].4s, %[hs].4h \n" // vcvt_f32_f16(...) - : [fs] "=w" (fs) // =w: write-only NEON register -@@ -62,7 +62,7 @@ static inline Sk4f SkHalfToFloat_finite_ - } - - static inline Sk4h SkFloatToHalf_finite_ftz(const Sk4f& fs) { --#if !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) -+#if 0 // !defined(SKNX_NO_SIMD) && defined(SK_CPU_ARM64) - float32x4_t vec = fs.fVec; - asm ("fcvtn %[vec].4h, %[vec].4s \n" // vcvt_f16_f32(vec) - : [vec] "+w" (vec)); // +w: read-write NEON register -diff -up firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h ---- firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h.aarch64-skia 2020-01-03 09:00:37.538296107 +0100 -+++ firefox-72.0/gfx/skia/skia/src/opts/SkRasterPipeline_opts.h 2020-01-03 10:11:41.259219508 +0100 -@@ -1087,7 +1087,7 @@ SI F from_half(U16 h) { - } - - SI U16 to_half(F f) { --#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ -+#if 0 //defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ - && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. - return vcvt_f16_f32(f); - -diff -up firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h.aarch64-skia firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h ---- firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h.aarch64-skia 2020-01-03 09:00:37.538296107 +0100 -+++ firefox-72.0/gfx/skia/skia/third_party/skcms/src/Transform_inl.h 2020-01-03 10:11:53.513250979 +0100 -@@ -183,8 +183,6 @@ SI F F_from_Half(U16 half) { - SI U16 Half_from_F(F f) { - #if defined(USING_NEON_FP16) - return bit_pun(f); --#elif defined(USING_NEON_F16C) -- return (U16)vcvt_f16_f32(f); - #elif defined(USING_AVX512F) - return (U16)_mm512_cvtps_ph((__m512 )f, _MM_FROUND_CUR_DIRECTION ); - #elif defined(USING_AVX_F16C) diff --git a/build-arm-libaom.patch b/build-arm-libaom.patch deleted file mode 100644 index 985f01d..0000000 --- a/build-arm-libaom.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-73.0/media/libaom/moz.build.old firefox-73.0/media/libaom/moz.build ---- firefox-73.0/media/libaom/moz.build.old 2020-02-07 23:13:28.000000000 +0200 -+++ firefox-73.0/media/libaom/moz.build 2020-02-17 10:30:08.509805092 +0200 -@@ -55,7 +55,7 @@ elif CONFIG['CPU_ARCH'] == 'arm': - - for f in SOURCES: - if f.endswith('neon.c'): -- SOURCES[f].flags += CONFIG['VPX_ASFLAGS'] -+ SOURCES[f].flags += CONFIG['NEON_FLAGS'] - - if CONFIG['OS_TARGET'] == 'Android': - # For cpu-features.h diff --git a/build-arm-libopus.patch b/build-arm-libopus.patch deleted file mode 100644 index 1b3f31b..0000000 --- a/build-arm-libopus.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-66.0/media/libopus/silk/arm/arm_silk_map.c.old firefox-66.0/media/libopus/silk/arm/arm_silk_map.c ---- firefox-66.0/media/libopus/silk/arm/arm_silk_map.c.old 2019-03-12 21:07:35.356677522 +0100 -+++ firefox-66.0/media/libopus/silk/arm/arm_silk_map.c 2019-03-12 21:07:42.937693394 +0100 -@@ -28,7 +28,7 @@ POSSIBILITY OF SUCH DAMAGE. - # include "config.h" - #endif - --#include "main_FIX.h" -+#include "fixed/main_FIX.h" - #include "NSQ.h" - #include "SigProc_FIX.h" - diff --git a/build-arm-wasm.patch b/build-arm-wasm.patch deleted file mode 100644 index bd841ab..0000000 --- a/build-arm-wasm.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up firefox-72.0.2/js/src/wasm/WasmSignalHandlers.cpp.old firefox-72.0.2/js/src/wasm/WasmSignalHandlers.cpp ---- firefox-72.0.2/js/src/wasm/WasmSignalHandlers.cpp.old 2020-01-17 23:34:41.000000000 +0200 -+++ firefox-72.0.2/js/src/wasm/WasmSignalHandlers.cpp 2020-02-02 08:07:54.670341986 +0200 -@@ -249,7 +249,16 @@ using mozilla::DebugOnly; - #endif - - #ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS --# include -+struct user_vfp { -+ unsigned long long fpregs[32]; -+ unsigned long fpscr; -+}; -+ -+struct user_vfp_exc { -+ unsigned long fpexc; -+ unsigned long fpinst; -+ unsigned long fpinst2; -+}; - #endif - - #if defined(ANDROID) diff --git a/build-cacheFlush-missing.patch b/build-cacheFlush-missing.patch deleted file mode 100644 index 51c368c..0000000 --- a/build-cacheFlush-missing.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up firefox-55.0.3/js/src/jit/ExecutableAllocator.h.wasm firefox-55.0.3/js/src/jit/ExecutableAllocator.h ---- firefox-55.0.3/js/src/jit/ExecutableAllocator.h.wasm 2017-09-05 11:32:12.235909468 +0200 -+++ firefox-55.0.3/js/src/jit/ExecutableAllocator.h 2017-09-05 11:32:46.157916575 +0200 -@@ -219,7 +219,7 @@ class ExecutableAllocator - - static void poisonCode(JSRuntime* rt, JitPoisonRangeVector& ranges); - --#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) || defined(JS_SIMULATOR_ARM64) -+#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64) || defined(JS_SIMULATOR_ARM64) || defined(JS_CODEGEN_NONE) - static void cacheFlush(void*, size_t) - { - } -diff -up firefox-55.0.3/js/src/jit-test/tests/wasm/bench/wasm_box2d.wasm firefox-55.0.3/js/src/jit-test/tests/wasm/bench/wasm_box2d diff --git a/build-cubeb-pulse-arm.patch b/build-cubeb-pulse-arm.patch deleted file mode 100644 index 008208c..0000000 --- a/build-cubeb-pulse-arm.patch +++ /dev/null @@ -1,4946 +0,0 @@ -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/Cargo.toml.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/Cargo.toml ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/Cargo.toml.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/Cargo.toml 2017-08-04 13:37:46.383821740 +0200 -@@ -7,7 +7,11 @@ description = "Cubeb backed for PulseAud - [features] - pulse-dlopen = ["pulse-ffi/dlopen"] - -+[lib] -+crate-type = ["staticlib", "rlib"] -+ - [dependencies] - cubeb-ffi = { path = "cubeb-ffi" } - pulse-ffi = { path = "pulse-ffi" } -+pulse = { path = "pulse-rs" } - semver = "^0.6" -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/cubeb-ffi/src/ffi.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/cubeb-ffi/src/ffi.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/cubeb-ffi/src/ffi.rs.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/cubeb-ffi/src/ffi.rs 2017-08-04 13:37:46.384821737 +0200 -@@ -11,45 +11,45 @@ pub enum Context {} - pub enum Stream {} - - // These need to match cubeb_sample_format --pub const SAMPLE_S16LE: c_int = 0; --pub const SAMPLE_S16BE: c_int = 1; --pub const SAMPLE_FLOAT32LE: c_int = 2; --pub const SAMPLE_FLOAT32BE: c_int = 3; - pub type SampleFormat = c_int; -+pub const SAMPLE_S16LE: SampleFormat = 0; -+pub const SAMPLE_S16BE: SampleFormat = 1; -+pub const SAMPLE_FLOAT32LE: SampleFormat = 2; -+pub const SAMPLE_FLOAT32BE: SampleFormat = 3; - - #[cfg(target_endian = "little")] --pub const SAMPLE_S16NE: c_int = SAMPLE_S16LE; -+pub const SAMPLE_S16NE: SampleFormat = SAMPLE_S16LE; - #[cfg(target_endian = "little")] --pub const SAMPLE_FLOAT32NE: c_int = SAMPLE_FLOAT32LE; -+pub const SAMPLE_FLOAT32NE: SampleFormat = SAMPLE_FLOAT32LE; - #[cfg(target_endian = "big")] --pub const SAMPLE_S16NE: c_int = SAMPLE_S16BE; -+pub const SAMPLE_S16NE: SampleFormat = SAMPLE_S16BE; - #[cfg(target_endian = "big")] --pub const SAMPLE_FLOAT32NE: c_int = SAMPLE_FLOAT32BE; -+pub const SAMPLE_FLOAT32NE: SampleFormat = SAMPLE_FLOAT32BE; - - pub type DeviceId = *const c_void; - - // These need to match cubeb_channel_layout --pub const LAYOUT_UNDEFINED: c_int = 0; --pub const LAYOUT_DUAL_MONO: c_int = 1; --pub const LAYOUT_DUAL_MONO_LFE: c_int = 2; --pub const LAYOUT_MONO: c_int = 3; --pub const LAYOUT_MONO_LFE: c_int = 4; --pub const LAYOUT_STEREO: c_int = 5; --pub const LAYOUT_STEREO_LFE: c_int = 6; --pub const LAYOUT_3F: c_int = 7; --pub const LAYOUT_3F_LFE: c_int = 8; --pub const LAYOUT_2F1: c_int = 9; --pub const LAYOUT_2F1_LFE: c_int = 10; --pub const LAYOUT_3F1: c_int = 11; --pub const LAYOUT_3F1_LFE: c_int = 12; --pub const LAYOUT_2F2: c_int = 13; --pub const LAYOUT_2F2_LFE: c_int = 14; --pub const LAYOUT_3F2: c_int = 15; --pub const LAYOUT_3F2_LFE: c_int = 16; --pub const LAYOUT_3F3R_LFE: c_int = 17; --pub const LAYOUT_3F4_LFE: c_int = 18; --pub const LAYOUT_MAX: c_int = 19; - pub type ChannelLayout = c_int; -+pub const LAYOUT_UNDEFINED: ChannelLayout = 0; -+pub const LAYOUT_DUAL_MONO: ChannelLayout = 1; -+pub const LAYOUT_DUAL_MONO_LFE: ChannelLayout = 2; -+pub const LAYOUT_MONO: ChannelLayout = 3; -+pub const LAYOUT_MONO_LFE: ChannelLayout = 4; -+pub const LAYOUT_STEREO: ChannelLayout = 5; -+pub const LAYOUT_STEREO_LFE: ChannelLayout = 6; -+pub const LAYOUT_3F: ChannelLayout = 7; -+pub const LAYOUT_3F_LFE: ChannelLayout = 8; -+pub const LAYOUT_2F1: ChannelLayout = 9; -+pub const LAYOUT_2F1_LFE: ChannelLayout = 10; -+pub const LAYOUT_3F1: ChannelLayout = 11; -+pub const LAYOUT_3F1_LFE: ChannelLayout = 12; -+pub const LAYOUT_2F2: ChannelLayout = 13; -+pub const LAYOUT_2F2_LFE: ChannelLayout = 14; -+pub const LAYOUT_3F2: ChannelLayout = 15; -+pub const LAYOUT_3F2_LFE: ChannelLayout = 16; -+pub const LAYOUT_3F3R_LFE: ChannelLayout = 17; -+pub const LAYOUT_3F4_LFE: ChannelLayout = 18; -+pub const LAYOUT_MAX: ChannelLayout = 256; - - #[repr(C)] - #[derive(Clone, Copy, Debug)] -@@ -77,11 +77,11 @@ impl Default for Device { - } - - // These need to match cubeb_state --pub const STATE_STARTED: c_int = 0; --pub const STATE_STOPPED: c_int = 1; --pub const STATE_DRAINED: c_int = 2; --pub const STATE_ERROR: c_int = 3; - pub type State = c_int; -+pub const STATE_STARTED: State = 0; -+pub const STATE_STOPPED: State = 1; -+pub const STATE_DRAINED: State = 2; -+pub const STATE_ERROR: State = 3; - - pub const OK: i32 = 0; - pub const ERROR: i32 = -1; -@@ -249,32 +249,42 @@ pub struct LayoutMap { - } - - // cubeb_mixer.h -+pub type Channel = c_int; - - // These need to match cubeb_channel --pub const CHANNEL_INVALID: c_int = -1; --pub const CHANNEL_MONO: c_int = 0; --pub const CHANNEL_LEFT: c_int = 1; --pub const CHANNEL_RIGHT: c_int = 2; --pub const CHANNEL_CENTER: c_int = 3; --pub const CHANNEL_LS: c_int = 4; --pub const CHANNEL_RS: c_int = 5; --pub const CHANNEL_RLS: c_int = 6; --pub const CHANNEL_RCENTER: c_int = 7; --pub const CHANNEL_RRS: c_int = 8; --pub const CHANNEL_LFE: c_int = 9; --pub const CHANNEL_MAX: c_int = 256; --pub type Channel = c_int; -+pub const CHANNEL_INVALID: Channel = -1; -+pub const CHANNEL_MONO: Channel = 0; -+pub const CHANNEL_LEFT: Channel = 1; -+pub const CHANNEL_RIGHT: Channel = 2; -+pub const CHANNEL_CENTER: Channel = 3; -+pub const CHANNEL_LS: Channel = 4; -+pub const CHANNEL_RS: Channel = 5; -+pub const CHANNEL_RLS: Channel = 6; -+pub const CHANNEL_RCENTER: Channel = 7; -+pub const CHANNEL_RRS: Channel = 8; -+pub const CHANNEL_LFE: Channel = 9; -+pub const CHANNEL_MAX: Channel = 10; - - #[repr(C)] -+#[derive(Clone, Copy, Debug)] - pub struct ChannelMap { - pub channels: c_uint, -- pub map: [Channel; 256], -+ pub map: [Channel; CHANNEL_MAX as usize], - } - impl ::std::default::Default for ChannelMap { - fn default() -> Self { - ChannelMap { - channels: 0, -- map: unsafe { ::std::mem::zeroed() }, -+ map: [CHANNEL_INVALID, -+ CHANNEL_INVALID, -+ CHANNEL_INVALID, -+ CHANNEL_INVALID, -+ CHANNEL_INVALID, -+ CHANNEL_INVALID, -+ CHANNEL_INVALID, -+ CHANNEL_INVALID, -+ CHANNEL_INVALID, -+ CHANNEL_INVALID], - } - } - } -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-ffi/src/ffi_funcs.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-ffi/src/ffi_funcs.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-ffi/src/ffi_funcs.rs.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-ffi/src/ffi_funcs.rs 2017-08-04 13:37:46.384821737 +0200 -@@ -8,8 +8,8 @@ macro_rules! cstr { - - #[cfg(not(feature = "dlopen"))] - mod static_fns { -- use std::os::raw::{c_char, c_double, c_int, c_float, c_uint, c_void}; - use super::*; -+ use std::os::raw::{c_char, c_double, c_float, c_int, c_uint, c_void}; - - #[link(name = "pulse")] - extern "C" { -@@ -62,6 +62,7 @@ mod static_fns { - userdata: *mut c_void) - -> *mut pa_operation; - pub fn pa_context_set_state_callback(c: *mut pa_context, cb: pa_context_notify_cb_t, userdata: *mut c_void); -+ pub fn pa_context_errno(c: *mut pa_context) -> c_int; - pub fn pa_context_set_subscribe_callback(c: *mut pa_context, - cb: pa_context_subscribe_cb_t, - userdata: *mut c_void); -@@ -70,6 +71,7 @@ mod static_fns { - cb: pa_context_success_cb_t, - userdata: *mut c_void) - -> *mut pa_operation; -+ pub fn pa_context_ref(c: *mut pa_context) -> *mut pa_context; - pub fn pa_context_unref(c: *mut pa_context); - pub fn pa_cvolume_set(a: *mut pa_cvolume, channels: c_uint, v: pa_volume_t) -> *mut pa_cvolume; - pub fn pa_cvolume_set_balance(v: *mut pa_cvolume, -@@ -80,12 +82,20 @@ mod static_fns { - pub fn pa_mainloop_api_once(m: *mut pa_mainloop_api, - callback: pa_mainloop_api_once_cb_t, - userdata: *mut c_void); -- pub fn pa_operation_get_state(o: *const pa_operation) -> pa_operation_state_t; -+ pub fn pa_strerror(error: pa_error_code_t) -> *const c_char; -+ pub fn pa_operation_ref(o: *mut pa_operation) -> *mut pa_operation; - pub fn pa_operation_unref(o: *mut pa_operation); -+ pub fn pa_operation_cancel(o: *mut pa_operation); -+ pub fn pa_operation_get_state(o: *const pa_operation) -> pa_operation_state_t; -+ pub fn pa_operation_set_state_callback(o: *mut pa_operation, -+ cb: pa_operation_notify_cb_t, -+ userdata: *mut c_void); - pub fn pa_proplist_gets(p: *mut pa_proplist, key: *const c_char) -> *const c_char; - pub fn pa_rtclock_now() -> pa_usec_t; - pub fn pa_stream_begin_write(p: *mut pa_stream, data: *mut *mut c_void, nbytes: *mut usize) -> c_int; - pub fn pa_stream_cancel_write(p: *mut pa_stream) -> c_int; -+ pub fn pa_stream_is_suspended(s: *const pa_stream) -> c_int; -+ pub fn pa_stream_is_corked(s: *const pa_stream) -> c_int; - pub fn pa_stream_connect_playback(s: *mut pa_stream, - dev: *const c_char, - attr: *const pa_buffer_attr, -@@ -112,6 +122,7 @@ mod static_fns { - pub fn pa_stream_get_latency(s: *const pa_stream, r_usec: *mut pa_usec_t, negative: *mut c_int) -> c_int; - pub fn pa_stream_get_sample_spec(s: *const pa_stream) -> *const pa_sample_spec; - pub fn pa_stream_get_state(p: *const pa_stream) -> pa_stream_state_t; -+ pub fn pa_stream_get_context(s: *const pa_stream) -> *mut pa_context; - pub fn pa_stream_get_time(s: *const pa_stream, r_usec: *mut pa_usec_t) -> c_int; - pub fn pa_stream_new(c: *mut pa_context, - name: *const c_char, -@@ -123,6 +134,7 @@ mod static_fns { - pub fn pa_stream_set_state_callback(s: *mut pa_stream, cb: pa_stream_notify_cb_t, userdata: *mut c_void); - pub fn pa_stream_set_write_callback(p: *mut pa_stream, cb: pa_stream_request_cb_t, userdata: *mut c_void); - pub fn pa_stream_set_read_callback(p: *mut pa_stream, cb: pa_stream_request_cb_t, userdata: *mut c_void); -+ pub fn pa_stream_ref(s: *mut pa_stream) -> *mut pa_stream; - pub fn pa_stream_unref(s: *mut pa_stream); - pub fn pa_stream_update_timing_info(p: *mut pa_stream, - cb: pa_stream_success_cb_t, -@@ -148,8 +160,6 @@ mod static_fns { - pub fn pa_threaded_mainloop_unlock(m: *mut pa_threaded_mainloop); - pub fn pa_threaded_mainloop_wait(m: *mut pa_threaded_mainloop); - pub fn pa_usec_to_bytes(t: pa_usec_t, spec: *const pa_sample_spec) -> usize; -- pub fn pa_xfree(ptr: *mut c_void); -- pub fn pa_xstrdup(str: *const c_char) -> *mut c_char; - pub fn pa_xrealloc(ptr: *mut c_void, size: usize) -> *mut c_void; - } - } -@@ -159,9 +169,9 @@ pub use self::static_fns::*; - - #[cfg(feature = "dlopen")] - mod dynamic_fns { -- use std::os::raw::{c_char, c_double, c_int, c_float, c_uint, c_void}; -- use libc::{dlclose, dlopen, dlsym, RTLD_LAZY}; - use super::*; -+ use libc::{RTLD_LAZY, dlclose, dlopen, dlsym}; -+ use std::os::raw::{c_char, c_double, c_float, c_int, c_uint, c_void}; - - #[derive(Debug)] - pub struct LibLoader { -@@ -287,6 +297,13 @@ mod dynamic_fns { - } - fp - }; -+ PA_CONTEXT_ERRNO = { -+ let fp = dlsym(h, cstr!("pa_context_errno")); -+ if fp.is_null() { -+ return None; -+ } -+ fp -+ }; - PA_CONTEXT_SET_SUBSCRIBE_CALLBACK = { - let fp = dlsym(h, cstr!("pa_context_set_subscribe_callback")); - if fp.is_null() { -@@ -301,6 +318,13 @@ mod dynamic_fns { - } - fp - }; -+ PA_CONTEXT_REF = { -+ let fp = dlsym(h, cstr!("pa_context_ref")); -+ if fp.is_null() { -+ return None; -+ } -+ fp -+ }; - PA_CONTEXT_UNREF = { - let fp = dlsym(h, cstr!("pa_context_unref")); - if fp.is_null() { -@@ -336,8 +360,15 @@ mod dynamic_fns { - } - fp - }; -- PA_OPERATION_GET_STATE = { -- let fp = dlsym(h, cstr!("pa_operation_get_state")); -+ PA_STRERROR = { -+ let fp = dlsym(h, cstr!("pa_strerror")); -+ if fp.is_null() { -+ return None; -+ } -+ fp -+ }; -+ PA_OPERATION_REF = { -+ let fp = dlsym(h, cstr!("pa_operation_ref")); - if fp.is_null() { - return None; - } -@@ -350,6 +381,27 @@ mod dynamic_fns { - } - fp - }; -+ PA_OPERATION_CANCEL = { -+ let fp = dlsym(h, cstr!("pa_operation_cancel")); -+ if fp.is_null() { -+ return None; -+ } -+ fp -+ }; -+ PA_OPERATION_GET_STATE = { -+ let fp = dlsym(h, cstr!("pa_operation_get_state")); -+ if fp.is_null() { -+ return None; -+ } -+ fp -+ }; -+ PA_OPERATION_SET_STATE_CALLBACK = { -+ let fp = dlsym(h, cstr!("pa_operation_set_state_callback")); -+ if fp.is_null() { -+ return None; -+ } -+ fp -+ }; - PA_PROPLIST_GETS = { - let fp = dlsym(h, cstr!("pa_proplist_gets")); - if fp.is_null() { -@@ -378,6 +430,20 @@ mod dynamic_fns { - } - fp - }; -+ PA_STREAM_IS_SUSPENDED = { -+ let fp = dlsym(h, cstr!("pa_stream_is_suspended")); -+ if fp.is_null() { -+ return None; -+ } -+ fp -+ }; -+ PA_STREAM_IS_CORKED = { -+ let fp = dlsym(h, cstr!("pa_stream_is_corked")); -+ if fp.is_null() { -+ return None; -+ } -+ fp -+ }; - PA_STREAM_CONNECT_PLAYBACK = { - let fp = dlsym(h, cstr!("pa_stream_connect_playback")); - if fp.is_null() { -@@ -462,6 +528,13 @@ mod dynamic_fns { - } - fp - }; -+ PA_STREAM_GET_CONTEXT = { -+ let fp = dlsym(h, cstr!("pa_stream_get_context")); -+ if fp.is_null() { -+ return None; -+ } -+ fp -+ }; - PA_STREAM_GET_TIME = { - let fp = dlsym(h, cstr!("pa_stream_get_time")); - if fp.is_null() { -@@ -511,6 +584,13 @@ mod dynamic_fns { - } - fp - }; -+ PA_STREAM_REF = { -+ let fp = dlsym(h, cstr!("pa_stream_ref")); -+ if fp.is_null() { -+ return None; -+ } -+ fp -+ }; - PA_STREAM_UNREF = { - let fp = dlsym(h, cstr!("pa_stream_unref")); - if fp.is_null() { -@@ -623,20 +703,6 @@ mod dynamic_fns { - } - fp - }; -- PA_XFREE = { -- let fp = dlsym(h, cstr!("pa_xfree")); -- if fp.is_null() { -- return None; -- } -- fp -- }; -- PA_XSTRDUP = { -- let fp = dlsym(h, cstr!("pa_xstrdup")); -- if fp.is_null() { -- return None; -- } -- fp -- }; - PA_XREALLOC = { - let fp = dlsym(h, cstr!("pa_xrealloc")); - if fp.is_null() { -@@ -837,6 +903,12 @@ mod dynamic_fns { - *mut c_void)>(PA_CONTEXT_SET_STATE_CALLBACK))(c, cb, userdata) - } - -+ static mut PA_CONTEXT_ERRNO: *mut ::libc::c_void = 0 as *mut _; -+ #[inline] -+ pub unsafe fn pa_context_errno(c: *mut pa_context) -> c_int { -+ (::std::mem::transmute::<_, extern "C" fn(*mut pa_context) -> c_int>(PA_CONTEXT_ERRNO))(c) -+ } -+ - static mut PA_CONTEXT_SET_SUBSCRIBE_CALLBACK: *mut ::libc::c_void = 0 as *mut _; - #[inline] - pub unsafe fn pa_context_set_subscribe_callback(c: *mut pa_context, -@@ -863,6 +935,12 @@ mod dynamic_fns { - -> *mut pa_operation>(PA_CONTEXT_SUBSCRIBE))(c, m, cb, userdata) - } - -+ static mut PA_CONTEXT_REF: *mut ::libc::c_void = 0 as *mut _; -+ #[inline] -+ pub unsafe fn pa_context_ref(c: *mut pa_context) -> *mut pa_context { -+ (::std::mem::transmute::<_, extern "C" fn(*mut pa_context) -> *mut pa_context>(PA_CONTEXT_REF))(c) -+ } -+ - static mut PA_CONTEXT_UNREF: *mut ::libc::c_void = 0 as *mut _; - #[inline] - pub unsafe fn pa_context_unref(c: *mut pa_context) { -@@ -907,6 +985,30 @@ mod dynamic_fns { - *mut c_void)>(PA_MAINLOOP_API_ONCE))(m, callback, userdata) - } - -+ static mut PA_STRERROR: *mut ::libc::c_void = 0 as *mut _; -+ #[inline] -+ pub unsafe fn pa_strerror(error: pa_error_code_t) -> *const c_char { -+ (::std::mem::transmute::<_, extern "C" fn(pa_error_code_t) -> *const c_char>(PA_STRERROR))(error) -+ } -+ -+ static mut PA_OPERATION_REF: *mut ::libc::c_void = 0 as *mut _; -+ #[inline] -+ pub unsafe fn pa_operation_ref(o: *mut pa_operation) -> *mut pa_operation { -+ (::std::mem::transmute::<_, extern "C" fn(*mut pa_operation) -> *mut pa_operation>(PA_OPERATION_REF))(o) -+ } -+ -+ static mut PA_OPERATION_UNREF: *mut ::libc::c_void = 0 as *mut _; -+ #[inline] -+ pub unsafe fn pa_operation_unref(o: *mut pa_operation) { -+ (::std::mem::transmute::<_, extern "C" fn(*mut pa_operation)>(PA_OPERATION_UNREF))(o) -+ } -+ -+ static mut PA_OPERATION_CANCEL: *mut ::libc::c_void = 0 as *mut _; -+ #[inline] -+ pub unsafe fn pa_operation_cancel(o: *mut pa_operation) { -+ (::std::mem::transmute::<_, extern "C" fn(*mut pa_operation)>(PA_OPERATION_CANCEL))(o) -+ } -+ - static mut PA_OPERATION_GET_STATE: *mut ::libc::c_void = 0 as *mut _; - #[inline] - pub unsafe fn pa_operation_get_state(o: *const pa_operation) -> pa_operation_state_t { -@@ -915,10 +1017,15 @@ mod dynamic_fns { - -> pa_operation_state_t>(PA_OPERATION_GET_STATE))(o) - } - -- static mut PA_OPERATION_UNREF: *mut ::libc::c_void = 0 as *mut _; -+ static mut PA_OPERATION_SET_STATE_CALLBACK: *mut ::libc::c_void = 0 as *mut _; - #[inline] -- pub unsafe fn pa_operation_unref(o: *mut pa_operation) { -- (::std::mem::transmute::<_, extern "C" fn(*mut pa_operation)>(PA_OPERATION_UNREF))(o) -+ pub unsafe fn pa_operation_set_state_callback(o: *mut pa_operation, -+ cb: pa_operation_notify_cb_t, -+ userdata: *mut c_void) { -+ (::std::mem::transmute::<_, -+ extern "C" fn(*mut pa_operation, -+ pa_operation_notify_cb_t, -+ *mut c_void)>(PA_OPERATION_SET_STATE_CALLBACK))(o, cb, userdata) - } - - static mut PA_PROPLIST_GETS: *mut ::libc::c_void = 0 as *mut _; -@@ -951,6 +1058,18 @@ mod dynamic_fns { - (::std::mem::transmute::<_, extern "C" fn(*mut pa_stream) -> c_int>(PA_STREAM_CANCEL_WRITE))(p) - } - -+ static mut PA_STREAM_IS_SUSPENDED: *mut ::libc::c_void = 0 as *mut _; -+ #[inline] -+ pub unsafe fn pa_stream_is_suspended(s: *const pa_stream) -> c_int { -+ (::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> c_int>(PA_STREAM_IS_SUSPENDED))(s) -+ } -+ -+ static mut PA_STREAM_IS_CORKED: *mut ::libc::c_void = 0 as *mut _; -+ #[inline] -+ pub unsafe fn pa_stream_is_corked(s: *const pa_stream) -> c_int { -+ (::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> c_int>(PA_STREAM_IS_CORKED))(s) -+ } -+ - static mut PA_STREAM_CONNECT_PLAYBACK: *mut ::libc::c_void = 0 as *mut _; - #[inline] - pub unsafe fn pa_stream_connect_playback(s: *mut pa_stream, -@@ -1066,6 +1185,12 @@ mod dynamic_fns { - (::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> pa_stream_state_t>(PA_STREAM_GET_STATE))(p) - } - -+ static mut PA_STREAM_GET_CONTEXT: *mut ::libc::c_void = 0 as *mut _; -+ #[inline] -+ pub unsafe fn pa_stream_get_context(s: *const pa_stream) -> *mut pa_context { -+ (::std::mem::transmute::<_, extern "C" fn(*const pa_stream) -> *mut pa_context>(PA_STREAM_GET_CONTEXT))(s) -+ } -+ - static mut PA_STREAM_GET_TIME: *mut ::libc::c_void = 0 as *mut _; - #[inline] - pub unsafe fn pa_stream_get_time(s: *const pa_stream, r_usec: *mut pa_usec_t) -> c_int { -@@ -1132,6 +1257,12 @@ mod dynamic_fns { - *mut c_void)>(PA_STREAM_SET_READ_CALLBACK))(p, cb, userdata) - } - -+ static mut PA_STREAM_REF: *mut ::libc::c_void = 0 as *mut _; -+ #[inline] -+ pub unsafe fn pa_stream_ref(s: *mut pa_stream) -> *mut pa_stream { -+ (::std::mem::transmute::<_, extern "C" fn(*mut pa_stream) -> *mut pa_stream>(PA_STREAM_REF))(s) -+ } -+ - static mut PA_STREAM_UNREF: *mut ::libc::c_void = 0 as *mut _; - #[inline] - pub unsafe fn pa_stream_unref(s: *mut pa_stream) { -@@ -1253,18 +1384,6 @@ mod dynamic_fns { - spec) - } - -- static mut PA_XFREE: *mut ::libc::c_void = 0 as *mut _; -- #[inline] -- pub unsafe fn pa_xfree(ptr: *mut c_void) { -- (::std::mem::transmute::<_, extern "C" fn(*mut c_void)>(PA_XFREE))(ptr) -- } -- -- static mut PA_XSTRDUP: *mut ::libc::c_void = 0 as *mut _; -- #[inline] -- pub unsafe fn pa_xstrdup(str: *const c_char) -> *mut c_char { -- (::std::mem::transmute::<_, extern "C" fn(*const c_char) -> *mut c_char>(PA_XSTRDUP))(str) -- } -- - static mut PA_XREALLOC: *mut ::libc::c_void = 0 as *mut _; - #[inline] - pub unsafe fn pa_xrealloc(ptr: *mut c_void, size: usize) -> *mut c_void { -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-ffi/src/ffi_types.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-ffi/src/ffi_types.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-ffi/src/ffi_types.rs.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-ffi/src/ffi_types.rs 2017-08-04 13:37:46.384821737 +0200 -@@ -1,6 +1,6 @@ - #![allow(non_camel_case_types)] - --use std::os::raw::{c_char, c_int, c_long, c_ulong, c_void}; -+use std::os::raw::{c_char, c_int, c_long, c_uint, c_ulong, c_void}; - - /* automatically generated by rust-bindgen */ - pub const PA_RATE_MAX: u32 = 48000 * 8; -@@ -74,10 +74,10 @@ pub const PA_OPERATION_DONE: c_int = 1; - pub const PA_OPERATION_CANCELLED: c_int = 2; - pub type pa_operation_state_t = c_int; - --pub const PA_CONTEXT_NOFLAGS: c_int = 0; --pub const PA_CONTEXT_NOAUTOSPAWN: c_int = 1; --pub const PA_CONTEXT_NOFAIL: c_int = 2; --pub type pa_context_flags_t = c_int; -+pub const PA_CONTEXT_NOFLAGS: c_uint = 0; -+pub const PA_CONTEXT_NOAUTOSPAWN: c_uint = 1; -+pub const PA_CONTEXT_NOFAIL: c_uint = 2; -+pub type pa_context_flags_t = c_uint; - - pub const PA_DIRECTION_OUTPUT: c_int = 1; - pub const PA_DIRECTION_INPUT: c_int = 2; -@@ -93,28 +93,28 @@ pub const PA_STREAM_RECORD: c_int = 2; - pub const PA_STREAM_UPLOAD: c_int = 3; - pub type pa_stream_direction_t = c_int; - --pub const PA_STREAM_NOFLAGS: c_int = 0x0_0000; --pub const PA_STREAM_START_CORKED: c_int = 0x0_0001; --pub const PA_STREAM_INTERPOLATE_TIMING: c_int = 0x0_0002; --pub const PA_STREAM_NOT_MONOTONIC: c_int = 0x0_0004; --pub const PA_STREAM_AUTO_TIMING_UPDATE: c_int = 0x0_0008; --pub const PA_STREAM_NO_REMAP_CHANNELS: c_int = 0x0_0010; --pub const PA_STREAM_NO_REMIX_CHANNELS: c_int = 0x0_0020; --pub const PA_STREAM_FIX_FORMAT: c_int = 0x0_0040; --pub const PA_STREAM_FIX_RATE: c_int = 0x0_0080; --pub const PA_STREAM_FIX_CHANNELS: c_int = 0x0_0100; --pub const PA_STREAM_DONT_MOVE: c_int = 0x0_0200; --pub const PA_STREAM_VARIABLE_RATE: c_int = 0x0_0400; --pub const PA_STREAM_PEAK_DETECT: c_int = 0x0_0800; --pub const PA_STREAM_START_MUTED: c_int = 0x0_1000; --pub const PA_STREAM_ADJUST_LATENCY: c_int = 0x0_2000; --pub const PA_STREAM_EARLY_REQUESTS: c_int = 0x0_4000; --pub const PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND: c_int = 0x0_8000; --pub const PA_STREAM_START_UNMUTED: c_int = 0x1_0000; --pub const PA_STREAM_FAIL_ON_SUSPEND: c_int = 0x2_0000; --pub const PA_STREAM_RELATIVE_VOLUME: c_int = 0x4_0000; --pub const PA_STREAM_PASSTHROUGH: c_int = 0x8_0000; --pub type pa_stream_flags_t = c_int; -+pub const PA_STREAM_NOFLAGS: c_uint = 0x0_0000; -+pub const PA_STREAM_START_CORKED: c_uint = 0x0_0001; -+pub const PA_STREAM_INTERPOLATE_TIMING: c_uint = 0x0_0002; -+pub const PA_STREAM_NOT_MONOTONIC: c_uint = 0x0_0004; -+pub const PA_STREAM_AUTO_TIMING_UPDATE: c_uint = 0x0_0008; -+pub const PA_STREAM_NO_REMAP_CHANNELS: c_uint = 0x0_0010; -+pub const PA_STREAM_NO_REMIX_CHANNELS: c_uint = 0x0_0020; -+pub const PA_STREAM_FIX_FORMAT: c_uint = 0x0_0040; -+pub const PA_STREAM_FIX_RATE: c_uint = 0x0_0080; -+pub const PA_STREAM_FIX_CHANNELS: c_uint = 0x0_0100; -+pub const PA_STREAM_DONT_MOVE: c_uint = 0x0_0200; -+pub const PA_STREAM_VARIABLE_RATE: c_uint = 0x0_0400; -+pub const PA_STREAM_PEAK_DETECT: c_uint = 0x0_0800; -+pub const PA_STREAM_START_MUTED: c_uint = 0x0_1000; -+pub const PA_STREAM_ADJUST_LATENCY: c_uint = 0x0_2000; -+pub const PA_STREAM_EARLY_REQUESTS: c_uint = 0x0_4000; -+pub const PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND: c_uint = 0x0_8000; -+pub const PA_STREAM_START_UNMUTED: c_uint = 0x1_0000; -+pub const PA_STREAM_FAIL_ON_SUSPEND: c_uint = 0x2_0000; -+pub const PA_STREAM_RELATIVE_VOLUME: c_uint = 0x4_0000; -+pub const PA_STREAM_PASSTHROUGH: c_uint = 0x8_0000; -+pub type pa_stream_flags_t = c_uint; - - #[repr(C)] - #[derive(Clone, Copy, Debug)] -@@ -162,19 +162,19 @@ pub const PA_ERR_BUSY: c_int = 26; - pub const PA_ERR_MAX: c_int = 27; - pub type pa_error_code_t = c_int; - --pub const PA_SUBSCRIPTION_MASK_NULL: c_int = 0; --pub const PA_SUBSCRIPTION_MASK_SINK: c_int = 1; --pub const PA_SUBSCRIPTION_MASK_SOURCE: c_int = 2; --pub const PA_SUBSCRIPTION_MASK_SINK_INPUT: c_int = 4; --pub const PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT: c_int = 8; --pub const PA_SUBSCRIPTION_MASK_MODULE: c_int = 16; --pub const PA_SUBSCRIPTION_MASK_CLIENT: c_int = 32; --pub const PA_SUBSCRIPTION_MASK_SAMPLE_CACHE: c_int = 64; --pub const PA_SUBSCRIPTION_MASK_SERVER: c_int = 128; --pub const PA_SUBSCRIPTION_MASK_AUTOLOAD: c_int = 256; --pub const PA_SUBSCRIPTION_MASK_CARD: c_int = 512; --pub const PA_SUBSCRIPTION_MASK_ALL: c_int = 767; --pub type pa_subscription_mask_t = c_int; -+pub const PA_SUBSCRIPTION_MASK_NULL: c_uint = 0x0; -+pub const PA_SUBSCRIPTION_MASK_SINK: c_uint = 0x1; -+pub const PA_SUBSCRIPTION_MASK_SOURCE: c_uint = 0x2; -+pub const PA_SUBSCRIPTION_MASK_SINK_INPUT: c_uint = 0x4; -+pub const PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT: c_uint = 0x8; -+pub const PA_SUBSCRIPTION_MASK_MODULE: c_uint = 0x10; -+pub const PA_SUBSCRIPTION_MASK_CLIENT: c_uint = 0x20; -+pub const PA_SUBSCRIPTION_MASK_SAMPLE_CACHE: c_uint = 0x40; -+pub const PA_SUBSCRIPTION_MASK_SERVER: c_uint = 0x80; -+pub const PA_SUBSCRIPTION_MASK_AUTOLOAD: c_uint = 0x100; -+pub const PA_SUBSCRIPTION_MASK_CARD: c_uint = 0x200; -+pub const PA_SUBSCRIPTION_MASK_ALL: c_uint = 0x3FF; -+pub type pa_subscription_mask_t = c_uint; - - pub const PA_SUBSCRIPTION_EVENT_SINK: c_int = 0; - pub const PA_SUBSCRIPTION_EVENT_SOURCE: c_int = 1; -@@ -244,17 +244,17 @@ pub const PA_SEEK_RELATIVE_ON_READ: c_in - pub const PA_SEEK_RELATIVE_END: c_int = 3; - pub type pa_seek_mode_t = c_int; - --pub const PA_SINK_NOFLAGS: c_int = 0; --pub const PA_SINK_HW_VOLUME_CTRL: c_int = 1; --pub const PA_SINK_LATENCY: c_int = 2; --pub const PA_SINK_HARDWARE: c_int = 4; --pub const PA_SINK_NETWORK: c_int = 8; --pub const PA_SINK_HW_MUTE_CTRL: c_int = 16; --pub const PA_SINK_DECIBEL_VOLUME: c_int = 32; --pub const PA_SINK_FLAT_VOLUME: c_int = 64; --pub const PA_SINK_DYNAMIC_LATENCY: c_int = 128; --pub const PA_SINK_SET_FORMATS: c_int = 256; --pub type pa_sink_flags_t = c_int; -+pub const PA_SINK_NOFLAGS: c_uint = 0x000; -+pub const PA_SINK_HW_VOLUME_CTRL: c_uint = 0x001; -+pub const PA_SINK_LATENCY: c_uint = 0x002; -+pub const PA_SINK_HARDWARE: c_uint = 0x004; -+pub const PA_SINK_NETWORK: c_uint = 0x008; -+pub const PA_SINK_HW_MUTE_CTRL: c_uint = 0x010; -+pub const PA_SINK_DECIBEL_VOLUME: c_uint = 0x020; -+pub const PA_SINK_FLAT_VOLUME: c_uint = 0x040; -+pub const PA_SINK_DYNAMIC_LATENCY: c_uint = 0x080; -+pub const PA_SINK_SET_FORMATS: c_uint = 0x100; -+pub type pa_sink_flags_t = c_uint; - - pub const PA_SINK_INVALID_STATE: c_int = -1; - pub const PA_SINK_RUNNING: c_int = 0; -@@ -264,16 +264,16 @@ pub const PA_SINK_INIT: c_int = -2; - pub const PA_SINK_UNLINKED: c_int = -3; - pub type pa_sink_state_t = c_int; - --pub const PA_SOURCE_NOFLAGS: c_int = 0x00; --pub const PA_SOURCE_HW_VOLUME_CTRL: c_int = 0x01; --pub const PA_SOURCE_LATENCY: c_int = 0x02; --pub const PA_SOURCE_HARDWARE: c_int = 0x04; --pub const PA_SOURCE_NETWORK: c_int = 0x08; --pub const PA_SOURCE_HW_MUTE_CTRL: c_int = 0x10; --pub const PA_SOURCE_DECIBEL_VOLUME: c_int = 0x20; --pub const PA_SOURCE_DYNAMIC_LATENCY: c_int = 0x40; --pub const PA_SOURCE_FLAT_VOLUME: c_int = 0x80; --pub type pa_source_flags_t = c_int; -+pub const PA_SOURCE_NOFLAGS: c_uint = 0x00; -+pub const PA_SOURCE_HW_VOLUME_CTRL: c_uint = 0x01; -+pub const PA_SOURCE_LATENCY: c_uint = 0x02; -+pub const PA_SOURCE_HARDWARE: c_uint = 0x04; -+pub const PA_SOURCE_NETWORK: c_uint = 0x08; -+pub const PA_SOURCE_HW_MUTE_CTRL: c_uint = 0x10; -+pub const PA_SOURCE_DECIBEL_VOLUME: c_uint = 0x20; -+pub const PA_SOURCE_DYNAMIC_LATENCY: c_uint = 0x40; -+pub const PA_SOURCE_FLAT_VOLUME: c_uint = 0x80; -+pub type pa_source_flags_t = c_uint; - - pub const PA_SOURCE_INVALID_STATE: c_int = -1; - pub const PA_SOURCE_RUNNING: c_int = 0; -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/Cargo.toml.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/Cargo.toml ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/Cargo.toml.cubeb-pulse-arm 2017-08-04 13:37:46.384821737 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/Cargo.toml 2017-08-04 13:37:46.384821737 +0200 -@@ -0,0 +1,8 @@ -+[package] -+name = "pulse" -+version = "0.1.0" -+authors = ["Dan Glastonbury "] -+ -+[dependencies] -+bitflags = "^0.7.0" -+pulse-ffi = { path = "../pulse-ffi" } -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/context.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/context.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/context.rs.cubeb-pulse-arm 2017-08-04 13:37:46.385821734 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/context.rs 2017-08-04 13:37:46.385821734 +0200 -@@ -0,0 +1,394 @@ -+// Copyright © 2017 Mozilla Foundation -+// -+// This program is made available under an ISC-style license. See the -+// accompanying file LICENSE for details. -+ -+use ::*; -+use ffi; -+use std::ffi::CStr; -+use std::os::raw::{c_int, c_void}; -+use std::ptr; -+use util::UnwrapCStr; -+ -+// A note about `wrapped` functions -+// -+// C FFI demands `unsafe extern fn(*mut pa_context, ...) -> i32`, etc, -+// but we want to allow such callbacks to be safe. This means no -+// `unsafe` or `extern`, and callbacks should be called with a safe -+// wrapper of `*mut pa_context`. Since the callback doesn't take -+// ownership, this is `&Context`. `fn wrapped(...)` defines a -+// function that converts from our safe signature to the unsafe -+// signature. -+// -+// Currently, we use a property of Rust, namely that each function -+// gets its own unique type. These unique types can't be written -+// directly, so we use generic and a type parameter, and let the Rust -+// compiler fill in the name for us: -+// -+// fn get_sink_input_info(&self, ..., _: CB, ...) -> ... -+// where CB: Fn(&Context, *const SinkInputInfo, i32, *mut c_void) -+// -+// Because we aren't storing or passing any state, we assert, at run-time :-(, -+// that our functions are zero-sized: -+// -+// assert!(mem::size_of::() == 0); -+// -+// We need to obtain a value of type F in order to call it. Since we -+// can't name the function, we have to unsafely construct that value -+// somehow - we do this using mem::uninitialized. Then, we call that -+// function with a reference to the Context, and save the result: -+// -+// | generate value || call it | -+// let result = ::std::mem::uninitialized::()(&mut object); -+// -+// Lastly, since our Object is an owned type, we need to avoid -+// dropping it, then return the result we just generated. -+// -+// mem::forget(object); -+// result -+ -+// Aid in returning Operation from callbacks -+macro_rules! op_or_err { -+ ($self_:ident, $e:expr) => {{ -+ let o = unsafe { $e }; -+ if o.is_null() { -+ Err(ErrorCode::from_error_code($self_.errno())) -+ } else { -+ Ok(unsafe { operation::from_raw_ptr(o) }) -+ } -+ }} -+} -+ -+#[repr(C)] -+#[derive(Debug)] -+pub struct Context(*mut ffi::pa_context); -+ -+impl Context { -+ pub fn new<'a, OPT>(api: &MainloopApi, name: OPT) -> Option -+ where OPT: Into> -+ { -+ let ptr = unsafe { ffi::pa_context_new(api.raw_mut(), name.unwrap_cstr()) }; -+ if ptr.is_null() { -+ None -+ } else { -+ Some(Context(ptr)) -+ } -+ } -+ -+ #[doc(hidden)] -+ pub fn raw_mut(&self) -> &mut ffi::pa_context { -+ unsafe { &mut *self.0 } -+ } -+ -+ pub fn unref(self) { -+ unsafe { -+ ffi::pa_context_unref(self.raw_mut()); -+ } -+ } -+ -+ pub fn clear_state_callback(&self) { -+ unsafe { -+ ffi::pa_context_set_state_callback(self.raw_mut(), None, ptr::null_mut()); -+ } -+ } -+ -+ pub fn set_state_callback(&self, _: CB, userdata: *mut c_void) -+ where CB: Fn(&Context, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(c: *mut ffi::pa_context, userdata: *mut c_void) -+ where F: Fn(&Context, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let ctx = context::from_raw_ptr(c); -+ let result = uninitialized::()(&ctx, userdata); -+ forget(ctx); -+ -+ result -+ } -+ -+ unsafe { -+ ffi::pa_context_set_state_callback(self.raw_mut(), Some(wrapped::), userdata); -+ } -+ } -+ -+ pub fn errno(&self) -> ffi::pa_error_code_t { -+ unsafe { ffi::pa_context_errno(self.raw_mut()) } -+ } -+ -+ pub fn get_state(&self) -> ContextState { -+ ContextState::try_from(unsafe { -+ ffi::pa_context_get_state(self.raw_mut()) -+ }).expect("pa_context_get_state returned invalid ContextState") -+ } -+ -+ pub fn connect<'a, OPT>(&self, server: OPT, flags: ContextFlags, api: *const ffi::pa_spawn_api) -> Result<()> -+ where OPT: Into> -+ { -+ let r = unsafe { -+ ffi::pa_context_connect(self.raw_mut(), -+ server.into().unwrap_cstr(), -+ flags.into(), -+ api) -+ }; -+ error_result!((), r) -+ } -+ -+ pub fn disconnect(&self) { -+ unsafe { -+ ffi::pa_context_disconnect(self.raw_mut()); -+ } -+ } -+ -+ -+ pub fn drain(&self, _: CB, userdata: *mut c_void) -> Result -+ where CB: Fn(&Context, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(c: *mut ffi::pa_context, userdata: *mut c_void) -+ where F: Fn(&Context, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let ctx = context::from_raw_ptr(c); -+ let result = uninitialized::()(&ctx, userdata); -+ forget(ctx); -+ -+ result -+ } -+ -+ op_or_err!(self, -+ ffi::pa_context_drain(self.raw_mut(), Some(wrapped::), userdata)) -+ } -+ -+ pub fn rttime_new(&self, usec: USec, _: CB, userdata: *mut c_void) -> *mut ffi::pa_time_event -+ where CB: Fn(&MainloopApi, *mut ffi::pa_time_event, &TimeVal, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(a: *mut ffi::pa_mainloop_api, -+ e: *mut ffi::pa_time_event, -+ tv: *const TimeVal, -+ userdata: *mut c_void) -+ where F: Fn(&MainloopApi, *mut ffi::pa_time_event, &TimeVal, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let api = mainloop_api::from_raw_ptr(a); -+ let timeval = &*tv; -+ let result = uninitialized::()(&api, e, timeval, userdata); -+ forget(api); -+ -+ result -+ } -+ -+ unsafe { ffi::pa_context_rttime_new(self.raw_mut(), usec, Some(wrapped::), userdata) } -+ } -+ -+ pub fn get_server_info(&self, _: CB, userdata: *mut c_void) -> Result -+ where CB: Fn(&Context, &ServerInfo, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(c: *mut ffi::pa_context, i: *const ffi::pa_server_info, userdata: *mut c_void) -+ where F: Fn(&Context, &ServerInfo, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ debug_assert_ne!(i, ptr::null_mut()); -+ let info = &*i; -+ let ctx = context::from_raw_ptr(c); -+ let result = uninitialized::()(&ctx, info, userdata); -+ forget(ctx); -+ -+ result -+ } -+ -+ op_or_err!(self, -+ ffi::pa_context_get_server_info(self.raw_mut(), Some(wrapped::), userdata)) -+ } -+ -+ pub fn get_sink_info_by_name(&self, name: &CStr, _: CB, userdata: *mut c_void) -> Result -+ where CB: Fn(&Context, *const SinkInfo, i32, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(c: *mut ffi::pa_context, -+ info: *const ffi::pa_sink_info, -+ eol: c_int, -+ userdata: *mut c_void) -+ where F: Fn(&Context, *const SinkInfo, i32, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let ctx = context::from_raw_ptr(c); -+ let result = uninitialized::()(&ctx, info, eol, userdata); -+ forget(ctx); -+ -+ result -+ } -+ -+ op_or_err!(self, -+ ffi::pa_context_get_sink_info_by_name(self.raw_mut(), name.as_ptr(), Some(wrapped::), userdata)) -+ } -+ -+ pub fn get_sink_info_list(&self, _: CB, userdata: *mut c_void) -> Result -+ where CB: Fn(&Context, *const SinkInfo, i32, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(c: *mut ffi::pa_context, -+ info: *const ffi::pa_sink_info, -+ eol: c_int, -+ userdata: *mut c_void) -+ where F: Fn(&Context, *const SinkInfo, i32, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let ctx = context::from_raw_ptr(c); -+ let result = uninitialized::()(&ctx, info, eol, userdata); -+ forget(ctx); -+ -+ result -+ } -+ -+ op_or_err!(self, -+ ffi::pa_context_get_sink_info_list(self.raw_mut(), Some(wrapped::), userdata)) -+ } -+ -+ pub fn get_sink_input_info(&self, idx: u32, _: CB, userdata: *mut c_void) -> Result -+ where CB: Fn(&Context, *const SinkInputInfo, i32, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(c: *mut ffi::pa_context, -+ info: *const ffi::pa_sink_input_info, -+ eol: c_int, -+ userdata: *mut c_void) -+ where F: Fn(&Context, *const SinkInputInfo, i32, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let ctx = context::from_raw_ptr(c); -+ let result = uninitialized::()(&ctx, info, eol, userdata); -+ forget(ctx); -+ -+ result -+ } -+ -+ op_or_err!(self, -+ ffi::pa_context_get_sink_input_info(self.raw_mut(), idx, Some(wrapped::), userdata)) -+ } -+ -+ pub fn get_source_info_list(&self, _: CB, userdata: *mut c_void) -> Result -+ where CB: Fn(&Context, *const SourceInfo, i32, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(c: *mut ffi::pa_context, -+ info: *const ffi::pa_source_info, -+ eol: c_int, -+ userdata: *mut c_void) -+ where F: Fn(&Context, *const SourceInfo, i32, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let ctx = context::from_raw_ptr(c); -+ let result = uninitialized::()(&ctx, info, eol, userdata); -+ forget(ctx); -+ -+ result -+ } -+ -+ op_or_err!(self, -+ ffi::pa_context_get_source_info_list(self.raw_mut(), Some(wrapped::), userdata)) -+ } -+ -+ pub fn set_sink_input_volume(&self, -+ idx: u32, -+ volume: &CVolume, -+ _: CB, -+ userdata: *mut c_void) -+ -> Result -+ where CB: Fn(&Context, i32, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(c: *mut ffi::pa_context, success: c_int, userdata: *mut c_void) -+ where F: Fn(&Context, i32, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let ctx = context::from_raw_ptr(c); -+ let result = uninitialized::()(&ctx, success, userdata); -+ forget(ctx); -+ -+ result -+ } -+ -+ op_or_err!(self, -+ ffi::pa_context_set_sink_input_volume(self.raw_mut(), idx, volume, Some(wrapped::), userdata)) -+ } -+ -+ pub fn subscribe(&self, m: SubscriptionMask, _: CB, userdata: *mut c_void) -> Result -+ where CB: Fn(&Context, i32, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(c: *mut ffi::pa_context, success: c_int, userdata: *mut c_void) -+ where F: Fn(&Context, i32, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let ctx = context::from_raw_ptr(c); -+ let result = uninitialized::()(&ctx, success, userdata); -+ forget(ctx); -+ -+ result -+ } -+ -+ op_or_err!(self, -+ ffi::pa_context_subscribe(self.raw_mut(), m.into(), Some(wrapped::), userdata)) -+ } -+ -+ pub fn clear_subscribe_callback(&self) { -+ unsafe { -+ ffi::pa_context_set_subscribe_callback(self.raw_mut(), None, ptr::null_mut()); -+ } -+ } -+ -+ pub fn set_subscribe_callback(&self, _: CB, userdata: *mut c_void) -+ where CB: Fn(&Context, SubscriptionEvent, u32, *mut c_void) -+ { -+ debug_assert_eq!(::std::mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(c: *mut ffi::pa_context, -+ t: ffi::pa_subscription_event_type_t, -+ idx: u32, -+ userdata: *mut c_void) -+ where F: Fn(&Context, SubscriptionEvent, u32, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let ctx = context::from_raw_ptr(c); -+ let event = SubscriptionEvent::try_from(t) -+ .expect("pa_context_subscribe_cb_t passed invalid pa_subscription_event_type_t"); -+ let result = uninitialized::()(&ctx, event, idx, userdata); -+ forget(ctx); -+ -+ result -+ } -+ -+ unsafe { -+ ffi::pa_context_set_subscribe_callback(self.raw_mut(), Some(wrapped::), userdata); -+ } -+ } -+} -+ -+#[doc(hidden)] -+pub unsafe fn from_raw_ptr(ptr: *mut ffi::pa_context) -> Context { -+ Context(ptr) -+} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/error.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/error.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/error.rs.cubeb-pulse-arm 2017-08-04 13:37:46.385821734 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/error.rs 2017-08-04 13:37:46.385821734 +0200 -@@ -0,0 +1,56 @@ -+// Copyright © 2017 Mozilla Foundation -+// -+// This program is made available under an ISC-style license. See the -+// accompanying file LICENSE for details. -+ -+use ffi; -+use std::ffi::CStr; -+ -+#[macro_export] -+macro_rules! error_result { -+ ($t:expr, $err:expr) => { -+ if $err >= 0 { -+ Ok($t) -+ } else { -+ Err(ErrorCode::from_error_result($err)) -+ } -+ } -+} -+ -+#[derive(Debug, PartialEq)] -+pub struct ErrorCode { -+ err: ffi::pa_error_code_t, -+} -+ -+impl ErrorCode { -+ pub fn from_error_result(err: i32) -> Self { -+ debug_assert!(err < 0); -+ ErrorCode { -+ err: (-err) as ffi::pa_error_code_t, -+ } -+ } -+ -+ pub fn from_error_code(err: ffi::pa_error_code_t) -> Self { -+ debug_assert!(err > 0); -+ ErrorCode { -+ err: err, -+ } -+ } -+ -+ fn desc(&self) -> &'static str { -+ let cstr = unsafe { CStr::from_ptr(ffi::pa_strerror(self.err)) }; -+ cstr.to_str().unwrap() -+ } -+} -+ -+impl ::std::error::Error for ErrorCode { -+ fn description(&self) -> &str { -+ self.desc() -+ } -+} -+ -+impl ::std::fmt::Display for ErrorCode { -+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { -+ write!(f, "{:?}: {}", self, self.desc()) -+ } -+} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/lib.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/lib.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/lib.rs.cubeb-pulse-arm 2017-08-04 13:37:46.385821734 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/lib.rs 2017-08-04 13:37:46.385821734 +0200 -@@ -0,0 +1,653 @@ -+// Copyright © 2017 Mozilla Foundation -+// -+// This program is made available under an ISC-style license. See the -+// accompanying file LICENSE for details. -+ -+#[macro_use] -+extern crate bitflags; -+extern crate pulse_ffi as ffi; -+ -+#[macro_use] -+mod error; -+mod context; -+mod mainloop_api; -+mod operation; -+mod proplist; -+mod stream; -+mod threaded_mainloop; -+mod util; -+ -+pub use context::Context; -+pub use error::ErrorCode; -+pub use ffi::pa_buffer_attr as BufferAttr; -+pub use ffi::pa_channel_map as ChannelMap; -+pub use ffi::pa_cvolume as CVolume; -+pub use ffi::pa_sample_spec as SampleSpec; -+pub use ffi::pa_server_info as ServerInfo; -+pub use ffi::pa_sink_info as SinkInfo; -+pub use ffi::pa_sink_input_info as SinkInputInfo; -+pub use ffi::pa_source_info as SourceInfo; -+pub use ffi::pa_usec_t as USec; -+pub use ffi::pa_volume_t as Volume; -+pub use ffi::timeval as TimeVal; -+pub use mainloop_api::MainloopApi; -+pub use operation::Operation; -+pub use proplist::Proplist; -+use std::os::raw::{c_char, c_uint}; -+pub use stream::Stream; -+pub use threaded_mainloop::ThreadedMainloop; -+ -+#[allow(non_camel_case_types)] -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum SampleFormat { -+ Invalid = ffi::PA_SAMPLE_INVALID, -+ U8 = ffi::PA_SAMPLE_U8, -+ Alaw = ffi::PA_SAMPLE_ALAW, -+ Ulaw = ffi::PA_SAMPLE_ULAW, -+ Signed16LE = ffi::PA_SAMPLE_S16LE, -+ Signed16BE = ffi::PA_SAMPLE_S16BE, -+ Float32LE = ffi::PA_SAMPLE_FLOAT32LE, -+ Float32BE = ffi::PA_SAMPLE_FLOAT32BE, -+ Signed32LE = ffi::PA_SAMPLE_S32LE, -+ Signed32BE = ffi::PA_SAMPLE_S32BE, -+ Signed24LE = ffi::PA_SAMPLE_S24LE, -+ Signed24BE = ffi::PA_SAMPLE_S24BE, -+ Signed24_32LE = ffi::PA_SAMPLE_S24_32LE, -+ Signed23_32BE = ffi::PA_SAMPLE_S24_32BE, -+} -+ -+impl Default for SampleFormat { -+ fn default() -> Self { -+ SampleFormat::Invalid -+ } -+} -+ -+impl Into for SampleFormat { -+ fn into(self) -> ffi::pa_sample_format_t { -+ self as ffi::pa_sample_format_t -+ } -+} -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum ContextState { -+ Unconnected = ffi::PA_CONTEXT_UNCONNECTED, -+ Connecting = ffi::PA_CONTEXT_CONNECTING, -+ Authorizing = ffi::PA_CONTEXT_AUTHORIZING, -+ SettingName = ffi::PA_CONTEXT_SETTING_NAME, -+ Ready = ffi::PA_CONTEXT_READY, -+ Failed = ffi::PA_CONTEXT_FAILED, -+ Terminated = ffi::PA_CONTEXT_TERMINATED, -+} -+ -+impl ContextState { -+ // This function implements the PA_CONTENT_IS_GOOD macro from pulse/def.h -+ // It must match the version from PA headers. -+ pub fn is_good(self) -> bool { -+ match self { -+ ContextState::Connecting | -+ ContextState::Authorizing | -+ ContextState::SettingName | -+ ContextState::Ready => true, -+ _ => false, -+ } -+ } -+ -+ pub fn try_from(x: ffi::pa_context_state_t) -> Option { -+ if x >= ffi::PA_CONTEXT_UNCONNECTED && x <= ffi::PA_CONTEXT_TERMINATED { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+impl Default for ContextState { -+ fn default() -> Self { -+ ContextState::Unconnected -+ } -+} -+ -+impl Into for ContextState { -+ fn into(self) -> ffi::pa_context_state_t { -+ self as ffi::pa_context_state_t -+ } -+} -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum StreamState { -+ Unconnected = ffi::PA_STREAM_UNCONNECTED, -+ Creating = ffi::PA_STREAM_CREATING, -+ Ready = ffi::PA_STREAM_READY, -+ Failed = ffi::PA_STREAM_FAILED, -+ Terminated = ffi::PA_STREAM_TERMINATED, -+} -+ -+impl StreamState { -+ // This function implements the PA_STREAM_IS_GOOD macro from pulse/def.h -+ // It must match the version from PA headers. -+ pub fn is_good(self) -> bool { -+ match self { -+ StreamState::Creating | StreamState::Ready => true, -+ _ => false, -+ } -+ } -+ -+ pub fn try_from(x: ffi::pa_stream_state_t) -> Option { -+ if x >= ffi::PA_STREAM_UNCONNECTED && x <= ffi::PA_STREAM_TERMINATED { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+impl Default for StreamState { -+ fn default() -> Self { -+ StreamState::Unconnected -+ } -+} -+ -+impl Into for StreamState { -+ fn into(self) -> ffi::pa_stream_state_t { -+ self as ffi::pa_stream_state_t -+ } -+} -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum OperationState { -+ Running = ffi::PA_OPERATION_RUNNING, -+ Done = ffi::PA_OPERATION_DONE, -+ Cancelled = ffi::PA_OPERATION_CANCELLED, -+} -+ -+impl OperationState { -+ pub fn try_from(x: ffi::pa_operation_state_t) -> Option { -+ if x >= ffi::PA_OPERATION_RUNNING && x <= ffi::PA_OPERATION_CANCELLED { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+impl Into for OperationState { -+ fn into(self) -> ffi::pa_operation_state_t { -+ self as ffi::pa_operation_state_t -+ } -+} -+ -+bitflags! { -+ pub flags ContextFlags: u32 { -+ const CONTEXT_FLAGS_NOAUTOSPAWN = ffi::PA_CONTEXT_NOAUTOSPAWN, -+ const CONTEXT_FLAGS_NOFAIL = ffi::PA_CONTEXT_NOFAIL, -+ } -+} -+ -+impl Into for ContextFlags { -+ fn into(self) -> ffi::pa_context_flags_t { -+ self.bits() as ffi::pa_context_flags_t -+ } -+} -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum DeviceType { -+ Sink = ffi::PA_DEVICE_TYPE_SINK, -+ Source = ffi::PA_DEVICE_TYPE_SOURCE, -+} -+ -+impl DeviceType { -+ pub fn try_from(x: ffi::pa_device_type_t) -> Option { -+ if x >= ffi::PA_DEVICE_TYPE_SINK && x <= ffi::PA_DEVICE_TYPE_SOURCE { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+impl Into for DeviceType { -+ fn into(self) -> ffi::pa_device_type_t { -+ self as ffi::pa_device_type_t -+ } -+} -+ -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum StreamDirection { -+ NoDirection = ffi::PA_STREAM_NODIRECTION, -+ Playback = ffi::PA_STREAM_PLAYBACK, -+ Record = ffi::PA_STREAM_RECORD, -+ StreamUpload = ffi::PA_STREAM_UPLOAD, -+} -+ -+impl StreamDirection { -+ pub fn try_from(x: ffi::pa_stream_direction_t) -> Option { -+ if x >= ffi::PA_STREAM_NODIRECTION && x <= ffi::PA_STREAM_UPLOAD { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+impl Into for StreamDirection { -+ fn into(self) -> ffi::pa_stream_direction_t { -+ self as ffi::pa_stream_direction_t -+ } -+} -+ -+bitflags! { -+ pub flags StreamFlags : u32 { -+ const STREAM_START_CORKED = ffi::PA_STREAM_START_CORKED, -+ const STREAM_INTERPOLATE_TIMING = ffi::PA_STREAM_INTERPOLATE_TIMING, -+ const STREAM_NOT_MONOTONIC = ffi::PA_STREAM_NOT_MONOTONIC, -+ const STREAM_AUTO_TIMING_UPDATE = ffi::PA_STREAM_AUTO_TIMING_UPDATE, -+ const STREAM_NO_REMAP_CHANNELS = ffi::PA_STREAM_NO_REMAP_CHANNELS, -+ const STREAM_NO_REMIX_CHANNELS = ffi::PA_STREAM_NO_REMIX_CHANNELS, -+ const STREAM_FIX_FORMAT = ffi::PA_STREAM_FIX_FORMAT, -+ const STREAM_FIX_RATE = ffi::PA_STREAM_FIX_RATE, -+ const STREAM_FIX_CHANNELS = ffi::PA_STREAM_FIX_CHANNELS, -+ const STREAM_DONT_MOVE = ffi::PA_STREAM_DONT_MOVE, -+ const STREAM_VARIABLE_RATE = ffi::PA_STREAM_VARIABLE_RATE, -+ const STREAM_PEAK_DETECT = ffi::PA_STREAM_PEAK_DETECT, -+ const STREAM_START_MUTED = ffi::PA_STREAM_START_MUTED, -+ const STREAM_ADJUST_LATENCY = ffi::PA_STREAM_ADJUST_LATENCY, -+ const STREAM_EARLY_REQUESTS = ffi::PA_STREAM_EARLY_REQUESTS, -+ const STREAM_DONT_INHIBIT_AUTO_SUSPEND = ffi::PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND, -+ const STREAM_START_UNMUTED = ffi::PA_STREAM_START_UNMUTED, -+ const STREAM_FAIL_ON_SUSPEND = ffi::PA_STREAM_FAIL_ON_SUSPEND, -+ const STREAM_RELATIVE_VOLUME = ffi::PA_STREAM_RELATIVE_VOLUME, -+ const STREAM_PASSTHROUGH = ffi::PA_STREAM_PASSTHROUGH, -+ } -+} -+ -+impl StreamFlags { -+ pub fn try_from(x: ffi::pa_stream_flags_t) -> Option { -+ if (x & -+ !(ffi::PA_STREAM_NOFLAGS | ffi::PA_STREAM_START_CORKED | ffi::PA_STREAM_INTERPOLATE_TIMING | -+ ffi::PA_STREAM_NOT_MONOTONIC | ffi::PA_STREAM_AUTO_TIMING_UPDATE | -+ ffi::PA_STREAM_NO_REMAP_CHANNELS | -+ ffi::PA_STREAM_NO_REMIX_CHANNELS | ffi::PA_STREAM_FIX_FORMAT | ffi::PA_STREAM_FIX_RATE | -+ ffi::PA_STREAM_FIX_CHANNELS | -+ ffi::PA_STREAM_DONT_MOVE | ffi::PA_STREAM_VARIABLE_RATE | ffi::PA_STREAM_PEAK_DETECT | -+ ffi::PA_STREAM_START_MUTED | ffi::PA_STREAM_ADJUST_LATENCY | -+ ffi::PA_STREAM_EARLY_REQUESTS | -+ ffi::PA_STREAM_DONT_INHIBIT_AUTO_SUSPEND | -+ ffi::PA_STREAM_START_UNMUTED | ffi::PA_STREAM_FAIL_ON_SUSPEND | -+ ffi::PA_STREAM_RELATIVE_VOLUME | ffi::PA_STREAM_PASSTHROUGH)) == 0 { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+impl Into for StreamFlags { -+ fn into(self) -> ffi::pa_stream_flags_t { -+ self.bits() as ffi::pa_stream_flags_t -+ } -+} -+ -+bitflags!{ -+ pub flags SubscriptionMask : u32 { -+ const SUBSCRIPTION_MASK_SINK = ffi::PA_SUBSCRIPTION_MASK_SINK, -+ const SUBSCRIPTION_MASK_SOURCE = ffi::PA_SUBSCRIPTION_MASK_SOURCE, -+ const SUBSCRIPTION_MASK_SINK_INPUT = ffi::PA_SUBSCRIPTION_MASK_SINK_INPUT, -+ const SUBSCRIPTION_MASK_SOURCE_OUTPUT = ffi::PA_SUBSCRIPTION_MASK_SOURCE_OUTPUT, -+ const SUBSCRIPTION_MASK_MODULE = ffi::PA_SUBSCRIPTION_MASK_MODULE, -+ const SUBSCRIPTION_MASK_CLIENT = ffi::PA_SUBSCRIPTION_MASK_CLIENT, -+ const SUBSCRIPTION_MASK_SAMPLE_CACHE = ffi::PA_SUBSCRIPTION_MASK_SAMPLE_CACHE, -+ const SUBSCRIPTION_MASK_SERVER = ffi::PA_SUBSCRIPTION_MASK_SERVER, -+ const SUBSCRIPTION_MASK_AUTOLOAD = ffi::PA_SUBSCRIPTION_MASK_AUTOLOAD, -+ const SUBSCRIPTION_MASK_CARD = ffi::PA_SUBSCRIPTION_MASK_CARD, -+ } -+} -+ -+impl SubscriptionMask { -+ pub fn try_from(x: ffi::pa_subscription_mask_t) -> Option { -+ if (x & !ffi::PA_SUBSCRIPTION_MASK_ALL) == 0 { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+impl Into for SubscriptionMask { -+ fn into(self) -> ffi::pa_subscription_mask_t { -+ self.bits() as ffi::pa_subscription_mask_t -+ } -+} -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum SubscriptionEventFacility { -+ Sink = ffi::PA_SUBSCRIPTION_EVENT_SINK, -+ Source = ffi::PA_SUBSCRIPTION_EVENT_SOURCE, -+ SinkInput = ffi::PA_SUBSCRIPTION_EVENT_SINK_INPUT, -+ SourceOutput = ffi::PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT, -+ Module = ffi::PA_SUBSCRIPTION_EVENT_MODULE, -+ Client = ffi::PA_SUBSCRIPTION_EVENT_CLIENT, -+ SampleCache = ffi::PA_SUBSCRIPTION_EVENT_SAMPLE_CACHE, -+ Server = ffi::PA_SUBSCRIPTION_EVENT_SERVER, -+ Autoload = ffi::PA_SUBSCRIPTION_EVENT_AUTOLOAD, -+ Card = ffi::PA_SUBSCRIPTION_EVENT_CARD, -+} -+ -+#[repr(C)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum SubscriptionEventType { -+ New, -+ Change, -+ Remove, -+} -+ -+#[repr(C)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub struct SubscriptionEvent(ffi::pa_subscription_event_type_t); -+impl SubscriptionEvent { -+ pub fn try_from(x: ffi::pa_subscription_event_type_t) -> Option { -+ if (x & !(ffi::PA_SUBSCRIPTION_EVENT_TYPE_MASK | ffi::PA_SUBSCRIPTION_EVENT_FACILITY_MASK)) == 0 { -+ Some(SubscriptionEvent(x)) -+ } else { -+ None -+ } -+ } -+ -+ pub fn event_facility(self) -> SubscriptionEventFacility { -+ unsafe { ::std::mem::transmute(self.0 & ffi::PA_SUBSCRIPTION_EVENT_FACILITY_MASK) } -+ } -+ -+ pub fn event_type(self) -> SubscriptionEventType { -+ unsafe { ::std::mem::transmute(((self.0 & ffi::PA_SUBSCRIPTION_EVENT_TYPE_MASK) >> 4)) } -+ } -+} -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum SeekMode { -+ Relative = ffi::PA_SEEK_RELATIVE, -+ Absolute = ffi::PA_SEEK_ABSOLUTE, -+ RelativeOnRead = ffi::PA_SEEK_RELATIVE_ON_READ, -+ RelativeEnd = ffi::PA_SEEK_RELATIVE_END, -+} -+ -+impl SeekMode { -+ pub fn try_from(x: ffi::pa_seek_mode_t) -> Option { -+ if x >= ffi::PA_SEEK_RELATIVE && x <= ffi::PA_SEEK_RELATIVE_END { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+impl Into for SeekMode { -+ fn into(self) -> ffi::pa_seek_mode_t { -+ self as ffi::pa_seek_mode_t -+ } -+} -+ -+bitflags! { -+ pub flags SinkFlags: u32 { -+ const SINK_HW_VOLUME_CTRL = ffi::PA_SINK_HW_VOLUME_CTRL, -+ const SINK_LATENCY = ffi::PA_SINK_LATENCY, -+ const SINK_HARDWARE = ffi::PA_SINK_HARDWARE, -+ const SINK_NETWORK = ffi::PA_SINK_NETWORK, -+ const SINK_HW_MUTE_CTRL = ffi::PA_SINK_HW_MUTE_CTRL, -+ const SINK_DECIBEL_VOLUME = ffi::PA_SINK_DECIBEL_VOLUME, -+ const SINK_FLAT_VOLUME = ffi::PA_SINK_FLAT_VOLUME, -+ const SINK_DYNAMIC_LATENCY = ffi::PA_SINK_DYNAMIC_LATENCY, -+ const SINK_SET_FORMATS = ffi::PA_SINK_SET_FORMATS, -+ } -+} -+ -+impl SinkFlags { -+ pub fn try_from(x: ffi::pa_sink_flags_t) -> Option { -+ if (x & -+ !(ffi::PA_SOURCE_NOFLAGS | ffi::PA_SOURCE_HW_VOLUME_CTRL | ffi::PA_SOURCE_LATENCY | -+ ffi::PA_SOURCE_HARDWARE | ffi::PA_SOURCE_NETWORK | ffi::PA_SOURCE_HW_MUTE_CTRL | -+ ffi::PA_SOURCE_DECIBEL_VOLUME | -+ ffi::PA_SOURCE_DYNAMIC_LATENCY | ffi::PA_SOURCE_FLAT_VOLUME)) == 0 { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum SinkState { -+ InvalidState = ffi::PA_SINK_INVALID_STATE, -+ Running = ffi::PA_SINK_RUNNING, -+ Idle = ffi::PA_SINK_IDLE, -+ Suspended = ffi::PA_SINK_SUSPENDED, -+ Init = ffi::PA_SINK_INIT, -+ Unlinked = ffi::PA_SINK_UNLINKED, -+} -+ -+bitflags!{ -+ pub flags SourceFlags: u32 { -+ const SOURCE_FLAGS_HW_VOLUME_CTRL = ffi::PA_SOURCE_HW_VOLUME_CTRL, -+ const SOURCE_FLAGS_LATENCY = ffi::PA_SOURCE_LATENCY, -+ const SOURCE_FLAGS_HARDWARE = ffi::PA_SOURCE_HARDWARE, -+ const SOURCE_FLAGS_NETWORK = ffi::PA_SOURCE_NETWORK, -+ const SOURCE_FLAGS_HW_MUTE_CTRL = ffi::PA_SOURCE_HW_MUTE_CTRL, -+ const SOURCE_FLAGS_DECIBEL_VOLUME = ffi::PA_SOURCE_DECIBEL_VOLUME, -+ const SOURCE_FLAGS_DYNAMIC_LATENCY = ffi::PA_SOURCE_DYNAMIC_LATENCY, -+ const SOURCE_FLAGS_FLAT_VOLUME = ffi::PA_SOURCE_FLAT_VOLUME, -+ } -+} -+ -+impl Into for SourceFlags { -+ fn into(self) -> ffi::pa_source_flags_t { -+ self.bits() as ffi::pa_source_flags_t -+ } -+} -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum SourceState { -+ InvalidState = ffi::PA_SOURCE_INVALID_STATE, -+ Running = ffi::PA_SOURCE_RUNNING, -+ Idle = ffi::PA_SOURCE_IDLE, -+ Suspended = ffi::PA_SOURCE_SUSPENDED, -+ Init = ffi::PA_SOURCE_INIT, -+ Unlinked = ffi::PA_SOURCE_UNLINKED, -+} -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum PortAvailable { -+ Unknown = ffi::PA_PORT_AVAILABLE_UNKNOWN, -+ No = ffi::PA_PORT_AVAILABLE_NO, -+ Yes = ffi::PA_PORT_AVAILABLE_YES, -+} -+ -+impl PortAvailable { -+ pub fn try_from(x: ffi::pa_port_available_t) -> Option { -+ if x >= ffi::PA_PORT_AVAILABLE_UNKNOWN && x <= ffi::PA_PORT_AVAILABLE_YES { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+impl Into for PortAvailable { -+ fn into(self) -> ffi::pa_port_available_t { -+ self as ffi::pa_port_available_t -+ } -+} -+ -+#[repr(i32)] -+#[derive(Clone, Copy, Debug, PartialEq, Eq)] -+pub enum ChannelPosition { -+ Invalid = ffi::PA_CHANNEL_POSITION_INVALID, -+ Mono = ffi::PA_CHANNEL_POSITION_MONO, -+ FrontLeft = ffi::PA_CHANNEL_POSITION_FRONT_LEFT, -+ FrontRight = ffi::PA_CHANNEL_POSITION_FRONT_RIGHT, -+ FrontCenter = ffi::PA_CHANNEL_POSITION_FRONT_CENTER, -+ RearCenter = ffi::PA_CHANNEL_POSITION_REAR_CENTER, -+ RearLeft = ffi::PA_CHANNEL_POSITION_REAR_LEFT, -+ RearRight = ffi::PA_CHANNEL_POSITION_REAR_RIGHT, -+ LowFreqEffects = ffi::PA_CHANNEL_POSITION_LFE, -+ FrontLeftOfCenter = ffi::PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, -+ FrontRightOfCenter = ffi::PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, -+ SideLeft = ffi::PA_CHANNEL_POSITION_SIDE_LEFT, -+ SideRight = ffi::PA_CHANNEL_POSITION_SIDE_RIGHT, -+ Aux0 = ffi::PA_CHANNEL_POSITION_AUX0, -+ Aux1 = ffi::PA_CHANNEL_POSITION_AUX1, -+ Aux2 = ffi::PA_CHANNEL_POSITION_AUX2, -+ Aux3 = ffi::PA_CHANNEL_POSITION_AUX3, -+ Aux4 = ffi::PA_CHANNEL_POSITION_AUX4, -+ Aux5 = ffi::PA_CHANNEL_POSITION_AUX5, -+ Aux6 = ffi::PA_CHANNEL_POSITION_AUX6, -+ Aux7 = ffi::PA_CHANNEL_POSITION_AUX7, -+ Aux8 = ffi::PA_CHANNEL_POSITION_AUX8, -+ Aux9 = ffi::PA_CHANNEL_POSITION_AUX9, -+ Aux10 = ffi::PA_CHANNEL_POSITION_AUX10, -+ Aux11 = ffi::PA_CHANNEL_POSITION_AUX11, -+ Aux12 = ffi::PA_CHANNEL_POSITION_AUX12, -+ Aux13 = ffi::PA_CHANNEL_POSITION_AUX13, -+ Aux14 = ffi::PA_CHANNEL_POSITION_AUX14, -+ Aux15 = ffi::PA_CHANNEL_POSITION_AUX15, -+ Aux16 = ffi::PA_CHANNEL_POSITION_AUX16, -+ Aux17 = ffi::PA_CHANNEL_POSITION_AUX17, -+ Aux18 = ffi::PA_CHANNEL_POSITION_AUX18, -+ Aux19 = ffi::PA_CHANNEL_POSITION_AUX19, -+ Aux20 = ffi::PA_CHANNEL_POSITION_AUX20, -+ Aux21 = ffi::PA_CHANNEL_POSITION_AUX21, -+ Aux22 = ffi::PA_CHANNEL_POSITION_AUX22, -+ Aux23 = ffi::PA_CHANNEL_POSITION_AUX23, -+ Aux24 = ffi::PA_CHANNEL_POSITION_AUX24, -+ Aux25 = ffi::PA_CHANNEL_POSITION_AUX25, -+ Aux26 = ffi::PA_CHANNEL_POSITION_AUX26, -+ Aux27 = ffi::PA_CHANNEL_POSITION_AUX27, -+ Aux28 = ffi::PA_CHANNEL_POSITION_AUX28, -+ Aux29 = ffi::PA_CHANNEL_POSITION_AUX29, -+ Aux30 = ffi::PA_CHANNEL_POSITION_AUX30, -+ Aux31 = ffi::PA_CHANNEL_POSITION_AUX31, -+ TopCenter = ffi::PA_CHANNEL_POSITION_TOP_CENTER, -+ TopFrontLeft = ffi::PA_CHANNEL_POSITION_TOP_FRONT_LEFT, -+ TopFrontRight = ffi::PA_CHANNEL_POSITION_TOP_FRONT_RIGHT, -+ TopFrontCenter = ffi::PA_CHANNEL_POSITION_TOP_FRONT_CENTER, -+ TopRearLeft = ffi::PA_CHANNEL_POSITION_TOP_REAR_LEFT, -+ TopRearRight = ffi::PA_CHANNEL_POSITION_TOP_REAR_RIGHT, -+ TopRearCenter = ffi::PA_CHANNEL_POSITION_TOP_REAR_CENTER, -+} -+ -+impl ChannelPosition { -+ pub fn try_from(x: ffi::pa_channel_position_t) -> Option { -+ if x >= ffi::PA_CHANNEL_POSITION_INVALID && x < ffi::PA_CHANNEL_POSITION_MAX { -+ Some(unsafe { ::std::mem::transmute(x) }) -+ } else { -+ None -+ } -+ } -+} -+ -+impl Default for ChannelPosition { -+ fn default() -> Self { -+ ChannelPosition::Invalid -+ } -+} -+ -+impl Into for ChannelPosition { -+ fn into(self) -> ffi::pa_channel_position_t { -+ self as ffi::pa_channel_position_t -+ } -+} -+pub type Result = ::std::result::Result; -+ -+pub trait CVolumeExt { -+ fn set(&mut self, channels: c_uint, v: Volume); -+ fn set_balance(&mut self, map: &ChannelMap, new_balance: f32); -+} -+ -+impl CVolumeExt for CVolume { -+ fn set(&mut self, channels: c_uint, v: Volume) { -+ unsafe { -+ ffi::pa_cvolume_set(self, channels, v); -+ } -+ } -+ -+ fn set_balance(&mut self, map: &ChannelMap, new_balance: f32) { -+ unsafe { -+ ffi::pa_cvolume_set_balance(self, map, new_balance); -+ } -+ } -+} -+ -+pub trait ChannelMapExt { -+ fn init() -> ChannelMap; -+ fn can_balance(&self) -> bool; -+} -+ -+impl ChannelMapExt for ChannelMap { -+ fn init() -> ChannelMap { -+ let mut cm = ChannelMap::default(); -+ unsafe { -+ ffi::pa_channel_map_init(&mut cm); -+ } -+ cm -+ } -+ fn can_balance(&self) -> bool { -+ unsafe { ffi::pa_channel_map_can_balance(self) > 0 } -+ } -+} -+ -+pub trait ProplistExt { -+ fn proplist(&self) -> Proplist; -+} -+ -+impl ProplistExt for SinkInfo { -+ fn proplist(&self) -> Proplist { -+ unsafe { proplist::from_raw_ptr(self.proplist) } -+ } -+} -+ -+impl ProplistExt for SourceInfo { -+ fn proplist(&self) -> Proplist { -+ unsafe { proplist::from_raw_ptr(self.proplist) } -+ } -+} -+ -+pub trait SampleSpecExt { -+ fn frame_size(&self) -> usize; -+} -+ -+impl SampleSpecExt for SampleSpec { -+ fn frame_size(&self) -> usize { -+ unsafe { ffi::pa_frame_size(self) } -+ } -+} -+ -+pub trait USecExt { -+ fn to_bytes(self, spec: &SampleSpec) -> usize; -+} -+ -+impl USecExt for USec { -+ fn to_bytes(self, spec: &SampleSpec) -> usize { -+ unsafe { ffi::pa_usec_to_bytes(self, spec) } -+ } -+} -+ -+pub fn library_version() -> *const c_char { -+ unsafe { ffi::pa_get_library_version() } -+} -+ -+pub fn sw_volume_from_linear(vol: f64) -> Volume { -+ unsafe { ffi::pa_sw_volume_from_linear(vol) } -+} -+ -+pub fn rtclock_now() -> USec { -+ unsafe { ffi::pa_rtclock_now() } -+} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/mainloop_api.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/mainloop_api.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/mainloop_api.rs.cubeb-pulse-arm 2017-08-04 13:37:46.385821734 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/mainloop_api.rs 2017-08-04 13:37:46.385821734 +0200 -@@ -0,0 +1,58 @@ -+// Copyright © 2017 Mozilla Foundation -+// -+// This program is made available under an ISC-style license. See the -+// accompanying file LICENSE for details. -+ -+use ffi; -+use std::mem; -+use std::os::raw::c_void; -+ -+ -+#[allow(non_camel_case_types)] -+type pa_once_cb_t = Option; -+fn wrap_once_cb(_: F) -> pa_once_cb_t -+ where F: Fn(&MainloopApi, *mut c_void) -+{ -+ assert!(mem::size_of::() == 0); -+ -+ unsafe extern "C" fn wrapped(m: *mut ffi::pa_mainloop_api, userdata: *mut c_void) -+ where F: Fn(&MainloopApi, *mut c_void) -+ { -+ let api = from_raw_ptr(m); -+ let result = mem::transmute::<_, &F>(&())(&api, userdata); -+ mem::forget(api); -+ result -+ } -+ -+ Some(wrapped::) -+} -+ -+pub struct MainloopApi(*mut ffi::pa_mainloop_api); -+ -+impl MainloopApi { -+ pub fn raw_mut(&self) -> &mut ffi::pa_mainloop_api { -+ unsafe { &mut *self.0 } -+ } -+ -+ pub fn once(&self, cb: CB, userdata: *mut c_void) -+ where CB: Fn(&MainloopApi, *mut c_void) -+ { -+ let wrapped = wrap_once_cb(cb); -+ unsafe { -+ ffi::pa_mainloop_api_once(self.raw_mut(), wrapped, userdata); -+ } -+ } -+ -+ pub fn time_free(&self, e: *mut ffi::pa_time_event) { -+ unsafe { -+ if let Some(f) = self.raw_mut().time_free { -+ f(e); -+ } -+ } -+ } -+} -+ -+pub unsafe fn from_raw_ptr(raw: *mut ffi::pa_mainloop_api) -> MainloopApi { -+ MainloopApi(raw) -+} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/operation.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/operation.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/operation.rs.cubeb-pulse-arm 2017-08-04 13:37:46.385821734 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/operation.rs 2017-08-04 13:37:46.385821734 +0200 -@@ -0,0 +1,43 @@ -+// Copyright © 2017 Mozilla Foundation -+// -+// This program is made available under an ISC-style license. See the -+// accompanying file LICENSE for details. -+ -+use ffi; -+ -+#[derive(Debug)] -+pub struct Operation(*mut ffi::pa_operation); -+ -+impl Operation { -+ pub unsafe fn from_raw_ptr(raw: *mut ffi::pa_operation) -> Operation { -+ Operation(raw) -+ } -+ -+ pub fn cancel(&mut self) { -+ unsafe { -+ ffi::pa_operation_cancel(self.0); -+ } -+ } -+ -+ pub fn get_state(&self) -> ffi::pa_operation_state_t { -+ unsafe { ffi::pa_operation_get_state(self.0) } -+ } -+} -+ -+impl Clone for Operation { -+ fn clone(&self) -> Self { -+ Operation(unsafe { ffi::pa_operation_ref(self.0) }) -+ } -+} -+ -+impl Drop for Operation { -+ fn drop(&mut self) { -+ unsafe { -+ ffi::pa_operation_unref(self.0); -+ } -+ } -+} -+ -+pub unsafe fn from_raw_ptr(raw: *mut ffi::pa_operation) -> Operation { -+ Operation::from_raw_ptr(raw) -+} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/proplist.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/proplist.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/proplist.rs.cubeb-pulse-arm 2017-08-04 13:37:46.385821734 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/proplist.rs 2017-08-04 13:37:46.385821734 +0200 -@@ -0,0 +1,31 @@ -+// Copyright © 2017 Mozilla Foundation -+// -+// This program is made available under an ISC-style license. See the -+// accompanying file LICENSE for details. -+ -+use ffi; -+use std::ffi::{CStr, CString}; -+ -+#[derive(Debug)] -+pub struct Proplist(*mut ffi::pa_proplist); -+ -+impl Proplist { -+ pub fn gets(&self, key: T) -> Option<&CStr> -+ where T: Into> -+ { -+ let key = match CString::new(key) { -+ Ok(k) => k, -+ _ => return None, -+ }; -+ let r = unsafe { ffi::pa_proplist_gets(self.0, key.as_ptr()) }; -+ if r.is_null() { -+ None -+ } else { -+ Some(unsafe { CStr::from_ptr(r) }) -+ } -+ } -+} -+ -+pub unsafe fn from_raw_ptr(raw: *mut ffi::pa_proplist) -> Proplist { -+ return Proplist(raw); -+} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/stream.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/stream.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/stream.rs.cubeb-pulse-arm 2017-08-04 13:37:46.386821731 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/stream.rs 2017-08-04 13:37:46.386821731 +0200 -@@ -0,0 +1,367 @@ -+// Copyright © 2017 Mozilla Foundation -+// -+// This program is made available under an ISC-style license. See the -+// accompanying file LICENSE for details. -+ -+use ::*; -+use context; -+use ffi; -+use operation; -+use std::ffi::CStr; -+use std::mem; -+use std::os::raw::{c_int, c_void}; -+use std::ptr; -+use util::*; -+ -+#[derive(Debug)] -+pub struct Stream(*mut ffi::pa_stream); -+ -+impl Stream { -+ pub fn new<'a, CM>(c: &Context, name: &::std::ffi::CStr, ss: &SampleSpec, map: CM) -> Option -+ where CM: Into> -+ { -+ let ptr = unsafe { -+ ffi::pa_stream_new(c.raw_mut(), -+ name.as_ptr(), -+ ss as *const _, -+ to_ptr(map.into())) -+ }; -+ if ptr.is_null() { -+ None -+ } else { -+ Some(Stream(ptr)) -+ } -+ } -+ -+ #[doc(hidden)] -+ pub fn raw_mut(&self) -> &mut ffi::pa_stream { -+ unsafe { &mut *self.0 } -+ } -+ -+ pub fn unref(self) { -+ unsafe { -+ ffi::pa_stream_unref(self.raw_mut()); -+ } -+ } -+ -+ pub fn get_state(&self) -> StreamState { -+ StreamState::try_from(unsafe { -+ ffi::pa_stream_get_state(self.raw_mut()) -+ }).expect("pa_stream_get_state returned invalid StreamState") -+ } -+ -+ pub fn get_context(&self) -> Option { -+ let ptr = unsafe { ffi::pa_stream_get_context(self.raw_mut()) }; -+ if ptr.is_null() { -+ return None; -+ } -+ -+ let ctx = unsafe { context::from_raw_ptr(ptr) }; -+ Some(ctx) -+ } -+ -+ pub fn get_index(&self) -> u32 { -+ unsafe { ffi::pa_stream_get_index(self.raw_mut()) } -+ } -+ -+ pub fn get_device_name<'a>(&'a self) -> Result<&'a CStr> { -+ let r = unsafe { ffi::pa_stream_get_device_name(self.raw_mut()) }; -+ if r.is_null() { -+ let err = if let Some(c) = self.get_context() { -+ c.errno() -+ } else { -+ ffi::PA_ERR_UNKNOWN -+ }; -+ return Err(ErrorCode::from_error_code(err)); -+ } -+ Ok(unsafe { CStr::from_ptr(r) }) -+ } -+ -+ pub fn is_suspended(&self) -> Result { -+ let r = unsafe { ffi::pa_stream_is_suspended(self.raw_mut()) }; -+ error_result!(r != 0, r) -+ } -+ -+ pub fn is_corked(&self) -> Result { -+ let r = unsafe { ffi::pa_stream_is_corked(self.raw_mut()) }; -+ error_result!(r != 0, r) -+ } -+ -+ pub fn connect_playback<'a, D, A, V, S>(&self, -+ dev: D, -+ attr: A, -+ flags: StreamFlags, -+ volume: V, -+ sync_stream: S) -+ -> Result<()> -+ where D: Into>, -+ A: Into>, -+ V: Into>, -+ S: Into> -+ { -+ let r = unsafe { -+ ffi::pa_stream_connect_playback(self.raw_mut(), -+ str_to_ptr(dev.into()), -+ to_ptr(attr.into()), -+ flags.into(), -+ to_ptr(volume.into()), -+ map_to_mut_ptr(sync_stream.into(), |p| p.0)) -+ }; -+ error_result!((), r) -+ } -+ -+ pub fn connect_record<'a, D, A>(&self, dev: D, attr: A, flags: StreamFlags) -> Result<()> -+ where D: Into>, -+ A: Into> -+ { -+ let r = unsafe { -+ ffi::pa_stream_connect_record(self.raw_mut(), -+ str_to_ptr(dev.into()), -+ to_ptr(attr.into()), -+ flags.into()) -+ }; -+ error_result!((), r) -+ } -+ -+ pub fn disconnect(&self) -> Result<()> { -+ let r = unsafe { ffi::pa_stream_disconnect(self.raw_mut()) }; -+ error_result!((), r) -+ } -+ -+ pub fn begin_write(&self, req_bytes: usize) -> Result<(*mut c_void, usize)> { -+ let mut data: *mut c_void = ptr::null_mut(); -+ let mut nbytes = req_bytes; -+ let r = unsafe { ffi::pa_stream_begin_write(self.raw_mut(), &mut data, &mut nbytes) }; -+ error_result!((data, nbytes), r) -+ } -+ -+ pub fn cancel_write(&self) -> Result<()> { -+ let r = unsafe { ffi::pa_stream_cancel_write(self.raw_mut()) }; -+ error_result!((), r) -+ } -+ -+ pub fn write(&self, data: *const c_void, nbytes: usize, offset: i64, seek: SeekMode) -> Result<()> { -+ let r = unsafe { ffi::pa_stream_write(self.raw_mut(), data, nbytes, None, offset, seek.into()) }; -+ error_result!((), r) -+ } -+ -+ pub unsafe fn peek(&self, data: *mut *const c_void, length: *mut usize) -> Result<()> { -+ let r = ffi::pa_stream_peek(self.raw_mut(), data, length); -+ error_result!((), r) -+ } -+ -+ pub fn drop(&self) -> Result<()> { -+ let r = unsafe { ffi::pa_stream_drop(self.raw_mut()) }; -+ error_result!((), r) -+ } -+ -+ pub fn writable_size(&self) -> Result { -+ let r = unsafe { ffi::pa_stream_writable_size(self.raw_mut()) }; -+ if r == ::std::usize::MAX { -+ let err = if let Some(c) = self.get_context() { -+ c.errno() -+ } else { -+ ffi::PA_ERR_UNKNOWN -+ }; -+ return Err(ErrorCode::from_error_code(err)); -+ } -+ Ok(r) -+ } -+ -+ pub fn readable_size(&self) -> Result { -+ let r = unsafe { ffi::pa_stream_readable_size(self.raw_mut()) }; -+ if r == ::std::usize::MAX { -+ let err = if let Some(c) = self.get_context() { -+ c.errno() -+ } else { -+ ffi::PA_ERR_UNKNOWN -+ }; -+ return Err(ErrorCode::from_error_code(err)); -+ } -+ Ok(r) -+ } -+ -+ pub fn update_timing_info(&self, _: CB, userdata: *mut c_void) -> Result -+ where CB: Fn(&Stream, i32, *mut c_void) -+ { -+ debug_assert_eq!(mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(s: *mut ffi::pa_stream, success: c_int, userdata: *mut c_void) -+ where F: Fn(&Stream, i32, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let mut stm = stream::from_raw_ptr(s); -+ let result = uninitialized::()(&mut stm, success, userdata); -+ forget(stm); -+ -+ result -+ } -+ -+ let r = unsafe { ffi::pa_stream_update_timing_info(self.raw_mut(), Some(wrapped::), userdata) }; -+ if r.is_null() { -+ let err = if let Some(c) = self.get_context() { -+ c.errno() -+ } else { -+ ffi::PA_ERR_UNKNOWN -+ }; -+ return Err(ErrorCode::from_error_code(err)); -+ } -+ Ok(unsafe { operation::from_raw_ptr(r) }) -+ } -+ -+ pub fn clear_state_callback(&self) { -+ unsafe { -+ ffi::pa_stream_set_state_callback(self.raw_mut(), None, ptr::null_mut()); -+ } -+ } -+ -+ pub fn set_state_callback(&self, _: CB, userdata: *mut c_void) -+ where CB: Fn(&Stream, *mut c_void) -+ { -+ debug_assert_eq!(mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(s: *mut ffi::pa_stream, userdata: *mut c_void) -+ where F: Fn(&Stream, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let mut stm = stream::from_raw_ptr(s); -+ let result = uninitialized::()(&mut stm, userdata); -+ forget(stm); -+ -+ result -+ } -+ -+ unsafe { -+ ffi::pa_stream_set_state_callback(self.raw_mut(), Some(wrapped::), userdata); -+ } -+ } -+ -+ pub fn clear_write_callback(&self) { -+ unsafe { -+ ffi::pa_stream_set_write_callback(self.raw_mut(), None, ptr::null_mut()); -+ } -+ } -+ -+ pub fn set_write_callback(&self, _: CB, userdata: *mut c_void) -+ where CB: Fn(&Stream, usize, *mut c_void) -+ { -+ debug_assert_eq!(mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(s: *mut ffi::pa_stream, nbytes: usize, userdata: *mut c_void) -+ where F: Fn(&Stream, usize, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let mut stm = stream::from_raw_ptr(s); -+ let result = uninitialized::()(&mut stm, nbytes, userdata); -+ forget(stm); -+ -+ result -+ } -+ -+ unsafe { -+ ffi::pa_stream_set_write_callback(self.raw_mut(), Some(wrapped::), userdata); -+ } -+ } -+ -+ pub fn clear_read_callback(&self) { -+ unsafe { -+ ffi::pa_stream_set_read_callback(self.raw_mut(), None, ptr::null_mut()); -+ } -+ } -+ -+ pub fn set_read_callback(&self, _: CB, userdata: *mut c_void) -+ where CB: Fn(&Stream, usize, *mut c_void) -+ { -+ debug_assert_eq!(mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(s: *mut ffi::pa_stream, nbytes: usize, userdata: *mut c_void) -+ where F: Fn(&Stream, usize, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let mut stm = stream::from_raw_ptr(s); -+ let result = uninitialized::()(&mut stm, nbytes, userdata); -+ forget(stm); -+ -+ result -+ } -+ -+ unsafe { -+ ffi::pa_stream_set_read_callback(self.raw_mut(), Some(wrapped::), userdata); -+ } -+ } -+ -+ pub fn cork(&self, b: i32, _: CB, userdata: *mut c_void) -> Result -+ where CB: Fn(&Stream, i32, *mut c_void) -+ { -+ debug_assert_eq!(mem::size_of::(), 0); -+ -+ // See: A note about `wrapped` functions -+ unsafe extern "C" fn wrapped(s: *mut ffi::pa_stream, success: c_int, userdata: *mut c_void) -+ where F: Fn(&Stream, i32, *mut c_void) -+ { -+ use std::mem::{forget, uninitialized}; -+ let mut stm = stream::from_raw_ptr(s); -+ let result = uninitialized::()(&mut stm, success, userdata); -+ forget(stm); -+ -+ result -+ } -+ -+ let r = unsafe { ffi::pa_stream_cork(self.raw_mut(), b, Some(wrapped::), userdata) }; -+ if r.is_null() { -+ let err = if let Some(c) = self.get_context() { -+ c.errno() -+ } else { -+ ffi::PA_ERR_UNKNOWN -+ }; -+ return Err(ErrorCode::from_error_code(err)); -+ } -+ Ok(unsafe { operation::from_raw_ptr(r) }) -+ } -+ -+ pub fn get_time(&self) -> Result<(u64)> { -+ let mut usec: u64 = 0; -+ let r = unsafe { ffi::pa_stream_get_time(self.raw_mut(), &mut usec) }; -+ error_result!(usec, r) -+ } -+ -+ pub fn get_latency(&self) -> Result<(u64, bool)> { -+ let mut usec: u64 = 0; -+ let mut negative: i32 = 0; -+ let r = unsafe { ffi::pa_stream_get_latency(self.raw_mut(), &mut usec, &mut negative) }; -+ error_result!((usec, negative != 0), r) -+ } -+ -+ pub fn get_sample_spec(&self) -> &SampleSpec { -+ unsafe { -+ let ptr = ffi::pa_stream_get_sample_spec(self.raw_mut()); -+ debug_assert!(!ptr.is_null()); -+ &*ptr -+ } -+ } -+ -+ pub fn get_channel_map(&self) -> &ChannelMap { -+ unsafe { -+ let ptr = ffi::pa_stream_get_channel_map(self.raw_mut()); -+ debug_assert!(!ptr.is_null()); -+ &*ptr -+ } -+ } -+ -+ pub fn get_buffer_attr(&self) -> &BufferAttr { -+ unsafe { -+ let ptr = ffi::pa_stream_get_buffer_attr(self.raw_mut()); -+ debug_assert!(!ptr.is_null()); -+ &*ptr -+ } -+ } -+} -+ -+#[doc(hidden)] -+pub unsafe fn from_raw_ptr(ptr: *mut ffi::pa_stream) -> Stream { -+ Stream(ptr) -+} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/threaded_mainloop.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/threaded_mainloop.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/threaded_mainloop.rs.cubeb-pulse-arm 2017-08-04 13:37:46.386821731 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/threaded_mainloop.rs 2017-08-04 13:37:46.386821731 +0200 -@@ -0,0 +1,92 @@ -+// Copyright © 2017 Mozilla Foundation -+// -+// This program is made available under an ISC-style license. See the -+// accompanying file LICENSE for details. -+ -+use ErrorCode; -+use Result; -+use ffi; -+use mainloop_api; -+use mainloop_api::MainloopApi; -+ -+#[derive(Debug)] -+pub struct ThreadedMainloop(*mut ffi::pa_threaded_mainloop); -+ -+impl ThreadedMainloop { -+ pub unsafe fn from_raw_ptr(raw: *mut ffi::pa_threaded_mainloop) -> Self { -+ ThreadedMainloop(raw) -+ } -+ -+ pub fn new() -> Self { -+ unsafe { ThreadedMainloop::from_raw_ptr(ffi::pa_threaded_mainloop_new()) } -+ } -+ -+ pub fn raw_mut(&self) -> &mut ffi::pa_threaded_mainloop { -+ unsafe { &mut *self.0 } -+ } -+ -+ pub fn is_null(&self) -> bool { -+ self.0.is_null() -+ } -+ -+ pub fn start(&self) -> Result<()> { -+ match unsafe { ffi::pa_threaded_mainloop_start(self.raw_mut()) } { -+ 0 => Ok(()), -+ _ => Err(ErrorCode::from_error_code(ffi::PA_ERR_UNKNOWN)), -+ } -+ } -+ -+ pub fn stop(&self) { -+ unsafe { -+ ffi::pa_threaded_mainloop_stop(self.raw_mut()); -+ } -+ } -+ -+ pub fn lock(&self) { -+ unsafe { -+ ffi::pa_threaded_mainloop_lock(self.raw_mut()); -+ } -+ } -+ -+ pub fn unlock(&self) { -+ unsafe { -+ ffi::pa_threaded_mainloop_unlock(self.raw_mut()); -+ } -+ } -+ -+ pub fn wait(&self) { -+ unsafe { -+ ffi::pa_threaded_mainloop_wait(self.raw_mut()); -+ } -+ } -+ -+ pub fn signal(&self) { -+ unsafe { -+ ffi::pa_threaded_mainloop_signal(self.raw_mut(), 0); -+ } -+ } -+ -+ pub fn get_api(&self) -> MainloopApi { -+ unsafe { mainloop_api::from_raw_ptr(ffi::pa_threaded_mainloop_get_api(self.raw_mut())) } -+ } -+ -+ pub fn in_thread(&self) -> bool { -+ unsafe { ffi::pa_threaded_mainloop_in_thread(self.raw_mut()) != 0 } -+ } -+} -+ -+impl ::std::default::Default for ThreadedMainloop { -+ fn default() -> Self { -+ ThreadedMainloop(::std::ptr::null_mut()) -+ } -+} -+ -+impl ::std::ops::Drop for ThreadedMainloop { -+ fn drop(&mut self) { -+ if !self.is_null() { -+ unsafe { -+ ffi::pa_threaded_mainloop_free(self.raw_mut()); -+ } -+ } -+ } -+} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/util.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/util.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/util.rs.cubeb-pulse-arm 2017-08-04 13:37:46.386821731 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/pulse-rs/src/util.rs 2017-08-04 13:37:46.386821731 +0200 -@@ -0,0 +1,41 @@ -+// Copyright © 2017 Mozilla Foundation -+// -+// This program is made available under an ISC-style license. See the -+// accompanying file LICENSE for details. -+ -+use std::ffi::CStr; -+use std::os::raw::c_char; -+use std::ptr; -+ -+pub trait UnwrapCStr { -+ fn unwrap_cstr(self) -> *const c_char; -+} -+ -+impl<'a, U> UnwrapCStr for U -+ where U: Into> -+{ -+ fn unwrap_cstr(self) -> *const c_char { -+ self.into().map(|o| o.as_ptr()).unwrap_or(0 as *const _) -+ } -+} -+ -+pub fn map_to_mut_ptr *mut U>(t: Option<&mut T>, f: F) -> *mut U { -+ match t { -+ Some(x) => f(x), -+ None => ptr::null_mut(), -+ } -+} -+ -+pub fn str_to_ptr(s: Option<&CStr>) -> *const c_char { -+ match s { -+ Some(x) => x.as_ptr(), -+ None => ptr::null(), -+ } -+} -+ -+pub fn to_ptr(t: Option<&T>) -> *const T { -+ match t { -+ Some(x) => x as *const T, -+ None => ptr::null(), -+ } -+} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/README.md.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/README.md ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/README.md.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/README.md 2017-08-04 13:37:46.383821740 +0200 -@@ -3,3 +3,4 @@ - Implementation of PulseAudio backend for Cubeb written in Rust. - - [![Travis Build Status](https://travis-ci.org/djg/cubeb-pulse-rs.svg?branch=master)](https://travis-ci.org/djg/cubeb-pulse-rs) -+[![Travis Build Status](https://travis-ci.org/djg/cubeb-pulse-rs.svg?branch=dev)](https://travis-ci.org/djg/cubeb-pulse-rs) -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/README_MOZILLA.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/README_MOZILLA ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/README_MOZILLA.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/README_MOZILLA 2017-08-04 13:37:46.383821740 +0200 -@@ -5,4 +5,4 @@ Makefile.in build files for the Mozilla - - The cubeb-pulse-rs git repository is: https://github.com/djg/cubeb-pulse-rs.git - --The git commit ID used was dbcd7f96aea8d249a4b78f9a7597768c9dff22eb (2017-04-25 11:42:10 +1000) -+The git commit ID used was 64515819cdf54a16626df5dce5f5c7cb1220d53b (2017-06-19 17:41:30 +1000) -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/context.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/context.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/context.rs.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/context.rs 2017-08-04 13:50:38.145480458 +0200 -@@ -4,67 +4,60 @@ - // accompanying file LICENSE for details. - - use backend::*; --use backend::cork_state::CorkState; - use capi::PULSE_OPS; - use cubeb; -+use pulse::{self, ProplistExt}; - use pulse_ffi::*; - use semver; - use std::default::Default; --use std::ffi::CStr; -+use std::ffi::{CStr, CString}; - use std::mem; --use std::os::raw::{c_char, c_int, c_void}; -+use std::os::raw::{c_char, c_void}; - use std::ptr; - --macro_rules! dup_str { -- ($Dst: expr, $Src: expr) => { -- if !$Dst.is_null() { -- pa_xfree($Dst as *mut _); -- } -- -- $Dst = pa_xstrdup($Src); -- } --} -- --fn pa_channel_to_cubeb_channel(channel: pa_channel_position_t) -> cubeb::Channel { -- assert_ne!(channel, PA_CHANNEL_POSITION_INVALID); -+fn pa_channel_to_cubeb_channel(channel: pulse::ChannelPosition) -> cubeb::Channel { -+ use pulse::ChannelPosition; -+ assert_ne!(channel, ChannelPosition::Invalid); - match channel { -- PA_CHANNEL_POSITION_MONO => cubeb::CHANNEL_MONO, -- PA_CHANNEL_POSITION_FRONT_LEFT => cubeb::CHANNEL_LEFT, -- PA_CHANNEL_POSITION_FRONT_RIGHT => cubeb::CHANNEL_RIGHT, -- PA_CHANNEL_POSITION_FRONT_CENTER => cubeb::CHANNEL_CENTER, -- PA_CHANNEL_POSITION_SIDE_LEFT => cubeb::CHANNEL_LS, -- PA_CHANNEL_POSITION_SIDE_RIGHT => cubeb::CHANNEL_RS, -- PA_CHANNEL_POSITION_REAR_LEFT => cubeb::CHANNEL_RLS, -- PA_CHANNEL_POSITION_REAR_CENTER => cubeb::CHANNEL_RCENTER, -- PA_CHANNEL_POSITION_REAR_RIGHT => cubeb::CHANNEL_RRS, -- PA_CHANNEL_POSITION_LFE => cubeb::CHANNEL_LFE, -+ ChannelPosition::Mono => cubeb::CHANNEL_MONO, -+ ChannelPosition::FrontLeft => cubeb::CHANNEL_LEFT, -+ ChannelPosition::FrontRight => cubeb::CHANNEL_RIGHT, -+ ChannelPosition::FrontCenter => cubeb::CHANNEL_CENTER, -+ ChannelPosition::SideLeft => cubeb::CHANNEL_LS, -+ ChannelPosition::SideRight => cubeb::CHANNEL_RS, -+ ChannelPosition::RearLeft => cubeb::CHANNEL_RLS, -+ ChannelPosition::RearCenter => cubeb::CHANNEL_RCENTER, -+ ChannelPosition::RearRight => cubeb::CHANNEL_RRS, -+ ChannelPosition::LowFreqEffects => cubeb::CHANNEL_LFE, - _ => cubeb::CHANNEL_INVALID, - } - } - --fn channel_map_to_layout(cm: &pa_channel_map) -> cubeb::ChannelLayout { -+fn channel_map_to_layout(cm: &pulse::ChannelMap) -> cubeb::ChannelLayout { -+ use pulse::ChannelPosition; - let mut cubeb_map: cubeb::ChannelMap = Default::default(); - cubeb_map.channels = cm.channels as u32; - for i in 0usize..cm.channels as usize { -- cubeb_map.map[i] = pa_channel_to_cubeb_channel(cm.map[i]); -+ cubeb_map.map[i] = pa_channel_to_cubeb_channel(ChannelPosition::try_from(cm.map[i]) -+ .unwrap_or(ChannelPosition::Invalid)); - } - unsafe { cubeb::cubeb_channel_map_to_layout(&cubeb_map) } - } - - #[derive(Debug)] - pub struct DefaultInfo { -- pub sample_spec: pa_sample_spec, -- pub channel_map: pa_channel_map, -- pub flags: pa_sink_flags_t, -+ pub sample_spec: pulse::SampleSpec, -+ pub channel_map: pulse::ChannelMap, -+ pub flags: pulse::SinkFlags, - } - - #[derive(Debug)] - pub struct Context { - pub ops: *const cubeb::Ops, -- pub mainloop: *mut pa_threaded_mainloop, -- pub context: *mut pa_context, -+ pub mainloop: pulse::ThreadedMainloop, -+ pub context: Option, - pub default_sink_info: Option, -- pub context_name: *const c_char, -+ pub context_name: Option, - pub collection_changed_callback: cubeb::DeviceCollectionChangedCallback, - pub collection_changed_user_ptr: *mut c_void, - pub error: bool, -@@ -82,7 +75,7 @@ impl Drop for Context { - - impl Context { - #[cfg(feature = "pulse-dlopen")] -- fn _new(name: *const i8) -> Result> { -+ fn _new(name: Option) -> Result> { - let libpulse = unsafe { open() }; - if libpulse.is_none() { - return Err(cubeb::ERROR); -@@ -91,12 +84,12 @@ impl Context { - let ctx = Box::new(Context { - ops: &PULSE_OPS, - libpulse: libpulse.unwrap(), -- mainloop: unsafe { pa_threaded_mainloop_new() }, -- context: 0 as *mut _, -+ mainloop: pulse::ThreadedMainloop::new(), -+ context: None, - default_sink_info: None, - context_name: name, - collection_changed_callback: None, -- collection_changed_user_ptr: 0 as *mut _, -+ collection_changed_user_ptr: ptr::null_mut(), - error: true, - version_0_9_8: false, - version_2_0_0: false, -@@ -106,15 +99,15 @@ impl Context { - } - - #[cfg(not(feature = "pulse-dlopen"))] -- fn _new(name: *const i8) -> Result> { -+ fn _new(name: Option) -> Result> { - Ok(Box::new(Context { - ops: &PULSE_OPS, -- mainloop: unsafe { pa_threaded_mainloop_new() }, -- context: 0 as *mut _, -+ mainloop: pulse::ThreadedMainloop::new(), -+ context: None, - default_sink_info: None, - context_name: name, - collection_changed_callback: None, -- collection_changed_user_ptr: 0 as *mut _, -+ collection_changed_user_ptr: ptr::null_mut(), - error: true, - version_0_9_8: false, - version_2_0_0: false, -@@ -122,53 +115,66 @@ impl Context { - } - - pub fn new(name: *const c_char) -> Result> { -+ fn server_info_cb(context: &pulse::Context, info: &pulse::ServerInfo, u: *mut c_void) { -+ fn sink_info_cb(_: &pulse::Context, i: *const pulse::SinkInfo, eol: i32, u: *mut c_void) { -+ let mut ctx = unsafe { &mut *(u as *mut Context) }; -+ if eol == 0 { -+ let info = unsafe { &*i }; -+ let flags = pulse::SinkFlags::try_from(info.flags).expect("SinkInfo contains invalid flags"); -+ ctx.default_sink_info = Some(DefaultInfo { -+ sample_spec: info.sample_spec, -+ channel_map: info.channel_map, -+ flags: flags, -+ }); -+ } -+ ctx.mainloop.signal(); -+ } -+ -+ let _ = context.get_sink_info_by_name(unsafe { CStr::from_ptr(info.default_sink_name) }, -+ sink_info_cb, -+ u); -+ } -+ -+ let name = super::try_cstr_from(name).map(|s| s.to_owned()); - let mut ctx = try!(Context::_new(name)); - -- unsafe { pa_threaded_mainloop_start(ctx.mainloop) }; -+ if ctx.mainloop.start().is_err() { -+ ctx.destroy(); -+ return Err(cubeb::ERROR); -+ } - -- if ctx.pulse_context_init() != cubeb::OK { -+ if ctx.context_init() != cubeb::OK { - ctx.destroy(); - return Err(cubeb::ERROR); - } - -- unsafe { -- /* server_info_callback performs a second async query, -- * which is responsible for initializing default_sink_info -- * and signalling the mainloop to end the wait. */ -- pa_threaded_mainloop_lock(ctx.mainloop); -- let o = pa_context_get_server_info(ctx.context, -- Some(server_info_callback), -- ctx.as_mut() as *mut Context as *mut _); -- if !o.is_null() { -- ctx.operation_wait(ptr::null_mut(), o); -- pa_operation_unref(o); -+ ctx.mainloop.lock(); -+ /* server_info_callback performs a second async query, -+ * which is responsible for initializing default_sink_info -+ * and signalling the mainloop to end the wait. */ -+ let user_data: *mut c_void = ctx.as_mut() as *mut _ as *mut _; -+ if let Some(ref context) = ctx.context { -+ if let Ok(o) = context.get_server_info(server_info_cb, user_data) { -+ ctx.operation_wait(None, &o); - } -- pa_threaded_mainloop_unlock(ctx.mainloop); -- assert!(ctx.default_sink_info.is_some()); - } -+ assert!(ctx.default_sink_info.is_some()); -+ ctx.mainloop.unlock(); - - // Return the result. - Ok(ctx) - } - - pub fn destroy(&mut self) { -- if !self.context.is_null() { -- unsafe { self.pulse_context_destroy() }; -- } -- assert!(self.context.is_null()); -+ self.context_destroy(); - - if !self.mainloop.is_null() { -- unsafe { -- pa_threaded_mainloop_stop(self.mainloop); -- pa_threaded_mainloop_free(self.mainloop); -- self.mainloop = ptr::null_mut(); -- } -+ self.mainloop.stop(); - } -- assert!(self.mainloop.is_null()); - } - - pub fn new_stream(&mut self, -- stream_name: *const c_char, -+ stream_name: &CStr, - input_device: cubeb::DeviceId, - input_stream_params: Option, - output_device: cubeb::DeviceId, -@@ -178,7 +184,7 @@ impl Context { - state_callback: cubeb::StateCallback, - user_ptr: *mut c_void) - -> Result> { -- if self.error && self.pulse_context_init() != 0 { -+ if self.error && self.context_init() != 0 { - return Err(cubeb::ERROR); - } - -@@ -221,41 +227,151 @@ impl Context { - } - - pub fn enumerate_devices(&self, devtype: cubeb::DeviceType) -> Result { -- let mut user_data: PulseDevListData = Default::default(); -- user_data.context = self as *const _ as *mut _; -+ fn add_output_device(_: &pulse::Context, i: *const pulse::SinkInfo, eol: i32, user_data: *mut c_void) { -+ if eol != 0 { -+ return; -+ } - -- unsafe { -- pa_threaded_mainloop_lock(self.mainloop); -+ debug_assert!(!i.is_null()); -+ debug_assert!(!user_data.is_null()); -+ -+ let mut list_data = unsafe { &mut *(user_data as *mut PulseDevListData) }; -+ let info = unsafe { &*i }; -+ -+ let group_id = match info.proplist().gets("sysfs.path") { -+ Some(p) => p.to_owned().into_raw(), -+ _ => ptr::null_mut(), -+ }; -+ -+ let vendor_name = match info.proplist().gets("device.vendor.name") { -+ Some(p) => p.to_owned().into_raw(), -+ _ => ptr::null_mut(), -+ }; -+ -+ let info_name = unsafe { CStr::from_ptr(info.name) }.to_owned(); -+ let info_description = unsafe { CStr::from_ptr(info.description) }.to_owned(); -+ -+ let preferred = if info_name == list_data.default_sink_name { -+ cubeb::DEVICE_PREF_ALL -+ } else { -+ cubeb::DevicePref::empty() -+ }; -+ -+ let ctx = &(*list_data.context); -+ -+ let device_id = info_name.into_raw(); -+ let friendly_name = info_description.into_raw(); -+ let devinfo = cubeb::DeviceInfo { -+ device_id: device_id, -+ devid: device_id as cubeb::DeviceId, -+ friendly_name: friendly_name, -+ group_id: group_id, -+ vendor_name: vendor_name, -+ devtype: cubeb::DEVICE_TYPE_OUTPUT, -+ state: ctx.state_from_port(info.active_port), -+ preferred: preferred, -+ format: cubeb::DeviceFmt::all(), -+ default_format: pulse_format_to_cubeb_format(info.sample_spec.format), -+ max_channels: info.channel_map.channels as u32, -+ min_rate: 1, -+ max_rate: PA_RATE_MAX, -+ default_rate: info.sample_spec.rate, -+ latency_lo: 0, -+ latency_hi: 0, -+ }; -+ list_data.devinfo.push(devinfo); -+ -+ ctx.mainloop.signal(); -+ } -+ -+ fn add_input_device(_: &pulse::Context, i: *const pulse::SourceInfo, eol: i32, user_data: *mut c_void) { -+ if eol != 0 { -+ return; -+ } -+ -+ debug_assert!(!user_data.is_null()); -+ debug_assert!(!i.is_null()); -+ -+ let mut list_data = unsafe { &mut *(user_data as *mut PulseDevListData) }; -+ let info = unsafe { &*i }; -+ -+ let group_id = match info.proplist().gets("sysfs.path") { -+ Some(p) => p.to_owned().into_raw(), -+ _ => ptr::null_mut(), -+ }; -+ -+ let vendor_name = match info.proplist().gets("device.vendor.name") { -+ Some(p) => p.to_owned().into_raw(), -+ _ => ptr::null_mut(), -+ }; - -- let o = pa_context_get_server_info(self.context, -- Some(pulse_server_info_cb), -- &mut user_data as *mut _ as *mut _); -- if !o.is_null() { -- self.operation_wait(ptr::null_mut(), o); -- pa_operation_unref(o); -+ let info_name = unsafe { CStr::from_ptr(info.name) }.to_owned(); -+ let info_description = unsafe { CStr::from_ptr(info.description) }.to_owned(); -+ -+ let preferred = if info_name == list_data.default_source_name { -+ cubeb::DEVICE_PREF_ALL -+ } else { -+ cubeb::DevicePref::empty() -+ }; -+ -+ let ctx = &(*list_data.context); -+ let device_id = info_name.into_raw(); -+ let friendly_name = info_description.into_raw(); -+ let devinfo = cubeb::DeviceInfo { -+ device_id: device_id, -+ devid: device_id as cubeb::DeviceId, -+ friendly_name: friendly_name, -+ group_id: group_id, -+ vendor_name: vendor_name, -+ devtype: cubeb::DEVICE_TYPE_INPUT, -+ state: ctx.state_from_port(info.active_port), -+ preferred: preferred, -+ format: cubeb::DeviceFmt::all(), -+ default_format: pulse_format_to_cubeb_format(info.sample_spec.format), -+ max_channels: info.channel_map.channels as u32, -+ min_rate: 1, -+ max_rate: PA_RATE_MAX, -+ default_rate: info.sample_spec.rate, -+ latency_lo: 0, -+ latency_hi: 0, -+ }; -+ -+ list_data.devinfo.push(devinfo); -+ -+ ctx.mainloop.signal(); -+ } -+ -+ fn default_device_names(_: &pulse::Context, info: &pulse::ServerInfo, user_data: *mut c_void) { -+ let list_data = unsafe { &mut *(user_data as *mut PulseDevListData) }; -+ -+ list_data.default_sink_name = unsafe { CStr::from_ptr(info.default_sink_name) }.to_owned(); -+ list_data.default_source_name = unsafe { CStr::from_ptr(info.default_source_name) }.to_owned(); -+ -+ (*list_data.context).mainloop.signal(); -+ } -+ -+ let mut user_data = PulseDevListData::new(self); -+ -+ if let Some(ref context) = self.context { -+ self.mainloop.lock(); -+ -+ if let Ok(o) = context.get_server_info(default_device_names, &mut user_data as *mut _ as *mut _) { -+ self.operation_wait(None, &o); - } - - if devtype == cubeb::DEVICE_TYPE_OUTPUT { -- let o = pa_context_get_sink_info_list(self.context, -- Some(pulse_sink_info_cb), -- &mut user_data as *mut _ as *mut _); -- if !o.is_null() { -- self.operation_wait(ptr::null_mut(), o); -- pa_operation_unref(o); -+ if let Ok(o) = context.get_sink_info_list(add_output_device, &mut user_data as *mut _ as *mut _) { -+ self.operation_wait(None, &o); - } - } - - if devtype == cubeb::DEVICE_TYPE_INPUT { -- let o = pa_context_get_source_info_list(self.context, -- Some(pulse_source_info_cb), -- &mut user_data as *mut _ as *mut _); -- if !o.is_null() { -- self.operation_wait(ptr::null_mut(), o); -- pa_operation_unref(o); -+ if let Ok(o) = context.get_source_info_list(add_input_device, &mut user_data as *mut _ as *mut _) { -+ self.operation_wait(None, &o); - } - } - -- pa_threaded_mainloop_unlock(self.mainloop); -+ self.mainloop.unlock(); - } - - // Extract the array of cubeb_device_info from -@@ -282,16 +398,16 @@ impl Context { - coll.count); - for dev in devices.iter_mut() { - if !dev.device_id.is_null() { -- pa_xfree(dev.device_id as *mut _); -+ let _ = CString::from_raw(dev.device_id as *mut _); - } - if !dev.group_id.is_null() { -- pa_xfree(dev.group_id as *mut _); -+ let _ = CString::from_raw(dev.group_id as *mut _); - } - if !dev.vendor_name.is_null() { -- pa_xfree(dev.vendor_name as *mut _); -+ let _ = CString::from_raw(dev.vendor_name as *mut _); - } - if !dev.friendly_name.is_null() { -- pa_xfree(dev.friendly_name as *mut _); -+ let _ = CString::from_raw(dev.friendly_name as *mut _); - } - } - } -@@ -302,115 +418,125 @@ impl Context { - cb: cubeb::DeviceCollectionChangedCallback, - user_ptr: *mut c_void) - -> i32 { -- unsafe extern "C" fn subscribe_success(_: *mut pa_context, success: i32, user_data: *mut c_void) { -- let ctx = &*(user_data as *mut Context); -+ fn update_collection(_: &pulse::Context, event: pulse::SubscriptionEvent, index: u32, user_data: *mut c_void) { -+ let mut ctx = unsafe { &mut *(user_data as *mut Context) }; -+ -+ let (f, t) = (event.event_facility(), event.event_type()); -+ match f { -+ pulse::SubscriptionEventFacility::Source | -+ pulse::SubscriptionEventFacility::Sink => { -+ match t { -+ pulse::SubscriptionEventType::Remove | -+ pulse::SubscriptionEventType::New => { -+ if cubeb::log_enabled() { -+ let op = if t == pulse::SubscriptionEventType::New { -+ "Adding" -+ } else { -+ "Removing" -+ }; -+ let dev = if f == pulse::SubscriptionEventFacility::Sink { -+ "sink" -+ } else { -+ "source " -+ }; -+ log!("{} {} index {}", op, dev, index); -+ -+ unsafe { -+ ctx.collection_changed_callback.unwrap()(ctx as *mut _ as *mut _, -+ ctx.collection_changed_user_ptr); -+ } -+ } -+ }, -+ _ => {}, -+ } -+ }, -+ _ => {}, -+ } -+ } -+ -+ fn success(_: &pulse::Context, success: i32, user_data: *mut c_void) { -+ let ctx = unsafe { &*(user_data as *mut Context) }; - debug_assert_ne!(success, 0); -- pa_threaded_mainloop_signal(ctx.mainloop, 0); -+ ctx.mainloop.signal(); - } - - self.collection_changed_callback = cb; - self.collection_changed_user_ptr = user_ptr; - -- unsafe { -- pa_threaded_mainloop_lock(self.mainloop); -+ let user_data: *mut c_void = self as *mut _ as *mut _; -+ if let Some(ref context) = self.context { -+ self.mainloop.lock(); - -- let mut mask: pa_subscription_mask_t = PA_SUBSCRIPTION_MASK_NULL; -+ let mut mask = pulse::SubscriptionMask::empty(); - if self.collection_changed_callback.is_none() { - // Unregister subscription -- pa_context_set_subscribe_callback(self.context, None, ptr::null_mut()); -+ context.clear_subscribe_callback(); - } else { -- pa_context_set_subscribe_callback(self.context, -- Some(pulse_subscribe_callback), -- self as *mut _ as *mut _); -- if devtype == cubeb::DEVICE_TYPE_INPUT { -- mask |= PA_SUBSCRIPTION_MASK_SOURCE -+ context.set_subscribe_callback(update_collection, user_data); -+ if devtype.contains(cubeb::DEVICE_TYPE_INPUT) { -+ mask |= pulse::SUBSCRIPTION_MASK_SOURCE - }; -- if devtype == cubeb::DEVICE_TYPE_OUTPUT { -- mask |= PA_SUBSCRIPTION_MASK_SOURCE -+ if devtype.contains(cubeb::DEVICE_TYPE_OUTPUT) { -+ mask = pulse::SUBSCRIPTION_MASK_SINK - }; - } - -- let o = pa_context_subscribe(self.context, -- mask, -- Some(subscribe_success), -- self as *const _ as *mut _); -- if o.is_null() { -+ if let Ok(o) = context.subscribe(mask, success, self as *const _ as *mut _) { -+ self.operation_wait(None, &o); -+ } else { - log!("Context subscribe failed"); - return cubeb::ERROR; - } -- self.operation_wait(ptr::null_mut(), o); -- pa_operation_unref(o); - -- pa_threaded_mainloop_unlock(self.mainloop); -+ self.mainloop.unlock(); - } - - cubeb::OK - } - -- // -- -- pub fn pulse_stream_cork(&self, stream: *mut pa_stream, state: CorkState) { -- unsafe extern "C" fn cork_success(_: *mut pa_stream, _: i32, u: *mut c_void) { -- let mainloop = u as *mut pa_threaded_mainloop; -- pa_threaded_mainloop_signal(mainloop, 0); -+ pub fn context_init(&mut self) -> i32 { -+ fn error_state(c: &pulse::Context, u: *mut c_void) { -+ let mut ctx = unsafe { &mut *(u as *mut Context) }; -+ if !c.get_state().is_good() { -+ ctx.error = true; -+ } -+ ctx.mainloop.signal(); - } - -- if stream.is_null() { -- return; -+ if self.context.is_some() { -+ debug_assert!(self.error); -+ self.context_destroy(); - } - -- let o = unsafe { -- pa_stream_cork(stream, -- state.is_cork() as i32, -- Some(cork_success), -- self.mainloop as *mut _) -+ self.context = { -+ let name = match self.context_name.as_ref() { -+ Some(s) => Some(s.as_ref()), -+ None => None, -+ }; -+ pulse::Context::new(&self.mainloop.get_api(), name) - }; - -- if !o.is_null() { -- self.operation_wait(stream, o); -- unsafe { pa_operation_unref(o) }; -+ let context_ptr: *mut c_void = self as *mut _ as *mut _; -+ if self.context.is_none() { -+ return cubeb::ERROR; - } -- } - -- pub fn pulse_context_init(&mut self) -> i32 { -- unsafe extern "C" fn error_state(c: *mut pa_context, u: *mut c_void) { -- let mut ctx = &mut *(u as *mut Context); -- if !PA_CONTEXT_IS_GOOD(pa_context_get_state(c)) { -- ctx.error = true; -- } -- pa_threaded_mainloop_signal(ctx.mainloop, 0); -+ self.mainloop.lock(); -+ if let Some(ref context) = self.context { -+ context.set_state_callback(error_state, context_ptr); -+ let _ = context.connect(None, pulse::ContextFlags::empty(), ptr::null()); - } - -- if !self.context.is_null() { -- debug_assert!(self.error); -- unsafe { self.pulse_context_destroy() }; -+ if !self.wait_until_context_ready() { -+ self.mainloop.unlock(); -+ self.context_destroy(); -+ return cubeb::ERROR; - } - -- unsafe { -- self.context = pa_context_new(pa_threaded_mainloop_get_api(self.mainloop), -- self.context_name); -- -- if self.context.is_null() { -- return cubeb::ERROR; -- } -- -- pa_context_set_state_callback(self.context, Some(error_state), self as *mut _ as *mut _); -- -- pa_threaded_mainloop_lock(self.mainloop); -- pa_context_connect(self.context, ptr::null(), 0, ptr::null()); -- -- if !self.wait_until_context_ready() { -- pa_threaded_mainloop_unlock(self.mainloop); -- self.pulse_context_destroy(); -- assert!(self.context.is_null()); -- return cubeb::ERROR; -- } -+ self.mainloop.unlock(); - -- pa_threaded_mainloop_unlock(self.mainloop); -- } -- -- let version_str = unsafe { CStr::from_ptr(pa_get_library_version()) }; -- if let Ok(version) = semver::Version::parse(version_str.to_string_lossy().as_ref()) { -+ let version_str = unsafe { CStr::from_ptr(pulse::library_version()) }; -+ if let Ok(version) = semver::Version::parse(&version_str.to_string_lossy()) { - self.version_0_9_8 = version >= semver::Version::parse("0.9.8").expect("Failed to parse version"); - self.version_2_0_0 = version >= semver::Version::parse("2.0.0").expect("Failed to parse version"); - } -@@ -420,34 +546,42 @@ impl Context { - cubeb::OK - } - -- unsafe fn pulse_context_destroy(&mut self) { -- unsafe extern "C" fn drain_complete(_c: *mut pa_context, u: *mut c_void) { -- let mainloop = u as *mut pa_threaded_mainloop; -- pa_threaded_mainloop_signal(mainloop, 0); -- } -- -- pa_threaded_mainloop_lock(self.mainloop); -- let o = pa_context_drain(self.context, Some(drain_complete), self.mainloop as *mut _); -- if !o.is_null() { -- self.operation_wait(ptr::null_mut(), o); -- pa_operation_unref(o); -- } -- pa_context_set_state_callback(self.context, None, ptr::null_mut()); -- pa_context_disconnect(self.context); -- pa_context_unref(self.context); -- self.context = ptr::null_mut(); -- pa_threaded_mainloop_unlock(self.mainloop); -+ fn context_destroy(&mut self) { -+ fn drain_complete(_: &pulse::Context, u: *mut c_void) { -+ let ctx = unsafe { &*(u as *mut Context) }; -+ ctx.mainloop.signal(); -+ } -+ -+ let context_ptr: *mut c_void = self as *mut _ as *mut _; -+ match self.context.take() { -+ Some(ctx) => { -+ self.mainloop.lock(); -+ if let Ok(o) = ctx.drain(drain_complete, context_ptr) { -+ self.operation_wait(None, &o); -+ } -+ ctx.clear_state_callback(); -+ ctx.disconnect(); -+ ctx.unref(); -+ self.mainloop.unlock(); -+ }, -+ _ => {}, -+ } - } - -- pub fn operation_wait(&self, stream: *mut pa_stream, o: *mut pa_operation) -> bool { -- unsafe { -- while pa_operation_get_state(o) == PA_OPERATION_RUNNING { -- pa_threaded_mainloop_wait(self.mainloop); -- if !PA_CONTEXT_IS_GOOD(pa_context_get_state(self.context)) { -+ pub fn operation_wait<'a, S>(&self, s: S, o: &pulse::Operation) -> bool -+ where S: Into> -+ { -+ let stream = s.into(); -+ while o.get_state() == PA_OPERATION_RUNNING { -+ self.mainloop.wait(); -+ if let Some(ref context) = self.context { -+ if !context.get_state().is_good() { - return false; - } -+ } - -- if !stream.is_null() && !PA_STREAM_IS_GOOD(pa_stream_get_state(stream)) { -+ if let Some(stm) = stream { -+ if !stm.get_state().is_good() { - return false; - } - } -@@ -457,36 +591,23 @@ impl Context { - } - - pub fn wait_until_context_ready(&self) -> bool { -- loop { -- let state = unsafe { pa_context_get_state(self.context) }; -- if !PA_CONTEXT_IS_GOOD(state) { -- return false; -- } -- if state == PA_CONTEXT_READY { -- break; -- } -- unsafe { -- pa_threaded_mainloop_wait(self.mainloop); -+ if let Some(ref context) = self.context { -+ loop { -+ let state = context.get_state(); -+ if !state.is_good() { -+ return false; -+ } -+ if state == pulse::ContextState::Ready { -+ break; -+ } -+ self.mainloop.wait(); - } - } - - true - } - -- fn state_from_sink_port(&self, i: *const pa_port_info) -> cubeb::DeviceState { -- if !i.is_null() { -- let info = unsafe { *i }; -- if self.version_2_0_0 && info.available == PA_PORT_AVAILABLE_NO { -- cubeb::DeviceState::Unplugged -- } else { -- cubeb::DeviceState::Enabled -- } -- } else { -- cubeb::DeviceState::Enabled -- } -- } -- -- fn state_from_source_port(&self, i: *mut pa_port_info) -> cubeb::DeviceState { -+ fn state_from_port(&self, i: *const pa_port_info) -> cubeb::DeviceState { - if !i.is_null() { - let info = unsafe { *i }; - if self.version_2_0_0 && info.available == PA_PORT_AVAILABLE_NO { -@@ -500,62 +621,30 @@ impl Context { - } - } - --// Callbacks --unsafe extern "C" fn server_info_callback(context: *mut pa_context, info: *const pa_server_info, u: *mut c_void) { -- unsafe extern "C" fn sink_info_callback(_context: *mut pa_context, -- info: *const pa_sink_info, -- eol: i32, -- u: *mut c_void) { -- let mut ctx = &mut *(u as *mut Context); -- if eol == 0 { -- let info = *info; -- ctx.default_sink_info = Some(DefaultInfo { -- sample_spec: info.sample_spec, -- channel_map: info.channel_map, -- flags: info.flags, -- }); -- } -- pa_threaded_mainloop_signal(ctx.mainloop, 0); -- } -- -- let o = pa_context_get_sink_info_by_name(context, -- (*info).default_sink_name, -- Some(sink_info_callback), -- u); -- if !o.is_null() { -- pa_operation_unref(o); -- } --} -- --struct PulseDevListData { -- default_sink_name: *mut c_char, -- default_source_name: *mut c_char, -+struct PulseDevListData<'a> { -+ default_sink_name: CString, -+ default_source_name: CString, - devinfo: Vec, -- context: *mut Context, -+ context: &'a Context, - } - --impl Drop for PulseDevListData { -- fn drop(&mut self) { -- if !self.default_sink_name.is_null() { -- unsafe { -- pa_xfree(self.default_sink_name as *mut _); -- } -- } -- if !self.default_source_name.is_null() { -- unsafe { -- pa_xfree(self.default_source_name as *mut _); -- } -+impl<'a> PulseDevListData<'a> { -+ pub fn new<'b>(context: &'b Context) -> Self -+ where 'b: 'a -+ { -+ PulseDevListData { -+ default_sink_name: CString::default(), -+ default_source_name: CString::default(), -+ devinfo: Vec::new(), -+ context: context, - } - } - } - --impl Default for PulseDevListData { -- fn default() -> Self { -- PulseDevListData { -- default_sink_name: ptr::null_mut(), -- default_source_name: ptr::null_mut(), -- devinfo: Vec::new(), -- context: ptr::null_mut(), -+impl<'a> Drop for PulseDevListData<'a> { -+ fn drop(&mut self) { -+ for elem in &mut self.devinfo { -+ let _ = unsafe { Box::from_raw(elem) }; - } - } - } -@@ -566,192 +655,7 @@ fn pulse_format_to_cubeb_format(format: - PA_SAMPLE_S16BE => cubeb::DEVICE_FMT_S16BE, - PA_SAMPLE_FLOAT32LE => cubeb::DEVICE_FMT_F32LE, - PA_SAMPLE_FLOAT32BE => cubeb::DEVICE_FMT_F32BE, -- _ => { -- panic!("Invalid format"); -- }, -+ // Unsupported format, return F32NE -+ _ => cubeb::CUBEB_FMT_F32NE, - } - } -- --unsafe extern "C" fn pulse_sink_info_cb(_context: *mut pa_context, -- i: *const pa_sink_info, -- eol: i32, -- user_data: *mut c_void) { -- if eol != 0 || i.is_null() { -- return; -- } -- -- debug_assert!(!user_data.is_null()); -- -- let info = *i; -- let mut list_data = &mut *(user_data as *mut PulseDevListData); -- -- let device_id = pa_xstrdup(info.name); -- -- let group_id = { -- let prop = pa_proplist_gets(info.proplist, b"sysfs.path\0".as_ptr() as *const c_char); -- if !prop.is_null() { -- pa_xstrdup(prop) -- } else { -- ptr::null_mut() -- } -- }; -- -- let vendor_name = { -- let prop = pa_proplist_gets(info.proplist, -- b"device.vendor.name\0".as_ptr() as *const c_char); -- if !prop.is_null() { -- pa_xstrdup(prop) -- } else { -- ptr::null_mut() -- } -- }; -- -- let preferred = if strcmp(info.name, list_data.default_sink_name) == 0 { -- cubeb::DEVICE_PREF_ALL -- } else { -- cubeb::DevicePref::empty() -- }; -- -- let ctx = &(*list_data.context); -- -- let devinfo = cubeb::DeviceInfo { -- device_id: device_id, -- devid: device_id as cubeb::DeviceId, -- friendly_name: pa_xstrdup(info.description), -- group_id: group_id, -- vendor_name: vendor_name, -- devtype: cubeb::DEVICE_TYPE_OUTPUT, -- state: ctx.state_from_sink_port(info.active_port), -- preferred: preferred, -- format: cubeb::DeviceFmt::all(), -- default_format: pulse_format_to_cubeb_format(info.sample_spec.format), -- max_channels: info.channel_map.channels as u32, -- min_rate: 1, -- max_rate: PA_RATE_MAX, -- default_rate: info.sample_spec.rate, -- latency_lo: 0, -- latency_hi: 0, -- }; -- list_data.devinfo.push(devinfo); -- -- pa_threaded_mainloop_signal(ctx.mainloop, 0); --} -- --unsafe extern "C" fn pulse_source_info_cb(_context: *mut pa_context, -- i: *const pa_source_info, -- eol: i32, -- user_data: *mut c_void) { -- if eol != 0 || i.is_null() { -- return; -- } -- -- debug_assert!(!user_data.is_null()); -- -- let info = *i; -- let mut list_data = &mut *(user_data as *mut PulseDevListData); -- -- let device_id = pa_xstrdup(info.name); -- -- let group_id = { -- let prop = pa_proplist_gets(info.proplist, b"sysfs.path\0".as_ptr() as *mut c_char); -- if !prop.is_null() { -- pa_xstrdup(prop) -- } else { -- ptr::null_mut() -- } -- }; -- -- let vendor_name = { -- let prop = pa_proplist_gets(info.proplist, -- b"device.vendor.name\0".as_ptr() as *mut c_char); -- if !prop.is_null() { -- pa_xstrdup(prop) -- } else { -- ptr::null_mut() -- } -- }; -- -- let preferred = if strcmp(info.name, list_data.default_source_name) == 0 { -- cubeb::DEVICE_PREF_ALL -- } else { -- cubeb::DevicePref::empty() -- }; -- -- let ctx = &(*list_data.context); -- -- let devinfo = cubeb::DeviceInfo { -- device_id: device_id, -- devid: device_id as cubeb::DeviceId, -- friendly_name: pa_xstrdup(info.description), -- group_id: group_id, -- vendor_name: vendor_name, -- devtype: cubeb::DEVICE_TYPE_INPUT, -- state: ctx.state_from_source_port(info.active_port), -- preferred: preferred, -- format: cubeb::DeviceFmt::all(), -- default_format: pulse_format_to_cubeb_format(info.sample_spec.format), -- max_channels: info.channel_map.channels as u32, -- min_rate: 1, -- max_rate: PA_RATE_MAX, -- default_rate: info.sample_spec.rate, -- latency_lo: 0, -- latency_hi: 0, -- }; -- -- list_data.devinfo.push(devinfo); -- -- pa_threaded_mainloop_signal(ctx.mainloop, 0); --} -- --unsafe extern "C" fn pulse_server_info_cb(_context: *mut pa_context, -- i: *const pa_server_info, -- user_data: *mut c_void) { -- assert!(!i.is_null()); -- let info = *i; -- let list_data = &mut *(user_data as *mut PulseDevListData); -- -- dup_str!(list_data.default_sink_name, info.default_sink_name); -- dup_str!(list_data.default_source_name, info.default_source_name); -- -- pa_threaded_mainloop_signal((*list_data.context).mainloop, 0); --} -- --unsafe extern "C" fn pulse_subscribe_callback(_ctx: *mut pa_context, -- t: pa_subscription_event_type_t, -- index: u32, -- user_data: *mut c_void) { -- let mut ctx = &mut *(user_data as *mut Context); -- -- match t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK { -- PA_SUBSCRIPTION_EVENT_SOURCE | -- PA_SUBSCRIPTION_EVENT_SINK => { -- -- if cubeb::log_enabled() { -- if (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SOURCE && -- (t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE { -- log!("Removing sink index %d", index); -- } else if (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SOURCE && -- (t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_NEW { -- log!("Adding sink index %d", index); -- } -- if (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SINK && -- (t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE { -- log!("Removing source index %d", index); -- } else if (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) == PA_SUBSCRIPTION_EVENT_SINK && -- (t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_NEW { -- log!("Adding source index %d", index); -- } -- } -- -- if (t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE || -- (t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_NEW { -- ctx.collection_changed_callback.unwrap()(ctx as *mut _ as *mut _, ctx.collection_changed_user_ptr); -- } -- }, -- _ => {}, -- } --} -- --extern "C" { -- pub fn strcmp(cs: *const c_char, ct: *const c_char) -> c_int; --} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/mod.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/mod.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/mod.rs.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/mod.rs 2017-08-04 13:37:46.386821731 +0200 -@@ -7,8 +7,16 @@ mod context; - mod cork_state; - mod stream; - -+use std::os::raw::c_char; -+use std::ffi::CStr; -+ - pub type Result = ::std::result::Result; - - pub use self::context::Context; - pub use self::stream::Device; - pub use self::stream::Stream; -+ -+// helper to convert *const c_char to Option -+fn try_cstr_from<'str>(s: *const c_char) -> Option<&'str CStr> { -+ if s.is_null() { None } else { Some(unsafe { CStr::from_ptr(s) }) } -+} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/stream.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/stream.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/stream.rs.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/backend/stream.rs 2017-08-04 13:37:46.387821728 +0200 -@@ -6,8 +6,10 @@ - use backend::*; - use backend::cork_state::CorkState; - use cubeb; -+use pulse::{self, CVolumeExt, ChannelMapExt, SampleSpecExt, USecExt}; - use pulse_ffi::*; --use std::os::raw::{c_char, c_long, c_void}; -+use std::ffi::{CStr, CString}; -+use std::os::raw::{c_long, c_void}; - use std::ptr; - - const PULSE_NO_GAIN: f32 = -1.0; -@@ -36,15 +38,12 @@ fn cubeb_channel_to_pa_channel(channel: - MAP[idx as usize] - } - --fn layout_to_channel_map(layout: cubeb::ChannelLayout) -> pa_channel_map { -+fn layout_to_channel_map(layout: cubeb::ChannelLayout) -> pulse::ChannelMap { - assert_ne!(layout, cubeb::LAYOUT_UNDEFINED); - - let order = cubeb::mixer::channel_index_to_order(layout); - -- let mut cm: pa_channel_map = Default::default(); -- unsafe { -- pa_channel_map_init(&mut cm); -- } -+ let mut cm = pulse::ChannelMap::init(); - cm.channels = order.len() as u8; - for (s, d) in order.iter().zip(cm.map.iter_mut()) { - *d = cubeb_channel_to_pa_channel(*s); -@@ -57,24 +56,27 @@ pub struct Device(cubeb::Device); - impl Drop for Device { - fn drop(&mut self) { - unsafe { -- pa_xfree(self.0.input_name as *mut _); -- pa_xfree(self.0.output_name as *mut _); -+ if !self.0.input_name.is_null() { -+ let _ = CString::from_raw(self.0.input_name); -+ } -+ if !self.0.output_name.is_null() { -+ let _ = CString::from_raw(self.0.output_name); -+ } - } - } - } - -- - #[derive(Debug)] - pub struct Stream<'ctx> { - context: &'ctx Context, -- output_stream: *mut pa_stream, -- input_stream: *mut pa_stream, -+ output_stream: Option, -+ input_stream: Option, - data_callback: cubeb::DataCallback, - state_callback: cubeb::StateCallback, - user_ptr: *mut c_void, - drain_timer: *mut pa_time_event, -- output_sample_spec: pa_sample_spec, -- input_sample_spec: pa_sample_spec, -+ output_sample_spec: pulse::SampleSpec, -+ input_sample_spec: pulse::SampleSpec, - shutdown: bool, - volume: f32, - state: cubeb::State, -@@ -88,7 +90,7 @@ impl<'ctx> Drop for Stream<'ctx> { - - impl<'ctx> Stream<'ctx> { - pub fn new(context: &'ctx Context, -- stream_name: *const c_char, -+ stream_name: &CStr, - input_device: cubeb::DeviceId, - input_stream_params: Option, - output_device: cubeb::DeviceId, -@@ -99,83 +101,167 @@ impl<'ctx> Stream<'ctx> { - user_ptr: *mut c_void) - -> Result>> { - -+ fn check_error(s: &pulse::Stream, u: *mut c_void) { -+ let stm = unsafe { &mut *(u as *mut Stream) }; -+ if !s.get_state().is_good() { -+ stm.state_change_callback(cubeb::STATE_ERROR); -+ } -+ stm.context.mainloop.signal(); -+ } -+ -+ fn read_data(s: &pulse::Stream, nbytes: usize, u: *mut c_void) { -+ fn read_from_input(s: &pulse::Stream, buffer: *mut *const c_void, size: *mut usize) -> i32 { -+ let readable_size: i32 = s.readable_size() -+ .and_then(|s| Ok(s as i32)) -+ .unwrap_or(-1); -+ if readable_size > 0 { -+ if unsafe { s.peek(buffer, size).is_err() } { -+ return -1; -+ } -+ } -+ readable_size -+ } -+ -+ logv!("Input callback buffer size {}", nbytes); -+ let mut stm = unsafe { &mut *(u as *mut Stream) }; -+ if stm.shutdown { -+ return; -+ } -+ -+ let mut read_data: *const c_void = ptr::null(); -+ let mut read_size: usize = 0; -+ while read_from_input(s, &mut read_data, &mut read_size) > 0 { -+ /* read_data can be NULL in case of a hole. */ -+ if !read_data.is_null() { -+ let in_frame_size = stm.input_sample_spec.frame_size(); -+ let read_frames = read_size / in_frame_size; -+ -+ if stm.output_stream.is_some() { -+ // input/capture + output/playback operation -+ let out_frame_size = stm.output_sample_spec.frame_size(); -+ let write_size = read_frames * out_frame_size; -+ // Offer full duplex data for writing -+ stm.trigger_user_callback(read_data, write_size); -+ } else { -+ // input/capture only operation. Call callback directly -+ let got = unsafe { -+ stm.data_callback.unwrap()(stm as *mut _ as *mut _, -+ stm.user_ptr, -+ read_data, -+ ptr::null_mut(), -+ read_frames as c_long) -+ }; -+ -+ if got < 0 || got as usize != read_frames { -+ let _ = s.cancel_write(); -+ stm.shutdown = true; -+ break; -+ } -+ } -+ } -+ -+ if read_size > 0 { -+ let _ = s.drop(); -+ } -+ -+ if stm.shutdown { -+ return; -+ } -+ } -+ } -+ -+ fn write_data(_: &pulse::Stream, nbytes: usize, u: *mut c_void) { -+ logv!("Output callback to be written buffer size {}", nbytes); -+ let mut stm = unsafe { &mut *(u as *mut Stream) }; -+ if stm.shutdown || stm.state != cubeb::STATE_STARTED { -+ return; -+ } -+ -+ if stm.input_stream.is_none() { -+ // Output/playback only operation. -+ // Write directly to output -+ debug_assert!(stm.output_stream.is_some()); -+ stm.trigger_user_callback(ptr::null(), nbytes); -+ } -+ } -+ - let mut stm = Box::new(Stream { - context: context, -- output_stream: ptr::null_mut(), -- input_stream: ptr::null_mut(), -+ output_stream: None, -+ input_stream: None, - data_callback: data_callback, - state_callback: state_callback, - user_ptr: user_ptr, - drain_timer: ptr::null_mut(), -- output_sample_spec: pa_sample_spec::default(), -- input_sample_spec: pa_sample_spec::default(), -+ output_sample_spec: pulse::SampleSpec::default(), -+ input_sample_spec: pulse::SampleSpec::default(), - shutdown: false, - volume: PULSE_NO_GAIN, - state: cubeb::STATE_ERROR, - }); - -- unsafe { -- pa_threaded_mainloop_lock(stm.context.mainloop); -+ if let Some(ref context) = stm.context.context { -+ stm.context.mainloop.lock(); -+ -+ // Setup output stream - if let Some(ref stream_params) = output_stream_params { -- match stm.pulse_stream_init(stream_params, stream_name) { -- Ok(s) => stm.output_stream = s, -+ match Stream::stream_init(context, stream_params, stream_name) { -+ Ok(s) => { -+ stm.output_sample_spec = *s.get_sample_spec(); -+ -+ s.set_state_callback(check_error, stm.as_mut() as *mut _ as *mut _); -+ s.set_write_callback(write_data, stm.as_mut() as *mut _ as *mut _); -+ -+ let battr = set_buffering_attribute(latency_frames, &stm.output_sample_spec); -+ let device_name = super::try_cstr_from(output_device as *const _); -+ let _ = s.connect_playback(device_name, -+ &battr, -+ pulse::STREAM_AUTO_TIMING_UPDATE | pulse::STREAM_INTERPOLATE_TIMING | -+ pulse::STREAM_START_CORKED | -+ pulse::STREAM_ADJUST_LATENCY, -+ None, -+ None); -+ -+ stm.output_stream = Some(s); -+ }, - Err(e) => { -- pa_threaded_mainloop_unlock(stm.context.mainloop); -+ stm.context.mainloop.unlock(); - stm.destroy(); - return Err(e); - }, - } - -- stm.output_sample_spec = *pa_stream_get_sample_spec(stm.output_stream); -- -- pa_stream_set_state_callback(stm.output_stream, -- Some(stream_state_callback), -- stm.as_mut() as *mut _ as *mut _); -- pa_stream_set_write_callback(stm.output_stream, -- Some(stream_write_callback), -- stm.as_mut() as *mut _ as *mut _); -- -- let battr = set_buffering_attribute(latency_frames, &stm.output_sample_spec); -- pa_stream_connect_playback(stm.output_stream, -- output_device as *mut c_char, -- &battr, -- PA_STREAM_AUTO_TIMING_UPDATE | PA_STREAM_INTERPOLATE_TIMING | -- PA_STREAM_START_CORKED | -- PA_STREAM_ADJUST_LATENCY, -- ptr::null(), -- ptr::null_mut()); - } - - // Set up input stream - if let Some(ref stream_params) = input_stream_params { -- match stm.pulse_stream_init(stream_params, stream_name) { -- Ok(s) => stm.input_stream = s, -+ match Stream::stream_init(context, stream_params, stream_name) { -+ Ok(s) => { -+ stm.input_sample_spec = *s.get_sample_spec(); -+ -+ s.set_state_callback(check_error, stm.as_mut() as *mut _ as *mut _); -+ s.set_read_callback(read_data, stm.as_mut() as *mut _ as *mut _); -+ -+ let battr = set_buffering_attribute(latency_frames, &stm.input_sample_spec); -+ let device_name = super::try_cstr_from(input_device as *const _); -+ let _ = s.connect_record(device_name, -+ &battr, -+ pulse::STREAM_AUTO_TIMING_UPDATE | pulse::STREAM_INTERPOLATE_TIMING | -+ pulse::STREAM_START_CORKED | -+ pulse::STREAM_ADJUST_LATENCY); -+ -+ stm.input_stream = Some(s); -+ }, - Err(e) => { -- pa_threaded_mainloop_unlock(stm.context.mainloop); -+ stm.context.mainloop.unlock(); - stm.destroy(); - return Err(e); - }, - } - -- stm.input_sample_spec = *(pa_stream_get_sample_spec(stm.input_stream)); -- -- pa_stream_set_state_callback(stm.input_stream, -- Some(stream_state_callback), -- stm.as_mut() as *mut _ as *mut _); -- pa_stream_set_read_callback(stm.input_stream, -- Some(stream_read_callback), -- stm.as_mut() as *mut _ as *mut _); -- -- let battr = set_buffering_attribute(latency_frames, &stm.input_sample_spec); -- pa_stream_connect_record(stm.input_stream, -- input_device as *mut c_char, -- &battr, -- PA_STREAM_AUTO_TIMING_UPDATE | PA_STREAM_INTERPOLATE_TIMING | -- PA_STREAM_START_CORKED | -- PA_STREAM_ADJUST_LATENCY); - } - -- let r = if stm.wait_until_stream_ready() { -+ let r = if stm.wait_until_ready() { - /* force a timing update now, otherwise timing info does not become valid - until some point after initialization has completed. */ - stm.update_timing_info() -@@ -183,7 +269,7 @@ impl<'ctx> Stream<'ctx> { - false - }; - -- pa_threaded_mainloop_unlock(stm.context.mainloop); -+ stm.context.mainloop.unlock(); - - if !r { - stm.destroy(); -@@ -191,10 +277,10 @@ impl<'ctx> Stream<'ctx> { - } - - if cubeb::log_enabled() { -- if output_stream_params.is_some() { -- let output_att = *pa_stream_get_buffer_attr(stm.output_stream); -- log!("Output buffer attributes maxlength %u, tlength %u, \ -- prebuf %u, minreq %u, fragsize %u", -+ if let Some(ref output_stream) = stm.output_stream { -+ let output_att = output_stream.get_buffer_attr(); -+ log!("Output buffer attributes maxlength {}, tlength {}, \ -+ prebuf {}, minreq {}, fragsize {}", - output_att.maxlength, - output_att.tlength, - output_att.prebuf, -@@ -202,10 +288,10 @@ impl<'ctx> Stream<'ctx> { - output_att.fragsize); - } - -- if input_stream_params.is_some() { -- let input_att = *pa_stream_get_buffer_attr(stm.input_stream); -- log!("Input buffer attributes maxlength %u, tlength %u, \ -- prebuf %u, minreq %u, fragsize %u", -+ if let Some(ref input_stream) = stm.input_stream { -+ let input_att = input_stream.get_buffer_attr(); -+ log!("Input buffer attributes maxlength {}, tlength {}, \ -+ prebuf {}, minreq {}, fragsize {}", - input_att.maxlength, - input_att.tlength, - input_att.prebuf, -@@ -219,224 +305,250 @@ impl<'ctx> Stream<'ctx> { - } - - fn destroy(&mut self) { -- self.stream_cork(CorkState::cork()); -+ self.cork(CorkState::cork()); - -- unsafe { -- pa_threaded_mainloop_lock(self.context.mainloop); -- if !self.output_stream.is_null() { -- if !self.drain_timer.is_null() { -- /* there's no pa_rttime_free, so use this instead. */ -- let ma = pa_threaded_mainloop_get_api(self.context.mainloop); -- if !ma.is_null() { -- (*ma).time_free.unwrap()(self.drain_timer); -+ self.context.mainloop.lock(); -+ { -+ match self.output_stream.take() { -+ Some(stm) => { -+ if !self.drain_timer.is_null() { -+ /* there's no pa_rttime_free, so use this instead. */ -+ self.context -+ .mainloop -+ .get_api() -+ .time_free(self.drain_timer); - } -- } -- -- pa_stream_set_state_callback(self.output_stream, None, ptr::null_mut()); -- pa_stream_set_write_callback(self.output_stream, None, ptr::null_mut()); -- pa_stream_disconnect(self.output_stream); -- pa_stream_unref(self.output_stream); -+ stm.clear_state_callback(); -+ stm.clear_write_callback(); -+ let _ = stm.disconnect(); -+ stm.unref(); -+ }, -+ _ => {}, -+ } -+ -+ match self.input_stream.take() { -+ Some(stm) => { -+ stm.clear_state_callback(); -+ stm.clear_read_callback(); -+ let _ = stm.disconnect(); -+ stm.unref(); -+ }, -+ _ => {}, - } -- -- if !self.input_stream.is_null() { -- pa_stream_set_state_callback(self.input_stream, None, ptr::null_mut()); -- pa_stream_set_read_callback(self.input_stream, None, ptr::null_mut()); -- pa_stream_disconnect(self.input_stream); -- pa_stream_unref(self.input_stream); -- } -- pa_threaded_mainloop_unlock(self.context.mainloop); - } -+ self.context.mainloop.unlock(); - } - - pub fn start(&mut self) -> i32 { -+ fn output_preroll(_: &pulse::MainloopApi, u: *mut c_void) { -+ let mut stm = unsafe { &mut *(u as *mut Stream) }; -+ if !stm.shutdown { -+ let size = stm.output_stream -+ .as_ref() -+ .map_or(0, |s| s.writable_size().unwrap_or(0)); -+ stm.trigger_user_callback(ptr::null_mut(), size); -+ } -+ } -+ - self.shutdown = false; -- self.stream_cork(CorkState::uncork() | CorkState::notify()); -+ self.cork(CorkState::uncork() | CorkState::notify()); - -- if !self.output_stream.is_null() && self.input_stream.is_null() { -- unsafe { -- /* On output only case need to manually call user cb once in order to make -- * things roll. This is done via a defer event in order to execute it -- * from PA server thread. */ -- pa_threaded_mainloop_lock(self.context.mainloop); -- pa_mainloop_api_once(pa_threaded_mainloop_get_api(self.context.mainloop), -- Some(pulse_defer_event_cb), -- self as *mut _ as *mut _); -- pa_threaded_mainloop_unlock(self.context.mainloop); -- } -+ if self.output_stream.is_some() && self.input_stream.is_none() { -+ /* On output only case need to manually call user cb once in order to make -+ * things roll. This is done via a defer event in order to execute it -+ * from PA server thread. */ -+ self.context.mainloop.lock(); -+ self.context -+ .mainloop -+ .get_api() -+ .once(output_preroll, self as *mut _ as *mut _); -+ self.context.mainloop.unlock(); - } - - cubeb::OK - } - - pub fn stop(&mut self) -> i32 { -- unsafe { -- pa_threaded_mainloop_lock(self.context.mainloop); -+ { -+ self.context.mainloop.lock(); - self.shutdown = true; - // If draining is taking place wait to finish - while !self.drain_timer.is_null() { -- pa_threaded_mainloop_wait(self.context.mainloop); -+ self.context.mainloop.wait(); - } -- pa_threaded_mainloop_unlock(self.context.mainloop); -+ self.context.mainloop.unlock(); - } -- self.stream_cork(CorkState::cork() | CorkState::notify()); -+ self.cork(CorkState::cork() | CorkState::notify()); - - cubeb::OK - } - - pub fn position(&self) -> Result { -- if self.output_stream.is_null() { -- return Err(cubeb::ERROR); -- } -+ let in_thread = self.context.mainloop.in_thread(); - -- let position = unsafe { -- let in_thread = pa_threaded_mainloop_in_thread(self.context.mainloop); -- -- if in_thread == 0 { -- pa_threaded_mainloop_lock(self.context.mainloop); -- } -- -- let mut r_usec: pa_usec_t = Default::default(); -- let r = pa_stream_get_time(self.output_stream, &mut r_usec); -- if in_thread == 0 { -- pa_threaded_mainloop_unlock(self.context.mainloop); -- } -- -- if r != 0 { -- return Err(cubeb::ERROR); -- } -+ if !in_thread { -+ self.context.mainloop.lock(); -+ } - -- let bytes = pa_usec_to_bytes(r_usec, &self.output_sample_spec); -- (bytes / pa_frame_size(&self.output_sample_spec)) as u64 -+ let r = match self.output_stream { -+ None => Err(cubeb::ERROR), -+ Some(ref stm) => { -+ match stm.get_time() { -+ Ok(r_usec) => { -+ let bytes = r_usec.to_bytes(&self.output_sample_spec); -+ Ok((bytes / self.output_sample_spec.frame_size()) as u64) -+ }, -+ Err(_) => Err(cubeb::ERROR), -+ } -+ }, - }; -- Ok(position) -- } - -- pub fn latency(&self) -> Result { -- if self.output_stream.is_null() { -- return Err(cubeb::ERROR); -+ if !in_thread { -+ self.context.mainloop.unlock(); - } - -- let mut r_usec: pa_usec_t = 0; -- let mut negative: i32 = 0; -- let r = unsafe { pa_stream_get_latency(self.output_stream, &mut r_usec, &mut negative) }; -+ r -+ } - -- if r != 0 { -- return Err(cubeb::ERROR); -+ pub fn latency(&self) -> Result { -+ match self.output_stream { -+ None => Err(cubeb::ERROR), -+ Some(ref stm) => { -+ match stm.get_latency() { -+ Ok((r_usec, negative)) => { -+ debug_assert!(negative); -+ let latency = (r_usec * self.output_sample_spec.rate as pa_usec_t / PA_USEC_PER_SEC) as u32; -+ Ok(latency) -+ }, -+ Err(_) => Err(cubeb::ERROR), -+ } -+ }, - } -- -- debug_assert_eq!(negative, 0); -- let latency = (r_usec * self.output_sample_spec.rate as pa_usec_t / PA_USEC_PER_SEC) as u32; -- -- Ok(latency) - } - - pub fn set_volume(&mut self, volume: f32) -> i32 { -- if self.output_stream.is_null() { -- return cubeb::ERROR; -- } -- -- unsafe { -- pa_threaded_mainloop_lock(self.context.mainloop); -- -- while self.context.default_sink_info.is_none() { -- pa_threaded_mainloop_wait(self.context.mainloop); -- } -- -- let mut cvol: pa_cvolume = Default::default(); -- -- /* if the pulse daemon is configured to use flat volumes, -- * apply our own gain instead of changing the input volume on the sink. */ -- let flags = { -- match self.context.default_sink_info { -- Some(ref info) => info.flags, -- _ => 0, -- } -- }; -- -- if (flags & PA_SINK_FLAT_VOLUME) != 0 { -- self.volume = volume; -- } else { -- let ss = pa_stream_get_sample_spec(self.output_stream); -- let vol = pa_sw_volume_from_linear(volume as f64); -- pa_cvolume_set(&mut cvol, (*ss).channels as u32, vol); -- -- let index = pa_stream_get_index(self.output_stream); -+ match self.output_stream { -+ None => cubeb::ERROR, -+ Some(ref stm) => { -+ if let Some(ref context) = self.context.context { -+ self.context.mainloop.lock(); -+ -+ let mut cvol: pa_cvolume = Default::default(); -+ -+ /* if the pulse daemon is configured to use flat -+ * volumes, apply our own gain instead of changing -+ * the input volume on the sink. */ -+ let flags = { -+ match self.context.default_sink_info { -+ Some(ref info) => info.flags, -+ _ => pulse::SinkFlags::empty(), -+ } -+ }; -+ -+ if flags.contains(pulse::SINK_FLAT_VOLUME) { -+ self.volume = volume; -+ } else { -+ let channels = stm.get_sample_spec().channels; -+ let vol = pulse::sw_volume_from_linear(volume as f64); -+ cvol.set(channels as u32, vol); -+ -+ let index = stm.get_index(); -+ -+ let context_ptr = self.context as *const _ as *mut _; -+ if let Ok(o) = context.set_sink_input_volume(index, &cvol, context_success, context_ptr) { -+ self.context.operation_wait(stm, &o); -+ } -+ } - -- let op = pa_context_set_sink_input_volume(self.context.context, -- index, -- &cvol, -- Some(volume_success), -- self as *mut _ as *mut _); -- if !op.is_null() { -- self.context.operation_wait(self.output_stream, op); -- pa_operation_unref(op); -+ self.context.mainloop.unlock(); -+ cubeb::OK -+ } else { -+ cubeb::ERROR - } -- } -- -- pa_threaded_mainloop_unlock(self.context.mainloop); -+ }, - } -- cubeb::OK - } - - pub fn set_panning(&mut self, panning: f32) -> i32 { -- if self.output_stream.is_null() { -- return cubeb::ERROR; -- } -+ #[repr(C)] -+ struct SinkInputInfoResult<'a> { -+ pub cvol: pulse::CVolume, -+ pub mainloop: &'a pulse::ThreadedMainloop, -+ } -+ -+ fn get_input_volume(_: &pulse::Context, info: *const pulse::SinkInputInfo, eol: i32, u: *mut c_void) { -+ let mut r = unsafe { &mut *(u as *mut SinkInputInfoResult) }; -+ if eol == 0 { -+ let info = unsafe { *info }; -+ r.cvol = info.volume; -+ } -+ r.mainloop.signal(); -+ } -+ -+ match self.output_stream { -+ None => cubeb::ERROR, -+ Some(ref stm) => { -+ if let Some(ref context) = self.context.context { -+ self.context.mainloop.lock(); -+ -+ let map = stm.get_channel_map(); -+ if !map.can_balance() { -+ self.context.mainloop.unlock(); -+ return cubeb::ERROR; -+ } - -- unsafe { -- pa_threaded_mainloop_lock(self.context.mainloop); -+ let index = stm.get_index(); - -- let map = pa_stream_get_channel_map(self.output_stream); -- if pa_channel_map_can_balance(map) == 0 { -- pa_threaded_mainloop_unlock(self.context.mainloop); -- return cubeb::ERROR; -- } -+ let mut r = SinkInputInfoResult { -+ cvol: pulse::CVolume::default(), -+ mainloop: &self.context.mainloop, -+ }; - -- let index = pa_stream_get_index(self.output_stream); -+ if let Ok(o) = context.get_sink_input_info(index, get_input_volume, &mut r as *mut _ as *mut _) { -+ self.context.operation_wait(stm, &o); -+ } - -- let mut cvol: pa_cvolume = Default::default(); -- let mut r = SinkInputInfoResult { -- cvol: &mut cvol, -- mainloop: self.context.mainloop, -- }; -+ r.cvol.set_balance(map, panning); - -- let op = pa_context_get_sink_input_info(self.context.context, -- index, -- Some(sink_input_info_cb), -- &mut r as *mut _ as *mut _); -- if !op.is_null() { -- self.context.operation_wait(self.output_stream, op); -- pa_operation_unref(op); -- } -- -- pa_cvolume_set_balance(&mut cvol, map, panning); -- -- let op = pa_context_set_sink_input_volume(self.context.context, -- index, -- &cvol, -- Some(volume_success), -- self as *mut _ as *mut _); -- if !op.is_null() { -- self.context.operation_wait(self.output_stream, op); -- pa_operation_unref(op); -- } -+ let context_ptr = self.context as *const _ as *mut _; -+ if let Ok(o) = context.set_sink_input_volume(index, &r.cvol, context_success, context_ptr) { -+ self.context.operation_wait(stm, &o); -+ } - -- pa_threaded_mainloop_unlock(self.context.mainloop); -- } -+ self.context.mainloop.unlock(); - -- cubeb::OK -+ cubeb::OK -+ } else { -+ cubeb::ERROR -+ } -+ }, -+ } - } - - pub fn current_device(&self) -> Result> { - if self.context.version_0_9_8 { - let mut dev = Box::new(cubeb::Device::default()); - -- if !self.input_stream.is_null() { -- dev.input_name = unsafe { pa_xstrdup(pa_stream_get_device_name(self.input_stream)) }; -+ if self.input_stream.is_some() { -+ if let Some(ref stm) = self.input_stream { -+ dev.input_name = match stm.get_device_name() { -+ Ok(name) => name.to_owned().into_raw(), -+ Err(_) => { -+ return Err(cubeb::ERROR); -+ }, -+ } -+ } - } - -- if !self.output_stream.is_null() { -- dev.output_name = unsafe { pa_xstrdup(pa_stream_get_device_name(self.output_stream)) }; -+ if !self.output_stream.is_some() { -+ if let Some(ref stm) = self.output_stream { -+ dev.output_name = match stm.get_device_name() { -+ Ok(name) => name.to_owned().into_raw(), -+ Err(_) => { -+ return Err(cubeb::ERROR); -+ }, -+ } -+ } - } - - Ok(dev) -@@ -445,51 +557,62 @@ impl<'ctx> Stream<'ctx> { - } - } - -- fn pulse_stream_init(&mut self, -- stream_params: &cubeb::StreamParams, -- stream_name: *const c_char) -- -> Result<*mut pa_stream> { -+ fn stream_init(context: &pulse::Context, -+ stream_params: &cubeb::StreamParams, -+ stream_name: &CStr) -+ -> Result { - -- fn to_pulse_format(format: cubeb::SampleFormat) -> pa_sample_format_t { -+ fn to_pulse_format(format: cubeb::SampleFormat) -> pulse::SampleFormat { - match format { -- cubeb::SAMPLE_S16LE => PA_SAMPLE_S16LE, -- cubeb::SAMPLE_S16BE => PA_SAMPLE_S16BE, -- cubeb::SAMPLE_FLOAT32LE => PA_SAMPLE_FLOAT32LE, -- cubeb::SAMPLE_FLOAT32BE => PA_SAMPLE_FLOAT32BE, -- _ => panic!("Invalid format: {:?}", format), -+ cubeb::SAMPLE_S16LE => pulse::SampleFormat::Signed16LE, -+ cubeb::SAMPLE_S16BE => pulse::SampleFormat::Signed16BE, -+ cubeb::SAMPLE_FLOAT32LE => pulse::SampleFormat::Float32LE, -+ cubeb::SAMPLE_FLOAT32BE => pulse::SampleFormat::Float32BE, -+ _ => pulse::SampleFormat::Invalid, - } - } - - let fmt = to_pulse_format(stream_params.format); -- if fmt == PA_SAMPLE_INVALID { -+ if fmt == pulse::SampleFormat::Invalid { - return Err(cubeb::ERROR_INVALID_FORMAT); - } - -- let ss = pa_sample_spec { -+ let ss = pulse::SampleSpec { - channels: stream_params.channels as u8, -- format: fmt, -+ format: fmt.into(), - rate: stream_params.rate, - }; - -- let stream = if stream_params.layout == cubeb::LAYOUT_UNDEFINED { -- unsafe { pa_stream_new(self.context.context, stream_name, &ss, ptr::null_mut()) } -- } else { -- let cm = layout_to_channel_map(stream_params.layout); -- unsafe { pa_stream_new(self.context.context, stream_name, &ss, &cm) } -+ let cm: Option = match stream_params.layout { -+ cubeb::LAYOUT_UNDEFINED => None, -+ _ => Some(layout_to_channel_map(stream_params.layout)), - }; - -- if !stream.is_null() { -- Ok(stream) -- } else { -- Err(cubeb::ERROR) -+ let stream = pulse::Stream::new(context, stream_name, &ss, cm.as_ref()); -+ -+ match stream { -+ None => Err(cubeb::ERROR), -+ Some(stm) => Ok(stm), -+ } -+ } -+ -+ pub fn cork_stream(&self, stream: Option<&pulse::Stream>, state: CorkState) { -+ if let Some(stm) = stream { -+ if let Ok(o) = stm.cork(state.is_cork() as i32, -+ stream_success, -+ self as *const _ as *mut _) { -+ self.context.operation_wait(stream, &o); -+ } - } - } - -- fn stream_cork(&mut self, state: CorkState) { -- unsafe { pa_threaded_mainloop_lock(self.context.mainloop) }; -- self.context.pulse_stream_cork(self.output_stream, state); -- self.context.pulse_stream_cork(self.input_stream, state); -- unsafe { pa_threaded_mainloop_unlock(self.context.mainloop) }; -+ fn cork(&mut self, state: CorkState) { -+ { -+ self.context.mainloop.lock(); -+ self.cork_stream(self.output_stream.as_ref(), state); -+ self.cork_stream(self.input_stream.as_ref(), state); -+ self.context.mainloop.unlock() -+ } - - if state.is_notify() { - self.state_change_callback(if state.is_cork() { -@@ -503,18 +626,9 @@ impl<'ctx> Stream<'ctx> { - fn update_timing_info(&self) -> bool { - let mut r = false; - -- if !self.output_stream.is_null() { -- let o = unsafe { -- pa_stream_update_timing_info(self.output_stream, -- Some(stream_success_callback), -- self as *const _ as *mut _) -- }; -- -- if !o.is_null() { -- r = self.context.operation_wait(self.output_stream, o); -- unsafe { -- pa_operation_unref(o); -- } -+ if let Some(ref stm) = self.output_stream { -+ if let Ok(o) = stm.update_timing_info(stream_success, self as *const _ as *mut _) { -+ r = self.context.operation_wait(stm, &o); - } - - if !r { -@@ -522,18 +636,9 @@ impl<'ctx> Stream<'ctx> { - } - } - -- if !self.input_stream.is_null() { -- let o = unsafe { -- pa_stream_update_timing_info(self.input_stream, -- Some(stream_success_callback), -- self as *const _ as *mut _) -- }; -- -- if !o.is_null() { -- r = self.context.operation_wait(self.input_stream, o); -- unsafe { -- pa_operation_unref(o); -- } -+ if let Some(ref stm) = self.input_stream { -+ if let Ok(o) = stm.update_timing_info(stream_success, self as *const _ as *mut _) { -+ r = self.context.operation_wait(stm, &o); - } - } - -@@ -547,232 +652,162 @@ impl<'ctx> Stream<'ctx> { - } - } - -- fn wait_until_stream_ready(&self) -> bool { -- if !self.output_stream.is_null() && !wait_until_io_stream_ready(self.output_stream, self.context.mainloop) { -- return false; -- } -- -- if !self.input_stream.is_null() && !wait_until_io_stream_ready(self.input_stream, self.context.mainloop) { -- return false; -- } -- -- true -- } -- -- fn trigger_user_callback(&mut self, s: *mut pa_stream, input_data: *const c_void, nbytes: usize) { -- let frame_size = unsafe { pa_frame_size(&self.output_sample_spec) }; -- debug_assert_eq!(nbytes % frame_size, 0); -- -- let mut buffer: *mut c_void = ptr::null_mut(); -- let mut r: i32; -- -- let mut towrite = nbytes; -- let mut read_offset = 0usize; -- while towrite > 0 { -- let mut size = towrite; -- r = unsafe { pa_stream_begin_write(s, &mut buffer, &mut size) }; -- // Note: this has failed running under rr on occassion - needs investigation. -- debug_assert_eq!(r, 0); -- debug_assert!(size > 0); -- debug_assert_eq!(size % frame_size, 0); -- -- logv!("Trigger user callback with output buffer size={}, read_offset={}", -- size, -- read_offset); -- let read_ptr = unsafe { (input_data as *const u8).offset(read_offset as isize) }; -- let got = unsafe { -- self.data_callback.unwrap()(self as *const _ as *mut _, -- self.user_ptr, -- read_ptr as *const _ as *mut _, -- buffer, -- (size / frame_size) as c_long) -- }; -- if got < 0 { -- unsafe { -- pa_stream_cancel_write(s); -- } -- self.shutdown = true; -- return; -- } -- // If more iterations move offset of read buffer -- if !input_data.is_null() { -- let in_frame_size = unsafe { pa_frame_size(&self.input_sample_spec) }; -- read_offset += (size / frame_size) * in_frame_size; -+ fn wait_until_ready(&self) -> bool { -+ fn wait_until_io_stream_ready(stm: &pulse::Stream, mainloop: &pulse::ThreadedMainloop) -> bool { -+ if mainloop.is_null() { -+ return false; - } - -- if self.volume != PULSE_NO_GAIN { -- let samples = (self.output_sample_spec.channels as usize * size / frame_size) as isize; -- -- if self.output_sample_spec.format == PA_SAMPLE_S16BE || -- self.output_sample_spec.format == PA_SAMPLE_S16LE { -- let b = buffer as *mut i16; -- for i in 0..samples { -- unsafe { *b.offset(i) *= self.volume as i16 }; -- } -- } else { -- let b = buffer as *mut f32; -- for i in 0..samples { -- unsafe { *b.offset(i) *= self.volume }; -- } -+ loop { -+ let state = stm.get_state(); -+ if !state.is_good() { -+ return false; -+ } -+ if state == pulse::StreamState::Ready { -+ break; - } -+ mainloop.wait(); - } - -- r = unsafe { -- pa_stream_write(s, -- buffer, -- got as usize * frame_size, -- None, -- 0, -- PA_SEEK_RELATIVE) -- }; -- debug_assert_eq!(r, 0); -+ true -+ } - -- if (got as usize) < size / frame_size { -- let mut latency: pa_usec_t = 0; -- let rr: i32 = unsafe { pa_stream_get_latency(s, &mut latency, ptr::null_mut()) }; -- if rr == -(PA_ERR_NODATA as i32) { -- /* this needs a better guess. */ -- latency = 100 * PA_USEC_PER_MSEC; -- } -- debug_assert!(r == 0 || r == -(PA_ERR_NODATA as i32)); -- /* pa_stream_drain is useless, see PA bug# 866. this is a workaround. */ -- /* arbitrary safety margin: double the current latency. */ -- debug_assert!(self.drain_timer.is_null()); -- self.drain_timer = unsafe { -- pa_context_rttime_new(self.context.context, -- pa_rtclock_now() + 2 * latency, -- Some(stream_drain_callback), -- self as *const _ as *mut _) -- }; -- self.shutdown = true; -- return; -+ if let Some(ref stm) = self.output_stream { -+ if !wait_until_io_stream_ready(stm, &self.context.mainloop) { -+ return false; - } -- -- towrite -= size; - } - -- debug_assert_eq!(towrite, 0); -- } --} -- --unsafe extern "C" fn stream_success_callback(_s: *mut pa_stream, _success: i32, u: *mut c_void) { -- let stm = &*(u as *mut Stream); -- pa_threaded_mainloop_signal(stm.context.mainloop, 0); --} -- --unsafe extern "C" fn stream_drain_callback(a: *mut pa_mainloop_api, -- e: *mut pa_time_event, -- _tv: *const timeval, -- u: *mut c_void) { -- let mut stm = &mut *(u as *mut Stream); -- debug_assert_eq!(stm.drain_timer, e); -- stm.state_change_callback(cubeb::STATE_DRAINED); -- /* there's no pa_rttime_free, so use this instead. */ -- (*a).time_free.unwrap()(stm.drain_timer); -- stm.drain_timer = ptr::null_mut(); -- pa_threaded_mainloop_signal(stm.context.mainloop, 0); --} -- --unsafe extern "C" fn stream_state_callback(s: *mut pa_stream, u: *mut c_void) { -- let stm = &mut *(u as *mut Stream); -- if !PA_STREAM_IS_GOOD(pa_stream_get_state(s)) { -- stm.state_change_callback(cubeb::STATE_ERROR); -- } -- pa_threaded_mainloop_signal(stm.context.mainloop, 0); --} -- --fn read_from_input(s: *mut pa_stream, buffer: *mut *const c_void, size: *mut usize) -> i32 { -- let readable_size = unsafe { pa_stream_readable_size(s) }; -- if readable_size > 0 && unsafe { pa_stream_peek(s, buffer, size) } < 0 { -- return -1; -- } -- -- readable_size as i32 --} -+ if let Some(ref stm) = self.input_stream { -+ if !wait_until_io_stream_ready(stm, &self.context.mainloop) { -+ return false; -+ } -+ } - --unsafe extern "C" fn stream_write_callback(s: *mut pa_stream, nbytes: usize, u: *mut c_void) { -- logv!("Output callback to be written buffer size {}", nbytes); -- let mut stm = &mut *(u as *mut Stream); -- if stm.shutdown || stm.state != cubeb::STATE_STARTED { -- return; -+ true - } - -- if stm.input_stream.is_null() { -- // Output/playback only operation. -- // Write directly to output -- debug_assert!(!stm.output_stream.is_null()); -- stm.trigger_user_callback(s, ptr::null(), nbytes); -- } --} -+ fn trigger_user_callback(&mut self, input_data: *const c_void, nbytes: usize) { -+ fn drained_cb(a: &pulse::MainloopApi, e: *mut pa_time_event, _tv: &pulse::TimeVal, u: *mut c_void) { -+ let mut stm = unsafe { &mut *(u as *mut Stream) }; -+ debug_assert_eq!(stm.drain_timer, e); -+ stm.state_change_callback(cubeb::STATE_DRAINED); -+ /* there's no pa_rttime_free, so use this instead. */ -+ a.time_free(stm.drain_timer); -+ stm.drain_timer = ptr::null_mut(); -+ stm.context.mainloop.signal(); -+ } -+ -+ if let Some(ref stm) = self.output_stream { -+ -+ let frame_size = self.output_sample_spec.frame_size(); -+ debug_assert_eq!(nbytes % frame_size, 0); -+ -+ let mut towrite = nbytes; -+ let mut read_offset = 0usize; -+ while towrite > 0 { -+ match stm.begin_write(towrite) { -+ Err(e) => { -+ panic!("Failed to write data: {}", e); -+ }, -+ Ok((buffer, size)) => { -+ debug_assert!(size > 0); -+ debug_assert_eq!(size % frame_size, 0); -+ -+ logv!("Trigger user callback with output buffer size={}, read_offset={}", -+ size, -+ read_offset); -+ let read_ptr = unsafe { (input_data as *const u8).offset(read_offset as isize) }; -+ let got = unsafe { -+ self.data_callback.unwrap()(self as *const _ as *mut _, -+ self.user_ptr, -+ read_ptr as *const _ as *mut _, -+ buffer, -+ (size / frame_size) as c_long) -+ }; -+ if got < 0 { -+ let _ = stm.cancel_write(); -+ self.shutdown = true; -+ return; -+ } -+ -+ // If more iterations move offset of read buffer -+ if !input_data.is_null() { -+ let in_frame_size = self.input_sample_spec.frame_size(); -+ read_offset += (size / frame_size) * in_frame_size; -+ } -+ -+ if self.volume != PULSE_NO_GAIN { -+ let samples = (self.output_sample_spec.channels as usize * size / frame_size) as isize; -+ -+ if self.output_sample_spec.format == PA_SAMPLE_S16BE || -+ self.output_sample_spec.format == PA_SAMPLE_S16LE { -+ let b = buffer as *mut i16; -+ for i in 0..samples { -+ unsafe { *b.offset(i) *= self.volume as i16 }; -+ } -+ } else { -+ let b = buffer as *mut f32; -+ for i in 0..samples { -+ unsafe { *b.offset(i) *= self.volume }; -+ } -+ } -+ } -+ -+ let r = stm.write(buffer, -+ got as usize * frame_size, -+ 0, -+ pulse::SeekMode::Relative); -+ debug_assert!(r.is_ok()); -+ -+ if (got as usize) < size / frame_size { -+ let latency = match stm.get_latency() { -+ Ok((l, negative)) => { -+ assert_ne!(negative, true); -+ l -+ }, -+ Err(e) => { -+ debug_assert_eq!(e, pulse::ErrorCode::from_error_code(PA_ERR_NODATA)); -+ /* this needs a better guess. */ -+ 100 * PA_USEC_PER_MSEC -+ }, -+ }; -+ -+ /* pa_stream_drain is useless, see PA bug# 866. this is a workaround. */ -+ /* arbitrary safety margin: double the current latency. */ -+ debug_assert!(self.drain_timer.is_null()); -+ let stream_ptr = self as *const _ as *mut _; -+ if let Some(ref context) = self.context.context { -+ self.drain_timer = -+ context.rttime_new(pulse::rtclock_now() + 2 * latency, drained_cb, stream_ptr); -+ } -+ self.shutdown = true; -+ return; -+ } - --unsafe extern "C" fn stream_read_callback(s: *mut pa_stream, nbytes: usize, u: *mut c_void) { -- logv!("Input callback buffer size {}", nbytes); -- let mut stm = &mut *(u as *mut Stream); -- if stm.shutdown { -- return; -- } -- -- let mut read_data: *const c_void = ptr::null(); -- let mut read_size: usize = 0; -- while read_from_input(s, &mut read_data, &mut read_size) > 0 { -- /* read_data can be NULL in case of a hole. */ -- if !read_data.is_null() { -- let in_frame_size = pa_frame_size(&stm.input_sample_spec); -- let read_frames = read_size / in_frame_size; -- -- if !stm.output_stream.is_null() { -- // input/capture + output/playback operation -- let out_frame_size = pa_frame_size(&stm.output_sample_spec); -- let write_size = read_frames * out_frame_size; -- // Offer full duplex data for writing -- let stream = stm.output_stream; -- stm.trigger_user_callback(stream, read_data, write_size); -- } else { -- // input/capture only operation. Call callback directly -- let got = stm.data_callback.unwrap()(stm as *mut _ as *mut _, -- stm.user_ptr, -- read_data, -- ptr::null_mut(), -- read_frames as c_long); -- if got < 0 || got as usize != read_frames { -- pa_stream_cancel_write(s); -- stm.shutdown = true; -- break; -+ towrite -= size; -+ }, - } - } -- } -- -- if read_size > 0 { -- pa_stream_drop(s); -- } -- -- if stm.shutdown { -- return; -+ debug_assert_eq!(towrite, 0); - } - } - } - --fn wait_until_io_stream_ready(stream: *mut pa_stream, mainloop: *mut pa_threaded_mainloop) -> bool { -- if stream.is_null() || mainloop.is_null() { -- return false; -- } -- -- loop { -- let state = unsafe { pa_stream_get_state(stream) }; -- if !PA_STREAM_IS_GOOD(state) { -- return false; -- } -- if state == PA_STREAM_READY { -- break; -- } -- unsafe { pa_threaded_mainloop_wait(mainloop) }; -- } -+fn stream_success(_: &pulse::Stream, success: i32, u: *mut c_void) { -+ let stm = unsafe { &*(u as *mut Stream) }; -+ debug_assert_ne!(success, 0); -+ stm.context.mainloop.signal(); -+} - -- true -+fn context_success(_: &pulse::Context, success: i32, u: *mut c_void) { -+ let ctx = unsafe { &*(u as *mut Context) }; -+ debug_assert_ne!(success, 0); -+ ctx.mainloop.signal(); - } - - fn set_buffering_attribute(latency_frames: u32, sample_spec: &pa_sample_spec) -> pa_buffer_attr { -- let tlength = latency_frames * unsafe { pa_frame_size(sample_spec) } as u32; -+ let tlength = latency_frames * sample_spec.frame_size() as u32; - let minreq = tlength / 4; - let battr = pa_buffer_attr { - maxlength: u32::max_value(), -@@ -791,34 +826,3 @@ fn set_buffering_attribute(latency_frame - - battr - } -- --unsafe extern "C" fn pulse_defer_event_cb(_a: *mut pa_mainloop_api, u: *mut c_void) { -- let mut stm = &mut *(u as *mut Stream); -- if stm.shutdown { -- return; -- } -- let writable_size = pa_stream_writable_size(stm.output_stream); -- let stream = stm.output_stream; -- stm.trigger_user_callback(stream, ptr::null_mut(), writable_size); --} -- --#[repr(C)] --struct SinkInputInfoResult { -- pub cvol: *mut pa_cvolume, -- pub mainloop: *mut pa_threaded_mainloop, --} -- --unsafe extern "C" fn sink_input_info_cb(_c: *mut pa_context, i: *const pa_sink_input_info, eol: i32, u: *mut c_void) { -- let info = &*i; -- let mut r = &mut *(u as *mut SinkInputInfoResult); -- if eol == 0 { -- *r.cvol = info.volume; -- } -- pa_threaded_mainloop_signal(r.mainloop, 0); --} -- --unsafe extern "C" fn volume_success(_c: *mut pa_context, success: i32, u: *mut c_void) { -- let stm = &*(u as *mut Stream); -- debug_assert_ne!(success, 0); -- pa_threaded_mainloop_signal(stm.context.mainloop, 0); --} -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/capi.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/capi.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/capi.rs.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/capi.rs 2017-08-04 13:37:46.387821728 +0200 -@@ -5,6 +5,7 @@ - - use backend; - use cubeb; -+use std::ffi::CStr; - use std::os::raw::{c_char, c_void}; - - unsafe extern "C" fn capi_init(c: *mut *mut cubeb::Context, context_name: *const c_char) -> i32 { -@@ -114,21 +115,18 @@ unsafe extern "C" fn capi_stream_init(c: - state_callback: cubeb::StateCallback, - user_ptr: *mut c_void) - -> i32 { -+ fn try_stream_params_from(sp: *mut cubeb::StreamParams) -> Option { -+ if sp.is_null() { None } else { Some(unsafe { *sp }) } -+ } -+ - let mut ctx = &mut *(c as *mut backend::Context); -+ let stream_name = CStr::from_ptr(stream_name); - - match ctx.new_stream(stream_name, - input_device, -- if input_stream_params.is_null() { -- None -- } else { -- Some(*input_stream_params) -- }, -+ try_stream_params_from(input_stream_params), - output_device, -- if output_stream_params.is_null() { -- None -- } else { -- Some(*output_stream_params) -- }, -+ try_stream_params_from(output_stream_params), - latency_frames, - data_callback, - state_callback, -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/lib.rs.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/lib.rs ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/lib.rs.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/src/lib.rs 2017-08-04 13:37:46.387821728 +0200 -@@ -8,6 +8,7 @@ - #[macro_use] - extern crate cubeb_ffi as cubeb; - extern crate pulse_ffi; -+extern crate pulse; - extern crate semver; - - mod capi; -diff -up firefox-55.0/media/libcubeb/cubeb-pulse-rs/update.sh.cubeb-pulse-arm firefox-55.0/media/libcubeb/cubeb-pulse-rs/update.sh ---- firefox-55.0/media/libcubeb/cubeb-pulse-rs/update.sh.cubeb-pulse-arm 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/media/libcubeb/cubeb-pulse-rs/update.sh 2017-08-04 13:37:46.383821740 +0200 -@@ -13,6 +13,9 @@ cp -pr $1/cubeb-ffi/src/* cubeb-ffi/src/ - test -d pulse-ffi/src || mkdir -p pulse-ffi/src - cp -pr $1/pulse-ffi/Cargo.toml pulse-ffi/ - cp -pr $1/pulse-ffi/src/* pulse-ffi/src/ -+test -d pulse-rs/src || mkdir -p pulse-rs/src -+cp -pr $1/pulse-rs/Cargo.toml pulse-rs/ -+cp -pr $1/pulse-rs/src/* pulse-rs/src/ - - if [ -d $1/.git ]; then - rev=$(cd $1 && git rev-parse --verify HEAD) -diff -up firefox-55.0/toolkit/library/gtest/rust/Cargo.lock.cubeb-pulse-arm firefox-55.0/toolkit/library/gtest/rust/Cargo.lock ---- firefox-55.0/toolkit/library/gtest/rust/Cargo.lock.cubeb-pulse-arm 2017-08-04 13:37:46.388821725 +0200 -+++ firefox-55.0/toolkit/library/gtest/rust/Cargo.lock 2017-08-04 13:59:15.592940994 +0200 -@@ -252,6 +252,7 @@ name = "cubeb-pulse" - version = "0.0.1" - dependencies = [ - "cubeb-ffi 0.0.1", -+ "pulse 0.1.0", - "pulse-ffi 0.1.0", - "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - ] -@@ -660,6 +661,14 @@ version = "0.1.1" - source = "registry+https://github.com/rust-lang/crates.io-index" - - [[package]] -+name = "pulse" -+version = "0.1.0" -+dependencies = [ -+ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "pulse-ffi 0.1.0", -+] -+ -+[[package]] - name = "pulse-ffi" - version = "0.1.0" - dependencies = [ -diff -up firefox-55.0/toolkit/library/rust/Cargo.lock.cubeb-pulse-arm firefox-55.0/toolkit/library/rust/Cargo.lock ---- firefox-55.0/toolkit/library/rust/Cargo.lock.cubeb-pulse-arm 2017-08-04 13:37:46.388821725 +0200 -+++ firefox-55.0/toolkit/library/rust/Cargo.lock 2017-08-04 13:52:24.551163669 +0200 -@@ -250,6 +250,7 @@ name = "cubeb-pulse" - version = "0.0.1" - dependencies = [ - "cubeb-ffi 0.0.1", -+ "pulse 0.1.0", - "pulse-ffi 0.1.0", - "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - ] -@@ -647,6 +648,14 @@ version = "0.1.1" - source = "registry+https://github.com/rust-lang/crates.io-index" - - [[package]] -+name = "pulse" -+version = "0.1.0" -+dependencies = [ -+ "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -+ "pulse-ffi 0.1.0", -+] -+ -+[[package]] - name = "pulse-ffi" - version = "0.1.0" - dependencies = [ diff --git a/build-disable-elfhack.patch b/build-disable-elfhack.patch deleted file mode 100644 index a80c551..0000000 --- a/build-disable-elfhack.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-65.0/toolkit/moz.configure.disable-elfhack firefox-65.0/toolkit/moz.configure ---- firefox-65.0/toolkit/moz.configure.disable-elfhack 2019-01-28 14:16:48.530345132 +0100 -+++ firefox-65.0/toolkit/moz.configure 2019-01-28 14:18:03.231029682 +0100 -@@ -1036,7 +1036,7 @@ with only_when('--enable-compile-environ - help='{Enable|Disable} elf hacks') - - set_config('USE_ELF_HACK', -- depends_if('--enable-elf-hack')(lambda _: True)) -+ depends_if('--enable-elf-hack')(lambda _: False)) - - - @depends(check_build_environment) diff --git a/build-ppc-jit.patch b/build-ppc-jit.patch deleted file mode 100644 index a9dc6d1..0000000 --- a/build-ppc-jit.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -up firefox-55.0/js/src/jit/MIR.h.old firefox-55.0/js/src/jit/MIR.h ---- firefox-55.0/js/src/jit/MIR.h.old 2017-08-08 14:04:44.528460099 +0200 -+++ firefox-55.0/js/src/jit/MIR.h 2017-08-08 14:05:11.045364831 +0200 -@@ -12434,7 +12434,7 @@ class MNearbyInt - TRIVIAL_NEW_WRAPPERS - - static bool HasAssemblerSupport(RoundingMode mode) { -- return Assembler::HasRoundInstruction(mode); -+ return false; - } - - RoundingMode roundingMode() const { return roundingMode_; } -diff -up firefox-55.0/js/src/jit/ExecutableAllocator.h.old firefox-55.0/js/src/jit/ExecutableAllocator.h ---- firefox-55.0/js/src/jit/ExecutableAllocator.h.old 2017-08-09 09:24:18.784983505 +0200 -+++ firefox-55.0/js/src/jit/ExecutableAllocator.h 2017-08-09 09:28:01.471100075 +0200 -@@ -307,6 +307,10 @@ class ExecutableAllocator - { - sync_instruction_memory((caddr_t)code, size); - } -+#else -+ static void cacheFlush(void*, size_t) -+ { -+ } - #endif - - private: -diff -up firefox-55.0/js/src/wasm/WasmBuiltins.cpp.old firefox-55.0/js/src/wasm/WasmBuiltins.cpp ---- firefox-55.0/js/src/wasm/WasmBuiltins.cpp.old 2017-08-09 12:50:46.877450765 +0200 -+++ firefox-55.0/js/src/wasm/WasmBuiltins.cpp 2017-08-09 12:50:59.725406974 +0200 -@@ -881,7 +881,6 @@ wasm::EnsureBuiltinThunksInitialized() - MOZ_ASSERT(!masm.numSymbolicAccesses()); - #endif - -- ExecutableAllocator::cacheFlush(thunks->codeBase, thunks->codeSize); - if (!ExecutableAllocator::makeExecutable(thunks->codeBase, thunks->codeSize)) - return false; - -diff -up firefox-55.0/js/src/wasm/WasmCode.cpp.old firefox-55.0/js/src/wasm/WasmCode.cpp ---- firefox-55.0/js/src/wasm/WasmCode.cpp.old 2017-08-09 12:50:37.205483731 +0200 -+++ firefox-55.0/js/src/wasm/WasmCode.cpp 2017-08-09 12:51:10.365370708 +0200 -@@ -287,8 +287,6 @@ CodeSegment::initialize(Tier tier, - if (!StaticallyLink(*this, linkData)) - return false; - -- ExecutableAllocator::cacheFlush(bytes_.get(), RoundupCodeLength(codeLength)); -- - // Reprotect the whole region to avoid having separate RW and RX mappings. - if (!ExecutableAllocator::makeExecutable(bytes_.get(), RoundupCodeLength(codeLength))) - return false; -diff -up firefox-55.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-55.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium -diff -up firefox-55.0/media/webrtc/trunk/Makefile.old firefox-55.0/media/webrtc/trunk/Makefile diff --git a/build-rust-ppc64le.patch b/build-rust-ppc64le.patch deleted file mode 100644 index 2474c35..0000000 --- a/build-rust-ppc64le.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up firefox-55.0/build/moz.configure/rust.configure.rust-ppc64le firefox-55.0/build/moz.configure/rust.configure ---- firefox-55.0/build/moz.configure/rust.configure.rust-ppc64le 2017-07-31 18:20:49.000000000 +0200 -+++ firefox-55.0/build/moz.configure/rust.configure 2017-08-02 10:19:03.254220003 +0200 -@@ -151,6 +151,9 @@ def rust_triple_alias(host_or_target): - ('sparc64', 'Linux'): 'sparc64-unknown-linux-gnu', - ('x86', 'Linux'): 'i686-unknown-linux-gnu', - ('x86_64', 'Linux'): 'x86_64-unknown-linux-gnu', -+ ('ppc64le', 'Linux'): 'powerpc64le-unknown-linux-gnu', -+ ('ppc64', 'Linux'): 'powerpc64-unknown-linux-gnu', -+ ('s390x', 'Linux'): 's390x-unknown-linux-gnu', - # OS X - ('x86', 'OSX'): 'i686-apple-darwin', - ('x86_64', 'OSX'): 'x86_64-apple-darwin', -@@ -174,8 +177,10 @@ def rust_triple_alias(host_or_target): - ('sparc64', 'SunOS'): 'sparcv9-sun-solaris', - }.get((host_or_target.cpu, os_or_kernel), None) - -+ if (rustc_target == 'powerpc64-unknown-linux-gnu' and host_or_target.endianness == 'little'): -+ rustc_target = 'powerpc64le-unknown-linux-gnu' - if rustc_target is None: -- die("Don't know how to translate {} for rustc".format(host_or_target.alias)) -+ die("Don't know how to translate {} for rustc, cpu: {}, os: {}".format(target.alias, target.cpu, os_or_kernel)) - - # Check to see whether our rustc has a reasonably functional stdlib - # for our chosen target. diff --git a/disable-openh264-download.patch b/disable-openh264-download.patch deleted file mode 100644 index 028b730..0000000 --- a/disable-openh264-download.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up firefox-81.0/toolkit/modules/GMPInstallManager.jsm.old firefox-81.0/toolkit/modules/GMPInstallManager.jsm ---- firefox-81.0/toolkit/modules/GMPInstallManager.jsm.old 2020-09-25 10:39:04.769458703 +0200 -+++ firefox-81.0/toolkit/modules/GMPInstallManager.jsm 2020-09-25 10:39:22.038504747 +0200 -@@ -54,10 +54,6 @@ function getScopedLogger(prefix) { - - const LOCAL_GMP_SOURCES = [ - { -- id: "gmp-gmpopenh264", -- src: "chrome://global/content/gmp-sources/openh264.json", -- }, -- { - id: "gmp-widevinecdm", - src: "chrome://global/content/gmp-sources/widevinecdm.json", - }, -diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn ---- a/toolkit/content/jar.mn -+++ b/toolkit/content/jar.mn -@@ -108,7 +108,6 @@ toolkit.jar: - #ifdef XP_MACOSX - content/global/macWindowMenu.js - #endif -- content/global/gmp-sources/openh264.json (gmp-sources/openh264.json) - content/global/gmp-sources/widevinecdm.json (gmp-sources/widevinecdm.json) - - # Third party files -diff --git a/toolkit/modules/GMPInstallManager.jsm b/toolkit/modules/GMPInstallManager.jsm ---- a/toolkit/modules/GMPInstallManager.jsm -+++ b/toolkit/modules/GMPInstallManager.jsm -@@ -238,6 +234,9 @@ GMPInstallManager.prototype = { - * downloaderr, verifyerr or previouserrorencountered - */ - installAddon(gmpAddon) { -+ if (gmpAddon.isOpenH264) { -+ return Promise.reject({ type: "disabled" }); -+ } - if (this._deferred) { - let log = getScopedLogger("GMPInstallManager.installAddon"); - log.error("previous error encountered"); - diff --git a/distribution.ini b/distribution.ini index 11f1f96..8bf461e 100644 --- a/distribution.ini +++ b/distribution.ini @@ -1,9 +1,9 @@ [Global] -id=fedora +id=redhat version=1.0 -about=Mozilla Firefox for Fedora +about=Mozilla Firefox for Red Hat Enterprise Linux [Preferences] -app.distributor=fedora -app.distributor.channel=fedora -app.partner.fedora=fedora +app.distributor=redhat +app.distributor.channel=redhat +app.partner.fedora=redhat diff --git a/fedora-build.patch b/fedora-build.patch deleted file mode 100644 index 74127ec..0000000 --- a/fedora-build.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up firefox-54.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-54.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium -diff -up firefox-54.0/media/mtransport/third_party/nICEr/nicer.gyp.old firefox-54.0/media/mtransport/third_party/nICEr/nicer.gyp ---- firefox-54.0/media/mtransport/third_party/nICEr/nicer.gyp.old 2017-06-08 14:59:08.786996664 +0200 -+++ firefox-54.0/media/mtransport/third_party/nICEr/nicer.gyp 2017-06-08 14:59:22.642946570 +0200 -@@ -211,7 +211,6 @@ - '-Wno-parentheses', - '-Wno-strict-prototypes', - '-Wmissing-prototypes', -- '-Wno-format', - ], - 'defines' : [ - 'LINUX', -diff -up firefox-54.0/media/mtransport/third_party/nrappkit/nrappkit.gyp.build firefox-54.0/media/mtransport/third_party/nrappkit/nrappkit.gyp ---- firefox-54.0/media/mtransport/third_party/nrappkit/nrappkit.gyp.build 2017-06-08 15:08:03.627063097 +0200 -+++ firefox-54.0/media/mtransport/third_party/nrappkit/nrappkit.gyp 2017-06-08 15:08:15.657019606 +0200 -@@ -206,7 +206,6 @@ - '-Wno-parentheses', - '-Wno-strict-prototypes', - '-Wmissing-prototypes', -- '-Wno-format', - ], - 'defines' : [ - 'LINUX', diff --git a/fedora-shebang-build.patch b/fedora-shebang-build.patch deleted file mode 100644 index 9ade86c..0000000 --- a/fedora-shebang-build.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -up firefox-73.0/build/unix/run-mozilla.sh.old firefox-73.0/build/unix/run-mozilla.sh ---- firefox-73.0/build/unix/run-mozilla.sh.old 2020-02-12 09:58:00.150895904 +0100 -+++ firefox-73.0/build/unix/run-mozilla.sh 2020-02-12 09:58:06.505860696 +0100 -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/usr/bin/sh - # - # This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/firefox-disable-ffvpx-with-vapi.patch b/firefox-disable-ffvpx-with-vapi.patch deleted file mode 100644 index dfe6dd8..0000000 --- a/firefox-disable-ffvpx-with-vapi.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -up firefox-81.0/dom/media/platforms/PDMFactory.cpp.firefox-disable-ffvpx-with-vapi firefox-81.0/dom/media/platforms/PDMFactory.cpp ---- firefox-81.0/dom/media/platforms/PDMFactory.cpp.firefox-disable-ffvpx-with-vapi 2020-09-17 02:32:43.000000000 +0200 -+++ firefox-81.0/dom/media/platforms/PDMFactory.cpp 2020-09-21 10:30:29.393903183 +0200 -@@ -371,12 +371,6 @@ void PDMFactory::CreatePDMs() { - StartupPDM(m); - } - #endif --#ifdef MOZ_FFVPX -- if (StaticPrefs::media_ffvpx_enabled()) { -- m = FFVPXRuntimeLinker::CreateDecoderModule(); -- StartupPDM(m); -- } --#endif - #ifdef MOZ_FFMPEG - if (StaticPrefs::media_ffmpeg_enabled()) { - m = FFmpegRuntimeLinker::CreateDecoderModule(); -@@ -385,6 +379,12 @@ void PDMFactory::CreatePDMs() { - mFFmpegFailedToLoad = false; - } - #endif -+#ifdef MOZ_FFVPX -+ if (StaticPrefs::media_ffvpx_enabled()) { -+ m = FFVPXRuntimeLinker::CreateDecoderModule(); -+ StartupPDM(m); -+ } -+#endif - #ifdef MOZ_WIDGET_ANDROID - if (StaticPrefs::media_android_media_codec_enabled()) { - m = new AndroidDecoderModule(); diff --git a/firefox-fedora-ua.patch b/firefox-fedora-ua.patch deleted file mode 100644 index 7f1f554..0000000 --- a/firefox-fedora-ua.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up firefox-65.0/netwerk/protocol/http/nsHttpHandler.cpp.fedora-ua firefox-65.0/netwerk/protocol/http/nsHttpHandler.cpp ---- firefox-65.0/netwerk/protocol/http/nsHttpHandler.cpp.fedora-ua 2019-01-28 14:28:35.806375063 +0100 -+++ firefox-65.0/netwerk/protocol/http/nsHttpHandler.cpp 2019-01-28 14:30:25.886917219 +0100 -@@ -873,6 +873,7 @@ void nsHttpHandler::BuildUserAgent() { - mUserAgent.SetCapacity(mLegacyAppName.Length() + mLegacyAppVersion.Length() + - #ifndef UA_SPARE_PLATFORM - mPlatform.Length() + -+ mPlatform.Length() + 8 + - #endif - mOscpu.Length() + mMisc.Length() + mProduct.Length() + - mProductSub.Length() + mAppName.Length() + -@@ -891,6 +892,7 @@ void nsHttpHandler::BuildUserAgent() { - if (!mPlatform.IsEmpty()) { - mUserAgent += mPlatform; - mUserAgent.AppendLiteral("; "); -+ mUserAgent.AppendLiteral("Fedora; "); - } - #endif - if (!mCompatDevice.IsEmpty()) { diff --git a/firefox-gcc-build.patch b/firefox-gcc-build.patch deleted file mode 100644 index 55017ad..0000000 --- a/firefox-gcc-build.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- firefox-80.0.1/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h 2020-08-31 10:04:19.000000000 -0400 -+++ firefox-80.0.1/toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h 2020-09-12 07:24:35.298931628 -0400 -@@ -1962,7 +1962,7 @@ struct kernel_statfs { - LSS_ENTRYPOINT \ - "pop %%ebx" \ - args \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res) - #undef _syscall0 - #define _syscall0(type,name) \ -@@ -2019,7 +2019,7 @@ struct kernel_statfs { - : "i" (__NR_##name), "ri" ((long)(arg1)), \ - "c" ((long)(arg2)), "d" ((long)(arg3)), \ - "S" ((long)(arg4)), "D" ((long)(arg5)) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - #undef _syscall6 -@@ -2041,7 +2041,7 @@ struct kernel_statfs { - : "i" (__NR_##name), "0" ((long)(&__s)), \ - "c" ((long)(arg2)), "d" ((long)(arg3)), \ - "S" ((long)(arg4)), "D" ((long)(arg5)) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, -@@ -2127,7 +2127,7 @@ struct kernel_statfs { - : "0"(-EINVAL), "i"(__NR_clone), - "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), - "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) -- : "esp", "memory", "ecx", "edx", "esi", "edi"); -+ : "memory", "ecx", "edx", "esi", "edi"); - LSS_RETURN(int, __res); - } - diff --git a/firefox-locale-debug.patch b/firefox-locale-debug.patch deleted file mode 100644 index 35de02f..0000000 --- a/firefox-locale-debug.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-75.0/intl/locale/LocaleService.cpp.locale-debug firefox-75.0/intl/locale/LocaleService.cpp ---- firefox-75.0/intl/locale/LocaleService.cpp.locale-debug 2020-04-06 22:42:20.196799809 +0200 -+++ firefox-75.0/intl/locale/LocaleService.cpp 2020-04-06 22:43:02.522530317 +0200 -@@ -372,8 +372,6 @@ LocaleService::GetDefaultLocale(nsACStri - // just use our hard-coded default below. - GetGREFileContents("update.locale", &locale); - locale.Trim(" \t\n\r"); -- // This should never be empty. -- MOZ_ASSERT(!locale.IsEmpty()); - if (CanonicalizeLanguageId(locale)) { - mDefaultLocale.Assign(locale); - } diff --git a/firefox-mozconfig b/firefox-mozconfig index 5d2ef9d..cc9fda8 100644 --- a/firefox-mozconfig +++ b/firefox-mozconfig @@ -1,20 +1,23 @@ . $topsrcdir/browser/config/mozconfig +ac_add_options --enable-default-toolkit=cairo-gtk3 + +ac_add_options --prefix="$PREFIX" +ac_add_options --libdir="$LIBDIR" ac_add_options --with-system-zlib ac_add_options --disable-strip +ac_add_options --disable-tests #ac_add_options --enable-libnotify ac_add_options --enable-necko-wifi ac_add_options --disable-updater ac_add_options --enable-chrome-format=omni ac_add_options --enable-pulseaudio -ac_add_options --enable-av1 -ac_add_options --without-system-icu -ac_add_options --enable-release -ac_add_options --update-channel=release -# Workaround for mozbz#1341234 -ac_add_options BINDGEN_CFLAGS="$(pkg-config nspr pixman-1 --cflags)" +ac_add_options --with-system-icu +ac_add_options --with-mozilla-api-keyfile=../mozilla-api-key +ac_add_options --with-google-location-service-api-keyfile=../google-api-key +ac_add_options --with-google-safebrowsing-api-keyfile=../google-api-key +ac_add_options --disable-av1 ac_add_options --allow-addon-sideload -ac_add_options --with-system-fdk-aac export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 diff --git a/firefox-nss-version.patch b/firefox-nss-version.patch deleted file mode 100644 index fee93bb..0000000 --- a/firefox-nss-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-78.0/toolkit/moz.configure.nss-version firefox-78.0/toolkit/moz.configure ---- firefox-78.0/toolkit/moz.configure.nss-version 2020-06-30 08:47:09.657501414 +0200 -+++ firefox-78.0/toolkit/moz.configure 2020-06-30 08:47:12.652510169 +0200 -@@ -2089,7 +2089,7 @@ option('--with-system-nss', help='Use sy - - imply_option('--with-system-nspr', True, when='--with-system-nss') - --nss_pkg = pkg_check_modules('NSS', 'nss >= 3.53.1', when='--with-system-nss', config=False) -+nss_pkg = pkg_check_modules('NSS', 'nss >= 3.53.0', when='--with-system-nss', config=False) - - set_config('MOZ_SYSTEM_NSS', True, when='--with-system-nss') - diff --git a/firefox-pipewire-0-2.patch b/firefox-pipewire-0-2.patch deleted file mode 100644 index b1c6950..0000000 --- a/firefox-pipewire-0-2.patch +++ /dev/null @@ -1,526 +0,0 @@ -diff -up firefox-79.0/config/system-headers.mozbuild.firefox-pipewire-0-2 firefox-79.0/config/system-headers.mozbuild ---- firefox-79.0/config/system-headers.mozbuild.firefox-pipewire-0-2 2020-07-21 00:49:36.000000000 +0200 -+++ firefox-79.0/config/system-headers.mozbuild 2020-07-29 11:03:51.455284187 +0200 -@@ -314,6 +314,7 @@ system_headers = [ - 'Gestalt.h', - 'getopt.h', - 'gio/gio.h', -+ 'gio/gunixfdlist.h', - 'glibconfig.h', - 'glib.h', - 'glib-object.h', -@@ -607,6 +608,7 @@ system_headers = [ - 'Pgenerr.h', - 'PGenErr.h', - 'Ph.h', -+ 'pipewire/pipewire.h', - 'pixman.h', - 'pk11func.h', - 'pk11pqg.h', -diff -up firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build.firefox-pipewire-0-2 firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build ---- firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build.firefox-pipewire-0-2 2020-07-29 11:03:51.455284187 +0200 -+++ firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build 2020-07-29 11:04:40.898017241 +0200 -@@ -231,6 +231,27 @@ if CONFIG["OS_TARGET"] == "OpenBSD": - "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc" - ] - -+# PipeWire specific files -+if CONFIG["OS_TARGET"] == "Linux": -+ -+ DEFINES["WEBRTC_USE_PIPEWIRE"] = "1" -+ -+ OS_LIBS += [ -+ "rt", -+ "pipewire-0.2", -+ "glib-2.0", -+ "gio-2.0", -+ "gobject-2.0" -+ ] -+ -+ CXXFLAGS += CONFIG['TK_CFLAGS'] -+ -+ UNIFIED_SOURCES += [ -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc", -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc", -+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc" -+ ] -+ - if CONFIG["OS_TARGET"] == "WINNT": - - DEFINES["CERT_CHAIN_PARA_HAS_EXTRA_FIELDS"] = True -diff -up firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h.firefox-pipewire-0-2 firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h ---- firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h.firefox-pipewire-0-2 2020-07-20 22:54:16.000000000 +0200 -+++ firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h 2020-07-29 11:03:51.456284181 +0200 -@@ -141,7 +141,7 @@ class DesktopCaptureOptions { - bool disable_effects_ = true; - bool detect_updated_region_ = false; - #if defined(WEBRTC_USE_PIPEWIRE) -- bool allow_pipewire_ = false; -+ bool allow_pipewire_ = true; - #endif - }; - -diff -up firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.firefox-pipewire-0-2 firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc ---- firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.firefox-pipewire-0-2 2020-07-20 22:54:27.000000000 +0200 -+++ firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc 2020-07-29 11:03:51.618283306 +0200 -@@ -18,6 +18,11 @@ - #include - #include - -+#include -+#include -+#include -+#include -+ - #include - #include - -@@ -36,6 +41,27 @@ const char kSessionInterfaceName[] = "or - const char kRequestInterfaceName[] = "org.freedesktop.portal.Request"; - const char kScreenCastInterfaceName[] = "org.freedesktop.portal.ScreenCast"; - -+ -+// static -+void BaseCapturerPipeWire::SyncDmaBuf(int fd, uint64_t start_or_end) { -+ struct dma_buf_sync sync = { 0 }; -+ -+ sync.flags = start_or_end | DMA_BUF_SYNC_READ; -+ -+ while(true) { -+ int ret; -+ ret = ioctl (fd, DMA_BUF_IOCTL_SYNC, &sync); -+ if (ret == -1 && errno == EINTR) { -+ continue; -+ } else if (ret == -1) { -+ RTC_LOG(LS_ERROR) << "Failed to synchronize DMA buffer: " << g_strerror(errno); -+ break; -+ } else { -+ break; -+ } -+ } -+} -+ - // static - void BaseCapturerPipeWire::OnStateChanged(void* data, - pw_remote_state old_state, -@@ -108,11 +134,13 @@ void BaseCapturerPipeWire::OnStreamForma - auto stride = SPA_ROUND_UP_N(width * kBytesPerPixel, 4); - auto size = height * stride; - -+ that->desktop_size_ = DesktopSize(width, height); -+ - uint8_t buffer[1024] = {}; - auto builder = spa_pod_builder{buffer, sizeof(buffer)}; - - // Setup buffers and meta header for new format. -- const struct spa_pod* params[2]; -+ const struct spa_pod* params[3]; - params[0] = reinterpret_cast(spa_pod_builder_object( - &builder, - // id to enumerate buffer requirements -@@ -141,8 +169,14 @@ void BaseCapturerPipeWire::OnStreamForma - // Size: size of the metadata, specified as integer (i) - ":", that->pw_core_type_->param_meta.size, "i", - sizeof(struct spa_meta_header))); -- -- pw_stream_finish_format(that->pw_stream_, /*res=*/0, params, /*n_params=*/2); -+ params[2] = reinterpret_cast( -+ spa_pod_builder_object(&builder, that->pw_core_type_->param.idMeta, -+ that->pw_core_type_->param_meta.Meta, ":", -+ that->pw_core_type_->param_meta.type, "I", -+ that->pw_core_type_->meta.VideoCrop, ":", -+ that->pw_core_type_->param_meta.size, "i", -+ sizeof(struct spa_meta_video_crop))); -+ pw_stream_finish_format(that->pw_stream_, /*res=*/0, params, /*n_params=*/3); - } - - // static -@@ -150,15 +184,25 @@ void BaseCapturerPipeWire::OnStreamProce - BaseCapturerPipeWire* that = static_cast(data); - RTC_DCHECK(that); - -- pw_buffer* buf = nullptr; -+ struct pw_buffer *next_buffer; -+ struct pw_buffer *buffer = nullptr; - -- if (!(buf = pw_stream_dequeue_buffer(that->pw_stream_))) { -+ next_buffer = pw_stream_dequeue_buffer(that->pw_stream_); -+ while (next_buffer) { -+ buffer = next_buffer; -+ next_buffer = pw_stream_dequeue_buffer(that->pw_stream_); -+ -+ if (next_buffer) -+ pw_stream_queue_buffer (that->pw_stream_, buffer); -+ } -+ -+ if (!buffer) { - return; - } - -- that->HandleBuffer(buf); -+ that->HandleBuffer(buffer); - -- pw_stream_queue_buffer(that->pw_stream_, buf); -+ pw_stream_queue_buffer(that->pw_stream_, buffer); - } - - BaseCapturerPipeWire::BaseCapturerPipeWire(CaptureSourceType source_type) -@@ -197,10 +241,6 @@ BaseCapturerPipeWire::~BaseCapturerPipeW - pw_loop_destroy(pw_loop_); - } - -- if (current_frame_) { -- free(current_frame_); -- } -- - if (start_request_signal_id_) { - g_dbus_connection_signal_unsubscribe(connection_, start_request_signal_id_); - } -@@ -290,12 +330,7 @@ void BaseCapturerPipeWire::InitPipeWireT - - void BaseCapturerPipeWire::CreateReceivingStream() { - spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1}; -- spa_rectangle pwScreenBounds = -- spa_rectangle{static_cast(desktop_size_.width()), -- static_cast(desktop_size_.height())}; -- -- spa_fraction pwFrameRateMin = spa_fraction{0, 1}; -- spa_fraction pwFrameRateMax = spa_fraction{60, 1}; -+ spa_rectangle pwMaxScreenBounds = spa_rectangle{INT32_MAX, INT32_MAX}; - - pw_properties* reuseProps = pw_properties_new("pipewire.client.reuse", "1", - /*end of varargs*/ nullptr); -@@ -313,27 +348,19 @@ void BaseCapturerPipeWire::CreateReceivi - // then allowed formats are enumerated (e) and the format is undecided (u) - // to allow negotiation - ":", pw_type_->format_video.format, "Ieu", pw_type_->video_format.BGRx, -- SPA_POD_PROP_ENUM(2, pw_type_->video_format.RGBx, -- pw_type_->video_format.BGRx), -+ SPA_POD_PROP_ENUM( -+ 4, pw_type_->video_format.RGBx, pw_type_->video_format.BGRx, -+ pw_type_->video_format.RGBA, pw_type_->video_format.BGRA), - // Video size: specified as rectangle (R), preferred size is specified as - // first parameter, then allowed size is defined as range (r) from min and - // max values and the format is undecided (u) to allow negotiation -- ":", pw_type_->format_video.size, "Rru", &pwScreenBounds, 2, -- &pwMinScreenBounds, &pwScreenBounds, -- // Frame rate: specified as fraction (F) and set to minimum frame rate -- // value -- ":", pw_type_->format_video.framerate, "F", &pwFrameRateMin, -- // Max frame rate: specified as fraction (F), preferred frame rate is set -- // to maximum value, then allowed frame rate is defined as range (r) from -- // min and max values and it is undecided (u) to allow negotiation -- ":", pw_type_->format_video.max_framerate, "Fru", &pwFrameRateMax, 2, -- &pwFrameRateMin, &pwFrameRateMax)); -+ ":", pw_type_->format_video.size, "Rru", &pwMinScreenBounds, -+ SPA_POD_PROP_MIN_MAX(&pwMinScreenBounds, &pwMaxScreenBounds))); - - pw_stream_add_listener(pw_stream_, &spa_stream_listener_, &pw_stream_events_, - this); - pw_stream_flags flags = static_cast( -- PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE | -- PW_STREAM_FLAG_MAP_BUFFERS); -+ PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE); - if (pw_stream_connect(pw_stream_, PW_DIRECTION_INPUT, /*port_path=*/nullptr, - flags, params, - /*n_params=*/1) != 0) { -@@ -344,15 +371,81 @@ void BaseCapturerPipeWire::CreateReceivi - } - - void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) { -+ struct spa_meta_video_crop* video_crop; - spa_buffer* spaBuffer = buffer->buffer; -- void* src = nullptr; -+ uint8_t *map = nullptr; -+ uint8_t* src = nullptr; -+ uint8_t* dst = nullptr; -+ -+ if (spaBuffer->datas[0].chunk->size == 0) { -+ map = nullptr; -+ src = nullptr; -+ } else if (spaBuffer->datas[0].type == pw_core_type_->data.MemFd) { -+ map = static_cast(mmap( -+ nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset, -+ PROT_READ, MAP_PRIVATE, spaBuffer->datas[0].fd, 0)); -+ src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t); -+ } else if (spaBuffer->datas[0].type == pw_core_type_->data.DmaBuf) { -+ int fd; -+ fd = spaBuffer->datas[0].fd; -+ -+ map = static_cast(mmap( -+ nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset, -+ PROT_READ, MAP_PRIVATE, fd, 0)); -+ SyncDmaBuf(fd, DMA_BUF_SYNC_START); -+ -+ src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t); -+ } else if (spaBuffer->datas[0].type == pw_core_type_->data.MemPtr) { -+ map = nullptr; -+ src = static_cast(spaBuffer->datas[0].data); -+ } else { -+ return; -+ } - -- if (!(src = spaBuffer->datas[0].data)) { -+ if (!src) { - return; - } - -- uint32_t maxSize = spaBuffer->datas[0].maxsize; -- int32_t srcStride = spaBuffer->datas[0].chunk->stride; -+ DesktopSize prev_crop_size = DesktopSize(0, 0); -+ if (video_crop_size_initialized_) { -+ prev_crop_size = video_crop_size_; -+ } -+ -+ if ((video_crop = static_cast( -+ spa_buffer_find_meta(spaBuffer, pw_core_type_->meta.VideoCrop)))) { -+ RTC_DCHECK(video_crop->width <= desktop_size_.width() && -+ video_crop->height <= desktop_size_.height()); -+ if ((video_crop->width != desktop_size_.width() || -+ video_crop->height != desktop_size_.height()) && video_crop->width && video_crop->height) { -+ video_crop_size_ = DesktopSize(video_crop->width, video_crop->height); -+ video_crop_size_initialized_ = true; -+ } else { -+ video_crop_size_initialized_ = false; -+ } -+ } else { -+ video_crop_size_initialized_ = false; -+ } -+ -+ size_t frame_size; -+ if (video_crop_size_initialized_) { -+ frame_size = -+ video_crop_size_.width() * video_crop_size_.height() * kBytesPerPixel; -+ } else { -+ frame_size = -+ desktop_size_.width() * desktop_size_.height() * kBytesPerPixel; -+ } -+ -+ if (!current_frame_ || -+ (video_crop_size_initialized_ && !video_crop_size_.equals(prev_crop_size))) { -+ current_frame_ = std::make_unique(frame_size); -+ } -+ RTC_DCHECK(current_frame_ != nullptr); -+ -+ const int32_t dstStride = video_crop_size_initialized_ -+ ? video_crop_size_.width() * kBytesPerPixel -+ : desktop_size_.width() * kBytesPerPixel; -+ const int32_t srcStride = spaBuffer->datas[0].chunk->stride; -+ - if (srcStride != (desktop_size_.width() * kBytesPerPixel)) { - RTC_LOG(LS_ERROR) << "Got buffer with stride different from screen stride: " - << srcStride -@@ -361,21 +454,39 @@ void BaseCapturerPipeWire::HandleBuffer( - return; - } - -- if (!current_frame_) { -- current_frame_ = static_cast(malloc(maxSize)); -+ dst = current_frame_.get(); -+ -+ // Adjust source content based on crop video position -+ if (video_crop_size_initialized_ && -+ (video_crop->y + video_crop_size_.height() <= desktop_size_.height())) { -+ for (int i = 0; i < video_crop->y; ++i) { -+ src += srcStride; -+ } -+ } -+ const int xOffset = -+ video_crop_size_initialized_ && (video_crop->x + video_crop_size_.width() <= -+ desktop_size_.width()) -+ ? video_crop->x * kBytesPerPixel -+ : 0; -+ const int height = video_crop_size_initialized_ ? video_crop_size_.height() : desktop_size_.height(); -+ for (int i = 0; i < height; ++i) { -+ // Adjust source content based on crop video position if needed -+ src += xOffset; -+ std::memcpy(dst, src, dstStride); -+ // If both sides decided to go with the RGBx format we need to convert it to -+ // BGRx to match color format expected by WebRTC. -+ if (spa_video_format_->format == pw_type_->video_format.RGBx) { -+ ConvertRGBxToBGRx(dst, dstStride); -+ } -+ src += srcStride - xOffset; -+ dst += dstStride; - } -- RTC_DCHECK(current_frame_ != nullptr); - -- // If both sides decided to go with the RGBx format we need to convert it to -- // BGRx to match color format expected by WebRTC. -- if (spa_video_format_->format == pw_type_->video_format.RGBx) { -- uint8_t* tempFrame = static_cast(malloc(maxSize)); -- std::memcpy(tempFrame, src, maxSize); -- ConvertRGBxToBGRx(tempFrame, maxSize); -- std::memcpy(current_frame_, tempFrame, maxSize); -- free(tempFrame); -- } else { -- std::memcpy(current_frame_, src, maxSize); -+ if (map) { -+ if (spaBuffer->datas[0].type == pw_core_type_->data.DmaBuf) { -+ SyncDmaBuf(spaBuffer->datas[0].fd, DMA_BUF_SYNC_END); -+ } -+ munmap(map, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset); - } - } - -@@ -725,10 +836,6 @@ void BaseCapturerPipeWire::OnStartReques - g_variant_get(variant, "(u@a{sv})", &stream_id, &options); - RTC_DCHECK(options != nullptr); - -- g_variant_lookup(options, "size", "(ii)", &width, &height); -- -- that->desktop_size_.set(width, height); -- - g_variant_unref(options); - g_variant_unref(variant); - } -@@ -813,10 +920,15 @@ void BaseCapturerPipeWire::CaptureFrame( - return; - } - -- std::unique_ptr result(new BasicDesktopFrame(desktop_size_)); -+ DesktopSize frame_size = desktop_size_; -+ if (video_crop_size_initialized_) { -+ frame_size = video_crop_size_; -+ } -+ -+ std::unique_ptr result(new BasicDesktopFrame(frame_size)); - result->CopyPixelsFrom( -- current_frame_, (desktop_size_.width() * kBytesPerPixel), -- DesktopRect::MakeWH(desktop_size_.width(), desktop_size_.height())); -+ current_frame_.get(), (frame_size.width() * kBytesPerPixel), -+ DesktopRect::MakeWH(frame_size.width(), frame_size.height())); - if (!result) { - callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); - return; -@@ -837,4 +949,22 @@ bool BaseCapturerPipeWire::SelectSource( - return true; - } - -+// static -+std::unique_ptr -+BaseCapturerPipeWire::CreateRawScreenCapturer( -+ const DesktopCaptureOptions& options) { -+ std::unique_ptr capturer = -+ std::make_unique(BaseCapturerPipeWire::CaptureSourceType::kAny); -+ return std::move(capturer);} -+ -+// static -+std::unique_ptr -+BaseCapturerPipeWire::CreateRawWindowCapturer( -+ const DesktopCaptureOptions& options) { -+ -+ std::unique_ptr capturer = -+ std::make_unique(BaseCapturerPipeWire::CaptureSourceType::kAny); -+ return std::move(capturer); -+} -+ - } // namespace webrtc -diff -up firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h.firefox-pipewire-0-2 firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h ---- firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h.firefox-pipewire-0-2 2020-07-20 22:54:40.000000000 +0200 -+++ firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h 2020-07-29 11:03:51.619283301 +0200 -@@ -32,7 +32,11 @@ class PipeWireType { - - class BaseCapturerPipeWire : public DesktopCapturer { - public: -- enum CaptureSourceType { Screen = 1, Window }; -+ enum CaptureSourceType : uint32_t { -+ kScreen = 0b01, -+ kWindow = 0b10, -+ kAny = 0b11 -+ }; - - explicit BaseCapturerPipeWire(CaptureSourceType source_type); - ~BaseCapturerPipeWire() override; -@@ -43,6 +47,12 @@ class BaseCapturerPipeWire : public Desk - bool GetSourceList(SourceList* sources) override; - bool SelectSource(SourceId id) override; - -+ static std::unique_ptr CreateRawScreenCapturer( -+ const DesktopCaptureOptions& options); -+ -+ static std::unique_ptr CreateRawWindowCapturer( -+ const DesktopCaptureOptions& options); -+ - private: - // PipeWire types --> - pw_core* pw_core_ = nullptr; -@@ -64,7 +74,7 @@ class BaseCapturerPipeWire : public Desk - gint32 pw_fd_ = -1; - - CaptureSourceType capture_source_type_ = -- BaseCapturerPipeWire::CaptureSourceType::Screen; -+ BaseCapturerPipeWire::CaptureSourceType::kAny; - - // <-- end of PipeWire types - -@@ -78,10 +88,12 @@ class BaseCapturerPipeWire : public Desk - guint sources_request_signal_id_ = 0; - guint start_request_signal_id_ = 0; - -+ bool video_crop_size_initialized_ = false; -+ DesktopSize video_crop_size_;; - DesktopSize desktop_size_ = {}; - DesktopCaptureOptions options_ = {}; - -- uint8_t* current_frame_ = nullptr; -+ std::unique_ptr current_frame_; - Callback* callback_ = nullptr; - - bool portal_init_failed_ = false; -@@ -95,6 +107,7 @@ class BaseCapturerPipeWire : public Desk - - void ConvertRGBxToBGRx(uint8_t* frame, uint32_t size); - -+ static void SyncDmaBuf(int fd, uint64_t start_or_end); - static void OnStateChanged(void* data, - pw_remote_state old_state, - pw_remote_state state, -diff -up firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc.firefox-pipewire-0-2 firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc ---- firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc.firefox-pipewire-0-2 2020-07-20 22:53:57.000000000 +0200 -+++ firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc 2020-07-29 11:03:51.619283301 +0200 -@@ -15,7 +15,7 @@ - namespace webrtc { - - ScreenCapturerPipeWire::ScreenCapturerPipeWire() -- : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Screen) {} -+ : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::kScreen) {} - ScreenCapturerPipeWire::~ScreenCapturerPipeWire() {} - - // static -diff -up firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc.firefox-pipewire-0-2 firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc ---- firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc.firefox-pipewire-0-2 2020-07-20 22:54:18.000000000 +0200 -+++ firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc 2020-07-29 11:03:51.619283301 +0200 -@@ -15,7 +15,7 @@ - namespace webrtc { - - WindowCapturerPipeWire::WindowCapturerPipeWire() -- : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::Window) {} -+ : BaseCapturerPipeWire(BaseCapturerPipeWire::CaptureSourceType::kWindow) {} - WindowCapturerPipeWire::~WindowCapturerPipeWire() {} - - // static -diff -up firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc.firefox-pipewire-0-2 firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc ---- firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc.firefox-pipewire-0-2 2020-07-20 22:54:40.000000000 +0200 -+++ firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc 2020-07-29 11:03:51.620283296 +0200 -@@ -26,7 +26,7 @@ std::unique_ptr Desktop - const DesktopCaptureOptions& options) { - #if defined(WEBRTC_USE_PIPEWIRE) - if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { -- return ScreenCapturerPipeWire::CreateRawScreenCapturer(options); -+ return BaseCapturerPipeWire::CreateRawScreenCapturer(options); - } - #endif // defined(WEBRTC_USE_PIPEWIRE) - -diff -up firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc.firefox-pipewire-0-2 firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc ---- firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc.firefox-pipewire-0-2 2020-07-20 22:53:32.000000000 +0200 -+++ firefox-79.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc 2020-07-29 11:03:51.620283296 +0200 -@@ -26,7 +26,7 @@ std::unique_ptr Desktop - const DesktopCaptureOptions& options) { - #if defined(WEBRTC_USE_PIPEWIRE) - if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { -- return WindowCapturerPipeWire::CreateRawWindowCapturer(options); -+ return BaseCapturerPipeWire::CreateRawWindowCapturer(options); - } - #endif // defined(WEBRTC_USE_PIPEWIRE) - diff --git a/firefox-pipewire-0-3.patch b/firefox-pipewire-0-3.patch index 8dc7eed..0844209 100644 --- a/firefox-pipewire-0-3.patch +++ b/firefox-pipewire-0-3.patch @@ -1,6 +1,7 @@ -diff -up firefox-81.0/config/system-headers.mozbuild.firefox-pipewire-0-3 firefox-81.0/config/system-headers.mozbuild ---- firefox-81.0/config/system-headers.mozbuild.firefox-pipewire-0-3 2020-09-15 03:48:26.000000000 +0200 -+++ firefox-81.0/config/system-headers.mozbuild 2020-09-15 14:40:00.721481417 +0200 +diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild +index 2081d0c683a4..641133bf1ea4 100644 +--- a/config/system-headers.mozbuild ++++ b/config/system-headers.mozbuild @@ -314,6 +314,7 @@ system_headers = [ 'Gestalt.h', 'getopt.h', @@ -17,9 +18,10 @@ diff -up firefox-81.0/config/system-headers.mozbuild.firefox-pipewire-0-3 firefo 'pixman.h', 'pk11func.h', 'pk11pqg.h', -diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn.firefox-pipewire-0-3 firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn ---- firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn.firefox-pipewire-0-3 2020-09-15 03:48:32.000000000 +0200 -+++ firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn 2020-09-15 14:40:00.721481417 +0200 +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn b/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn +index ba885217b3ba..201d3b755221 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn @@ -158,7 +158,7 @@ if (rtc_include_tests) { if (is_linux) { if (rtc_use_pipewire) { @@ -29,15 +31,17 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn defines = [ "WEBRTC_USE_PIPEWIRE" ] } -diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build.firefox-pipewire-0-3 firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build ---- firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build.firefox-pipewire-0-3 2020-09-15 14:40:00.722481420 +0200 -+++ firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build 2020-09-15 14:48:47.454733146 +0200 -@@ -193,6 +193,28 @@ if CONFIG["OS_TARGET"] == "Linux": +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build +index 90b40431c7e4..d844aa79d591 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_generic_gn/moz.build +@@ -194,6 +194,30 @@ if CONFIG["OS_TARGET"] == "Linux": "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc" ] +# PipeWire specific files +if CONFIG["OS_TARGET"] == "Linux": ++ + DEFINES["WEBRTC_USE_PIPEWIRE"] = "1" + + OS_LIBS += [ @@ -57,13 +61,15 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_ + "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc", + "/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc" + ] ++ + if CONFIG["OS_TARGET"] == "NetBSD": DEFINES["USE_X11"] = "1" -diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h.firefox-pipewire-0-3 firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h ---- firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h.firefox-pipewire-0-3 2020-09-15 03:48:32.000000000 +0200 -+++ firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h 2020-09-15 14:40:00.722481420 +0200 +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h +index 1eb8ead26efa..316468eed1fc 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_options.h @@ -141,7 +141,7 @@ class DesktopCaptureOptions { bool disable_effects_ = true; bool detect_updated_region_ = false; @@ -73,9 +79,10 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_ #endif }; -diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.firefox-pipewire-0-3 firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc ---- firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.firefox-pipewire-0-3 2020-09-15 03:48:32.000000000 +0200 -+++ firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc 2020-09-15 14:40:00.722481420 +0200 +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc +index 379341c833de..76349f1fbd4d 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc @@ -15,8 +15,11 @@ #include @@ -90,20 +97,17 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba #include #include -@@ -36,32 +39,37 @@ const char kSessionInterfaceName[] = "or +@@ -36,31 +39,36 @@ const char kSessionInterfaceName[] = "org.freedesktop.portal.Session"; const char kRequestInterfaceName[] = "org.freedesktop.portal.Request"; const char kScreenCastInterfaceName[] = "org.freedesktop.portal.ScreenCast"; -+ - // static +-// static -void BaseCapturerPipeWire::OnStateChanged(void* data, - pw_remote_state old_state, - pw_remote_state state, - const char* error_message) { - BaseCapturerPipeWire* that = static_cast(data); - RTC_DCHECK(that); -+void BaseCapturerPipeWire::SyncDmaBuf(int fd, uint64_t start_or_end) { -+ struct dma_buf_sync sync = { 0 }; - switch (state) { - case PW_REMOTE_STATE_ERROR: @@ -115,6 +119,10 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba - break; - case PW_REMOTE_STATE_CONNECTING: - RTC_LOG(LS_INFO) << "PipeWire remote state: connecting."; ++// static ++void BaseCapturerPipeWire::SyncDmaBuf(int fd, uint64_t start_or_end) { ++ struct dma_buf_sync sync = { 0 }; ++ + sync.flags = start_or_end | DMA_BUF_SYNC_READ; + + while(true) { @@ -133,7 +141,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba } } - // static ++// static +void BaseCapturerPipeWire::OnCoreError(void *data, + uint32_t id, + int seq, @@ -142,11 +150,10 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba + RTC_LOG(LS_ERROR) << "core error: " << message; +} + -+// static + // static void BaseCapturerPipeWire::OnStreamStateChanged(void* data, pw_stream_state old_state, - pw_stream_state state, -@@ -73,76 +81,54 @@ void BaseCapturerPipeWire::OnStreamState +@@ -73,76 +81,54 @@ void BaseCapturerPipeWire::OnStreamStateChanged(void* data, case PW_STREAM_STATE_ERROR: RTC_LOG(LS_ERROR) << "PipeWire stream state error: " << error_message; break; @@ -249,7 +256,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba } // static -@@ -150,15 +136,25 @@ void BaseCapturerPipeWire::OnStreamProce +@@ -150,15 +136,25 @@ void BaseCapturerPipeWire::OnStreamProcess(void* data) { BaseCapturerPipeWire* that = static_cast(data); RTC_DCHECK(that); @@ -261,12 +268,12 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba + while (next_buffer) { + buffer = next_buffer; + next_buffer = pw_stream_dequeue_buffer(that->pw_stream_); -+ + +- if (!(buf = pw_stream_dequeue_buffer(that->pw_stream_))) { + if (next_buffer) + pw_stream_queue_buffer (that->pw_stream_, buffer); + } - -- if (!(buf = pw_stream_dequeue_buffer(that->pw_stream_))) { ++ + if (!buffer) { return; } @@ -279,7 +286,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba } BaseCapturerPipeWire::BaseCapturerPipeWire(CaptureSourceType source_type) -@@ -169,38 +165,22 @@ BaseCapturerPipeWire::~BaseCapturerPipeW +@@ -169,38 +165,22 @@ BaseCapturerPipeWire::~BaseCapturerPipeWire() { pw_thread_loop_stop(pw_main_loop_); } @@ -322,7 +329,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba if (start_request_signal_id_) { g_dbus_connection_signal_unsubscribe(connection_, start_request_signal_id_); } -@@ -250,27 +230,35 @@ void BaseCapturerPipeWire::InitPortal() +@@ -250,27 +230,35 @@ void BaseCapturerPipeWire::InitPortal() { void BaseCapturerPipeWire::InitPipeWire() { pw_init(/*argc=*/nullptr, /*argc=*/nullptr); @@ -371,33 +378,32 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba if (pw_thread_loop_start(pw_main_loop_) < 0) { RTC_LOG(LS_ERROR) << "Failed to start main PipeWire loop"; -@@ -278,81 +266,132 @@ void BaseCapturerPipeWire::InitPipeWire( +@@ -278,81 +266,132 @@ void BaseCapturerPipeWire::InitPipeWire() { } } -void BaseCapturerPipeWire::InitPipeWireTypes() { - spa_type_map* map = pw_core_type_->map; - pw_type_ = new PipeWireType(); -+pw_stream* BaseCapturerPipeWire::CreateReceivingStream() { -+ spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1}; -+ spa_rectangle pwMaxScreenBounds = spa_rectangle{INT32_MAX, INT32_MAX}; - +- - spa_type_media_type_map(map, &pw_type_->media_type); - spa_type_media_subtype_map(map, &pw_type_->media_subtype); - spa_type_format_video_map(map, &pw_type_->format_video); - spa_type_video_format_map(map, &pw_type_->video_format); -} -+ auto stream = pw_stream_new(pw_core_, "webrtc-pipewire-stream", nullptr); - +- -void BaseCapturerPipeWire::CreateReceivingStream() { -- spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1}; ++pw_stream* BaseCapturerPipeWire::CreateReceivingStream() { + spa_rectangle pwMinScreenBounds = spa_rectangle{1, 1}; - spa_rectangle pwScreenBounds = - spa_rectangle{static_cast(desktop_size_.width()), - static_cast(desktop_size_.height())}; -- ++ spa_rectangle pwMaxScreenBounds = spa_rectangle{INT32_MAX, INT32_MAX}; + - spa_fraction pwFrameRateMin = spa_fraction{0, 1}; - spa_fraction pwFrameRateMax = spa_fraction{60, 1}; -- ++ auto stream = pw_stream_new(pw_core_, "webrtc-pipewire-stream", nullptr); + - pw_properties* reuseProps = pw_properties_new("pipewire.client.reuse", "1", - /*end of varargs*/ nullptr); - pw_stream_ = pw_stream_new(pw_remote_, "webrtc-consume-stream", reuseProps); @@ -433,6 +439,9 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba - // min and max values and it is undecided (u) to allow negotiation - ":", pw_type_->format_video.max_framerate, "Fru", &pwFrameRateMax, 2, - &pwFrameRateMin, &pwFrameRateMax)); +- +- pw_stream_add_listener(pw_stream_, &spa_stream_listener_, &pw_stream_events_, +- this); + const spa_pod* params[2]; + spa_pod_builder builder = SPA_POD_BUILDER_INIT(buffer, sizeof (buffer)); + @@ -447,9 +456,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba + &pwMaxScreenBounds), + 0)); + pw_stream_add_listener(stream, &spa_stream_listener_, &pw_stream_events_, this); - -- pw_stream_add_listener(pw_stream_, &spa_stream_listener_, &pw_stream_events_, -- this); ++ pw_stream_flags flags = static_cast( - PW_STREAM_FLAG_AUTOCONNECT | PW_STREAM_FLAG_INACTIVE | - PW_STREAM_FLAG_MAP_BUFFERS); @@ -492,7 +499,8 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba + } else if (spaBuffer->datas[0].type == SPA_DATA_DmaBuf) { + int fd; + fd = spaBuffer->datas[0].fd; -+ + +- if (!(src = spaBuffer->datas[0].data)) { + map = static_cast(mmap( + nullptr, spaBuffer->datas[0].maxsize + spaBuffer->datas[0].mapoffset, + PROT_READ, MAP_PRIVATE, fd, 0)); @@ -501,8 +509,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba + RTC_LOG(LS_ERROR) << "Failed to mmap the memory: " << std::strerror(errno); + return; + } - -- if (!(src = spaBuffer->datas[0].data)) { ++ + SyncDmaBuf(fd, DMA_BUF_SYNC_START); + + src = SPA_MEMBER(map, spaBuffer->datas[0].mapoffset, uint8_t); @@ -562,7 +569,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba if (srcStride != (desktop_size_.width() * kBytesPerPixel)) { RTC_LOG(LS_ERROR) << "Got buffer with stride different from screen stride: " << srcStride -@@ -361,21 +400,40 @@ void BaseCapturerPipeWire::HandleBuffer( +@@ -361,21 +400,40 @@ void BaseCapturerPipeWire::HandleBuffer(pw_buffer* buffer) { return; } @@ -616,7 +623,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba } } -@@ -725,10 +783,7 @@ void BaseCapturerPipeWire::OnStartReques +@@ -725,10 +783,7 @@ void BaseCapturerPipeWire::OnStartRequestResponseSignal( g_variant_get(variant, "(u@a{sv})", &stream_id, &options); RTC_DCHECK(options != nullptr); @@ -628,7 +635,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba g_variant_unref(options); g_variant_unref(variant); } -@@ -813,10 +868,15 @@ void BaseCapturerPipeWire::CaptureFrame( +@@ -813,10 +868,15 @@ void BaseCapturerPipeWire::CaptureFrame() { return; } @@ -647,7 +654,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba if (!result) { callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); return; -@@ -837,4 +897,22 @@ bool BaseCapturerPipeWire::SelectSource( +@@ -837,4 +897,22 @@ bool BaseCapturerPipeWire::SelectSource(SourceId id) { return true; } @@ -670,9 +677,10 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba +} + } // namespace webrtc -diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h.firefox-pipewire-0-3 firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h ---- firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h.firefox-pipewire-0-3 2020-09-15 03:48:32.000000000 +0200 -+++ firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h 2020-09-15 14:40:00.722481420 +0200 +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h +index 56b101acbaa6..de54157d1a2a 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.h @@ -22,17 +22,13 @@ namespace webrtc { @@ -696,7 +704,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba explicit BaseCapturerPipeWire(CaptureSourceType source_type); ~BaseCapturerPipeWire() override; -@@ -43,28 +39,32 @@ class BaseCapturerPipeWire : public Desk +@@ -43,28 +39,32 @@ class BaseCapturerPipeWire : public DesktopCapturer { bool GetSourceList(SourceList* sources) override; bool SelectSource(SourceId id) override; @@ -737,7 +745,7 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba // <-- end of PipeWire types -@@ -78,33 +78,37 @@ class BaseCapturerPipeWire : public Desk +@@ -78,33 +78,37 @@ class BaseCapturerPipeWire : public DesktopCapturer { guint sources_request_signal_id_ = 0; guint start_request_signal_id_ = 0; @@ -784,9 +792,10 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/ba static void OnStreamProcess(void* data); static void OnNewBuffer(void* data, uint32_t id); -diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc.firefox-pipewire-0-3 firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc ---- firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc.firefox-pipewire-0-3 2020-09-15 03:48:32.000000000 +0200 -+++ firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc 2020-09-15 14:40:00.722481420 +0200 +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc +index 26956fc67dc8..3813d697bb38 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/screen_capturer_pipewire.cc @@ -15,7 +15,7 @@ namespace webrtc { @@ -796,9 +805,10 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/sc ScreenCapturerPipeWire::~ScreenCapturerPipeWire() {} // static -diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc.firefox-pipewire-0-3 firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc ---- firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc.firefox-pipewire-0-3 2020-09-15 03:48:32.000000000 +0200 -+++ firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc 2020-09-15 14:40:00.722481420 +0200 +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc +index 35436475cb4d..c43a1f1a0c4e 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/window_capturer_pipewire.cc @@ -15,7 +15,7 @@ namespace webrtc { @@ -808,10 +818,11 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/linux/wi WindowCapturerPipeWire::~WindowCapturerPipeWire() {} // static -diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc.firefox-pipewire-0-3 firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc ---- firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc.firefox-pipewire-0-3 2020-09-15 03:48:32.000000000 +0200 -+++ firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc 2020-09-15 14:40:00.722481420 +0200 -@@ -26,7 +26,7 @@ std::unique_ptr Desktop +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc +index cf8a9dd0e0db..d27fab8d28d9 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc +@@ -26,7 +26,7 @@ std::unique_ptr DesktopCapturer::CreateRawScreenCapturer( const DesktopCaptureOptions& options) { #if defined(WEBRTC_USE_PIPEWIRE) if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { @@ -820,10 +831,11 @@ diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_c } #endif // defined(WEBRTC_USE_PIPEWIRE) -diff -up firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc.firefox-pipewire-0-3 firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc ---- firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc.firefox-pipewire-0-3 2020-09-15 03:48:32.000000000 +0200 -+++ firefox-81.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc 2020-09-15 14:40:00.722481420 +0200 -@@ -26,7 +26,7 @@ std::unique_ptr Desktop +diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc +index 82359e50c2db..bb9724cf7cc2 100644 +--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc ++++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc +@@ -26,7 +26,7 @@ std::unique_ptr DesktopCapturer::CreateRawWindowCapturer( const DesktopCaptureOptions& options) { #if defined(WEBRTC_USE_PIPEWIRE) if (options.allow_pipewire() && DesktopCapturer::IsRunningUnderWayland()) { diff --git a/firefox-redhat-default-prefs.js b/firefox-redhat-default-prefs.js index 89afe2c..607a132 100644 --- a/firefox-redhat-default-prefs.js +++ b/firefox-redhat-default-prefs.js @@ -3,7 +3,6 @@ pref("app.update.enabled", false); pref("app.update.autoInstallEnabled", false); pref("general.smoothScroll", true); pref("intl.locale.matchOS", true); -pref("intl.locale.requested", ""); pref("toolkit.storage.synchronous", 0); pref("toolkit.networkmanager.disable", false); pref("offline.autoDetect", true); @@ -15,23 +14,22 @@ pref("browser.shell.checkDefaultBrowser", false); pref("network.manage-offline-status", true); pref("extensions.shownSelectionUI", true); pref("ui.SpellCheckerUnderlineStyle", 1); -pref("startup.homepage_override_url", ""); -pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://start.fedoraproject.org/"); -pref("browser.newtabpage.pinned", '[{"url":"https://start.fedoraproject.org/","title":"Fedora Project - Start Page"}]'); +pref("startup.homepage_override_url", "http://www.redhat.com"); +pref("startup.homepage_welcome_url", "http://www.redhat.com"); +pref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=file:///usr/share/doc/HTML/index.html"); pref("geo.wifi.uri", "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"); pref("media.gmp-gmpopenh264.provider.enabled",false); pref("media.gmp-gmpopenh264.autoupdate",false); pref("media.gmp-gmpopenh264.enabled",false); -pref("media.gmp.decoder.enabled", true); +pref("media.gmp-gmpopenh264.enabled",false); pref("plugins.notifyMissingFlash", false); /* See https://bugzilla.redhat.com/show_bug.cgi?id=1226489 */ pref("browser.display.use_system_colors", false); pref("layers.use-image-offscreen-surfaces", false); /* Allow sending credetials to all https:// sites */ pref("network.negotiate-auth.trusted-uris", "https://"); -pref("spellchecker.dictionary_path","/usr/share/myspell"); -/* Disable DoH by default */ -pref("network.trr.mode", 5); -/* Enable per-user policy dir, see mozbz#1583466 */ -pref("browser.policies.perUserDir", true); -pref("browser.gnome-search-provider.enabled",true); \ No newline at end of file +pref("security.use_sqldb", false); +/* Use OS settings for UI language */ +pref("intl.locale.requested", ""); +/* See https://bugzilla.redhat.com/show_bug.cgi?id=1672424 */ +pref("storage.nfs_filesystem", true); \ No newline at end of file diff --git a/firefox-search-provider.ini b/firefox-search-provider.ini deleted file mode 100644 index 3868e3d..0000000 --- a/firefox-search-provider.ini +++ /dev/null @@ -1,5 +0,0 @@ -[Shell Search Provider] -DesktopId=firefox.desktop -BusName=org.mozilla.Firefox.SearchProvider -ObjectPath=/org/mozilla/Firefox/SearchProvider -Version=2 diff --git a/firefox-symbolic.svg b/firefox-symbolic.svg index 2078eea..7a2c73e 100644 --- a/firefox-symbolic.svg +++ b/firefox-symbolic.svg @@ -1,64 +1,30 @@ - - - + + + + + - + image/svg+xml - + Gnome Symbolic Icon Theme - - - + + - Gnome Symbolic Icon Theme - + Gnome Symbolic Icon Theme + + + + + + + + + + + + diff --git a/firefox-vaapi-extra-frames.patch b/firefox-vaapi-extra-frames.patch deleted file mode 100644 index e26158a..0000000 --- a/firefox-vaapi-extra-frames.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-76.0.1/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp.old firefox-76.0.1/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp ---- firefox-76.0.1/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp.old 2020-05-13 14:28:26.556800474 +0200 -+++ firefox-76.0.1/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp 2020-05-13 14:28:31.562768959 +0200 -@@ -43,7 +43,7 @@ typedef int VAStatus; - #endif - - // Use some extra HW frames for potential rendering lags. --#define EXTRA_HW_FRAMES 6 -+#define EXTRA_HW_FRAMES 20 - - typedef mozilla::layers::Image Image; - typedef mozilla::layers::PlanarYCbCrImage PlanarYCbCrImage; diff --git a/firefox-wayland.desktop b/firefox-wayland.desktop deleted file mode 100644 index cd2dd61..0000000 --- a/firefox-wayland.desktop +++ /dev/null @@ -1,235 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=Firefox on Wayland -GenericName=Web Browser -Comment=Browse the Web -Exec=firefox-wayland --name firefox-wayland %u -Icon=firefox -Terminal=false -Type=Application -MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; -StartupNotify=true -Categories=Network;WebBrowser; -Keywords=web;browser;internet; -Actions=new-window;new-private-window;profile-manager-window; - -[Desktop Action new-window] -Name=Open a New Window -Name[ach]=Dirica manyen -Name[af]=Nuwe venster -Name[an]=Nueva finestra -Name[ar]=نافذة جديدة -Name[as]=নতুন উইন্ডো -Name[ast]=Ventana nueva -Name[az]=Yeni Pəncərə -Name[be]=Новае акно -Name[bg]=Нов прозорец -Name[bn_BD]=নতুন উইন্ডো (N) -Name[bn_IN]=নতুন উইন্ডো -Name[br]=Prenestr nevez -Name[brx]=गोदान उइन्ड'(N) -Name[bs]=Novi prozor -Name[ca]=Finestra nova -Name[cak]=K'ak'a' tzuwäch -Name[cs]=Nové okno -Name[cy]=Ffenestr Newydd -Name[da]=Nyt vindue -Name[de]=Neues Fenster -Name[dsb]=Nowe wokno -Name[el]=Νέο παράθυρο -Name[en_GB]=New Window -Name[en_US]=New Window -Name[en_ZA]=New Window -Name[eo]=Nova fenestro -Name[es_AR]=Nueva ventana -Name[es_CL]=Nueva ventana -Name[es_ES]=Nueva ventana -Name[es_MX]=Nueva ventana -Name[et]=Uus aken -Name[eu]=Leiho berria -Name[fa]=پنجره جدید‌ -Name[ff]=Henorde Hesere -Name[fi]=Uusi ikkuna -Name[fr]=Nouvelle fenêtre -Name[fy_NL]=Nij finster -Name[ga_IE]=Fuinneog Nua -Name[gd]=Uinneag ùr -Name[gl]=Nova xanela -Name[gn]=Ovetã pyahu -Name[gu_IN]=નવી વિન્ડો -Name[he]=חלון חדש -Name[hi_IN]=नया विंडो -Name[hr]=Novi prozor -Name[hsb]=Nowe wokno -Name[hu]=Új ablak -Name[hy_AM]=Նոր Պատուհան -Name[id]=Jendela Baru -Name[is]=Nýr gluggi -Name[it]=Nuova finestra -Name[ja]=新しいウィンドウ -Name[ja_JP-mac]=新規ウインドウ -Name[ka]=ახალი ფანჯარა -Name[kk]=Жаңа терезе -Name[km]=បង្អួច​​​ថ្មី -Name[kn]=ಹೊಸ ಕಿಟಕಿ -Name[ko]=새 창 -Name[kok]=नवें जनेल -Name[ks]=نئئ وِنڈو -Name[lij]=Neuvo barcon -Name[lo]=ຫນ້າຕ່າງໃຫມ່ -Name[lt]=Naujas langas -Name[ltg]=Jauns lūgs -Name[lv]=Jauns logs -Name[mai]=नव विंडो -Name[mk]=Нов прозорец -Name[ml]=പുതിയ ജാലകം -Name[mr]=नवीन पटल -Name[ms]=Tetingkap Baru -Name[my]=ဝင်းဒိုးအသစ် -Name[nb_NO]=Nytt vindu -Name[ne_NP]=नयाँ सञ्झ्याल -Name[nl]=Nieuw venster -Name[nn_NO]=Nytt vindauge -Name[or]=ନୂତନ ୱିଣ୍ଡୋ -Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ -Name[pl]=Nowe okno -Name[pt_BR]=Nova janela -Name[pt_PT]=Nova janela -Name[rm]=Nova fanestra -Name[ro]=Fereastră nouă -Name[ru]=Новое окно -Name[sat]=नावा विंडो (N) -Name[si]=නව කවුළුවක් -Name[sk]=Nové okno -Name[sl]=Novo okno -Name[son]=Zanfun taaga -Name[sq]=Dritare e Re -Name[sr]=Нови прозор -Name[sv_SE]=Nytt fönster -Name[ta]=புதிய சாளரம் -Name[te]=కొత్త విండో -Name[th]=หน้าต่างใหม่ -Name[tr]=Yeni pencere -Name[tsz]=Eraatarakua jimpani -Name[uk]=Нове вікно -Name[ur]=نیا دریچہ -Name[uz]=Yangi oyna -Name[vi]=Cửa sổ mới -Name[wo]=Palanteer bu bees -Name[xh]=Ifestile entsha -Name[zh_CN]=新建窗口 -Name[zh_TW]=開新視窗 -Exec=firefox-wayland --name firefox-wayland --new-window %u - -[Desktop Action new-private-window] -Name=Open a New Private Window -Name[ach]=Dirica manyen me mung -Name[af]=Nuwe privaatvenster -Name[an]=Nueva finestra privada -Name[ar]=نافذة خاصة جديدة -Name[as]=নতুন ব্যক্তিগত উইন্ডো -Name[ast]=Ventana privada nueva -Name[az]=Yeni Məxfi Pəncərə -Name[be]=Новае акно адасаблення -Name[bg]=Нов прозорец за поверително сърфиране -Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো -Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো -Name[br]=Prenestr merdeiñ prevez nevez -Name[brx]=गोदान प्राइभेट उइन्ड' -Name[bs]=Novi privatni prozor -Name[ca]=Finestra privada nova -Name[cak]=K'ak'a' ichinan tzuwäch -Name[cs]=Nové anonymní okno -Name[cy]=Ffenestr Breifat Newydd -Name[da]=Nyt privat vindue -Name[de]=Neues privates Fenster -Name[dsb]=Nowe priwatne wokno -Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης -Name[en_GB]=New Private Window -Name[en_US]=New Private Window -Name[en_ZA]=New Private Window -Name[eo]=Nova privata fenestro -Name[es_AR]=Nueva ventana privada -Name[es_CL]=Nueva ventana privada -Name[es_ES]=Nueva ventana privada -Name[es_MX]=Nueva ventana privada -Name[et]=Uus privaatne aken -Name[eu]=Leiho pribatu berria -Name[fa]=پنجره ناشناس جدید -Name[ff]=Henorde Suturo Hesere -Name[fi]=Uusi yksityinen ikkuna -Name[fr]=Nouvelle fenêtre de navigation privée -Name[fy_NL]=Nij priveefinster -Name[ga_IE]=Fuinneog Nua Phríobháideach -Name[gd]=Uinneag phrìobhaideach ùr -Name[gl]=Nova xanela privada -Name[gn]=Ovetã ñemi pyahu -Name[gu_IN]=નવી ખાનગી વિન્ડો -Name[he]=חלון פרטי חדש -Name[hi_IN]=नयी निजी विंडो -Name[hr]=Novi privatni prozor -Name[hsb]=Nowe priwatne wokno -Name[hu]=Új privát ablak -Name[hy_AM]=Սկսել Գաղտնի դիտարկում -Name[id]=Jendela Mode Pribadi Baru -Name[is]=Nýr huliðsgluggi -Name[it]=Nuova finestra anonima -Name[ja]=新しいプライベートウィンドウ -Name[ja_JP-mac]=新規プライベートウインドウ -Name[ka]=ახალი პირადი ფანჯარა -Name[kk]=Жаңа жекелік терезе -Name[km]=បង្អួច​ឯកជន​ថ្មី -Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ -Name[ko]=새 사생활 보호 모드 -Name[kok]=नवो खाजगी विंडो -Name[ks]=نْو پرایوٹ وینڈو& -Name[lij]=Neuvo barcon privou -Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ -Name[lt]=Naujas privataus naršymo langas -Name[ltg]=Jauns privatais lūgs -Name[lv]=Jauns privātais logs -Name[mai]=नया निज विंडो (W) -Name[mk]=Нов приватен прозорец -Name[ml]=പുതിയ സ്വകാര്യ ജാലകം -Name[mr]=नवीन वैयक्तिक पटल -Name[ms]=Tetingkap Persendirian Baharu -Name[my]=New Private Window -Name[nb_NO]=Nytt privat vindu -Name[ne_NP]=नयाँ निजी सञ्झ्याल -Name[nl]=Nieuw privévenster -Name[nn_NO]=Nytt privat vindauge -Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ -Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ -Name[pl]=Nowe okno prywatne -Name[pt_BR]=Nova janela privativa -Name[pt_PT]=Nova janela privada -Name[rm]=Nova fanestra privata -Name[ro]=Fereastră privată nouă -Name[ru]=Новое приватное окно -Name[sat]=नावा निजेराक् विंडो (W ) -Name[si]=නව පුද්ගලික කවුළුව (W) -Name[sk]=Nové okno v režime Súkromné prehliadanie -Name[sl]=Novo zasebno okno -Name[son]=Sutura zanfun taaga -Name[sq]=Dritare e Re Private -Name[sr]=Нови приватан прозор -Name[sv_SE]=Nytt privat fönster -Name[ta]=புதிய தனிப்பட்ட சாளரம் -Name[te]=కొత్త ఆంతరంగిక విండో -Name[th]=หน้าต่างส่วนตัวใหม่ -Name[tr]=Yeni gizli pencere -Name[tsz]=Juchiiti eraatarakua jimpani -Name[uk]=Приватне вікно -Name[ur]=نیا نجی دریچہ -Name[uz]=Yangi maxfiy oyna -Name[vi]=Cửa sổ riêng tư mới -Name[wo]=Panlanteeru biir bu bees -Name[xh]=Ifestile yangasese entsha -Name[zh_CN]=新建隐私浏览窗口 -Name[zh_TW]=新增隱私視窗 -Exec=firefox-wayland --private-window --name firefox-wayland %u - -[Desktop Action profile-manager-window] -Name=Open the Profile Manager -Name[cs]=Správa profilů -Exec=firefox-wayland --name firefox-wayland --ProfileManager diff --git a/firefox-wayland.sh.in b/firefox-wayland.sh.in deleted file mode 100644 index bd68068..0000000 --- a/firefox-wayland.sh.in +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/bash -# -# Run Firefox under Wayland -# - -export MOZ_ENABLE_WAYLAND=1 -exec /__PREFIX__/bin/firefox "$@" diff --git a/firefox-x11.desktop b/firefox-x11.desktop deleted file mode 100644 index 4124891..0000000 --- a/firefox-x11.desktop +++ /dev/null @@ -1,235 +0,0 @@ -[Desktop Entry] -Version=1.0 -Name=Firefox on X11 -GenericName=Web Browser -Comment=Browse the Web -Exec=firefox-x11 --name firefox-x11 %u -Icon=firefox -Terminal=false -Type=Application -MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; -StartupNotify=true -Categories=Network;WebBrowser; -Keywords=web;browser;internet; -Actions=new-window;new-private-window;profile-manager-window; - -[Desktop Action new-window] -Name=Open a New Window -Name[ach]=Dirica manyen -Name[af]=Nuwe venster -Name[an]=Nueva finestra -Name[ar]=نافذة جديدة -Name[as]=নতুন উইন্ডো -Name[ast]=Ventana nueva -Name[az]=Yeni Pəncərə -Name[be]=Новае акно -Name[bg]=Нов прозорец -Name[bn_BD]=নতুন উইন্ডো (N) -Name[bn_IN]=নতুন উইন্ডো -Name[br]=Prenestr nevez -Name[brx]=गोदान उइन्ड'(N) -Name[bs]=Novi prozor -Name[ca]=Finestra nova -Name[cak]=K'ak'a' tzuwäch -Name[cs]=Nové okno -Name[cy]=Ffenestr Newydd -Name[da]=Nyt vindue -Name[de]=Neues Fenster -Name[dsb]=Nowe wokno -Name[el]=Νέο παράθυρο -Name[en_GB]=New Window -Name[en_US]=New Window -Name[en_ZA]=New Window -Name[eo]=Nova fenestro -Name[es_AR]=Nueva ventana -Name[es_CL]=Nueva ventana -Name[es_ES]=Nueva ventana -Name[es_MX]=Nueva ventana -Name[et]=Uus aken -Name[eu]=Leiho berria -Name[fa]=پنجره جدید‌ -Name[ff]=Henorde Hesere -Name[fi]=Uusi ikkuna -Name[fr]=Nouvelle fenêtre -Name[fy_NL]=Nij finster -Name[ga_IE]=Fuinneog Nua -Name[gd]=Uinneag ùr -Name[gl]=Nova xanela -Name[gn]=Ovetã pyahu -Name[gu_IN]=નવી વિન્ડો -Name[he]=חלון חדש -Name[hi_IN]=नया विंडो -Name[hr]=Novi prozor -Name[hsb]=Nowe wokno -Name[hu]=Új ablak -Name[hy_AM]=Նոր Պատուհան -Name[id]=Jendela Baru -Name[is]=Nýr gluggi -Name[it]=Nuova finestra -Name[ja]=新しいウィンドウ -Name[ja_JP-mac]=新規ウインドウ -Name[ka]=ახალი ფანჯარა -Name[kk]=Жаңа терезе -Name[km]=បង្អួច​​​ថ្មី -Name[kn]=ಹೊಸ ಕಿಟಕಿ -Name[ko]=새 창 -Name[kok]=नवें जनेल -Name[ks]=نئئ وِنڈو -Name[lij]=Neuvo barcon -Name[lo]=ຫນ້າຕ່າງໃຫມ່ -Name[lt]=Naujas langas -Name[ltg]=Jauns lūgs -Name[lv]=Jauns logs -Name[mai]=नव विंडो -Name[mk]=Нов прозорец -Name[ml]=പുതിയ ജാലകം -Name[mr]=नवीन पटल -Name[ms]=Tetingkap Baru -Name[my]=ဝင်းဒိုးအသစ် -Name[nb_NO]=Nytt vindu -Name[ne_NP]=नयाँ सञ्झ्याल -Name[nl]=Nieuw venster -Name[nn_NO]=Nytt vindauge -Name[or]=ନୂତନ ୱିଣ୍ଡୋ -Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ -Name[pl]=Nowe okno -Name[pt_BR]=Nova janela -Name[pt_PT]=Nova janela -Name[rm]=Nova fanestra -Name[ro]=Fereastră nouă -Name[ru]=Новое окно -Name[sat]=नावा विंडो (N) -Name[si]=නව කවුළුවක් -Name[sk]=Nové okno -Name[sl]=Novo okno -Name[son]=Zanfun taaga -Name[sq]=Dritare e Re -Name[sr]=Нови прозор -Name[sv_SE]=Nytt fönster -Name[ta]=புதிய சாளரம் -Name[te]=కొత్త విండో -Name[th]=หน้าต่างใหม่ -Name[tr]=Yeni pencere -Name[tsz]=Eraatarakua jimpani -Name[uk]=Нове вікно -Name[ur]=نیا دریچہ -Name[uz]=Yangi oyna -Name[vi]=Cửa sổ mới -Name[wo]=Palanteer bu bees -Name[xh]=Ifestile entsha -Name[zh_CN]=新建窗口 -Name[zh_TW]=開新視窗 -Exec=firefox-x11 --name firefox-x11 --new-window %u - -[Desktop Action new-private-window] -Name=Open a New Private Window -Name[ach]=Dirica manyen me mung -Name[af]=Nuwe privaatvenster -Name[an]=Nueva finestra privada -Name[ar]=نافذة خاصة جديدة -Name[as]=নতুন ব্যক্তিগত উইন্ডো -Name[ast]=Ventana privada nueva -Name[az]=Yeni Məxfi Pəncərə -Name[be]=Новае акно адасаблення -Name[bg]=Нов прозорец за поверително сърфиране -Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো -Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো -Name[br]=Prenestr merdeiñ prevez nevez -Name[brx]=गोदान प्राइभेट उइन्ड' -Name[bs]=Novi privatni prozor -Name[ca]=Finestra privada nova -Name[cak]=K'ak'a' ichinan tzuwäch -Name[cs]=Nové anonymní okno -Name[cy]=Ffenestr Breifat Newydd -Name[da]=Nyt privat vindue -Name[de]=Neues privates Fenster -Name[dsb]=Nowe priwatne wokno -Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης -Name[en_GB]=New Private Window -Name[en_US]=New Private Window -Name[en_ZA]=New Private Window -Name[eo]=Nova privata fenestro -Name[es_AR]=Nueva ventana privada -Name[es_CL]=Nueva ventana privada -Name[es_ES]=Nueva ventana privada -Name[es_MX]=Nueva ventana privada -Name[et]=Uus privaatne aken -Name[eu]=Leiho pribatu berria -Name[fa]=پنجره ناشناس جدید -Name[ff]=Henorde Suturo Hesere -Name[fi]=Uusi yksityinen ikkuna -Name[fr]=Nouvelle fenêtre de navigation privée -Name[fy_NL]=Nij priveefinster -Name[ga_IE]=Fuinneog Nua Phríobháideach -Name[gd]=Uinneag phrìobhaideach ùr -Name[gl]=Nova xanela privada -Name[gn]=Ovetã ñemi pyahu -Name[gu_IN]=નવી ખાનગી વિન્ડો -Name[he]=חלון פרטי חדש -Name[hi_IN]=नयी निजी विंडो -Name[hr]=Novi privatni prozor -Name[hsb]=Nowe priwatne wokno -Name[hu]=Új privát ablak -Name[hy_AM]=Սկսել Գաղտնի դիտարկում -Name[id]=Jendela Mode Pribadi Baru -Name[is]=Nýr huliðsgluggi -Name[it]=Nuova finestra anonima -Name[ja]=新しいプライベートウィンドウ -Name[ja_JP-mac]=新規プライベートウインドウ -Name[ka]=ახალი პირადი ფანჯარა -Name[kk]=Жаңа жекелік терезе -Name[km]=បង្អួច​ឯកជន​ថ្មី -Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ -Name[ko]=새 사생활 보호 모드 -Name[kok]=नवो खाजगी विंडो -Name[ks]=نْو پرایوٹ وینڈو& -Name[lij]=Neuvo barcon privou -Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່ -Name[lt]=Naujas privataus naršymo langas -Name[ltg]=Jauns privatais lūgs -Name[lv]=Jauns privātais logs -Name[mai]=नया निज विंडो (W) -Name[mk]=Нов приватен прозорец -Name[ml]=പുതിയ സ്വകാര്യ ജാലകം -Name[mr]=नवीन वैयक्तिक पटल -Name[ms]=Tetingkap Persendirian Baharu -Name[my]=New Private Window -Name[nb_NO]=Nytt privat vindu -Name[ne_NP]=नयाँ निजी सञ्झ्याल -Name[nl]=Nieuw privévenster -Name[nn_NO]=Nytt privat vindauge -Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ -Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ -Name[pl]=Nowe okno prywatne -Name[pt_BR]=Nova janela privativa -Name[pt_PT]=Nova janela privada -Name[rm]=Nova fanestra privata -Name[ro]=Fereastră privată nouă -Name[ru]=Новое приватное окно -Name[sat]=नावा निजेराक् विंडो (W ) -Name[si]=නව පුද්ගලික කවුළුව (W) -Name[sk]=Nové okno v režime Súkromné prehliadanie -Name[sl]=Novo zasebno okno -Name[son]=Sutura zanfun taaga -Name[sq]=Dritare e Re Private -Name[sr]=Нови приватан прозор -Name[sv_SE]=Nytt privat fönster -Name[ta]=புதிய தனிப்பட்ட சாளரம் -Name[te]=కొత్త ఆంతరంగిక విండో -Name[th]=หน้าต่างส่วนตัวใหม่ -Name[tr]=Yeni gizli pencere -Name[tsz]=Juchiiti eraatarakua jimpani -Name[uk]=Приватне вікно -Name[ur]=نیا نجی دریچہ -Name[uz]=Yangi maxfiy oyna -Name[vi]=Cửa sổ riêng tư mới -Name[wo]=Panlanteeru biir bu bees -Name[xh]=Ifestile yangasese entsha -Name[zh_CN]=新建隐私浏览窗口 -Name[zh_TW]=新增隱私視窗 -Exec=firefox-x11 --private-window --name firefox-x11 %u - -[Desktop Action profile-manager-window] -Name=Open the Profile Manager -Name[cs]=Správa profilů -Exec=firefox-x11 --name firefox-x11 --ProfileManager diff --git a/firefox-x11.sh.in b/firefox-x11.sh.in deleted file mode 100644 index 94045c9..0000000 --- a/firefox-x11.sh.in +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/bash -# -# Run Firefox on X11 backend -# - -export MOZ_DISABLE_WAYLAND=1 -exec /__PREFIX__/bin/firefox "$@" diff --git a/firefox.1 b/firefox.1 index 556cf07..4311322 100644 --- a/firefox.1 +++ b/firefox.1 @@ -60,7 +60,7 @@ Open new instance, not a new window in running instance. \fB\-\-UILocale\fR \fIlocale\fR Start with \fIlocale\fR resources as UI Locale. .TP -\fB\-\-safe\-mode\fR +\fB\-\-save\-mode\fR Disables extensions and themes for this session. .TP \fB\-\-headless\fR diff --git a/firefox.appdata.xml.in b/firefox.appdata.xml.in deleted file mode 100644 index 175e1c9..0000000 --- a/firefox.appdata.xml.in +++ /dev/null @@ -1,59 +0,0 @@ - - - - firefox.desktop - CC0-1.0 - Firefox - Web Browser - Navegador web - Webový prohlížeč - Navegador web - مرورگر اینترنتی - WWW-selain - Navigateur Web - Webböngésző - Browser Web - ウェブ・ブラウザ - 웹 브라우저 - Nettleser - Webbrowser - Nettlesar - Nettleser - Przeglądarka WWW - Navegador Web - Navegador Web - Internetový prehliadač - Webbläsare - -

- Bringing together all kinds of awesomeness to make browsing better for you. - Get to your favorite sites quickly – even if you don’t remember the URLs. - Type your term into the location bar (aka the Awesome Bar) and the autocomplete - function will include possible matches from your browsing history, bookmarked - sites and open tabs. -

- - https://www.mozilla.org - stransky@redhat.com - - ModernToolkit - SearchProvider - - Mozilla - GPL-3.0+ - Mozilla Corporation - https://bugzilla.mozilla.org/ - https://support.mozilla.org/ - firefox - - firefox.desktop - - - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/a.png - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/b.png - https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/c.png - - - - - diff --git a/firefox.desktop b/firefox.desktop index 35c2c48..77d8a6e 100644 --- a/firefox.desktop +++ b/firefox.desktop @@ -50,7 +50,7 @@ MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xm StartupNotify=true Categories=Network;WebBrowser; Keywords=web;browser;internet; -Actions=new-window;new-private-window;profile-manager-window; +Actions=new-window;new-private-window; [Desktop Action new-window] Name=Open a New Window @@ -63,8 +63,8 @@ Name[ast]=Ventana nueva Name[az]=Yeni Pəncərə Name[be]=Новае акно Name[bg]=Нов прозорец -Name[bn_BD]=নতুন উইন্ডো (N) -Name[bn_IN]=নতুন উইন্ডো +Name[bn-BD]=নতুন উইন্ডো (N) +Name[bn-IN]=নতুন উইন্ডো Name[br]=Prenestr nevez Name[brx]=गोदान उइन्ड'(N) Name[bs]=Novi prozor @@ -76,37 +76,37 @@ Name[da]=Nyt vindue Name[de]=Neues Fenster Name[dsb]=Nowe wokno Name[el]=Νέο παράθυρο -Name[en_GB]=New Window -Name[en_US]=New Window -Name[en_ZA]=New Window +Name[en-GB]=New Window +Name[en-US]=New Window +Name[en-ZA]=New Window Name[eo]=Nova fenestro -Name[es_AR]=Nueva ventana -Name[es_CL]=Nueva ventana -Name[es_ES]=Nueva ventana -Name[es_MX]=Nueva ventana +Name[es-AR]=Nueva ventana +Name[es-CL]=Nueva ventana +Name[es-ES]=Nueva ventana +Name[es-MX]=Nueva ventana Name[et]=Uus aken Name[eu]=Leiho berria Name[fa]=پنجره جدید‌ Name[ff]=Henorde Hesere Name[fi]=Uusi ikkuna Name[fr]=Nouvelle fenêtre -Name[fy_NL]=Nij finster -Name[ga_IE]=Fuinneog Nua +Name[fy-NL]=Nij finster +Name[ga-IE]=Fuinneog Nua Name[gd]=Uinneag ùr Name[gl]=Nova xanela Name[gn]=Ovetã pyahu -Name[gu_IN]=નવી વિન્ડો +Name[gu-IN]=નવી વિન્ડો Name[he]=חלון חדש -Name[hi_IN]=नया विंडो +Name[hi-IN]=नया विंडो Name[hr]=Novi prozor Name[hsb]=Nowe wokno Name[hu]=Új ablak -Name[hy_AM]=Նոր Պատուհան +Name[hy-AM]=Նոր Պատուհան Name[id]=Jendela Baru Name[is]=Nýr gluggi Name[it]=Nuova finestra Name[ja]=新しいウィンドウ -Name[ja_JP-mac]=新規ウインドウ +Name[ja-JP-mac]=新規ウインドウ Name[ka]=ახალი ფანჯარა Name[kk]=Жаңа терезе Name[km]=បង្អួច​​​ថ្មី @@ -125,15 +125,15 @@ Name[ml]=പുതിയ ജാലകം Name[mr]=नवीन पटल Name[ms]=Tetingkap Baru Name[my]=ဝင်းဒိုးအသစ် -Name[nb_NO]=Nytt vindu -Name[ne_NP]=नयाँ सञ्झ्याल +Name[nb-NO]=Nytt vindu +Name[ne-NP]=नयाँ सञ्झ्याल Name[nl]=Nieuw venster -Name[nn_NO]=Nytt vindauge +Name[nn-NO]=Nytt vindauge Name[or]=ନୂତନ ୱିଣ୍ଡୋ -Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ +Name[pa-IN]=ਨਵੀਂ ਵਿੰਡੋ Name[pl]=Nowe okno -Name[pt_BR]=Nova janela -Name[pt_PT]=Nova janela +Name[pt-BR]=Nova janela +Name[pt-PT]=Nova janela Name[rm]=Nova fanestra Name[ro]=Fereastră nouă Name[ru]=Новое окно @@ -144,7 +144,7 @@ Name[sl]=Novo okno Name[son]=Zanfun taaga Name[sq]=Dritare e Re Name[sr]=Нови прозор -Name[sv_SE]=Nytt fönster +Name[sv-SE]=Nytt fönster Name[ta]=புதிய சாளரம் Name[te]=కొత్త విండో Name[th]=หน้าต่างใหม่ @@ -156,9 +156,11 @@ Name[uz]=Yangi oyna Name[vi]=Cửa sổ mới Name[wo]=Palanteer bu bees Name[xh]=Ifestile entsha -Name[zh_CN]=新建窗口 -Name[zh_TW]=開新視窗 -Exec=firefox --new-window %u +Name[zh-CN]=新建窗口 +Name[zh-TW]=開新視窗 + + +Exec=firefox %u [Desktop Action new-private-window] Name=Open a New Private Window @@ -171,8 +173,8 @@ Name[ast]=Ventana privada nueva Name[az]=Yeni Məxfi Pəncərə Name[be]=Новае акно адасаблення Name[bg]=Нов прозорец за поверително сърфиране -Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো -Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো +Name[bn-BD]=নতুন ব্যক্তিগত উইন্ডো +Name[bn-IN]=নতুন ব্যক্তিগত উইন্ডো Name[br]=Prenestr merdeiñ prevez nevez Name[brx]=गोदान प्राइभेट उइन्ड' Name[bs]=Novi privatni prozor @@ -184,37 +186,37 @@ Name[da]=Nyt privat vindue Name[de]=Neues privates Fenster Name[dsb]=Nowe priwatne wokno Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης -Name[en_GB]=New Private Window -Name[en_US]=New Private Window -Name[en_ZA]=New Private Window +Name[en-GB]=New Private Window +Name[en-US]=New Private Window +Name[en-ZA]=New Private Window Name[eo]=Nova privata fenestro -Name[es_AR]=Nueva ventana privada -Name[es_CL]=Nueva ventana privada -Name[es_ES]=Nueva ventana privada -Name[es_MX]=Nueva ventana privada +Name[es-AR]=Nueva ventana privada +Name[es-CL]=Nueva ventana privada +Name[es-ES]=Nueva ventana privada +Name[es-MX]=Nueva ventana privada Name[et]=Uus privaatne aken Name[eu]=Leiho pribatu berria Name[fa]=پنجره ناشناس جدید Name[ff]=Henorde Suturo Hesere Name[fi]=Uusi yksityinen ikkuna Name[fr]=Nouvelle fenêtre de navigation privée -Name[fy_NL]=Nij priveefinster -Name[ga_IE]=Fuinneog Nua Phríobháideach +Name[fy-NL]=Nij priveefinster +Name[ga-IE]=Fuinneog Nua Phríobháideach Name[gd]=Uinneag phrìobhaideach ùr Name[gl]=Nova xanela privada Name[gn]=Ovetã ñemi pyahu -Name[gu_IN]=નવી ખાનગી વિન્ડો +Name[gu-IN]=નવી ખાનગી વિન્ડો Name[he]=חלון פרטי חדש -Name[hi_IN]=नयी निजी विंडो +Name[hi-IN]=नयी निजी विंडो Name[hr]=Novi privatni prozor Name[hsb]=Nowe priwatne wokno Name[hu]=Új privát ablak -Name[hy_AM]=Սկսել Գաղտնի դիտարկում +Name[hy-AM]=Սկսել Գաղտնի դիտարկում Name[id]=Jendela Mode Pribadi Baru Name[is]=Nýr huliðsgluggi Name[it]=Nuova finestra anonima Name[ja]=新しいプライベートウィンドウ -Name[ja_JP-mac]=新規プライベートウインドウ +Name[ja-JP-mac]=新規プライベートウインドウ Name[ka]=ახალი პირადი ფანჯარა Name[kk]=Жаңа жекелік терезе Name[km]=បង្អួច​ឯកជន​ថ្មី @@ -233,15 +235,15 @@ Name[ml]=പുതിയ സ്വകാര്യ ജാലകം Name[mr]=नवीन वैयक्तिक पटल Name[ms]=Tetingkap Persendirian Baharu Name[my]=New Private Window -Name[nb_NO]=Nytt privat vindu -Name[ne_NP]=नयाँ निजी सञ्झ्याल +Name[nb-NO]=Nytt privat vindu +Name[ne-NP]=नयाँ निजी सञ्झ्याल Name[nl]=Nieuw privévenster -Name[nn_NO]=Nytt privat vindauge +Name[nn-NO]=Nytt privat vindauge Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ -Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ +Name[pa-IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ Name[pl]=Nowe okno prywatne -Name[pt_BR]=Nova janela privativa -Name[pt_PT]=Nova janela privada +Name[pt-BR]=Nova janela privativa +Name[pt-PT]=Nova janela privada Name[rm]=Nova fanestra privata Name[ro]=Fereastră privată nouă Name[ru]=Новое приватное окно @@ -252,7 +254,7 @@ Name[sl]=Novo zasebno okno Name[son]=Sutura zanfun taaga Name[sq]=Dritare e Re Private Name[sr]=Нови приватан прозор -Name[sv_SE]=Nytt privat fönster +Name[sv-SE]=Nytt privat fönster Name[ta]=புதிய தனிப்பட்ட சாளரம் Name[te]=కొత్త ఆంతరంగిక విండో Name[th]=หน้าต่างส่วนตัวใหม่ @@ -264,11 +266,7 @@ Name[uz]=Yangi maxfiy oyna Name[vi]=Cửa sổ riêng tư mới Name[wo]=Panlanteeru biir bu bees Name[xh]=Ifestile yangasese entsha -Name[zh_CN]=新建隐私浏览窗口 -Name[zh_TW]=新增隱私視窗 +Name[zh-CN]=新建隐私浏览窗口 +Name[zh-TW]=新增隱私視窗 Exec=firefox --private-window %u -[Desktop Action profile-manager-window] -Name=Open the Profile Manager -Name[cs]=Správa profilů -Exec=firefox --ProfileManager diff --git a/firefox.sh.in b/firefox.sh.in index 78d908e..090fa1c 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -1,4 +1,4 @@ -#!/usr/bin/bash +#!/bin/bash # # The contents of this file are subject to the Netscape Public # License Version 1.1 (the "License"); you may not use this file @@ -39,12 +39,12 @@ cmdname=`basename $0` MOZ_ARCH=$(uname -m) case $MOZ_ARCH in x86_64 | s390x | sparc64) - MOZ_LIB_DIR="/__PREFIX__/lib64" - SECONDARY_LIB_DIR="/__PREFIX__/lib" + MOZ_LIB_DIR="%PREFIX%/lib64" + SECONDARY_LIB_DIR="%PREFIX%/lib" ;; * ) - MOZ_LIB_DIR="/__PREFIX__/lib" - SECONDARY_LIB_DIR="/__PREFIX__/lib64" + MOZ_LIB_DIR="%PREFIX%/lib" + SECONDARY_LIB_DIR="%PREFIX%/lib64" ;; esac @@ -65,29 +65,12 @@ MOZ_LANGPACKS_DIR="$MOZ_DIST_BIN/langpacks" MOZ_EXTENSIONS_PROFILE_DIR="$HOME/.mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}" MOZ_PROGRAM="$MOZ_DIST_BIN/$MOZ_FIREFOX_FILE" MOZ_LAUNCHER="$MOZ_DIST_BIN/run-mozilla.sh" -GETENFORCE_FILE="/usr/sbin/getenforce" - -## -## Enable Wayland backend? -## -if __DEFAULT_WAYLAND__ && ! [ $MOZ_DISABLE_WAYLAND ]; then - if [ "$XDG_CURRENT_DESKTOP" == "GNOME" ]; then - export MOZ_ENABLE_WAYLAND=1 - fi -fi - -## -## Use D-Bus remote exclusively when there's Wayland display. -## -if [ "$WAYLAND_DISPLAY" ]; then - export MOZ_DBUS_REMOTE=1 -fi ## ## Set MOZ_GRE_CONF ## MOZ_GRE_CONF=/etc/gre.d/gre.conf -if [ "$MOZ_LIB_DIR" == "/__PREFIX__/lib64" ]; then +if [ "$MOZ_LIB_DIR" == "/usr/lib64" ]; then MOZ_GRE_CONF=/etc/gre.d/gre64.conf fi export MOZ_GRE_CONF @@ -115,7 +98,7 @@ export MOZ_PLUGIN_PATH ## ## Set MOZ_APP_LAUNCHER for gnome-session ## -export MOZ_APP_LAUNCHER="/__PREFIX__/bin/firefox" +export MOZ_APP_LAUNCHER="%PREFIX%/bin/firefox" ## ## Set FONTCONFIG_PATH for Xft/fontconfig @@ -170,24 +153,15 @@ export MOZ_USE_XINPUT2=1 ## FEDORA_LANGPACK_CONFIG="$MOZ_EXTENSIONS_PROFILE_DIR/.fedora-langpack-install" -# MOZ_DISABLE_LANGPACKS disables language packs completely MOZILLA_DOWN=0 if ! [ $MOZ_DISABLE_LANGPACKS ] || [ $MOZ_DISABLE_LANGPACKS -eq 0 ]; then if [ -x $MOZ_DIST_BIN/$MOZ_FIREFOX_FILE ]; then # Is firefox running? - /__PREFIX__/bin/pidof $MOZ_PROGRAM > /dev/null 2>&1 + pidof firefox > /dev/null 2>&1 MOZILLA_DOWN=$? fi fi -# When Firefox is not running, restore SELinux labels for profile files -# (rhbz#1731371) -if [ $MOZILLA_DOWN -ne 0 ]; then - if [ -x $GETENFORCE_FILE ] && [ `getenforce` != "Disabled" ]; then - (restorecon -vr ~/.mozilla/firefox/* &) - fi -fi - # Modify language pack configuration only when firefox is not running # and language packs are not disabled if [ $MOZILLA_DOWN -ne 0 ]; then @@ -207,8 +181,8 @@ if [ $MOZILLA_DOWN -ne 0 ]; then CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG} # Try with a local variant first, then without a local variant - SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g" | sed "s|\..*||g"` - MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g" | sed "s|\..*||g"` + SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"` + MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"` function create_langpack_link() { local language=$* @@ -264,12 +238,28 @@ do esac done -# Flatpak specific environment variables -%FLATPAK_ENV_VARS% +# Linux version specific environment variables +%RHEL_ENV_VARS% # Don't throw "old profile" dialog box. export MOZ_ALLOW_DOWNGRADE=1 +# Make sure at-spi-bus is running +if ! dbus-send --session \ + --dest=org.freedesktop.DBus \ + --type=method_call \ + --print-reply \ + /org/freedesktop/DBus \ + org.freedesktop.DBus.ListNames \ + | grep org.a11y.Bus > /dev/null; then + if [ -f "$MOZ_LIB_DIR/firefox/bundled/libexec/at-spi-bus-launcher" ]; then + echo "Starting a11y dbus service..." + $MOZ_LIB_DIR/firefox/bundled/libexec/at-spi-bus-launcher & + else + echo "Running without a11y support!" + fi +fi + # Run the browser debugging=0 if [ $debugging = 1 ] @@ -277,4 +267,5 @@ then echo $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" fi + exec $MOZ_LAUNCHER $script_args $MOZ_PROGRAM "$@" diff --git a/firefox.spec b/firefox.spec index 945934c..bb06142 100644 --- a/firefox.spec +++ b/firefox.spec @@ -1,122 +1,242 @@ -# Set to true if it's going to be submitted as update. -%global release_build 1 -%global debug_build 0 -%global build_with_clang 0 -%global build_with_asan 0 +# Set for local builds only +%global disable_toolsets 0 -# Disabled due to https://bugzilla.redhat.com/show_bug.cgi?id=1886672 -ExcludeArch: s390x - -%global enable_mozilla_crashreporter 0 -%ifarch x86_64 %{ix86} -%global enable_mozilla_crashreporter 1 -%endif -%if %{build_with_asan} -%global enable_mozilla_crashreporter 0 -%endif -%if 0%{?flatpak} -%global enable_mozilla_crashreporter 0 -%endif - -%global system_nss 1 -%global system_ffi 1 -%ifarch armv7hl -%global system_libvpx 1 -%else -%global system_libvpx 0 -%endif -%global hardened_build 1 -%global system_jpeg 1 -%global run_tests 0 -%global disable_elfhack 1 -%global use_bundled_cbindgen 1 -# Build PGO+LTO on x86_64 and aarch64 only due to build issues -# on other arches. -%global build_with_pgo 0 -%ifarch x86_64 -%if %{release_build} -%global build_with_pgo 1 -%endif -# Build PGO builds on Wayland backend -%global pgo_wayland 0 -%endif -%global wayland_backend_default 1 -%if 0%{?flatpak} -%global build_with_pgo 0 -%endif -# Big endian platforms -%ifarch ppc64 s390x -%global big_endian 1 -%endif - -%ifarch armv7hl -%define _unpackaged_files_terminate_build 0 +%ifarch i686 +# no debug package for the i686 because oom on i686 with debuginfos %global debug_package %{nil} %endif -%if 0%{?build_with_pgo} -%global use_xvfb 1 -%global build_tests 1 +%global rhel_minor_version -1 +%if 0%{?flatpak:1} +%global rhel_minor_version 4 +%endif +%if "%{?dist}" == ".el8" +%global rhel_minor_version 4 +%endif +%if "%{?dist}" == ".el8_3" +%global rhel_minor_version 3 +%endif +%if "%{?dist}" == ".el8_2" +%global rhel_minor_version 2 +%endif +%if "%{?dist}" == ".el8_1" +%global rhel_minor_version 1 +%endif +%if "%{?dist}" == ".el8_0" +%global rhel_minor_version 0 %endif -%if 0%{?run_tests} -%global use_xvfb 1 -%global build_tests 1 +%global system_nss 1 +%global bundle_nss 0 + +%if 0%{?rhel} == 8 + %if 0%{?rhel_minor_version} < 2 +%global bundle_nss 1 + %endif %endif -%global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html +%if 0%{?rhel} == 6 +%global system_nss 0 +%endif + +%define use_bundled_ffi 0 + +%define use_bundled_python_2 1 +%define use_bundled_python_3 1 + +%if 0%{?rhel} == 8 +%define use_bundled_python_2 1 +%define use_bundled_python_3 0 +%endif + +%if 0%{?rhel} == 7 +%define use_bundled_python_2 0 +%define use_bundled_python_3 0 +%endif + +%if 0%{?flatpak:1} +%define use_bundled_python_2 1 +%endif + +# we need python2 because of icu data gen +%define use_bundled_python_2 1 + +%define bundle_gnome_extension 0 + +# Don't use system hunspell for now +%global system_hunspell 0 +%global system_sqlite 0 +%if 0%{?rhel} == 8 +%global use_llvmts 0 +%else +%global use_llvmts 1 +%endif + +%if 0%{?rhel} > 6 +%global system_ffi 1 +%else +%global system_ffi 0 +%endif +%if 0%{?rhel} < 8 +%global use_dts 1 +%endif + +%global use_rustts 1 +%global dts_version 8 +%if 0%{?rhel} == 6 +%global dts_version 8 +%endif +%global rust_version 1.41 +%global rust_toolset_version 1.41 +%global llvm_version 7.0 +%if 0%{?rhel} == 8 +%global llvm_version 6.0 +%endif + +%if 0%{?disable_toolsets} +%global use_rustts 0 +%global use_dts 0 +%global use_llvmts 0 +%endif + +# Use system cairo? +%global system_cairo 0 + +# Use system libvpx? +%global system_libvpx 0 + +# Use system libicu? +%global system_libicu 0 + +# Big endian platforms +%ifarch ppc64 s390x +# Javascript Intl API is not supported on big endian platforms right now: +# https://bugzilla.mozilla.org/show_bug.cgi?id=1322212 +%global big_endian 1 +%endif + +# Hardened build? +%global hardened_build 1 + +%global system_jpeg 1 + +%ifarch %{ix86} x86_64 +%global run_tests 0 +%else +%global run_tests 0 +%endif + +# Build as a debug package? +%global debug_build 0 + +#%global default_bookmarks_file %{_datadir}/bookmarks/default-bookmarks.html +# need to use full path because of flatpak where datadir is /app/share +%global default_bookmarks_file /usr/share/bookmarks/default-bookmarks.html %global firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} # Minimal required versions %global cairo_version 1.13.1 %global freetype_version 2.1.9 -%global libnotify_version 0.7.0 %if %{?system_libvpx} -%global libvpx_version 1.8.2 +%global libvpx_version 1.4.0 %endif -%if %{?system_nss} -%global nspr_version 4.21 +%if 0%{?system_nss} +%global nspr_version 4.25 +# NSS/NSPR quite often ends in build override, so as requirement the version +# we're building against could bring us some broken dependencies from time to time. +#%global nspr_build_version %(pkg-config --silence-errors --modversion nspr 2>/dev/null || echo 65536) %global nspr_build_version %{nspr_version} -%global nss_version 3.56 +%global nss_version 3.53.1 +#%global nss_build_version %(pkg-config --silence-errors --modversion nss 2>/dev/null || echo 65536) %global nss_build_version %{nss_version} %endif +%if %{?system_sqlite} +%global sqlite_version 3.8.4.2 +# The actual sqlite version (see #480989): +%global sqlite_build_version %(pkg-config --silence-errors --modversion sqlite3 2>/dev/null || echo 65536) +%endif + +%define bundled_python_version_2 2.7.13 +%define bundled_python_version_3 3.6.8 +%define use_bundled_openssl 0 +%define use_bundled_nodejs 0 +%define use_bundled_yasm 0 + +%if 0%{?rhel} == 8 + %if 0%{?rhel_minor_version} <= 2 +%define use_bundled_nodejs 1 + %endif +%endif + +%if 0%{?rhel} == 7 +%define use_bundled_nodejs 1 +%define use_bundled_yasm 1 +%endif + +%if 0%{?rhel} == 6 +%define use_bundled_nodejs 1 +%define use_bundled_openssl 1 +%define use_bundled_yasm 1 +%define bundle_gtk3 1 +# In-tree libffi is able to build on following platforms, we have to bundle it for the rest +%ifnarch x86_64 i686 aarch64 +%define use_bundled_ffi 1 +%endif +%endif + +# GTK3 bundling +%define avoid_bundled_rebuild 0 + +%define gtk3_nvr 3.22.26-1 +%define gtk3_install_path %{mozappdir}/bundled + +# We could use %%include, but in %%files, %%post and other sections, but in these +# sections it could lead to syntax errors about unclosed %%if. Work around it by +# using the following macro +%define include_file() %{expand:%(cat '%1')} + %global mozappdir %{_libdir}/%{name} %global mozappdirdev %{_libdir}/%{name}-devel-%{version} %global langpackdir %{mozappdir}/langpacks -%global tarballdir firefox-%{version} +%global tarballdir %{name}-%{version} +%global pre_version esr +#global pre_tag alpha %global official_branding 1 +%global build_langpacks 1 -%bcond_without langpacks - -%if !%{release_build} -%global pre_tag .npgo +%global enable_mozilla_crashreporter 0 +%if !%{debug_build} +%ifarch %{ix86} x86_64 +%global enable_mozilla_crashreporter 0 %endif -%if %{build_with_clang} -%global pre_tag .clang -%endif -%if %{build_with_asan} -%global pre_tag .asan -%global build_with_pgo 0 -%endif -%if !%{system_nss} -%global nss_tag .nss %endif Summary: Mozilla Firefox Web browser Name: firefox -Version: 82.0 -Release: 8%{?dist} +Version: 78.6.1 +Release: 1%{?dist} URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ -Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz -%if %{with langpacks} -Source1: firefox-langpacks-%{version}%{?pre_version}-20201015.tar.xz +%if 0%{?rhel} == 7 +ExcludeArch: s390 ppc %endif -Source2: cbindgen-vendor.tar.xz +%if 0%{?rhel} == 6 +ExclusiveArch: i686 x86_64 ppc64 s390x +%endif + +Source0: https://hg.mozilla.org/releases/mozilla-release/archive/firefox-%{version}%{?pre_version}.source.tar.xz +%if %{build_langpacks} +Source1: firefox-langpacks-%{version}%{?pre_version}-20210106.tar.xz +%endif +Source2: cbindgen-vendor-0.14.3.tar.xz Source10: firefox-mozconfig +%if 0%{?centos} +Source12: firefox-centos-default-prefs.js +%else Source12: firefox-redhat-default-prefs.js +%endif Source20: firefox.desktop Source21: firefox.sh.in Source23: firefox.1 @@ -124,92 +244,122 @@ Source24: mozilla-api-key Source25: firefox-symbolic.svg Source26: distribution.ini Source27: google-api-key -Source28: firefox-wayland.sh.in -Source29: firefox-wayland.desktop -Source30: firefox-x11.sh.in -Source31: firefox-x11.desktop -Source32: node-stdout-nonblocking-wrapper -Source33: firefox.appdata.xml.in -Source34: firefox-search-provider.ini -Source35: google-loc-api-key +Source28: node-stdout-nonblocking-wrapper +Source200: gtk3-private-%{gtk3_nvr}.el6.src.rpm +Source201: gtk3-private-%{gtk3_nvr}-post.inc +Source202: gtk3-private-%{gtk3_nvr}-postun.inc +Source203: gtk3-private-%{gtk3_nvr}-posttrans.inc +Source204: gtk3-private-%{gtk3_nvr}-files.inc +Source205: gtk3-private-%{gtk3_nvr}-setup-flags-env.inc +Source206: gtk3-private-%{gtk3_nvr}-requires-provides-filter.inc +Source301: yasm-1.2.0-3.el5.src.rpm +Source303: libffi-3.0.13-18.el7_3.src.rpm +Source304: nodejs-10.21.0-5.fc32.src.rpm +Source305: openssl-1.0.2k-19.6.bundle.el7_7.src.rpm + +Source403: nss-3.53.1-3.fc32.src.rpm +Source401: nss-setup-flags-env.inc +Source402: nspr-4.25.0-1.el8_0.src.rpm +#Python +%if 0%{?use_bundled_python_2} +Source100: https://www.python.org/ftp/python/%{bundled_python_version_2}/Python-%{bundled_python_version_2}.tar.xz +%endif +%if 0%{?use_bundled_python_3} +Source101: https://www.python.org/ftp/python/%{bundled_python_version_3}/Python-%{bundled_python_version_3}.tar.xz +%endif # Build patches -Patch3: mozilla-build-arm.patch -Patch25: rhbz-1219542-s390-build.patch -Patch32: build-rust-ppc64le.patch -Patch35: build-ppc-jit.patch -# Fixing missing cacheFlush when JS_CODEGEN_NONE is used (s390x) -Patch38: build-cacheFlush-missing.patch -Patch40: build-aarch64-skia.patch -Patch41: build-disable-elfhack.patch -Patch44: build-arm-libopus.patch -Patch46: firefox-nss-version.patch -Patch47: fedora-shebang-build.patch -Patch48: build-arm-wasm.patch -Patch49: build-arm-libaom.patch -Patch53: firefox-gcc-build.patch -# This should be fixed in Firefox 83 -Patch54: mozilla-1669639.patch -Patch55: mozilla-1669442.patch +Patch1000: python-2.7.patch +Patch1001: build-ppc64le-inline.patch +Patch1002: python-2.7-gcc8-fix.patch +Patch1003: python-missing-utimensat.patch +Patch1004: build-icu-make.patch +# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1699374 +Patch4: build-mozconfig-fix.patch +Patch6: build-nss-version.patch +Patch7: firefox-debugedits-error.patch -# Fedora specific patches +# Fedora/RHEL specific patches Patch215: firefox-enable-addons.patch Patch219: rhbz-1173156.patch -Patch221: firefox-fedora-ua.patch Patch224: mozilla-1170092.patch #ARM run-time patch -Patch226: rhbz-1354671.patch -Patch227: firefox-locale-debug.patch -Patch228: disable-openh264-download.patch +Patch231: firefox-pipewire.patch +Patch232: firefox-rhel6-hugepage.patch +Patch233: firefox-rhel6-nss-tls1.3.patch +Patch234: rhbz-1821418.patch +Patch235: firefox-pipewire-0-3.patch # Upstream patches Patch402: mozilla-1196777.patch -Patch406: mozilla-1665329.patch -Patch407: mozilla-1667096.patch -Patch408: mozilla-1663844.patch -Patch409: mozilla-1640567.patch -Patch410: mozilla-1661192.patch -Patch411: mozilla-1668771.patch -Patch412: mozilla-1634404.patch -Patch413: mozilla-1669495.patch -Patch414: mozilla-1656727.patch -Patch415: mozilla-1670333.patch -Patch416: mozilla-1673202.patch -Patch417: mozilla-1673313.patch -# Wayland specific upstream patches -Patch574: firefox-pipewire-0-2.patch -Patch575: firefox-pipewire-0-3.patch +Patch501: python-encode.patch +Patch503: mozilla-s390-context.patch +Patch505: mozilla-bmo1005535.patch +Patch506: mozilla-bmo1504834-part1.patch +Patch507: mozilla-bmo1504834-part2.patch +Patch508: mozilla-bmo1504834-part3.patch +Patch509: mozilla-bmo1504834-part4.patch +Patch510: mozilla-bmo1554971.patch +Patch511: mozilla-bmo1602730.patch +Patch512: mozilla-bmo849632.patch +Patch513: mozilla-bmo998749.patch +Patch514: mozilla-s390x-skia-gradient.patch +Patch515: mozilla-bmo1626236.patch +Patch516: D87019-thin-vec-big-endian.diff -#VA-API patches -Patch584: firefox-disable-ffvpx-with-vapi.patch -Patch585: firefox-vaapi-extra-frames.patch -# PGO/LTO patches -Patch600: pgo.patch -Patch602: mozilla-1516803.patch +# CentOS patches +%if 0%{?centos} +Patch10000: Bug-1238661---fix-mozillaSignalTrampoline-to-work-.patch +Patch10001: Bug-1526653---fix_user_vfp_armv7.patch +%endif + +# RHEL6 patches +Patch600: rhel6-dbusver.patch +Patch601: rhel6-kernel.patch +Patch602: rhel6-mach-fail.patch +Patch603: rhel6-zconst.patch +Patch604: rhel6-auxvh.patch +Patch605: rhel6-abiv2-mozbz1642174.patch +Patch607: rhel6-at-no-automount.patch + +# Flatpak patches %if %{?system_nss} +%if !0%{?bundle_nss} BuildRequires: pkgconfig(nspr) >= %{nspr_version} BuildRequires: pkgconfig(nss) >= %{nss_version} BuildRequires: nss-static >= %{nss_version} %endif +%endif +%if %{?system_cairo} +BuildRequires: pkgconfig(cairo) >= %{cairo_version} +%endif BuildRequires: pkgconfig(libpng) +BuildRequires: xz +BuildRequires: libXt-devel +BuildRequires: mesa-libGL-devel +Requires: liberation-fonts-common +Requires: liberation-sans-fonts %if %{?system_jpeg} BuildRequires: libjpeg-devel %endif BuildRequires: zip BuildRequires: bzip2-devel BuildRequires: pkgconfig(zlib) -BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(libIDL-2.0) BuildRequires: pkgconfig(gtk+-2.0) -BuildRequires: pkgconfig(krb5) +BuildRequires: krb5-devel BuildRequires: pkgconfig(pango) BuildRequires: pkgconfig(freetype2) >= %{freetype_version} BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xrender) +%if %{?system_hunspell} +BuildRequires: hunspell-devel +%endif BuildRequires: pkgconfig(libstartup-notification-1.0) -BuildRequires: pkgconfig(libnotify) >= %{libnotify_version} +BuildRequires: pkgconfig(libnotify) BuildRequires: pkgconfig(dri) BuildRequires: pkgconfig(libcurl) BuildRequires: dbus-glib-devel @@ -218,67 +368,174 @@ BuildRequires: libvpx-devel >= %{libvpx_version} %endif BuildRequires: autoconf213 BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(gconf-2.0) + +%if 0%{?use_dts} +BuildRequires: devtoolset-%{dts_version}-gcc-c++ +BuildRequires: devtoolset-%{dts_version}-gcc +BuildRequires: devtoolset-%{dts_version}-binutils +BuildRequires: devtoolset-%{dts_version}-libatomic-devel +%if 0%{?use_llvmts} +BuildRequires: llvm-toolset-%{llvm_version} +BuildRequires: llvm-toolset-%{llvm_version}-llvm-devel +%endif +%endif + +BuildRequires: scl-utils +BuildRequires: findutils + + +%if 0%{?rhel} == 8 +BuildRequires: cargo +BuildRequires: rust >= %{rust_version} +BuildRequires: llvm >= %{llvm_version} +BuildRequires: llvm-devel >= %{llvm_version} +BuildRequires: clang >= %{llvm_version} +BuildRequires: clang-devel >= %{llvm_version} +BuildRequires: rustfmt >= %{rust_version} +BuildRequires: python3 +BuildRequires: nodejs >= 10.21 +%else +%if 0%{?use_rustts} +BuildRequires: rust-toolset-%{rust_toolset_version} +%endif +%if 0%{?rhel} == 7 +#BuildRequires: rh-nodejs12 +%endif +%if 0%{?use_llvmts} +BuildRequires: llvm-toolset-%{llvm_version} +BuildRequires: llvm-toolset-%{llvm_version}-llvm-devel +%endif +%endif + +%if ! 0%{?use_bundled_yasm} BuildRequires: yasm -BuildRequires: llvm -BuildRequires: llvm-devel -BuildRequires: clang -BuildRequires: clang-libs -%if %{build_with_clang} -BuildRequires: lld %endif + +%if 0%{?use_bundled_python_2} +# Needed for Python in RHEL6 +BuildRequires: openssl-devel +%endif + +%if 0%{?rhel} == 8 + %if 0%{?rhel_minor_version} >= 3 +BuildRequires: pkgconfig(libpipewire-0.3) + %else BuildRequires: pipewire-devel - -%if !0%{?use_bundled_cbindgen} -BuildRequires: cbindgen + %endif %endif -BuildRequires: nodejs -BuildRequires: nasm >= 1.13 -BuildRequires: libappstream-glib -%if 0%{?big_endian} -BuildRequires: icu +%if 0%{?bundle_gtk3} +BuildRequires: automake +BuildRequires: autoconf +BuildRequires: cups-devel +BuildRequires: dbus-devel +BuildRequires: desktop-file-utils +BuildRequires: expat-devel +BuildRequires: fontpackages-devel +BuildRequires: gamin-devel +BuildRequires: gettext-devel +BuildRequires: git +BuildRequires: intltool +BuildRequires: jasper-devel +BuildRequires: libepoxy-devel +BuildRequires: libcroco-devel +BuildRequires: libffi-devel +BuildRequires: libpng-devel +BuildRequires: libtiff-devel +BuildRequires: libtool +BuildRequires: libxml2-devel +BuildRequires: libX11-devel +BuildRequires: libXcomposite-devel +BuildRequires: libXcursor-devel +BuildRequires: libXinerama-devel +BuildRequires: libXevie-devel +BuildRequires: libXrandr-devel +BuildRequires: libXrender-devel +BuildRequires: libXtst-devel +BuildRequires: mesa-libGL-devel +BuildRequires: mesa-libEGL-devel +BuildRequires: pixman-devel +BuildRequires: rest-devel +BuildRequires: readline-devel +# TODO: We miss that dependency in our bundled gtk3 package. +# As a hotfix we put it here and fix gtk3 in next release. +Requires: mesa-libEGL%{?_isa} +Requires: libcroco%{?_isa} +Requires: mesa-libGL%{?_isa} +Requires: bzip2-libs%{?_isa} +Requires: libXtst%{?_isa} +%else +BuildRequires: gtk3-devel +BuildRequires: glib2-devel +%endif + +# Bundled nss/nspr requirement +%if 0%{?bundle_nss} +BuildRequires: nss-softokn +BuildRequires: sqlite-devel +BuildRequires: zlib-devel +BuildRequires: pkgconfig +BuildRequires: gawk +BuildRequires: psmisc +%if 0%{?rhel} == 6 +BuildRequires: perl +%else +BuildRequires: perl-interpreter +%endif +BuildRequires: gcc-c++ +BuildRequires: xmlto %endif Requires: mozilla-filesystem Requires: p11-kit-trust %if %{?system_nss} +%if !0%{?bundle_nss} Requires: nspr >= %{nspr_build_version} Requires: nss >= %{nss_build_version} %endif -BuildRequires: python3-devel -%if !0%{?flatpak} -Requires: u2f-hidraw-policy %endif -BuildRequires: nss-devel >= 3.29.1-2.1 -Requires: nss >= 3.48.0 BuildRequires: desktop-file-utils -%if !0%{?flatpak} BuildRequires: system-bookmarks -%endif -%if %{?system_ffi} -BuildRequires: pkgconfig(libffi) +Requires: redhat-indexhtml +#for the python2 +BuildRequires: pkgconfig(sqlite3) +%if %{?system_sqlite} +BuildRequires: pkgconfig(sqlite3) >= %{sqlite_version} +Requires: sqlite >= %{sqlite_build_version} %endif -%if 0%{?use_xvfb} + +%if %{?run_tests} BuildRequires: xorg-x11-server-Xvfb %endif -%if 0%{?pgo_wayland} -BuildRequires: mutter -BuildRequires: gsettings-desktop-schemas -BuildRequires: gnome-settings-daemon -BuildRequires: mesa-dri-drivers + +%if %{?system_ffi} + %if !%{use_bundled_ffi}0 +BuildRequires: pkgconfig(libffi) + %endif %endif -BuildRequires: rust -BuildRequires: cargo -BuildRequires: clang-devel -%if %{build_with_asan} -BuildRequires: libasan -BuildRequires: libasan-static + +%if %{?use_bundled_nodejs} +%if !0%{?use_bundled_python_3} +BuildRequires: python3-devel +%endif +BuildRequires: zlib-devel +#BuildRequires: brotli-devel +#BuildRequires: gcc >= 4.9.4 +#BuildRequires: gcc-c++ >= 4.9.4 +BuildRequires: chrpath +BuildRequires: libatomic +BuildRequires: openssl-devel +%endif + +%if 0%{?big_endian} + %if 0%{?flatpak} +BuildRequires: icu + %endif %endif -BuildRequires: perl-interpreter -BuildRequires: fdk-aac-free-devel Obsoletes: mozilla <= 37:1.7.13 Provides: webclient @@ -304,28 +561,6 @@ debug %{name}, you want to install %{name}-debuginfo instead. %files -n %{crashreporter_pkg_name} -f debugcrashreporter.list %endif -%if 0%{?wayland_backend_default} -%package x11 -Summary: Firefox X11 launcher. -Requires: %{name} -%description x11 -The firefox-x11 package contains launcher and desktop file -to run Firefox explicitly on X11. -%files x11 -%{_bindir}/firefox-x11 -%{_datadir}/applications/firefox-x11.desktop -%endif - -%package wayland -Summary: Firefox Wayland launcher. -Requires: %{name} -%description wayland -The firefox-wayland package contains launcher and desktop file -to run Firefox explicitly on Wayland. -%files wayland -%{_bindir}/firefox-wayland -%{_datadir}/applications/firefox-wayland.desktop - %if %{run_tests} %global testsuite_pkg_name mozilla-%{name}-testresults %package -n %{testsuite_pkg_name} @@ -338,89 +573,142 @@ This package contains results of tests executed during build. #--------------------------------------------------------------------- -%prep -%setup -q -n %{tarballdir} +%if %{?bundle_gnome_extension} +%package -n firefox-gnome-shell-extension +%global firefox_gnome_shell_addon_name addon-751081-latest.xpi +Summary: Support for managing GNOME Shell Extensions through web browsers +Requires: %{name}%{?_isa} = %{version}-%{release} +License: GPLv3+ +URL: https://wiki.gnome.org/Projects/GnomeShellIntegrationForChrome +Source2: https://addons.mozilla.org/firefox/downloads/latest/gnome-shell-integration/platform:2/%{firefox_gnome_shell_addon_name} + +Requires: dbus +Requires: gnome-icon-theme +Requires: gnome-shell +Requires: hicolor-icon-theme +Requires: mozilla-filesystem + +%description -n firefox-gnome-shell-extension +Browser extension for Firefox and native host messaging connector that provides +integration with GNOME Shell and the corresponding extensions repository +https://extensions.gnome.org. + +%files -n firefox-gnome-shell-extension +%{mozappdir}/distribution/extensions/chrome-gnome-shell@gnome.org.xpi +%endif + +%prep +echo "Build environment" +echo "dist %{?dist}" +echo "RHEL 8 minor version: %{?rhel_minor_version}" +echo "use_bundled_ffi %{?use_bundled_ffi}" +echo "use_bundled_python_2 %{?use_bundled_python_2}" +echo "use_bundled_python_3 %{?use_bundled_python_3}" +echo "bundle_nss %{?bundle_nss}" +echo "system_nss %{?system_nss}" +echo "use_rustts %{?use_rustts}" +echo "use_bundled_nodejs %{?use_bundled_nodejs}" +echo "use_bundled_openssl %{?use_bundled_openssl}" +echo "use_bundled_yasm %{?use_bundled_yasm}" + + +%if 0%{?use_bundled_python_2} +%setup -q -T -c -n python2 -a 100 +%patch1000 -p0 -b .build +%patch1002 -p0 -b .gcc8 +%endif +%if 0%{?use_bundled_python_3} +%setup -q -T -c -n python3 -a 101 +%if 0%{?rhel} == 6 +%patch1003 -p0 -b .missing-utimensat.patch +%endif +%endif +%setup -q -n %{tarballdir} # Build patches, can't change backup suffix from default because during build # there is a compare of config and js/config directories and .orig suffix is # ignored during this compare. +%patch7 -p1 -b .debugedits-error +%ifarch %{ix86} %{arm} ppc +# binary check fails OOM on 32bit arches +%endif -%ifarch s390 -%patch25 -p1 -b .rhbz-1219542-s390 -%endif -%patch40 -p1 -b .aarch64-skia -%if 0%{?disable_elfhack} -%patch41 -p1 -b .disable-elfhack -%endif -%patch3 -p1 -b .arm -%patch44 -p1 -b .build-arm-libopus -#%patch46 -p1 -b .nss-version -%patch47 -p1 -b .fedora-shebang -%patch48 -p1 -b .build-arm-wasm -%patch49 -p1 -b .build-arm-libaom -%patch53 -p1 -b .firefox-gcc-build -%patch54 -p1 -b .1669639 -%patch55 -p1 -b .1669442 +%patch4 -p1 -b .build-mozconfig-fix +#%patch6 -p1 -b .nss-version # Fedora patches %patch215 -p1 -b .addons %patch219 -p1 -b .rhbz-1173156 -%patch221 -p1 -b .fedora-ua %patch224 -p1 -b .1170092 -#ARM run-time patch -%ifarch aarch64 -%patch226 -p1 -b .1354671 + +# fixing /usr/include in the patch for the flatpak build +%if 0%{?flatpak} +sed -ie 's|/usr/include|/app/include|' %_sourcedir/firefox-pipewire-0-3.patch %endif -%patch227 -p1 -b .locale-debug -%patch228 -p1 -b .disable-openh264-download + +%if 0%{?rhel} == 8 + %if 0%{?rhel_minor_version} >= 3 +%patch235 -p1 -b .pipewire-0-3 + %else +%patch231 -p1 -b .pipewire + %endif +%endif + + +%if 0%{?rhel} == 6 +%patch232 -p1 -b .hugepage +%patch233 -p1 -b .rhel6-nss-tls1.3 +%endif +%patch234 -p1 -b .rhbz-1821418 %patch402 -p1 -b .1196777 -%patch406 -p1 -b .1665329 -%patch407 -p1 -b .1667096 -%patch408 -p1 -b .1663844 -%patch409 -p1 -b .1640567 -%patch410 -p1 -b .1661192 -%patch411 -p1 -b .1668771 -%patch412 -p1 -b .1634404 -%patch413 -p1 -b .1669495 -%patch414 -p1 -b .1656727 -%patch415 -p1 -b .1670333 -%if 0%{?fedora} > 33 || 0%{?eln} -%patch416 -p1 -b .1673202 -%endif -%patch417 -p1 -b .1673313 -# Wayland specific upstream patches -%if 0%{?fedora} > 31 || 0%{?eln} -%patch575 -p1 -b .firefox-pipewire-0-3 -%else -%patch574 -p1 -b .firefox-pipewire-0-2 +# Patch for big endian platforms only +%if 0%{?big_endian} %endif -# VA-API fixes -%patch584 -p1 -b .firefox-disable-ffvpx-with-vapi -%patch585 -p1 -b .firefox-vaapi-extra-frames +%patch501 -p1 -b .python-encode +%patch503 -p1 -b .mozilla-s390-context +%patch505 -p1 -b .mozilla-bmo1005535 +%patch506 -p1 -b .mozilla-bmo1504834-part1 +%patch507 -p1 -b .mozilla-bmo1504834-part2 +%patch508 -p1 -b .mozilla-bmo1504834-part3 +%patch509 -p1 -b .mozilla-bmo1504834-part4 +%patch510 -p1 -b .mozilla-bmo1554971 +%patch511 -p1 -b .mozilla-bmo1602730 +%patch512 -p1 -b .mozilla-bmo849632 +%patch513 -p1 -b .mozilla-bmo998749 +%patch514 -p1 -b .mozilla-s390x-skia-gradient +%patch515 -p1 -b .mozilla-bmo1626236 +%patch516 -p1 -b .D87019-thin-vec-big-endian.diff -# PGO patches -%if %{build_with_pgo} -%if !%{build_with_clang} -%patch600 -p1 -b .pgo -%patch602 -p1 -b .1516803 + +%patch1001 -p1 -b .ppc64le-inline +%patch1004 -p1 -b .icu-make + +%if 0%{?rhel} == 6 +%patch600 -p1 -b .rhel6-dbusver +%patch601 -p1 -b .rhel6-kernel +%patch602 -p1 -b .rhel6-mach-fail +%patch603 -p1 -b .rhel6-zconst +%patch604 -p1 -b .rhel6-auxvh +%patch605 -p1 -b .rhel6-abiv2-mozbz1642174 +%patch607 -R -p1 -b .rhel6-at-no-automount %endif + +# CentOS patches +%if 0%{?centos} +%patch10000 -p1 -b .mozilla-1238661 +%patch10001 -p1 -b .mozilla-1526653 %endif %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig -echo "ac_add_options --enable-default-toolkit=cairo-gtk3-wayland" >> .mozconfig %if %{official_branding} echo "ac_add_options --enable-official-branding" >> .mozconfig %endif %{__cp} %{SOURCE24} mozilla-api-key %{__cp} %{SOURCE27} google-api-key -%{__cp} %{SOURCE35} google-loc-api-key - -echo "ac_add_options --prefix=\"%{_prefix}\"" >> .mozconfig -echo "ac_add_options --libdir=\"%{_libdir}\"" >> .mozconfig %if %{?system_nss} echo "ac_add_options --with-system-nspr" >> .mozconfig @@ -430,19 +718,42 @@ echo "ac_add_options --without-system-nspr" >> .mozconfig echo "ac_add_options --without-system-nss" >> .mozconfig %endif -%if %{?system_ffi} +%if %{?system_cairo} +echo "ac_add_options --enable-system-cairo" >> .mozconfig +%else +echo "ac_add_options --disable-system-cairo" >> .mozconfig +%endif + +%if 0%{?use_bundled_ffi} +echo "ac_add_options --enable-system-ffi" >> .mozconfig +%endif +%if 0%{?system_ffi} echo "ac_add_options --enable-system-ffi" >> .mozconfig %endif -%ifarch %{arm} +%ifarch %{arm} %{ix86} x86_64 echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif +%if %{?system_hunspell} +echo "ac_add_options --enable-system-hunspell" >> .mozconfig +%else +# not available? +#echo "ac_add_options --disable-system-hunspell" >> .mozconfig +%endif + %if %{?debug_build} echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig %else -%global optimize_flags "none" +%global optimize_flags "-g -O2" +%ifarch s390 s390x +%global optimize_flags "-g -O1" +%endif +%ifarch armv7hl +# ARMv7 need that (rhbz#1426850) +%global optimize_flags "-g -O2 -fno-schedule-insns" +%endif %ifarch ppc64le aarch64 %global optimize_flags "-g -O2" %endif @@ -459,14 +770,16 @@ echo "ac_add_options --disable-debug" >> .mozconfig echo "ac_add_options --disable-jemalloc" >> .mozconfig %endif +%ifnarch %{ix86} x86_64 +echo "ac_add_options --disable-webrtc" >> .mozconfig +%endif + %if !%{enable_mozilla_crashreporter} echo "ac_add_options --disable-crashreporter" >> .mozconfig %endif -%if 0%{?build_tests} +%if %{?run_tests} echo "ac_add_options --enable-tests" >> .mozconfig -%else -echo "ac_add_options --disable-tests" >> .mozconfig %endif %if !%{?system_jpeg} @@ -481,20 +794,20 @@ echo "ac_add_options --with-system-libvpx" >> .mozconfig echo "ac_add_options --without-system-libvpx" >> .mozconfig %endif +%if %{?system_libicu} +echo "ac_add_options --with-system-icu" >> .mozconfig +%else +echo "ac_add_options --without-system-icu" >> .mozconfig +%endif %ifarch s390 s390x echo "ac_add_options --disable-jit" >> .mozconfig %endif -%if %{build_with_asan} -echo "ac_add_options --enable-address-sanitizer" >> .mozconfig -echo "ac_add_options --disable-jemalloc" >> .mozconfig +%ifnarch %{ix86} +%if !0%{?debug_build} +echo "ac_add_options --disable-debug-symbols" >> .mozconfig +%endif %endif - -# api keys full path -echo "ac_add_options --with-mozilla-api-keyfile=`pwd`/mozilla-api-key" >> .mozconfig -# It seems that the api key we have is for the safe browsing only -echo "ac_add_options --with-google-location-service-api-keyfile=`pwd`/google-loc-api-key" >> .mozconfig -echo "ac_add_options --with-google-safebrowsing-api-keyfile=`pwd`/google-api-key" >> .mozconfig echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' >> .mozconfig @@ -504,61 +817,344 @@ chmod a-x third_party/rust/gfx-backend-vulkan/src/*.rs chmod a-x third_party/rust/gfx-hal/src/*.rs chmod a-x third_party/rust/ash/src/extensions/ext/*.rs chmod a-x third_party/rust/ash/src/extensions/khr/*.rs +chmod a-x third_party/rust/ash/src/extensions/mvk/*.rs +chmod a-x third_party/rust/ash/src/extensions/nv/*.rs #--------------------------------------------------------------------- %build -# Disable LTO to work around rhbz#1883904 -%define _lto_cflags %{nil} +ulimit -a +free +#set -e +# Hack for missing shell when building in brew on RHEL6 +%if 0%{?rhel} == 6 +export SHELL=/bin/sh +%endif -%if 0%{?use_bundled_cbindgen} +%if ! 0%{?avoid_bundled_rebuild} + rm -rf %{_buildrootdir}/* +%endif +export PATH="%{_buildrootdir}/bin:$PATH" + +function install_rpms_to_current_dir() { + PACKAGE_RPM=$(eval echo $1) + PACKAGE_DIR=%{_rpmdir} + + if [ ! -f $PACKAGE_DIR/$PACKAGE_RPM ]; then + # Hack for tps tests + ARCH_STR=%{_arch} + %ifarch i386 i686 + ARCH_STR="i?86" + %endif + %if 0%{?rhel} > 6 + PACKAGE_DIR="$PACKAGE_DIR/$ARCH_STR" + %endif + fi + + for package in $(ls $PACKAGE_DIR/$PACKAGE_RPM) + do + echo "$package" + rpm2cpio "$package" | cpio -idu + done +} + +function build_bundled_package() { + PACKAGE_RPM=$1 + PACKAGE_FILES=$2 + PACKAGE_SOURCE=$3 + PACKAGE_BUILD_OPTIONS=$4 + export PACKAGE_DIR="%{_topdir}/RPMS" + + PACKAGE_ALREADY_BUILD=0 + %if %{?avoid_bundled_rebuild} + if ls $PACKAGE_DIR/$PACKAGE_RPM; then + PACKAGE_ALREADY_BUILD=1 + fi + if ls $PACKAGE_DIR/%{_arch}/$PACKAGE_RPM; then + PACKAGE_ALREADY_BUILD=1 + fi + %endif + if [ $PACKAGE_ALREADY_BUILD == 0 ]; then + echo "Rebuilding $PACKAGE_RPM from $PACKAGE_SOURCE"; echo "===============================" + rpmbuild --nodeps $PACKAGE_BUILD_OPTIONS --rebuild $PACKAGE_SOURCE + cat /var/tmp/rpm-tmp* + fi + + find $PACKAGE_DIR + if [ ! -f $PACKAGE_DIR/$PACKAGE_RPM ]; then + # Hack for tps tests + ARCH_STR=%{_arch} + %ifarch i386 i686 + ARCH_STR="i?86" + %endif + %if 0%{?rhel} > 6 + export PACKAGE_DIR="$PACKAGE_DIR/$ARCH_STR" + %endif + fi + pushd $PACKAGE_DIR + + echo "Installing $PACKAGE_DIR/$PACKAGE_RPM"; echo "===============================" + pwd + PACKAGE_LIST=$(echo $PACKAGE_DIR/$PACKAGE_RPM | tr " " "\n") + for PACKAGE in $PACKAGE_LIST + do + rpm2cpio $PACKAGE | cpio -iduv + done + + PATH=$PACKAGE_DIR/usr/bin:$PATH + export PATH + LD_LIBRARY_PATH=$PACKAGE_DIR/usr/%{_lib}:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH + + # Clean rpms to avoid including them to package + %if ! 0%{?avoid_bundled_rebuild} + rm -f $PACKAGE_FILES + %endif + + popd +} + +# Build and install local yasm if needed +# ====================================== +%if 0%{?use_bundled_yasm} + build_bundled_package 'yasm-1*.rpm' 'yasm-*.rpm' '%{SOURCE301}' +%endif + +%if 0%{?bundle_nss} + rpm -ivh %{SOURCE402} + #rpmbuild --nodeps --define '_prefix %{gtk3_install_path}' --without=tests -ba %{_specdir}/nspr.spec + rpmbuild --nodeps --define '_prefix %{gtk3_install_path}' -ba %{_specdir}/nspr.spec + pushd %{_buildrootdir} + install_rpms_to_current_dir nspr-4*.rpm + install_rpms_to_current_dir nspr-devel*.rpm + popd + echo "Setting nspr flags" + # nss-setup-flags-env.inc + sed -i 's@%{gtk3_install_path}@%{_buildrootdir}%{gtk3_install_path}@g' %{_buildrootdir}%{gtk3_install_path}/%{_lib}/pkgconfig/nspr*.pc + + export LDFLAGS="-L%{_buildrootdir}%{gtk3_install_path}/%{_lib} $LDFLAGS" + export LDFLAGS="-Wl,-rpath,%{gtk3_install_path}/%{_lib} $LDFLAGS" + export LDFLAGS="-Wl,-rpath-link,%{_buildrootdir}%{gtk3_install_path}/%{_lib} $LDFLAGS" + export PKG_CONFIG_PATH=%{_buildrootdir}%{gtk3_install_path}/%{_lib}/pkgconfig + export PATH="{_buildrootdir}%{gtk3_install_path}/bin:$PATH" + + export PATH=%{_buildrootdir}/%{gtk3_install_path}/bin:$PATH + echo $PKG_CONFIG_PATH + + rpm -ivh %{SOURCE403} + rpmbuild --nodeps --define '_prefix %{gtk3_install_path}' -ba %{_specdir}/nss.spec + pushd %{_buildrootdir} + #cleanup + #rm -rf {_buildrootdir}/usr/lib/debug/* + #rm -rf {_buildrootdir}/usr/lib/.build-id + #install_rpms_to_current_dir nss-%{gtk3_nvr}*.rpm + #install_rpms_to_current_dir nss-devel-%{gtk3_nvr}*.rpm + install_rpms_to_current_dir nss-3*.rpm + install_rpms_to_current_dir nss-devel*.rpm + install_rpms_to_current_dir nss-pkcs11-devel*.rpm + install_rpms_to_current_dir nss-softokn-3*.rpm + install_rpms_to_current_dir nss-softokn-devel*.rpm + install_rpms_to_current_dir nss-softokn-freebl-3*.rpm + install_rpms_to_current_dir nss-softokn-freebl-devel*.rpm + install_rpms_to_current_dir nss-util-3*.rpm + install_rpms_to_current_dir nss-util-devel*.rpm + popd + %filter_provides_in %{gtk3_install_path}/%{_lib} + %filter_requires_in %{gtk3_install_path}/%{_lib} + %filter_from_requires /libnss3.so.*/d + %filter_from_requires /libsmime3.so.*/d + %filter_from_requires /libssl3.so.*/d + %filter_from_requires /libnssutil3.so.*/d + %filter_from_requires /libnspr4.so.*/d +%endif + +%if 0%{?rhel} == 6 + %filter_from_requires /libnss3.so.*/d + %filter_from_requires /libsmime3.so.*/d + %filter_from_requires /libssl3.so.*/d + %filter_from_requires /libnssutil3.so.*/d + %filter_from_requires /libnspr4.so.*/d + %filter_from_provides /libnss3.so.*/d + %filter_from_provides /libsmime3.so.*/d + %filter_from_provides /libssl3.so.*/d + %filter_from_provides /libnssutil3.so.*/d + %filter_from_provides /libnspr4.so.*/d +%endif + +%if 0%{?bundle_gtk3} + %if ! 0%{?avoid_bundled_rebuild} + rpm -ivh %{SOURCE200} + rpmbuild --nodeps --define '_prefix %{gtk3_install_path}' -ba %{_specdir}/gtk3-private.spec + %endif + pushd %{_buildrootdir} + install_rpms_to_current_dir gtk3-private-%{gtk3_nvr}*.rpm + install_rpms_to_current_dir gtk3-private-devel-%{gtk3_nvr}*.rpm + install_rpms_to_current_dir gtk3-private-rpm-scripts-%{gtk3_nvr}*.rpm + popd +%endif + +%if 0%{?bundle_gtk3} +# gtk3-private-3.22.26.el6-1-requires-provides-filter.inc +%include_file %{SOURCE206} +%endif +%if 0%{use_bundled_ffi} + # Install libraries to the predefined location to later add them to the Firefox libraries + rpm -ivh %{SOURCE303} + rpmbuild --nodeps --define '_prefix %{gtk3_install_path}' -ba %{_specdir}/libffi.spec + pushd %{_buildrootdir} + install_rpms_to_current_dir 'libffi*.rpm' + popd + %filter_from_requires /libffi.so.6/d +%endif +%filter_setup + +# If needed build the bundled python 2.7 and 3.6 and put it in the PATH +%if 0%{?use_bundled_python_3} + pushd %{_builddir}/python3/Python-%{bundled_python_version_3} + ./configure --prefix="%{_buildrootdir}" --exec-prefix="%{_buildrootdir}" --libdir="%{_buildrootdir}/lib" || cat config.log + make %{?_smp_mflags} install V=1 -j1 + cp Tools/scripts/pathfix.py %{_buildrootdir}/bin + popd +%endif +%if 0%{?use_bundled_python_2} + pushd %{_builddir}/python2/Python-%{bundled_python_version_2} + ./configure --prefix="%{_buildrootdir}" --exec-prefix="%{_buildrootdir}" --libdir="%{_buildrootdir}/lib" || cat config.log + make %{?_smp_mflags} install V=1 + popd +%endif + +function replace_prefix() { + FILE_NAME=$1 + PKG_CONFIG_PREFIX=$2 + + cat $FILE_NAME | tail -n +2 > tmp.txt + echo "$PKG_CONFIG_PREFIX" > $FILE_NAME + cat tmp.txt >> $FILE_NAME + rm -rf tmp.txt +} + +# Build and install local openssl if needed +# ========================================= +%if 0%{?use_bundled_openssl} + rpm -ivh %{SOURCE305} + rpmbuild --nodeps -ba %{_specdir}/openssl.spec + pushd %{_buildrootdir} + install_rpms_to_current_dir openssl-1.0.2k*.rpm + install_rpms_to_current_dir openssl-libs-1.0.2k*.rpm + install_rpms_to_current_dir openssl-devel-1.0.2k*.rpm + install_rpms_to_current_dir openssl-static-1.0.2k*.rpm + # openssl is installed to %{_buildrootdir}/usr/lib(64)/... + export PKG_CONFIG_PATH=%{_buildrootdir}/%{_libdir}/pkgconfig/:$PKG_CONFIG_PATH + replace_prefix %{_buildrootdir}/%{_libdir}/pkgconfig/libcrypto.pc prefix=%{_buildrootdir}/usr + replace_prefix %{_buildrootdir}/%{_libdir}/pkgconfig/libssl.pc prefix=%{_buildrootdir}/usr + replace_prefix %{_buildrootdir}/%{_libdir}/pkgconfig/openssl.pc prefix=%{_buildrootdir}/usr + cat %{_buildrootdir}/%{_libdir}/pkgconfig/libcrypto.pc + cat %{_buildrootdir}/%{_libdir}/pkgconfig/libssl.pc + cat %{_buildrootdir}/%{_libdir}/pkgconfig/openssl.pc + pushd %{_rpmdir} + rm -f openssl-*.rpm + popd + popd +%endif + +# We need to disable exit on error temporarily for the following scripts: +set +e +%if 0%{?use_dts} +source scl_source enable devtoolset-%{dts_version} +%endif +%if 0%{?use_rustts} +source scl_source enable rust-toolset-%{rust_toolset_version} +%endif + +env +which gcc +which c++ +which g++ +which ld +# Build and install local node if needed +# ====================================== +%if %{use_bundled_nodejs} + build_bundled_package 'nodejs-10*.rpm' 'nodejs-*.rpm npm-*.rpm' %{SOURCE304} "--with bootstrap" + export MOZ_NODEJS=$PACKAGE_DIR/usr/bin/node +%else + export MOZ_NODEJS=/usr/bin/node +%endif mkdir -p my_rust_vendor cd my_rust_vendor %{__tar} xf %{SOURCE2} +cd - mkdir -p .cargo cat > .cargo/config < 30 -MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fpermissive" +%if 0%{?fedora} > 23 +# Disable null pointer gcc6 optimization in gcc6 (rhbz#1328045) +MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fno-delete-null-pointer-checks" %endif +# Use hardened build? %if %{?hardened_build} MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -Wl,-z,relro -Wl,-z,now" %endif @@ -568,120 +1164,117 @@ MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %ifarch s390 MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') # If MOZ_DEBUG_FLAGS is empty, firefox's build will default it to "-g" which -# overrides the -g1 from line above and breaks building on s390/arm +# overrides the -g1 from line above and breaks building on s390 # (OOM when linking, rhbz#1238225) export MOZ_DEBUG_FLAGS=" " %endif -%ifarch %{arm} %{ix86} -MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g0/') -export MOZ_DEBUG_FLAGS=" " -%endif -%if !%{build_with_clang} -%ifarch s390 ppc aarch64 %{ix86} -MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" -%endif -%ifarch %{arm} -MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--strip-debug" -echo "ac_add_options --enable-linker=gold" >> .mozconfig -%endif -%endif -%if 0%{?flatpak} -# Make sure the linker can find libraries in /app/lib64 as we don't use -# __global_ldflags that normally sets this. -MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -L%{_libdir}" -%endif -%ifarch %{arm} %{ix86} -export RUSTFLAGS="-Cdebuginfo=0" -%endif -%if %{build_with_asan} -MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fsanitize=address -Dxmalloc=myxmalloc" -MOZ_LINK_FLAGS="$MOZ_LINK_FLAGS -fsanitize=address -ldl" -%endif # We don't wantfirefox to use CK_GCM_PARAMS_V3 in nss MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -DNSS_PKCS11_3_0_STRICT" -echo "export CFLAGS=\"$MOZ_OPT_FLAGS\"" >> .mozconfig -echo "export CXXFLAGS=\"$MOZ_OPT_FLAGS\"" >> .mozconfig -echo "export LDFLAGS=\"$MOZ_LINK_FLAGS\"" >> .mozconfig - -%if %{build_with_clang} -echo "export LLVM_PROFDATA=\"llvm-profdata\"" >> .mozconfig -echo "export AR=\"llvm-ar\"" >> .mozconfig -echo "export NM=\"llvm-nm\"" >> .mozconfig -echo "export RANLIB=\"llvm-ranlib\"" >> .mozconfig -echo "ac_add_options --enable-linker=lld" >> .mozconfig -%else -echo "export CC=gcc" >> .mozconfig -echo "export CXX=g++" >> .mozconfig -echo "export AR=\"gcc-ar\"" >> .mozconfig -echo "export NM=\"gcc-nm\"" >> .mozconfig -echo "export RANLIB=\"gcc-ranlib\"" >> .mozconfig +%ifarch s390 %{arm} ppc aarch64 i686 x86_64 s390x +MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif -%if 0%{?build_with_pgo} -echo "ac_add_options MOZ_PGO=1" >> .mozconfig - -# Temporary disabled due to GCC bug -# Fixed by https://bugzilla.mozilla.org/show_bug.cgi?id=1671345 -# Should be in Firefox 83 -%if 0%{?fedora} > 31 -echo "ac_add_options --enable-lto" >> .mozconfig +%ifarch %{arm} i686 +MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--strip-debug" +echo "ac_add_options --enable-linker=gold" >> .mozconfig %endif -# PGO build doesn't work with ccache -export CCACHE_DISABLE=1 +%ifarch %{arm} i686 +export RUSTFLAGS="-Cdebuginfo=0" %endif +export CFLAGS=$MOZ_OPT_FLAGS +export CXXFLAGS=$MOZ_OPT_FLAGS +export LDFLAGS=$MOZ_LINK_FLAGS + +export PREFIX='%{_prefix}' +export LIBDIR='%{_libdir}' +export CC=gcc +export CXX=g++ MOZ_SMP_FLAGS=-j1 -# On x86_64 architectures, Mozilla can build up to 4 jobs at once in parallel, -# however builds tend to fail on other arches when building in parallel. -%ifarch %{ix86} +# More than two build tasks can lead to OOM gcc crash. +%if 0%{?rhel} < 8 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 +%else +%ifarch %{ix86} x86_64 ppc ppc64 ppc64le aarch64 +[ -z "$RPM_BUILD_NCPUS" ] && \ + RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" +[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 +[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j3 +[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j3 %endif -%ifarch x86_64 ppc ppc64 ppc64le %{arm} aarch64 -[ -z "$RPM_BUILD_NCPUS" ] && \ - RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" -[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 -[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4 -[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 -[ "$RPM_BUILD_NCPUS" -ge 16 ] && MOZ_SMP_FLAGS=-j16 -[ "$RPM_BUILD_NCPUS" -ge 24 ] && MOZ_SMP_FLAGS=-j24 %endif -echo "mk_add_options MOZ_MAKE_FLAGS=\"$MOZ_SMP_FLAGS\"" >> .mozconfig -echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig -echo "export STRIP=/bin/true" >> .mozconfig -export MACH_USE_SYSTEM_PYTHON=1 -%if %{build_with_pgo} -%if %{pgo_wayland} -if [ -z "$XDG_RUNTIME_DIR" ]; then - export XDG_RUNTIME_DIR=$HOME -fi -xvfb-run mutter --wayland --nested & -if [ -z "$WAYLAND_DISPLAY" ]; then - export WAYLAND_DISPLAY=wayland-0 +cat /proc/meminfo + +# Free memory in kB +if grep -q MemAvailable /proc/meminfo; then + MEM_AVAILABLE=$(grep MemAvailable /proc/meminfo | awk '{ print $2 }') else - export WAYLAND_DISPLAY=wayland-1 + MEM_AVAILABLE=$(grep MemFree /proc/meminfo | awk '{ print $2 }') fi -MOZ_ENABLE_WAYLAND=1 ./mach build 2>&1 | cat - -%else -GDK_BACKEND=x11 xvfb-run ./mach build 2>&1 | cat - + +# Usually the compiler processes can take 2 GB of memory at peaks +TASK_SIZE=4000000 +MEM_CONSTRAINED_JOBS=$(( MEM_AVAILABLE / TASK_SIZE )) + +if [ $MEM_CONSTRAINED_JOBS -le 0 ]; then + MEM_CONSTRAINED_JOBS=1 +fi + +CPU_AVAILABLE=$(/usr/bin/getconf _NPROCESSORS_ONLN) +# Pick the minimum from available CPUs or memory constrained number of jobs +MOZ_SMP_FLAGS=-j$([ "$CPU_AVAILABLE" -le "$MEM_CONSTRAINED_JOBS" ] && echo "$CPU_AVAILABLE" || echo "$MEM_CONSTRAINED_JOBS") + +%if 0%{?bundle_gtk3} +# gtk3-private-setup-flags-env.inc +%include_file %{SOURCE205} %endif + +%if 0%{?bundle_nss} +echo "Setting nss flags" +# nss-setup-flags-env.inc +%include_file %{SOURCE401} +export PATH=%{_buildrootdir}/%{gtk3_install_path}/bin:$PATH +echo $PKG_CONFIG_PATH +%endif + +export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" +export MOZ_SERVICES_SYNC="1" +# we need to strip the sources on i686 because to we don't use rpm to generate debugsymbols because of oom +%ifnarch i686 i386 +export STRIP=/bin/true +%endif +which node +echo 'export NODEJS="%{_buildrootdir}/bin/node-stdout-nonblocking-wrapper"' +env +ls %{_buildrootdir} + + +%if 0%{?rhel} == 6 +export POLICY_FILE="rhel6.config" +export POLICT_PATH="/etc/pki/nss-legacy" +%endif + +%if 0%{?use_llvmts} +scl enable llvm-toolset-%{llvm_version} './mach build -v' %else -./mach build -v 2>&1 | cat - +./mach build -v %endif # create debuginfo for crash-stats.mozilla.com %if %{enable_mozilla_crashreporter} +#cd %{moz_objdir} make -C objdir buildsymbols %endif %if %{?run_tests} %if %{?system_nss} -ln -s %{_prefix}/bin/certutil objdir/dist/bin/certutil -ln -s %{_prefix}/bin/pk12util objdir/dist/bin/pk12util +ln -s /usr/bin/certutil objdir/dist/bin/certutil +ln -s /usr/bin/pk12util objdir/dist/bin/pk12util %endif mkdir test_results @@ -711,11 +1304,72 @@ rm -f objdir/dist/bin/pk12util #--------------------------------------------------------------------- %install +%if 0%{?rhel} == 6 +export SHELL=/bin/sh +%endif + +function install_rpms_to_current_dir() { + PACKAGE_RPM=$(eval echo $1) + PACKAGE_DIR=%{_rpmdir} + + if [ ! -f $PACKAGE_DIR/$PACKAGE_RPM ]; then + # Hack for tps tests + ARCH_STR=%{_arch} + %ifarch i386 i686 + ARCH_STR="i?86" + %endif + %if 0%{?rhel} > 6 + PACKAGE_DIR="$PACKAGE_DIR/$ARCH_STR" + %endif + fi + + for package in $(ls $PACKAGE_DIR/$PACKAGE_RPM) + do + echo "$package" + rpm2cpio "$package" | cpio -idu + done +} + +%if 0%{?bundle_gtk3} +pushd %{buildroot} +# Install gtk3-private again to the buildroot, but without devel subpackage +install_rpms_to_current_dir gtk3-private-%{gtk3_nvr}*.rpm +install_rpms_to_current_dir gtk3-private-rpm-scripts-%{gtk3_nvr}*.rpm +popd +%endif + +%if 0%{?bundle_nss} + pushd %{buildroot} + #install_rpms_to_current_dir nss-*.rpm + install_rpms_to_current_dir nspr-4*.rpm + install_rpms_to_current_dir nss-3*.rpm + install_rpms_to_current_dir nss-softokn-3*.rpm + install_rpms_to_current_dir nss-softokn-freebl-3*.rpm + install_rpms_to_current_dir nss-util-3*.rpm + + # cleanup unecessary nss files + #rm -rf %{_buildrootdir}/%{gtk3_install_path}/bin + #rm -rf %{_buildrootdir}/%{gtk3_install_path}/include + rm -rf %{buildroot}/%{gtk3_install_path}/lib/dracut + rm -rf %{buildroot}/%{gtk3_install_path}/%{_lib}/nss + #rm -rf %{_buildrootdir}/%{gtk3_install_path}/%{_lib}/pkgconfig + rm -rf %{buildroot}/%{gtk3_install_path}/%{_lib}/share + rm -rf %{buildroot}/%{gtk3_install_path}/share + rm -rf %{buildroot}/etc/pki + rm -rf %{buildroot}/usr/lib/.build-id + rm -rf %{buildroot}/etc/crypto-policies + popd +%endif + +# Install bundled libffi +%if %{use_bundled_ffi} + pushd %{buildroot} + install_rpms_to_current_dir libffi-3*.rpm + popd +%endif # set up our default bookmarks -%if !0%{?flatpak} %{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/chrome/en-US/locale/browser/bookmarks.html -%endif # Make sure locale works for langpacks %{__cat} > objdir/dist/bin/browser/defaults/preferences/firefox-l10n.js << EOF @@ -727,35 +1381,18 @@ DESTDIR=%{buildroot} make -C objdir install %{__mkdir_p} %{buildroot}{%{_libdir},%{_bindir},%{_datadir}/applications} desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE20} -%if 0%{?wayland_backend_default} -desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE31} -%endif -desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE29} # set up the firefox start script -%if 0%{?wayland_backend_default} -%global wayland_default true -%else -%global wayland_default false -%endif %{__rm} -rf %{buildroot}%{_bindir}/firefox -%{__sed} -e 's/__DEFAULT_WAYLAND__/%{wayland_default}/' \ - -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE21} > %{buildroot}%{_bindir}/firefox -%{__chmod} 755 %{buildroot}%{_bindir}/firefox - - -%if 0%{?flatpak} -sed -i -e 's|%FLATPAK_ENV_VARS%|export TMPDIR="$XDG_CACHE_HOME/tmp"|' %{buildroot}%{_bindir}/firefox +%{__cat} %{SOURCE21} > %{buildroot}%{_bindir}/firefox +sed -i -e 's|%PREFIX%|%{_prefix}|' %{buildroot}%{_bindir}/firefox +%if 0%{?bundle_gtk3} +sed -i -e 's|%RHEL_ENV_VARS%|export XDG_DATA_DIRS="$MOZ_LIB_DIR/firefox/bundled/share:/usr/share:$XDG_DATA_DIRS"\nexport FONTCONFIG_FILE="$MOZ_LIB_DIR/firefox/bundled/etc/fonts/fonts.conf"|' %{buildroot}%{_bindir}/firefox %else -sed -i -e 's|%FLATPAK_ENV_VARS%||' %{buildroot}%{_bindir}/firefox +sed -i -e 's|%RHEL_ENV_VARS%||' %{buildroot}%{_bindir}/firefox %endif -%if 0%{?wayland_backend_default} -%{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE30} > %{buildroot}%{_bindir}/firefox-x11 -%{__chmod} 755 %{buildroot}%{_bindir}/firefox-x11 -%endif -%{__sed} -e 's,/__PREFIX__,%{_prefix},g' %{SOURCE28} > %{buildroot}%{_bindir}/firefox-wayland -%{__chmod} 755 %{buildroot}%{_bindir}/firefox-wayland +%{__chmod} 755 %{buildroot}%{_bindir}/firefox %{__install} -p -D -m 644 %{SOURCE23} %{buildroot}%{_mandir}/man1/firefox.1 @@ -773,8 +1410,48 @@ done %{__cp} -p %{SOURCE25} \ %{buildroot}%{_datadir}/icons/hicolor/symbolic/apps +# Register as an application to be visible in the software center +# +# NOTE: It would be *awesome* if this file was maintained by the upstream +# project, translated and installed into the right place during `make install`. +# +# See http://www.freedesktop.org/software/appstream/docs/ for more details. +# +%{__mkdir_p} %{buildroot}%{_datadir}/appdata +cat > %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml < + + + + firefox.desktop + CC0-1.0 + +

+ Bringing together all kinds of awesomeness to make browsing better for you. + Get to your favorite sites quickly – even if you don’t remember the URLs. + Type your term into the location bar (aka the Awesome Bar) and the autocomplete + function will include possible matches from your browsing history, bookmarked + sites and open tabs. +

+ +
+ http://www.mozilla.org/ + + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/a.png + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/b.png + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/firefox/c.png + + +
+EOF + echo > %{name}.lang -%if %{with langpacks} +%if %{build_langpacks} # Extract langpacks, make any mods needed, repack the langpack, and install it. %{__mkdir_p} %{buildroot}%{langpackdir} %{__tar} xf %{SOURCE1} @@ -791,11 +1468,7 @@ for langpack in `ls firefox-langpacks/*.xpi`; do %{__install} -m 644 ${extensionID}.xpi %{buildroot}%{langpackdir} language=`echo $language | sed -e 's/-/_/g'` -%if 0%{?flatpak} - echo "%{langpackdir}/${extensionID}.xpi" >> %{name}.lang -%else echo "%%lang($language) %{langpackdir}/${extensionID}.xpi" >> %{name}.lang -%endif done %{__rm} -rf firefox-langpacks @@ -811,7 +1484,6 @@ echo "%%lang($language_short) %{langpackdir}/langpack-$language_short@firefox.mo # Table of fallbacks for each language # please file a bug at bugzilla.redhat.com if the assignment is incorrect -#create_default_langpack "bn-IN" "bn" create_default_langpack "es-AR" "es" create_default_langpack "fy-NL" "fy" create_default_langpack "ga-IE" "ga" @@ -826,7 +1498,12 @@ create_default_langpack "sv-SE" "sv" create_default_langpack "zh-TW" "zh" %endif -%{__mkdir_p} %{buildroot}/%{mozappdir}/browser/defaults/preferences +# Keep compatibility with the old preference location. +%{__mkdir_p} %{buildroot}%{mozappdir}/defaults/preferences +%{__mkdir_p} %{buildroot}%{mozappdir}/browser/defaults +ln -s %{mozappdir}/defaults/preferences $RPM_BUILD_ROOT/%{mozappdir}/browser/defaults/preferences +# Default preferences +%{__cp} %{SOURCE12} %{buildroot}%{mozappdir}/defaults/preferences/all-redhat.js # System config dir %{__mkdir_p} %{buildroot}/%{_sysconfdir}/%{name}/pref @@ -856,8 +1533,6 @@ sed -i -e "s/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/" %{buildroot}/%{moz %{__cp} test_results/* %{buildroot}/test_results %endif -# Default -%{__cp} %{SOURCE12} %{buildroot}%{mozappdir}/browser/defaults/preferences # Copy over run-mozilla.sh %{__cp} build/unix/run-mozilla.sh %{buildroot}%{mozappdir} @@ -866,54 +1541,50 @@ sed -i -e "s/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/" %{buildroot}/%{moz %{__mkdir_p} %{buildroot}%{mozappdir}/distribution %{__cp} %{SOURCE26} %{buildroot}%{mozappdir}/distribution -# Install appdata file -mkdir -p %{buildroot}%{_datadir}/metainfo -%{__sed} -e 's/__VERSION__/%{version}/' %{SOURCE33} > %{buildroot}%{_datadir}/metainfo/firefox.appdata.xml - -# Install Gnome search provider files -mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers -%{__cp} %{SOURCE34} %{buildroot}%{_datadir}/gnome-shell/search-providers +%if 0%{?centos} +sed -i -e 's|Red Hat Enterprise|CentOS|' %{buildroot}%{mozappdir}/distribution/distribution.ini +%endif # Remove copied libraries to speed up build rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozjs.so rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libmozalloc.so rm -f %{buildroot}%{mozappdirdev}/sdk/lib/libxul.so + +%if %{bundle_gnome_extension} +# Gnome extension +%{__mkdir_p} %{buildroot}%{mozappdir}/distribution/extensions +%{__cp} -p %{SOURCE2} %{buildroot}%{mozappdir}/distribution/extensions/chrome-gnome-shell@gnome.org.xpi +chmod 644 %{buildroot}%{mozappdir}/distribution/extensions/chrome-gnome-shell@gnome.org.xpi +%endif #--------------------------------------------------------------------- -# Moves defaults/preferences to browser/defaults/preferences -%pretrans -p -require 'posix' -require 'os' -if (posix.stat("%{mozappdir}/browser/defaults/preferences", "type") == "link") then - posix.unlink("%{mozappdir}/browser/defaults/preferences") - posix.mkdir("%{mozappdir}/browser/defaults/preferences") - if (posix.stat("%{mozappdir}/defaults/preferences", "type") == "directory") then - for i,filename in pairs(posix.dir("%{mozappdir}/defaults/preferences")) do - os.rename("%{mozappdir}/defaults/preferences/"..filename, "%{mozappdir}/browser/defaults/preferences/"..filename) - end - f = io.open("%{mozappdir}/defaults/preferences/README","w") - if f then - f:write("Content of this directory has been moved to %{mozappdir}/browser/defaults/preferences.") - f:close() - end - end -end - -%check -appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.appdata.xml - %preun # is it a final removal? if [ $1 -eq 0 ]; then %{__rm} -rf %{mozappdir}/components %{__rm} -rf %{mozappdir}/extensions %{__rm} -rf %{mozappdir}/plugins - %{__rm} -rf %{langpackdir} fi +%clean +rm -rf %{_srcrpmdir}/gtk3-private-%{gtk3_nvr}*.src.rpm +find %{_rpmdir} -name "gtk3-private-*%{gtk3_nvr}*.rpm" -delete +rm -rf %{_srcrpmdir}/libffi*.src.rpm +find %{_rpmdir} -name "libffi*.rpm" -delete +rm -rf %{_srcrpmdir}/openssl*.src.rpm +find %{_rpmdir} -name "openssl*.rpm" -delete +rm -rf %{_srcrpmdir}/nss*.src.rpm +find %{_rpmdir} -name "nss*.rpm" -delete +rm -rf %{_srcrpmdir}/nspr*.src.rpm +find %{_rpmdir} -name "nspr*.rpm" -delete + %post update-desktop-database &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +%if 0%{?bundle_gtk3} +# gtk3-private-post.inc +%include_file %{SOURCE201} +%endif %postun update-desktop-database &> /dev/null || : @@ -921,9 +1592,17 @@ if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi +%if 0%{?bundle_gtk3} +# gtk3-private-postun.inc +%include_file %{SOURCE202} +%endif %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +%if 0%{?bundle_gtk3} +# gtk3-private-posttrans.inc +%include_file %{SOURCE203} +%endif %files -f %{name}.lang %{_bindir}/firefox @@ -934,18 +1613,16 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %dir %{_sysconfdir}/%{name}/* %dir %{_datadir}/mozilla/extensions/* %dir %{_libdir}/mozilla/extensions/* -%{_datadir}/applications/%{name}.desktop -%{_datadir}/metainfo/*.appdata.xml -%{_datadir}/gnome-shell/search-providers/*.ini +%{_datadir}/appdata/*.appdata.xml +%{_datadir}/applications/*.desktop %dir %{mozappdir} -%license %{mozappdir}/LICENSE +%doc %{mozappdir}/LICENSE %{mozappdir}/browser/chrome -%{mozappdir}/browser/defaults/preferences/firefox-redhat-default-prefs.js +%{mozappdir}/defaults/preferences/* +%{mozappdir}/browser/defaults/preferences %{mozappdir}/browser/features/*.xpi %{mozappdir}/distribution/distribution.ini -# That's Windows only -%ghost %{mozappdir}/browser/features/aushelper@mozilla.org.xpi -%if %{with langpacks} +%if %{build_langpacks} %dir %{langpackdir} %endif %{mozappdir}/browser/omni.ja @@ -976,378 +1653,324 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{mozappdir}/platform.ini %{mozappdir}/plugin-container %{mozappdir}/gmp-clearkey -%{mozappdir}/fonts/TwemojiMozilla.ttf +%{mozappdir}/fonts/*.ttf %if !%{?system_nss} %exclude %{mozappdir}/libnssckbi.so %endif -%if %{build_with_asan} -%{mozappdir}/llvm-symbolizer +%if 0%{use_bundled_ffi} +%{mozappdir}/bundled/%{_lib}/libffi.so* +%exclude %{_datadir}/doc/libffi* %endif +%if 0%{?bundle_gtk3} +# gtk3-private-files.inc +%include_file %{SOURCE204} +%endif + +%if 0%{?bundle_nss} +%{mozappdir}/bundled/%{_lib}/libfreebl* +%{mozappdir}/bundled/%{_lib}/libnss3* +%{mozappdir}/bundled/%{_lib}/libnssdbm3* +%{mozappdir}/bundled/%{_lib}/libnssutil3* +%{mozappdir}/bundled/%{_lib}/libsmime3* +%{mozappdir}/bundled/%{_lib}/libsoftokn* +%{mozappdir}/bundled/%{_lib}/libssl3* +%{mozappdir}/bundled/%{_lib}/libnspr4.so +%{mozappdir}/bundled/%{_lib}/libplc4.so +%{mozappdir}/bundled/%{_lib}/libplds4.so +%endif + + #--------------------------------------------------------------------- %changelog -* Tue Oct 27 2020 Martin Stransky - 82.0-8 -- Added fix for mozbz#1673313 +* Wed Jan 6 2021 Eike Rathke - 78.6.1-1 +- Update to 78.6.1 build1 -* Tue Oct 27 2020 Martin Stransky - 82.0-7 -- Added fix for rawhide crashes (rhbz#1891234) +* Thu Dec 10 2020 Jan Horak - 78.6.0-1 +- Update to 78.6.0 build1 -* Sat Oct 24 2020 Martin Stransky - 82.0-6 -- Enable LTO +* Wed Nov 18 2020 Jan Horak - 78.5.0-1 +- Update to 78.5.0 build1 -* Tue Oct 20 2020 Martin Stransky - 82.0-5 -- Added fix for rhbz#1889742 - Typo in /usr/bin/firefox +* Tue Nov 10 2020 erack@redhat.com - 78.4.1-1 +- Update to 78.4.1 -* Mon Oct 19 2020 Martin Stransky - 82.0-4 -- Updated openh264 patch to use keyframes from contained - for openh264 only. +* Tue Nov 10 2020 Jan Horak - 78.4.0-3 +- Fixing flatpak build, fixing firefox.sh.in to not disable langpacks loading -* Mon Oct 19 2020 Martin Stransky - 82.0-3 -- Added ELN build fixes +* Thu Oct 29 2020 Jan Horak - 78.4.0-2 +- Enable addon sideloading -* Thu Oct 15 2020 Martin Stransky - 82.0-2 -- Updated SELinux relabel setup (rhbz#1731371) +* Fri Oct 16 2020 Jan Horak - 78.4.0-1 +- Update to 78.4.0 build2 -* Thu Oct 15 2020 Martin Stransky - 82.0-1 -- Updated to 82.0 Build 2 +* Fri Sep 18 2020 Jan Horak +- Update to 78.3.0 build1 -* Thu Oct 15 2020 Martin Stransky - 81.0.2-3 -- Added experimental openh264 seek patch (mzbz#1670333) +* Tue Aug 18 2020 Jan Horak - 78.2.0-3 +- Update to 78.2.0 build1 -* Mon Oct 12 2020 Martin Stransky - 81.0.2-2 -- Added a partial fox for rhbz#1886722 +* Fri Jul 24 2020 Jan Horak +- Update to 68.11.0 build1 -* Mon Oct 12 2020 Martin Stransky - 81.0.2-1 -- Updated to latest upstream - 81.0.2 +* Fri Jun 26 2020 Jan Horak +- Update to 68.10.0 build1 -* Thu Oct 8 2020 Martin Stransky - 81.0.1-9 -- Added an updated fix for mozbz#1656727 +* Fri May 29 2020 Jan Horak +- Update to 68.9.0 build1 +- Added patch for pipewire 0.3 -* Thu Oct 8 2020 Martin Stransky - 81.0.1-8 -- Added fixes for mozbz#1634404, mozbz#1669495 +* Mon May 11 2020 Jan Horak +- Added s390x specific patches -* Thu Oct 8 2020 Martin Stransky - 81.0.1-7 -- Removed mozbz#1656727 as it causes a regression rhbz#1886243 +* Wed Apr 29 2020 Jan Horak +- Update to 68.8.0 build1 -* Wed Oct 7 2020 Martin Stransky - 81.0.1-6 -- PGO patch update -- Added fix for mzbz#1669442 (LTO builds) +* Thu Apr 23 2020 Martin Stransky - 68.7.0-3 +- Added fix for rhbz#1821418 -* Mon Oct 5 2020 Martin Stransky - 81.0.1-5 -- Added fix for mozbz#1656727 +* Tue Apr 07 2020 Jan Horak - 68.7.0-2 +- Update to 68.7.0 build3 -* Fri Oct 2 2020 Martin Stransky - 81.0.1-4 -- Added fix for mozbz#1668771 +* Mon Apr 6 2020 Jan Horak - 68.6.1-1 +- Update to 68.6.1 ESR -* Thu Oct 1 2020 Martin Stransky - 81.0.1-3 -- Added fix for mozbz#1661192 +* Wed Mar 04 2020 Jan Horak +- Update to 68.6.0 build1 -* Thu Oct 1 2020 Martin Stransky - 81.0.1-2 -- Added fix for mozbz#1640567 -- Enable PGO +* Mon Feb 24 2020 Martin Stransky - 68.5.0-3 +- Added fix for rhbz#1805667 +- Enabled mzbz@1170092 - Firefox prefs at /etc -* Wed Sep 30 2020 Martin Stransky - 81.0.1-1 -- Updated to 81.0.1 +* Fri Feb 07 2020 Jan Horak +- Update to 68.5.0 build2 -* Wed Sep 30 2020 Martin Stransky - 81.0-9 -- Disabled openh264 download -- Removed fdk-aac-free dependency (rhbz#1883672) -- Enabled LTO +* Wed Feb 05 2020 Jan Horak +- Update to 68.5.0 build1 -* Sat Sep 26 2020 Dan Horák - 81.0-8 -- Re-enable builds for ppc64le +* Wed Jan 08 2020 Jan Horak +- Update to 68.4.1esr build1 -* Fri Sep 25 2020 Martin Stransky - 81.0-7 -- Added openh264 fixes +* Fri Jan 03 2020 Jan Horak +- Update to 68.4.0esr build1 -* Wed Sep 23 2020 Martin Stransky - 81.0-6 -- Added fix for rhbz#1731371 - -* Tue Sep 22 2020 Kalev Lember - 81.0-5 -- Re-enable builds for armv7hl and aarch64 architectures - -* Tue Sep 22 2020 Kalev Lember - 81.0-4 -- Disable LTO to work around firefox build failing in F33+ - -* Mon Sep 21 2020 Martin Stransky - 81.0-3 -- Updated to 81.0 Build 2 -- Updated firefox-disable-ffvpx-with-vapi patch -- Deleted old changelog entries - -* Thu Sep 17 2020 Martin Stransky - 81.0-2 -- Added upstream patches mzbz#1665324 mozbz#1665329 -- Updated requested nss version to 3.56 - -* Tue Sep 15 2020 Martin Stransky - 81.0-1 -- Updated to 81.0 - -* Thu Sep 10 2020 Martin Stransky - 80.0.1-3 -- Test build for all arches. - -* Fri Sep 4 2020 Martin Stransky - 80.0.1-2 -- Added patch for mozbz#1875469 - -* Tue Sep 1 2020 Martin Stransky - 80.0.1-1 -- Updated to 80.0.1 - -* Tue Aug 18 2020 Martin Stransky - 80.0-1 -- Updated to 80.0 Build 2 -- Go back to gcc -- Disabled WebGL dmabuf backend due to reported errors - (mzbz#1655323, mozbz#1656505). - -* Tue Aug 18 2020 Martin Stransky - 79.0-6 -- Enabled pgo -- Build with clang - -* Tue Aug 4 2020 Martin Stransky - 79.0-5 -- Added upstream fix for mozbz#1656436. - -* Mon Aug 3 2020 Martin Stransky - 79.0-4 -- Updated fix for mozbz#1645671 - -* Thu Jul 30 2020 Martin Stransky - 79.0-3 -- Added VA-API fix for mozbz#1645671 - -* Wed Jul 29 2020 Martin Stransky - 79.0-2 -- Try to enable armv7hl again. -- Disabled ppc64le due to cargo crash (rhbz#1862012). - -* Mon Jul 27 2020 Martin Stransky - 79.0-1 -- Update to 79.0 -- Disabled PGO due to rhbz#1849165 (gcc internal error). - -* Mon Jul 27 2020 Fedora Release Engineering - 78.0.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jul 23 2020 Frantisek Zatloukal - 78.0-4 -- Use python3 instead of python2 for build - -* Tue Jul 21 2020 Martin Stransky - 78.0-3 -- Added fix for mozbz#1651701/rhbz#1855730 - -* Fri Jul 10 2020 Jan Horak - 78.0.2-2 -- Fixing clang build - linker setup - -* Thu Jul 09 2020 Jan Horak - 78.0.2-1 -- Update to 78.0.2 build2 - -* Wed Jul 01 2020 Jan Horak - 78.0.1-1 -- Update to 78.0.1 build1 - -* Wed Jul 1 2020 Martin Stransky - 78.0-2 -- Add 'Open the Profile Manager' desktop file entry - -* Mon Jun 29 2020 Jan Horak - 78.0-1 -- Update to 78.0 build2 - -* Tue Jun 23 2020 Martin Stransky - 77.0.1-3 -- Build with PGO/LTO again. - -* Wed Jun 03 2020 Jan Horak - 77.0.1-2 -- Update to 77.0.1 build1 - -* Wed Jun 03 2020 Jan Horak - 77.0.1-1 -- Fixing pipewire patch -- New upstream version (77.0.1) - -* Tue Jun 2 2020 Martin Stransky - 77.0-2 -- Rebuild with updated langpacks (rhbz#1843028). - -* Fri May 29 2020 Martin Stransky - 77.0-1 -- Updated to Firefox 77.0 - -* Mon May 25 2020 Martin Stransky - 76.0.1-7 -- Added fix for mozbz#1632456 - -* Mon May 25 2020 Martin Stransky - 76.0.1-6 -- Added fix for mozbz#1634213 - -* Mon May 25 2020 Martin Stransky - 76.0.1-5 -- Added fix for mozbz#1619882 - video flickering when va-api is used. - -* Thu May 21 2020 Jan Grulich - 76.0.1-4 -- Add support for PipeWire 0.3 - -* Wed May 20 2020 Peter Robinson - 76.0.1-3 -- Build aarch64 again so aarch64 users get updates - -* Wed May 13 2020 Martin Stransky - 76.0.1-2 -- Added extra va-api frames to vp8/9 decoder. - -* Fri May 8 2020 Martin Stransky - 76.0.1-1 -- Updated to 76.0.1 - -* Thu May 7 2020 Martin Stransky - 76.0-3 -- Disable ffvpx when va-api is enabled. - -* Tue May 05 2020 Jan Horak - 76.0-2 -- Don't use google safe browsing api key for the geolocation - -* Sun May 3 2020 Martin Stransky - 76.0-1 -- Updated to 76.0 - -* Thu Apr 23 2020 Martin Stransky - 75.0-3 -- Added fix for mozilla bug #1527976 (browser D&D) - -* Tue Apr 14 2020 Jan Horak - 75.0-2 -- Removed gconf-2.0 build requirement - -* Mon Apr 06 2020 Martin Stransky - 75.0-1 -- Updated to 75.0 - -* Mon Apr 06 2020 Martin Stransky - 74.0.1-3 -- Added fix for mozbz#1627469 - -* Mon Apr 06 2020 Jan Horak - 74.0.1-2 -- Fixing pipewire patch - -* Sat Apr 4 2020 Martin Stransky - 74.0.1-1 -- Updated to latest upstream -- Added fix for mozbz#1624745 - -* Wed Apr 1 2020 Martin Stransky - 74.0-14 -- Added fixes to gnome shell search provider - -* Tue Mar 31 2020 Jan Horak - 74.0-13 -- Allow addons sideload to fix missing langpacks issues - -* Thu Mar 19 2020 Martin Stransky - 74.0-12 -- Added fix for rhbz#1814850 by Daniel Rusek - -* Tue Mar 17 2020 Martin Stransky - 74.0-11 -- Added fix for mozbz#1623106 - -* Tue Mar 17 2020 Martin Stransky - 74.0-9 -- Added fix for mozbz#1623060 - -* Tue Mar 17 2020 Jan Grulich - 74-0-8 -- Add support for window sharing - -* Mon Mar 16 2020 Martin Stransky - 74.0-7 -- Use D-Bus remote exclusively for both X11 and Wayland backends - when WAYLAND_DISPLAY is present. - -* Fri Mar 13 2020 Martin Stransky - 74.0-6 -- Added fix for mozbz#1615098 - -* Thu Mar 12 2020 Martin Stransky - 74.0-5 -- Added fix for mozbz#1196777 - -* Tue Mar 10 2020 Kalev Lember - 74.0-4 -- Remove unused libIDL build dep -- Disabled arm due to build failures - -* Tue Mar 10 2020 Martin Stransky - 74.0-3 -- Update to 74.0 Build 3 - -* Mon Mar 09 2020 Martin Stransky - 74.0-2 -- Update to 74.0 Build 2 - -* Tue Mar 03 2020 Martin Stransky - 74.0-1 -- Update to 74.0 Build 1 -- Added mozbz#1609538 - -* Mon Feb 24 2020 Martin Stransky - 73.0.1-4 -- Using pipewire-0.2 as buildrequire -- Added armv7hl fixes by Gabriel Hojda - -* Mon Feb 24 2020 Martin Stransky - 73.0.1-2 -- Fixed Bug 1804787 - Some .desktop menu entries unlocalized - -* Thu Feb 20 2020 Martin Stransky - 73.0.1-1 -- Update to 73.0.1 - -* Tue Feb 11 2020 Jan Horak - 73.0-1 -- Update to 73.0 build3 - -* Tue Feb 04 2020 Kalev Lember - 72.0.2-3 -- Fix various issues with appdata, making the validation pass again -- Validate appdata during the build -- Make sure the release tag in appdata is in sync with the package version - -* Tue Jan 28 2020 Fedora Release Engineering - 72.0.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Mon Jan 20 2020 Jan Horak - 72.0.2-1 -- Update to 72.0.2 build1 - -* Wed Jan 15 2020 Jan Horak - 72.0.1-2 -- Added fix for wrong cursor offset of popup windows and bumped required nss - version - -* Wed Jan 08 2020 Jan Horak - 72.0.1-1 -- Update to 72.0.1 build1 - -* Mon Jan 06 2020 Jan Horak - 72.0-2 -- Update to 72.0 build4 - -* Fri Jan 03 2020 Jan Horak - 72.0-1 -- Update to 72.0 build3 - -* Wed Dec 18 2019 Jan Horak - 71.0-17 +* Wed Dec 18 2019 Jan Horak - Fix for wrong intl.accept_lang when using non en-us langpack -* Mon Dec 9 2019 Martin Stransky - 71.0-16 -- Build with asan +* Wed Nov 27 2019 Martin Stransky - 68.3.0-1 +- Update to 68.3.0 ESR -* Mon Dec 9 2019 Martin Stransky - 71.0-15 -- Enabled Mozilla crash reporter -- Enabled PGO builds +* Thu Oct 24 2019 Martin Stransky - 68.2.0-4 +- Added patch for TLS 1.3 support. -* Mon Dec 9 2019 Martin Stransky - 71.0-14 -- Updated workaround for mzbz#1601707 +* Wed Oct 23 2019 Martin Stransky - 68.2.0-3 +- Rebuild -* Sat Dec 7 2019 Martin Stransky - 71.0-13 -- Built with -fno-lifetime-dse +* Mon Oct 21 2019 Martin Stransky - 68.2.0-2 +- Rebuild -* Fri Dec 6 2019 Martin Stransky - 71.0-12 -- Clang test build, should fix extension breakage +* Thu Oct 17 2019 Martin Stransky - 68.2.0-1 +- Update to 68.2.0 ESR -* Fri Dec 6 2019 Martin Stransky - 71.0-11 -- Added workaround for: - https://bugzilla.mozilla.org/show_bug.cgi?id=1601707 - http://gcc.gnu.org/PR92831 +* Thu Oct 10 2019 Martin Stransky - 68.1.0-6 +- Enable system nss on RHEL6 -* Fri Dec 6 2019 Martin Stransky - 71.0-10 -- Remove appdata and ship metainfo only +* Thu Sep 5 2019 Jan Horak - 68.1.0-2 +- Enable building langpacks -* Wed Dec 4 2019 Martin Stransky - 71.0-9 -- Included kiosk mode workaround (mozbz#1594738) +* Wed Aug 28 2019 Jan Horak - 68.1.0-1 +- Update to 68.1.0 ESR -* Tue Dec 3 2019 Martin Stransky - 71.0-8 -- Disabled PGO due to startup crash +* Mon Aug 5 2019 Martin Stransky - 68.0.1-4 +- Enable system nss -* Mon Dec 2 2019 Martin Stransky - 71.0-7 -- Updated to 71.0 Build 5 -- Updated Gnome search provider +* Mon Jul 29 2019 Martin Stransky - 68.0.1-3 +- Enable official branding -* Wed Nov 27 2019 Martin Stransky - 71.0-6 -- Enable Gnome search provider +* Fri Jul 26 2019 Martin Stransky - 68.0.1-2 +- Enabled PipeWire on RHEL8 -* Wed Nov 27 2019 Martin Stransky - 71.0-5 -- Added fix for mozbz#1593408 -- Temporary disable Gnome search provider +* Fri Jul 26 2019 Martin Stransky - 68.0.1-1 +- Updated to 68.0.1 ESR -* Tue Nov 26 2019 Martin Stransky - 71.0-2 -- Enable Gnome search provider +* Tue Jul 16 2019 Jan Horak - 68.0-0.11 +- Update to 68.0 ESR -* Tue Nov 26 2019 Martin Stransky - 71.0-1 -- Updated to 71.0 Build 2 +* Tue Jun 25 2019 Martin Stransky - 68.0-0.10 +- Updated to 68.0 alpha 13 +- Enabled second arches -* Tue Nov 19 2019 Jan Horak - 70.0.1-5 -- Added fixes for missing popup and overflow widget glitches +* Fri Mar 22 2019 Martin Stransky - 68.0-0.1 +- Updated to 68.0 alpha -* Mon Nov 04 2019 Jan Horak - 70.0.1-4 -- Added fix for non-scrollable popups +* Fri Mar 15 2019 Martin Stransky - 60.6.0-3 +- Added Google API keys (mozbz#1531176) -* Fri Nov 1 2019 Martin Stransky - 70.0.1-1 -- Updated to 70.0.1 -- Built with system-nss (reverted 70.0-2 change). +* Thu Mar 14 2019 Martin Stransky - 60.6.0-2 +- Update to 60.6.0 ESR (Build 2) -* Thu Oct 31 2019 Martin Stransky - 70.0-2 -- Switched to in-tree nss due to rhbz#1752303 +* Wed Mar 13 2019 Martin Stransky - 60.6.0-1 +- Update to 60.6.0 ESR (Build 1) -* Tue Oct 15 2019 Martin Stransky - 70.0-1 -- Updated to 70.0 +* Wed Feb 13 2019 Jan Horak - 60.5.1-1 +- Update to 60.5.1 ESR + +* Wed Feb 6 2019 Martin Stransky - 60.5.0-3 +- Added fix for rhbz#1672424 - Firefox crashes on NFS drives. + +* Fri Jan 25 2019 Martin Stransky - 60.5.0-2 +- Updated to 60.5.0 ESR build2 + +* Tue Jan 22 2019 Martin Stransky - 60.5.0-1 +- Updated to 60.5.0 ESR build1 + +* Thu Jan 10 2019 Jan Horak - 60.4.0-3 +- Fixing fontconfig warnings (rhbz#1601475) + +* Wed Jan 9 2019 Jan Horak - 60.4.0-2 +- Added pipewire patch from Tomas Popela (rhbz#1664270) + +* Wed Dec 5 2018 Jan Horak - 60.4.0-1 +- Update to 60.4.0 ESR + +* Tue Dec 4 2018 Jan Horak - 60.3.0-2 +- Added firefox-gnome-shell-extension + +* Fri Oct 19 2018 Jan Horak - 60.3.0-1 +- Update to 60.3.0 ESR + +* Wed Oct 10 2018 Jan Horak - 60.2.2-2 +- Added patch for rhbz#1633932 + +* Tue Oct 2 2018 Jan Horak - 60.2.2-1 +- Update to 60.2.2 ESR + +* Mon Sep 24 2018 Jan Horak - 60.2.1-1 +- Update to 60.2.1 ESR + +* Fri Aug 31 2018 Jan Horak - 60.2.0-1 +- Update to 60.2.0 ESR + +* Tue Aug 28 2018 Jan Horak - 60.1.0-9 +- Do not set user agent (rhbz#1608065) +- GTK dialogs are localized now (rhbz#1619373) +- JNLP association works again (rhbz#1607457) + +* Thu Aug 16 2018 Jan Horak - 60.1.0-8 +- Fixed homepage and bookmarks (rhbz#1606778) +- Fixed missing file associations in RHEL6 (rhbz#1613565) + +* Thu Jul 12 2018 Jan Horak - 60.1.0-7 +- Run at-spi-bus if not running already (for the bundled gtk3) + +* Mon Jul 9 2018 Jan Horak - 60.1.0-6 +- Fix for missing schemes for bundled gtk3 + +* Mon Jun 25 2018 Martin Stransky - 60.1.0-5 +- Added mesa-libEGL dependency to gtk3/rhel6 + +* Sun Jun 24 2018 Martin Stransky - 60.1.0-4 +- Disabled jemalloc on all second arches + +* Fri Jun 22 2018 Martin Stransky - 60.1.0-3 +- Updated to 60.1.0 ESR build2 + +* Thu Jun 21 2018 Martin Stransky - 60.1.0-2 +- Disabled jemalloc on second arches + +* Wed Jun 20 2018 Martin Stransky - 60.1.0-1 +- Updated to 60.1.0 ESR + +* Wed Jun 13 2018 Jan Horak - 60.0-12 +- Fixing bundled libffi issues +- Readded some requirements + +* Mon Jun 11 2018 Martin Stransky - 60.0-10 +- Added fix for mozilla BZ#1436242 - IPC crashes. + +* Mon Jun 11 2018 Jan Horak - 60.0-9 +- Bundling libffi for the sec-arches +- Added openssl-devel for the Python +- Fixing bundled gtk3 + +* Fri May 18 2018 Martin Stransky - 60.0-8 +- Added fix for mozilla BZ#1458492 + +* Wed May 16 2018 Martin Stransky - 60.0-7 +- Added patch from rhbz#1498561 to fix ppc64(le) crashes. + +* Wed May 16 2018 Martin Stransky - 60.0-6 +- Disabled jemalloc on second arches + +* Sun May 6 2018 Jan Horak - 60.0-4 +- Update to 60.0 ESR + +* Thu Mar 8 2018 Jan Horak - 52.7.0-1 +- Update to 52.7.0 ESR + +* Mon Jan 29 2018 Martin Stransky - 52.6.0-2 +- Build Firefox for desktop arches only (x86_64 and ppc64le) + +* Thu Jan 18 2018 Martin Stransky - 52.6.0-1 +- Update to 52.6.0 ESR + +* Thu Nov 9 2017 Jan Horak - 52.5.0-1 +- Update to 52.5.0 ESR + +* Mon Sep 25 2017 Jan Horak - 52.4.0-1 +- Update to 52.4.0 ESR + +* Thu Aug 3 2017 Jan Horak - 52.3.0-3 +- Update to 52.3.0 ESR (b2) +- Require correct nss version + +* Tue Jun 13 2017 Jan Horak - 52.2.0-1 +- Update to 52.2.0 ESR + +* Wed May 24 2017 Jan Horak - 52.1.2-1 +- Update to 52.1.2 ESR + +* Wed May 24 2017 Jan Horak - 52.0-7 +- Added fix for accept language (rhbz#1454322) + +* Wed Mar 22 2017 Jan Horak - 52.0-6 +- Removing patch required for older NSS from RHEL 7.3 +- Added patch for rhbz#1414564 + +* Fri Mar 17 2017 Martin Stransky - 52.0-5 +- Added fix for mozbz#1348168/CVE-2017-5428 + +* Mon Mar 6 2017 Jan Horak - 52.0-4 +- Update to 52.0 ESR (b4) + +* Thu Mar 2 2017 Martin Stransky - 52.0-3 +- Added fix for rhbz#1423012 - ppc64 gfx crashes + +* Wed Mar 1 2017 Jan Horak - 52.0-2 +- Enable system nss + +* Tue Feb 28 2017 Martin Stransky - 52.0-1 +- Update to 52.0ESR (B1) +- Build RHEL7 package for Gtk3 + +* Mon Feb 27 2017 Martin Stransky - 52.0-0.13 +- Added fix for rhbz#1414535 + +* Tue Feb 21 2017 Jan Horak - 52.0-0.12 +- Update to 52.0b8 + +* Tue Feb 7 2017 Jan Horak - 52.0-0.11 +- Readded addons patch + +* Mon Feb 6 2017 Jan Horak - 52.0-0.10 +- Update to 52.0b3 + +* Tue Jan 31 2017 Jan Horak - 52.0-0.9 +- Update to 52.0b2 + +* Fri Jan 27 2017 Jan Horak - 52.0-0.8 +- Update to 52.0b1 + +* Thu Dec 8 2016 Jan Horak - 52.0-0.5 +- Firefox Aurora 52 testing build diff --git a/gen_cbindgen-vendor.sh b/gen_cbindgen-vendor.sh index 8ddb8cd..6646367 100755 --- a/gen_cbindgen-vendor.sh +++ b/gen_cbindgen-vendor.sh @@ -13,6 +13,7 @@ to be used with 'cargo vendor' commmand. [dependencies] cbindgen = "0.14.1" +serde = "1.0.104" [[bin]] name = "dummy" @@ -20,7 +21,7 @@ path = "dummy.rs" doc = false EOL -cargo install cargo-vendor +cargo install cargo-vendor --locked cargo vendor cd vendor diff --git a/google-loc-api-key b/google-loc-api-key deleted file mode 100644 index f40090d..0000000 --- a/google-loc-api-key +++ /dev/null @@ -1 +0,0 @@ -AIzaSyB2h2OuRcUgy5N-5hsZqiPW6sH3n_rptiQ diff --git a/mozilla-1170092.patch b/mozilla-1170092.patch index 49b7b49..2a7169b 100644 --- a/mozilla-1170092.patch +++ b/mozilla-1170092.patch @@ -1,6 +1,6 @@ -diff -up firefox-75.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-75.0/extensions/pref/autoconfig/src/nsReadConfig.cpp ---- firefox-75.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2020-04-03 21:34:41.000000000 +0200 -+++ firefox-75.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2020-04-06 22:40:02.760674871 +0200 +diff -up firefox-78.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-78.0/extensions/pref/autoconfig/src/nsReadConfig.cpp +--- firefox-78.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2020-06-17 04:18:58.000000000 +0200 ++++ firefox-78.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2020-06-25 13:45:28.816999491 +0200 @@ -244,8 +244,20 @@ nsresult nsReadConfig::openAndEvaluateJS if (NS_FAILED(rv)) return rv; @@ -12,7 +12,7 @@ diff -up firefox-75.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 fi + getter_AddRefs(jsFile)); + NS_ENSURE_SUCCESS(rv, rv); + -+ rv = jsFile->AppendNative(nsLiteralCString("pref")); ++ rv = jsFile->AppendNative(NS_LITERAL_CSTRING("pref")); + NS_ENSURE_SUCCESS(rv, rv); + rv = jsFile->AppendNative(nsDependentCString(aFileName)); + NS_ENSURE_SUCCESS(rv, rv); @@ -23,22 +23,21 @@ diff -up firefox-75.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 fi } else { nsAutoCString location("resource://gre/defaults/autoconfig/"); location += aFileName; -diff -up firefox-75.0/modules/libpref/Preferences.cpp.1170092 firefox-75.0/modules/libpref/Preferences.cpp ---- firefox-75.0/modules/libpref/Preferences.cpp.1170092 2020-04-06 22:40:02.761674865 +0200 -+++ firefox-75.0/modules/libpref/Preferences.cpp 2020-04-06 22:40:57.675325227 +0200 -@@ -4468,6 +4468,9 @@ nsresult Preferences::InitInitialObjects +diff -up firefox-78.0/modules/libpref/Preferences.cpp.1170092 firefox-78.0/modules/libpref/Preferences.cpp +--- firefox-78.0/modules/libpref/Preferences.cpp.1170092 2020-06-25 13:45:28.818999498 +0200 ++++ firefox-78.0/modules/libpref/Preferences.cpp 2020-06-25 13:48:45.996708102 +0200 +@@ -4499,6 +4499,8 @@ nsresult Preferences::InitInitialObjects // // Thus, in the omni.jar case, we always load app-specific default // preferences from omni.jar, whether or not `$app == $gre`. -+ // + // At very end load configuration from system config location: + // - /etc/firefox/pref/*.js nsresult rv = NS_ERROR_FAILURE; UniquePtr find; -diff -up firefox-75.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-75.0/toolkit/xre/nsXREDirProvider.cpp ---- firefox-75.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2020-04-03 21:35:39.000000000 +0200 -+++ firefox-75.0/toolkit/xre/nsXREDirProvider.cpp 2020-04-06 22:40:02.761674865 +0200 +diff -up firefox-78.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-78.0/toolkit/xre/nsXREDirProvider.cpp +--- firefox-78.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2020-06-17 04:20:11.000000000 +0200 ++++ firefox-78.0/toolkit/xre/nsXREDirProvider.cpp 2020-06-25 13:48:28.613645633 +0200 @@ -60,6 +60,7 @@ #endif #ifdef XP_UNIX @@ -54,7 +53,7 @@ diff -up firefox-75.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-75.0/tool + +#if defined(XP_UNIX) + if (!strcmp(aProperty, NS_APP_PREFS_SYSTEM_CONFIG_DIR)) { -+ nsCString sysConfigDir = nsLiteralCString("/etc/"); ++ nsCString sysConfigDir = NS_LITERAL_CSTRING("/etc/"); + nsCOMPtr appInfo = do_GetService("@mozilla.org/xre/app-info;1"); + if (!appInfo) + return NS_ERROR_NOT_AVAILABLE; @@ -69,7 +68,7 @@ diff -up firefox-75.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-75.0/tool if (NS_FAILED(rv) || !file) return NS_ERROR_FAILURE; if (ensureFilePermissions) { -@@ -845,6 +861,16 @@ nsresult nsXREDirProvider::GetFilesInter +@@ -845,6 +861,17 @@ nsresult nsXREDirProvider::GetFilesInter LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories); @@ -78,17 +77,18 @@ diff -up firefox-75.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-75.0/tool + rv = NS_GetSpecialDirectory(NS_APP_PREFS_SYSTEM_CONFIG_DIR, + getter_AddRefs(systemPrefDir)); + if (NS_SUCCEEDED(rv)) { -+ rv = systemPrefDir->AppendNative(nsLiteralCString("pref")); -+ if (NS_SUCCEEDED(rv)) ++ rv = systemPrefDir->AppendNative(NS_LITERAL_CSTRING("pref")); ++ if (NS_SUCCEEDED(rv)) { + directories.AppendObject(systemPrefDir); + } ++ } + rv = NS_NewArrayEnumerator(aResult, directories, NS_GET_IID(nsIFile)); } else if (!strcmp(aProperty, NS_APP_CHROME_DIR_LIST)) { // NS_APP_CHROME_DIR_LIST is only used to get default (native) icons -diff -up firefox-75.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-75.0/xpcom/io/nsAppDirectoryServiceDefs.h ---- firefox-75.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2020-04-03 21:35:39.000000000 +0200 -+++ firefox-75.0/xpcom/io/nsAppDirectoryServiceDefs.h 2020-04-06 22:40:02.761674865 +0200 +diff -up firefox-78.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-78.0/xpcom/io/nsAppDirectoryServiceDefs.h +--- firefox-78.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2020-06-17 04:20:17.000000000 +0200 ++++ firefox-78.0/xpcom/io/nsAppDirectoryServiceDefs.h 2020-06-25 13:45:28.819999502 +0200 @@ -60,6 +60,7 @@ #define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL" #define NS_APP_PREFS_OVERRIDE_DIR \ diff --git a/mozilla-1196777.patch b/mozilla-1196777.patch index 721c897..7fa1595 100644 --- a/mozilla-1196777.patch +++ b/mozilla-1196777.patch @@ -1,10 +1,10 @@ -diff -up firefox-80.0/widget/gtk/nsWindow.cpp.1196777 firefox-80.0/widget/gtk/nsWindow.cpp ---- firefox-80.0/widget/gtk/nsWindow.cpp.1196777 2020-08-18 09:47:18.662833910 +0200 -+++ firefox-80.0/widget/gtk/nsWindow.cpp 2020-08-18 09:48:19.437478136 +0200 -@@ -158,7 +158,8 @@ const gint kEvents = - GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK | GDK_VISIBILITY_NOTIFY_MASK | - GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_PRESS_MASK | - GDK_BUTTON_RELEASE_MASK | GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK | +diff -up firefox-68.0/widget/gtk/nsWindow.cpp.1196777 firefox-68.0/widget/gtk/nsWindow.cpp +--- firefox-68.0/widget/gtk/nsWindow.cpp.1196777 2019-05-21 11:29:55.833376744 +0200 ++++ firefox-68.0/widget/gtk/nsWindow.cpp 2019-05-21 12:15:35.446089316 +0200 +@@ -156,7 +156,8 @@ const gint kEvents = + #if GTK_CHECK_VERSION(3, 4, 0) + GDK_SMOOTH_SCROLL_MASK | GDK_TOUCH_MASK | + #endif - GDK_SCROLL_MASK | GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK; + GDK_SCROLL_MASK | GDK_POINTER_MOTION_MASK | GDK_PROPERTY_CHANGE_MASK | + GDK_FOCUS_CHANGE_MASK; diff --git a/mozilla-1516803.patch b/mozilla-1516803.patch deleted file mode 100644 index f1f37f4..0000000 --- a/mozilla-1516803.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/security/sandbox/linux/moz.build b/security/sandbox/linux/moz.build ---- a/security/sandbox/linux/moz.build -+++ b/security/sandbox/linux/moz.build -@@ -99,9 +99,8 @@ - # gcc lto likes to put the top level asm in syscall.cc in a different partition - # from the function using it which breaks the build. Work around that by - # forcing there to be only one partition. --for f in CONFIG['OS_CXXFLAGS']: -- if f.startswith('-flto') and CONFIG['CC_TYPE'] != 'clang': -- LDFLAGS += ['--param lto-partitions=1'] -+if CONFIG['CC_TYPE'] != 'clang': -+ LDFLAGS += ['--param', 'lto-partitions=1'] - - DEFINES['NS_NO_XPCOM'] = True - DisableStlWrapping() - diff --git a/mozilla-1634404.patch b/mozilla-1634404.patch deleted file mode 100644 index 75ea8ce..0000000 --- a/mozilla-1634404.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -1593,7 +1593,14 @@ - // Get anchor rectangle - LayoutDeviceIntRect anchorRect(0, 0, 0, 0); - nsMenuPopupFrame* popupFrame = GetMenuPopupFrame(GetFrame()); -- int32_t p2a = AppUnitsPerCSSPixel() / gfxPlatformGtk::GetFontScaleFactor(); -+ -+ int32_t p2a; -+ double devPixelsPerCSSPixel = StaticPrefs::layout_css_devPixelsPerPx(); -+ if (devPixelsPerCSSPixel > 0.0) { -+ p2a = AppUnitsPerCSSPixel() / devPixelsPerCSSPixel * GdkScaleFactor(); -+ } else { -+ p2a = AppUnitsPerCSSPixel() / gfxPlatformGtk::GetFontScaleFactor(); -+ } - if (popupFrame) { - #ifdef MOZ_WAYLAND - anchorRect = LayoutDeviceIntRect::FromAppUnitsToOutside( - diff --git a/mozilla-1640567.patch b/mozilla-1640567.patch deleted file mode 100644 index c1f3f44..0000000 --- a/mozilla-1640567.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp ---- a/layout/xul/nsMenuPopupFrame.cpp -+++ b/layout/xul/nsMenuPopupFrame.cpp -@@ -1422,11 +1422,9 @@ - !GDK_IS_X11_DISPLAY(gdk_display_get_default())) { - screenPoint = nsPoint(anchorRect.x, anchorRect.y); - mAnchorRect = anchorRect; -- } else -+ } - #endif -- { -- screenPoint = AdjustPositionForAnchorAlign(anchorRect, hFlip, vFlip); -- } -+ screenPoint = AdjustPositionForAnchorAlign(anchorRect, hFlip, vFlip); - } else { - // with no anchor, the popup is positioned relative to the root frame - anchorRect = rootScreenRect; - diff --git a/mozilla-1640982.patch b/mozilla-1640982.patch deleted file mode 100644 index b63ba3b..0000000 --- a/mozilla-1640982.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk ---- a/config/makefiles/rust.mk -+++ b/config/makefiles/rust.mk -@@ -61,7 +61,11 @@ - # Enable link-time optimization for release builds, but not when linking - # gkrust_gtest. - ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE))) -+# Pass -Clto for older versions of rust, and CARGO_PROFILE_RELEASE_LTO=true -+# for newer ones that support it. Combining the latter with -Clto works, so -+# set both everywhere. - cargo_rustc_flags += -Clto -+export CARGO_PROFILE_RELEASE_LTO=true - endif - endif - endif - diff --git a/mozilla-1645671.patch b/mozilla-1645671.patch deleted file mode 100644 index 0943469..0000000 --- a/mozilla-1645671.patch +++ /dev/null @@ -1,67 +0,0 @@ -changeset: 544864:a8603f131703 -tag: tip -parent: 544861:161920b70ae4 -user: Martin Stransky -date: Fri Jul 31 13:39:48 2020 +0200 -files: dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h -description: -Bug 1645671 [Linux/VA-API] Create DMABufSurfaceWrapper directly at nsTAttay and disable DMABufSurfaceWrapper class copy and assignment constructors, r?jya - -When DMABufSurfaceWrapper is added to nsTArray, a temporary local DMABufSurfaceWrapper object is created. When the temporary -object is deleted after the adding, associated dmabuf data is released which leads to rendering artifact during VA-API video playback. - -As a fix in this patch we create DMABufSurfaceWrapper 'in-place' at nsTAttay. -We also disable DMABufSurfaceWrapper class copy and assignment constructors to avoid similar potential issues. - -Differential Revision: https://phabricator.services.mozilla.com/D85152 - - -diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp ---- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp -+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.cpp -@@ -777,17 +777,17 @@ MediaResult FFmpegVideoDecoderSetUID(++uid); - FFMPEG_LOG("Created new DMABufSurface UID = %d", uid); - # endif -- mDMABufSurfaces.AppendElement(DMABufSurfaceWrapper(surface, mLib)); -+ mDMABufSurfaces.EmplaceBack(surface, mLib); - surfaceWrapper = &(mDMABufSurfaces[mDMABufSurfaces.Length() - 1]); - } else { - surface = surfaceWrapper->GetDMABufSurface(); - bool ret; - - if (mVAAPIDeviceContext) { - ret = surface->UpdateYUVData(vaDesc); - } else { -diff --git a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h ---- a/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h -+++ b/dom/media/platforms/ffmpeg/FFmpegVideoDecoder.h -@@ -70,16 +70,22 @@ class DMABufSurfaceWrapper final { - // Check if DMABufSurface is used by any gecko rendering process - // (WebRender or GL compositor) or by DMABUFSurfaceImage/VideoData. - bool IsUsed() const { return mSurface->IsGlobalRefSet(); } - - RefPtr GetDMABufSurface() const { - return mSurface->GetAsDMABufSurfaceYUV(); - } - -+ // Don't allow DMABufSurfaceWrapper plain copy as it leads to -+ // enexpected DMABufSurface/HW buffer releases and we don't want to -+ // deep copy them. -+ DMABufSurfaceWrapper(const DMABufSurfaceWrapper&) = delete; -+ const DMABufSurfaceWrapper& operator=(DMABufSurfaceWrapper const&) = delete; -+ - private: - const RefPtr mSurface; - const FFmpegLibWrapper* mLib; - AVBufferRef* mAVHWFramesContext; - AVBufferRef* mHWAVBuffer; - }; - #endif - - diff --git a/mozilla-1656727.patch b/mozilla-1656727.patch deleted file mode 100644 index 91547b0..0000000 --- a/mozilla-1656727.patch +++ /dev/null @@ -1,213 +0,0 @@ -diff -up firefox-82.0/widget/gtk/WindowSurfaceWayland.cpp.1656727 firefox-82.0/widget/gtk/WindowSurfaceWayland.cpp ---- firefox-82.0/widget/gtk/WindowSurfaceWayland.cpp.1656727 2020-10-15 16:16:53.522050159 +0200 -+++ firefox-82.0/widget/gtk/WindowSurfaceWayland.cpp 2020-10-15 16:18:24.956289348 +0200 -@@ -158,7 +158,6 @@ We allocate shared memory (shm) by mmap( - between us and wayland compositor. We draw our graphics data to the shm and - handle to wayland compositor by WindowBackBuffer/WindowSurfaceWayland - (wl_buffer/wl_surface). -- - */ - - #define EVENT_LOOP_DELAY (1000 / 240) -@@ -166,6 +165,44 @@ handle to wayland compositor by WindowBa - #define BUFFER_BPP 4 - gfx::SurfaceFormat WindowBackBuffer::mFormat = gfx::SurfaceFormat::B8G8R8A8; - -+static mozilla::Mutex* gDelayedCommitLock = nullptr; -+static GList* gDelayedCommits = nullptr; -+ -+static void DelayedCommitsEnsureMutext() { -+ if (!gDelayedCommitLock) { -+ gDelayedCommitLock = new mozilla::Mutex("DelayedCommit lock"); -+ } -+} -+ -+static bool DelayedCommitsCheckAndRemoveSurface( -+ WindowSurfaceWayland* aSurface) { -+ MutexAutoLock lock(*gDelayedCommitLock); -+ GList* foundCommit = g_list_find(gDelayedCommits, aSurface); -+ if (foundCommit) { -+ gDelayedCommits = g_list_delete_link(gDelayedCommits, foundCommit); -+ } -+ return foundCommit != nullptr; -+} -+ -+static bool DelayedCommitsCheckAndAddSurface(WindowSurfaceWayland* aSurface) { -+ MutexAutoLock lock(*gDelayedCommitLock); -+ GList* foundCommit = g_list_find(gDelayedCommits, aSurface); -+ if (!foundCommit) { -+ gDelayedCommits = g_list_prepend(gDelayedCommits, aSurface); -+ } -+ return foundCommit == nullptr; -+} -+ -+// When a new window is created we may not have a valid wl_surface -+// for drawing (Gtk haven't created it yet). All commits are queued -+// and CommitWaylandBuffer() is called by timer when wl_surface is ready -+// for drawing. -+static void WaylandBufferDelayCommitHandler(WindowSurfaceWayland* aSurface) { -+ if (DelayedCommitsCheckAndRemoveSurface(aSurface)) { -+ aSurface->CommitWaylandBuffer(); -+ } -+} -+ - RefPtr WindowBackBuffer::GetWaylandDisplay() { - return mWindowSurfaceWayland->GetWaylandDisplay(); - } -@@ -399,7 +436,6 @@ WindowSurfaceWayland::WindowSurfaceWayla - mWaylandFullscreenDamage(false), - mFrameCallback(nullptr), - mLastCommittedSurface(nullptr), -- mDelayedCommitHandle(nullptr), - mLastCommitTime(0), - mDrawToWaylandBufferDirectly(true), - mCanSwitchWaylandBuffer(true), -@@ -411,6 +447,7 @@ WindowSurfaceWayland::WindowSurfaceWayla - for (int i = 0; i < BACK_BUFFER_NUM; i++) { - mShmBackupBuffer[i] = nullptr; - } -+ DelayedCommitsEnsureMutext(); - } - - WindowSurfaceWayland::~WindowSurfaceWayland() { -@@ -418,12 +455,9 @@ WindowSurfaceWayland::~WindowSurfaceWayl - NS_WARNING("Deleted WindowSurfaceWayland with a pending commit!"); - } - -- if (mDelayedCommitHandle) { -- // Delete reference to this to prevent WaylandBufferDelayCommitHandler() -- // operate on released this. mDelayedCommitHandle itself will -- // be released at WaylandBufferDelayCommitHandler(). -- *mDelayedCommitHandle = nullptr; -- } -+ // Delete reference to this to prevent WaylandBufferDelayCommitHandler() -+ // operate on released this. -+ DelayedCommitsCheckAndRemoveSurface(this); - - if (mFrameCallback) { - wl_callback_destroy(mFrameCallback); -@@ -864,23 +898,11 @@ bool WindowSurfaceWayland::CommitImageCa - return true; - } - --static void WaylandBufferDelayCommitHandler(WindowSurfaceWayland** aSurface) { -- if (*aSurface) { -- (*aSurface)->DelayedCommitHandler(); -- } else { -- // Referenced WindowSurfaceWayland is already deleted. -- // Do nothing but just release the mDelayedCommitHandle allocated at -- // WindowSurfaceWayland::CommitWaylandBuffer(). -- free(aSurface); -- } --} -- - void WindowSurfaceWayland::CommitWaylandBuffer() { - LOGWAYLAND(("WindowSurfaceWayland::CommitWaylandBuffer [%p]\n", (void*)this)); - LOGWAYLAND( - (" mDrawToWaylandBufferDirectly = %d\n", mDrawToWaylandBufferDirectly)); - LOGWAYLAND((" mCanSwitchWaylandBuffer = %d\n", mCanSwitchWaylandBuffer)); -- LOGWAYLAND((" mDelayedCommitHandle = %p\n", mDelayedCommitHandle)); - LOGWAYLAND((" mFrameCallback = %p\n", mFrameCallback)); - LOGWAYLAND((" mLastCommittedSurface = %p\n", mLastCommittedSurface)); - LOGWAYLAND((" mBufferPendingCommit = %d\n", mBufferPendingCommit)); -@@ -916,16 +938,10 @@ void WindowSurfaceWayland::CommitWayland - MOZ_ASSERT(!mFrameCallback || waylandSurface != mLastCommittedSurface, - "Missing wayland surface at frame callback!"); - -- // Do nothing if there's already mDelayedCommitHandle pending. -- if (!mDelayedCommitHandle) { -- mDelayedCommitHandle = static_cast( -- moz_xmalloc(sizeof(*mDelayedCommitHandle))); -- *mDelayedCommitHandle = this; -- -+ if (DelayedCommitsCheckAndAddSurface(this)) { - MessageLoop::current()->PostDelayedTask( - NewRunnableFunction("WaylandBackBufferCommit", -- &WaylandBufferDelayCommitHandler, -- mDelayedCommitHandle), -+ &WaylandBufferDelayCommitHandler, this), - EVENT_LOOP_DELAY); - } - return; -@@ -1037,25 +1053,6 @@ void WindowSurfaceWayland::FrameCallback - - CommitWaylandBuffer(); - } -- --void WindowSurfaceWayland::DelayedCommitHandler() { -- MOZ_ASSERT(mIsMainThread == NS_IsMainThread()); -- MOZ_ASSERT(mDelayedCommitHandle != nullptr, "Missing mDelayedCommitHandle!"); -- -- LOGWAYLAND( -- ("WindowSurfaceWayland::DelayedCommitHandler [%p]\n", (void*)this)); -- -- if (!mDelayedCommitHandle) { -- LOGWAYLAND((" We're missing mDelayedCommitHandle!\n")); -- return; -- } -- -- *mDelayedCommitHandle = nullptr; -- free(mDelayedCommitHandle); -- mDelayedCommitHandle = nullptr; -- -- CommitWaylandBuffer(); --} - - } // namespace widget - } // namespace mozilla -diff -up firefox-82.0/widget/gtk/WindowSurfaceWayland.h.1656727 firefox-82.0/widget/gtk/WindowSurfaceWayland.h ---- firefox-82.0/widget/gtk/WindowSurfaceWayland.h.1656727 2020-10-14 19:20:27.000000000 +0200 -+++ firefox-82.0/widget/gtk/WindowSurfaceWayland.h 2020-10-15 16:16:53.528050175 +0200 -@@ -161,7 +161,7 @@ class WindowSurfaceWayland : public Wind - // If we fail (wayland compositor is busy, - // wl_surface is not created yet) we queue the painting - // and we send it to wayland compositor in FrameCallbackHandler()/ -- // DelayedCommitHandler/CommitWaylandBuffer(). -+ // CommitWaylandBuffer(). - already_AddRefed Lock( - const LayoutDeviceIntRegion& aRegion) override; - void Commit(const LayoutDeviceIntRegion& aInvalidRegion) final; -@@ -171,12 +171,6 @@ class WindowSurfaceWayland : public Wind - // queued commits. - void FrameCallbackHandler(); - -- // When a new window is created we may not have a valid wl_surface -- // for drawing (Gtk haven't created it yet). All commits are queued -- // and DelayedCommitHandler() is called by timer when wl_surface is ready -- // for drawing. -- void DelayedCommitHandler(); -- - // Try to commit all queued drawings to Wayland compositor. This is usually - // called from other routines but can be used to explicitly flush - // all drawings as we do when wl_buffer is released -@@ -249,17 +243,14 @@ class WindowSurfaceWayland : public Wind - wl_callback* mFrameCallback; - wl_surface* mLastCommittedSurface; - -- // Registered reference to pending DelayedCommitHandler() call. -- WindowSurfaceWayland** mDelayedCommitHandle; -- - // Cached drawings. If we can't get WaylandBuffer (wl_buffer) at - // WindowSurfaceWayland::Lock() we direct gecko rendering to - // mImageSurface. - // If we can't get WaylandBuffer at WindowSurfaceWayland::Commit() - // time, mImageSurface is moved to mDelayedImageCommits which - // holds all cached drawings. -- // mDelayedImageCommits can be drawn by FrameCallbackHandler(), -- // DelayedCommitHandler() or when WaylandBuffer is detached. -+ // mDelayedImageCommits can be drawn by FrameCallbackHandler() -+ // or when WaylandBuffer is detached. - RefPtr mImageSurface; - AutoTArray mDelayedImageCommits; - -@@ -282,8 +273,8 @@ class WindowSurfaceWayland : public Wind - // We can't send WaylandBuffer (wl_buffer) to compositor when gecko - // is rendering into it (i.e. between WindowSurfaceWayland::Lock() / - // WindowSurfaceWayland::Commit()). -- // Thus we use mBufferCommitAllowed to disable commit by callbacks -- // (FrameCallbackHandler(), DelayedCommitHandler()) -+ // Thus we use mBufferCommitAllowed to disable commit by -+ // CommitWaylandBuffer(). - bool mBufferCommitAllowed; - - // We need to clear WaylandBuffer when entire transparent window is repainted. diff --git a/mozilla-1661192.patch b/mozilla-1661192.patch deleted file mode 100644 index fa3cd42..0000000 --- a/mozilla-1661192.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp ---- a/widget/gtk/nsWindow.cpp -+++ b/widget/gtk/nsWindow.cpp -@@ -1600,9 +1600,11 @@ - #endif - } - -+ bool hasAnchorRect = true; - if (anchorRect.width == 0) { - LOG((" No anchor rect given, use aPosition for anchor")); - anchorRect.SetRect(aPosition->x, aPosition->y, 1, 1); -+ hasAnchorRect = false; - } - LOG((" anchor x %d y %d width %d height %d (absolute coords)\n", - anchorRect.x, anchorRect.y, anchorRect.width, anchorRect.height)); -@@ -1704,7 +1706,7 @@ - nsPoint cursorOffset(0, 0); - #ifdef MOZ_WAYLAND - // Offset is already computed to the tooltips -- if (popupFrame && mPopupType != ePopupTypeTooltip) { -+ if (hasAnchorRect && popupFrame && mPopupType != ePopupTypeTooltip) { - nsMargin margin(0, 0, 0, 0); - popupFrame->StyleMargin()->GetMargin(margin); - switch (popupFrame->GetPopupAlignment()) { - diff --git a/mozilla-1663844.patch b/mozilla-1663844.patch deleted file mode 100644 index 3e55e80..0000000 --- a/mozilla-1663844.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff --git a/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp b/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp ---- a/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp -+++ b/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp -@@ -86,7 +86,7 @@ bool GMPDecoderModule::SupportsMimeType( - - bool GMPDecoderModule::SupportsMimeType( - const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics) const { -- return false; -+ return MP4Decoder::IsH264(aMimeType); - } - - } // namespace mozilla -diff --git a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp ---- a/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp -+++ b/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp -@@ -67,6 +67,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4 - RefPtr self = this; - if (v) { - mDecodedData.AppendElement(std::move(v)); -+ mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__); -+ mDecodedData = DecodedData(); - } else { - mDecodedData.Clear(); - mDecodePromise.RejectIfExists( -diff -up firefox-81.0.2/dom/media/gmp/GMPSharedMemManager.h.oldd firefox-81.0.2/dom/media/gmp/GMPSharedMemManager.h ---- firefox-81.0.2/dom/media/gmp/GMPSharedMemManager.h.oldd 2020-10-12 18:19:09.158070701 +0200 -+++ firefox-81.0.2/dom/media/gmp/GMPSharedMemManager.h 2020-10-12 18:19:18.398109540 +0200 -@@ -27,7 +27,7 @@ class GMPSharedMem { - // returned to the parent pool (which is not included). If more than - // this are needed, we presume the client has either crashed or hung - // (perhaps temporarily). -- static const uint32_t kGMPBufLimit = 20; -+ static const uint32_t kGMPBufLimit = 40; - - GMPSharedMem() { - for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]); diff --git a/mozilla-1665329.patch b/mozilla-1665329.patch deleted file mode 100644 index 62ce5ae..0000000 --- a/mozilla-1665329.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml ---- a/modules/libpref/init/StaticPrefList.yaml -+++ b/modules/libpref/init/StaticPrefList.yaml -@@ -7565,11 +7565,7 @@ - # acceleration for decoding. - - name: media.navigator.mediadatadecoder_vpx_enabled - type: RelaxedAtomicBool -- #if defined(NIGHTLY_BUILD) - value: true -- #else -- value: false -- #endif - mirror: always - - # Use MediaDataDecoder API for H264 in WebRTC. This includes hardware - diff --git a/mozilla-1667096.patch b/mozilla-1667096.patch deleted file mode 100644 index 5d98fe2..0000000 --- a/mozilla-1667096.patch +++ /dev/null @@ -1,473 +0,0 @@ -changeset: 551978:40c95986d358 -tag: tip -parent: 551976:daadcfadb2f8 -user: stransky -date: Thu Sep 24 15:51:06 2020 +0200 -files: media/ffvpx/libavcodec/codec_list.c media/ffvpx/libavcodec/libfdk-aacdec.c media/ffvpx/libavcodec/moz.build toolkit/moz.configure -description: -Bug 1667096 Add libfdk-aacdec.c to bundled ffvpx and allow build Firefox with system fdk-aac-free library, r?jya - -Differential Revision: https://phabricator.services.mozilla.com/D91278 - - -diff --git a/media/ffvpx/libavcodec/codec_list.c b/media/ffvpx/libavcodec/codec_list.c ---- a/media/ffvpx/libavcodec/codec_list.c -+++ b/media/ffvpx/libavcodec/codec_list.c -@@ -11,4 +11,8 @@ static const AVCodec * const codec_list[ - #if CONFIG_MP3_DECODER - &ff_mp3_decoder, - #endif -+#ifdef CONFIG_LIBFDK_AAC -+ &ff_libfdk_aac_decoder, -+#endif -+ - NULL }; -diff --git a/media/ffvpx/libavcodec/libfdk-aacdec.c b/media/ffvpx/libavcodec/libfdk-aacdec.c -new file mode 100644 ---- /dev/null -+++ b/media/ffvpx/libavcodec/libfdk-aacdec.c -@@ -0,0 +1,409 @@ -+/* -+ * AAC decoder wrapper -+ * Copyright (c) 2012 Martin Storsjo -+ * -+ * This file is part of FFmpeg. -+ * -+ * Permission to use, copy, modify, and/or distribute this software for any -+ * purpose with or without fee is hereby granted, provided that the above -+ * copyright notice and this permission notice appear in all copies. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include -+ -+#include "libavutil/channel_layout.h" -+#include "libavutil/common.h" -+#include "libavutil/opt.h" -+#include "avcodec.h" -+#include "internal.h" -+ -+#ifdef AACDECODER_LIB_VL0 -+#define FDKDEC_VER_AT_LEAST(vl0, vl1) \ -+ ((AACDECODER_LIB_VL0 > vl0) || \ -+ (AACDECODER_LIB_VL0 == vl0 && AACDECODER_LIB_VL1 >= vl1)) -+#else -+#define FDKDEC_VER_AT_LEAST(vl0, vl1) 0 -+#endif -+ -+#if !FDKDEC_VER_AT_LEAST(2, 5) // < 2.5.10 -+#define AAC_PCM_MAX_OUTPUT_CHANNELS AAC_PCM_OUTPUT_CHANNELS -+#endif -+ -+enum ConcealMethod { -+ CONCEAL_METHOD_SPECTRAL_MUTING = 0, -+ CONCEAL_METHOD_NOISE_SUBSTITUTION = 1, -+ CONCEAL_METHOD_ENERGY_INTERPOLATION = 2, -+ CONCEAL_METHOD_NB, -+}; -+ -+typedef struct FDKAACDecContext { -+ const AVClass *class; -+ HANDLE_AACDECODER handle; -+ uint8_t *decoder_buffer; -+ int decoder_buffer_size; -+ uint8_t *anc_buffer; -+ int conceal_method; -+ int drc_level; -+ int drc_boost; -+ int drc_heavy; -+ int drc_effect; -+ int drc_cut; -+ int level_limit; -+} FDKAACDecContext; -+ -+ -+#define DMX_ANC_BUFFSIZE 128 -+#define DECODER_MAX_CHANNELS 8 -+#define DECODER_BUFFSIZE 2048 * sizeof(INT_PCM) -+ -+#define OFFSET(x) offsetof(FDKAACDecContext, x) -+#define AD AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM -+static const AVOption fdk_aac_dec_options[] = { -+ { "conceal", "Error concealment method", OFFSET(conceal_method), AV_OPT_TYPE_INT, { .i64 = CONCEAL_METHOD_NOISE_SUBSTITUTION }, CONCEAL_METHOD_SPECTRAL_MUTING, CONCEAL_METHOD_NB - 1, AD, "conceal" }, -+ { "spectral", "Spectral muting", 0, AV_OPT_TYPE_CONST, { .i64 = CONCEAL_METHOD_SPECTRAL_MUTING }, INT_MIN, INT_MAX, AD, "conceal" }, -+ { "noise", "Noise Substitution", 0, AV_OPT_TYPE_CONST, { .i64 = CONCEAL_METHOD_NOISE_SUBSTITUTION }, INT_MIN, INT_MAX, AD, "conceal" }, -+ { "energy", "Energy Interpolation", 0, AV_OPT_TYPE_CONST, { .i64 = CONCEAL_METHOD_ENERGY_INTERPOLATION }, INT_MIN, INT_MAX, AD, "conceal" }, -+ { "drc_boost", "Dynamic Range Control: boost, where [0] is none and [127] is max boost", -+ OFFSET(drc_boost), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 127, AD, NULL }, -+ { "drc_cut", "Dynamic Range Control: attenuation factor, where [0] is none and [127] is max compression", -+ OFFSET(drc_cut), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 127, AD, NULL }, -+ { "drc_level", "Dynamic Range Control: reference level, quantized to 0.25dB steps where [0] is 0dB and [127] is -31.75dB", -+ OFFSET(drc_level), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 127, AD, NULL }, -+ { "drc_heavy", "Dynamic Range Control: heavy compression, where [1] is on (RF mode) and [0] is off", -+ OFFSET(drc_heavy), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 1, AD, NULL }, -+#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10 -+ { "level_limit", "Signal level limiting", OFFSET(level_limit), AV_OPT_TYPE_INT, { .i64 = 0 }, -1, 1, AD }, -+#endif -+#if FDKDEC_VER_AT_LEAST(3, 0) // 3.0.0 -+ { "drc_effect","Dynamic Range Control: effect type, where e.g. [0] is none and [6] is general", -+ OFFSET(drc_effect), AV_OPT_TYPE_INT, { .i64 = -1}, -1, 8, AD, NULL }, -+#endif -+ { NULL } -+}; -+ -+static const AVClass fdk_aac_dec_class = { -+ .class_name = "libfdk-aac decoder", -+ .item_name = av_default_item_name, -+ .option = fdk_aac_dec_options, -+ .version = LIBAVUTIL_VERSION_INT, -+}; -+ -+static int get_stream_info(AVCodecContext *avctx) -+{ -+ FDKAACDecContext *s = avctx->priv_data; -+ CStreamInfo *info = aacDecoder_GetStreamInfo(s->handle); -+ int channel_counts[0x24] = { 0 }; -+ int i, ch_error = 0; -+ uint64_t ch_layout = 0; -+ -+ if (!info) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to get stream info\n"); -+ return AVERROR_UNKNOWN; -+ } -+ -+ if (info->sampleRate <= 0) { -+ av_log(avctx, AV_LOG_ERROR, "Stream info not initialized\n"); -+ return AVERROR_UNKNOWN; -+ } -+ avctx->sample_rate = info->sampleRate; -+ avctx->frame_size = info->frameSize; -+ -+ for (i = 0; i < info->numChannels; i++) { -+ AUDIO_CHANNEL_TYPE ctype = info->pChannelType[i]; -+ if (ctype <= ACT_NONE || ctype >= FF_ARRAY_ELEMS(channel_counts)) { -+ av_log(avctx, AV_LOG_WARNING, "unknown channel type\n"); -+ break; -+ } -+ channel_counts[ctype]++; -+ } -+ av_log(avctx, AV_LOG_DEBUG, -+ "%d channels - front:%d side:%d back:%d lfe:%d top:%d\n", -+ info->numChannels, -+ channel_counts[ACT_FRONT], channel_counts[ACT_SIDE], -+ channel_counts[ACT_BACK], channel_counts[ACT_LFE], -+ channel_counts[ACT_FRONT_TOP] + channel_counts[ACT_SIDE_TOP] + -+ channel_counts[ACT_BACK_TOP] + channel_counts[ACT_TOP]); -+ -+ switch (channel_counts[ACT_FRONT]) { -+ case 4: -+ ch_layout |= AV_CH_LAYOUT_STEREO | AV_CH_FRONT_LEFT_OF_CENTER | -+ AV_CH_FRONT_RIGHT_OF_CENTER; -+ break; -+ case 3: -+ ch_layout |= AV_CH_LAYOUT_STEREO | AV_CH_FRONT_CENTER; -+ break; -+ case 2: -+ ch_layout |= AV_CH_LAYOUT_STEREO; -+ break; -+ case 1: -+ ch_layout |= AV_CH_FRONT_CENTER; -+ break; -+ default: -+ av_log(avctx, AV_LOG_WARNING, -+ "unsupported number of front channels: %d\n", -+ channel_counts[ACT_FRONT]); -+ ch_error = 1; -+ break; -+ } -+ if (channel_counts[ACT_SIDE] > 0) { -+ if (channel_counts[ACT_SIDE] == 2) { -+ ch_layout |= AV_CH_SIDE_LEFT | AV_CH_SIDE_RIGHT; -+ } else { -+ av_log(avctx, AV_LOG_WARNING, -+ "unsupported number of side channels: %d\n", -+ channel_counts[ACT_SIDE]); -+ ch_error = 1; -+ } -+ } -+ if (channel_counts[ACT_BACK] > 0) { -+ switch (channel_counts[ACT_BACK]) { -+ case 3: -+ ch_layout |= AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT | AV_CH_BACK_CENTER; -+ break; -+ case 2: -+ ch_layout |= AV_CH_BACK_LEFT | AV_CH_BACK_RIGHT; -+ break; -+ case 1: -+ ch_layout |= AV_CH_BACK_CENTER; -+ break; -+ default: -+ av_log(avctx, AV_LOG_WARNING, -+ "unsupported number of back channels: %d\n", -+ channel_counts[ACT_BACK]); -+ ch_error = 1; -+ break; -+ } -+ } -+ if (channel_counts[ACT_LFE] > 0) { -+ if (channel_counts[ACT_LFE] == 1) { -+ ch_layout |= AV_CH_LOW_FREQUENCY; -+ } else { -+ av_log(avctx, AV_LOG_WARNING, -+ "unsupported number of LFE channels: %d\n", -+ channel_counts[ACT_LFE]); -+ ch_error = 1; -+ } -+ } -+ if (!ch_error && -+ av_get_channel_layout_nb_channels(ch_layout) != info->numChannels) { -+ av_log(avctx, AV_LOG_WARNING, "unsupported channel configuration\n"); -+ ch_error = 1; -+ } -+ if (ch_error) -+ avctx->channel_layout = 0; -+ else -+ avctx->channel_layout = ch_layout; -+ -+ avctx->channels = info->numChannels; -+ -+ return 0; -+} -+ -+static av_cold int fdk_aac_decode_close(AVCodecContext *avctx) -+{ -+ FDKAACDecContext *s = avctx->priv_data; -+ -+ if (s->handle) -+ aacDecoder_Close(s->handle); -+ av_freep(&s->decoder_buffer); -+ av_freep(&s->anc_buffer); -+ -+ return 0; -+} -+ -+static av_cold int fdk_aac_decode_init(AVCodecContext *avctx) -+{ -+ FDKAACDecContext *s = avctx->priv_data; -+ AAC_DECODER_ERROR err; -+ -+ s->handle = aacDecoder_Open(avctx->extradata_size ? TT_MP4_RAW : TT_MP4_ADTS, 1); -+ if (!s->handle) { -+ av_log(avctx, AV_LOG_ERROR, "Error opening decoder\n"); -+ return AVERROR_UNKNOWN; -+ } -+ -+ if (avctx->extradata_size) { -+ if ((err = aacDecoder_ConfigRaw(s->handle, &avctx->extradata, -+ &avctx->extradata_size)) != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to set extradata\n"); -+ return AVERROR_INVALIDDATA; -+ } -+ } -+ -+ if ((err = aacDecoder_SetParam(s->handle, AAC_CONCEAL_METHOD, -+ s->conceal_method)) != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to set error concealment method\n"); -+ return AVERROR_UNKNOWN; -+ } -+ -+ if (avctx->request_channel_layout > 0 && -+ avctx->request_channel_layout != AV_CH_LAYOUT_NATIVE) { -+ int downmix_channels = -1; -+ -+ switch (avctx->request_channel_layout) { -+ case AV_CH_LAYOUT_STEREO: -+ case AV_CH_LAYOUT_STEREO_DOWNMIX: -+ downmix_channels = 2; -+ break; -+ case AV_CH_LAYOUT_MONO: -+ downmix_channels = 1; -+ break; -+ default: -+ av_log(avctx, AV_LOG_WARNING, "Invalid request_channel_layout\n"); -+ break; -+ } -+ -+ if (downmix_channels != -1) { -+ if (aacDecoder_SetParam(s->handle, AAC_PCM_MAX_OUTPUT_CHANNELS, -+ downmix_channels) != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_WARNING, "Unable to set output channels in the decoder\n"); -+ } else { -+ s->anc_buffer = av_malloc(DMX_ANC_BUFFSIZE); -+ if (!s->anc_buffer) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to allocate ancillary buffer for the decoder\n"); -+ return AVERROR(ENOMEM); -+ } -+ if (aacDecoder_AncDataInit(s->handle, s->anc_buffer, DMX_ANC_BUFFSIZE)) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to register downmix ancillary buffer in the decoder\n"); -+ return AVERROR_UNKNOWN; -+ } -+ } -+ } -+ } -+ -+ if (s->drc_boost != -1) { -+ if (aacDecoder_SetParam(s->handle, AAC_DRC_BOOST_FACTOR, s->drc_boost) != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to set DRC boost factor in the decoder\n"); -+ return AVERROR_UNKNOWN; -+ } -+ } -+ -+ if (s->drc_cut != -1) { -+ if (aacDecoder_SetParam(s->handle, AAC_DRC_ATTENUATION_FACTOR, s->drc_cut) != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to set DRC attenuation factor in the decoder\n"); -+ return AVERROR_UNKNOWN; -+ } -+ } -+ -+ if (s->drc_level != -1) { -+ if (aacDecoder_SetParam(s->handle, AAC_DRC_REFERENCE_LEVEL, s->drc_level) != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to set DRC reference level in the decoder\n"); -+ return AVERROR_UNKNOWN; -+ } -+ } -+ -+ if (s->drc_heavy != -1) { -+ if (aacDecoder_SetParam(s->handle, AAC_DRC_HEAVY_COMPRESSION, s->drc_heavy) != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to set DRC heavy compression in the decoder\n"); -+ return AVERROR_UNKNOWN; -+ } -+ } -+ -+#if FDKDEC_VER_AT_LEAST(2, 5) // 2.5.10 -+ if (aacDecoder_SetParam(s->handle, AAC_PCM_LIMITER_ENABLE, s->level_limit) != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to set in signal level limiting in the decoder\n"); -+ return AVERROR_UNKNOWN; -+ } -+#endif -+ -+#if FDKDEC_VER_AT_LEAST(3, 0) // 3.0.0 -+ if (s->drc_effect != -1) { -+ if (aacDecoder_SetParam(s->handle, AAC_UNIDRC_SET_EFFECT, s->drc_effect) != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_ERROR, "Unable to set DRC effect type in the decoder\n"); -+ return AVERROR_UNKNOWN; -+ } -+ } -+#endif -+ -+ avctx->sample_fmt = AV_SAMPLE_FMT_S16; -+ -+ s->decoder_buffer_size = DECODER_BUFFSIZE * DECODER_MAX_CHANNELS; -+ s->decoder_buffer = av_malloc(s->decoder_buffer_size); -+ if (!s->decoder_buffer) -+ return AVERROR(ENOMEM); -+ -+ return 0; -+} -+ -+static int fdk_aac_decode_frame(AVCodecContext *avctx, void *data, -+ int *got_frame_ptr, AVPacket *avpkt) -+{ -+ FDKAACDecContext *s = avctx->priv_data; -+ AVFrame *frame = data; -+ int ret; -+ AAC_DECODER_ERROR err; -+ UINT valid = avpkt->size; -+ -+ err = aacDecoder_Fill(s->handle, &avpkt->data, &avpkt->size, &valid); -+ if (err != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_ERROR, "aacDecoder_Fill() failed: %x\n", err); -+ return AVERROR_INVALIDDATA; -+ } -+ -+ err = aacDecoder_DecodeFrame(s->handle, (INT_PCM *) s->decoder_buffer, s->decoder_buffer_size / sizeof(INT_PCM), 0); -+ if (err == AAC_DEC_NOT_ENOUGH_BITS) { -+ ret = avpkt->size - valid; -+ goto end; -+ } -+ if (err != AAC_DEC_OK) { -+ av_log(avctx, AV_LOG_ERROR, -+ "aacDecoder_DecodeFrame() failed: %x\n", err); -+ ret = AVERROR_UNKNOWN; -+ goto end; -+ } -+ -+ if ((ret = get_stream_info(avctx)) < 0) -+ goto end; -+ frame->nb_samples = avctx->frame_size; -+ -+ if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) -+ goto end; -+ -+ memcpy(frame->extended_data[0], s->decoder_buffer, -+ avctx->channels * avctx->frame_size * -+ av_get_bytes_per_sample(avctx->sample_fmt)); -+ -+ *got_frame_ptr = 1; -+ ret = avpkt->size - valid; -+ -+end: -+ return ret; -+} -+ -+static av_cold void fdk_aac_decode_flush(AVCodecContext *avctx) -+{ -+ FDKAACDecContext *s = avctx->priv_data; -+ AAC_DECODER_ERROR err; -+ -+ if (!s->handle) -+ return; -+ -+ if ((err = aacDecoder_SetParam(s->handle, -+ AAC_TPDEC_CLEAR_BUFFER, 1)) != AAC_DEC_OK) -+ av_log(avctx, AV_LOG_WARNING, "failed to clear buffer when flushing\n"); -+} -+ -+AVCodec ff_libfdk_aac_decoder = { -+ .name = "libfdk_aac", -+ .long_name = NULL_IF_CONFIG_SMALL("Fraunhofer FDK AAC"), -+ .type = AVMEDIA_TYPE_AUDIO, -+ .id = AV_CODEC_ID_AAC, -+ .priv_data_size = sizeof(FDKAACDecContext), -+ .init = fdk_aac_decode_init, -+ .decode = fdk_aac_decode_frame, -+ .close = fdk_aac_decode_close, -+ .flush = fdk_aac_decode_flush, -+ .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, -+ .priv_class = &fdk_aac_dec_class, -+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | -+ FF_CODEC_CAP_INIT_CLEANUP, -+ .wrapper_name = "libfdk", -+}; -diff --git a/media/ffvpx/libavcodec/moz.build b/media/ffvpx/libavcodec/moz.build ---- a/media/ffvpx/libavcodec/moz.build -+++ b/media/ffvpx/libavcodec/moz.build -@@ -97,6 +97,12 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']: - 'vp9recon.c' - ] - -+if CONFIG['MOZ_FDK_AAC']: -+ SOURCES += [ -+ 'libfdk-aacdec.c', -+ ] -+ OS_LIBS += CONFIG['MOZ_FDK_AAC_LIBS'] -+ - if CONFIG['MOZ_LIBAV_FFT']: - SOURCES += [ - 'avfft.c', -diff --git a/toolkit/moz.configure b/toolkit/moz.configure ---- a/toolkit/moz.configure -+++ b/toolkit/moz.configure -@@ -1592,6 +1592,14 @@ with only_when(compile_environment): - set_define('MOZ_LIBAV_FFT', depends(when=libav_fft)(lambda: True)) - set_config('LIBAV_FFT_ASFLAGS', libav_fft.flags) - -+# fdk aac support -+option('--with-system-fdk-aac', -+ help='Use system libfdk-aac (located with pkgconfig)') -+ -+system_fdk_aac = pkg_check_modules('MOZ_FDK_AAC', 'fdk-aac', -+ when='--with-system-fdk-aac') -+ -+set_config('MOZ_FDK_AAC', depends(when=system_fdk_aac)(lambda: True)) - - # FFmpeg's ffvpx configuration - # ============================================================== - diff --git a/mozilla-1668771.patch b/mozilla-1668771.patch deleted file mode 100644 index 4b3cb3e..0000000 --- a/mozilla-1668771.patch +++ /dev/null @@ -1,41 +0,0 @@ -changeset: 552978:b50cb0696eef -tag: tip -parent: 552976:2ce12e3e063c -user: stransky -date: Fri Oct 02 12:19:53 2020 +0200 -files: widget/gtk/WindowSurfaceWayland.cpp -description: -Bug 1668771 [Wayland] Use timeout for frame callbacks for basic compositor, r?jhorak - -Differential Revision: https://phabricator.services.mozilla.com/D92200 - - -diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp ---- a/widget/gtk/WindowSurfaceWayland.cpp -+++ b/widget/gtk/WindowSurfaceWayland.cpp -@@ -37,6 +37,9 @@ extern mozilla::LazyLogModule gWidgetWay - // Maximal compositing timeout it miliseconds - #define COMPOSITING_TIMEOUT 200 - -+// Maximal timeout between frame callbacks -+#define FRAME_CALLBACK_TIMEOUT 20 -+ - namespace mozilla { - namespace widget { - -@@ -941,8 +944,12 @@ void WindowSurfaceWayland::CommitWayland - if (waylandSurface == mLastCommittedSurface) { - LOGWAYLAND((" [%p] wait for frame callback.\n", (void*)this)); - // We have an active frame callback pending from our recent surface. -- // It means we should defer the commit to FrameCallbackHandler(). -- return; -+ // It means we should defer the commit to FrameCallbackHandler(), -+ // but only if we're under frame callback timeout range. -+ if (mLastCommitTime && (g_get_monotonic_time() / 1000) - mLastCommitTime < -+ FRAME_CALLBACK_TIMEOUT) { -+ return; -+ } - } - // If our stored wl_surface does not match the actual one it means the frame - // callback is no longer active and we should release it. - diff --git a/mozilla-1669442.patch b/mozilla-1669442.patch deleted file mode 100644 index 6373816..0000000 --- a/mozilla-1669442.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/config/recurse.mk b/config/recurse.mk ---- a/config/recurse.mk -+++ b/config/recurse.mk -@@ -206,7 +206,7 @@ - # Interdependencies that moz.build world don't know about yet for compilation. - # Note some others are hardcoded or "guessed" in recursivemake.py and emitter.py - ifeq ($(MOZ_WIDGET_TOOLKIT),gtk) --toolkit/library/target: widget/gtk/mozgtk/gtk3/target -+toolkit/library/build/target: widget/gtk/mozgtk/gtk3/target - endif - - ifndef MOZ_FOLD_LIBS - diff --git a/mozilla-1669495.patch b/mozilla-1669495.patch deleted file mode 100644 index e30bb89..0000000 --- a/mozilla-1669495.patch +++ /dev/null @@ -1,130 +0,0 @@ -diff -up firefox-82.0/layout/xul/nsMenuPopupFrame.cpp.1669495 firefox-82.0/layout/xul/nsMenuPopupFrame.cpp ---- firefox-82.0/layout/xul/nsMenuPopupFrame.cpp.1669495 2020-10-15 16:13:12.304471453 +0200 -+++ firefox-82.0/layout/xul/nsMenuPopupFrame.cpp 2020-10-15 16:13:12.308471463 +0200 -@@ -533,6 +533,26 @@ void nsMenuPopupFrame::LayoutPopup(nsBox - } - prefSize = XULBoundsCheck(minSize, prefSize, maxSize); - -+#ifdef MOZ_WAYLAND -+ static bool inWayland = gdk_display_get_default() && -+ !GDK_IS_X11_DISPLAY(gdk_display_get_default()); -+#else -+ static bool inWayland = false; -+#endif -+ if (inWayland) { -+ // If prefSize it is not a whole number in css pixels we need round it up -+ // to avoid reflow of the tooltips/popups and putting the text on two lines -+ // (usually happens with 200% scale factor and font scale factor <> 1) -+ // because GTK thrown away the decimals. -+ int32_t appPerCSS = AppUnitsPerCSSPixel(); -+ if (prefSize.width % appPerCSS > 0) { -+ prefSize.width += appPerCSS; -+ } -+ if (prefSize.height % appPerCSS > 0) { -+ prefSize.height += appPerCSS; -+ } -+ } -+ - bool sizeChanged = (mPrefSize != prefSize); - // if the size changed then set the bounds to be the preferred size - if (sizeChanged) { -diff -up firefox-82.0/widget/gtk/nsWindow.cpp.1669495 firefox-82.0/widget/gtk/nsWindow.cpp ---- firefox-82.0/widget/gtk/nsWindow.cpp.1669495 2020-10-15 16:13:12.307471461 +0200 -+++ firefox-82.0/widget/gtk/nsWindow.cpp 2020-10-15 16:15:49.243882006 +0200 -@@ -1092,11 +1092,13 @@ void nsWindow::Show(bool aState) { - - void nsWindow::ResizeInt(int aX, int aY, int aWidth, int aHeight, bool aMove, - bool aRepaint) { -- LOG(("nsWindow::ResizeInt [%p] %d %d -> %d %d repaint %d\n", (void*)this, aX, -- aY, aWidth, aHeight, aRepaint)); -+ LOG(("nsWindow::ResizeInt [%p] x:%d y:%d -> w:%d h:%d repaint %d aMove %d\n", -+ (void*)this, aX, aY, aWidth, aHeight, aRepaint, aMove)); - - ConstrainSize(&aWidth, &aHeight); - -+ LOG((" ConstrainSize: w:%d h;%d\n", aWidth, aHeight)); -+ - // If we used to have insane bounds, we may have skipped actually positioning - // the widget in NativeMoveResizeWaylandPopup, in which case we need to - // actually position it now as well. -@@ -1141,8 +1143,7 @@ void nsWindow::ResizeInt(int aX, int aY, - } - - void nsWindow::Resize(double aWidth, double aHeight, bool aRepaint) { -- LOG(("nsWindow::Resize [%p] %d %d\n", (void*)this, (int)aWidth, -- (int)aHeight)); -+ LOG(("nsWindow::Resize [%p] %f %f\n", (void*)this, aWidth, aHeight)); - - double scale = - BoundsUseDesktopPixels() ? GetDesktopToDeviceScale().scale : 1.0; -@@ -1154,8 +1155,8 @@ void nsWindow::Resize(double aWidth, dou - - void nsWindow::Resize(double aX, double aY, double aWidth, double aHeight, - bool aRepaint) { -- LOG(("nsWindow::Resize [%p] %d %d repaint %d\n", (void*)this, (int)aWidth, -- (int)aHeight, aRepaint)); -+ LOG(("nsWindow::Resize [%p] %f %f repaint %d\n", (void*)this, aWidth, aHeight, -+ aRepaint)); - - double scale = - BoundsUseDesktopPixels() ? GetDesktopToDeviceScale().scale : 1.0; -@@ -1478,14 +1479,15 @@ void nsWindow::NativeMoveResizeWaylandPo - - newBounds.x = GdkCoordToDevicePixels(newBounds.x); - newBounds.y = GdkCoordToDevicePixels(newBounds.y); -- LOG((" new mBounds x=%d y=%d width=%d height=%d\n", newBounds.x, -- newBounds.y, newBounds.width, newBounds.height)); - - double scale = - BoundsUseDesktopPixels() ? GetDesktopToDeviceScale().scale : 1.0; - int32_t newWidth = NSToIntRound(scale * newBounds.width); - int32_t newHeight = NSToIntRound(scale * newBounds.height); - -+ LOG((" new mBounds x=%d y=%d width=%d height=%d\n", newBounds.x, -+ newBounds.y, newWidth, newHeight)); -+ - bool needsPositionUpdate = - (newBounds.x != mBounds.x || newBounds.y != mBounds.y); - bool needsSizeUpdate = -@@ -1493,6 +1495,7 @@ void nsWindow::NativeMoveResizeWaylandPo - // Update view - - if (needsSizeUpdate) { -+ LOG((" needSizeUpdate\n")); - int32_t p2a = AppUnitsPerCSSPixel() / gfxPlatformGtk::GetFontScaleFactor(); - mPreferredPopupRect = nsRect(NSIntPixelsToAppUnits(newBounds.x, p2a), - NSIntPixelsToAppUnits(newBounds.y, p2a), -@@ -1511,6 +1514,7 @@ void nsWindow::NativeMoveResizeWaylandPo - } - - if (needsPositionUpdate) { -+ LOG((" needPositionUpdate\n")); - // The newBounds are in coordinates relative to the parent window/popup. - // The NotifyWindowMoved requires the coordinates relative to the toplevel. - // We use the gdk_window_get_origin to get correct coordinates. -@@ -4245,6 +4249,8 @@ nsresult nsWindow::Create(nsIWidget* aPa - - // save our bounds - mBounds = aRect; -+ LOG((" mBounds: x:%d y:%d w:%d h:%d\n", mBounds.x, mBounds.y, mBounds.width, -+ mBounds.height)); - - mPreferredPopupRectFlushed = false; - -@@ -5083,13 +5089,16 @@ void nsWindow::NativeShow(bool aAction) - } - } - -+ LOG((" calling gtk_widget_show(mShell)\n")); - gtk_widget_show(mShell); - if (!mIsX11Display) { - WaylandStartVsync(); - } - } else if (mContainer) { -+ LOG((" calling gtk_widget_show(mContainer)\n")); - gtk_widget_show(GTK_WIDGET(mContainer)); - } else if (mGdkWindow) { -+ LOG((" calling gdk_window_show_unraised\n")); - gdk_window_show_unraised(mGdkWindow); - } - } else { diff --git a/mozilla-1669639.patch b/mozilla-1669639.patch deleted file mode 100644 index 2d79542..0000000 --- a/mozilla-1669639.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -up firefox-81.0.1/build/mach_bootstrap.py.old firefox-81.0.1/build/mach_bootstrap.py ---- firefox-81.0.1/build/mach_bootstrap.py.old 2020-10-06 14:16:06.212974910 +0200 -+++ firefox-81.0.1/build/mach_bootstrap.py 2020-10-06 14:19:03.313179557 +0200 -@@ -507,7 +507,10 @@ class ImportHook(object): - # doesn't happen or because it doesn't matter). - if not os.path.exists(module.__file__[:-1]): - if os.path.exists(module.__file__): -- os.remove(module.__file__) -+ try: -+ os.remove(module.__file__) -+ except: -+ pass - del sys.modules[module.__name__] - module = self(name, globals, locals, fromlist, level) - diff --git a/mozilla-1670333.patch b/mozilla-1670333.patch deleted file mode 100644 index a7c7f8a..0000000 --- a/mozilla-1670333.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -up firefox-82.0/dom/media/mp4/MP4Demuxer.cpp.1670333 firefox-82.0/dom/media/mp4/MP4Demuxer.cpp ---- firefox-82.0/dom/media/mp4/MP4Demuxer.cpp.1670333 2020-10-14 19:20:18.000000000 +0200 -+++ firefox-82.0/dom/media/mp4/MP4Demuxer.cpp 2020-10-19 20:56:38.362039524 +0200 -@@ -31,6 +31,8 @@ mozilla::LogModule* GetDemuxerLog() { re - DDMOZ_LOG(gMediaDemuxerLog, mozilla::LogLevel::Debug, "::%s: " arg, \ - __func__, ##__VA_ARGS__) - -+extern bool gUseKeyframeFromContainer; -+ - namespace mozilla { - - DDLoggedTypeDeclNameAndBase(MP4TrackDemuxer, MediaTrackDemuxer); -@@ -394,6 +396,12 @@ already_AddRefed MP4TrackD - [[fallthrough]]; - case H264::FrameType::OTHER: { - bool keyframe = type == H264::FrameType::I_FRAME; -+ if (gUseKeyframeFromContainer) { -+ if (sample->mKeyframe && sample->mKeyframe != keyframe) { -+ sample->mKeyframe = keyframe; -+ } -+ break; -+ } - if (sample->mKeyframe != keyframe) { - NS_WARNING(nsPrintfCString("Frame incorrectly marked as %skeyframe " - "@ pts:%" PRId64 " dur:%" PRId64 -diff -up firefox-82.0/dom/media/platforms/PDMFactory.cpp.1670333 firefox-82.0/dom/media/platforms/PDMFactory.cpp ---- firefox-82.0/dom/media/platforms/PDMFactory.cpp.1670333 2020-10-14 19:20:18.000000000 +0200 -+++ firefox-82.0/dom/media/platforms/PDMFactory.cpp 2020-10-19 20:53:14.631214334 +0200 -@@ -49,6 +49,8 @@ - - #include - -+bool gUseKeyframeFromContainer = false; -+ - namespace mozilla { - - extern already_AddRefed CreateBlankDecoderModule(); -@@ -380,7 +382,8 @@ void PDMFactory::CreatePDMs() { - #ifdef MOZ_FFMPEG - if (StaticPrefs::media_ffmpeg_enabled()) { - m = FFmpegRuntimeLinker::CreateDecoderModule(); -- mFFmpegFailedToLoad = !StartupPDM(m); -+ mFFmpegUsed = StartupPDM(m); -+ mFFmpegFailedToLoad = !mFFmpegUsed; - } else { - mFFmpegFailedToLoad = false; - } -@@ -395,7 +398,8 @@ void PDMFactory::CreatePDMs() { - m = new AgnosticDecoderModule(); - StartupPDM(m); - -- if (StaticPrefs::media_gmp_decoder_enabled()) { -+ if (StaticPrefs::media_gmp_decoder_enabled() && !mFFmpegUsed) { -+ gUseKeyframeFromContainer = true; - m = new GMPDecoderModule(); - mGMPPDMFailedToStartup = !StartupPDM(m); - } else { -diff -up firefox-82.0/dom/media/platforms/PDMFactory.h.1670333 firefox-82.0/dom/media/platforms/PDMFactory.h ---- firefox-82.0/dom/media/platforms/PDMFactory.h.1670333 2020-10-14 19:20:18.000000000 +0200 -+++ firefox-82.0/dom/media/platforms/PDMFactory.h 2020-10-19 20:53:14.631214334 +0200 -@@ -70,6 +70,7 @@ class PDMFactory final { - - bool mWMFFailedToLoad = false; - bool mFFmpegFailedToLoad = false; -+ bool mFFmpegUsed = false; - bool mGMPPDMFailedToStartup = false; - - friend class RemoteVideoDecoderParent; diff --git a/mozilla-1673202.patch b/mozilla-1673202.patch deleted file mode 100644 index b8695a1..0000000 --- a/mozilla-1673202.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up firefox-82.0/security/sandbox/linux/SandboxFilter.cpp.1673202 firefox-82.0/security/sandbox/linux/SandboxFilter.cpp ---- firefox-82.0/security/sandbox/linux/SandboxFilter.cpp.1673202 2020-10-27 10:40:54.903158025 +0100 -+++ firefox-82.0/security/sandbox/linux/SandboxFilter.cpp 2020-10-27 10:43:19.024883597 +0100 -@@ -246,7 +246,11 @@ class SandboxPolicyCommon : public Sandb - - if (fd != AT_FDCWD && (flags & AT_EMPTY_PATH) != 0 && - strcmp(path, "") == 0) { -- return ConvertError(fstatsyscall(fd, buf)); -+#ifdef __NR_fstat64 -+ return DoSyscall(__NR_fstat64, fd, buf); -+#else -+ return DoSyscall(__NR_fstat, fd, buf); -+#endif - } - - if (fd != AT_FDCWD && path[0] != '/') { diff --git a/mozilla-1673313.patch b/mozilla-1673313.patch deleted file mode 100644 index 549243b..0000000 --- a/mozilla-1673313.patch +++ /dev/null @@ -1,351 +0,0 @@ -changeset: 556172:143b4ca96ec9 -tag: tip -parent: 556169:61c35792ca70 -user: stransky -date: Mon Oct 26 12:15:49 2020 +0100 -files: widget/gtk/WindowSurfaceWayland.cpp widget/gtk/WindowSurfaceWayland.h -description: -Bug 1673313 [Wayland] Don't fail when Shm allocation fails, r?jhorak - -- Make WaylandAllocateShmMemory() fallible. -- Implement WaylandReAllocateShmMemory() to re-allocate Shm pool. -- Remove WaylandShmPool::Resize() and use WaylandShmPool::Create() only. -- Implement and use WaylandShmPool::Release(). -- Make WindowSurfaceWayland::CreateWaylandBuffer() as fallible. - -Differential Revision: https://phabricator.services.mozilla.com/D94735 - - -diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp ---- a/widget/gtk/WindowSurfaceWayland.cpp -+++ b/widget/gtk/WindowSurfaceWayland.cpp -@@ -209,14 +209,23 @@ RefPtr WindowBackBuffe - } - - static int WaylandAllocateShmMemory(int aSize) { -- static int counter = 0; -- nsPrintfCString shmName("/wayland.mozilla.ipc.%d", counter++); -- int fd = shm_open(shmName.get(), O_CREAT | O_RDWR | O_EXCL, 0600); -- if (fd >= 0) { -- shm_unlink(shmName.get()); -- } else { -- printf_stderr("Unable to SHM memory segment\n"); -- MOZ_CRASH(); -+ int fd = -1; -+ do { -+ static int counter = 0; -+ nsPrintfCString shmName("/wayland.mozilla.ipc.%d", counter++); -+ fd = shm_open(shmName.get(), O_CREAT | O_RDWR | O_EXCL, 0600); -+ if (fd >= 0) { -+ // We don't want to use leaked file -+ if (shm_unlink(shmName.get()) != 0) { -+ NS_WARNING("shm_unlink failed"); -+ return -1; -+ } -+ } -+ } while (fd < 0 && errno == EEXIST); -+ -+ if (fd < 0) { -+ NS_WARNING(nsPrintfCString("shm_open failed: %s", strerror(errno)).get()); -+ return -1; - } - - int ret = 0; -@@ -225,59 +234,103 @@ static int WaylandAllocateShmMemory(int - ret = posix_fallocate(fd, 0, aSize); - } while (ret == EINTR); - if (ret != 0) { -+ NS_WARNING( -+ nsPrintfCString("posix_fallocate() fails to allocate shm memory: %s", -+ strerror(ret)) -+ .get()); - close(fd); -- MOZ_CRASH("posix_fallocate() fails to allocate shm memory"); -+ return -1; - } - #else - do { - ret = ftruncate(fd, aSize); - } while (ret < 0 && errno == EINTR); - if (ret < 0) { -+ NS_WARNING(nsPrintfCString("ftruncate() fails to allocate shm memory: %s", -+ strerror(ret)) -+ .get()); - close(fd); -- MOZ_CRASH("ftruncate() fails to allocate shm memory"); -+ fd = -1; - } - #endif - - return fd; - } - --WaylandShmPool::WaylandShmPool(RefPtr aWaylandDisplay, -- int aSize) -- : mAllocatedSize(aSize) { -- mShmPoolFd = WaylandAllocateShmMemory(mAllocatedSize); -- mImageData = mmap(nullptr, mAllocatedSize, PROT_READ | PROT_WRITE, MAP_SHARED, -- mShmPoolFd, 0); -- MOZ_RELEASE_ASSERT(mImageData != MAP_FAILED, -- "Unable to map drawing surface!"); -+static bool WaylandReAllocateShmMemory(int aFd, int aSize) { -+ if (ftruncate(aFd, aSize) < 0) { -+ return false; -+ } -+#ifdef HAVE_POSIX_FALLOCATE -+ do { -+ errno = posix_fallocate(aFd, 0, aSize); -+ } while (errno == EINTR); -+ if (errno != 0) { -+ return false; -+ } -+#endif -+ return true; -+} - -- mShmPool = -- wl_shm_create_pool(aWaylandDisplay->GetShm(), mShmPoolFd, mAllocatedSize); -+WaylandShmPool::WaylandShmPool() -+ : mShmPool(nullptr), -+ mShmPoolFd(-1), -+ mAllocatedSize(0), -+ mImageData(MAP_FAILED){}; - -- // We set our queue to get mShmPool events at compositor thread. -- wl_proxy_set_queue((struct wl_proxy*)mShmPool, -- aWaylandDisplay->GetEventQueue()); -+void WaylandShmPool::Release() { -+ if (mImageData != MAP_FAILED) { -+ munmap(mImageData, mAllocatedSize); -+ mImageData = MAP_FAILED; -+ } -+ if (mShmPool) { -+ wl_shm_pool_destroy(mShmPool); -+ mShmPool = 0; -+ } -+ if (mShmPoolFd >= 0) { -+ close(mShmPoolFd); -+ mShmPoolFd = -1; -+ } - } - --bool WaylandShmPool::Resize(int aSize) { -+bool WaylandShmPool::Create(RefPtr aWaylandDisplay, -+ int aSize) { - // We do size increase only -- if (aSize <= mAllocatedSize) return true; -- -- if (ftruncate(mShmPoolFd, aSize) < 0) return false; -+ if (aSize <= mAllocatedSize) { -+ return true; -+ } - --#ifdef HAVE_POSIX_FALLOCATE -- do { -- errno = posix_fallocate(mShmPoolFd, 0, aSize); -- } while (errno == EINTR); -- if (errno != 0) return false; --#endif -+ if (mShmPoolFd < 0) { -+ mShmPoolFd = WaylandAllocateShmMemory(aSize); -+ if (mShmPoolFd < 0) { -+ return false; -+ } -+ } else { -+ if (!WaylandReAllocateShmMemory(mShmPoolFd, aSize)) { -+ Release(); -+ return false; -+ } -+ } - -- wl_shm_pool_resize(mShmPool, aSize); -- -- munmap(mImageData, mAllocatedSize); -- -+ if (mImageData != MAP_FAILED) { -+ munmap(mImageData, mAllocatedSize); -+ } - mImageData = - mmap(nullptr, aSize, PROT_READ | PROT_WRITE, MAP_SHARED, mShmPoolFd, 0); -- if (mImageData == MAP_FAILED) return false; -+ if (mImageData == MAP_FAILED) { -+ NS_WARNING("Unable to map drawing surface!"); -+ Release(); -+ return false; -+ } -+ -+ if (mShmPool) { -+ wl_shm_pool_resize(mShmPool, aSize); -+ } else { -+ mShmPool = wl_shm_create_pool(aWaylandDisplay->GetShm(), mShmPoolFd, aSize); -+ // We set our queue to get mShmPool events at compositor thread. -+ wl_proxy_set_queue((struct wl_proxy*)mShmPool, -+ aWaylandDisplay->GetEventQueue()); -+ } - - mAllocatedSize = aSize; - return true; -@@ -289,11 +342,7 @@ void WaylandShmPool::SetImageDataFromPoo - memcpy(mImageData, aSourcePool->GetImageData(), aImageDataSize); - } - --WaylandShmPool::~WaylandShmPool() { -- munmap(mImageData, mAllocatedSize); -- wl_shm_pool_destroy(mShmPool); -- close(mShmPoolFd); --} -+WaylandShmPool::~WaylandShmPool() { Release(); } - - static void buffer_release(void* data, wl_buffer* buffer) { - auto surface = reinterpret_cast(data); -@@ -302,14 +351,14 @@ static void buffer_release(void* data, w - - static const struct wl_buffer_listener buffer_listener = {buffer_release}; - --void WindowBackBufferShm::Create(int aWidth, int aHeight) { -+bool WindowBackBufferShm::Create(int aWidth, int aHeight) { - MOZ_ASSERT(!IsAttached(), "We can't create attached buffers."); -- MOZ_ASSERT(!mWLBuffer, "there is wl_buffer already!"); - -- int newBufferSize = aWidth * aHeight * BUFFER_BPP; -- if (!mShmPool.Resize(newBufferSize)) { -- mWLBuffer = nullptr; -- return; -+ ReleaseShmSurface(); -+ -+ int size = aWidth * aHeight * BUFFER_BPP; -+ if (!mShmPool.Create(GetWaylandDisplay(), size)) { -+ return false; - } - - mWLBuffer = -@@ -325,14 +374,16 @@ void WindowBackBufferShm::Create(int aWi - LOGWAYLAND(("WindowBackBufferShm::Create [%p] wl_buffer %p ID %d\n", - (void*)this, (void*)mWLBuffer, - mWLBuffer ? wl_proxy_get_id((struct wl_proxy*)mWLBuffer) : -1)); -+ return true; - } - - void WindowBackBufferShm::ReleaseShmSurface() { - LOGWAYLAND(("WindowBackBufferShm::Release [%p]\n", (void*)this)); -- -- wl_buffer_destroy(mWLBuffer); -+ if (mWLBuffer) { -+ wl_buffer_destroy(mWLBuffer); -+ mWLBuffer = nullptr; -+ } - mWidth = mHeight = 0; -- mWLBuffer = nullptr; - } - - void WindowBackBufferShm::Clear() { -@@ -340,16 +391,13 @@ void WindowBackBufferShm::Clear() { - } - - WindowBackBufferShm::WindowBackBufferShm( -- WindowSurfaceWayland* aWindowSurfaceWayland, int aWidth, int aHeight) -+ WindowSurfaceWayland* aWindowSurfaceWayland) - : WindowBackBuffer(aWindowSurfaceWayland), -- mShmPool(aWindowSurfaceWayland->GetWaylandDisplay(), -- aWidth * aHeight * BUFFER_BPP), -+ mShmPool(), - mWLBuffer(nullptr), -- mWidth(aWidth), -- mHeight(aHeight), -- mAttached(false) { -- Create(aWidth, aHeight); --} -+ mWidth(0), -+ mHeight(0), -+ mAttached(false) {} - - WindowBackBufferShm::~WindowBackBufferShm() { ReleaseShmSurface(); } - -@@ -357,13 +405,9 @@ bool WindowBackBufferShm::Resize(int aWi - if (aWidth == mWidth && aHeight == mHeight) { - return true; - } -- - LOGWAYLAND(("WindowBackBufferShm::Resize [%p] %d %d\n", (void*)this, aWidth, - aHeight)); -- -- ReleaseShmSurface(); - Create(aWidth, aHeight); -- - return (mWLBuffer != nullptr); - } - -@@ -488,11 +532,13 @@ WindowBackBuffer* WindowSurfaceWayland:: - return nullptr; - } - -- WindowBackBuffer* buffer = new WindowBackBufferShm(this, aWidth, aHeight); -- if (buffer) { -- mShmBackupBuffer[availableBuffer] = buffer; -+ WindowBackBuffer* buffer = new WindowBackBufferShm(this); -+ if (!buffer->Create(aWidth, aHeight)) { -+ delete buffer; -+ return nullptr; - } - -+ mShmBackupBuffer[availableBuffer] = buffer; - return buffer; - } - -diff --git a/widget/gtk/WindowSurfaceWayland.h b/widget/gtk/WindowSurfaceWayland.h ---- a/widget/gtk/WindowSurfaceWayland.h -+++ b/widget/gtk/WindowSurfaceWayland.h -@@ -25,14 +25,14 @@ class WindowSurfaceWayland; - // Allocates and owns shared memory for Wayland drawing surface - class WaylandShmPool { - public: -- WaylandShmPool(RefPtr aDisplay, int aSize); -- ~WaylandShmPool(); -- -- bool Resize(int aSize); -+ bool Create(RefPtr aWaylandDisplay, int aSize); -+ void Release(); - wl_shm_pool* GetShmPool() { return mShmPool; }; - void* GetImageData() { return mImageData; }; - void SetImageDataFromPool(class WaylandShmPool* aSourcePool, - int aImageDataSize); -+ WaylandShmPool(); -+ ~WaylandShmPool(); - - private: - wl_shm_pool* mShmPool; -@@ -53,6 +53,7 @@ class WindowBackBuffer { - virtual bool IsAttached() = 0; - - virtual void Clear() = 0; -+ virtual bool Create(int aWidth, int aHeight) = 0; - virtual bool Resize(int aWidth, int aHeight) = 0; - - virtual int GetWidth() = 0; -@@ -87,8 +88,7 @@ class WindowBackBuffer { - - class WindowBackBufferShm : public WindowBackBuffer { - public: -- WindowBackBufferShm(WindowSurfaceWayland* aWindowSurfaceWayland, int aWidth, -- int aHeight); -+ WindowBackBufferShm(WindowSurfaceWayland* aWindowSurfaceWayland); - ~WindowBackBufferShm(); - - already_AddRefed Lock(); -@@ -100,6 +100,7 @@ class WindowBackBufferShm : public Windo - void SetAttached() { mAttached = true; }; - - void Clear(); -+ bool Create(int aWidth, int aHeight); - bool Resize(int aWidth, int aHeight); - bool SetImageDataFromBuffer(class WindowBackBuffer* aSourceBuffer); - -@@ -109,7 +110,6 @@ class WindowBackBufferShm : public Windo - wl_buffer* GetWlBuffer() { return mWLBuffer; }; - - private: -- void Create(int aWidth, int aHeight); - void ReleaseShmSurface(); - - // WaylandShmPool provides actual shared memory we draw into - diff --git a/mozilla-440908.patch b/mozilla-440908.patch deleted file mode 100644 index cce5248..0000000 --- a/mozilla-440908.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff -up firefox-56.0/modules/libpref/prefapi.cpp.440908 firefox-56.0/modules/libpref/prefapi.cpp ---- firefox-56.0/modules/libpref/prefapi.cpp.440908 2017-09-14 22:15:52.000000000 +0200 -+++ firefox-56.0/modules/libpref/prefapi.cpp 2017-09-25 10:39:39.266572792 +0200 -@@ -1036,8 +1036,8 @@ void PREF_ReaderCallback(void *clo - PrefValue value, - PrefType type, - bool isDefault, -- bool isStickyDefault) -- -+ bool isStickyDefault, -+ bool isLocked) - { - uint32_t flags = 0; - if (isDefault) { -@@ -1049,4 +1049,6 @@ void PREF_ReaderCallback(void *clo - flags |= kPrefForceSet; - } - pref_HashPref(pref, value, type, flags); -+ if (isLocked) -+ PREF_LockPref(pref, true); - } -diff -up firefox-56.0/modules/libpref/prefapi.h.440908 firefox-56.0/modules/libpref/prefapi.h ---- firefox-56.0/modules/libpref/prefapi.h.440908 2017-07-31 18:20:51.000000000 +0200 -+++ firefox-56.0/modules/libpref/prefapi.h 2017-09-25 10:39:39.267572789 +0200 -@@ -246,8 +246,8 @@ void PREF_ReaderCallback( void *closure, - PrefValue value, - PrefType type, - bool isDefault, -- bool isStickyDefault); -- -+ bool isStickyDefault, -+ bool isLocked); - - /* - * Callback whenever we change a preference -diff -up firefox-56.0/modules/libpref/prefread.cpp.440908 firefox-56.0/modules/libpref/prefread.cpp ---- firefox-56.0/modules/libpref/prefread.cpp.440908 2017-09-14 22:15:52.000000000 +0200 -+++ firefox-56.0/modules/libpref/prefread.cpp 2017-09-25 10:39:39.267572789 +0200 -@@ -43,6 +43,7 @@ enum { - #define BITS_PER_HEX_DIGIT 4 - - static const char kUserPref[] = "user_pref"; -+static const char kLockPref[] = "lockPref"; - static const char kPref[] = "pref"; - static const char kPrefSticky[] = "sticky_pref"; - static const char kTrue[] = "true"; -@@ -146,7 +147,7 @@ pref_DoCallback(PrefParseState *ps) - break; - } - (*ps->reader)(ps->closure, ps->lb, value, ps->vtype, ps->fdefault, -- ps->fstickydefault); -+ ps->fstickydefault, ps->flock); - return true; - } - -@@ -215,6 +216,7 @@ PREF_ParseBuf(PrefParseState *ps, const - ps->vtype = PrefType::Invalid; - ps->fdefault = false; - ps->fstickydefault = false; -+ ps->flock = false; - } - switch (c) { - case '/': /* begin comment block or line? */ -@@ -225,11 +227,14 @@ PREF_ParseBuf(PrefParseState *ps, const - break; - case 'u': /* indicating user_pref */ - case 's': /* indicating sticky_pref */ -+ case 'l': /* indicating lockPref */ - case 'p': /* indicating pref */ - if (c == 'u') { - ps->smatch = kUserPref; - } else if (c == 's') { - ps->smatch = kPrefSticky; -+ } else if (c == 'l') { -+ ps->smatch = kLockPref; - } else { - ps->smatch = kPref; - } -@@ -277,8 +282,10 @@ PREF_ParseBuf(PrefParseState *ps, const - /* name parsing */ - case PREF_PARSE_UNTIL_NAME: - if (c == '\"' || c == '\'') { -- ps->fdefault = (ps->smatch == kPref || ps->smatch == kPrefSticky); -+ ps->fdefault = (ps->smatch == kPref || ps->smatch == kPrefSticky -+ || ps->smatch == kLockPref); - ps->fstickydefault = (ps->smatch == kPrefSticky); -+ ps->flock = (ps->smatch == kLockPref); - ps->quotechar = c; - ps->nextstate = PREF_PARSE_UNTIL_COMMA; /* return here when done */ - state = PREF_PARSE_QUOTED_STRING; -diff -up firefox-56.0/modules/libpref/prefread.h.440908 firefox-56.0/modules/libpref/prefread.h ---- firefox-56.0/modules/libpref/prefread.h.440908 2017-09-14 22:15:52.000000000 +0200 -+++ firefox-56.0/modules/libpref/prefread.h 2017-09-25 10:39:39.267572789 +0200 -@@ -34,7 +34,8 @@ typedef void (*PrefReader)(void *c - PrefValue val, - PrefType type, - bool defPref, -- bool stickyPref); -+ bool stickyPref, -+ bool lockPref); - - /** - * Report any errors or warnings we encounter during parsing. -@@ -62,6 +63,7 @@ typedef struct PrefParseState { - PrefType vtype; /* PREF_STRING,INT,BOOL */ - bool fdefault; /* true if (default) pref */ - bool fstickydefault; /* true if (sticky) pref */ -+ bool flock; /* true if pref to be locked */ - } PrefParseState; - - /** diff --git a/mozilla-build-arm.patch b/mozilla-build-arm.patch deleted file mode 100644 index e390a28..0000000 --- a/mozilla-build-arm.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h ---- firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h.arm 2017-03-03 13:53:52.480754536 +0100 -+++ firefox-52.0/gfx/skia/skia/include/core/SkPreConfig.h 2017-03-03 13:56:01.476018102 +0100 -@@ -203,6 +203,10 @@ - #define SK_ARM_HAS_CRC32 - #endif - -+#if defined(__aarch64__) -+ #undef SK_ARM_HAS_NEON -+#endif -+ - ////////////////////////////////////////////////////////////////////// - - #if !defined(SKIA_IMPLEMENTATION) diff --git a/node-stdout-nonblocking-wrapper b/node-stdout-nonblocking-wrapper index b2814b8..e36d134 100755 --- a/node-stdout-nonblocking-wrapper +++ b/node-stdout-nonblocking-wrapper @@ -1,2 +1,3 @@ #!/bin/sh -exec /usr/bin/node "$@" 2>&1 | cat - +#exec /usr/bin/node "$@" 2>&1 | cat - +exec $MOZ_NODEJS "$@" 2>&1 | cat - diff --git a/pgo.patch b/pgo.patch deleted file mode 100644 index c4a6bf4..0000000 --- a/pgo.patch +++ /dev/null @@ -1,153 +0,0 @@ -diff -up firefox-81.0.1/build/moz.configure/lto-pgo.configure.pgo firefox-81.0.1/build/moz.configure/lto-pgo.configure ---- firefox-81.0.1/build/moz.configure/lto-pgo.configure.pgo 2020-09-30 19:41:10.000000000 +0200 -+++ firefox-81.0.1/build/moz.configure/lto-pgo.configure 2020-10-07 09:16:44.071786956 +0200 -@@ -69,12 +69,14 @@ set_config('PGO_PROFILE_PATH', pgo_profi - @imports(_from='__builtin__', _import='min') - def pgo_flags(compiler, profdata, target_is_windows): - if compiler.type == 'gcc': -+ #profile_use = '-fprofile-use=$(topobjdir)' -+ profile_use = '-fprofile-use' - return namespace( - gen_cflags=['-fprofile-generate'], - gen_ldflags=['-fprofile-generate'], -- use_cflags=['-fprofile-use', '-fprofile-correction', -+ use_cflags=[profile_use, '-fprofile-correction', - '-Wcoverage-mismatch'], -- use_ldflags=['-fprofile-use'], -+ use_ldflags=[profile_use], - ) - - if compiler.type in ('clang-cl', 'clang'): -@@ -192,13 +194,13 @@ def lto(value, c_compiler, ld64_known_go - cflags.append("-flto") - ldflags.append("-flto") - else: -- cflags.append("-flto=thin") -- ldflags.append("-flto=thin") -+ cflags.append("-flto") -+ ldflags.append("-flto") - elif c_compiler.type == 'clang-cl': - if len(value) and value[0].lower() == 'full': - cflags.append("-flto") - else: -- cflags.append("-flto=thin") -+ cflags.append("-flto") - # With clang-cl, -flto can only be used with -c or -fuse-ld=lld. - # AC_TRY_LINKs during configure don't have -c, so pass -fuse-ld=lld. - cflags.append("-fuse-ld=lld"); -@@ -232,7 +234,7 @@ def lto(value, c_compiler, ld64_known_go - if len(value) and value[0].lower() == 'full': - cflags.append("-flto") - else: -- cflags.append("-flto=thin") -+ cflags.append("-flto") - cflags.append("-flifetime-dse=1") - - ldflags.append("-flto=%s" % num_cores) -diff -up firefox-81.0.1/build/pgo/profileserver.py.pgo firefox-81.0.1/build/pgo/profileserver.py ---- firefox-81.0.1/build/pgo/profileserver.py.pgo 2020-09-30 19:41:10.000000000 +0200 -+++ firefox-81.0.1/build/pgo/profileserver.py 2020-10-07 09:16:44.071786956 +0200 -@@ -11,7 +11,7 @@ import glob - import subprocess - - import mozcrash --from mozbuild.base import MozbuildObject, BinaryNotFoundException -+from mozbuild.base import MozbuildObject, BinaryNotFoundException, BuildEnvironmentNotFoundException - from mozfile import TemporaryDirectory - from mozhttpd import MozHttpd - from mozprofile import FirefoxProfile, Preferences -@@ -84,9 +84,22 @@ if __name__ == '__main__': - port=PORT, - options='primary,privileged') - -- old_profraw_files = glob.glob('*.profraw') -- for f in old_profraw_files: -- os.remove(f) -+ using_gcc = False -+ try: -+ if build.config_environment.substs.get('CC_TYPE') == 'gcc': -+ using_gcc = True -+ except BuildEnvironmentNotFoundException: -+ pass -+ -+ if using_gcc: -+ for dirpath, _, filenames in os.walk('.'): -+ for f in filenames: -+ if f.endswith('.gcda'): -+ os.remove(os.path.join(dirpath, f)) -+ else: -+ old_profraw_files = glob.glob('*.profraw') -+ for f in old_profraw_files: -+ os.remove(f) - - with TemporaryDirectory() as profilePath: - # TODO: refactor this into mozprofile -@@ -191,6 +204,11 @@ if __name__ == '__main__': - print("Firefox exited successfully, but produced a crashreport") - sys.exit(1) - -+ -+ print('Copying profile data....') -+ os.system('pwd'); -+ os.system('tar cf profdata.tar.gz `find . -name "*.gcda"`; cd ..; tar xf instrumented/profdata.tar.gz;'); -+ - llvm_profdata = env.get('LLVM_PROFDATA') - if llvm_profdata: - profraw_files = glob.glob('*.profraw') -diff -up firefox-81.0.1/build/unix/mozconfig.unix.pgo firefox-81.0.1/build/unix/mozconfig.unix ---- firefox-81.0.1/build/unix/mozconfig.unix.pgo 2020-09-30 19:41:10.000000000 +0200 -+++ firefox-81.0.1/build/unix/mozconfig.unix 2020-10-07 09:16:44.071786956 +0200 -@@ -6,6 +6,15 @@ if [ -n "$FORCE_GCC" ]; then - CC="$MOZ_FETCHES_DIR/gcc/bin/gcc" - CXX="$MOZ_FETCHES_DIR/gcc/bin/g++" - -+ if [ -n "$MOZ_PGO" ]; then -+ if [ -z "$USE_ARTIFACT" ]; then -+ ac_add_options --enable-lto -+ fi -+ export AR="$topsrcdir/gcc/bin/gcc-ar" -+ export NM="$topsrcdir/gcc/bin/gcc-nm" -+ export RANLIB="$topsrcdir/gcc/bin/gcc-ranlib" -+ fi -+ - # We want to make sure we use binutils and other binaries in the tooltool - # package. - mk_add_options "export PATH=$MOZ_FETCHES_DIR/gcc/bin:$PATH" -diff -up firefox-81.0.1/extensions/spellcheck/src/moz.build.pgo firefox-81.0.1/extensions/spellcheck/src/moz.build ---- firefox-81.0.1/extensions/spellcheck/src/moz.build.pgo 2020-09-30 19:41:17.000000000 +0200 -+++ firefox-81.0.1/extensions/spellcheck/src/moz.build 2020-10-07 09:16:44.071786956 +0200 -@@ -31,3 +31,5 @@ EXPORTS.mozilla += [ - - if CONFIG['CC_TYPE'] in ('clang', 'gcc'): - CXXFLAGS += ['-Wno-error=shadow'] -+ -+CXXFLAGS += ['-fno-devirtualize'] -\ No newline at end of file -diff -up firefox-81.0.1/python/mozbuild/mozbuild/build_commands.py.pgo firefox-81.0.1/python/mozbuild/mozbuild/build_commands.py ---- firefox-81.0.1/python/mozbuild/mozbuild/build_commands.py.pgo 2020-09-30 19:41:46.000000000 +0200 -+++ firefox-81.0.1/python/mozbuild/mozbuild/build_commands.py 2020-10-07 09:16:44.071786956 +0200 -@@ -108,7 +108,8 @@ class Build(MachCommandBase): - return status - - pgo_env = os.environ.copy() -- pgo_env['LLVM_PROFDATA'] = instr.config_environment.substs.get('LLVM_PROFDATA') -+ if instr.config_environment.substs.get('CC_TYPE') != 'gcc': -+ pgo_env['LLVM_PROFDATA'] = instr.config_environment.substs.get('LLVM_PROFDATA') - pgo_env['JARLOG_FILE'] = mozpath.join(orig_topobjdir, 'jarlog/en-US.log') - pgo_cmd = [ - instr.virtualenv_manager.python_path, -diff -up firefox-81.0.1/toolkit/components/terminator/nsTerminator.cpp.pgo firefox-81.0.1/toolkit/components/terminator/nsTerminator.cpp ---- firefox-81.0.1/toolkit/components/terminator/nsTerminator.cpp.pgo 2020-10-07 09:22:26.698243673 +0200 -+++ firefox-81.0.1/toolkit/components/terminator/nsTerminator.cpp 2020-10-07 09:22:43.026312999 +0200 -@@ -418,6 +418,11 @@ void nsTerminator::StartWatchdog() { - } - #endif - -+ // Disable watchdog for PGO train builds - writting profile information at -+ // exit may take time and it is better to make build hang rather than -+ // silently produce poorly performing binary. -+ crashAfterMS = INT32_MAX; -+ - UniquePtr options(new Options()); - const PRIntervalTime ticksDuration = PR_MillisecondsToInterval(1000); - options->crashAfterTicks = crashAfterMS / ticksDuration; diff --git a/rhbz-1219542-s390-build.patch b/rhbz-1219542-s390-build.patch deleted file mode 100644 index f94e43a..0000000 --- a/rhbz-1219542-s390-build.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff -up firefox-55.0/js/src/old-configure.in.rhbz-1219542-s390 firefox-55.0/js/src/old-configure.in ---- firefox-55.0/js/src/old-configure.in.rhbz-1219542-s390 2017-07-31 18:20:48.000000000 +0200 -+++ firefox-55.0/js/src/old-configure.in 2017-08-02 14:31:32.190243669 +0200 -@@ -541,7 +541,7 @@ case "$host" in - - *-linux*|*-kfreebsd*-gnu|*-gnu*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" -- HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -+ HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O1}" - ;; - - *) -@@ -617,8 +617,8 @@ case "$target" in - - *-*linux*) - if test "$GNU_CC" -o "$GNU_CXX"; then -- MOZ_PGO_OPTIMIZE_FLAGS="-O3" -- MOZ_OPTIMIZE_FLAGS="-O3" -+ MOZ_PGO_OPTIMIZE_FLAGS="-O1" -+ MOZ_OPTIMIZE_FLAGS="-O1" - if test -z "$CLANG_CC"; then - MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" - fi diff --git a/rhbz-1354671.patch b/rhbz-1354671.patch deleted file mode 100644 index b6e8bbd..0000000 --- a/rhbz-1354671.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up firefox-70.0/layout/base/PresShell.h.1354671 firefox-70.0/layout/base/PresShell.h ---- firefox-70.0/layout/base/PresShell.h.1354671 2019-10-22 12:33:12.987775587 +0200 -+++ firefox-70.0/layout/base/PresShell.h 2019-10-22 12:36:39.999366086 +0200 -@@ -257,7 +257,7 @@ class PresShell final : public nsStubDoc - * to the same aSize value. AllocateFrame is infallible and will abort - * on out-of-memory. - */ -- void* AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) { -+ void* __attribute__((optimize("no-lifetime-dse"))) AllocateFrame(nsQueryFrame::FrameIID aID, size_t aSize) { - #define FRAME_ID(classname, ...) \ - static_assert(size_t(nsQueryFrame::FrameIID::classname##_id) == \ - size_t(eArenaObjectID_##classname), \ diff --git a/rhbz-1400293-fix-mozilla-1324096.patch b/rhbz-1400293-fix-mozilla-1324096.patch deleted file mode 100644 index 4a2691e..0000000 --- a/rhbz-1400293-fix-mozilla-1324096.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff --git a/security/certverifier/CertVerifier.cpp b/security/certverifier/CertVerifier.cpp ---- a/security/certverifier/CertVerifier.cpp -+++ b/security/certverifier/CertVerifier.cpp -@@ -120,16 +120,20 @@ IsCertChainRootBuiltInRoot(const UniqueC - } - CERTCertificate* root = rootNode->cert; - if (!root) { - return Result::FATAL_ERROR_LIBRARY_FAILURE; - } - return IsCertBuiltInRoot(root, result); - } - -+// The term "builtin root" traditionally refers to a root CA certificate that -+// has been added to the NSS trust store, because it has been approved -+// for inclusion according to the Mozilla CA policy, and might be accepted -+// by Mozilla applications as an issuer for certificates seen on the public web. - Result - IsCertBuiltInRoot(CERTCertificate* cert, bool& result) - { - result = false; - #ifdef DEBUG - nsCOMPtr component(do_GetService(PSM_COMPONENT_CONTRACTID)); - if (!component) { - return Result::FATAL_ERROR_LIBRARY_FAILURE; -@@ -142,25 +146,38 @@ IsCertBuiltInRoot(CERTCertificate* cert, - return Success; - } - #endif // DEBUG - AutoSECMODListReadLock lock; - for (SECMODModuleList* list = SECMOD_GetDefaultModuleList(); list; - list = list->next) { - for (int i = 0; i < list->module->slotCount; i++) { - PK11SlotInfo* slot = list->module->slots[i]; -- // PK11_HasRootCerts should return true if and only if the given slot has -- // an object with a CKA_CLASS of CKO_NETSCAPE_BUILTIN_ROOT_LIST, which -- // should be true only of the builtin root list. -- // If we can find a copy of the given certificate on the slot with the -- // builtin root list, that certificate must be a builtin. -- if (PK11_IsPresent(slot) && PK11_HasRootCerts(slot) && -- PK11_FindCertInSlot(slot, cert, nullptr) != CK_INVALID_HANDLE) { -- result = true; -- return Success; -+ // We're searching for the "builtin root module", which is a module that -+ // contains an object with a CKA_CLASS of CKO_NETSCAPE_BUILTIN_ROOT_LIST. -+ // We use PK11_HasRootCerts() to identify a module with that property. -+ // In the past, we exclusively used the PKCS#11 module named nssckbi, -+ // which is provided by the NSS library. -+ // Nowadays, some distributions use a replacement module, which contains -+ // the builtin roots, but which also contains additional CA certificates, -+ // such as CAs trusted in a local deployment. -+ // We want to be able to distinguish between these two categories, -+ // because a CA, which may issue certificates for the public web, -+ // is expected to comply with additional requirements. -+ // If the certificate has attribute CKA_NSS_MOZILLA_CA_POLICY set to true, -+ // then we treat it as a "builtin root". -+ if (PK11_IsPresent(slot) && PK11_HasRootCerts(slot)) { -+ CK_OBJECT_HANDLE handle = PK11_FindCertInSlot(slot, cert, nullptr); -+ if (handle != CK_INVALID_HANDLE && -+ PK11_HasAttributeSet(slot, handle, CKA_NSS_MOZILLA_CA_POLICY, -+ false)) { -+ // Attribute was found, and is set to true -+ result = true; -+ break; -+ } - } - } - } - return Success; - } - - static Result - BuildCertChainForOneKeyUsage(NSSCertDBTrustDomain& trustDomain, Input certDER, diff --git a/rust-thirdparty-checksum-fix.patch b/rust-thirdparty-checksum-fix.patch deleted file mode 100644 index 8047ea8..0000000 --- a/rust-thirdparty-checksum-fix.patch +++ /dev/null @@ -1,6 +0,0 @@ -diff -up firefox-72.0/third_party/rust/backtrace-sys/.cargo-checksum.json.checksum-fix firefox-72.0/third_party/rust/backtrace-sys/.cargo-checksum.json ---- firefox-72.0/third_party/rust/backtrace-sys/.cargo-checksum.json.checksum-fix 2020-01-07 10:55:14.265047927 +0100 -+++ firefox-72.0/third_party/rust/backtrace-sys/.cargo-checksum.json 2020-01-07 10:55:18.109059804 +0100 -@@ -1 +1 @@ --{"files":{"Cargo.toml":"d7b29a5b7e31bc0ffb83473b2f78041527903740402c1a6394329857045174f7","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","build.rs":"0fe1e551ab35e7589f96979cf1d366561b62925e9c7da6249c25f25684ce9ede","src/lib.rs":"cb45ba047240bceac6ea74da50c2f48ae81a965b578c833a766a3ea0db1075f3","src/libbacktrace/LICENSE":"ef8a9b3247488f8901ca60de9b17b745d7bd67e5ec1e622f80d62364572200d8","src/libbacktrace/Makefile.am":"5353e0ce3a4732b42ccf031c474f7234336992cb23ba76cbfda3aa5262e69988","src/libbacktrace/Makefile.in":"1802d55fa8ef616a407c69311b3fa4e579093d124a215c834149ab1c50b4f3ad","src/libbacktrace/Mark.Twain-Tom.Sawyer.txt":"461eb7cb2d57d293fc680c836464c9125e4382be3596f7d415093ae9db8fcb0e","src/libbacktrace/README.md":"3b27ca2f7ddaf464ad81366a278ed4d34ad513de3766b330a51464828fa3131f","src/libbacktrace/acinclude.m4":"7f1d64805039b0e41d4c4106265618a6f8921d3cf091d64ab31fa7b900dc892f","src/libbacktrace/aclocal.m4":"4899cfe70722ba1de2b42b4e9965c1db1b173b5d6d4522cdc785becd5a5c212c","src/libbacktrace/alloc.c":"33891bbaf755c050058f8fd7dd3708e6062ef65245a0717216af45b78bab0fd0","src/libbacktrace/atomic.c":"82fd23c7ee7154d1ce4fc823637ede9cfa0e469f4073f38fff4dd9081070f1aa","src/libbacktrace/backtrace-supported.h.in":"42277f3c383386b6cfa3d3d889336e92303fac0ae1a9fb8a6a56737245dfb8f3","src/libbacktrace/backtrace.c":"837ea7b781a737d1ed37e4d03c463bcbe1432b2dc3b79b37344b21013cdfcca4","src/libbacktrace/backtrace.h":"9f035b3830c1c6000259c8ecf0bf53144f7c2e6064dfc95975b89f7f612ebf0e","src/libbacktrace/btest.c":"41c774496d58177e408b1dc33d6a792d0940634885978eed73fb192f732cafc5","src/libbacktrace/config.guess":"9be3de218833c076786b919dc34aab691611f4cd73316e7705f2673e2c41921b","src/libbacktrace/config.h.in":"b5002d9f96f6a26f54317f9d23a5ffff71fa3ee520fd8993810891d43b9a9bf7","src/libbacktrace/config.sub":"c8e70ab53f04d2f2b0280aa0e8a5432e90a902bfa2af7b0854168eb1fb3a84c0","src/libbacktrace/config/libtool.m4":"644ce34d5e9fcc544f3ef5c707f4cb29add798bbfc24e29932b55fb251e50353","src/libbacktrace/config/ltoptions.m4":"9d294950c4d97e2c891d472933113f397d410ef2a8ed875d714f81761626bbd8","src/libbacktrace/config/ltsugar.m4":"2c6618a04aa6389a2a528cde2e69ed5de55acc6c50892b486ea3e56e4e5b2c3b","src/libbacktrace/config/ltversion.m4":"8d129a46367fadad9f202dac50e708696d4d628313d01745127388e9c736e996","src/libbacktrace/config/lt~obsolete.m4":"c6c668594337aafef7d59f585bce7010436153815fe341461d81301a2235b959","src/libbacktrace/configure":"59763fc255248b54fba5d0761d61093a73d51fa4cb400b0df1b5f339b9c2f48a","src/libbacktrace/configure.ac":"b9292548330eb4d2cb014e9d9e6cd4df656aed982917365896a8f2534e9732e5","src/libbacktrace/dwarf.c":"c2103af5f94dd135e5df2a98dfc28ef2cbe0f3d56783d21e1487b9f314bfcbbc","src/libbacktrace/edtest.c":"947b9878ae45f6ba95d3b949bb080e9feed4ffdb27536cf5602b81ce79556ccf","src/libbacktrace/edtest2.c":"964bb0bb510a19013fb1cb56552929ed15cf55787eba4369d5820b74be07d249","src/libbacktrace/elf.c":"fe3e10d33c0c0965f016381302128ce82d664071095ad5077932377e3a789679","src/libbacktrace/fileline.c":"7b3b92044648f45becc498d4ed41ddc8ec08f0d11f6491cc05cfccd8a4d7627a","src/libbacktrace/filenames.h":"2c23cde7dd12dd9e0343cb37b5066036112deca703b61178f07c01f3e01398c9","src/libbacktrace/filetype.awk":"aa38776487a77dc13c93efa2a861204b384c3c4333501ed9bdb4ccbde2a784c0","src/libbacktrace/install-sh":"e7064b5e01a8d173409749c337966698fa04661cde1e3ef1a93be250eec0d2c3","src/libbacktrace/internal.h":"88c63ad6acc7e68330df3028675be4d4e3374bd787255fe22dd3febbbbc438b6","src/libbacktrace/ltmain.sh":"873bdcbc8690bd90c0f3632aac40027e880fd95ea45fb5a02ed901fea4afa4fe","src/libbacktrace/macho.c":"9a8864901eede4c34305b05bb6e815b25b76f04b59caf74381ca9dfbe8f1a8c4","src/libbacktrace/missing":"300bea3fb273b763eca2e4bb1576c663605d9b49de385fd375f82be8d912f506","src/libbacktrace/mmap.c":"5be917f3e9eba1fe49eb1bb391e28609e8377b4ce4593cace6012bf17434a33c","src/libbacktrace/mmapio.c":"be5719c4f92e70045fe6014a0493a5b4adc165ecde42c20130ea6e9da1ce978f","src/libbacktrace/move-if-change":"689762b92d23003926ba729acf98b9a109abf46de0698c09ddfa0d20490d8af5","src/libbacktrace/nounwind.c":"5eee9cc7298b7d0d2aea68eef62175541f34f88acf17736e0612056c5bb7318d","src/libbacktrace/pecoff.c":"bb536ae71a1a1c4dad5508d26032e7e81860df6d8ddfc8d696378ebefbc513b1","src/libbacktrace/posix.c":"f5e0ff701a1a1e29a25462ea49f174b049dafc6c25e040ee0eb77dd189353277","src/libbacktrace/print.c":"2d446406c8e2d9a1258d46d119be1c563bd86b6a4039cbf773b6de09c541390d","src/libbacktrace/read.c":"d0d4007f681f265a6c31e27ded45f4007502c90464eefdb4e80b69e4ae2ede28","src/libbacktrace/simple.c":"b0f767d3740195015aeadaa67e84bf6eb255a730f258485ca86bdbe02b066eca","src/libbacktrace/sort.c":"a82f911fc826a353ea5616379748dfa318ad4e57e20791af7ead853f7e73583d","src/libbacktrace/state.c":"a45abbe4077a47d17fb9687057c40828e633df12d21b8ed40b71a78d86918100","src/libbacktrace/stest.c":"7443fe435f1ee5ce49a3e634faf81a4137d66a057577fe88a211cfa819ddb2e2","src/libbacktrace/testlib.c":"a7e096e895b36db7f997a6673ce48f92a032046876511e813a8a52de6079b29a","src/libbacktrace/testlib.h":"02e02404dc89dd4f3dd82635f794a927541dd78d490d777bedf8a5424e5033fc","src/libbacktrace/ttest.c":"380f3b2be164bd6770768181fa05f1778cee8f0322434896d19724ae7cd105df","src/libbacktrace/unknown.c":"d2d148ea045dcad96ba1c5528b7036b000eeb8439ae397bca01deb0d8b287972","src/libbacktrace/xcoff.c":"e70ed97743306f71ea6132a058d68f1bb7be1380a2d38725b5dc877f5e07905d","src/libbacktrace/ztest.c":"7ad8277664e596aecb6af25818b7671e199ef6002ec2c38d9288179c5cad2082","symbol-map":"c81ced08aa32f0edb1d0ed6e4aaf5d3d516f8c158417d2ba3fa36b45b6ae08fd"},"package":"c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0"} -+{"files":{"Cargo.toml":"d7b29a5b7e31bc0ffb83473b2f78041527903740402c1a6394329857045174f7","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","build.rs":"0fe1e551ab35e7589f96979cf1d366561b62925e9c7da6249c25f25684ce9ede","src/lib.rs":"cb45ba047240bceac6ea74da50c2f48ae81a965b578c833a766a3ea0db1075f3","src/libbacktrace/LICENSE":"ef8a9b3247488f8901ca60de9b17b745d7bd67e5ec1e622f80d62364572200d8","src/libbacktrace/Makefile.am":"5353e0ce3a4732b42ccf031c474f7234336992cb23ba76cbfda3aa5262e69988","src/libbacktrace/Makefile.in":"1802d55fa8ef616a407c69311b3fa4e579093d124a215c834149ab1c50b4f3ad","src/libbacktrace/Mark.Twain-Tom.Sawyer.txt":"461eb7cb2d57d293fc680c836464c9125e4382be3596f7d415093ae9db8fcb0e","src/libbacktrace/README.md":"3b27ca2f7ddaf464ad81366a278ed4d34ad513de3766b330a51464828fa3131f","src/libbacktrace/acinclude.m4":"7f1d64805039b0e41d4c4106265618a6f8921d3cf091d64ab31fa7b900dc892f","src/libbacktrace/aclocal.m4":"4899cfe70722ba1de2b42b4e9965c1db1b173b5d6d4522cdc785becd5a5c212c","src/libbacktrace/alloc.c":"33891bbaf755c050058f8fd7dd3708e6062ef65245a0717216af45b78bab0fd0","src/libbacktrace/atomic.c":"82fd23c7ee7154d1ce4fc823637ede9cfa0e469f4073f38fff4dd9081070f1aa","src/libbacktrace/backtrace-supported.h.in":"42277f3c383386b6cfa3d3d889336e92303fac0ae1a9fb8a6a56737245dfb8f3","src/libbacktrace/backtrace.c":"837ea7b781a737d1ed37e4d03c463bcbe1432b2dc3b79b37344b21013cdfcca4","src/libbacktrace/backtrace.h":"9f035b3830c1c6000259c8ecf0bf53144f7c2e6064dfc95975b89f7f612ebf0e","src/libbacktrace/btest.c":"41c774496d58177e408b1dc33d6a792d0940634885978eed73fb192f732cafc5","src/libbacktrace/config.guess":"0913c6ce799fbfca156ae5fb55fc2e5950808b4d1435e71c6a8b768e54424052","src/libbacktrace/config.h.in":"b5002d9f96f6a26f54317f9d23a5ffff71fa3ee520fd8993810891d43b9a9bf7","src/libbacktrace/config.sub":"c8e70ab53f04d2f2b0280aa0e8a5432e90a902bfa2af7b0854168eb1fb3a84c0","src/libbacktrace/config/libtool.m4":"644ce34d5e9fcc544f3ef5c707f4cb29add798bbfc24e29932b55fb251e50353","src/libbacktrace/config/ltoptions.m4":"9d294950c4d97e2c891d472933113f397d410ef2a8ed875d714f81761626bbd8","src/libbacktrace/config/ltsugar.m4":"2c6618a04aa6389a2a528cde2e69ed5de55acc6c50892b486ea3e56e4e5b2c3b","src/libbacktrace/config/ltversion.m4":"8d129a46367fadad9f202dac50e708696d4d628313d01745127388e9c736e996","src/libbacktrace/config/lt~obsolete.m4":"c6c668594337aafef7d59f585bce7010436153815fe341461d81301a2235b959","src/libbacktrace/configure":"59763fc255248b54fba5d0761d61093a73d51fa4cb400b0df1b5f339b9c2f48a","src/libbacktrace/configure.ac":"b9292548330eb4d2cb014e9d9e6cd4df656aed982917365896a8f2534e9732e5","src/libbacktrace/dwarf.c":"c2103af5f94dd135e5df2a98dfc28ef2cbe0f3d56783d21e1487b9f314bfcbbc","src/libbacktrace/edtest.c":"947b9878ae45f6ba95d3b949bb080e9feed4ffdb27536cf5602b81ce79556ccf","src/libbacktrace/edtest2.c":"964bb0bb510a19013fb1cb56552929ed15cf55787eba4369d5820b74be07d249","src/libbacktrace/elf.c":"fe3e10d33c0c0965f016381302128ce82d664071095ad5077932377e3a789679","src/libbacktrace/fileline.c":"7b3b92044648f45becc498d4ed41ddc8ec08f0d11f6491cc05cfccd8a4d7627a","src/libbacktrace/filenames.h":"2c23cde7dd12dd9e0343cb37b5066036112deca703b61178f07c01f3e01398c9","src/libbacktrace/filetype.awk":"aa38776487a77dc13c93efa2a861204b384c3c4333501ed9bdb4ccbde2a784c0","src/libbacktrace/install-sh":"e7064b5e01a8d173409749c337966698fa04661cde1e3ef1a93be250eec0d2c3","src/libbacktrace/internal.h":"88c63ad6acc7e68330df3028675be4d4e3374bd787255fe22dd3febbbbc438b6","src/libbacktrace/ltmain.sh":"873bdcbc8690bd90c0f3632aac40027e880fd95ea45fb5a02ed901fea4afa4fe","src/libbacktrace/macho.c":"9a8864901eede4c34305b05bb6e815b25b76f04b59caf74381ca9dfbe8f1a8c4","src/libbacktrace/missing":"300bea3fb273b763eca2e4bb1576c663605d9b49de385fd375f82be8d912f506","src/libbacktrace/mmap.c":"5be917f3e9eba1fe49eb1bb391e28609e8377b4ce4593cace6012bf17434a33c","src/libbacktrace/mmapio.c":"be5719c4f92e70045fe6014a0493a5b4adc165ecde42c20130ea6e9da1ce978f","src/libbacktrace/move-if-change":"689762b92d23003926ba729acf98b9a109abf46de0698c09ddfa0d20490d8af5","src/libbacktrace/nounwind.c":"5eee9cc7298b7d0d2aea68eef62175541f34f88acf17736e0612056c5bb7318d","src/libbacktrace/pecoff.c":"bb536ae71a1a1c4dad5508d26032e7e81860df6d8ddfc8d696378ebefbc513b1","src/libbacktrace/posix.c":"f5e0ff701a1a1e29a25462ea49f174b049dafc6c25e040ee0eb77dd189353277","src/libbacktrace/print.c":"2d446406c8e2d9a1258d46d119be1c563bd86b6a4039cbf773b6de09c541390d","src/libbacktrace/read.c":"d0d4007f681f265a6c31e27ded45f4007502c90464eefdb4e80b69e4ae2ede28","src/libbacktrace/simple.c":"b0f767d3740195015aeadaa67e84bf6eb255a730f258485ca86bdbe02b066eca","src/libbacktrace/sort.c":"a82f911fc826a353ea5616379748dfa318ad4e57e20791af7ead853f7e73583d","src/libbacktrace/state.c":"a45abbe4077a47d17fb9687057c40828e633df12d21b8ed40b71a78d86918100","src/libbacktrace/stest.c":"7443fe435f1ee5ce49a3e634faf81a4137d66a057577fe88a211cfa819ddb2e2","src/libbacktrace/testlib.c":"a7e096e895b36db7f997a6673ce48f92a032046876511e813a8a52de6079b29a","src/libbacktrace/testlib.h":"02e02404dc89dd4f3dd82635f794a927541dd78d490d777bedf8a5424e5033fc","src/libbacktrace/ttest.c":"380f3b2be164bd6770768181fa05f1778cee8f0322434896d19724ae7cd105df","src/libbacktrace/unknown.c":"d2d148ea045dcad96ba1c5528b7036b000eeb8439ae397bca01deb0d8b287972","src/libbacktrace/xcoff.c":"e70ed97743306f71ea6132a058d68f1bb7be1380a2d38725b5dc877f5e07905d","src/libbacktrace/ztest.c":"7ad8277664e596aecb6af25818b7671e199ef6002ec2c38d9288179c5cad2082","symbol-map":"c81ced08aa32f0edb1d0ed6e4aaf5d3d516f8c158417d2ba3fa36b45b6ae08fd"},"package":"c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0"} diff --git a/sources b/sources index 38b1045..78eb6b1 100644 --- a/sources +++ b/sources @@ -1,3 +1,12 @@ -SHA512 (cbindgen-vendor.tar.xz) = f0425020e2d43a3d28b03f82bdb9719728112a2c94b1d595da384d0674ca21d0940a6f729a690434d670e598fbc6bb5193c89da0a4633a734c70dd786222e711 -SHA512 (firefox-82.0.source.tar.xz) = 887bceb0fffe257534b53cd019d35087752042ee7e9db089e01b1a930a30deb0c3dc6b32167552362092bdcec794dd5698046548d3419e17ecd2def366d1bde8 -SHA512 (firefox-langpacks-82.0-20201015.tar.xz) = 8c0cc37ee918bef930feed32aacaed3f7f28f1dd6615d4719d694d6efcd0fb621e03b613f21cd7b34d188b770d8a903568c676d7e3bb4484ab532a45b62a52a8 +SHA512 (firefox-78.6.1esr.source.tar.xz) = ae6d99fab6e8d9343ad8b0e9e522f20b5c63064598356cd4b31fc02b3b20d62b30590dec42d956e77352559a642157924c2b1c3e887b496962ba305260ed84e7 +SHA512 (firefox-langpacks-78.6.1esr-20210106.tar.xz) = bfca1928675cd8209fd16b0cf40dfdf2b50de153cf7f705e22c714e5b071a1345b5cdff9a0273f731b096767c8843e56979abb26454708256d9d8ed8b82d439c +SHA512 (libffi-3.0.13-18.el7_3.src.rpm) = da8ff110c59468f1ef9c861d93afcfa2fcc37409390664859d57113c7e81e54ca0a1a8925c18bb92097bb9710c737361ca36a81bf50fc137b31c2611e4c8a4e4 +SHA512 (Python-2.7.13.tar.xz) = f37c9a28ce129d01e63c84d7db627a06402854578f62d17927334ea21ede318e04bbf66e890e3f47c85333e6b19f6e5581fb3f3e27efd24be27017d1b6529c4b +SHA512 (yasm-1.2.0-3.el5.src.rpm) = bc8ea63ec9e8191fbbf914708b4c89c471ee7cf8ca2e940eedcc8aa0475feade67dd8993cdfbc8949c236b3b36e96fb0748ef8b62e772524340df925533b9bf7 +SHA512 (gtk3-private-3.22.26-1.el6.src.rpm) = ab1307af3305db38d462015647a5effc24bedbcf1174a2799faf41ae9c33052ec46a0c3d229eb2d472ebe3047ce86e293003ec42d8954342112746430980dc09 +SHA512 (Python-3.6.8.tar.xz) = b17867e451ebe662f50df83ed112d3656c089e7d750651ea640052b01b713b58e66aac9e082f71fd16f5b5510bc9b797f5ccd30f5399581e9aa406197f02938a +SHA512 (openssl-1.0.2k-19.6.bundle.el7_7.src.rpm) = fc00965c1aa7cc8f03a7e739633452fc51925de0dda8da5f21f8805c2b4764033a5211f376182dbab4c42f1f23d3195275f32616c384b54a83df4363ae711c75 +SHA512 (nspr-4.25.0-1.el8_0.src.rpm) = 7e39e4484b0d504e1b7f1253d7dc1f9f0d45705fbbc3946272acc4c5998b5279004b227485b003e18b48eaee3a2871c98d5c7f94e5dd89b255284599889c8df6 +SHA512 (cbindgen-vendor-0.14.3.tar.xz) = 33c8d28547674121f690eea0d3ebac33926a39caacac787bf8ed8b346478822e74da5a4a1f57ab4df4105fa8376739a2ece888845a85bc5712aaed20e4a508bc +SHA512 (nss-3.53.1-3.fc32.src.rpm) = 368849487aa8f9d602c9e5d9d7c88ebd03318aece12470283ff31744ef9eed27ef1e32031378a5a673bb06a9ebbcf5542afa13f3ad465409449c218922189acb +SHA512 (nodejs-10.21.0-5.fc32.src.rpm) = 4d0c212a2609dc10e242a96f63baa8babb91e8aa6696f66f627c562c1ba30cb3632ed01991c98f48b5942fc7fd89ee34b350f41de901339b49a2c19e979593a7