[SRU] package gammu-smsd 1.41.0-1 failed to install/upgrade: installed gammu-smsd package post-installation script subprocess returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gammu (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
In Progress
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[ Impact ]
gammu-smsd is completely unusable. The systemd service will fail to start after installation.
invoke-rc.d: initscript gammu-smsd, action "start" failed.
● gammu-smsd.service - SMS daemon for Gammu
Loaded: bad-setting (Reason: Unit gammu-smsd.service has a bad unit file setting.)
Active: inactive (dead)
Docs: man:gammu-smsd(1)
Aug 08 23:59:10 focal systemd[1]: /lib/systemd/
Aug 08 23:59:10 focal systemd[1]: gammu-smsd.service: Unit configuration has fatal error, unit will not be started.
Aug 08 23:59:10 focal systemd[1]: /lib/systemd/
Aug 08 23:59:10 focal systemd[1]: gammu-smsd.service: Unit configuration has fatal error, unit will not be started.
Aug 08 23:59:10 focal systemd[1]: /lib/systemd/
Aug 08 23:59:10 focal systemd[1]: gammu-smsd.service: Unit configuration has fatal error, unit will not be started.
dpkg: error processing package gammu-smsd (--configure):
installed gammu-smsd package post-installation script subprocess returned error exit status 1
An attempt to start it manually also fails.
$ sudo systemctl start gammu-smsd
Failed to start gammu-smsd.service: Unit gammu-smsd.service has a bad unit file setting.
See system logs and 'systemctl status gammu-smsd.service' for details.
$ sudo systemctl status gammu-smsd
● gammu-smsd.service - SMS daemon for Gammu
Loaded: bad-setting (Reason: Unit gammu-smsd.service has a bad unit file setting.)
Active: inactive (dead)
Docs: man:gammu-smsd(1)
Aug 08 23:59:10 focal systemd[1]: /lib/systemd/
Aug 08 23:59:10 focal systemd[1]: gammu-smsd.service: Unit configuration has fatal error, unit will not be started.
Aug 08 23:59:10 focal systemd[1]: /lib/systemd/
Aug 08 23:59:10 focal systemd[1]: gammu-smsd.service: Unit configuration has fatal error, unit will not be started.
Aug 08 23:59:10 focal systemd[1]: /lib/systemd/
Aug 08 23:59:10 focal systemd[1]: gammu-smsd.service: Unit configuration has fatal error, unit will not be started.
Aug 08 23:59:10 focal systemd[1]: /lib/systemd/
Aug 08 23:59:10 focal systemd[1]: gammu-smsd.service: Unit configuration has fatal error, unit will not be started.
To make matters worse any user who has installed gammu-smsd will be unable to uninstall or upgrade as the prerm script will fail. More details about it in the "Other Info" section.
[ Test Plan ]
1.
install gammu-smsd
Use "systemctl status gammu-smsd" to check the systemd service started.
Note: It will still fail if the device is not connected but atleast the service should start and then fail with an error code if the device is not present.
2. Test upgrade
Use a Jammy system
Add Focal to apt sources (not a proper way, but worked as a quick upgrade test in this case)
"sudo apt install gammu-smsd -t focal", confirm we have a broken systemd service
upgrade to this SRU version, confirm systemd service is not broken anymore.
"sudo apt install gammu-smsd" which will install gammu-smsd from Jammy.
[ Where problems could occur ]
There is no change in code. The change in the d/rules has been taken from Jammy which forces cmake to install the service file. There should not be any regression due to this change. But a prerm file had to be added which might cause some problem. But even then the user will not see any new regression as gammu-smsd.service does not even start at the moment.
[ Other Info ]
1)
When the user attempts to upgrade the packge, the prerm of the old package will be executed which will attempt to stop the gammu-smsd.service but since the service file is invalid so that fails and eventually the upgrade fails. So, an extra prerm had to added in this SRU which will 'sed' to fix the invalid service file and then the normal upgrade process will take over.
Without the extra prerm, the package upgrade fails with:
Preparing to unpack .../gammu-
Failed to stop gammu-smsd.service: Unit gammu-smsd.service not loaded.
invoke-rc.d: initscript gammu-smsd, action "stop" failed.
dpkg: warning: old gammu-smsd package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
Failed to stop gammu-smsd.service: Unit gammu-smsd.service not loaded.
invoke-rc.d: initscript gammu-smsd, action "stop" failed.
dpkg: error processing archive /home/sudip/
new gammu-smsd package pre-removal script subprocess returned error exit status 1
With the prerm added, the upgrade works:
Preparing to unpack .../gammu-
Failed to stop gammu-smsd.service: Unit gammu-smsd.service not loaded.
invoke-rc.d: initscript gammu-smsd, action "stop" failed.
dpkg: warning: old gammu-smsd package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
dpkg: ... it looks like that went OK
Unpacking gammu-smsd (1.41.0-1ubuntu0.1) over (1.41.0-1) ...
2) The service file is installed in "/lib/systemd/
E: gammu-smsd: systemd-
N:
N: The package ships a systemd service file outside /lib/systemd/
N:
N: Systemd in Debian searches for unit files in /lib/systemd/
N: /etc/systemd/
N: /usr/lib/
[ Original Bug Description ]
See system logs and 'systemctl status gammu-smsd.service' for details.
invoke-rc.d: initscript gammu-smsd, action "start" failed.
● gammu-smsd.service - SMS daemon for Gammu
Loaded: bad-setting (Reason: Unit gammu-smsd.service has a bad unit file setting.)
Active: inactive (dead)
Docs: man:gammu-smsd(1)
May 11 10:43:54 BadAss systemd[1]: /lib/systemd/
May 11 10:43:54 BadAss systemd[1]: gammu-smsd.service: Unit configuration has fatal error, unit will not be started.
May 11 10:43:54 BadAss systemd[1]: /lib/systemd/
May 11 10:43:54 BadAss systemd[1]: gammu-smsd.service: Unit configuration has fatal error, unit will not be started.
May 11 10:43:55 BadAss systemd[1]: /lib/systemd/
May 11 10:43:55 BadAss systemd[1]: gammu-smsd.service: Unit configuration has fatal error, unit will not be started.
dpkg: error processing package gammu-smsd (--configure):
installed gammu-smsd package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (245.4-4ubuntu3) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
Errors were encountered while processing:
gammu-smsd
E: Sub-process /usr/bin/dpkg returned an error code (1)
ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: gammu-smsd 1.41.0-1
ProcVersionSign
Uname: Linux 5.4.0-28-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckR
Date: Mon May 11 10:43:55 2020
ErrorMessage: installed gammu-smsd package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2020-04-30 (11 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Release amd64 (20200423)
Python3Details: /usr/bin/python3.8, Python 3.8.2, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageV
dpkg 1.19.7ubuntu3
apt 2.0.2
SourcePackage: gammu
Title: package gammu-smsd 1.41.0-1 failed to install/upgrade: installed gammu-smsd package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)
tags: | removed: need-duplicate-check |
Changed in gammu (Ubuntu Focal): | |
status: | New → In Progress |
Changed in gammu (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in gammu (Ubuntu Jammy): | |
status: | New → Fix Released |
Changed in gammu (Ubuntu Noble): | |
status: | New → Fix Released |
Changed in gammu (Ubuntu Focal): | |
assignee: | nobody → Sudip Mukherjee (sudipmuk) |
summary: |
- package gammu-smsd 1.41.0-1 failed to install/upgrade: installed gammu- - smsd package post-installation script subprocess returned error exit - status 1 + [SRU] package gammu-smsd 1.41.0-1 failed to install/upgrade: installed + gammu-smsd package post-installation script subprocess returned error + exit status 1 |
description: | updated |
Status changed to 'Confirmed' because the bug affects multiple users.