Bug#685073: Errors in postinst script for bitlbee-common package in unstable repository

August 16th, 2012 - 08:00 am ET by Ä | Report spam
Package: bitlbee-common
Distribution: unstable (sid)
Version: 3.0.5-1.1

I tried to install bitlbee (3.0.5-1.1) and i got this output:

$ apt-get install bitlbee
Reading package lists... Done
Building dependency tree
Reading state information... Done
bitlbee is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 59 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up bitlbee-common (3.0.5-1.1) ...
The system user `bitlbee' already exists. Exiting.
chmod: cannot access `/var/lib/bitlbee/': No such file or directory
dpkg: error processing bitlbee-common (--configure):
subprocess installed post-installation script returned error exit status
1
dpkg: dependency problems prevent configuration of bitlbee:
bitlbee depends on bitlbee-common (= 3.0.5-1.1); however:
Package bitlbee-common is not configured yet.

dpkg: error processing bitlbee (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
bitlbee-common
bitlbee
E: Sub-process /usr/bin/dpkg returned an error code (1)


You can fix it by doing simple:
$ touch /var/lib/bitlbee


I searched bitlbee-common package and found that postinst script needs
fix (line 86):

Original piece of code:

if [ -d $CONFDIR ] && chown -R bitlbee: $CONFDIR; then
echo 'BitlBee (probably) already installed, skipping
user/configdir installation'
exit 0
fi


Modified piece of code:
-
if [ -d $CONFDIR ] && chown -R bitlbee: $CONFDIR; then
echo 'BitlBee (probably) already installed, skipping
user/configdir installation'
exit 0
else
touch $CONFDIR && chown -R bitlbee: $CONFDIR
fi


So, it if first check fails, it will create that $CONFDIR and apply
correct permissions. I'm not sure why is used:

chown -R bitlbee: $CONFDIR

instead of:

chown -R bitlbee: $CONFDIR

since there is only owner but not the group too.


To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 3 repliesReplies Make a reply

Similar topics

Replies

#1 gregor herrmann
August 16th, 2012 - 03:00 pm ET | Report spam

On Thu, 16 Aug 2012 14:02:17 +0200, Đurađ Radojičić wrote:

$ apt-get install bitlbee
Reading package lists... Done
Building dependency tree
Reading state information... Done
bitlbee is already the newest version.

0 upgraded, 0 newly installed, 0 to remove and 59 not upgraded.
2 not fully installed or removed.



^^ These two lines are interesting ...

After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up bitlbee-common (3.0.5-1.1) ...

The system user `bitlbee' already exists. Exiting.
chmod: cannot access `/var/lib/bitlbee/': No such file or directory



... and might explain what's happening here ^^

I was a bit surprised how you managed to have a system user but not
its home directory. But the incomplete state before (if I'm guessing
right) could explain this.

Yes, the postinst should be idempotent but it looks like what
happened to you is not the "usual" case.

Maybe you can try again with
- apt-get purge bitlbee bitlbee-common
- apt-get install bitlbee
?


Cheers,
gregor

.''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
: :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/
`. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
`- NP: Janis Joplin: Work Me, Lord
NP: Tracy Chapman: Crossroads





To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#2 Ä
August 17th, 2012 - 10:10 am ET | Report spam
On Thu, 16 Aug 2012, gregor herrmann wrote:

I was a bit surprised how you managed to have a system user but not
its home directory. But the incomplete state before (if I'm guessing
right) could explain this.

Yes, the postinst should be idempotent but it looks like what
happened to you is not the "usual" case.

Maybe you can try again with
- apt-get purge bitlbee bitlbee-common
- apt-get install bitlbee
?


Cheers,
gregor




Interesting. I upgraded my sys, used the same packages (?) and now it is
all right. This error was present 2 months ago but maybe i missed
something in the middle.

Anyway, here is the latest log:

$ apt-get purge bitlbee bitlbee-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
bitlbee* bitlbee-common*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 1,078 kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 41976 files and directories currently installed.)
Removing bitlbee ...
Stopping BitlBee IRC/IM gateway: bitlbee.
Removing bitlbee-common ...
Purging configuration files for bitlbee-common ...
Removing user `bitlbee' ...
Warning: group `bitlbee' has no more members.
Done.
Processing triggers for man-db ...

$ apt-get install bitlbee
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
bitlbee-common
The following NEW packages will be installed:
bitlbee bitlbee-common
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/406 kB of archives.
After this operation, 1,078 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Preconfiguring packages ...
Selecting previously unselected package bitlbee-common.
(Reading database ... 41950 files and directories currently installed.)
Unpacking bitlbee-common (from .../bitlbee-common_3.0.5-1.1_all.deb) ...
Selecting previously unselected package bitlbee.
Unpacking bitlbee (from .../bitlbee_3.0.5-1.1_i386.deb) ...
Processing triggers for man-db ...
Setting up bitlbee-common (3.0.5-1.1) ...
Adding system user `bitlbee' (UID 104) ...
Adding new group `bitlbee' (GID 109) ...
Adding new user `bitlbee' (UID 104) with group `bitlbee' ...
Creating home directory `/var/lib/bitlbee/' ...
Starting BitlBee IRC/IM gateway: bitlbee.
Setting up bitlbee (3.0.5-1.1) ...


Strange i must say.


To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
Replies Reply to this message
#3 gregor herrmann
August 17th, 2012 - 11:30 am ET | Report spam

On Fri, 17 Aug 2012 16:04:57 +0200, Đurađ Radojičić wrote:

>I was a bit surprised how you managed to have a system user but not
>its home directory. But the incomplete state before (if I'm guessing
>right) could explain this.
>
>Yes, the postinst should be idempotent but it looks like what
>happened to you is not the "usual" case.
>
>Maybe you can try again with
>- apt-get purge bitlbee bitlbee-common
>- apt-get install bitlbee
>?

Interesting. I upgraded my sys, used the same packages (?) and now
it is all right. This error was present 2 months ago but maybe i
missed something in the middle.



Looks like my suspicion about the half-installed package was correct
:)

Anyway, here is the latest log:



Thank you.

Adding system user `bitlbee' (UID 104) ...
Adding new group `bitlbee' (GID 109) ...
Adding new user `bitlbee' (UID 104) with group `bitlbee' ...
Creating home directory `/var/lib/bitlbee/' ...
Starting BitlBee IRC/IM gateway: bitlbee.
Setting up bitlbee (3.0.5-1.1) ...



Ok, I think the summary for now is:
- there are situations where the postinst breaks
- in the "normal" case it works
- so severity normal for this bug report is ok
- and someone should fix it but it's not needed for wheezy

Thanks again,
gregor (not the maintainer, just the uploader of the last NMU)

.''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
: :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/
`. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
`- NP: Funny van Dannen: Moderne Liebe
NP: Police: Don't Stand So Close To Me





To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search