Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-08-19 Thread Jonas Smedegaard
[taking the liberty to cc the bugreport, for the record]

Quoting Jean-Michel Vourgère (2013-08-15 23:26:10)
> Ping!
> 
> On Saturday 20 July 2013 22:31:40 Jean-Michel Vourgère wrote:
> > You opened bug #697465.
> > 6 monthes ago you agreed this was not an apache2 bug and said you 
> > will reassign it.
> > I'd like to keep bug number low, apache2.4 might bring its lot.
> > Can you please close, or reassign the issue to multistrap or 
> > fakechroot?

Thanks for pinging me on this issue.

I had forgotten about this, but correct - I expect the real bug to be in 
fakechroot.  Requires some work for me to distill a minimal showcase for 
that, though, and next week will involve quite a bit of travel for me 
without internet access...

If really important for you to have this out of your sight, then please 
do reassign now to fakechroot, to let it hang incomplete there instead, 
until I - or others? - get around to shed more light (from slightly 
different angle) onto it.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Processed: Re: Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-01-15 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> severity 697465 normal
Bug #697465 [apache2.2-common] apache2.2-common: initial install fails: Could 
not read /etc/apache2/envvars
Severity set to 'normal' from 'serious'
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
697465: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697465
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/handler.s.c.135828407527642.transcr...@bugs.debian.org



Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-01-15 Thread Stefan Fritsch

severity 697465 normal
thanks

On Tue, 8 Jan 2013, Jonas Smedegaard wrote:



I think you are right that what I experience might be unrelated to
apache packaging - I suspect however that it is not multistrap but
fakechroot.  I will reassing accordingly.


I am downgrading this until then. No idea what severity this should have 
in


Cheers,
Stefan


--
To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/alpine.deb.2.00.1301152204520.31...@eru.sfritsch.de



Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-01-08 Thread Jonas Smedegaard
Quoting Julien Cristau (2013-01-07 23:54:36)
> On Mon, Jan  7, 2013 at 20:23:26 +0100, Jonas Smedegaard wrote:
> 
> > Sorry if I was unclear earlier: I am talking about postinst too: 
> > postinst calls a2ensite calls perl loads modules.
> > 
> > Since those modules are not yet configured, postinst fails.
> > 
> > Package needs to pre-depend on perl, not just depend on it.
> > 
> No.  What you describe sounds like a multistrap bug.

I agree (as I wrote in the very next paragraph that you snipped) that 
the issue I am experiencing is unrelated to perl.

I think you are right that what I experience might be unrelated to 
apache packaging - I suspect however that it is not multistrap but 
fakechroot.  I will reassing accordingly.

It is evidently not possible to discuss two issues in same bugreport, so 
I will file a separate bugreport regarding that perl predependency that 
I discovered in my search for a cause for what I experience.


Thanks for all the help so far,

 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature


Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-01-07 Thread Julien Cristau
On Mon, Jan  7, 2013 at 20:23:26 +0100, Jonas Smedegaard wrote:

> Sorry if I was unclear earlier: I am talking about postinst too: 
> postinst calls a2ensite calls perl loads modules.
> 
> Since those modules are not yet configured, postinst fails.
> 
> Package needs to pre-depend on perl, not just depend on it.
> 
No.  What you describe sounds like a multistrap bug.

Cheers,
Julien


signature.asc
Description: Digital signature


Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-01-07 Thread Stefan Fritsch

On Mon, 7 Jan 2013, Jonas Smedegaard wrote:


Quoting Jean-Michel Vourgère (2013-01-07 16:58:08)

On Sunday 06 January 2013 11:29:55 Arno Töll wrote:

(...)

Seems that error comes from a2ensite call, so I suspect the cause
might be some dependency of that script has not yet been
configured.


a2ensite does not call a shell to read /etc/apache2/envvars. Your
output makes me suspect this is rather coming from the init script
which is invoked from postinst. What makes you think a2ensite is the
problem?


Arno:
a2ensite reads /etc/apache2/envvars in function read_env_file on line
331:
env - sh -c '. /etc/apache2/envvars && env'


Thanks, Jean-Michel.

Sorry if I was unclear earlier: I am talking about postinst too:
postinst calls a2ensite calls perl loads modules.

Since those modules are not yet configured, postinst fails.


Are you sure? Perl modules usually don't need the package to be configured 
in order to be usable. An exception may be if ld.config needs to be 
called.


And even so, according to policy 7.2, the dependencies *will* be 
configured when postinst is run:


"In the case of `postinst configure', the depended-on packages will be 
unpacked and configured first. (If both packages are involved in a 
dependency loop, this might not work as expected; see the explanation a 
few paragraphs back.)"


