[aur-general] Package review request
Hi list, creating a PKGBUILD[1] for Traefik[2], a reverse proxy, I would like to have it reviewed, as this is the first package I do that is containing a service. I tried following the Arch packaging standards[3] but am fairly sure I missed things. Other than that it's a Golang project, so I just have a binary and some configuration files to package. Thank you for your time. Stefan [1] https://aur.archlinux.org/packages/traefik-bin/ [2] https://github.com/containous/traefik [3] https://wiki.archlinux.org/index.php/Arch_packaging_standards
On Wed, 15 Mar 2017 15:41:27 +0100 Stefan Auditor via aur-general <aur-general@archlinux.org> wrote:
Hi list,
creating a PKGBUILD[1] for Traefik[2], a reverse proxy, I would like to have it reviewed, as this is the first package I do that is containing a service.
I tried following the Arch packaging standards[3] but am fairly sure I missed things.
Other than that it's a Golang project, so I just have a binary and some configuration files to package.
Thank you for your time. Stefan
[1] https://aur.archlinux.org/packages/traefik-bin/ [2] https://github.com/containous/traefik [3] https://wiki.archlinux.org/index.php/Arch_packaging_standards
The biggest problem is that is will fail on a lot of setups. You don't have the service, logrotate file, etc in the source array and assume that they're one dir up from $srcdir. This is wrong. Why do you have the LICENSE.md in both source_* arrays instead of the normal source array? You should also not be pulling that from master, as you don't know when that will change. It should be put in a subdir of $pkgname, not $_pkgname. chowning a managed dir in post_install is less than idea. You should be using a set UID/GID and chowing it in the package function. You should also not be deleting the user in post_remove. Hope this helps!
On Wed, 2017-03-15 at 10:10 -0500, Doug Newgard wrote:
On Wed, 15 Mar 2017 15:41:27 +0100 Stefan Auditor via aur-general <aur-general@archlinux.org> wrote:
Hi list,
creating a PKGBUILD[1] for Traefik[2], a reverse proxy, I would like to have it reviewed, as this is the first package I do that is containing a service.
I tried following the Arch packaging standards[3] but am fairly sure I missed things.
Other than that it's a Golang project, so I just have a binary and some configuration files to package.
Thank you for your time. Stefan
[1] https://aur.archlinux.org/packages/traefik-bin/ [2] https://github.com/containous/traefik [3] https://wiki.archlinux.org/index.php/Arch_packaging_standards
The biggest problem is that is will fail on a lot of setups. You don't have the service, logrotate file, etc in the source array and assume that they're one dir up from $srcdir. This is wrong. Changed that to include all files that are to be installed.
Why do you have the LICENSE.md in both source_* arrays instead of the normal source array? You should also not be pulling that from master, as you don't know when that will change. It should be put in a subdir of $pkgname, not $_pkgname. Changed that, too.
chowning a managed dir in post_install is less than idea. You should be using a set UID/GID and chowing it in the package function. Tried chowning in the package function, but as the user/group doesn't exist when packaging, it fails. Also found some packages[1][2] that are having the same problem and do it in the post_install hook. So, sticking to that by now
You should also not be deleting the user in post_remove. Removed that.
Hope this helps! Yes, thanks alot!
[1] https://git.archlinux.org/svntogit/community.git/tree/trunk/netdata.install?... [2] https://aur.archlinux.org/cgit/aur.git/tree/prometheus.install?h=prometheus
participants (2)
-
Doug Newgard
-
Stefan Auditor