I’ve either never dealt with RPM specs before or it’s been so long that I can’t remember. Therefore, I can only make a statement about PKBUILD files.
Such files are relatively easy to create and read, as they are basically shell scripts. Thus, if you use AUR, for example, you can easily check them before an installation or an update to see whether the creator has done everything correctly or whether he has changed the file with malicious intent.
For example, a typical PKBUILD file looks like this.
# Maintainer: Alad Wenter <https://github.com/AladW># Co-Maintainer: Cedric Girard <cgirard [dot] archlinux [at] valinor [dot] fr>
pkgname=aurutils
pkgver=17.2
pkgrel=1
pkgdesc='helper tools for the arch user repository'
url='https://github.com/AladW/aurutils'arch=('any')
license=('custom:ISC')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz")
changelog=aurutils.changelog
install=aurutils.install
sha256sums=('65efed873facf06ec73b012d94c110f35e45d3057eda2bc85983a3c8c6ce2c81')
depends=('git''pacutils''curl''perl''perl-json-xs''bash')
optdepends=('bash-completion: bash completion''zsh: zsh completion''devtools: aur-chroot''vifm: default pager''ninja: aur-sync ninja support''bat: view-delta example script''git-delta: view-delta example script''python-srcinfo: sync-rebuild example script')
build() {
cd"$pkgname-$pkgver"
make AURUTILS_VERSION="$pkgver"
}
package() {
cd"$pkgname-$pkgver"
make PREFIX=/usr ETCDIR=/etc DESTDIR="$pkgdir" install
}
Such files are relatively easy to create and read, as they are basically shell scripts.
I agree. I lean towards writing in Bash script instead of learning yet another special-purpose language. Nonetheless, the RPM spec doesn’t seem to pose any additional difficulty.
I’ve either never dealt with RPM specs before or it’s been so long that I can’t remember. Therefore, I can only make a statement about PKBUILD files.
Such files are relatively easy to create and read, as they are basically shell scripts. Thus, if you use AUR, for example, you can easily check them before an installation or an update to see whether the creator has done everything correctly or whether he has changed the file with malicious intent.
For example, a typical PKBUILD file looks like this.
# Maintainer: Alad Wenter <https://github.com/AladW> # Co-Maintainer: Cedric Girard <cgirard [dot] archlinux [at] valinor [dot] fr> pkgname=aurutils pkgver=17.2 pkgrel=1 pkgdesc='helper tools for the arch user repository' url='https://github.com/AladW/aurutils' arch=('any') license=('custom:ISC') source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/$pkgver.tar.gz") changelog=aurutils.changelog install=aurutils.install sha256sums=('65efed873facf06ec73b012d94c110f35e45d3057eda2bc85983a3c8c6ce2c81') depends=('git' 'pacutils' 'curl' 'perl' 'perl-json-xs' 'bash') optdepends=('bash-completion: bash completion' 'zsh: zsh completion' 'devtools: aur-chroot' 'vifm: default pager' 'ninja: aur-sync ninja support' 'bat: view-delta example script' 'git-delta: view-delta example script' 'python-srcinfo: sync-rebuild example script') build() { cd "$pkgname-$pkgver" make AURUTILS_VERSION="$pkgver" } package() { cd "$pkgname-$pkgver" make PREFIX=/usr ETCDIR=/etc DESTDIR="$pkgdir" install }
I agree. I lean towards writing in Bash script instead of learning yet another special-purpose language. Nonetheless, the RPM spec doesn’t seem to pose any additional difficulty.