Package Details: hblock 2.1.6-1

Git Clone URL: (read-only, click to copy)
Package Base: hblock
Description: An adblocker that creates a hosts file from automatically downloaded blacklists
Upstream URL:
Keywords: adblock blacklist hosts
Licenses: MIT
Submitter: erazemkokot
Maintainer: erazemkokot
Last Packager: erazemkokot
Votes: 6
Popularity: 0.22
First Submitted: 2018-12-15 19:51
Last Updated: 2020-05-03 15:12

Latest Comments

1 2 Next › Last »

erazemkokot commented on 2020-01-13 06:20

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

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.

erazemkokot commented on 2019-05-02 22:50

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

kronikpillow commented on 2019-05-02 22:44

@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

erazemkokot commented on 2019-05-01 20:27

@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

  • 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/' './dist/hosts' './hblock' './resources' > 'dist/' 'resources/alt-formats/' './dist/hosts' './hblock' './resources' > 'dist/hosts_adblock.txt' 'resources/alt-formats/' './dist/hosts' './hblock' './resources' > 'dist/' 'resources/alt-formats/' './dist/hosts' './hblock' './resources' > 'dist/hosts_unbound.conf' 'resources/alt-formats/' './dist/hosts' './hblock' './resources' > 'dist/hosts_rpz.txt' resources/alt-formats/ line 18: zip: command not found resources/alt-formats/ line 18: zip: command not found make: [Makefile:62: dist/] Error 127 make: Waiting for unfinished jobs.... make: *** [Makefile:62: dist/] Error 127 ==> ERROR: A failure occurred in build(). Aborting... Error making: hblock ┌ 1 ~ └> $

erazemkokot commented on 2019-03-21 10:52

@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

@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/"

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

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


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.

erazemkokot commented on 2019-03-16 15:36


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?