Package Details: hblock 3.4.0-1

Git Clone URL: https://aur.archlinux.org/hblock.git (read-only, click to copy)
Package Base: hblock
Description: Adblocker that creates a hosts file from multiple sources
Upstream URL: https://github.com/hectorm/hblock
Keywords: adblock blocker hosts
Licenses: MIT
Submitter: erazemk
Maintainer: hectorm
Last Packager: hectorm
Votes: 15
Popularity: 0.096517
First Submitted: 2018-12-15 19:51 (UTC)
Last Updated: 2022-06-26 15:03 (UTC)

Latest Comments

malcolm commented on 2020-11-09 14:57 (UTC)

thanks

hectorm commented on 2020-11-09 14:27 (UTC) (edited on 2020-11-09 14:28 (UTC) by hectorm)

@malcolm The test that is failing is influenced by the system locale, I going to disable the tests until I find a solution.

malcolm commented on 2020-11-09 14:12 (UTC)

looks broken

==> Iniciando check()...
find ./resources/tests/ -type f -name 'test-*.sh' | sort -n | xargs -n1 env -i \
        PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' \
        TEST_SHELL=''
Test - Main: "-C" short option
Test - Main: "--comment" long option
Test - Main: Default options
Test - Main: Double dash argument
Test - Main: Invalid long option
Test - Main: Invalid short option
Test - Main: "-l" short option
Test - Main: "--lenient" long option
Test - Main: "--no-lenient" long option
Test - Main: "--no-regex" long option
Test - Main: "-R" short option
Test - Main: "--redirection" long option
Test - Main: "-r" short option
Test - Main: "--regex" long option
Test - Main: "-T" short option
Test - Main: "--template" long option
Test - Main: "-W" short option
Test - Main: "--wrap" long option
Test - Stats: Suffixes

Error, values are not equal

[Actual]:

Top     Hosts   Suffix
1       12      .xn--j6w193g
2       9       .arpa
3       9       .jp
4       4       .com
5       4       .net
6       3       .org
7       1       .unknown

[Expected]:

Top     Hosts   Suffix
1       7       .xn--od0alg.xn--j6w193g
2       5       .home.arpa
3       5       .jp
4       5       .xn--j6w193g
5       4       .arpa
6       4       .com
7       4       .net
8       4       .xn--1lqs71d.jp
9       3       .org
10      1       .unknown

Test - Stats: TLDs
make: *** [Makefile:110: test] Erro 123
==> ERRO: Uma falha ocorreu em check().
    Abortando...
erro ao construir: hblock

hectorm commented on 2020-11-08 13:52 (UTC)

Hi, I'm the author of hBlock. @erazemk has transferred the package to me and from now on I will be the one who updates it.

It's my first AUR package, any suggestion about the packaging of the project will be very helpful.

erazemk commented on 2020-01-13 06:20 (UTC)

I won't forcefully change installation paths in the Makefile, especially not by changing paths with sed. If you'd like /usr to be the default, suggest it to the project. I'd recommend you report the prefix not working as well.

yochananmarqos commented on 2020-01-12 21:13 (UTC)

