package trousers 0.3.14+fixed1-1build1 failed to install/upgrade: installed trousers package post-installation script subprocess returned error exit status 1

Bug #1763588 reported by Dmitriy Geels on 2018-04-13
116
This bug affects 23 people
Affects Status Importance Assigned to Milestone
trousers (Debian)
New
Unknown
trousers (Ubuntu)
Undecided
Unassigned

Bug Description

Here is piece of install log:
Setting up trousers (0.3.14+fixed1-1build1) ...
Job for trousers.service failed because the control process exited with error code.
See "systemctl status trousers.service" and "journalctl -xe" for details.
invoke-rc.d: initscript trousers, action "start" failed.
● trousers.service - LSB: starts tcsd
   Loaded: loaded (/etc/init.d/trousers; generated)
   Active: failed (Result: exit-code) since Fri 2018-04-13 13:18:00 +07; 4ms ago
     Docs: man:systemd-sysv-generator(8)
  Process: 10997 ExecStart=/etc/init.d/trousers start (code=exited, status=30)

Apr 13 13:18:00 dmig-Inspiron-5379 trousers[10997]: * Starting Trusted Computing daemon tcsd
Apr 13 13:18:00 dmig-Inspiron-5379 trousers[10997]: /etc/init.d/trousers: 32: [: /dev/tpm0: unexpected operator
Apr 13 13:18:00 dmig-Inspiron-5379 trousers[10997]: * TPM device owner for /dev/tpmrm0 is not 'tss', this can cause problems.
Apr 13 13:18:00 dmig-Inspiron-5379 tcsd[11006]: TCSD TDDL[11006]: TrouSerS ioctl: (25) Inappropriate ioctl for device
Apr 13 13:18:00 dmig-Inspiron-5379 tcsd[11006]: TCSD TDDL[11006]: TrouSerS Falling back to Read/Write device support.
Apr 13 13:18:00 dmig-Inspiron-5379 tcsd[11006]: TCSD TCS[11006]: TrouSerS ERROR: TCS GetCapability failed with result = 0x1e
Apr 13 13:18:00 dmig-Inspiron-5379 trousers[10997]: ...fail!
Apr 13 13:18:00 dmig-Inspiron-5379 systemd[1]: trousers.service: Control process exited, code=exited status=30
Apr 13 13:18:00 dmig-Inspiron-5379 systemd[1]: trousers.service: Failed with result 'exit-code'.
Apr 13 13:18:00 dmig-Inspiron-5379 systemd[1]: Failed to start LSB: starts tcsd.

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: trousers 0.3.14+fixed1-1build1
Uname: Linux 4.16.2-041602-generic x86_64
ApportVersion: 2.20.9-0ubuntu4
Architecture: amd64
Date: Fri Apr 13 13:17:20 2018
ErrorMessage: installed trousers package post-installation script subprocess returned error exit status 1
InstallationDate: Installed on 2018-03-27 (16 days ago)
InstallationMedia: Ubuntu 18.04 LTS "Bionic Beaver" - Alpha amd64 (20180327)
Python3Details: /usr/bin/python3.6, Python 3.6.5, python3-minimal, 3.6.5-3
PythonDetails: /usr/bin/python2.7, Python 2.7.14+, python-minimal, 2.7.14-4
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu1
 apt 1.6~beta1
SourcePackage: trousers
Title: package trousers 0.3.14+fixed1-1build1 failed to install/upgrade: installed trousers package post-installation script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Dmitriy Geels (dmig) wrote :
Revision history for this message
Dmitriy Geels (dmig) wrote :

This fixes script error:
Apr 13 13:27:13 dmig-Inspiron-5379 trousers[18286]: /etc/init.d/trousers: 32: [: /dev/tpm0: unexpected operator

tags: removed: need-duplicate-check
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-check.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Donal Hunt (donal-hunt) wrote :

The patch does not work if you have more than one TPM device in your machine (I don't know if that is a common thing or not).

sudo systemctl restart trousers.service
Apr 13 13:39:45 CRK-CORP-69 trousers[22117]: Starting Trusted Computing daemon: tcsd/etc/init.d/trousers: 32: [: /dev/tpm0: unexpected operator

$ ls -al /dev/tpm*
crw------- 1 tss tss 10, 224 Apr 13 13:27 /dev/tpm0
crw------- 1 tss tss 253, 65536 Apr 9 10:01 /dev/tpmrm0

Revision history for this message
Dmitriy Geels (dmig) wrote :

Donal don't write such silly things. This patch is intended to fix that behavior.

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

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

Changed in trousers (Ubuntu):
status: New → Confirmed
Changed in trousers (Debian):
status: Unknown → New
Revision history for this message
Maxim Reznik (reznikmm) wrote :

I have in the /etc/init.d/trousers this:

  [ ! -e /dev/tpm* ]

And it still gets errors like:
/etc/init.d/trousers: 32: [: /dev/tpm0: unexpected operator

Because there are two such files in /dev:

# ls /dev/tpm*
/dev/tpm0 /dev/tpmrm0

Revision history for this message
kay (kay-diam) wrote :

This should work:

  if [ ! -e /dev/tpm? ]

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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