Bug 1773629 - rpmlint failed on kata-osbuilder package
Summary: rpmlint failed on kata-osbuilder package
Alias: None
Product: Fedora
Classification: Fedora
Component: kata-osbuilder
Version: 32
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Eduardo Lima (Etrunko)
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-11-18 15:16 UTC by Christophe de Dinechin
Modified: 2021-05-28 13:55 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-05-25 15:10:53 UTC
Type: Bug

Attachments (Terms of Use)

Description Christophe de Dinechin 2019-11-18 15:16:31 UTC
Several errors reported here: https://taskotron.fedoraproject.org/artifacts/all/aa9cf96a-07c0-11ea-8c8e-52540077ca13/tests.yml/kata-osbuilder-1.9.0-2.fc31.log.

Some are bogus (e.g. warning on "initrd" misspelling, with suggestion as "trinity" ;-)

I'm more concerned about those flagged as "E":

rpmlint FAILED for kata-osbuilder-1.9.0-2.fc31 (x86_64, noarch, src): 8 errors, 32 warnings

##### SRPMs #####
kata-osbuilder.src: W: spelling-error Summary(en_US) initrd -> trinity
kata-osbuilder.src: W: spelling-error %description -l en_US initrd -> trinity
kata-osbuilder.src: W: strange-permission fedora-kata-osbuilder.sh 755
kata-osbuilder.src:60: W: unversioned-explicit-provides bundled(golang(github.com/docker/docker/pkg/parsers))
kata-osbuilder.src:61: W: unversioned-explicit-provides bundled(golang(github.com/gogo/protobuf/gogoproto))
kata-osbuilder.src:62: W: unversioned-explicit-provides bundled(golang(github.com/gogo/protobuf/proto))
kata-osbuilder.src:63: W: unversioned-explicit-provides bundled(golang(github.com/gogo/protobuf/types))
kata-osbuilder.src:64: W: unversioned-explicit-provides bundled(golang(github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc))
kata-osbuilder.src:65: W: unversioned-explicit-provides bundled(golang(github.com/hashicorp/yamux))
kata-osbuilder.src:66: W: unversioned-explicit-provides bundled(golang(github.com/mdlayher/vsock))
kata-osbuilder.src:67: W: unversioned-explicit-provides bundled(golang(github.com/opencontainers/runc/libcontainer))
kata-osbuilder.src:68: W: unversioned-explicit-provides bundled(golang(github.com/opencontainers/runc/libcontainer/configs))
kata-osbuilder.src:69: W: unversioned-explicit-provides bundled(golang(github.com/opencontainers/runc/libcontainer/nsenter))
kata-osbuilder.src:70: W: unversioned-explicit-provides bundled(golang(github.com/opencontainers/runc/libcontainer/seccomp))
kata-osbuilder.src:71: W: unversioned-explicit-provides bundled(golang(github.com/opencontainers/runc/libcontainer/specconv))
kata-osbuilder.src:72: W: unversioned-explicit-provides bundled(golang(github.com/opencontainers/runc/libcontainer/utils))
kata-osbuilder.src:73: W: unversioned-explicit-provides bundled(golang(github.com/opencontainers/runtime-spec/specs-go))
kata-osbuilder.src:74: W: unversioned-explicit-provides bundled(golang(github.com/opentracing/opentracing-go))
kata-osbuilder.src:75: W: unversioned-explicit-provides bundled(golang(github.com/pkg/errors))
kata-osbuilder.src:76: W: unversioned-explicit-provides bundled(golang(github.com/sirupsen/logrus))
kata-osbuilder.src:77: W: unversioned-explicit-provides bundled(golang(github.com/uber/jaeger-client-go/config))
kata-osbuilder.src:78: W: unversioned-explicit-provides bundled(golang(github.com/vishvananda/netlink))
kata-osbuilder.src:79: W: unversioned-explicit-provides bundled(golang(golang.org/x/net/context))
kata-osbuilder.src:80: W: unversioned-explicit-provides bundled(golang(golang.org/x/sys/unix))
kata-osbuilder.src:81: W: unversioned-explicit-provides bundled(golang(google.golang.org/grpc))
kata-osbuilder.src:82: W: unversioned-explicit-provides bundled(golang(google.golang.org/grpc/codes))
kata-osbuilder.src:83: W: unversioned-explicit-provides bundled(golang(google.golang.org/grpc/status))
kata-osbuilder.src:121: E: use-of-RPM_SOURCE_DIR
kata-osbuilder.src:161: W: macro-in-%changelog %post
1 packages and 0 specfiles checked; 1 errors, 28 warnings.

