diff --git a/debian/changelog b/debian/changelog index ed0d97b..6bc3d13 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ogrepository (1.1.5) UNRELEASED; urgency=medium + + * refs #2363 Fix breaking forgejo permissions + + -- OpenGnsys Tue, 1 Jul 2025 16:05:12 +0000 + ogrepository (1.1.4) UNRELEASED; urgency=medium * refs #2363 Reduce number of required dependencies diff --git a/debian/ogrepository.postinst b/debian/ogrepository.postinst index fff9a6a..f4b344e 100755 --- a/debian/ogrepository.postinst +++ b/debian/ogrepository.postinst @@ -92,7 +92,7 @@ done (echo "$SAMBA_PASS"; echo "$SAMBA_PASS") | smbpasswd -a $SAMBA_USER fi systemctl enable ogrepo-api - # Configure Repo + # Configure Repo cp /opt/opengnsys/ogrepository/etc/ogAdmRepo.cfg.tmpl /opt/opengnsys/ogrepository/etc/ogAdmRepo.cfg sed -i "s/SERVERIP/$OGREPO_IP/g" /opt/opengnsys/ogrepository/etc/ogAdmRepo.cfg @@ -128,6 +128,18 @@ chown -R opengnsys:www-data /opt/opengnsys/ogrepository chmod 755 /opt/opengnsys chmod 755 /opt/opengnsys/ogrepository/bin/* +# oggit -- these are from opengnsys-forgejo, and we're overwriting their +# permissions above. +# +# Check if the paths exist just in case the opengnsys-forgejo package +# stops being a dependency. +if [ -d "/opt/opengnsys/ogrepository/var/lib/forgejo/" ] ; then + chown -R oggit:oggit /opt/opengnsys/ogrepository/var/lib/forgejo/ +fi + +if [ -d "/opt/opengnsys/ogrepository/oggit/" ] ; then + chown -R oggit:oggit /opt/opengnsys/ogrepository/oggit/ +fi # Install http server stuff # Reiniciar servicios si es necesario