1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lemmy_ynh.git synced 2024-09-03 19:36:09 +02:00

Fix Pict-RS by loosening systemd restrictions, add exiftools dependency

This commit is contained in:
tituspijean 2023-07-30 12:26:43 +02:00
parent 4ab3b027c8
commit 76b2a65e74
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
4 changed files with 25 additions and 25 deletions

View file

@ -16,31 +16,31 @@ StandardError=inherit
# Depending on specificities of your service/app, you may need to tweak these # Depending on specificities of your service/app, you may need to tweak these
# .. but this should be a good baseline # .. but this should be a good baseline
# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html # Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
NoNewPrivileges=yes #NoNewPrivileges=yes
PrivateTmp=yes #PrivateTmp=yes
PrivateDevices=yes #PrivateDevices=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 #RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes #RestrictNamespaces=yes
RestrictRealtime=yes #RestrictRealtime=yes
DevicePolicy=closed #DevicePolicy=closed
ProtectSystem=full #ProtectSystem=full
ProtectControlGroups=yes #ProtectControlGroups=yes
ProtectKernelModules=yes #ProtectKernelModules=yes
ProtectKernelTunables=yes #ProtectKernelTunables=yes
LockPersonality=yes #LockPersonality=yes
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap #SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap
# Denying access to capabilities that should not be relevant for webapps # Denying access to capabilities that should not be relevant for webapps
# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html # Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html
CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD #CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD
CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE #CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE
CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT #CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT
CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK #CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK
CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM #CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM
CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG #CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE #CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW #CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG #CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -82,7 +82,7 @@ ram.runtime = "50M"
inbox.protected = true inbox.protected = true
[resources.apt] [resources.apt]
packages = "postgresql espeak libfuse2" packages = "postgresql espeak libfuse2 libimage-exiftool-perl"
extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main" extras.yarn.repo = "deb https://dl.yarnpkg.com/debian/ stable main"
extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg" extras.yarn.key = "https://dl.yarnpkg.com/debian/pubkey.gpg"
extras.yarn.packages = "yarn" extras.yarn.packages = "yarn"

View file

@ -90,7 +90,7 @@ chmod -R o-rwx "$install_dir"
chown -R $app:$app "$install_dir" chown -R $app:$app "$install_dir"
# (Dirty) Install ImageMagick # (Dirty) Install ImageMagick
# Requires libfuse2 apt dependency # Requires 'libfuse2' and 'libimage-exiftool-perl' apt dependencies
wget https://imagemagick.org/archive/binaries/magick -o "$install_dir/pict-rs/magick" -q wget https://imagemagick.org/archive/binaries/magick -o "$install_dir/pict-rs/magick" -q
chmod 750 "$install_dir/pict-rs/magick" chmod 750 "$install_dir/pict-rs/magick"
chown $app:$app "$install_dir/pict-rs/magick" chown $app:$app "$install_dir/pict-rs/magick"

View file

@ -129,7 +129,7 @@ then
ynh_secure_remove --file="$install_dir/build-pict-rs" ynh_secure_remove --file="$install_dir/build-pict-rs"
# (Dirty) Install ImageMagick # (Dirty) Install ImageMagick
# Requires libfuse2 apt dependency # Requires 'libfuse2' and 'libimage-exiftool-perl' apt dependencies
wget https://imagemagick.org/archive/binaries/magick -o "$install_dir/pict-rs/magick" -q wget https://imagemagick.org/archive/binaries/magick -o "$install_dir/pict-rs/magick" -q
chmod 750 "$install_dir/pict-rs/magick" chmod 750 "$install_dir/pict-rs/magick"
chown $app:$app "$install_dir/pict-rs/magick" chown $app:$app "$install_dir/pict-rs/magick"