You are not logged in.
Pages: 1
Hi! I'm new to writing PKGBUILD's for the AUR for my own stuff and wanted some feedback on a new package of mine. This especially concerns the license array as I'm not sure what exactly to put there ("GPL3"? "GPL3 only"?)
When possible I tried following the Rust package guidelines.
The motivation behind building this was that aurphan didn't seem to work for me correctly and, instead of contributing to an old shell script, make use of some libraries that exist.
# Maintainer: witcher <witcher@wiredspace.de>
pkgname="helpaur"
pkgver=v0.1.0
pkgrel=2
pkgdesc="Help maintaining the AUR by listing unmaintained packages"
arch=('x86_64')
url="https://git.sr.ht/~witcher/$pkgname"
license=('GPL-3.0-only')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::https://git.sr.ht/~witcher/${pkgname}/archive/${pkgver}.tar.gz")
sha256sums=('36f1ecfff1da739f49d63065d52d6c13b66a771c0a45342ee3fd3302d0ae664d')
prepare() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
cd "$pkgname-$pkgver"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR="target"
cargo build --frozen --release --all-features
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 -t "${pkgdir}/usr/bin/" "target/release/${pkgname}"
install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" \
"LICENSES/GPL-3.0-only.txt" "LICENSES/CC0-1.0.txt"
install -Dm644 -t "${pkgdir}/usr/share/doc/${pkgname}" "README.md"
}
In the future I'd love to help maintain some packages in the AUR. Thanks!
Offline
I'm not sure what exactly to put there ("GPL3"? "GPL3 only"?)
https://wiki.archlinux.org/title/PKGBUILD#license
But this includes two very different licenses ... this is your software, right? Why are there two completely different licenses? Is it dual licenses such that users are free to choose which license terms to accept? In which case, the two selected licenses don't make much sense as one is a strict subset of the other - so you should just use the CC license (if this was the case).
Or are some parts GPL and other parts CC? If that's the case, the whole thing must be GPL - that's the "viral" nature of the GPL?
And was this actually based on aurphan? If so, you really don't have any choice, and you can't relicense it with a CC license.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
But this includes two very different licenses ... this is your software, right? Why are there two completely different licenses? Is it dual licenses such that users are free to choose which license terms to accept? In which case, the two selected licenses don't make much sense as one is a strict subset of the other - so you should just use the CC license (if this was the case).
First, thank you for taking the time to look at the package! This is my software, correct. The idea here is that source files are licensed under GPL3 and documentation, build system files, etc. are licensed under CC0. IANAL but as far as my knowledge goes it's possible to license different parts of a project under different licenses. This should also be compatible with GPL3 and CC0 in this case as all source files are licensed under one, and all other files are licensed under the other license. Do correct me on this if you think I'm wrong, though, and I'll do my best to fix that!
And was this actually based on aurphan? If so, you really don't have any choice, and you can't relicense it with a CC license.
The idea was sparked by aurphan but nothing else is shared with the project. Different implementation, different language, different way of doing things, etc.
If you're unsure about anything else, the source is linked in the PKGBUILD, so do take a look at it if you can!
Offline
The idea here is that source files are licensed under GPL3 and documentation, build system files, etc. are licensed under CC0.
That makes sense. But there are two potential hurdles: first, is this categorization of the licenses made clear anywhere in the source repo or package? As far as I can tell both licenses are just dropped into the source repo. Then perhaps more relevant here is whether or not the CC0 license is even serving any purpose here: build system files are not subject to copyright and thus cannot be licensed. Documentation can be, but I don't see any documentation other than a very short readme file which is likely marginal in whether or not it qualifies for copyright and / or licensing.
In any case, I think it'd be much clearer for any end user if you just stick with GPL as the only license in the repo and just note CC0 in a footer of the README specifically for the content of the README if you'd like. In either case, the package itself should just list GPL3.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks for the feedback on this.
That makes sense. But there are two potential hurdles: first, is this categorization of the licenses made clear anywhere in the source repo or package? As far as I can tell both licenses are just dropped into the source repo.
I honstly think this is fine: The repository adheres to the REUSE specification which defines that all files should have a comment about the license used at the top of the file. This clearly states that, for example, the README.md is licensed as CC0-1.0, or that src/main.rs is licensed under GPL-3.0-only.
Then perhaps more relevant here is whether or not the CC0 license is even serving any purpose here: build system files are not subject to copyright and thus cannot be licensed.
That seems odd and I can't find any info on this. Feel free to post more context. If this should be true, though, explicitly licensing those under CC0 shouldn't make a difference as they're then implicitly already in the public domain, given I understand you correctly.
In either case, the package itself should just list GPL3.
Fair enough, I'll put "GPL3" in the license array then. Thanks!
Getting back to the PKGBUILD: Is there anything I could do better? Any tips for future packages?
Offline
The repository adheres to the REUSE specification which defines that all files should have a comment about the license used at the top of the file.
Thanks. I missed that - that works well.
For build files not being subject to copyright I don't have references at my finger tips, but it's quite well established for the same reasoning that recipes cannot be copyrighted as they don't meet the threshold of originality. But there is no harm in assigning a CC0 to these anyways if you'd like - except, I'd argue, to the degree that it might confuse the overall licensing of the actual intellectual property (the original code).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Getting back to the PKGBUILD: Is there anything I could do better? Any tips for future packages?
Just a minor point on style.
You have defined a url variable.
You could use that in the source variable instead of duplicating the url contents.
Cheers,
Peter
Offline
You have defined a url variable.
You could use that in the source variable instead of duplicating the url contents.
Right, I completely missed that. Thanks for pointing it out!
Offline
Pages: 1