diff --git a/.gitignore b/.gitignore index 1bb2712..017eaa7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /ublock_origin-*.xpi +/uAssets-*.tar.gz +/uBlock-*.tar.gz diff --git a/changelog b/changelog new file mode 100644 index 0000000..624990d --- /dev/null +++ b/changelog @@ -0,0 +1,238 @@ +* Fri Oct 11 2024 Dominik Mierzejewski - 1.60.0-1 +- update to 1.60.0 (#2302506) + +* Mon Sep 02 2024 Miroslav Suchý - 1.58.0-3 +- convert license to SPDX + +* Thu Jul 18 2024 Fedora Release Engineering - 1.58.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sun Jun 16 2024 Dominik Mierzejewski - 1.58.0-1 +- update to 1.58.0 (#2274003) +- update Firefox app ID reference (#2279889) + +* Fri Apr 05 2024 Dominik Mierzejewski - 1.57.0-1 +- update to 1.57.0 (#2272273) + +* Wed Mar 06 2024 Dominik Mierzejewski - 1.56.0-1 +- update to 1.56.0 (#2256730) + +* Thu Jan 25 2024 Fedora Release Engineering - 1.54.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 1.54.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Nov 28 2023 Dominik Mierzejewski - 1.54.0-1 +- update to 1.54.0 (#2251068) + +* Tue Nov 21 2023 Dominik Mierzejewski - 1.53.0-1 +- update to 1.53.0 (#2247578) + +* Fri Sep 29 2023 Dominik Mierzejewski - 1.52.2-1 +- update to 1.52.2 (#2238126) + +* Thu Aug 31 2023 Dominik Mierzejewski - 1.51.0-1 +- update to 1.51.0 (#2224682) +- new bundled dependency: js-beautify + +* Thu Jul 20 2023 Fedora Release Engineering - 1.50.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jun 12 2023 Dominik Mierzejewski - 1.50.0-1 +- update to 1.50.0 (#2213457) +- match upstream build process for uAssets to avoid missing timestamps +- fix deprecated patchN macro usage + +* Sat May 06 2023 Dominik Mierzejewski - 1.49.2-1 +- update to 1.49.2 (#2180855) + +* Mon Mar 13 2023 Dominik Mierzejewski - 1.47.4-1 +- update to 1.47.4 (#2172525) + +* Fri Feb 17 2023 Dominik Mierzejewski - 1.47.0-1 +- update to 1.47.0 (#2170209) + +* Thu Jan 19 2023 Fedora Release Engineering - 1.46.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Tue Dec 27 2022 Dominik Mierzejewski - 1.46.0-1 +- update to 1.46.0 (#2156059) + +* Mon Dec 05 2022 Dominik Mierzejewski - 1.45.2-1 +- update to 1.45.2 (#2141681) + +* Tue Oct 04 2022 Dominik Mierzejewski - 1.44.4-1 +- update to 1.44.4 (#2118741) +- drop obsolete patch + +* Thu Jul 21 2022 Fedora Release Engineering - 1.43.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Dominik Mierzejewski - 1.43.0-1 +- update to 1.43.0 (#2095350) + +* Sun May 22 2022 Dominik Mierzejewski - 1.42.4-1 +- update to 1.42.4 (#2070185) +- new bundled library: hsluv +- fix build with wabt 1.0.25+ + +* Fri Mar 11 2022 Dominik Mierzejewski - 1.41.8-1 +- update to 1.41.8 (#2055291) + +* Tue Feb 15 2022 Dominik Mierzejewski - 1.41.2-1 +- update to 1.41.2 (#2052004) + +* Thu Jan 20 2022 Fedora Release Engineering - 1.40.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jan 14 2022 Dominik Mierzejewski - 1.40.8-1 +- update to 1.40.8 (#2034966) + +* Sat Dec 04 2021 Dominik Mierzejewski - 1.39.2-1 +- update to 1.39.2 (#2025622) + +* Fri Oct 15 2021 Dominik Mierzejewski - 1.38.6-1 +- update to 1.38.6 (#2009380) + +* Tue Sep 21 2021 Dominik Mierzejewski - 1.38.0-1 +- update to 1.38.0 (#2005514) +- drop obsolete patch + +* Wed Jul 28 2021 Dominik Mierzejewski - 1.37.2-1 +- update to 1.37.2 (#1986999) + +* Sat Jul 24 2021 Dominik Mierzejewski - 1.37.0-1 +- update to 1.37.0 (#1985343) + +* Thu Jul 22 2021 Fedora Release Engineering - 1.36.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Sat Jul 17 2021 Dominik Mierzejewski - 1.36.2-1 +- update to 1.36.2 (#1979628) + +* Mon Jul 05 2021 Dominik Mierzejewski - 1.36.0-1 +- update to 1.36.0 (#1974010) +- update declared version of bundled publicsuffix-list + +* Tue Jun 08 2021 Dominik Mierzejewski - 1.35.2-1 +- update to 1.35.2 (#1954349) + +* Fri Apr 23 2021 Dominik Mierzejewski - 1.35.0-1 +- update to 1.35.0 (#1946869) + +* Thu Apr 01 2021 Dominik Mierzejewski - 1.34.0-1 +- update to 1.34.0 (#1925264) + +* Tue Feb 02 2021 Dominik Mierzejewski - 1.33.2-1 +- update to 1.33.2 (#1922482) + +* Tue Jan 26 2021 Fedora Release Engineering - 1.32.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jan 20 2021 Dominik Mierzejewski - 1.32.4-1 +- update to 1.32.4 (#1918447) + +* Thu Aug 20 2020 Dominik Mierzejewski - 1.29.0-1 +- update to 1.29.0 (#1867396) +- optimize lz4 wasm code per upstream docs + +* Thu Aug 06 2020 Dominik Mierzejewski - 1.28.4-2 +- fix invalid JSON after Patch0 (caught by Raymond Hill) + +* Wed Aug 05 2020 Dominik Mierzejewski - 1.28.4-1 +- update to 1.28.4 (#1857445) +- avoid building on big-endian, wabt doesn't work there + +* Tue Jul 28 2020 Fedora Release Engineering - 1.28.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 13 2020 Dominik Mierzejewski - 1.28.2-3 +- add missing explicit BR on python3 + +* Mon Jul 13 2020 Dominik Mierzejewski - 1.28.2-2 +- use python3 in build script explicitly + +* Sun Jul 12 2020 Dominik Mierzejewski - 1.28.2-1 +- update to 1.28.2 (#1835275) +- "build" from upstream "source" directly +- drop non-free components from upstream uAssets tarball + +* Sun May 03 2020 Dominik Mierzejewski - 1.26.2-1 +- update to 1.26.2 (#1825039) + +* Sun Apr 12 2020 Dominik Mierzejewski - 1.26.0-1 +- update to 1.26.0 (#1820622) + +* Sat Mar 14 2020 Dominik Mierzejewski - 1.25.2-1 +- update to 1.25.2 (#1797341) + +* Wed Jan 29 2020 Fedora Release Engineering - 1.24.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Dec 01 2019 Dominik Mierzejewski - 1.24.2-1 +- update to 1.24.2 (#1763778) + +* Sat Sep 28 2019 Dominik Mierzejewski - 1.22.4-1 +- update to 1.22.4 (#1756060) + +* Wed Sep 11 2019 Dominik Mierzejewski - 1.22.2-2 +- fix wrong fileid (was pointing to 1.20.0 instead of 1.22.2) + +* Mon Sep 09 2019 Dominik Mierzejewski - 1.22.2-1 +- update to 1.22.2 (#1713383) + +* Thu Jul 25 2019 Fedora Release Engineering - 1.19.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon May 13 2019 Dominik Mierzejewski - 1.19.2-1 +- update to 1.19.2 (#1689200) + +* Thu Mar 14 2019 Dominik Mierzejewski - 1.18.6-1 +- update to 1.18.6 (#1680421) +- drop conditionals that are true in F26+ + +* Wed Feb 20 2019 Dominik Mierzejewski - 1.18.4-1 +- update to 1.18.4 (#1669295) +- update bundled fontawesome version + +* Fri Feb 01 2019 Fedora Release Engineering - 1.17.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Oct 27 2018 Dominik Mierzejewski - 1.17.2-1 +- update to 1.17.2 + +* Mon Jul 30 2018 Dominik Mierzejewski - 1.16.14-1 +- update to 1.16.14 (#1598265) + +* Fri Jul 13 2018 Fedora Release Engineering - 1.16.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Jun 29 2018 Dominik Mierzejewski - 1.16.12-1 +- update to 1.16.12 (#1567576) + +* Wed May 23 2018 Dominik Mierzejewski - 1.16.6-1 +- update to 1.16.6 (#1567576) +- update bundled codemirror version + +* Fri Apr 13 2018 Dominik Mierzejewski - 1.15.24-1 +- update to 1.15.24 +- use correct path for metainfo file +- update bundled components list and license tag +- include license texts in the standard location, too + +* Tue Feb 20 2018 Dominik Mierzejewski - 1.15.10-1 +- update to 1.15.10 + +* Thu Feb 08 2018 Fedora Release Engineering - 1.14.24-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Feb 01 2018 Dominik Mierzejewski - 1.14.24-1 +- update to 1.14.24 + +* Fri Dec 29 2017 Dominik 'Rathann' Mierzejewski - 1.14.22-1 +- update to 1.14.22 +- install the appdata metainfo file into correct place + +* Wed Nov 29 2017 Dominik 'Rathann' Mierzejewski - 1.14.18-1 +- Initial package diff --git a/mozilla-ublock-origin-nonfree.patch b/mozilla-ublock-origin-nonfree.patch new file mode 100644 index 0000000..3ac53ba --- /dev/null +++ b/mozilla-ublock-origin-nonfree.patch @@ -0,0 +1,11 @@ +diff -up uBlock-1.46.0/tools/make-assets.sh.orig uBlock-1.46.0/tools/make-assets.sh +--- uBlock-1.46.0/tools/make-assets.sh.orig 2022-12-22 17:10:56.000000000 +0100 ++++ uBlock-1.46.0/tools/make-assets.sh 2022-12-27 22:26:00.897541783 +0100 +@@ -16,7 +16,6 @@ mkdir $DES/thirdparties + ASSETS_MAIN=dist/build/uAssets/main + ASSETS_PROD=dist/build/uAssets/prod + +-cp -R $ASSETS_MAIN/thirdparties/pgl.yoyo.org $DES/thirdparties/ + cp -R $ASSETS_MAIN/thirdparties/publicsuffix.org $DES/thirdparties/ + cp -R $ASSETS_MAIN/thirdparties/urlhaus-filter $DES/thirdparties/ + diff --git a/mozilla-ublock-origin.metainfo.xml b/mozilla-ublock-origin.metainfo.xml index aa870dc..3e84206 100644 --- a/mozilla-ublock-origin.metainfo.xml +++ b/mozilla-ublock-origin.metainfo.xml @@ -2,7 +2,7 @@ mozilla-ublock-origin - firefox.desktop + org.mozilla.firefox uBlock Origin for Firefox An efficient blocker for Firefox. Fast and lean. https://github.com/gorhill/uBlock diff --git a/mozilla-ublock-origin.spec b/mozilla-ublock-origin.spec index 76e812d..f42be5d 100644 --- a/mozilla-ublock-origin.spec +++ b/mozilla-ublock-origin.spec @@ -5,32 +5,59 @@ %global firefox_app_id \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} %global firefox_inst_dir %{_datadir}/mozilla/extensions/%{firefox_app_id} -%global fileid 2403352 - Name: mozilla-ublock-origin -Version: 1.19.2 -Release: 1%{?dist} +Version: 1.68.0 +Release: %autorelease Summary: An efficient blocker for Firefox -License: GPLv3+ and LGPLv3 and MIT and OFL +# Automatically converted from old format: GPLv3 and MIT and OFL and Unlicense - review is highly recommended. +License: GPL-3.0-only AND LicenseRef-Callaway-MIT AND LicenseRef-Callaway-OFL AND Unlicense URL: https://github.com/gorhill/uBlock -Source0: https://addons.mozilla.org/firefox/downloads/file/%{fileid}/ublock_origin-%{version}-an+fx.xpi +Source0: https://github.com/gorhill/uBlock/archive/%{version}/uBlock-%{version}.tar.gz Source1: mozilla-ublock-origin.metainfo.xml +Source2: uAssets-%{version}.tar.gz +# uAssets tarball contains non-free filter lists +# thirdparties/mirror1.malwaredomains.com - http://www.malwaredomains.com/?page_id=1508 +# thirdparties/pgl.yoyo.org - https://pgl.yoyo.org/license/ +# generate a free one with the mktarball.sh script below +Source10: uAssets-mktarball.sh +Patch0: %{name}-nonfree.patch Requires: mozilla-filesystem BuildArch: noarch +# wabt doesn't work correctly on big-endian +ExcludeArch: ppc64 s390x +BuildRequires: binaryen BuildRequires: libappstream-glib -# css/fonts/fontawesome-webfont.ttf http://fontawesome.io/ OFL -# img/fontawesome/fontawesome-defs.svg +BuildRequires: nodejs +BuildRequires: python3 +BuildRequires: wabt +# lib/csstree https://github.com/csstree/csstree MIT +Provides: bundled(npm-css-tree) = 2.2.1 +# img/fontawesome/fontawesome-defs.svg http://fontawesome.io/ OFL Provides: bundled(fontawesome-fonts) = 4.7.0 +# css/fonts/Inter/Inter-*.woff2 https://github.com/rsms/inter OFL +Provides: bundled(inter-fonts) +# css/fonts/Metropolis/Metropolis-*.woff2 https://github.com/chrismsimpson/Metropolis Unlicense +Provides: bundled(metropolis-fonts) +# lib/js-beautify https://github.com/beautify-web/js-beautify MIT +Provides: bundled(js-beautify) = 1.14.7 # lib/punycode.js https://mths.be/punycode MIT Provides: bundled(js-punycode) = 1.3.2 # lib/diff https://github.com/Swatinem/diff LGPLv3 Provides: bundled(js-github-swatinem-diff) # lib/codemirror http://codemirror.net MIT -Provides: bundled(js-codemirror) = 5.37.0 +Provides: bundled(js-codemirror) = 5.59.2 # lib/lz4 https://github.com/gorhill/lz4-wasm BSD Provides: bundled(lz4-wasm) +# lib/regexanalyzer https://github.com/foo123/RegexAnalyzer Copyleft +Provides: bundled(js-regexanalyzer) = 1.2.0 +# lib/hsluv https://github.com/hsluv/hsluv/ MIT +Provides: bundled(js-hsluv) = 0.1.0 +# usually much newer than Fedora's publicsuffix-list package +# easy to unbundle, but might affect security +# assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat +Provides: bundled(publicsuffix-list) = 20240504 %description An efficient blocker: easy on memory and CPU footprint, and yet can load and @@ -40,65 +67,48 @@ Flexible, it's more than an "ad blocker": it can also read and create filters from hosts files. %prep -%setup -qc +# https://github.com/gorhill/uBlock/tree/master/dist#build-instructions-for-developers +%setup -q -n uBlock-%{version} +mkdir -p dist/build/uAssets +tar -xz -C dist/build/uAssets -f %{SOURCE2} +pushd dist/build/uAssets/main +tools/make-ublock.sh +popd +%patch 0 -p1 +rm src/{js/wasm,lib/{lz4,publicsuffixlist/wasm}}/*.wasm +mv src/css/fonts/Inter/LICENSE.txt LICENSE.Inter.txt +mv src/img/fontawesome/LICENSE.txt LICENSE.fontawesome.txt +mv src/lib/js-beautify/LICENSE LICENSE.js-beautify.txt +mv src/lib/codemirror/LICENSE LICENSE.codemirror.txt %build -echo Nothing to build +for d in src/{js/wasm,lib/{lz4,publicsuffixlist/wasm}} ; do + pushd $d + for f in *.wat ; do + wat2wasm $f + done + popd +done +pushd src/lib/lz4 +wasm-opt ./lz4-block-codec.wasm -O4 -o ./lz4-block-codec.wasm +popd +./tools/make-firefox.sh all %install -install -Dpm644 %{SOURCE0} %{buildroot}%{firefox_inst_dir}/%{ext_id}.xpi +install -Dpm644 dist/build/uBlock0.firefox.xpi %{buildroot}%{firefox_inst_dir}/%{ext_id}.xpi install -Dpm644 %{SOURCE1} %{buildroot}%{_metainfodir}/%{name}.metainfo.xml appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{name}.metainfo.xml %files -%license LICENSE.txt css/fonts/OFL.txt lib/codemirror/LICENSE +%license LICENSE.txt +%license LICENSE.codemirror.txt +%license LICENSE.fontawesome.txt +%license LICENSE.js-beautify.txt +%license LICENSE.Inter.txt +%license src/css/fonts/Metropolis/UNLICENSE %{firefox_inst_dir}/%{ext_id}.xpi %{_metainfodir}/%{name}.metainfo.xml %changelog -* Mon May 13 2019 Dominik Mierzejewski - 1.19.2-1 -- update to 1.19.2 (#1689200) - -* Thu Mar 14 2019 Dominik Mierzejewski - 1.18.6-1 -- update to 1.18.6 (#1680421) -- drop conditionals that are true in F26+ - -* Wed Feb 20 2019 Dominik Mierzejewski - 1.18.4-1 -- update to 1.18.4 (#1669295) -- update bundled fontawesome version - -* Sat Oct 27 2018 Dominik Mierzejewski - 1.17.2-1 -- update to 1.17.2 - -* Mon Jul 30 2018 Dominik Mierzejewski - 1.16.14-1 -- update to 1.16.14 (#1598265) - -* Fri Jun 29 2018 Dominik Mierzejewski - 1.16.12-1 -- update to 1.16.12 (#1567576) - -* Wed May 23 2018 Dominik Mierzejewski - 1.16.6-1 -- update to 1.16.6 (#1567576) -- update bundled codemirror version - -* Fri Apr 13 2018 Dominik Mierzejewski - 1.15.24-1 -- update to 1.15.24 -- use correct path for metainfo file -- update bundled components list and license tag -- include license texts in the standard location, too - -* Tue Feb 20 2018 Dominik Mierzejewski - 1.15.10-1 -- update to 1.15.10 - -* Thu Feb 08 2018 Fedora Release Engineering - 1.14.24-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Feb 01 2018 Dominik Mierzejewski - 1.14.24-1 -- update to 1.14.24 - -* Fri Dec 29 2017 Dominik 'Rathann' Mierzejewski - 1.14.22-1 -- update to 1.14.22 -- install the appdata metainfo file into correct place - -* Wed Nov 29 2017 Dominik 'Rathann' Mierzejewski - 1.14.18-1 -- Initial package +%autochangelog diff --git a/sources b/sources index fee1040..0a46ef1 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (ublock_origin-1.19.2-an+fx.xpi) = f3111eb1b77654cbb1f87f1b24f7d622eb75e8e53dd98dba452400f8b8abddcfddca9ccb8d101e2b75424a03c023b8d62d5fc68c557b872e9530e4aa392113fe +SHA512 (uAssets-1.68.0.tar.gz) = 360fa9d0b32a94711323db40f4ee16533f5b6f625ab893d740b5bed4084aa0dbcd97f03c207f02d44644fa6322be564eef09dd1ce64d555f442dfda00ff3a077 +SHA512 (uBlock-1.68.0.tar.gz) = ec4c3c956abf0e1cbf813a8e19f60a461bc04ea3644e7f0bd5fce25c0dbe6d45ede67871135ed49e2ab507ac2fe294b945d2dd8dcce14c3fddfcfad6a16de96d diff --git a/uAssets-mktarball.sh b/uAssets-mktarball.sh new file mode 100755 index 0000000..cdc7123 --- /dev/null +++ b/uAssets-mktarball.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -e + +tmp=$(mktemp -d) + +trap cleanup EXIT +cleanup() { + set +e + [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp" +} + +unset CDPATH +pwd=$(pwd) +name=uAssets +version=$(rpmspec -q --qf '%{version}' ./mozilla-ublock-origin.spec) +commit_master=5f9f16404dce279a66b533edbccf869196b8d2b1 +commit_gh_pages=d975a96651a13bf8649bd16ee293e66b731aebc7 +url_master=https://github.com/uBlockOrigin/uAssets/archive/${commit_master}/${name}-${commit_master}.tar.gz +url_gh_pages=https://github.com/uBlockOrigin/uAssets/archive/${commit_gh_pages}/${name}-${commit_gh_pages}.tar.gz +pushd "$tmp" +curl -L ${url_master} | tar xzf - +mv ${name}-${commit_master} main +# Peter Lowe's adservers list is non-commercial-only +# https://github.com/uBlockOrigin/uAssets/issues/7657 +rm -r main/thirdparties/pgl.yoyo.org +curl -L ${url_gh_pages} | tar xzf - +mv ${name}-${commit_gh_pages} prod +tar czf "$pwd"/${name}-${version}.tar.gz main prod +popd