Bug 1909767 - Review Request: kata-containers - Open Source Container Runtime Software
Summary: Review Request: kata-containers - Open Source Container Runtime Software
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Christophe de Dinechin
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1894196
TreeView+ depends on / blocked
 
Reported: 2020-12-21 15:04 UTC by Eduardo Lima (Etrunko)
Modified: 2021-03-02 01:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-02 01:51:38 UTC
Type: Bug
Embargoed:
dinechin: fedora-review+


Attachments (Terms of Use)

Description Eduardo Lima (Etrunko) 2020-12-21 15:04:33 UTC
Spec URL: https://etrunko.fedorapeople.org/kata-containers.spec
SRPM URL: https://etrunko.fedorapeople.org/kata-containers-2.0.0-1.fc33.src.rpm
Fedora Account System Username: etrunko
Description: Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs.

Comment 1 Christophe de Dinechin 2021-01-13 10:29:29 UTC
c3d top-level comments:

- A few suggested changes, search for [S] below. Nothing really blocking
- Why do we mark this as conflicting with kata-ksm-throttler?
  I need to check if kata-ksm-throttler is still supposed to work with 2.0
  but I see no reason why not.
- Consider Obsoletes instead of Conflicts for packages such as kata-runtime or
  kata-shim. I will trust your choice, however, if you tell me that Conflicts:
  is better in that specific case.
- Have you tried installing back and forth between 1.x and 2.0 packages?
- When this is accepted, can we add a Conflicts: in the other packages?


---- Automated stuff below -----

This is a review *template*. Besides handling the [ ]-marked tests you are
also supposed to fix the template before pasting into bugzilla:
- Add issues you find to the list of issues on top. If there isn't such
  a list, create one.
- Add your own remarks to the template checks.
- Add new lines marked [!] or [?] when you discover new things not
  listed by fedora-review.
- Change or remove any text in the template which is plain wrong. In this
  case you could also file a bug against fedora-review
- Remove the "[ ] Manual check required", you will not have any such lines
  in what you paste.
- Remove attachments which you deem not really useful (the rpmlint
  ones are mandatory, though)