The prefix in the Makefile is /usr/local. Please change it to/usr`.

Here's one way:

prepare() {
     cd "$pkgname-$pkgver"
     sed -i 's|/usr/local|/usr|g' Makefile
}

I tried make PREFIX=/usr but it didn't work for some reason.

erazemk commented on 2019-05-02 22:50 (UTC)

@kronikpillow, to enable the timer type sudo systemctl enable hblock.timer

kronikpillow commented on 2019-05-02 22:44 (UTC)

@JustMeErazem stange, I have the package installed, and with a second attempt i managed to install HBlock ... I ran hblock -b to generate the hosts file, now i just need to figgure out how to enable the timer :D

erazemk commented on 2019-05-01 20:27 (UTC)

@kronikpillow Seems you don't have zip installed. I don't use Arch anymore so I won't update the package, but it seems zip should be added as a dependency.

You can fix this issue locally by installing the package "zip" and retry the installation of hblock.

kronikpillow commented on 2019-05-01 20:23 (UTC)

  • Parsing lists...
  • Remove carriage return
  • Transform to lowercase
  • Remove comments
  • Trim spaces
  • Match hosts lines
  • Remove reserved TLDs
  • Remove destination IPs
  • Sort entries
  • Apply format template
  • Generating output file...
  • 134670 blocked domains! 'resources/alt-formats/windows.zip.sh' './dist/hosts' './hblock' './resources' > 'dist/hosts_windows.zip' 'resources/alt-formats/adblock.txt.sh' './dist/hosts' './hblock' './resources' > 'dist/hosts_adblock.txt' 'resources/alt-formats/android.zip.sh' './dist/hosts' './hblock' './resources' > 'dist/hosts_android.zip' 'resources/alt-formats/unbound.conf.sh' './dist/hosts' './hblock' './resources' > 'dist/hosts_unbound.conf' 'resources/alt-formats/rpz.txt.sh' './dist/hosts' './hblock' './resources' > 'dist/hosts_rpz.txt' resources/alt-formats/android.zip.sh: line 18: zip: command not found resources/alt-formats/windows.zip.sh: line 18: zip: command not found make: [Makefile:62: dist/hosts_android.zip] Error 127 make: Waiting for unfinished jobs.... make: *** [Makefile:62: dist/hosts_windows.zip] Error 127 ==> ERROR: A failure occurred in build(). Aborting... Error making: hblock ┌ 1 ~ └> $

erazemk commented on 2019-03-21 10:52 (UTC) (edited on 2019-03-21 10:53 (UTC) by erazemk)

@justcommenting The build section (the "make" command) apparently downloads the blacklists. So for now I will leave everything as it is.

Also the service isn't meant to be started using systemctl, but you can enable the timer so it will download the blacklists weekly (I think).

I have no intention of automatically enabling the timer, since like you said, stuff like that is against Arch rules.

justcommenting commented on 2019-03-17 09:06 (UTC) (edited on 2019-03-17 09:36 (UTC) by justcommenting)

@JustMeErazem The way the package now installs, I don't think we need to build anything. So just keep an empty build() {} instruction.

Moreover, I think you misunderstood me previously. I meant that just installing hblock.{service,timer} in systemd/system/ won't enable the service, and even then, without a systemctl start instruction, it won't start before a reboot, either; and everything would need a proper clean-up upon removal as well. Hence, the .install file.

However, it seems to be against Arch policy to autostart services, so we can forget that.

Just enabling the timer appears to be fine, though. A few standard packages do that. So I would add the following to package():

install -dm755 "${pkgdir}/usr/lib/systemd/system/timers.target.wants"

ln -s ../hblock.timer "${pkgdir}/usr/lib/systemd/system/timers.target.wants/hblock.timer"

Lastly, when you remove a service, systemd doesn't clean up the timestamps as far as I know. So you may want to remove /var/lib/systemd/timers/stamp-hblock.timer either via post_remove() in an .install file or you touch it in package() when it doesn't exist, yet, in /var.

justcommenting commented on 2019-03-16 15:47 (UTC)

@JustMeErazem

Yeah, you can use install -Dm644 as well. At the same time you can fix the location to /usr/lib/systemd/system, as is the arch linux style.

erazemk commented on 2019-03-16 15:36 (UTC)

@justcommenting

Do I have to use a separate file to enable the service or can I move the service and timer files and enable the service in the package() stage?

justcommenting commented on 2019-03-16 15:25 (UTC) (edited on 2019-03-16 15:26 (UTC) by justcommenting)

@JustMeErazem edit: mistakenly removed my comment :)

You need to change the make install line in package() to the following:

make DESTDIR="${pkgdir}/" SKIP_SERVICE_START=1 install

It would be nice if you also add a hblock.install file which would start and enable the systemd service after the installation.

erazemk commented on 2019-03-16 15:24 (UTC) (edited on 2019-03-16 16:47 (UTC) by erazemk)

The latest 2.0.5-5 version has fixed the build and sha265sum problems thanks to @justcommenting and folks from the arch BBS

teacher4711 commented on 2019-03-16 09:59 (UTC) (edited on 2019-03-16 10:00 (UTC) by teacher4711)

The package does not build because of an incorrect sha256sum. With 2de6856a863e1901d03f6566ed7b425778e65484b7f62c2ebe7c2b2f6fd23363 it starts building but it aborts later due to an error in check().

McQueen commented on 2019-02-27 02:23 (UTC)

==> Starting check()... make: *** No rule to make target 'check'. ==> ERROR: A failure occurred in check(). Aborting... ==> ERROR: Makepkg was unable to build hblock.

erazemk commented on 2019-02-26 16:59 (UTC) (edited on 2019-02-26 17:00 (UTC) by erazemk)

I've updated to 2.0.4 and moved to building the package, so the systemd service and timer are automatically included from now on.

th108 commented on 2019-02-18 18:22 (UTC)

Please, include systemd service and timer for this package.