motion failed to install/upgrade : chown: invalid group: `motion:motion'

Bug #394755 reported by wrongway
80
This bug affects 19 people
Affects Status Importance Assigned to Milestone
motion (Debian)
Fix Released
Unknown
motion (Ubuntu)
Fix Released
Medium
Unassigned
Karmic
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: motion

when ubuntu upgraded I lost my ATI driver and now motion fails to upgrade

ProblemType: Package
Architecture: i386
DistroRelease: Ubuntu 9.04
ErrorMessage: subprocess post-installation script returned error exit status 1
Package: motion 3.2.11-1ubuntu1
SourcePackage: motion
Title: package motion 3.2.11-1ubuntu1 failed to install/upgrade: subprocess post-installation script returned error exit status 1
Uname: Linux 2.6.28-13-generic i686

DESCRIPTION:
motion failed to install on Karmic with error

chown: invalid group: `motion:motion'
dpkg: error processing motion (--configure):
 subprocess post-installation script returned error exit status 1

when running the post install script and for some reason user 'motion' exists but group 'motion' doesn't

TEST CASE:
# sudo adduser --no-create-home --disabled-password --system --ingroup nogroup motion
Adding system user `motion' (UID 103) ...
Adding new user `motion' (UID 103) with group `nogroup' ...
Not creating home directory `/home/motion'.
# apt-get install motion
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  mysql-client postgresql-client
The following NEW packages will be installed:
  motion
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/293kB of archives.
After this operation, 897kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package motion.
(Reading database ... 202389 files and directories currently installed.)
Unpacking motion (from .../motion_3.2.11-2build1_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up motion (3.2.11-2build1) ...
chown: invalid group: `motion:motion'
dpkg: error processing motion (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 motion
E: Sub-process /usr/bin/dpkg returned an error code (1)
#

FIX :
Submitted to Debian and patch available for Ubuntu motion 3.2.11-2build1
Replace the function 'id' with 'getent' to check if group motion exists.

Revision history for this message
wrongway (resvs8qc) wrote :
Revision history for this message
wolfo (awolf30) wrote :

Hello,
I finally got 'motion' to install without any issues. What I did was Completely Remove 'motion' through Synaptic and reboot the computer. Reopen Synaptic, search for 'motion' and 'Mark for Installation'. Next right-click 'motion' again and highlight 'Mark Suggested for Installation' at the bottom of the menu. Click on anything in the new side menu in black letters ('postgresql-client' was still in black for me). Click on 'Apply' and watch and see if you receive any errors. When I did this, everything installed without any issues. Hope this helps!!!

Wolfo

summary: - motion install trouble
+ motion failed to install/upgrade : chown: invalid group: `motion:motion'
Changed in motion (Ubuntu):
status: New → Confirmed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

The following code in postinst script is buggy and doesn't do what is expected:

=====
add_group_if_missing() {
    if [ -x /usr/sbin/addgroup ]; then
        if ! id -g motion >/dev/null 2>&1; then
                addgroup --force-badname motion || true
        fi
    fi
}
=====

'id -g' returns the effective group id whatever it is. The goal of this function should be to test is the group "motion" exists and create it if it is not the case.

If the group "motion" doesn't exists before the upgrade but the user "motion" does then this function doesn't create the group and the call to "chown motion:motion" fails

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Here is a patch proposal.

Changed in motion (Debian):
status: Unknown → New
description: updated
Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Uploaded. Thank for your contribution.

I've changed the version to ubuntu1, and updated the maintainer in debian/control.

Please take care of that in your next debdiff ;-)

Thanks again,
Fabrice

Changed in motion (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package motion - 3.2.11-2ubuntu1

---------------
motion (3.2.11-2ubuntu1) lucid; urgency=low

  * Fixed debian/motion.postinst : Really test if group "motion" exits
    (LP: #394755)
 -- Jean-Baptiste Lallement <email address hidden> Sat, 21 Nov 2009 22:32:34 +0100

Changed in motion (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Please follow the sru process to get it fixed in Karmic.

Thanks,
Fabrice

Revision history for this message
FAYC (faycpercussion) wrote : Re: [Bug 394755] Re: motion failed to install/upgrade : chown: invalid group: `motion:motion'

Hi Jean Baptiste!

Thanks for your fast and complete reply : I'll check it out when I get a bit
of time for that : It's not my stuff to write command lines, I'm just an
humble artist who try to built medias on my ARTISTX OS (based Ubuntu), and
over all, who want to boycott all Windows ("windaube") & microsoft products.

So I think it will take some time to correct by my own the problem,
following your infos.

But i thank you very much for this good job you did !

Il me semble aussi que tu dois être Français Jean-Baptiste, avec un prénom
et un nom comme le tien : alors à la prochaine et merci encore.

Cordialement,

Franck

Franck Al Yamine Cohendet / FAYCpercussion©

Incrivez-vous à la / Subsribe to / Suscriba a la
Newsletter FAYCpercussion©:
http://www.reverbnation.com/faycpercussion?add_email=true

Site officiel francophone: http://faycpercussion.fr
International official website: http://faycpercussion.com
AkaMusic: http://fr.akamusic.com/faycpercussion
Myspace: http://www.myspace.com/faycpercussion
Reverbnation: http://reverbnation.com/faycpercussion
Facebook: http://www.facebook.com/franckalyamine
Tel GSM : 0033 (0) 621 45 90 69
Tel : 0033 (0) 951 64 75 25
Fax : 0033 (0) 956 64 75 25

FR : Percussion et musiques traditionnelles
(cultures africaine, afro-cubaine, arabe et espagnole),
jazz, et actuelles amplifiées
Spectacles, concerts, stages, cours & séminaires

GB : Traditional musics & percussions
(african, afro-cuban, arabic & spanish cultures),
jazz, and modern music
Shows, concerts, workshops, lessons & seminaries

ES : Percusión y músicas tradicionales
(culturas africana, afro-cubana, árabe y hispánica),
jazz, y músicas actuales amplificadas
Espectáculos, conciertos, talletes, cursos y seminarios

Help save paper - do you really need to print this email?

2009/11/21 Jean-Baptiste Lallement <email address hidden>

> ** Summary changed:
>
> - motion install trouble
> + motion failed to install/upgrade : chown: invalid group: `motion:motion'
>
> ** Changed in: motion (Ubuntu)
> Status: New => Confirmed
>
> --
> motion failed to install/upgrade : chown: invalid group: `motion:motion'
> https://bugs.launchpad.net/bugs/394755
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “motion” package in Ubuntu: Confirmed
>
> Bug description:
> Binary package hint: motion
>
> when ubuntu upgraded I lost my ATI driver and now motion fails to upgrade
>
> ProblemType: Package
> Architecture: i386
> DistroRelease: Ubuntu 9.04
> ErrorMessage: subprocess post-installation script returned error exit
> status 1
> Package: motion 3.2.11-1ubuntu1
> SourcePackage: motion
> Title: package motion 3.2.11-1ubuntu1 failed to install/upgrade: subprocess
> post-installation script returned error exit status 1
> Uname: Linux 2.6.28-13-generic i686
>

Revision history for this message
Fabrice Coutadeur (fabricesp) wrote :

Debdiff for the SRU

Revision history for this message
Martin Pitt (pitti) wrote :

- if ! id -g motion >/dev/null 2>&1; then
+ if [ ! "$(getent group motion)" ]; then

The original command doesn't work of course, but the second looks broken, too: Why do you use $() for grabbing the command output? I think you mean

  if ! getent group motion >/dev/null; then

?

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

You're right Martin. Here is a new version of the patch for lucid.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

And another one for the SRU.

Revision history for this message
Martin Pitt (pitti) wrote :

lucid update sponsored.

Changed in motion (Ubuntu Karmic):
status: New → In Progress
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted motion into karmic-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
FAYC (faycpercussion) wrote : Re: [Bug 394755] Please test proposed package
Download full text (3.5 KiB)

"Accepted motion into karmic-proposed, the package will build now and be
available in a few hours. Please test and give feedback here. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
enable and use -proposed. Thank you in advance!"

Congratulations!!!

it works without any issue : problem fixed

Thanks a lot to all for your contribution

Cheers

Franck Al Yamine Cohendet / FAYCpercussion©

Help save paper - do you really need to print this email?

2009/12/7 Martin Pitt <email address hidden>

> Accepted motion into karmic-proposed, the package will build now and be
> available in a few hours. Please test and give feedback here. See
> https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to
> enable and use -proposed. Thank you in advance!
>
> --
> motion failed to install/upgrade : chown: invalid group: `motion:motion'
> https://bugs.launchpad.net/bugs/394755
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “motion” package in Ubuntu: Fix Released
> Status in “motion” source package in Karmic: Fix Committed
> Status in “motion” package in Debian: New
>
> Bug description:
> Binary package hint: motion
>
> when ubuntu upgraded I lost my ATI driver and now motion fails to upgrade
>
> ProblemType: Package
> Architecture: i386
> DistroRelease: Ubuntu 9.04
> ErrorMessage: subprocess post-installation script returned error exit
> status 1
> Package: motion 3.2.11-1ubuntu1
> SourcePackage: motion
> Title: package motion 3.2.11-1ubuntu1 failed to install/upgrade: subprocess
> post-installation script returned error exit status 1
> Uname: Linux 2.6.28-13-generic i686
>
> DESCRIPTION:
> motion failed to install on Karmic with error
>
> chown: invalid group: `motion:motion'
> dpkg: error processing motion (--configure):
> subprocess post-installation script returned error exit status 1
>
> when running the post install script and for some reason user 'motion'
> exists but group 'motion' doesn't
>
> TEST CASE:
> # sudo adduser --no-create-home --disabled-password --system --ingroup
> nogroup motion
> Adding system user `motion' (UID 103) ...
> Adding new user `motion' (UID 103) with group `nogroup' ...
> Not creating home directory `/home/motion'.
> # apt-get install motion
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Suggested packages:
> mysql-client postgresql-client
> The following NEW packages will be installed:
> motion
> 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
> Need to get 0B/293kB of archives.
> After this operation, 897kB of additional disk space will be used.
> Preconfiguring packages ...
> Selecting previously deselected package motion.
> (Reading database ... 202389 files and directories currently installed.)
> Unpacking motion (from .../motion_3.2.11-2build1_i386.deb) ...
> Processing triggers for man-db ...
> Processing triggers for ureadahead ...
> Setting up motion (3.2.11-2build1) ...
> chown: invalid group: `motion:motion'
> dpkg: error processing motion (--configure):
> subprocess installed post-installation script returned error exit status 1
> Errors ...

Read more...

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
BART (bart190e)
Changed in motion (Ubuntu):
status: Fix Released → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

motion (3.2.11-2ubuntu2) lucid; urgency=low

  * debian/motion.postinst : use getent return code instead of command output

 -- Jean-Baptiste Lallement <email address hidden> Mon, 30 Nov 2009 21:53:28 +0100

Changed in motion (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package motion - 3.2.11-2ubuntu0.1

---------------
motion (3.2.11-2ubuntu0.1) karmic-proposed; urgency=low

  * Fixed debian/motion.postinst : Really test if group "motion" exits
    (LP: #394755)
 -- Jean-Baptiste Lallement <email address hidden> Sat, 21 Nov 2009 22:32:34 +0100

Changed in motion (Ubuntu Karmic):
status: Fix Committed → Fix Released
Changed in motion (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.