Clearly perl-modules is not in a dependency loop with apache2.2-common. 
Perl-modules is priority standard, apache2.2-common is optional.



Package needs to pre-depend on perl, not just depend on it.

Below test indicates that this bug is independent from that lack of
predependency on perl - so do you guys want me to file a separate bug
about the perl predependency?


If you still think there is a bug, yes please. But include the exact error 
message.



Jonas:
What does the command line above yield?
What is the result code ? ($?)
What shell do you use? dash? (ls -l /bin/sh)
Can you send us your envvars file?


As I wrote before, it occurs using multistrap.  Multistrap is like
debootstrap but postpones all postinst calls till later.  Therefore
envvars file is the file shipped with the package itself.


/etc/apache2/envvars is included in apache2.2-common. Therefore 
apache2.2-common may assume that it is present in postinst.



+ env - sh -c '. /etc/apache2/envvars && env'
sh: 1: .: Can't open /etc/apache2/envvars
+ echo 2
2
+ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Jan  7 18:53 /bin/sh -> bash
+ cat /etc/apache2/envvars
# envvars - default environment variables for apache2ctl


This is rather weird. The shell can't source the file but immediately 
afterwards the "cat" succeeds. Does multistrap do things in parallel? Or 
do you do this on NFS or some other strange file system?


Maybe you should run strace -f -tt on the whole multistrap process to see 
what is happening with respect to /etc/apache2/envvars.


