summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-20 16:26:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-20 16:26:05 +0000
commit0b905a015f5239d58bc4e38e611cee159c2c6f6e (patch)
tree7bde562f590ccf990cb74e90a38bda48d463b576
parentReleasing progress-linux version 5.8.1+dfsg1-1~progress6+u1. (diff)
downloadwordpress-0b905a015f5239d58bc4e38e611cee159c2c6f6e.tar.xz
wordpress-0b905a015f5239d58bc4e38e611cee159c2c6f6e.zip
Merging debian version 5.8.1+dfsg1-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--debian/apparmor/wordpress (renamed from debian/wordpress.apparmor)0
-rw-r--r--debian/changelog6
-rw-r--r--debian/wordpress.install2
-rw-r--r--debian/wordpress.postinst22
-rw-r--r--debian/wordpress.preinst11
5 files changed, 34 insertions, 7 deletions
diff --git a/debian/wordpress.apparmor b/debian/apparmor/wordpress
index 52cf4ba..52cf4ba 100644
--- a/debian/wordpress.apparmor
+++ b/debian/apparmor/wordpress
diff --git a/debian/changelog b/debian/changelog
index 444bf3b..78086eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+wordpress (5.8.1+dfsg1-2) unstable; urgency=high
+
+ * Install AppArmor file in correct location
+
+ -- Craig Small <csmall@debian.org> Mon, 20 Sep 2021 18:51:00 +1000
+
wordpress (5.8.1+dfsg1-1~progress6+u1) fuchur-backports; urgency=medium
* Initial upload to fuchur-backports.
diff --git a/debian/wordpress.install b/debian/wordpress.install
index e94a284..9e91db4 100644
--- a/debian/wordpress.install
+++ b/debian/wordpress.install
@@ -1,5 +1,5 @@
*.php usr/share/wordpress
-debian/wordpress.apparmor /etc/apparmor.d/apache2.d/wordpress
+debian/apparmor/wordpress /etc/apparmor.d/apache2.d
debian/htaccess etc/wordpress
debian/wp-config.php usr/share/wordpress
debian/wp-setup usr/bin
diff --git a/debian/wordpress.postinst b/debian/wordpress.postinst
index 637e9b3..148d3d9 100644
--- a/debian/wordpress.postinst
+++ b/debian/wordpress.postinst
@@ -2,12 +2,22 @@
set -e
-# To address security bug #363580, but don't change them again and
-# again if local admin put something else.
-if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt 2.0.2-2; then
- chmod 640 /etc/wordpress/config* >/dev/null 2>&1 || true
- chgrp www-data /etc/wordpress/config* >/dev/null 2>&1 || true
-fi
+case "$1" in
+ configure)
+ if dpkg --compare-versions "$2" lt 2.0.2-2; then
+ # To address security bug #363580, but don't change them again and
+ # again if local admin put something else.
+ chmod 640 /etc/wordpress/config* >/dev/null 2>&1 || true
+ chgrp www-data /etc/wordpress/config* >/dev/null 2>&1 || true
+ fi
+
+ # Reload the Apache profile
+ APP_PROFILE="/etc/apparmor.d/usr.sbin.apache2"
+ if [ -f "$APP_PROFILE" ] && aa-status --enabled 2>/dev/null; then
+ apparmor_parser -rTW "$APP_PROFILE" || true
+ fi
+ ;;
+esac
if [ -h /usr/share/tinymce/www/plugins/inlinepopups/editor_plugin.js ] &&
[ ! -e /usr/share/tinymce/www/plugins/inlinepopups/editor_plugin.js ]; then
diff --git a/debian/wordpress.preinst b/debian/wordpress.preinst
index 2c79a44..4f00316 100644
--- a/debian/wordpress.preinst
+++ b/debian/wordpress.preinst
@@ -42,6 +42,17 @@ case "$1" in
chown www-data:www-data /var/lib/wordpress/wp-content/uploads
fi
fi
+ if dpkg --compare-versions "$2" lt 5.8.1+dfsg1-2; then
+ # Move the incorrectly placed AppArmor file
+ if [ -d /etc/apparmor.d/apache2.d/wordpress ]; then
+ mv /etc/apparmor.d/apache2.d/wordpress /etc/apparmor.d/apache2.d/wordpress.old
+ if [ -e /etc/apparmor.d/apache2.d/wordpress.old/wordpress.apparmor ]; then
+ mv /etc/apparmor.d/apache2.d/wordpress.old/wordpress.apparmor /etc/apparmor.d/apache2.d/wordpress.tmp
+ fi
+ # Try to remove the old directory but ignore if it fails
+ rmdir /etc/apparmor.d/apache2.d/wordpress.old || true
+ fi
+ fi
;;
esac