[SRU] package timidity-daemon 2.14.0-8ubuntu1 failed to install/upgrade: installed timidity-daemon package post-installation script subprocess returned error exit status 5

Bug #2049243 reported by Seiichi Nakashima
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
timidity (Debian)
Fix Released
Unknown
timidity (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

timidity-daemon is completely unusable as it will even fail to install with the following error:

Failed to stop timidity.service: Unit timidity.service not loaded.
invoke-rc.d: initscript timidity, action "stop" failed.
dpkg: error processing package timidity-daemon (--configure):
 installed timidity-daemon package post-installation script subprocess returned error exit status 5

[ Test Plan ]

* Install timidity-daemon, it will fail to install if its not fixed.
* With the fixed package, timidity-daemon will be installed

[ Where problems could occur ]

Its only installing the init scripts links before trying to stop it. Since there is no change in code, so the chances of regression is very less.

[ Other Info ]

 * It has been fixed in Debian by timidity/2.14.0-8.1.

[ Original Bug Description ]

wine 8.02 not work
Failed to stop timidity.service: Unit timidity.service not loaded.
invoke-rc.d: initscript timidity, action "stop" failed.
 installed timidity-daemon package post-installation script subprocess returned
error exit status 5

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: timidity-daemon 2.14.0-8ubuntu1
ProcVersionSignature: Ubuntu 6.5.0-14.14~22.04.1-generic 6.5.3
Uname: Linux 6.5.0-14-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
AptOrdering:
 timidity-daemon:amd64: Install
 NULL: ConfigurePending
Architecture: amd64
CasperMD5CheckResult: pass
Date: Sat Jan 13 09:55:30 2024
ErrorMessage: installed timidity-daemon package post-installation script subprocess returned error exit status 5
InstallationDate: Installed on 2023-03-08 (310 days ago)
InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223)
PackageArchitecture: all
Python3Details: /usr/bin/python3.10, Python 3.10.12, python3-minimal, 3.10.6-1~22.04
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.2
 apt 2.4.11
SourcePackage: timidity
Title: package timidity-daemon 2.14.0-8ubuntu1 failed to install/upgrade: installed timidity-daemon package post-installation script subprocess returned error exit status 5
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I can reproduce the issue in Jammmy, and have also tested and confirmed that its not affecting Focal or Mantic.

Changed in timidity (Ubuntu):
assignee: nobody → Sudip Mukherjee (sudipmuk)
Changed in timidity (Debian):
status: Unknown → Fix Released
Changed in timidity (Ubuntu Jammy):
status: New → In Progress
assignee: nobody → Sudip Mukherjee (sudipmuk)
Changed in timidity (Ubuntu):
assignee: Sudip Mukherjee (sudipmuk) → nobody
status: New → Fix Released
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

debdiff for Jammy attached.

summary: - package timidity-daemon 2.14.0-8ubuntu1 failed to install/upgrade:
+ [SRU] package timidity-daemon 2.14.0-8ubuntu1 failed to install/upgrade:
installed timidity-daemon package post-installation script subprocess
returned error exit status 5
description: updated
Changed in timidity (Ubuntu Jammy):
status: In Progress → Confirmed
assignee: Sudip Mukherjee (sudipmuk) → nobody
Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :

thank you.

I reinstall timidity on ubuntu-22.04.3, but not work again.

I install timidity to use apt-get install timidity.
how do I apply patch?

Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :

I did these step that ubuntu 20.04 work fine.
but ubuntu 22.04 do not work.

$ LANG=C

$ sudo apt-get -y install timidity
[sudo] password for
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  fluid-soundfont-gm
Suggested packages:
  fluid-soundfont-gs freepats pmidi timidity-daemon
