On 2014-08-16, Francesco Parisi wrote:
> OS: Debian edu 7.1 (main/LTSP combined server)
>
> Problem: "etckeeper failed to commit changes in /etc" when make apt-get
> install/remove/upgrade in chroot /opt/ltsp/i386  (fat client os)
>
> The problem happens every time I run apt-get as root  (with "su -" but also
> with "su").  Ex:
>
> $ su -
> # ltsp-chroot -m
> # apt-get install anjuta
> ... ...
> "etckeeper failed to commit changes in /etc"
> ... ...
> Configurazione di anjuta (2:3.4.3-1)...
> Elaborazione dei trigger per menu...
> mktemp: creazione del file con il modello
> "/tmp/user/0/etckeeper-git.XXXXXXXXXX" non riuscita: File o directory non
> esistente
> E: Problem executing scripts DPkg::Post-Invoke 'if [ -x /usr/bin/etckeeper
> ]; then etckeeper post-install; fi'
> E: Sub-process returned an error code
> #

This looks like you have libpam-tmpdir or something similar installed
that sets the various TMP and TEMP and TMPDIR related variables, and
there is no corresponding /tmp/user/UID/ directory for tempfiles in the
chroot.


> If instead I run it as root, but  with "su -p" instead, all works ok. Ex:
>
> $ su -p
> # ltsp-chroot -m
> # apt-get install anjuta
> ... ...
> Configurazione di anjuta (2:3.4.3-1)...
> Elaborazione dei trigger per menu...
> #
>
> Also works fine if I use sudo:
>
> $ sudo ltsp-chroot -m apt-get install anjuta
>
>
> It seems something about environment of user (-p preserves env.)
>
> Are there other users (running Debian 7.1) that have same problem?
>
> How it could be fixed?

Stick to using sudo or 'su -p'? Remove libpam-tmpdir or whatever is
setting the temp variables? Manually unset the variables before running
ltsp-chroot? Manually create the tempdir referenced in those variables?


libpam-tmpdir is a great idea, but many applications either refuse to
respect those variables, for good or bad reasons, and it also doesn't
work well with chroots, as you have to make sure to create the tempdir
is created in each chroot as well.


live well,
  vagrant

Attachment: pgpNYk1n4595T.pgp
Description: PGP signature

------------------------------------------------------------------------------
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to