Another possible issue I could imagine (but your log does not really look 
like it): If removed apache2.2-common in your chroot without purging it, 
and then deleted /etc/apache2/* by hand. In this case dpkg will not 
re-create /etc/apache2/envvars during the next installation because it is 
a conffile.

Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-01-07 Thread Jonas Smedegaard
Quoting Jean-Michel Vourgère (2013-01-07 16:58:08)
> On Sunday 06 January 2013 11:29:55 Arno Töll wrote:
> > (...)
> > > Seems that error comes from a2ensite call, so I suspect the cause 
> > > might be some dependency of that script has not yet been 
> > > configured.
> > 
> > a2ensite does not call a shell to read /etc/apache2/envvars. Your 
> > output makes me suspect this is rather coming from the init script 
> > which is invoked from postinst. What makes you think a2ensite is the 
> > problem?
> 
> Arno:
> a2ensite reads /etc/apache2/envvars in function read_env_file on line 
> 331:
> env - sh -c '. /etc/apache2/envvars && env'

Thanks, Jean-Michel.

Sorry if I was unclear earlier: I am talking about postinst too: 
postinst calls a2ensite calls perl loads modules.

Since those modules are not yet configured, postinst fails.

Package needs to pre-depend on perl, not just depend on it.

Below test indicates that this bug is independent from that lack of 
predependency on perl - so do you guys want me to file a separate bug 
about the perl predependency?


> Jonas:
> What does the command line above yield?
> What is the result code ? ($?)
> What shell do you use? dash? (ls -l /bin/sh)
> Can you send us your envvars file?

As I wrote before, it occurs using multistrap.  Multistrap is like 
debootstrap but postpones all postinst calls till later.  Therefore 
envvars file is the file shipped with the package itself.

Also, I tried manually switching sh to use bash, but that caused 
exact same failure.

Attached is the exact commands I used myself, and below is excerpt of 
output when I (after failure of attached script) add the following near 
the top of /var/lib/dpkg/info/apache2.2-common.postinst inside the 
chroot:

set +e
set -x
env - sh -c '. /etc/apache2/envvars && env'
echo $?
ls -l /bin/sh
cat /etc/apache2/envvars
set -e

...and then re-run make (which calls all postinst scripts again):

+ env - sh -c '. /etc/apache2/envvars && env'
sh: 1: .: Can't open /etc/apache2/envvars
+ echo 2
2
+ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Jan  7 18:53 /bin/sh -> bash
+ cat /etc/apache2/envvars
# envvars - default environment variables for apache2ctl

# this won't be correct after changing uid
unset HOME

# for supporting multiple apache2 instances
if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi

# Since there is no sane way to get the parsed apache2 config in scripts, some
# settings are defined via environment variables and then used in apache2ctl,
# /etc/init.d/apache2, /etc/logrotate.d/apache2, etc.
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_PID_FILE=/var/run/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

## The locale used by some modules like mod_dav
export LANG=C
## Uncomment the following line to use the system default locale instead:
#. /etc/default/locale

export LANG

## The command to get the status for 'apache2ctl status'.
## Some packages providing 'www-browser' need '--dump' instead of '-dump'.
#export APACHE_LYNX='www-browser -dump'

## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'



 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
#!/bin/sh

set -e

# This script works with normal user, except installing needed packages
#sudo aptitude install git fai-client multistrap fakechroot

# Setup boxer
git clone git://git.debian.org/git/collab-maint/boxer.git
cd boxer
git submodule update --init

# Enable a few classes, use local proxy, and explicitly set target suite
bin/boxerenclass ipv4ll webchat
echo "source = http://proxy:/debian"; > config.mk
echo "suite = wheezy" >> config.mk

# Create system
make

# Install system onto /media/boxer (formattet but not mounted device)
make install


signature.asc
Description: signature


Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-01-07 Thread Arno Töll
On 07.01.2013 16:58, Jean-Michel Vourgère wrote:
> Arno:
> a2ensite reads /etc/apache2/envvars in function read_env_file on line 331:
> env - sh -c '. /etc/apache2/envvars && env'

I could have sworn I removed that code and replaced it by pure Perl.
Sorry for the confusion.


-- 
with kind regards,
Arno Töll
IRC: daemonkeeper on Freenode/OFTC
GnuPG Key-ID: 0x9D80F36D



signature.asc
Description: OpenPGP digital signature


Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-01-07 Thread Jean-Michel Vourgère
On Sunday 06 January 2013 11:29:55 Arno Töll wrote:
> (...)
> > Seems that error comes from a2ensite call, so I suspect the cause might
> > be some dependency of that script has not yet been configured.
> 
> a2ensite does not call a shell to read /etc/apache2/envvars. Your output
> makes me suspect this is rather coming from the init script which is
> invoked from postinst. What makes you think a2ensite is the problem?

Arno:
a2ensite reads /etc/apache2/envvars in function read_env_file on line 331:
env - sh -c '. /etc/apache2/envvars && env'

Jonas:
What does the command line above yield?
What is the result code ? ($?)
What shell do you use? dash? (ls -l /bin/sh)
Can you send us your envvars file?


signature.asc
Description: This is a digitally signed message part.


Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-01-06 Thread Arno Töll
Hi,

On 05.01.2013 18:05, Jonas Smedegaard wrote:
> Severity: serious
> Justification: Policy 7.2

I doubt this applies in your case. But anyway, let's not discuss about
bug severities.

> Setting up apache2.2-common (2.2.22-12) ...
> sh: 1: .: Can't open /etc/apache2/envvars
> Could not read /etc/apache2/envvars
> dpkg: error processing apache2.2-common (--configure):
>  subprocess installed post-installation script returned error exit status 2

Could you provide a full output and what exactly you did? At very least
you are probably not using the multistrap default setup which does not
include Apache for obvious reasons.

> Seems that error comes from a2ensite call, so I suspect the cause might
> be some dependency of that script has not yet been configured.

a2ensite does not call a shell to read /etc/apache2/envvars. Your output
makes me suspect this is rather coming from the init script which is
invoked from postinst. What makes you think a2ensite is the problem?

That makes this error really strange because envvars comes from the same
package and is installed through dpkg, not a maintainer script, i.e.
long before the init script is called.

> Perhaps apache2.2-common must pre-depend (not depend) on perl, to ensure
> perl is fully configured before used.

In fact, a2enmod (almost) works already with perl-base installed, which
is an essential package. I say almost, because it does not include
File::Basename which we use. If perl was the problem, it would fail out
there.

> The installation was done using multistrap which postpones more postinst
> scripts than debootstrap and debian-installer.

Perhaps multistrap should be fixed then.


-- 
with kind regards,
Arno Töll
IRC: daemonkeeper on Freenode/OFTC
GnuPG Key-ID: 0x9D80F36D



signature.asc
Description: OpenPGP digital signature


Bug#697465: apache2.2-common: initial install fails: Could not read /etc/apache2/envvars

2013-01-05 Thread Jonas Smedegaard
Package: apache2.2-common
Version: 2.2.22-12
Severity: serious
Justification: Policy 7.2

Installation fails like this:

Setting up apache2.2-common (2.2.22-12) ...
sh: 1: .: Can't open /etc/apache2/envvars
Could not read /etc/apache2/envvars
dpkg: error processing apache2.2-common (--configure):
 subprocess installed post-installation script returned error exit status 2

Seems that error comes from a2ensite call, so I suspect the cause might
be some dependency of that script has not yet been configured.

Perhaps apache2.2-common must pre-depend (not depend) on perl, to ensure
perl is fully configured before used.

The installation was done using multistrap which postpones more postinst
scripts than debootstrap and debian-installer.


 - Jonas


-- 
To UNSUBSCRIBE, email to debian-apache-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20130105170544.27487.36627.report...@auryn.jones.dk