The following NEW packages will be installed:
  fluid-soundfont-gm timidity
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 130 MB of archives.
After this operation, 150 MB of additional disk space will be used.
Get:1 http://ftp.riken.jp/Linux/ubuntu jammy/universe amd64 fluid-soundfont-gm all 3.1-5.3 [130 MB]
Get:2 http://ftp.riken.jp/Linux/ubuntu jammy/universe amd64 timidity amd64 2.14.0-8ubuntu1 [683 kB]
Fetched 130 MB in 13s (10.0 MB/s)
Selecting previously unselected package fluid-soundfont-gm.
(Reading database ... 210432 files and directories currently installed.)
Preparing to unpack .../fluid-soundfont-gm_3.1-5.3_all.deb ...
Unpacking fluid-soundfont-gm (3.1-5.3) ...
Selecting previously unselected package timidity.
Preparing to unpack .../timidity_2.14.0-8ubuntu1_amd64.deb ...
Unpacking timidity (2.14.0-8ubuntu1) ...
Setting up timidity (2.14.0-8ubuntu1) ...
Setting up fluid-soundfont-gm (3.1-5.3) ...
update-alternatives: using /usr/share/sounds/sf2/FluidR3_GM.sf2 to provide /usr/share/sounds/sf2/default-GM.sf2 (default-GM.sf2) in auto mode
update-alternatives: using /usr/share/sounds/sf2/FluidR3_GM.sf2 to provide /usr/share/sounds/sf3/default-GM.sf3 (default-GM.sf3) in auto mode
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...

$ aconnect -o
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'

$ echo "timidity -iAD -B2,8 -Os1l -s 44100 -x'soundfont /usr/share/midi/sf2/mypatches.sf2 order=1'" >> .profile

$ reboot

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

Hi Seiichi Nakashima,

The patch is to fix the "failed to install/upgrade" that you reported originally. I have now created a ppa with this patch. Can you please test the package from the ppa..

The instructions to add the ppa:
sudo add-apt-repository ppa:sudipmuk/timidity
sudo apt update
sudo apt-get install timidity

Note: This has a slightly different version than the version mentioned in the patch, so that any stable release from jammy-updates will have priority over the version from ppa.

Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :
Download full text (3.8 KiB)

I use ppa, but timidity do not work as same as ubuntu-20.04.
I use timidity for wine application.

$ LANG=C

$ sudo add-apt-repository ppa:sudipmuk/timidity
リポジトリ: 'deb https://ppa.launchpadcontent.net/sudipmuk/timidity/ubuntu/ jammy main'
より詳しい情報: https://launchpad.net/~sudipmuk/+archive/ubuntu/timidity
リポジトリを追加しています。
続けるには「Enter」キーを、中止するにはCtrl-cを押してください。
Adding deb entry to /etc/apt/sources.list.d/sudipmuk-ubuntu-timidity-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/sudipmuk-ubuntu-timidity-jammy.list
Adding key to /etc/apt/trusted.gpg.d/sudipmuk-ubuntu-timidity.gpg with fingerprint 47DF41F9326C826108F6155EE29259627BAE58E8
Hit:1 http://ftp.riken.jp/Linux/ubuntu jammy InRelease
Hit:2 http://ftp.riken.jp/Linux/ubuntu jammy-updates InRelease
Hit:3 http://ftp.riken.jp/Linux/ubuntu jammy-backports InRelease
Hit:4 http://ftp.riken.jp/Linux/ubuntu jammy-security InRelease
Get:5 https://ppa.launchpadcontent.net/sudipmuk/timidity/ubuntu jammy InRelease [18.0 kB]
Get:6 https://ppa.launchpadcontent.net/sudipmuk/timidity/ubuntu jammy/main amd64 Packages [1,344 B]
Get:7 https://ppa.launchpadcontent.net/sudipmuk/timidity/ubuntu jammy/main i386 Packages [752 B]
Get:8 https://ppa.launchpadcontent.net/sudipmuk/timidity/ubuntu jammy/main Translation-en [1,084 B]
Fetched 21.2 kB in 2s (8,782 B/s)
Reading package lists... Done

$ sudo apt update
Hit:1 http://ftp.riken.jp/Linux/ubuntu jammy InRelease
Hit:2 http://ftp.riken.jp/Linux/ubuntu jammy-updates InRelease
Hit:3 http://ftp.riken.jp/Linux/ubuntu jammy-backports InRelease
Hit:4 http://ftp.riken.jp/Linux/ubuntu jammy-security InRelease
Hit:5 https://ppa.launchpadcontent.net/sudipmuk/timidity/ubuntu jammy InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

