touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #94770
[Bug 1372051] Re: ntp postinst user/group add commands are not idempotent
addgroup is a perl script, so you can inspect it to see what's going on.
You can get additional information about the error running with:
sudo VERBOSE=1 addgroup --system ntp
I think what we're seeing is that your ntp group is a user group (gid >=
1000) instead of a system group (gid < 1000).
>From your output above, it looks like you're hitting this logic:
if ($action eq "addsysgroup") {
# Check if requested group already exists and we can exit safely
my $ret = existing_group_ok($new_name, $new_gid);
if ($ret == 3) {
print STDERR "$0: " if $verbose;
printf STDERR (gtx("The group `%s' already exists as a system group. Exiting.\n"), $new_name) if $verbose;
exit RET_OK;
}
if ($ret == 1) {
print STDERR "$0: " if $verbose;
printf STDERR (gtx("The group `%s' already exists and is not a system group. Exiting.\n"), $new_name) if $verbose;
exit RET_OBJECT_ALREADY_EXISTS;
}
So, you're exiting 1 due to the gid of group ntp being > 1000. The fix here would be to apt-get remove --purge ntp ; the --purge flag will trigger the ntp.postrm script to remove the group first. Then when you re-install, it will install the ntp group with --system flag and allocate a GID under <1000.
See if that helps you moving forward.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ntp in Ubuntu.
https://bugs.launchpad.net/bugs/1372051
Title:
ntp postinst user/group add commands are not idempotent
Status in ntp package in Ubuntu:
Incomplete
Bug description:
At do release upgrade from 12.04.05 to 14.04.01, the ntp package failed:
Errors were encountered while processing:
ntp
Error in function:
A fatal error occurred
Please report this as a bug and include the files
/var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in
your report. The upgrade has aborted.
Your original sources.list was saved in
/etc/apt/sources.list.distUpgrade.
SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)
Could not install the upgrades
The upgrade has aborted. Your system could be in an unusable state. A
recovery will run now (dpkg --configure -a).
Please report this bug in a browser at
http://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+filebug
and attach the files in /var/log/dist-upgrade/ to the bug report.
installArchives() failed
Setting up ntp (1:4.2.6.p5+dfsg-3ubuntu2) ...
dpkg: error processing package ntp (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
ntp
Upgrade complete
The upgrade has completed but there were errors during the upgrade
process.
In /var/lib/dpkg/info/ntp.postinst the add group / adduser commands fail due to already existing group / user.
Appended “ || /bin/true” to those lines, and “dpkg —configure ntp” succeeded.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ntp/+bug/1372051/+subscriptions
Follow ups