adblock2privoxy 3.0.0 → 3.0.1
raw patch · 10 files changed
+67/−76 lines, 10 filesdep ~bytestringdep ~extra
Dependency ranges changed: bytestring, extra
Files
- CHANGELOG.md +32/−25
- adblock2privoxy.cabal +5/−9
- distribution/buildWin.bat +2/−15
- distribution/debbuild/DEBIAN/control +2/−2
- distribution/makeDeb.sh +3/−7
- distribution/makeRpm.sh +1/−0
- distribution/rpmbuild/SPECS/adblock2privoxy.spec +6/−7
- man/man1/adblock2privoxy.1 +1/−1
- src/PatternConverter.hs +13/−3
- stack.yaml +2/−7
CHANGELOG.md view
@@ -1,14 +1,21 @@+3.0.1+ * Update Debian and RPM builds+ * Fix grammar examples+ * Fix incorrect possessive wildcard+ 3.0.0- * Speed and memory improvements in tree processing, file output - * Parsing corrections for Adblock Plus, uBlock origin, AdGuard lists- * Privoxy PCRE syntax checks- * Use Privoxy FEATURE_PCRE_HOST_PATTERNS- * Filter out rules that affect TLDs- * Replace ageing dependencies with modern equivalents- * Add test suite+ * Speed and memory improvements in tree processing, file output + * Parsing corrections for Adblock Plus, uBlock origin, AdGuard lists+ * Privoxy PCRE syntax checks+ * Use Privoxy FEATURE_PCRE_HOST_PATTERNS+ * Filter out rules that affect TLDs+ * Replace ageing dependencies with modern equivalents+ * Add test suite * Multiple bug fixes+ 2.3.1 * Fix Network.hs compilation+ 2.3.0 * hlint mods * Add debug code with new DebugLevel option@@ -22,10 +29,10 @@ 2.1.0 * Use TLS for CSS server to avoid mixed content errors * Add --useHTTP option- * Update to ghc 8.10.7, lts-18.18 resolver+ * Update to ghc 8.10.7, lts-18.18 resolver 2.0.2- * Update to ghc 8.10.4, lts-17.11 resolver+ * Update to ghc 8.10.4, lts-17.11 resolver 2.0.1 * Update to ghc 8.6.5, lts-13.25 resolver@@ -38,13 +45,13 @@ * Migrate to GitHub fork 1.4.2- * Fixed "commitBuffer: invalid argument (invalid character)" problem- * Fixed system.action file generation in case when no webserver is used- * Improved documentation+ * Fixed "commitBuffer: invalid argument (invalid character)" problem+ * Fixed system.action file generation in case when no webserver is used+ * Improved documentation 1.4.0- * Stack build envirionment and GHC 7.10- * Problem with network connections should be fixed because of new HTTPS library+ * Stack build envirionment and GHC 7.10+ * Problem with network connections should be fixed because of new HTTPS library 1.3.0 * Build and packaging process refactoring@@ -55,18 +62,18 @@ * Task files contains output paths, so it's possible to run ab2p with single parameter: task file name * Bugfixes for tickets #7, #8, #9 1.2.4- * Documentation and bugfixes+ * Documentation and bugfixes 1.1.0- * Tasks support to update privoxy config from same sources- * HTTP(s) supported to get adblock files- * Redirect comment support- * Sources expiration check + * Tasks support to update privoxy config from same sources+ * HTTP(s) supported to get adblock files+ * Redirect comment support+ * Sources expiration check 1.0.0- * First public version- * Supports filenames in command-line- * Page elements blocking- * URLs blocking- * Popups blocking- * Adblock options: script, image, stylesheet, object, xmlhttprequest, object-subrequest, subdocument,document, elemhide, other, popup, third-party, domain=..., match-case, donottrack + * First public version+ * Supports filenames in command-line+ * Page elements blocking+ * URLs blocking+ * Popups blocking+ * Adblock options: script, image, stylesheet, object, xmlhttprequest, object-subrequest, subdocument,document, elemhide, other, popup, third-party, domain=..., match-case, donottrack
adblock2privoxy.cabal view
@@ -1,5 +1,5 @@ name: adblock2privoxy-version: 3.0.0+version: 3.0.1 cabal-version: >= 1.10 build-type: Simple tested-with:@@ -65,10 +65,10 @@ FlexibleContexts build-depends: base >= 4.14 && < 4.23,- bytestring,+ bytestring >= 0.11 && < 0.13, containers >= 0.6.7 && < 0.9, directory >= 1.3.8 && < 1.5,- extra,+ extra >= 1.7 && < 1.9, filepath >= 1.4.200 && < 1.6, http-conduit >= 2.3.8 && < 2.5, mtl >= 2.3.1 && < 2.5,@@ -80,8 +80,6 @@ text >= 2.1 && < 2.3, time >= 1.12.2 && < 1.16 ghc-options: -Wall- -O2- -rtsopts other-modules: ElementBlocker, InputParser,@@ -113,7 +111,7 @@ build-depends: base >= 4.14 && < 4.23, containers >= 0.6.7 && < 0.9,- extra,+ extra >= 1.7 && < 1.9, filepath >= 1.4.200 && < 1.6, mtl >= 2.3.1 && < 2.5, network-uri >= 2.6.4 && < 2.8,@@ -122,8 +120,6 @@ pcre2 >= 2.3 && < 2.4, text >= 2.1 && < 2.3 ghc-options: -Wall- -O2- -rtsopts other-modules: InputParser, ParsecExt,@@ -136,4 +132,4 @@ type: git location: https://github.com/essandess/adblock2privoxy.git subdir: adblock2privoxy- tag: v3.0.0+ tag: v3.0.1
distribution/buildWin.bat view
@@ -11,28 +11,15 @@ ECHO Install GHC and Cabal CD %USERPROFILE% "%stack%" setup -"%stack%" build cabal-install ECHO Build package dependencies with stack first CD "%startpath%" "%stack%" build --only-dependencies -FOR /F "tokens=* USEBACKQ" %%F IN (`"%stack%" path --snapshot-pkg-db`) DO ( -SET snapshotdb=%%F -) - -FOR /F "tokens=* USEBACKQ" %%F IN (`"%stack%" path --local-pkg-db`) DO ( -SET localdb=%%F -) - -ECHO snapshots package DB = %snapshotdb% -ECHO local package DB = %localdb% - MKDIR "%prefix%" -"%stack%" exec --no-ghc-package-path runhaskell -- Setup.hs configure --user --prefix="%prefix%" --package-db=clear --package-db=global --package-db="%snapshotdb%" --package-db="%localdb%" -"%stack%" exec --no-ghc-package-path runhaskell -- Setup.hs build -"%stack%" exec --no-ghc-package-path runhaskell -- Setup.hs install +"%stack%" build +"%stack%" install --local-bin-path="%prefix%\bin" cd "%prefix%\doc\*windows*\adblock2privoxy*" copy "%startpath%\README.rst" .
distribution/debbuild/DEBIAN/control view
@@ -1,6 +1,6 @@ Package: adblock2privoxy-Version: 1.4.2-Depends: libgmp10+Version: 3.0.1+Depends: libgmp10, libpcre2-8 Architecture: #ARCH# Maintainer: Alexey Zubritskiy <adblock2privoxy@zubr.me>, Steven Thomas Smith <steve.t.smith@gmail.com> Homepage: https://github.com/essandess/adblock2privoxy
distribution/makeDeb.sh view
@@ -13,12 +13,11 @@ echo "deb http://download.fpcomplete.com/debian $codename main" | sudo tee /etc/apt/sources.list.d/fpco.list sudo apt-get update-sudo apt-get -y --force-yes install stack+sudo apt-get -y --force-yes install stack libpcre2-dev echo "install ghc and cabal" cd ~ stack setup-stack install cabal-install echo "change dir to $scriptDir" cd $scriptDir@@ -26,11 +25,8 @@ echo "build adblock2privoxy" cd ..-stack build --only-dependencies--stack exec --no-ghc-package-path runhaskell -- Setup.hs configure --user --prefix=/usr --package-db=clear --package-db=global --package-db="$(stack path --snapshot-pkg-db)" --package-db="$(stack path --local-pkg-db)"-stack exec --no-ghc-package-path runhaskell -- Setup.hs build-stack exec --no-ghc-package-path runhaskell -- Setup.hs copy --destdir=distribution/debbuild+stack build+stack install --local-bin-path=distribution/debbuild/usr/bin cp -r man distribution/debbuild/usr/share/ echo "set architecture" sed -i -e "s/#ARCH#/$(dpkg --print-architecture)/" distribution/debbuild/DEBIAN/control
distribution/makeRpm.sh view
@@ -28,6 +28,7 @@ curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/$ID/$VERSION_ID/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo echo "install build tools and dependencies"+sudo dnf -y install pcre2-devel || sudo yum -y install pcre2-devel if [ "$VERSION_ID" -gt "21" ] then
distribution/rpmbuild/SPECS/adblock2privoxy.spec view
@@ -1,16 +1,18 @@ Name: adblock2privoxy-Version: 2.0.0+Version: 3.0.1 Release: 1%{?dist} Summary: Convert adblock config files to privoxy format License: GPL-3 URL: https://github.com/essandess/adblock2privoxy-Source0: http://hackage.haskell.org/package/adblock2privoxy-2.0.0/adblock2privoxy-2.0.0.tar.gz+Source0: http://hackage.haskell.org/package/adblock2privoxy-3.0.1/adblock2privoxy-3.0.1.tar.gz Vendor: Alexey Zubritskiy <adblock2privoxy@zubr.me>, Steven Thomas Smith <steve.t.smith@gmail.com> Group: Web BuildRequires: stack BuildRequires: zlib-devel+BuildRequires: pcre2-devel+Requires: pcre2 %description AdBlock Plus browser plugin has great block list files provided by big community,@@ -43,17 +45,14 @@ %prep %setup -q -T -D -n root stack setup-stack install cabal-install %build-stack build --only-dependencies-stack exec --no-ghc-package-path runhaskell -- Setup.hs configure --user --package-db=clear --package-db=global --package-db="$(stack path --snapshot-pkg-db)" --package-db="$(stack path --local-pkg-db)" --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid'-stack exec --no-ghc-package-path runhaskell -- Setup.hs build+stack build %install-stack exec --no-ghc-package-path runhaskell -- Setup.hs copy --destdir=%{buildroot} -v+stack install --local-bin-path=%{buildroot}%{_bindir} cp -r man %{buildroot}%{_mandir}
man/man1/adblock2privoxy.1 view
@@ -1,4 +1,4 @@-.TH "ADBLOCK2PRIVOXY" "1" "2015\-02\-21" "adblock2privoxy 1.3.4" "General Commands Manual"+.TH "ADBLOCK2PRIVOXY" "1" "2026\-08\-08" "adblock2privoxy 3.0.1" "General Commands Manual" .SH ADBLOCK2PRIVOXY .PP \f[B]Convert adblock config files to privoxy format\f[]
src/PatternConverter.hs view
@@ -89,9 +89,8 @@ maxPatternLength :: Int maxPatternLength = 8000 --- possessive wildcard .*+ is more efficient in PCRE2 globWildcard :: String-globWildcard = ".*+"+globWildcard = "(*PRUNE).*?" caretSeparator :: String caretSeparator = "[^\\w%.-]"@@ -184,6 +183,12 @@ ++ "(?:" ++ caretSeparator ++ "|$)"+ -- wildcard-TLD host may be followed by an extra subpath before a literal path+ _+ | not (null host),+ last host == '*',+ not ("*" `isPrefixOf` path) ->+ "(?:" ++ globWildcard ++ "/)?" ++ replacePath start other False False -- a literal leading / is its own anchor _ -> replacePath start other (bindStart == None && host == "" && not (isPathAnchored path)) False where@@ -243,7 +248,12 @@ isClassChar ch = isAlphaNum ch || ch `elem` "-^" renderChunk :: Either String String -> String- renderChunk (Left plain) = concatMap replaceWildcard plain+ renderChunk (Left plain) = concatMap replaceWildcard (mergeDotStar plain)+ where+ -- fold literal '.' immediately before '*' into the wildcard itself+ mergeDotStar ('.' : '*' : rest) = '*' : mergeDotStar rest+ mergeDotStar (c : rest) = c : mergeDotStar rest+ mergeDotStar [] = [] renderChunk (Right cls) = cls hostSeparators :: String
stack.yaml view
@@ -1,16 +1,11 @@ # For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md -# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)-resolver: lts-18.18+# Specifies the GHC version and set of packages available+resolver: lts-lts-24.53 # Local packages, usually specified by relative directory name packages: - '.'--# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)-extra-deps:-- parsec-permutation-0.1.2.0-- MissingH-1.4.3.0@sha256:efbbe7065e17bc01ed925593a0c5b5793ab857585a8e9d5015d0025e526ab55c # Override default flag values for local packages and extra-deps flags: {}