Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2049379 - Review Request: aws-c-common - Core c99 package for AWS SDK for C
Summary: Review Request: aws-c-common - Core c99 package for AWS SDK for C
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Neal Gompa
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2049382 2049400 2049656 2049716 2049748 2049781 2049792
TreeView+ depends on / blocked
 
Reported: 2022-02-02 05:25 UTC by David Duncan
Modified: 2022-07-31 08:04 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-31 08:04:56 UTC
Type: ---
Embargoed:
ngompa13: fedora-review+


Attachments (Terms of Use)

Description David Duncan 2022-02-02 05:25:57 UTC
Spec URL: https://davdunc.fedorapeople.org/awscli-2-rpms/aws-c-common.spec
SRPM URL: https://davdunc.fedorapeople.org/awscli-2-rpms/aws-c-common-0.6.14-1.fc35.src.rpm
Description: Core c99 package for AWS SDK for C. Includes cross-platform primitives, configuration, data structures, and error handling.

Fedora Account System Username: davdunc

Comment 1 Neal Gompa 2022-02-02 11:02:45 UTC
Taking this review.

Comment 2 Neal Gompa 2022-02-02 11:05:15 UTC
> %files
> %license LICENSE
> %doc README.md
>
> %files libs
> %{_libdir}/libaws-c-common.so
> %{_libdir}/libaws-c-common.so.1
> %{_libdir}/libaws-c-common.so.1.0.0

These two files sections can be collapsed into a single "%files libs" section. Additionally, you can simplify the library filenames into a single:

> %{_libdir}/libaws-c-common.so.1{,.*}

And "%{_libdir}/libaws-c-common.so" needs to be in the devel subpackage.

Finally, with these changes, the libs subpackage shouldn't depend on an empty main package that isn't going to be made, so:

> Requires:       %{name}%{?_isa} = %{version}-%{release}

should be dropped.

Comment 3 Neal Gompa 2022-02-02 11:33:34 UTC
> %{_libdir}/aws-c-common/cmake/aws-c-common-config.cmake
> %{_libdir}/aws-c-common/cmake/shared/aws-c-common-targets-noconfig.cmake
> %{_libdir}/aws-c-common/cmake/shared/aws-c-common-targets.cmake

The directory structure is wrong here. This needs to be "%{_libdir}/cmake/aws-c-common" instead of "%{_libdir}/aws-c-common/cmake". The CMake dependency generator isn't picking up anything and CMake can't use the modules unless it's in the right directory structure.

Comment 4 Kyle Knapp 2022-02-02 23:09:21 UTC
Thanks Neal! I created a PR in the repository where David and I are developing the specfiles right now: https://github.com/davdunc/awscli-2-rpm/pull/30. It should have addressed all of the feedback and David will send a new link to the updated specfile and srpm.

It looks like most of this feedback is applicable to the other aws-c-* modules so we will make sure to update those. I did have one question about the cmake configs comment. When I was building all of the aws-c-* modules together (i.e. using rpmbuild or mock), cmake seemed to be able to successfully locate and build against the various aws-c-* modules even though they used the path %{_libdir}/<name>/cmake/ for installing their configs. Even in the cmake documentation: https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure, it seems to indicate that cmake should be able to find the configs under %{_libdir}/<name>/cmake/. What commands/steps do you need to run to tell that the %{_libdir}/<name>/cmake pattern is not working correctly? Or is it more for consistency that all cmake config files need to be under %{_libdir}/cmake/? I added a patch so that the library does install it in the %{_libdir}/cmake/aws-c-common path, and we will have to add similar patches to the rest of the aws-c-* modules. So I'm trying to fully understand it before making those updates.

