diff options
author | Stefan Fritsch <sf@sfritsch.de> | 2016-07-05 23:16:58 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@sfritsch.de> | 2016-07-05 23:16:58 +0200 |
commit | 6a1126a22878b5756d49e667e6e43f879b366744 (patch) | |
tree | 8dbbc43065a88e249e925d86da9e2b24aa984f73 | |
parent | 056f857cb91934b2cac5f2458c9fe106195fdb0b (diff) | |
download | apache2-6a1126a22878b5756d49e667e6e43f879b366744.tar.gz |
Revert "Fix conffiles from wheezy upgrade"
Revert fix for now. Will upload 2.4.23 first and then include the fix in
a later upload when it got more testing.
This reverts commit be57de2935c807f7fef290d96ce699fc160f0036.
-rw-r--r-- | debian/apache2.postinst | 20 | ||||
-rw-r--r-- | debian/apache2.preinst.in | 96 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/clean | 3 | ||||
-rwxr-xr-x | debian/create_preinst | 32 | ||||
-rwxr-xr-x | debian/rules | 17 |
6 files changed, 1 insertions, 169 deletions
diff --git a/debian/apache2.postinst b/debian/apache2.postinst index 5a407c37..9385a826 100644 --- a/debian/apache2.postinst +++ b/debian/apache2.postinst @@ -240,29 +240,9 @@ execute_deferred_actions () rm /var/lib/apache2/deferred_actions } -list_fixup_conffiles () { - cat <<- EOF - /etc/bash_completion.d/apache2 - /etc/apache2/sites-available/000-default.conf - /etc/apache2/sites-available/default-ssl.conf - /etc/apache2/conf-available/charset.conf - /etc/apache2/conf-available/localized-error-pages.conf - /etc/apache2/conf-available/other-vhosts-access-log.conf - /etc/apache2/conf-available/security.conf - EOF -} - case "$1" in configure) - if dpkg --compare-versions "$2" lt-nl "2.4.20-3~" ; then - list_fixup_conffiles | while read FILE ; do - if [ -e "${FILE}.dpkg-remove-fixup" ] ; then - echo "Removing backup copy of $FILE" - rm "${FILE}.dpkg-remove-fixup" - fi - done - fi enable_default_mpm $@ refresh_modules $@ install_default_files $@ diff --git a/debian/apache2.preinst.in b/debian/apache2.preinst.in deleted file mode 100644 index fc955929..00000000 --- a/debian/apache2.preinst.in +++ /dev/null @@ -1,96 +0,0 @@ -#! /bin/bash -# preinst script for apache2 -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * <new-preinst> `install' -# * <new-preinst> `install' <old-version> -# * <new-preinst> `upgrade' <old-version> -# * <old-preinst> `abort-upgrade' <new-version> -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -FIXUP_TEMPFILE= - - -list_fixup_conffiles () { - cat <<- EOF - /etc/bash_completion.d/apache2 6a5f85e62655f6b5c8fa0f95c7c35c9c removed - /etc/apache2/sites-available/000-default.conf 2cc450cf300a880abbc3767fc002477d - /etc/apache2/sites-available/default-ssl.conf 196d150beeaeaf845ece50d7e84e12de - /etc/apache2/conf-available/charset.conf e6fbb8adf631932851d6cc522c1e48d7 - /etc/apache2/conf-available/localized-error-pages.conf 844ba27ddb794fc6967bfb56b950e6a8 - /etc/apache2/conf-available/other-vhosts-access-log.conf 2cad303fc4221d6b0068a8b37597b9fb - /etc/apache2/conf-available/security.conf 0f644d9d04ad556f44f1e65674bc07dc - EOF -} - -create_fixup_conffiles_tgz () { - FIXUP_TEMPFILE=$(mktemp) - base64 -d > $FIXUP_TEMPFILE << EOF -XXX_FIXUP_CONFFILES_BASE64_XXX -EOF -} - -extract_fixup_conffile () { - local FILE=$1 - local BASENAME=${FILE##*/} - tar -xz -O -f $FIXUP_TEMPFILE $BASENAME > $FILE -} - -replace_broken_conffiles () { - local FILE - local MD5 - create_fixup_conffiles_tgz - while read FILE MD5 REMOVED ; do - if [ -f "$FILE" ] && md5sum "$FILE" | grep -q "^$MD5 " ; then - echo "Replacing broken conffile ${FILE}." - mv "$FILE" "${FILE}.dpkg-remove-fixup" - if [ -z "$REMOVED" ] ; then - extract_fixup_conffile "$FILE" - fi - fi - done - rm -f "$FIXUP_TEMPFILE" -} - -revert_broken_conffiles () { - local FILE - local MD5 - local REMOVE - while read FILE MD5 REMOVED; do - if [ -f "$FILE.dpkg-remove-fixup" ]; then - echo "Moving broken conffile $FILE back." - mv "${FILE}.dpkg-remove-fixup" "$FILE" - fi - done -} - -case "$1" in - upgrade) - - if dpkg --compare-versions "$2" lt-nl "2.4.20-3~" ; then - list_fixup_conffiles | replace_broken_conffiles - fi - - ;; - - abort-upgrade) - list_fixup_conffiles | revert_broken_conffiles - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/changelog b/debian/changelog index d2aaa103..ff446274 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,5 @@ apache2 (2.4.20-3) UNRELEASED; urgency=low - * Fix conffiles that may have got the wrong content during upgrade from - wheezy to early jessie versions. Closes: #794933 * Re-introduce mod_imagemap and mod_cern_meta. Closes: #786657 * Set SHELL=/bin/bash during configure to get reproducible builds regardless of where /bin/sh points to. diff --git a/debian/clean b/debian/clean index ae27f642..d49752e4 100644 --- a/debian/clean +++ b/debian/clean @@ -15,8 +15,5 @@ debian/config-dir/apache2.conf debian/manpages/a2query.8 debian/manpages/dh_apache2.1 debian/debhelper/dh_apache2 -debian/apache2.preinst -debian/fixup_conffiles.b64 -debian/fixup_conffiles.tgz config.nice support/suexec-custom.c diff --git a/debian/create_preinst b/debian/create_preinst deleted file mode 100755 index 1f30072a..00000000 --- a/debian/create_preinst +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/perl -# -# This script embeds a base64 encoded tarball into apache2.preinst. -# See #794933 - -use strict; -use warnings; -use autodie; - - -sub readfile -{ - my $fname = shift; - local $/; - open(my $fd, "<", $fname); - my $content = <$fd>; - return $content; -} - -sub writefile -{ - my $fname = shift; - my $content = shift; - open(my $fd, ">", $fname); - print $fd $content; -} - -my $preinst = readfile("debian/apache2.preinst.in"); -my $embed = readfile("debian/fixup_conffiles.b64"); - -$preinst =~ s/XXX_FIXUP_CONFFILES_BASE64_XXX/$embed/; -writefile("debian/apache2.preinst", $preinst); diff --git a/debian/rules b/debian/rules index 91e086da..cf656a6e 100755 --- a/debian/rules +++ b/debian/rules @@ -45,21 +45,6 @@ prebuild-checks: false ; \ fi -debian/fixup_conffiles.tgz: \ - debian/config-dir/sites-available/000-default.conf \ - debian/config-dir/sites-available/default-ssl.conf \ - debian/config-dir/conf-available/charset.conf \ - debian/config-dir/conf-available/localized-error-pages.conf \ - debian/config-dir/conf-available/other-vhosts-access-log.conf \ - debian/config-dir/conf-available/security.conf - tar --transform 's,.*/,,' -cz -f $@ $^ - -debian/fixup_conffiles.b64: debian/fixup_conffiles.tgz - base64 < $< > $@ - -debian/apache2.preinst: debian/apache2.preinst.in debian/fixup_conffiles.b64 debian/create_preinst - debian/create_preinst - clean-config-vars: # Clean up config_vars.mk # FIXME: Maybe someone could document here why we actually need to @@ -74,7 +59,7 @@ prepare-scripts: debian/a2query debian/debhelper/dh_apache2 (grep -s -v apache2:API debian/apache2-bin.substvars; echo apache2:API=apache2-api-$(API)) > debian/apache2-bin.substvars.new mv debian/apache2-bin.substvars.new debian/apache2-bin.substvars -generate-maintainer-scripts: debian/apache2.preinst +generate-maintainer-scripts: set -e ; \ for type in custom pristine ; do \ for f in postinst preinst prerm links dirs lintian-overrides postrm; do \ |