- Remove this text



Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed
[M] = Manual review done (Christophe de Dinechin, aka c3d
[S] = Manual review non-blocking suggestion (Christophe de Dinechin, aka c3d


Issues:
=======
- If your application is a C or C++ application you must list a
  BuildRequires against gcc, gcc-c++ or clang.
  Note: No gcc, gcc-c++ or clang found in BuildRequires
  See: https://docs.fedoraproject.org/en-US/packaging-guidelines/C_and_C++/
- Permissions on files are set properly.
  Note: See rpmlint output
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_file_permissions


===== MUST items =====

C/C++:
[M]: Package does not contain kernel modules.
[M]: Package contains no static executables.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[M]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[?]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "*No copyright* Apache License 2.0",
     "[generated file]", "GNU General Public License, Version 2", "*No
     copyright* [generated file]", "Expat License", "*No copyright* Expat
     License", "Apache License 2.0", "BSD 3-clause "New" or "Revised"
     License", "ISC License", "BSD 2-clause "Simplified" License", "*No
     copyright* Mozilla Public License 2.0", "*No copyright* GNU Lesser
     General Public License, Version 3". 2683 files have unknown license.
     Detailed output of licensecheck in /home/ddd/1909767-kata-
     containers/licensecheck.txt
     c3d: Did not have time to check all the generated files, because
     c3d: they use @generated, which is not known to fedora-review
[M]: Package does not own files or directories owned by other packages.
     Note: Dirs in package are owned also by: /usr/libexec/kata-
     containers(kata-runtime, kata-shim, kata-osbuilder, kata-agent, kata-
     proxy), /usr/libexec/kata-containers/agent(kata-agent),
     /usr/libexec/kata-containers/agent/usr(kata-agent), /usr/libexec/kata-
     containers/agent/usr/bin(kata-agent), /usr/libexec/kata-
     containers/agent/usr/lib(kata-agent), /usr/libexec/kata-
     containers/agent/usr/lib/systemd(kata-agent), /usr/libexec/kata-
     containers/agent/usr/lib/systemd/system(kata-agent),
     /usr/libexec/kata-containers/osbuilder(kata-osbuilder),
     /usr/libexec/kata-containers/osbuilder/dracut(kata-osbuilder),
     /usr/libexec/kata-containers/osbuilder/dracut/dracut.conf.d(kata-
     osbuilder), /usr/libexec/kata-containers/osbuilder/image-builder(kata-
     osbuilder), /usr/libexec/kata-containers/osbuilder/initrd-
     builder(kata-osbuilder), /usr/libexec/kata-
     containers/osbuilder/rootfs-builder(kata-osbuilder),
     /usr/libexec/kata-containers/osbuilder/scripts(kata-osbuilder),
     /usr/share/kata-containers(kata-runtime), /usr/share/kata-
     containers/defaults(kata-runtime), /var/cache/kata-containers(kata-
     osbuilder)
     c3d: OK because the relevant "Conflicts:" clauses are present.
[M]: %build honors applicable compiler flags or justifies otherwise.
     c3d: Checked for the single manual build (nsdax)
[M]: Package contains no bundled libraries without FPC exception.
[M]: Changelog in prescribed format.
[M]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[M]: Package uses nothing in %doc for runtime.
[M]: Package consistently uses macros (instead of hard-coded directory
     names).
[M]: Package is named according to the Package Naming Guidelines.
[M]: Package does not generate any conflict.
     c3d: Considered OK because of Conflict: rules
[M]: Package obeys FHS, except libexecdir and /usr/target.
[S]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
     c3d: Do we want to maintain two parallel packages for now?
     c3d: There is no Obsolete: or Provides: for kata-runtime, for example
[S]: Requires correct, justified where necessary.
     c3d: Used to build the images - Possibly add a comment?
[S]: Only use %_sourcedir in very specific situations.
     Note: %_sourcedir/$RPM_SOURCE_DIR is used.
     c3d: Add comment to explain why you need it?
[M]: Spec file is legible and written in American English.
[M]: Package contains systemd file(s) if in need.
[?]: Useful -debuginfo package or justification otherwise.
     c3d: The macros look good to me, but I did not try the package
[S]: Package is not known to require an ExcludeArch tag.
     c3d: The package does have ExcludeArch, for good reasons I believe
     c3d: Add comment on the reasons (do we have a BZ or a JIRA?)
[M]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 bytes in 2 files.
[M]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: If (and only if) the source package includes the text of the
     license(s) in its own file, then that file, containing the text of the
     license(s) for the package is included in %license.
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: systemd_post is invoked in %post, systemd_preun in %preun, and
     systemd_postun in %postun for Systemd service files.
     Note: Systemd service file(s) in kata-containers
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

===== SHOULD items =====

Generic:
[M]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
     c3d: Contains LICENSE file for Apache 2.0
[M]: Final provides and requires are sane (see attachments).
[M]: Package functions as described.
[M]: Latest version is packaged.
[M]: Package does not include license text files separate from upstream.
[S]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
     c3d: Justified in patch text
     c3d: Issue upstream exists and is documented in patch (#1203)
     c3d: Explain why we need to vendor Rust code that way but not Go?
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[-]: Description and summary sections in the package spec file contains
     translations for supported Non-English languages, if available.
[M]: Package should compile and build into binary rpms on all supported
     architectures.
[S]: %check is present and all tests pass.
     c3d: No %check at the moment, running it locally is difficult
     c3d: Consider adding a "make check LIBC=gnu" step?
[M]: Packages should try to preserve timestamps of original installed
     files.
[S]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define have_go_rpm_macros 1,
     %define have_go_rpm_macros 0, %define qemu qemu-kvm, %define qemupath
     %{_bindir}/%{qemu}, %define qemupath %{_libexecdir}/%{qemu}, %define
     machinetype "virt", %define machinetype "pseries", %define machinetype
     "s390-ccw-virtio", %define machinetype "q35"
     c3d: Probably worth changing these to silence the warning?
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Large data in /usr/share should live in a noarch subpackage if package
     is arched.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Checking: kata-containers-2.0.0-1.fc31.x86_64.rpm
          kata-containers-2.0.0-1.fc31.src.rpm
kata-containers.x86_64: W: summary-ended-with-dot C Kata Containers version 2.x repository.
[S] c3d: Please fix, easy to do.
kata-containers.x86_64: W: unstripped-binary-or-object /usr/bin/containerd-shim-kata-v2
kata-containers.x86_64: W: unstripped-binary-or-object /usr/bin/kata-monitor
kata-containers.x86_64: W: unstripped-binary-or-object /usr/bin/kata-runtime
kata-containers.x86_64: W: unstripped-binary-or-object /usr/libexec/kata-containers/agent/usr/bin/kata-agent
kata-containers.x86_64: W: unstripped-binary-or-object /usr/libexec/kata-containers/kata-netmon
kata-containers.x86_64: W: unstripped-binary-or-object /usr/libexec/kata-containers/osbuilder/nsdax
[S] c3d: I don't remember seeing that for the 1.x packages. Please investigate why.
kata-containers.x86_64: W: devel-file-in-non-devel-package /usr/libexec/kata-containers/osbuilder/image-builder/nsdax.gpl.c
[M] c3d: Justified for the use case.
kata-containers.x86_64: E: non-standard-executable-perm /usr/libexec/kata-containers/osbuilder/kata-osbuilder.sh 775
[S] c3d: Should probably be addressed
kata-containers.x86_64: E: non-executable-script /usr/share/bash-completion/completions/kata-runtime 644 /bin/bash
[S] c3d: I think it's a missing shebang, see the following lines in kata-runtime.spec:

# keep: Minor local patches
Patch0001: 0001-Remove-shebang-in-non-executable-completion-script.patch

kata-containers.x86_64: W: no-manual-page-for-binary containerd-shim-kata-v2
kata-containers.x86_64: W: no-manual-page-for-binary kata-collect-data.sh
kata-containers.x86_64: W: no-manual-page-for-binary kata-monitor
kata-containers.x86_64: W: no-manual-page-for-binary kata-runtime
[S] c3d: Please consider opening an issue upstream
kata-containers.x86_64: W: empty-%postun
[M] c3d: Why is this flagged? There is a %systemd_postun there.
kata-containers.src: W: summary-ended-with-dot C Kata Containers version 2.x repository.
kata-containers.src: W: strange-permission kata-osbuilder.sh 775
kata-containers.src:92: W: macro-in-comment %check
[S] Please remove the %chek in the comment (all the more since we have no %check yet ;-)
kata-containers.src:281: E: use-of-RPM_SOURCE_DIR
[M] c3d: Same as in kata-runtime. If you have an idea on how to fix it?
2 packages and 0 specfiles checked; 3 errors, 16 warnings.




Rpmlint (installed packages)
----------------------------
kata-containers.x86_64: W: summary-ended-with-dot C Kata Containers version 2.x repository.
kata-containers.x86_64: W: unstripped-binary-or-object /usr/bin/containerd-shim-kata-v2
kata-containers.x86_64: W: unstripped-binary-or-object /usr/bin/kata-monitor
kata-containers.x86_64: W: unstripped-binary-or-object /usr/bin/kata-runtime
kata-containers.x86_64: W: unstripped-binary-or-object /usr/libexec/kata-containers/agent/usr/bin/kata-agent
kata-containers.x86_64: W: unstripped-binary-or-object /usr/libexec/kata-containers/kata-netmon
kata-containers.x86_64: W: unstripped-binary-or-object /usr/libexec/kata-containers/osbuilder/nsdax
kata-containers.x86_64: W: devel-file-in-non-devel-package /usr/libexec/kata-containers/osbuilder/image-builder/nsdax.gpl.c
kata-containers.x86_64: E: non-standard-executable-perm /usr/libexec/kata-containers/osbuilder/kata-osbuilder.sh 775
kata-containers.x86_64: E: non-executable-script /usr/share/bash-completion/completions/kata-runtime 644 /bin/bash
kata-containers.x86_64: W: no-manual-page-for-binary containerd-shim-kata-v2
kata-containers.x86_64: W: no-manual-page-for-binary kata-collect-data.sh
kata-containers.x86_64: W: no-manual-page-for-binary kata-monitor
kata-containers.x86_64: W: no-manual-page-for-binary kata-runtime
kata-containers.x86_64: W: empty-%postun
1 packages and 0 specfiles checked; 2 errors, 13 warnings.



Source checksums
----------------
https://github.com/kata-containers/kata-containers/archive/2.0.0/kata-containers-2.0.0.tar.gz :
  CHECKSUM(SHA256) this package     : 58b0c3891c6be79b8783466109d17131ce4a169e29a5d0c029f00307bfe5a634
  CHECKSUM(SHA256) upstream package : 58b0c3891c6be79b8783466109d17131ce4a169e29a5d0c029f00307bfe5a634


Requires
--------
kata-containers (rpmlib, GLIBC filtered):
    /bin/sh
    /usr/bin/bash
    busybox
    dracut
    kernel
    ld-linux-x86-64.so.2()(64bit)
    libc.so.6()(64bit)
    libdl.so.2()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.3)(64bit)
    libgcc_s.so.1(GCC_4.2.0)(64bit)
    libpthread.so.0()(64bit)
    librt.so.1()(64bit)
    libutil.so.1()(64bit)
    qemu-kvm-core
    rtld(GNU_HASH)
    systemd



Provides
--------
kata-containers:
    kata-containers
    kata-containers(x86-64)



Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10
Command line :/usr/bin/fedora-review -b 1909767
Buildroot used: fedora-rawhide-x86_64
Active plugins: C/C++, Shell-api, Generic
Disabled plugins: Java, fonts, Ocaml, Perl, Python, PHP, SugarActivity, R, Haskell
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 2 Eduardo Lima (Etrunko) 2021-01-28 15:09:56 UTC
Link to latest build:

https://koji.fedoraproject.org/koji/taskinfo?taskID=60750336

Comment 3 Fabiano Fidêncio 2021-01-28 19:56:17 UTC
Christophe,

Firstly, let me thank you for the review. I'll try to address the top-level comments.

(In reply to Christophe de Dinechin from comment #1)
> c3d top-level comments:
> 
> - A few suggested changes, search for [S] below. Nothing really blocking

Yay! :-)


> - Why do we mark this as conflicting with kata-ksm-throttler?
>   I need to check if kata-ksm-throttler is still supposed to work with 2.0
>   but I see no reason why not.

My approach was to mark everything that's related to 1.x as conflicting. If kata-ksm-throttler works fine for 2.x, we'd better deal with this upstream in the following way:
* Check what's needed to make it work, in case it doesn't work automagically;
* Move ksm-throttler under 2.x repo, probably under the `tools/` folder;
  * Then we get it for free as part of the next rebase;

Does this sound reasonable?

> - Consider Obsoletes instead of Conflicts for packages such as kata-runtime
> or
>   kata-shim. I will trust your choice, however, if you tell me that
> Conflicts:
>   is better in that specific case.

In order to simplify things for us and for the consumers, I'd prefer using either "Obsoletes" or "Conflicts".
The reason I decided to go with "Conflicts" was nothing but ideological, but I'm more than fine to change it according to your preference.

Again, I'd prefer we decide for one and go for one of those. What do you think?

> - Have you tried installing back and forth between 1.x and 2.0 packages?

I, personally, haven't. May I ask what's your concern?

> - When this is accepted, can we add a Conflicts: in the other packages?

We surely can, no problem.
Out of curiosity, what do you have in mind?

Comment 4 Eduardo Lima (Etrunko) 2021-02-04 17:18:13 UTC
(In reply to Christophe de Dinechin from comment #1)
> 
> ===== MUST items =====
> 
> Generic:
> [?]: License field in the package spec file matches the actual license.
>      Note: Checking patched sources after %prep for licenses. Licenses
>      found: "Unknown or generated", "*No copyright* Apache License 2.0",
>      "[generated file]", "GNU General Public License, Version 2", "*No
>      copyright* [generated file]", "Expat License", "*No copyright* Expat
>      License", "Apache License 2.0", "BSD 3-clause "New" or "Revised"
>      License", "ISC License", "BSD 2-clause "Simplified" License", "*No
>      copyright* Mozilla Public License 2.0", "*No copyright* GNU Lesser
>      General Public License, Version 3". 2683 files have unknown license.
>      Detailed output of licensecheck in /home/ddd/1909767-kata-
>      containers/licensecheck.txt
>      c3d: Did not have time to check all the generated files, because
>      c3d: they use @generated, which is not known to fedora-review

Out of curiosity, I went through the list of vendor code (patch) and checked for the licencing for each one of them. All of the projects have a permissive license, in the kinds of MIT, BSD, Apache 2.0.

> [S]: If the package is a rename of another package, proper Obsoletes and
>      Provides are present.
>      c3d: Do we want to maintain two parallel packages for now?
>      c3d: There is no Obsolete: or Provides: for kata-runtime, for example

Fabiano provided the reasoning in comment #3.

> [S]: Requires correct, justified where necessary.
>      c3d: Used to build the images - Possibly add a comment?

Fixed.

> [S]: Only use %_sourcedir in very specific situations.
>      Note: %_sourcedir/$RPM_SOURCE_DIR is used.
>      c3d: Add comment to explain why you need it?

Fixed.

> [?]: Useful -debuginfo package or justification otherwise.
>      c3d: The macros look good to me, but I did not try the package

Enabling debug build returns an error which I am not sure how to fix at the moment.

RPM build errors:
    Missing build-id in /home/elima/rpmbuild/BUILDROOT/kata-containers-2.0.0-1.fc33.x86_64/usr/libexec/kata-containers/kata-netmon
    Generating build-id links failed

This error turns into a warning only when debuginfo is disabled.

warning: Missing build-id in /home/elima/rpmbuild/BUILDROOT/kata-containers-2.0.0-1.fc33.x86_64/usr/libexec/kata-containers/kata-netmon

> [S]: Package is not known to require an ExcludeArch tag.
>      c3d: The package does have ExcludeArch, for good reasons I believe
>      c3d: Add comment on the reasons (do we have a BZ or a JIRA?)

Fixed.

> 
> ===== SHOULD items =====
> 
> Generic:
> 
> [S]: Patches link to upstream bugs/comments/lists or are otherwise
>      justified.
>      c3d: Justified in patch text
>      c3d: Issue upstream exists and is documented in patch (#1203)
>      c3d: Explain why we need to vendor Rust code that way but not Go?

Not required.

> [S]: %check is present and all tests pass.
>      c3d: No %check at the moment, running it locally is difficult
>      c3d: Consider adding a "make check LIBC=gnu" step?

Make check fails with upstream code, it can be enabled whenever the check passes.

> [S]: Spec use %global instead of %define unless justified.
>      Note: %define requiring justification: %define have_go_rpm_macros 1,
>      %define have_go_rpm_macros 0, %define qemu qemu-kvm, %define qemupath
>      %{_bindir}/%{qemu}, %define qemupath %{_libexecdir}/%{qemu}, %define
>      machinetype "virt", %define machinetype "pseries", %define machinetype
>      "s390-ccw-virtio", %define machinetype "q35"
>      c3d: Probably worth changing these to silence the warning?

Fixed.

> 
> ===== EXTRA items =====
> 
> Generic:
> 
> 
> Rpmlint
> -------
> Checking: kata-containers-2.0.0-1.fc31.x86_64.rpm
>           kata-containers-2.0.0-1.fc31.src.rpm
> kata-containers.x86_64: W: summary-ended-with-dot C Kata Containers version
> 2.x repository.
> [S] c3d: Please fix, easy to do.

Fixed.

> kata-containers.x86_64: W: unstripped-binary-or-object
> /usr/bin/containerd-shim-kata-v2
> kata-containers.x86_64: W: unstripped-binary-or-object /usr/bin/kata-monitor
> kata-containers.x86_64: W: unstripped-binary-or-object /usr/bin/kata-runtime
> kata-containers.x86_64: W: unstripped-binary-or-object
> /usr/libexec/kata-containers/agent/usr/bin/kata-agent
> kata-containers.x86_64: W: unstripped-binary-or-object
> /usr/libexec/kata-containers/kata-netmon
> kata-containers.x86_64: W: unstripped-binary-or-object
> /usr/libexec/kata-containers/osbuilder/nsdax
> [S] c3d: I don't remember seeing that for the 1.x packages. Please
> investigate why.

These warnings happen because debuginfo is not enabled.

> kata-containers.x86_64: W: devel-file-in-non-devel-package
> /usr/libexec/kata-containers/osbuilder/image-builder/nsdax.gpl.c
> [M] c3d: Justified for the use case.

Removed from the installed package.

> kata-containers.x86_64: E: non-standard-executable-perm
> /usr/libexec/kata-containers/osbuilder/kata-osbuilder.sh 775
> [S] c3d: Should probably be addressed

Fixed.

> kata-containers.x86_64: E: non-executable-script
> /usr/share/bash-completion/completions/kata-runtime 644 /bin/bash
> [S] c3d: I think it's a missing shebang, see the following lines in
> kata-runtime.spec:
> 
> # keep: Minor local patches
> Patch0001: 0001-Remove-shebang-in-non-executable-completion-script.patch
> 

Fixed.

> kata-containers.x86_64: W: no-manual-page-for-binary containerd-shim-kata-v2
> kata-containers.x86_64: W: no-manual-page-for-binary kata-collect-data.sh
> kata-containers.x86_64: W: no-manual-page-for-binary kata-monitor
> kata-containers.x86_64: W: no-manual-page-for-binary kata-runtime
> [S] c3d: Please consider opening an issue upstream

OK.

> kata-containers.x86_64: W: empty-%postun
> [M] c3d: Why is this flagged? There is a %systemd_postun there.


> kata-containers.src: W: summary-ended-with-dot C Kata Containers version 2.x
> repository.
> kata-containers.src: W: strange-permission kata-osbuilder.sh 775
> kata-containers.src:92: W: macro-in-comment %check
> [S] Please remove the %chek in the comment (all the more since we have no
> %check yet ;-)

Fixed.


> kata-containers.src:281: E: use-of-RPM_SOURCE_DIR
> [M] c3d: Same as in kata-runtime. If you have an idea on how to fix it?
> 2 packages and 0 specfiles checked; 3 errors, 16 warnings.
> 

Fixed.

Comment 5 Eduardo Lima (Etrunko) 2021-02-04 17:23:39 UTC
I have just pushed new versions of the spec file and srpm to the URL above.

Here is the link to the koji build.

https://koji.fedoraproject.org/koji/taskinfo?taskID=61314049

And if you want to check, the diff on the spec file:

diff --git a/kata-containers.spec b/kata-containers.spec
index f12b336..97243fd 100644
--- a/kata-containers.spec
+++ b/kata-containers.spec
@@ -1,8 +1,8 @@
 # go-rpm-macros are not available on RHEL.
 %if 0%{?fedora}
-    %define have_go_rpm_macros 1
+    %global have_go_rpm_macros 1
 %else
-    %define have_go_rpm_macros 0
+    %global have_go_rpm_macros 0
 %endif

 %global with_debug 0
@@ -59,7 +59,7 @@ workload isolation and security advantages of VMs. https://katacontainers.io/.}

 Name:       %{repo}
 Release:    1%{?rcrel}%{?dist}
-Summary:    Kata Containers version 2.x repository.
+Summary:    Kata Containers version 2.x repository
 License:    ASL 2.0
 Url:        https://%{download}
 Source0:    https://%{download}/archive/%{version}%{?rcstr}/%{repo}-%{version}%{?rcstr}.tar.gz
@@ -74,6 +74,7 @@ Source3:    15-dracut-rhel.conf
 Patch0001:  0001-Add-vendor-code.patch
 # Keep this patch downstream as it'd be hard to justify such change upstream
 Patch0999:  0999-osbuilder-Adjust-agent_version-for-our-builds.patch
+Patch1000:  1000-Remove-shebang-in-non-executable-completion-script.patch


 %if 0%{?have_go_rpm_macros}
@@ -87,9 +88,10 @@ BuildRequires: git-core
 BuildRequires: libselinux-devel
 BuildRequires: make
 BuildRequires: systemd
+BuildRequires: gcc

 %{?systemd_requires}
-# %check requirements
+# %%check requirements
 BuildRequires: dracut
 BuildRequires: kernel

@@ -153,6 +155,7 @@ Conflicts: kata-runtime
 Conflicts: kata-shim

 # The following architectures lack the required qemu support
+# s390 fail to build: https://github.com/kata-containers/kata-containers/issues/1204
 ExcludeArch: %{arm} %{ix86} s390 s390x


@@ -166,11 +169,11 @@ ExcludeArch: %{arm} %{ix86} s390 s390x
 # The machine type uses a modern default
 # The kernel parameters workaround an issue with cgroupsv2 after kernel 5.3
 # To-do: add BUILDFLAGS=gobuildflags when the macro becomes available
-%define qemu qemu-kvm
+%global qemu qemu-kvm
 %if 0%{?fedora}
-%define qemupath %{_bindir}/%{qemu}
+%global qemupath %{_bindir}/%{qemu}
 %else
-%define qemupath %{_libexecdir}/%{qemu}
+%global qemupath %{_libexecdir}/%{qemu}
 %endif

 # The machine type to be used is architecture specific:
@@ -179,16 +182,16 @@ ExcludeArch: %{arm} %{ix86} s390 s390x
 # s390x: s390-ccw-virtio
 # x86_64: q35
 %ifarch aarch64
-%define machinetype "virt"
+%global machinetype "virt"
 %endif
 %ifarch ppc64le
-%define machinetype "pseries"
+%global machinetype "pseries"
 %endif
 %ifarch s390x
-%define machinetype "s390-ccw-virtio"
+%global machinetype "s390-ccw-virtio"
 %endif
 %ifarch x86_64
-%define machinetype "q35"
+%global machinetype "q35"
 %endif

 %global katadatadir             %{_datadir}/kata-containers
@@ -252,8 +255,7 @@ export PATH=$PATH:$GOPATH/bin

 cd go/src/%{importname}

-mkdir -p %{buildroot}%{katalibexecdir}
-cp -L VERSION %{buildroot}%{katalibexecdir}
+install -m 0644 -D -t %{buildroot}%{katalibexecdir} VERSION

 pushd src/runtime
 %make_install %{runtime_make_vars}
@@ -266,19 +268,22 @@ popd
 pushd tools/osbuilder
 rm .gitignore
 rm rootfs-builder/.gitignore
-mkdir -p %{buildroot}%{kataosbuilderdir}
 mkdir -p %{buildroot}%{katalocalstatecachedir}
-cp -aR nsdax %{buildroot}/%{kataosbuilderdir}
-cp -aR rootfs-builder %{buildroot}/%{kataosbuilderdir}
-cp -aR image-builder %{buildroot}/%{kataosbuilderdir}
-cp -aR initrd-builder %{buildroot}/%{kataosbuilderdir}
-cp -aR scripts %{buildroot}%{kataosbuilderdir}
-cp -aR dracut %{buildroot}%{kataosbuilderdir}
-cp -a %{SOURCE3} %{buildroot}%{kataosbuilderdir}/dracut/dracut.conf.d/
-cp -a %{SOURCE1} %{buildroot}%{kataosbuilderdir}
-chmod +x %{buildroot}/%{kataosbuilderdir}/scripts/lib.sh
-
-install -m 0644 -D -t %{buildroot}%{_unitdir} %{_sourcedir}/kata-osbuilder-generate.service
+
+install -m 0644 -D -t %{buildroot}%{_unitdir} %{SOURCE2}
+install -m 0755 -D -t %{buildroot}%{kataosbuilderdir} nsdax
+install -m 0644 -D -t %{buildroot}%{kataosbuilderdir} %{SOURCE1}
+
+cp -aR rootfs-builder %{buildroot}%{kataosbuilderdir}
+cp -aR image-builder  %{buildroot}%{kataosbuilderdir}
+cp -aR initrd-builder %{buildroot}%{kataosbuilderdir}
+cp -aR scripts        %{buildroot}%{kataosbuilderdir}
+cp -aR dracut         %{buildroot}%{kataosbuilderdir}
+
+rm -f %{buildroot}%{kataosbuilderdir}/image-builder/nsdax.gpl.c
+install -m 0644 -D -t %{buildroot}%{kataosbuilderdir}/dracut/dracut.conf.d/ %{SOURCE3}
+chmod +x %{buildroot}%{kataosbuilderdir}/scripts/lib.sh
+chmod +x %{buildroot}%{kataosbuilderdir}/kata-osbuilder.sh
 popd

 # Disable the image= option, so we use initrd= by default
@@ -317,7 +322,7 @@ if test -w %{katalocalstatecachedir}; then

     TMPOUT="$(mktemp -t kata-rpm-post-XXXXXX.log)"
     echo "Creating kata appliance initrd..."
-    bash %{kataosbuilderdir}/kata-osbuilder.sh > ${TMPOUT} 2>&1
+    %{kataosbuilderdir}/kata-osbuilder.sh > ${TMPOUT} 2>&1
     if test "$?" != "0" ; then
         echo "Building failed. Here is the log details:"
         cat ${TMPOUT}
@@ -363,7 +368,6 @@ fi
 %exclude %{kataosbuilderdir}/rootfs-builder/template
 %exclude %{kataosbuilderdir}/rootfs-builder/suse
 %exclude %{kataosbuilderdir}/rootfs-builder/ubuntu
-%exclude %{kataosbuilderdir}/scripts/install-yq.sh


 %changelog

Comment 6 Christophe de Dinechin 2021-02-18 14:34:16 UTC
Looks good to me, although I did not re-run the test scripts.

Comment 7 Mohan Boddu 2021-03-01 16:10:06 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/kata-containers


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