[pkg-horde] Bug#695915: Bug#695915: php-horde-role: package installation creates files in the users $HOME: ~/.pearrc

Mathieu Parent math.parent at gmail.com
Fri Dec 14 10:52:06 UTC 2012


2012/12/14 Andreas Beckmann <debian at abeckmann.de>:
> Package: php-horde-role
> Version: 1.0.1-2
> Severity: serious
> User: debian-qa at lists.debian.org
> Usertags: piuparts
>
> Hi,

Hi,

> during a test with piuparts I noticed your package creates files in the
> users $HOME:
>
> 0m32.9s ERROR: FAIL: Package purging left files on system:
>   /local/        not owned
>   /local/piuparts/       not owned
>   /local/piuparts/piupartss/     not owned
>   /local/piuparts/piupartss/.pearrc      not owned
>
> The home directory of the piupartss user which runs the tests is
> /local/piuparts/piupartss, but the tests are run in a chroot and via
> sudo, so I don't know how the wrong HOME survives ...
> any way, this is really bad as it may happen in regular systems in some
> cases creating root owned files in a user HOME (preventing the user to
> edit these properly) and even worse may take user configuration into
> account for the system setup.
>
> This may not be a fault of php-horde-role but of something related to
> PEAR or the way how pear is used ...

This creation probably comes from the postinst [1] which runs:
pear config-set horde_dir /usr/share/horde

Here is the help of the config-set pear command:
$ pear help config-set
pear config-set [options] <parameter> <value> [layer]
Sets the value of one configuration parameter.  The first argument is
the name of the parameter, the second argument is the new value.  Some
parameters are subject to validation, and the command will fail with
an error message if the new value does not make sense.  An optional
third argument may be used to specify in which layer to set the
configuration parameter.  The default layer is "user".  The
configuration value will be set for the current channel, which
is controlled by the default_channel configuration variable.

Options:
  -c CHAN, --channel=CHAN
        show configuration variables for another channel

Using the "system" layer will probably help.

I will upload a new version with this.

[1]: http://anonscm.debian.org/gitweb/?p=pkg-horde/horde4/php-horde-role.git;a=blob;f=debian/postinst;h=5a98a78609ed71123da3e04173fb3c125a8ebb46;hb=HEAD

Cheers,
--
Mathieu



More information about the pkg-horde-hackers mailing list