Package Details: hblock 3.2.1-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: 10
Popularity: 1.10
First Submitted: 2018-12-15 19:51
Last Updated: 2021-03-08 19:55

Latest Comments

« First ‹ Previous 1 2

erazemk 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/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

@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

@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

@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

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

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

==> 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

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

Please, include systemd service and timer for this package.