Page MenuHomePhabricator

debian-glue errors out with: hooks/B90lintian: line 21: realpath: command not found
Closed, ResolvedPublic

Description

While building the package for operations/software/tools-webservice (https://gerrit.wikimedia.org/r/#/c/430647/) the debian glue job fails to find the package name:

I: user script /srv/pbuilder/build/cow.29670/tmp/hooks/B90lintian starting
+ apt-get -y install lintian
+ lintian --version
Lintian v2.5.22ubuntu1
+++ realpath /tmp/buildd/toollabs-webservice-0.39+0~20180504000124.1185+trusty~1.gbpce2144/debian/..
/tmp/hooks/B90lintian: line 21: realpath: command not found
++ basename ''
+ PACKAGE_NAME=
+ echo 'Found package name: '
Found package name: 
+ lintian_out=/tmp/buildd/.lintian.txt

Eventually the Jenkins job fails to find a lintian.txt file and errors out:

[debian-glue] $ /bin/bash -xe /tmp/jenkins1156461214733163554.sh
+ suffix=.lintian.txt
+ for x in '*$suffix'
+ echo 'Converting lintian file *.lintian.txt'
Converting lintian file *.lintian.txt
+ cat '*.lintian.txt'
cat: *.lintian.txt: No such file or directory
Build step 'Execute shell' marked build as failure

/usr/bin/realpath is provided by coreutils and is not a build dependency of operations/software/tools-webservice.

See:

https://github.com/mika/jenkins-debian-glue/pull/193#pullrequestreview-117716778

Event Timeline

Change 430976 had a related patch set uploaded (by Hashar; owner: Hashar):
[operations/software/tools-webservice@master] (DO NOT SUBMIT) Test with builddep 'coreutils'

https://gerrit.wikimedia.org/r/430976

Change 430976 abandoned by Hashar:
(DO NOT SUBMIT) Test with builddep 'coreutils'

https://gerrit.wikimedia.org/r/430976

Replacing realpath with a pure shell construct is probably the easiest fix. Something like https://github.com/mkropat/sh-realpath/blob/master/realpath.sh#L64-L69 can probably be made to work.

Change 430979 had a related patch set uploaded (by Hashar; owner: Hashar):
[operations/debs/jenkins-debian-glue@debian/jessie-wikimedia] 0.18.4-wmf3: fix B90lintian hook not finding the package name.

https://gerrit.wikimedia.org/r/430979

Change 430976 restored by Hashar:
(DO NOT SUBMIT) Test with builddep 'coreutils'

https://gerrit.wikimedia.org/r/430976

Change 430976 abandoned by Hashar:
(DO NOT SUBMIT) Test with builddep 'coreutils'

https://gerrit.wikimedia.org/r/430976

Change 430979 merged by jenkins-bot:
[operations/debs/jenkins-debian-glue@debian/jessie-wikimedia] 0.18.4-wmf3: fix B90lintian hook not finding the package name.

https://gerrit.wikimedia.org/r/430979

hashar claimed this task.

I have updated the Github pull request. Build the Debian package to incorporate the fix and deployed it on the CI slaves that run the debian glue job.

The package will be uploaded to apt.wikimedia.org via T193910

Vvjjkkii renamed this task from debian-glue errors out with: hooks/B90lintian: line 21: realpath: command not found to 1kdaaaaaaa.Jul 1 2018, 1:11 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed hashar as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from 1kdaaaaaaa to debian-glue errors out with: hooks/B90lintian: line 21: realpath: command not found.Jul 2 2018, 4:27 PM
CommunityTechBot closed this task as Resolved.
CommunityTechBot raised the priority of this task from High to Needs Triage.