Confusion about version for AUR package
Hello, I'm hoping to submit an AUR package which is just an OpenRC script for another package. The main package is `blocky` and I'll be calling my package `blocky-openrc` as such. I'm not sure if I should version my package separately, or if it should match the version of Blocky. I'm hesitant to version it by Blocky because it would be annoying to have to update the package version every time a new version of Blocky is released, even though nothing in the OpenRC script has changed. Here is the PKGBUILD. I figured I'd post it in case there's other feedback anyone might have. # Maintainer: zacoons <zac [at] zacoons [dot] com> pkgname=blocky-bin-openrc pkgver=1.0 pkgrel=1 pkgdesc="Fast and lightweight DNS proxy as ad-blocker" arch=("any") url="https://github.com/0xERR0R/blocky" license=("0BSD") depends=( "openrc" ) optdepends=( "blocky: blocky" "blocky-bin: blocky" ) source=( "blocky.initd" ) sha256sums=( "6ad6361614b16ddac6ce9e8d5f8e9b9e8c07e95115f59311e5e38b88ccbb51e3" # blocky.initd ) package() { install -D -v -m755 blocky.initd $pkgdir/etc/init.d/blocky }
El lun, 02-06-2025 a las 17:38 +1000, zac escribió:
Hello,
Hi!
I'm hoping to submit an AUR [..]
The idea seems good to me, you are not really packaging `blocky` but a `helper` for it. I would make a split package, one for the base and one for the binary: pkgbase=blocky-openrc pkgname=(blocky-openrc blocky-openrc-bin) pkgdesc='Fast and lightweight DNS proxy as ad-blocker' pkgver=2025.06.02 pkgrel=1 url="https://github.com/0xERR0R/blocky" arch=('any') license=("0BSD") provides=("${pkgbase}") options=(!strip !debug) source=('blocky.initd') b2sums=('THESUM') package_blocky-openrc() { depends=('openrc' 'blocky') install -D -v -m755 blocky.initd $pkgdir/etc/init.d/blocky } package_blocky-openrc-bin() { depends=('openrc' 'blocky-bin') install -D -v -m755 blocky.initd $pkgdir/etc/init.d/blocky } I would put the date in the package version and only change it if the openrc script changes. Then I would use B2SUM because it is more efficient and the rest more or less the same. The binary package would be with the `-bin` at the end as the AUR style guides say. And finally the options is because being a script you don't need to strip or create a debug package. Greetings. -- Óscar García Amor | ogarcia at moire.org | http://ogarcia.me
Hey, I think a split PKGBUILD is a bit of a bad idea since the openrc script seems to be the same no matter which package blocky is installed through. (And as an aside: everyone prefers different checksum algorithms. You can search up the differences if you like!) Cheers, Aᴀʀᴏɴ
Hi zac,
I'm hoping to submit an AUR package which is just an OpenRC script for another package. The main package is `blocky` and I'll be calling my package `blocky-openrc` as such.
I'm not sure if I should version my package separately, or if it should match the version of Blocky. I'm hesitant to version it by Blocky because it would be annoying to have to update the package version every time a new version of Blocky is released, even though nothing in the OpenRC script has changed.
I’d personally go for separate versioning. There is not much benefit to matching the versioning if the openrc script doesn’t need to be changed on most updates. That also seems to be the case for other -openrc packages [1]. A few notes on the overall PKGBUILD:
Here is the PKGBUILD. I figured I'd post it in case there's other feedback anyone might have.
# Maintainer: zacoons <zac [at] zacoons [dot] com>
pkgname=blocky-bin-openrc
The name should be blocky-openrc because this package is not packaging binaries.
pkgver=1.0 pkgrel=1 pkgdesc="Fast and lightweight DNS proxy as ad-blocker"
You should probably clarify that this is only the openrc script.
arch=("any") url="https://github.com/0xERR0R/blocky" license=("0BSD") depends=( "openrc" ) optdepends=( "blocky: blocky" "blocky-bin: blocky" )
Since blocky-bin provides blocky, you can just depend on blocky. Users will get asked which one to install if they don’t have one already.
source=( "blocky.initd" ) sha256sums=( "6ad6361614b16ddac6ce9e8d5f8e9b9e8c07e95115f59311e5e38b88ccbb51e3" # blocky.initd )
package() { install -D -v -m755 blocky.initd $pkgdir/etc/init.d/blocky }
You should quote the last part because $pkgdir could contain spaces. -- tippfehlr [1] https://aur.archlinux.org/packages?O=0&SeB=nd&K=-openrc&outdated=&SB=p&SO=d&...
Jun 2, 2025 03:38:54 zac <zac@zacoons.com>:
Hello,
I'm hoping to submit an AUR package which is just an OpenRC script for another package. The main package is `blocky` and I'll be calling my package `blocky-openrc` as such.
I'm not sure if I should version my package separately, or if it should match the version of Blocky. I'm hesitant to version it by Blocky because it would be annoying to have to update the package version every time a new version of Blocky is released, even though nothing in the OpenRC script has changed.
Here is the PKGBUILD. I figured I'd post it in case there's other feedback anyone might have.
# Maintainer: zacoons <zac [at] zacoons [dot] com>
pkgname=blocky-bin-openrc pkgver=1.0 pkgrel=1 pkgdesc="Fast and lightweight DNS proxy as ad-blocker" arch=("any") url="https://github.com/0xERR0R/blocky" license=("0BSD") depends=( "openrc" ) optdepends=( "blocky: blocky" "blocky-bin: blocky" ) source=( "blocky.initd" ) sha256sums=( "6ad6361614b16ddac6ce9e8d5f8e9b9e8c07e95115f59311e5e38b88ccbb51e3" # blocky.initd )
package() { install -D -v -m755 blocky.initd $pkgdir/etc/init.d/blocky }
I believe you only need to change the version if upstream actually updates the content of the package, in other words, unless the script breaks and upstream fixes it or upstream rewrites or update the script for some other reason, you can probably leave it as is. The openrc script itself is what is meant by upstream, not what package it's meant to accompany. -- Kusoneko GPG: https://kusoneko.moe/gpg.txt https://kusoneko.moe
Thanks for all the info! I'll version it separately using a version number. I won't use a date because I think that information can be found elsewhere (e.g. commit dates). Plus a version number is useful for communicating backwards compatibility. I'll take Oscar's word for it and change the hashing algorithm to use b2sum. I followed all of tippfehlr's advice. I also added a LICENCE file since namcap was telling me that "Uncommon license identifiers such as '0BSD' require license files". Given 0BSD is in SPDX, I wasn't sure if this was actually necessary, but I added it anyway. The contents of the LICENSE file is just taken from https://rfc.archlinux.page/0040-license-package-sources/#license-text So here's the updated PKGBUILD: # Maintainer: zacoons <zac [at] zacoons [dot] com> pkgname=blocky-openrc pkgver=1.0 pkgrel=1 pkgdesc="An OpenRC init script for the fast and lightweight DNS proxy as ad-blocker" arch=("any") url="https://github.com/0xERR0R/blocky" license=("0BSD") depends=( "openrc" "blocky" ) source=( "blocky.initd" "LICENSE" ) b2sums=( "955d7909f1ca1d023ee8e0a9958ce98f41831e6d3b9ba18d55dcd7511b3fc5b6ff2883e02347ddfcd9ba11b6b0dcc622a3851b382d072afaaa907be17781ff86" # blocky.initd "a29664104e1ee73ca0aee1d633e9095d92a57c92787f8d8740bdb7211ba3205782ed8677f539bdb8cae3dd75a3694be3132e185fa3fc4b3f401e1f88eb776101" # LICENSE ) package() { install -D -v -m755 blocky.initd "$pkgdir/etc/init.d/blocky" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" }
On 2025-06-04 11:58, zac wrote:
I also added a LICENCE file since namcap was telling me that "Uncommon license identifiers such as '0BSD' require license files". Given 0BSD is in SPDX, I wasn't sure if this was actually necessary, but I added it anyway.
This is because (like MIT) 0BSD includes a copyright line. The package `licenses` can provide licenses for other licenses since they are the same, but every 0BSD license is unique. [1] The PKGBUILD looks good to me :) -- tippfehlr [1] https://bugs.archlinux.org/task/28772
participants (5)
-
Kusoneko
-
Lime In a Jacket (Aaron Liu)
-
tippfehlr
-
zac
-
Óscar García Amor