-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 I recently put together a PKGBUILD file for a tool I made and want to put on the AUR. While I believe it should be fine, I would like to have it reviewed before I upload it. - --- ``` # Maintainer: Minecraftchest1 <minecraftchest1 at outlook dot com> pkgname=file-sharing-tool pkgver=0.2.0 pkgrel=1 epoch= pkgdesc="A tool to help setup file sharing using ssh." arch=('any') url="https://gitlab.com/minecraftchest1/steamdeck-file-share-tool" license=('GPL3') groups=() depends=('openssh' 'zenity' 'sed' 'bash') makedepends=('coreutils') checkdepends=() optdepends=() provides=() conflicts=() replaces=() backup=() options=() install= changelog= source=("git+https://gitlab.com/minecraftchest1/steamdeck-file-share-tool#tag=$pkgver") noextract=() md5sums=() validpgpkeys=('B136A3601568A8CE2493') sha256sums=('SKIP') package() { cd steamdeck-file-share-tool install -D -v bin/file-sharing-tool.sh -t $pkgdir/usr/bin } ``` -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEsTajYBVoqM4kk+rB78FhxAtMwcYFAmOXbGEACgkQ78FhxAtM wcbL2A//apFD18OCEAWLJCIfq7cW/suL8mGEVLgGfoxH5zTqqtJBkS8AkXLk+eyL LVIQvFfGjeo7Zk/1R7XP/lgwzgbV1Y45Z8PxFiFYrIS56pgw+q2HdsTENyRcJVaC 2ol7ezJQZcItxmF0CJyC7z+kyEyv/rzrKAdh+M7cxRCqE9EpiUGco6IqQ41+Cyvu oRR1UcsBuGPtqt1xw6rBZ7PRfPBgy5GDJby5njRDJR17SpYBJ8EyKknOVWcOnEYn uUsZ6XjoY0ucAtB9LRbbtYL0CH1LdoohTKsjpZsZ6D7MkQ7UpfoAyBgTKysQR3BR l+N2q7rjVDzstIi51k1TxG3RwbJAASPtkyfXePfYsTIsCz19Z7ITjVqZRJ6HWRcu KahMhTVCBsx6h9xNvpJhWgiuxb97eUkupJOG0IuqVA3II1svqwXSCkNEox2duiRr wIj4IlWl2JBUYlf9DHsXlciiVK0bJvyPCUOJNqNnc4A8i5IbOkQuANf2YM4alB4K qh6GE1maWLMosophxkdMXfggNLcpoIWFCgII6s9MZ3w8CgFNveiV6EI76PYiaQXO WdOiA+Q/lLYyQ4brSWtRGkgJeAtDNzIKunlv8ec5S8/mzF8SJiesOqG4NZZDjNMc nJM89kcHjGJ7g3uOep7O1EhXrfes+D/ZyD81rUfVXPbO/fLf1U4= =Xwsg -----END PGP SIGNATURE-----
Hello, This looks good to me, however I advice to omit any opinions which you have not defined. Apart from that it looks good, make sure to build and install the package to ensure everything is working fine, follow the following: https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot Good luck :) Polarian
Il 12/12/22 19:03, Wyatt C Jackson ha scritto:
I recently put together a PKGBUILD file for a tool I made and want to put on the AUR. While I believe it should be fine, I would like to have it reviewed before I upload it.
--- ``` # Maintainer: Minecraftchest1 <minecraftchest1 at outlook dot com> pkgname=file-sharing-tool pkgver=0.2.0 pkgrel=1 epoch= pkgdesc="A tool to help setup file sharing using ssh." arch=('any') url="https://gitlab.com/minecraftchest1/steamdeck-file-share-tool" license=('GPL3') groups=() depends=('openssh' 'zenity' 'sed' 'bash') makedepends=('coreutils') checkdepends=() optdepends=() provides=() conflicts=() replaces=() backup=() options=() install= changelog= source=("git+https://gitlab.com/minecraftchest1/steamdeck-file-share-tool#tag=$pkgver") noextract=() md5sums=() validpgpkeys=('B136A3601568A8CE2493') sha256sums=('SKIP')
package() { cd steamdeck-file-share-tool install -D -v bin/file-sharing-tool.sh -t $pkgdir/usr/bin } ```
Hello, missing git as makedepends makedepends on coreutils not needed there is validpgpkeys but is not checked in source=() there isn't a license or a license indication in your source repo please remove unused fields please install the script as file-sharing-tool (without .sh)
Hello,
please install the script as file-sharing-tool (without .sh)
This is not always needed, it depends on how you want it to be, for example "acme.sh" keeps the .sh due to the naming they wanted. However it is PREFERED to use a shebang to the interpreter needed to run the script on the first line of the file: #!/usr/bin/sh Add the above to the top of the script and you can omit the .sh if you desire, it is not mandatory.
makedepends on coreutils not needed
You shouldn't put a massive group of packages into the makedepends, however you should include every individual package needed to build it, this includes git as stated already. You should add bash or sh or whatever you are using for the script, and then add the shebang at the top of the script for it. Hope this helps, Polarian
Hi, Here's how I would have wrote it (see commented changes at the bottom): # Maintainer: Minecraftchest1 <minecraftchest1 at outlook dot com> pkgname=file-sharing-tool pkgver=0.2.0 pkgrel=1 pkgdesc="A tool to help setup file sharing using ssh." arch=('any') url= ["https://gitlab.com/minecraftchest1/steamdeck-file-share-tool"](https://gitlab.com/minecraftchest1/steamdeck-file-share-tool) license=('GPL3') depends=('openssh' 'zenity') makedepends=('git') source=("git+${url}#tag=${pkgver}") sha256sums=('SKIP') package() { cd "${srcdir}" install -Dm 755 "bin/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}" } Changes: - Deleted every empty/not used variables to make the PKGBUILD more readable. - Deleted 'sed' and 'bash' from the "depends" array. Indeed, they belong to the "base" group package [1], which contains the set of packages that define a basic Arch Linux installation. Base group's members don't necessarily have to be listed as dependencies since you expect people to have them installed anyway. - Deleted 'coreutils' from the "makedepends" array for the same reason as above. By the way, the same rules apply for "base devel" metapackage's members [2], as far as AUR package are concerns [3]. - Added 'git' to "makedepends". Indeed, since you're not relying on a release archive but rather of a "git cloned" repo in the "source" array, "git" is needed to download and install your package. - Populated the use of variables in the "source" array and in the "package" function instead of re-typing raw metadata (url, package name, source directory, etc...). Obviously you don't have to, but that's more elegant I guess. - Deleted the "validgpgkey" array since it doesn't appear to be used. - Modified the "install" command in the "package" function to install the package with proper permissions and with a proper name (without ".sh"). I wrote that on the go, I didn't test the PKGBUILD myself so make sure it works correctly on your side :) I would eventually suggest making a release of your package on GitLab so you could rely on a release's archive in the "source" array instead of "git cloning" the repo from a specific tag. That would allow you to check the integrity of the download source instead of skipping it ("sha256sums=('SKIP')"), which is a more trusty in my opinion. Also, as "Fabio Loli" wrote in his answer, you should eventually add a license file/indication in the GitLab repo. I let anyone else add more details/thoughts if needed. [1] https://archlinux.org/packages/core/any/base/ [2] https://archlinux.org/groups/x86_64/base-devel/ [3] https://wiki.archlinux.org/title/Arch_User_Repository#Prerequisites Regards, Antiz (Robin C.) Le 12/12/2022 à 19:16, Fabio Loli a écrit :
Il 12/12/22 19:03, Wyatt C Jackson ha scritto:
I recently put together a PKGBUILD file for a tool I made and want to put on the AUR. While I believe it should be fine, I would like to have it reviewed before I upload it.
--- ``` # Maintainer: Minecraftchest1 <minecraftchest1 at outlook dot com> pkgname=file-sharing-tool pkgver=0.2.0 pkgrel=1 epoch= pkgdesc="A tool to help setup file sharing using ssh." arch=('any') url= ["https://gitlab.com/minecraftchest1/steamdeck-file-share-tool"](https://gitlab.com/minecraftchest1/steamdeck-file-share-tool) license=('GPL3') groups=() depends=('openssh' 'zenity' 'sed' 'bash') makedepends=('coreutils') checkdepends=() optdepends=() provides=() conflicts=() replaces=() backup=() options=() install= changelog= source=("git+https://gitlab.com/minecraftchest1/steamdeck-file-share-tool#tag=$pkgver") noextract=() md5sums=() validpgpkeys=('B136A3601568A8CE2493') sha256sums=('SKIP')
package() { cd steamdeck-file-share-tool install -D -v bin/file-sharing-tool.sh -t $pkgdir/usr/bin } ```
Hello,
missing git as makedepends makedepends on coreutils not needed there is validpgpkeys but is not checked in source=() there isn't a license or a license indication in your source repo please remove unused fields please install the script as file-sharing-tool (without .sh)
-- Regards, Antiz (Robin C.)
Fabio, a newbie question:
there is validpgpkeys but is not checked in source=()
would that suggest changing ---- source=("git+https://gitlab.com/minecraftchest1/steamdeck-file-share-tool#tag=$pkgver") ---- to something like this ---- source=("git+https://gitlab.com/minecraftchest1/steamdeck-file-share-tool#tag=$pkgver?sig...") ---- ? also, are the quotation marks above optional? i.e., could it have been written ---- source=(git+https://gitlab.com/minecraftchest1/steamdeck-file-share-tool#tag=$pkgver?sig...) ---- cheers, Greg
participants (5)
-
Fabio Loli
-
Greg Minshall
-
Polarian
-
Robin Candau
-
Wyatt C Jackson