$ sudo apt-get -y install timidity
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  fluid-soundfont-gm
Suggested packages:
  fluid-soundfont-gs freepats pmidi timidity-daemon
The following NEW packages will be installed:
  fluid-soundfont-gm timidity
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 130 MB of archives.
After this operation, 150 MB of additional disk space will be used.
Get:1 http://ftp.riken.jp/Linux/ubuntu jammy/universe amd64 fluid-soundfont-gm all 3.1-5.3 [130 MB]
Get:2 https://ppa.launchpadcontent.net/sudipmuk/timidity/ubuntu jammy/main amd64 timidity amd64 2.14.0-8ubuntu1.22.04.1~ppa [698 kB]
Fetched 130 MB in 14s (9,231 kB/s)
Selecting previously unselected package fluid-soundfont-gm.
(Reading database ... 210432 files and directories currently installed.)
Preparing to unpack .../fluid-soundfont-gm_3.1-5.3_all.deb ...
Unpacking fluid-soundfont-gm (3.1-5.3) ...
Selecting previously unselected package timidity.
Preparing to unpack .../timidity_2.14.0-8ubuntu1.22.04.1~ppa_amd64.deb ...
Unpacking timidity (2.14.0-8ubuntu1.22.04.1~ppa) ...
Setting up timidity (2.14.0-8ubuntu1.22.04.1~ppa) ...
Setting up fluid...

Read more...

Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :

timidity command input terminal, then timidity stop.

timidity -iAD -B2,8 -Os1l -s 44100 -x'soundfont /usr/share/midi/sf2/mypatches.sf2 order=1'

https://wiki.winehq.org/MIDI

I read winehq wiki.

and I check to install fluidsynth, but not work too.

Revision history for this message
Julian Andres Klode (juliank) wrote :

This looks reasonable to me, sponsored.

Seiichi, WRT to the issue about it not working after installing, maybe open a separate bug for that so we can keep this one on installability! Thanks!

Changed in timidity (Ubuntu Jammy):
status: Confirmed → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Seiichi, or anyone else affected,

