From 44019c0095e5b02a78b26bc8d6f2260c6df31463 Mon Sep 17 00:00:00 2001 From: lemmi Date: Thu, 10 May 2018 18:27:37 +0200 Subject: [PATCH] gitea: keep config file permissions xbps-install overwrites the uid/gid of config files during install even if the file is a config file. This breaks the gitea runit service as it isn't allowed to read it's own config file. https://github.com/voidlinux/xbps/blob/eaccf4813d7ecd9eca46cedab39de85290f4f055/lib/package_unpack.c#L385 --- srcpkgs/gitea/INSTALL | 10 +++++++++- srcpkgs/gitea/template | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/srcpkgs/gitea/INSTALL b/srcpkgs/gitea/INSTALL index 951f1bf545a..de7380495c1 100644 --- a/srcpkgs/gitea/INSTALL +++ b/srcpkgs/gitea/INSTALL @@ -1,7 +1,15 @@ case "$ACTION" in + pre) + if [ "$update" = "yes" ] ; then + touch tmp/gitea_permissions + chmod --reference=etc/gitea.conf tmp/gitea_permissions + chown --reference=etc/gitea.conf tmp/gitea_permissions + fi post) if [ "$UPDATE" = "yes" ] ; then - : + chmod --reference=tmp/gitea_permissions etc/gitea.conf + chown --reference=tmp/gitea_permissions etc/gitea.conf + rm tmp/gitea_permissions else # This sets the secret key which would otherwise be # distributed as a static packaged value diff --git a/srcpkgs/gitea/template b/srcpkgs/gitea/template index 24642850929..89f1ba80fa0 100644 --- a/srcpkgs/gitea/template +++ b/srcpkgs/gitea/template @@ -1,7 +1,7 @@ # Template file for 'gitea' pkgname=gitea version=1.4.1 -revision=1 +revision=2 build_style=go go_import_path="code.gitea.io/gitea" # This could be done with build options, but these are built in with the