Package Details: hblock 2.0.6-1

Git Clone URL: https://aur.archlinux.org/hblock.git (read-only)
Package Base: hblock
Description: An adblocker that creates a hosts file from automatically downloaded blacklists
Upstream URL: https://github.com/hectorm/hblock
Keywords: adblock blacklist hosts
Licenses: MIT
Submitter: JustMeErazem
Maintainer: JustMeErazem
Last Packager: JustMeErazem
Votes: 2
Popularity: 1.831144
First Submitted: 2018-12-15 19:51
Last Updated: 2019-03-16 18:53

Latest Comments

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.

JustMeErazem 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.

JustMeErazem 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.

JustMeErazem 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.