##### RPMs  #####
kata-osbuilder.x86_64: W: spelling-error Summary(en_US) initrd -> trinity
kata-osbuilder.x86_64: W: spelling-error %description -l en_US initrd -> trinity
kata-osbuilder.x86_64: W: unstripped-binary-or-object /usr/libexec/kata-containers/osbuilder/agent/kata-agent
kata-osbuilder.x86_64: W: devel-file-in-non-devel-package /usr/libexec/kata-containers/osbuilder/image-builder/nsdax.gpl.c
kata-osbuilder.x86_64: E: version-control-internal-file /usr/libexec/kata-containers/osbuilder/rootfs-builder/.gitignore
kata-osbuilder.x86_64: E: non-executable-script /usr/libexec/kata-containers/osbuilder/rootfs-builder/alpine/rootfs_lib.sh 644 /bin/bash 
kata-osbuilder.x86_64: E: wrong-script-interpreter /usr/libexec/kata-containers/osbuilder/rootfs-builder/suse/install-packages.sh /usr/bin/env bash
kata-osbuilder.x86_64: E: non-executable-script /usr/libexec/kata-containers/osbuilder/rootfs-builder/suse/install-packages.sh 644 /usr/bin/env bash
kata-osbuilder.x86_64: E: wrong-script-interpreter /usr/libexec/kata-containers/osbuilder/scripts/install-yq.sh /usr/bin/env bash
kata-osbuilder.x86_64: E: non-executable-script /usr/libexec/kata-containers/osbuilder/scripts/install-yq.sh 644 /usr/bin/env bash
kata-osbuilder.x86_64: E: non-executable-script /usr/libexec/kata-containers/osbuilder/scripts/lib.sh 644 /bin/bash 
1 packages and 0 specfiles checked; 7 errors, 4 warnings.

RPMs tested:

If you want to whitelist some warnings/errors, see https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#whitelist

Comment 1 Christophe de Dinechin 2019-11-19 13:51:59 UTC
Bogus spelling error fixed by adding a .rpmlintrc

Changed permission of fedora-kata-osbuilder.sh

Added the "unversioned" warnings to rpmlintrc as well, since this is how the bundled(golang(x)) macros work

Use of RPM_SOURCE_DIR fixed by replacing %{_sourcedir}/... with %{SOURCE2}

Removed percent sign in %changelog

Comment 2 Christophe de Dinechin 2019-11-19 13:56:09 UTC
Cole, I changed the permission for fedora-kata-osbuilder.sh from 775 to 755. I assume the 775 was unintentional. If there was a reason for it, please let me know.

