Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix static assets permissions in AM packages #357

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ chown -R archivematica:archivematica /var/archivematica/.storage-service
chown -R archivematica:archivematica ${SS_ENV_DIR}
mkdir -p /var/log/archivematica/storage-service
chown -R archivematica:archivematica /var/log/archivematica/storage-service
chown -R archivematica:archivematica /usr/lib/archivematica/storage-service/assets
chown -R archivematica:archivematica /usr/lib/archivematica/storage-service/locale

rm -f /tmp/storage_service.log

Expand Down
4 changes: 4 additions & 0 deletions debs/jammy/archivematica/debian-dashboard/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,8 @@ dashboard::manage collectstatic --noinput --clear
# Compile messages
dashboard::manage compilemessages

# Set permissions.
chown -R archivematica:archivematica /usr/share/archivematica/dashboard/static
chown -R archivematica:archivematica /usr/share/archivematica/dashboard/locale

#DEBHELPER#
2 changes: 2 additions & 0 deletions rpms/EL9/archivematica-storage-service/package.spec
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,5 @@ bash -c " \
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py collectstatic --noinput --clear
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py compilemessages
";
chown -R archivematica:archivematica /usr/lib/archivematica/storage-service/assets
chown -R archivematica:archivematica /usr/lib/archivematica/storage-service/locale
2 changes: 2 additions & 0 deletions rpms/EL9/archivematica/archivematica.spec
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,6 @@ bash -c " \
/usr/share/archivematica/virtualenvs/archivematica/bin/python manage.py compilemessages
";
chown -R archivematica:archivematica /var/log/archivematica/dashboard
chown -R archivematica:archivematica /usr/share/archivematica/dashboard/static
chown -R archivematica:archivematica /usr/share/archivematica/dashboard/locale
systemctl daemon-reload
37 changes: 37 additions & 0 deletions tests/archivematica/EL9/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,40 @@ sudo -u archivematica bash -c " \
--ss-api-key="apikey" \
--site-url="http://localhost"
";

sudo -u archivematica bash -c " \
set -a -e -x
source /etc/default/archivematica-dashboard || \
source /etc/sysconfig/archivematica-dashboard \
|| (echo 'Environment file not found'; exit 1)
cd /usr/share/archivematica/dashboard
/usr/share/archivematica/virtualenvs/archivematica/bin/python manage.py collectstatic --noinput --clear
";

sudo -u archivematica bash -c " \
set -a -e -x
source /etc/default/archivematica-dashboard || \
source /etc/sysconfig/archivematica-dashboard \
|| (echo 'Environment file not found'; exit 1)
cd /usr/share/archivematica/dashboard
/usr/share/archivematica/virtualenvs/archivematica/bin/python manage.py compilemessages
";


sudo -u archivematica bash -c " \
set -a -e -x
source /etc/default/archivematica-storage-service || \
source /etc/sysconfig/archivematica-storage-service \
|| (echo 'Environment file not found'; exit 1)
cd /usr/lib/archivematica/storage-service
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py collectstatic --noinput --clear
";

sudo -u archivematica bash -c " \
set -a -e -x
source /etc/default/archivematica-storage-service || \
source /etc/sysconfig/archivematica-storage-service \
|| (echo 'Environment file not found'; exit 1)
cd /usr/lib/archivematica/storage-service
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py compilemessages
";
37 changes: 37 additions & 0 deletions tests/archivematica/jammy/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,40 @@ sudo -u archivematica bash -c " \
--ss-api-key="apikey" \
--site-url="http://localhost"
";

sudo -u archivematica bash -c " \
set -a -e -x
source /etc/default/archivematica-dashboard || \
source /etc/sysconfig/archivematica-dashboard \
|| (echo 'Environment file not found'; exit 1)
cd /usr/share/archivematica/dashboard
/usr/share/archivematica/virtualenvs/archivematica/bin/python manage.py collectstatic --noinput --clear
";

sudo -u archivematica bash -c " \
set -a -e -x
source /etc/default/archivematica-dashboard || \
source /etc/sysconfig/archivematica-dashboard \
|| (echo 'Environment file not found'; exit 1)
cd /usr/share/archivematica/dashboard
/usr/share/archivematica/virtualenvs/archivematica/bin/python manage.py compilemessages
";


sudo -u archivematica bash -c " \
set -a -e -x
source /etc/default/archivematica-storage-service || \
source /etc/sysconfig/archivematica-storage-service \
|| (echo 'Environment file not found'; exit 1)
cd /usr/lib/archivematica/storage-service
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py collectstatic --noinput --clear
";

sudo -u archivematica bash -c " \
set -a -e -x
source /etc/default/archivematica-storage-service || \
source /etc/sysconfig/archivematica-storage-service \
|| (echo 'Environment file not found'; exit 1)
cd /usr/lib/archivematica/storage-service
/usr/share/archivematica/virtualenvs/archivematica-storage-service/bin/python manage.py compilemessages
";