Comment 6 Neal Gompa 2022-02-03 15:43:21 UTC
(In reply to Kyle Knapp from comment #4)
> Thanks Neal! I created a PR in the repository where David and I are
> developing the specfiles right now:
> https://github.com/davdunc/awscli-2-rpm/pull/30. It should have addressed
> all of the feedback and David will send a new link to the updated specfile
> and srpm.
> 
> It looks like most of this feedback is applicable to the other aws-c-*
> modules so we will make sure to update those. I did have one question about
> the cmake configs comment. When I was building all of the aws-c-* modules
> together (i.e. using rpmbuild or mock), cmake seemed to be able to
> successfully locate and build against the various aws-c-* modules even
> though they used the path %{_libdir}/<name>/cmake/ for installing their
> configs. Even in the cmake documentation:
> https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-
> search-procedure, it seems to indicate that cmake should be able to find the
> configs under %{_libdir}/<name>/cmake/. What commands/steps do you need to
> run to tell that the %{_libdir}/<name>/cmake pattern is not working
> correctly? Or is it more for consistency that all cmake config files need to
> be under %{_libdir}/cmake/? I added a patch so that the library does install
> it in the %{_libdir}/cmake/aws-c-common path, and we will have to add
> similar patches to the rest of the aws-c-* modules. So I'm trying to fully
> understand it before making those updates.

The issue is that the dependency generator can't find %{_libdir}/*/cmake modules, only %{_libdir}/cmake/* modules. And depending on how CMake is configured, it may not be able to find %{_libdir}/*/cmake modules (though it does by default).

Comment 7 Kyle Knapp 2022-02-03 17:24:07 UTC
(In reply to Neal Gompa from comment #6)
> (In reply to Kyle Knapp from comment #4)
> > Thanks Neal! I created a PR in the repository where David and I are
> > developing the specfiles right now:
> > https://github.com/davdunc/awscli-2-rpm/pull/30. It should have addressed
> > all of the feedback and David will send a new link to the updated specfile
> > and srpm.
> > 
> > It looks like most of this feedback is applicable to the other aws-c-*
> > modules so we will make sure to update those. I did have one question about
> > the cmake configs comment. When I was building all of the aws-c-* modules
> > together (i.e. using rpmbuild or mock), cmake seemed to be able to
> > successfully locate and build against the various aws-c-* modules even
> > though they used the path %{_libdir}/<name>/cmake/ for installing their
> > configs. Even in the cmake documentation:
> > https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-
> > search-procedure, it seems to indicate that cmake should be able to find the
> > configs under %{_libdir}/<name>/cmake/. What commands/steps do you need to
> > run to tell that the %{_libdir}/<name>/cmake pattern is not working
> > correctly? Or is it more for consistency that all cmake config files need to
> > be under %{_libdir}/cmake/? I added a patch so that the library does install
> > it in the %{_libdir}/cmake/aws-c-common path, and we will have to add
> > similar patches to the rest of the aws-c-* modules. So I'm trying to fully
> > understand it before making those updates.
> 
> The issue is that the dependency generator can't find %{_libdir}/*/cmake
> modules, only %{_libdir}/cmake/* modules. And depending on how CMake is
> configured, it may not be able to find %{_libdir}/*/cmake modules (though it
> does by default).

Ah that makes sense. David posted the updated specfile and srpm that included that update. We'll also go ahead and make sure the rest of the aws-c-* reviews use this path pattern for the cmake configs. Thanks!

Comment 8 Kyle Knapp 2022-02-15 21:49:43 UTC
Hi Neal. Have you gotten a chance to take a look at the updated SPEC and SRPM? Is there anything you need from either David or my end to help make this review move forward?

Comment 9 Neal Gompa 2022-02-15 23:45:57 UTC
Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated



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

C/C++:
[x]: Package does not contain kernel modules.
[x]: Package contains no static executables.
[x]: If your application is a C or C++ application you must list a
     BuildRequires against gcc, gcc-c++ or clang.
[x]: Header files in -devel subpackage, if present.
[x]: ldconfig not called in %post and %postun for Fedora 28 and later.
[x]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.
[x]: Development (unversioned) .so files in -devel subpackage, if present.

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "Apache License 2.0", "*No copyright*
     Apache License 2.0", "BSD (3 clause) Apache License 2.0", "*No
     copyright* Public domain". 235 files have unknown license. Detailed
     output of licensecheck in /home/ngompa/2049379-aws-c-
     common/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: Package requires other packages for directories it uses.
     Note: No known owner of /usr/include/aws/common/posix,
     /usr/lib64/cmake/aws-c-common/shared, /usr/include/aws/testing,
     /usr/include/aws/common, /usr/lib64/cmake/aws-c-common
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/include/aws/common,
     /usr/lib64/cmake/aws-c-common, /usr/lib64/cmake/aws-c-common/shared,
     /usr/include/aws, /usr/include/aws/testing,
     /usr/include/aws/common/posix
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[x]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 1 files.
[x]: 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 does not own files or directories owned by other packages.
[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]: Permissions on files are set properly.
[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]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

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

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[x]: Fully versioned dependency in subpackages if applicable.
     Note: No Requires: %{name}%{?_isa} = %{version}-%{release} in aws-c-
     common-libs , aws-c-common-devel
[x]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[-]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
     files.
[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.
[x]: Spec use %global instead of %define unless justified.

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

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[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: aws-c-common-libs-0.6.14-4.fc36.x86_64.rpm
          aws-c-common-devel-0.6.14-4.fc36.x86_64.rpm
          aws-c-common-debugsource-0.6.14-4.fc36.x86_64.rpm
          aws-c-common-0.6.14-4.fc36.src.rpm
aws-c-common-devel.x86_64: W: no-documentation
aws-c-common.src: W: strange-permission aws-c-common-cmake.patch 755
aws-c-common.src: W: strange-permission aws-c-common.spec 755
4 packages and 0 specfiles checked; 0 errors, 3 warnings.




Rpmlint (debuginfo)
-------------------
Checking: aws-c-common-libs-debuginfo-0.6.14-4.fc36.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
Cannot parse rpmlint output:


Source checksums
----------------
https://github.com/awslabs/aws-c-common/archive/v0.6.14/aws-c-common-0.6.14.tar.gz :
  CHECKSUM(SHA256) this package     : 1691c9dad5a0d236c2a0e351cc972231b176947e454c61d1c4b3ea4ab42f32e7
  CHECKSUM(SHA256) upstream package : 1691c9dad5a0d236c2a0e351cc972231b176947e454c61d1c4b3ea4ab42f32e7


Requires
--------
aws-c-common-libs (rpmlib, GLIBC filtered):
    ld-linux-x86-64.so.2()(64bit)
    libc.so.6()(64bit)
    libm.so.6()(64bit)
    rtld(GNU_HASH)

aws-c-common-devel (rpmlib, GLIBC filtered):
    aws-c-common-libs(x86-64)
    cmake-filesystem(x86-64)
    libaws-c-common.so.1()(64bit)

aws-c-common-debugsource (rpmlib, GLIBC filtered):



Provides
--------
aws-c-common-libs:
    aws-c-common-libs
    aws-c-common-libs(x86-64)
    libaws-c-common.so.1()(64bit)

aws-c-common-devel:
    aws-c-common-devel
    aws-c-common-devel(x86-64)
    cmake(aws-c-common)

aws-c-common-debugsource:
    aws-c-common-debugsource
    aws-c-common-debugsource(x86-64)



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

Comment 10 Neal Gompa 2022-02-15 23:49:51 UTC
> [!]: Package requires other packages for directories it uses.
>      Note: No known owner of /usr/include/aws/common/posix,
>      /usr/lib64/cmake/aws-c-common/shared, /usr/include/aws/testing,
>      /usr/include/aws/common, /usr/lib64/cmake/aws-c-common
> [!]: Package must own all directories that it creates.
>      Note: Directories without known owners: /usr/include/aws/common,
>      /usr/lib64/cmake/aws-c-common, /usr/lib64/cmake/aws-c-common/shared,
>      /usr/include/aws, /usr/include/aws/testing,
>      /usr/include/aws/common/posix

This can be solved by adding the following to the devel subpackage:

%dir %{_libdir}/cmake/aws-c-common
%dir %{_libdir}/cmake/aws-c-common/shared
%dir %{_libdir}/include/aws/common
%dir %{_libdir}/include/aws/common/posix
%dir %{_libdir}/include/aws/testing

Comment 11 Kyle Knapp 2022-02-21 17:59:55 UTC
Below are the new SPEC and SRPM based on the feedback related to needing to specify the directories that get created:

SPEC: https://kyleknap-fedora.s3.us-west-2.amazonaws.com/aws-c-common.spec
SRPM: https://kyleknap-fedora.s3.us-west-2.amazonaws.com/aws-c-common-0.6.14-5.fc35.src.rpm

It should be set for another look.

Comment 12 Neal Gompa 2022-02-21 18:29:02 UTC
I think we're set now...

PACKAGE APPROVED.

Comment 13 Gwyn Ciesla 2022-02-22 22:56:24 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/aws-c-common

Comment 14 Mattia Verga 2022-07-31 08:04:56 UTC
Closing as package available in Rawhide


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