Comment 3 Cole Robinson 2019-11-19 15:19:26 UTC
(In reply to Christophe de Dinechin from comment #2)
> Cole, I changed the permission for fedora-kata-osbuilder.sh from 775 to 755.
> I assume the 775 was unintentional. If there was a reason for it, please let
> me know.

Yup I think that's fine, thanks!

Comment 4 Christophe de Dinechin 2019-11-19 15:25:09 UTC
Updated build https://bodhi.fedoraproject.org/updates/FEDORA-2019-cbe192c9ee

This has the fixes from #c1.

Comment 5 Christophe de Dinechin 2019-11-19 15:26:15 UTC
(In reply to Christophe de Dinechin from comment #0)
> kata-osbuilder.x86_64: W: unstripped-binary-or-object
> /usr/libexec/kata-containers/osbuilder/agent/kata-agent

I am not sure why the agent is not stripped.

As far as I can tell from the logs, brp-strip should have done the job. Trying to run the steps manually to understand why it fails to strip kata-agent.

+ cp -a agent-1.9.0/kata-agent.service agent-1.9.0/kata-journald-host-redirect.service agent-1.9.0/kata-containers.target agent-1.9.0/kata-agent /builddir/build/BUILDROOT/kata-osbuilder-1.9.0-3.fc32.x86_64/usr/libexec/kata-containers/osbuilder/agent
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-ldconfig
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip /usr/bin/strip

Comment 6 Christophe de Dinechin 2019-11-19 15:48:18 UTC
(In reply to Christophe de Dinechin from comment #0)
> kata-osbuilder.x86_64: E: wrong-script-interpreter
> /usr/libexec/kata-containers/osbuilder/rootfs-builder/suse/install-packages.sh /usr/bin/env bash
> kata-osbuilder.x86_64: E: wrong-script-interprete
> /usr/libexec/kata-containers/osbuilder/scripts/install-yq.sh /usr/bin/env bash

I also don't understand why those remain.

From the logs, brp-mangle-shebangs has run

+ /usr/lib/rpm/redhat/brp-mangle-shebangs
mangling shebang in /usr/libexec/kata-containers/osbuilder/rootfs-builder/rootfs.sh from /bin/bash to #!/usr/bin/bash
mangling shebang in /usr/libexec/kata-containers/osbuilder/image-builder/image_builder.sh from /usr/bin/env bash to #!/usr/bin/bash
mangling shebang in /usr/libexec/kata-containers/osbuilder/fedora-kata-osbuilder.sh from /bin/bash to #!/usr/bin/bash

but it has skipped a couple of files. Maybe because they were not executable?

The brp-mangle-shebangs script does replace 'env':

  # Replace "special" env shebang:
  # /whatsoever/env /whatever/foo → /whatever/foo
  shebang=$(echo "$shebang" | sed -r -e 's@^(.+)/env /(.+)$@/\2@')
  # /whatsoever/env foo → /whatsoever/foo
  shebang=$(echo "$shebang" | sed -r -e 's@^(.+/)env (.+)$@\1\2@')

  # If the shebang now starts with /bin, change it to /usr/bin
  # https://bugzilla.redhat.com/show_bug.cgi?id=1581757
  shebang=$(echo "$shebang" | sed -r -e 's@^/bin/@/usr/bin/@')

  # Replace ambiguous python with python2

Comment 7 Cole Robinson 2019-11-25 13:13:59 UTC
Clearing needinfo because I forgot to do it in Comment #3

Comment 8 Ben Cotton 2020-02-11 17:44:37 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 9 Fabiano Fidêncio 2021-04-19 06:40:33 UTC

What's the status of this issue?  Is this stale?
Please, take some time and consider whether this should still be opened, testing against kata-containers package, as packages for 1.x will won't be updated after May 12th (as the 1.x project upstream will reach its EOL: http://lists.katacontainers.io/pipermail/kata-dev/2021-April/001843.html)

Best Regards

Comment 10 Christophe de Dinechin 2021-04-19 09:55:09 UTC
A lot has been fixed. There are still a few really minor things:

> rpmlint kata-osbuilder.spec
kata-osbuilder.spec:43: W: macro-in-comment %check
kata-osbuilder.spec:89: E: use-of-RPM_SOURCE_DIR
kata-osbuilder.spec:196: W: macro-in-%changelog %check
0 packages and 1 specfiles checked; 1 errors, 2 warnings.

I will let Eduardo decide what to do with these. Assigning to him.

The error is on:

install -m 0644 -D -t %{buildroot}%{_unitdir} %{_sourcedir}/kata-osbuilder-generate.service

Comment 11 Fedora Program Management 2021-04-29 15:59:56 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Ben Cotton 2021-05-25 15:10:53 UTC
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 13 Christophe de Dinechin 2021-05-26 08:20:35 UTC
kata-osbuilder is obsolete anyway.

Note You need to log in before you can comment on or make changes to this bug.