[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#711479: apache2-maintscript-helper fails when invoked inside postinst written in Perl



Package: apache2
Version: 2.4.4-5
Severity: normal
Tags: patch
Blocks: 669745


dwww package has postinst script writtern in Perl and embeeds shell code added by debhelper
 in the way described in the debhelper(7) man page:

       If you would like to embed it into a Perl script, here is one way
       to do that (note that I made sure that $1, $2, etc are set with the set command):

         my $temp="set -e\nset -- @ARGV\n" . << 'EOF';
         #DEBHELPER#
         EOF
         system ($temp) / 256 == 0
               or die "Problem with debhelper scripts: $!";

Unfortunatelly this does not work with apache2-maintainer-script, see
the following debugging output from `set -x':

  + [ -e /usr/share/apache2/apache2-maintscript-helper ]
  + . /usr/share/apache2/apache2-maintscript-helper
  + [ -n  ]
  + EXPORT_APACHE2_MAINTSCRIPT_HELPER=1
  + [ -n  ]
  + [ -e /etc/apache2/envvars ]
  + . /etc/apache2/envvars
  + unset HOME
  + [  !=  ]
  + SUFFIX=
  + export APACHE_RUN_USER=www-data
  + export APACHE_RUN_GROUP=www-data
  + export APACHE_PID_FILE=/var/run/apache2/apache2.pid
  + export APACHE_RUN_DIR=/var/run/apache2
  + export APACHE_LOCK_DIR=/var/lock/apache2
  + export APACHE_LOG_DIR=/var/log/apache2
  + export LANG=C
  + export LANG
  + echo
  + APACHE2_MAINTSCRIPT_DEBUG=
  + [ -n  ]
  + [ -z configure ]
  + APACHE2_MAINTSCRIPT_NAME=sh
  + echo Invoked from an unrecognized maintainer script: exiting
  + return 1
  

The attached patch makes use of environment variables defined by dpkg.
(However it still does not fully solves my issues with dwww, as after
applying it, I'm getting:
  + [ 1 -eq 32 ]
  + APACHE2_NEED_ACTION=1
  + a2enconf -m -q dwww.conf
  + return 1
  + exit 1
it looks like dwww, not dwww.conf should be passed to a2enconf, but this
might be another issue in dh_apache2)

Regards,
robert


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (200, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.8-1-686-pae (SMP w/1 CPU core)
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)
Shell: /bin/sh linked to /bin/dash

Versions of packages apache2 depends on:
ii  apache2-bin   2.4.4-5
ii  apache2-data  2.4.4-5
ii  lsb-base      4.1+Debian12
ii  mime-support  3.54
ii  perl          5.14.2-21
ii  procps        1:3.3.8-2

Versions of packages apache2 recommends:
ii  ssl-cert  1.0.32

Versions of packages apache2 suggests:
ii  apache2-doc                                      2.4.4-5
pn  apache2-suexec-pristine | apache2-suexec-custom  <none>
ii  apache2-utils                                    2.4.4-5
ii  chromium [www-browser]                           27.0.1453.110-1
ii  elinks [www-browser]                             0.12~pre6-1
ii  konqueror [www-browser]                          4:4.8.4-2
ii  links [www-browser]                              2.7-2
ii  links2 [www-browser]                             2.7-2
ii  lynx-cur [www-browser]                           2.8.8dev.15-2
ii  netrik [www-browser]                             1.16.1-1.1
ii  w3m [www-browser]                                0.5.3-8

Versions of packages apache2-bin depends on:
ii  libapr1                1.4.6-4
ii  libaprutil1            1.5.2-1
ii  libaprutil1-dbd-mysql  1.5.2-1
ii  libaprutil1-dbd-pgsql  1.5.2-1
ii  libaprutil1-ldap       1.5.2-1
ii  libc6                  2.17-5
ii  libcap2                1:2.22-1.2
ii  libldap-2.4-2          2.4.31-1+nmu2
ii  liblua5.1-0            5.1.5-4
ii  libpcre3               1:8.31-2
ii  libssl1.0.0            1.0.1e-3
ii  libxml2                2.8.0+dfsg1-7+nmu1
ii  perl                   5.14.2-21
ii  zlib1g                 1:1.2.8.dfsg-1

Versions of packages apache2-bin suggests:
ii  apache2-doc                                      2.4.4-5
pn  apache2-suexec-pristine | apache2-suexec-custom  <none>
ii  chromium [www-browser]                           27.0.1453.110-1
ii  elinks [www-browser]                             0.12~pre6-1
ii  konqueror [www-browser]                          4:4.8.4-2
ii  links [www-browser]                              2.7-2
ii  links2 [www-browser]                             2.7-2
ii  lynx-cur [www-browser]                           2.8.8dev.15-2
ii  netrik [www-browser]                             1.16.1-1.1
ii  w3m [www-browser]                                0.5.3-8

Versions of packages apache2 is related to:
ii  apache2      2.4.4-5
ii  apache2-bin  2.4.4-5

-- Configuration Files:
/etc/apache2/apache2.conf changed [not included]
/etc/apache2/mods-available/info.conf changed [not included]
/etc/apache2/mods-available/mpm_prefork.conf changed [not included]
/etc/apache2/mods-available/ssl.conf changed [not included]
/etc/apache2/ports.conf changed [not included]
/etc/apache2/sites-available/000-default.conf changed [not included]
/etc/logrotate.d/apache2 changed [not included]

-- no debconf information

-- debsums errors found:
debsums: changed file /usr/share/apache2/apache2-maintscript-helper (from apache2 package)


Reply to: