lirc fails to install because of a missing /etc/lirc/lirc_options.conf - Ubuntu 20.04

Bug #1874130 reported by Mastermolch
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
lirc (Ubuntu)
Fix Released
High
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

* Impact
the lirc package fails to install, the service segfault on start

* Test case
install lirc, the installation shouldn't fail, also the service should correctly start

* Regression potential
the changes are only packaging ones to ensure a configuration is available, check new isntalls and upgrades to make sure the configuration is installed and the service works

------------------

Hello,

I have tried to install lirc on a fresh Kubuntu 20.04 Release Candidate installation on a AMD Athlon X2 system. The installation failed, with a half installed lirc package. This is leaving apt-get / apt in a state, that makes it impossible to install other packages or updates anymore, as it first tries to finish the lirc installation. This is leaving the system in a state, where further software changes or the usage of lirc are not possible.

After using Google to find a solution for the problem, I found this bug report about lirc on Debian bugs website:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932779

The suggested workaround is to creating the file lirc_options.conf and to continue the failed installation (which worked on my system) via:
sudo cp /etc/lirc/lirc_options.conf.dist /etc/lirc/lirc_options.conf
sudo apt-get install lirc
This worked on my installation brought the system back into a state, where further software installations or updates via apt-get / apt work again.

Ubuntu version:
user1@AthlonX2:lsb_release -rd
Description: Ubuntu 20.04 LTS
Release: 20.04

package information:
user1@AthlonX2:/etc/lirc$ apt-cache policy lirc
lirc:
  Installiert: 0.10.1-6.1
  Installationskandidat: 0.10.1-6.1
  Versionstabelle:
 *** 0.10.1-6.1 500
        500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages
        100 /var/lib/dpkg/status

Terminal output during the failing installation via apt-get install:

user1@AthlonX2:/etc/lirc$ LC_ALL=C sudo apt-get install lirc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libftdi1-2 liblirc0
Suggested packages:
  lirc-compat-remotes lirc-drv-irman lirc-doc lirc-x setserial ir-keytable
Recommended packages:
  gir1.2-vte
The following NEW packages will be installed:
  libftdi1-2 liblirc0 lirc
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/571 kB of archives.
After this operation, 2897 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package libftdi1-2:amd64.
(Reading database ... 360984 files and directories currently installed.)
Preparing to unpack .../libftdi1-2_1.4-2build2_amd64.deb ...
Unpacking libftdi1-2:amd64 (1.4-2build2) ...
Selecting previously unselected package liblirc0:amd64.
Preparing to unpack .../liblirc0_0.10.1-6.1_amd64.deb ...
Unpacking liblirc0:amd64 (0.10.1-6.1) ...
Selecting previously unselected package lirc.
Preparing to unpack .../lirc_0.10.1-6.1_amd64.deb ...
Unpacking lirc (0.10.1-6.1) ...
Setting up liblirc0:amd64 (0.10.1-6.1) ...
Setting up libftdi1-2:amd64 (1.4-2build2) ...
Setting up lirc (0.10.1-6.1) ...
Job for lircd.service failed because a fatal signal was delivered causing the control process to dump core.
See "systemctl status lircd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript lircd, action "start" failed.
* lircd.service - Flexible IR remote input/output application support
     Loaded: loaded (/lib/systemd/system/lircd.service; disabled; vendor preset: enabled)
     Active: failed (Result: core-dump) since Tue 2020-04-21 20:05:34 CEST; 16ms ago
TriggeredBy: * lircd.socket
       Docs: man:lircd(8)
             http://lirc.org/html/configure.html
    Process: 12249 ExecStart=/usr/sbin/lircd --nodaemon (code=dumped, signal=SEGV)
   Main PID: 12249 (code=dumped, signal=SEGV)

Apr 21 20:05:33 Madlen-Zimmer systemd[1]: Starting Flexible IR remote input/output application support...
Apr 21 20:05:33 Madlen-Zimmer lircd[12249]: Warning: cannot open /etc/lirc/lirc_options.conf
Apr 21 20:05:33 Madlen-Zimmer lircd-0.10.1[12249]: Info: lircd: Opening log, level: Info
Apr 21 20:05:33 Madlen-Zimmer lircd-0.10.1[12249]: Notice: Version: lircd 0.10.1
Apr 21 20:05:33 Madlen-Zimmer lircd-0.10.1[12249]: Notice: System info: Linux Madlen-Zimmer 5.4.0-25-generic #29-Ubuntu SMP Fri Apr 17 15:06:57 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Apr 21 20:05:34 Madlen-Zimmer systemd[1]: lircd.service: Main process exited, code=dumped, status=11/SEGV
Apr 21 20:05:34 Madlen-Zimmer systemd[1]: lircd.service: Failed with result 'core-dump'.
Apr 21 20:05:34 Madlen-Zimmer systemd[1]: Failed to start Flexible IR remote input/output application support.
dpkg: error processing package lirc (--configure):
 installed lirc package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (245.4-4ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
Errors were encountered while processing:
 lirc
E: Sub-process /usr/bin/dpkg returned an error code (1)
user1@AthlonX2:/etc/lirc$

Terminal output during copying the file and inishing the installation:

user1@AthlonX2:/etc/lirc$ sudo cp /etc/lirc/lirc_options.conf.backup1 /etc/lirc/lirc_options.conf
user1@AthlonX2:/etc/lirc$ sudo apt-get install lirc
Reading package lists... Done
Building dependency tree
Reading state information... Done
lirc is already the newest version (0.10.1-6.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up lirc (0.10.1-6.1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/lircd.service -> /lib/systemd/system/lircd.service.
Created symlink /etc/systemd/system/sockets.target.wants/lircd.socket -> /lib/systemd/system/lircd.socket.
user1@AthlonX2:/etc/lirc$

Greetings
Henry

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lirc (Ubuntu):
status: New → Confirmed
Changed in lirc (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
description: updated
Changed in lirc (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lirc - 0.10.1-6.1ubuntu2

---------------
lirc (0.10.1-6.1ubuntu2) groovy; urgency=medium

  * debian/lirc.postinst:
    - restore the postinst snippet ensuring that the configuration files
      exists. It was removed 0.10.1-5.1 in favor of making those proper
      conffiles but the changes were reverted in 0.10.1-5.2 in an incomplete
      way letting the file without configuration installed which leads to
      the service segfaulting and the install failing (lp: #1874130)

 -- Sebastien Bacher <email address hidden> Fri, 08 May 2020 11:16:15 +0200

Changed in lirc (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Mastermolch, or anyone else affected,

Accepted lirc into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/lirc/0.10.1-6.1ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in lirc (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Sebastien Bacher (seb128) wrote :

Installing 0.10.1-6.1ubuntu1.1 on a focal system works without issue

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lirc - 0.10.1-6.1ubuntu1.1

---------------
lirc (0.10.1-6.1ubuntu1.1) focal; urgency=medium

  * debian/lirc.postinst:
    - restore the postinst snippet ensuring that the configuration files
      exists. It was removed 0.10.1-5.1 in favor of making those proper
      conffiles but the changes were reverted in 0.10.1-5.2 in an incomplete
      way letting the file without configuration installed which leads to
      the service segfaulting and the install failing (lp: #1874130)

 -- Sebastien Bacher <email address hidden> Fri, 08 May 2020 11:23:00 +0200

Changed in lirc (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for lirc has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
^rooker (rooker) wrote :

In case, someone else also runs into this issue on 20.04, make sure you have the "focal-updates" sources enabled.

Check (or add) the following line to your /etc/apt/sources.list:

```
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
```

Thanks for fixing this! :D

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.