diff --git a/srcpkgs/gitea/INSTALL b/srcpkgs/gitea/INSTALL index de7380495c1..92e2f390e76 100644 --- a/srcpkgs/gitea/INSTALL +++ b/srcpkgs/gitea/INSTALL @@ -1,21 +1,13 @@ 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 + post) + if [ "$UPDATE" = "yes" ] ; then + : + else + # This sets the secret key which would otherwise be + # distributed as a static packaged value + secret="$(tr -dc '[:alnum:]' < /dev/urandom | head -c32)" + sed -i "s!!$secret!" etc/gitea.conf 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 - secret="$(tr -dc '[:alnum:]' < /dev/urandom | head -c32)" - sed -i "s!!$secret!" etc/gitea.conf - chown _gitea:_gitea etc/gitea.conf - fi - ;; + chown _gitea:_gitea etc/gitea.conf + ;; esac diff --git a/srcpkgs/gitea/template b/srcpkgs/gitea/template index 89f1ba80fa0..c58c4699140 100644 --- a/srcpkgs/gitea/template +++ b/srcpkgs/gitea/template @@ -1,7 +1,7 @@ # Template file for 'gitea' pkgname=gitea version=1.4.1 -revision=2 +revision=3 build_style=go go_import_path="code.gitea.io/gitea" # This could be done with build options, but these are built in with the