Accepted timidity into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/timidity/2.14.0-8ubuntu1.22.04.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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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 timidity (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :

Thank you

I showed new package at https://launchpad.net/ubuntu/+source/timidity/2.14.0-8ubuntu1.22.04.1
and download timidity_2.14.0-8ubuntu1.22.04.1.debian.tar.xz

xz -dv timidity_2.14.0-8ubuntu1.22.04.1.debian.tar.xz
tar xf timidity_2.14.0-8ubuntu1.22.04.1.debian.tar
cd debian
cat timidity.install

but /usr/bin/dh_exec, maybe dh_install, I do not use it.
how to update new timidity package.

Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :

Today, I test ubuntu-22.04.4 + wine + timidity, but do not work, midi no sound

(1) timidity setup

sudo apt update
sudo apt-get -y install timidity

and this command set into ~/.profile

timidity -iAD -B2,8 -Os1l -s 44100 -x'soundfont /usr/share/midi/sf2/mypatches.sf2 order=1'

(2) wine setup

sudo dpkg --add-architecture i386
sudo apt update
sudo apt -y install wine32
wine --version
winecfg

I user windows98

and also setup winetricks for fonts install.

sudo apt -y install winetricks

(3) win98 PC game install and run

display log

0100:err:ntdll:RtlpWaitForCriticalSection section 66444940 "dlls/krnl386.exe16/syslevel.c: Win16Mutex" wait timed out in thread 0100, blocked by 0104, retrying (60 sec)

$ aconnect -o
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 128: 'WINE midi driver' [type=user,pid=3077]
    1 'WINE ALSA Input '

and stop game

$ aconnect -o
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'

Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :

also ubuntu-20.04 + wine + timidity information.
it work fine.

running game

$ aconnect -o
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 128: 'TiMidity' [type=user,pid=1729]
    0 'TiMidity port 0 '
    1 'TiMidity port 1 '
    2 'TiMidity port 2 '
    3 'TiMidity port 3 '

stop game

$ aconnect -o
client 14: 'Midi Through' [type=kernel]
    0 'Midi Through Port-0'
client 128: 'TiMidity' [type=user,pid=1729]
    0 'TiMidity port 0 '
    1 'TiMidity port 1 '
    2 'TiMidity port 2 '
    3 'TiMidity port 3 '

Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :

I investigate mypathes.sf2 that is written in wine wiki.

timidity -iAD -B2,8 -Os1l -s 44100 -x'soundfont /usr/share/midi/sf2/mypatches.sf2 order=1'

https://wiki.winehq.org/MIDI

/usr/share/midi/sf2/mypatches.sf2 is nothing in my PC.
then I rewirte timidity command as below using ubuntu-20.04.6 environment

timidity -iAD -B2,8 -Os1l -s 44100

then work fine.
so I update ubuntu-22.04.4 environment, but do not work too.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I can confirm that the timidity-daemon package in jammy-proposed has fixed the bug for me.

Test done:
1. Try installing timidity-daemon on a jammy installation and it failed to install.
2. Add jammy-proposed to apt sources
4. Upgrade timidity-daemon from jammy-proposed and it installed without any failure.
5. Check service status as a basic test

$ systemctl status timidity.service
● timidity.service - LSB: start and stop timidity
     Loaded: loaded (/etc/init.d/timidity; generated)
     Active: active (exited) since Sun 2024-03-17 22:32:37 GMT; 5s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 3346 ExecStart=/etc/init.d/timidity start (code=exited, status=0/SUCCESS)
        CPU: 56ms

Mar 17 22:32:37 sudip-Standard-PC-i440FX-PIIX-1996 systemd[1]: Starting LSB: start and stop timidity...
Mar 17 22:32:37 sudip-Standard-PC-i440FX-PIIX-1996 timidity[3346]: * Starting TiMidity++ ALSA midi emulation timidity
Mar 17 22:32:37 sudip-Standard-PC-i440FX-PIIX-1996 timidity[3346]: ...done.
Mar 17 22:32:37 sudip-Standard-PC-i440FX-PIIX-1996 systemd[1]: Started LSB: start and stop timidity.

Test result: the errors with timidity-daemon has been fixed.

$ apt-cache policy timidity-daemon
timidity-daemon:
  Installed: 2.14.0-8ubuntu1.22.04.1
  Candidate: 2.14.0-8ubuntu1.22.04.1
  Version table:
 *** 2.14.0-8ubuntu1.22.04.1 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy-proposed/universe amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu jammy-proposed/universe i386 Packages
        100 /var/lib/dpkg/status
     2.14.0-8ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu jammy/universe amd64 Packages
        500 http://gb.archive.ubuntu.com/ubuntu jammy/universe i386 Packages

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :

Has a revised version been released?
Today I reinstall ubuntu-22.04.4 + wine + timidity,
but not work too.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote (last edit ):

Hi Seiichi,
Thanks for confirming that you can now install timidity-daemon. Which means the reported bug about failing to install is fixed with the package in -proposed.

After your comment I wanted to check if timidity is working or not, so I followed the steps at https://wiki.archlinux.org/title/Timidity++ and confirmed that Timidity is working in standalone mode and also in Daemon mode.

If its not working with wine then I think, same as Julian suggested, you need to open another bug with the details and any log you might have for that. I can not use this bug to check for something else.

@Release-Team: fyi, additional test has been done as mentioned in this comment.

Revision history for this message
Seiichi Nakashima (ubuntu-linuxer) wrote :

Thank you.

By changing the steps below, I was able to play midi on the game on wine.

from: timidity -iAD -B2,8 -Os1l -s 44100
to: timidity -iA &

However, I am not satisfied with the wine game sound on ubuntu-22.04.4 overall.
The sound is distorted in parts other than midi and does not sound like ubuntu-20.04.
I don't think this is a timidity issue.

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

This bug was fixed in the package timidity - 2.14.0-8ubuntu1.22.04.1

---------------
timidity (2.14.0-8ubuntu1.22.04.1) jammy; urgency=medium

  * d/timidity-daemon.postinst: Fix fails to install: invoke update-rc.d
    before invoke-rc.d (LP: #2049243)

 -- Sudip Mukherjee <email address hidden> Fri, 09 Feb 2024 21:38:47 +0000

Changed in timidity (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for timidity 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.

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.