Bug 2281588 - Review Request: gmobile - Functions useful in mobile related, glib based projects
Summary: Review Request: gmobile - Functions useful in mobile related, glib based proj...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL: https://gitlab.gnome.org/World/Phosh/...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-05-20 06:23 UTC by Tomi Lähteenmäki
Modified: 2024-06-18 16:23 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-06-18 16:23:25 UTC
Type: ---
Embargoed:
eclipseo: fedora-review+


Attachments (Terms of Use)
The .spec file difference from Copr build 7467138 to 7468105 (1.31 KB, patch)
2024-05-21 02:13 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 7468105 to 7583336 (3.25 KB, patch)
2024-06-10 06:24 UTC, Fedora Review Service
no flags Details | Diff
The .spec file difference from Copr build 7583336 to 7585833 (1007 bytes, patch)
2024-06-10 12:32 UTC, Fedora Review Service
no flags Details | Diff

Comment 2 Fedora Review Service 2024-05-20 21:13:38 UTC
Cannot find any valid SRPM URL for this ticket. Common causes are:

- You didn't specify `SRPM URL: ...` in the ticket description
  or any of your comments
- The URL schema isn't HTTP or HTTPS
- The SRPM package linked in your URL doesn't match the package name specified
  in the ticket summary


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 3 Fedora Review Service 2024-05-20 21:24:13 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7467138
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2281588-gmobile/fedora-rawhide-x86_64/07467138-gmobile/fedora-review/review.txt

Found issues:

- Not a valid SPDX expression 'LGPL-2.1-or-later AND GPL-3-or-later'.
  Read more: https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1

Please know that there can be false-positives.

---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 5 Fedora Review Service 2024-05-21 02:13:42 UTC
Created attachment 2034210 [details]
The .spec file difference from Copr build 7467138 to 7468105

Comment 6 Fedora Review Service 2024-05-21 02:13:44 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7468105
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2281588-gmobile/fedora-rawhide-x86_64/07468105-gmobile/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 7 Robert-André Mauchin 🐧 2024-06-09 07:02:07 UTC
 - Add the COPYING.LIB license file:

%license COPYING COPYING.LIB

- Breakdown the licenses as a comment:

# LGPL-2.1-or-later: src/
# GPL-3.0-or-later: examples/ tests/

 - Source0

Not need to suffix with 0 anymore. Same for patches.

 - I don't see any systemd service files, so you don't need BuildRequires:  systemd-rpm-macros

 - Build the documentation:
%bcond docs 1

...


%if %{with docs}
BuildRequires:  gi-docgen
BuildRequires:  python3dist(docutils)
%endif

...

%if %{with docs}
%package        docs
Summary:        Documentation for the gmobile library
# LGPL-2.1-or-later:
#  - *.html
# Apache-2.0 OR GPL-3.0-or-later:
#  - fonts.css
#  - main.js
#  - search.js
#  - style.css
# GPL-3.0-or-later:
#  - urlmap.js
# MIT:
#  - fzy.js
#  - solarized-dark.css
#  - solarized-light.css
License:        LGPL-2.1-or-later AND GPL-3.0-or-later AND (Apache-2.0 OR GPL-3.0-or-later) AND MIT

%description    docs
Documentation for the gmobile library.
%endif

...

%meson \
%if %{with docs}
    -Dgtk_doc=true \
    -Dman=true \
%endif
    -Dexamples=false

...

%files
%doc README.md
%license COPYING COPYING.LIB
%{_libdir}/libgmobile.so.0
%{_libdir}/girepository-1.0
%if %{with docs}
%{_mandir}/man5/gmobile.udev.5.*
%endif
%{_udevrulesdir}/*.rules
%{_udevhwdbdir}/*.hwdb

...

%if %{with docs}
%files docs
%license COPYING COPYING.LIB
%doc examples/
%{_docdir}/gmobile-0/
%endif


 - Don't put a period at the end of devel Summary


 - Personal preferences, do what you want with that:


Preemptively consider Epoch:

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

->

Requires:  %{name} = %{?epoch:%{epoch}:}%{version}-%{release}


Use rm -v for confirmation in the logs, and %{buildroot} instead of ${RPM_BUILD_ROOT}/


rm ${RPM_BUILD_ROOT}/%{_libdir}/libgmobile.a

->

rm -rfv %{buildroot}%{_libdir}/libgmobile.a

 - Proposed full spec:

%bcond docs 1

Name:     gmobile
Version:  0.2.0
Release:  %autorelease
Summary:  Functions useful in mobile related, glib based projects

# LGPL-2.1-or-later: src/
# GPL-3.0-or-later: examples/ tests/
License:  LGPL-2.1-or-later AND GPL-3.0-or-later
URL:      https://gitlab.gnome.org/World/Phosh/gmobile
Source:   %{url}/-/archive/v%{version}/gmobile-v%{version}.tar.gz

BuildRequires:  gcc
BuildRequires:  marshalparser
BuildRequires:  meson
BuildRequires:  pkgconfig(gio-2.0) >= 2.66
BuildRequires:  pkgconfig(glib-2.0) >= 2.66
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(json-glib-1.0) >= 1.6.2
%if %{with docs}
BuildRequires:  gi-docgen
BuildRequires:  python3dist(docutils)
%endif

Requires:       systemd-udev

%description
gmobile carries some helpers for glib based environments on mobile devices.

%package        devel
Summary:        Development headers for the gmobile library
Requires:       %{?epoch:%{epoch}:}%{version}-%{release}

%description    devel
Development headers for the gmobile library.

%if %{with docs}
%package        docs
Summary:        Documentation for the gmobile library
# LGPL-2.1-or-later:
#  - *.html
# Apache-2.0 OR GPL-3.0-or-later:
#  - fonts.css
#  - main.js
#  - search.js
#  - style.css
# GPL-3.0-or-later:
#  - urlmap.js
# MIT:
#  - fzy.js
#  - solarized-dark.css
#  - solarized-light.css
License:        LGPL-2.1-or-later AND GPL-3.0-or-later AND (Apache-2.0 OR GPL-3.0-or-later) AND MIT

%description    docs
Documentation for the gmobile library.
%endif

%prep
%autosetup -p1 -n %{name}-v%{version}

%build
%meson \
%if %{with docs}
    -Dgtk_doc=true \
    -Dman=true \
%endif
    -Dexamples=false
%meson_build

%install
%meson_install
rm ${RPM_BUILD_ROOT}/%{_libdir}/libgmobile.a

%check
%meson_test

%files
%doc README.md
%license COPYING COPYING.LIB
%{_libdir}/libgmobile.so.0
%{_libdir}/girepository-1.0
%if %{with docs}
%{_mandir}/man5/gmobile.udev.5.*
%endif
%{_udevrulesdir}/*.rules
%{_udevhwdbdir}/*.hwdb


%files devel
%{_includedir}/gmobile
%{_libdir}/libgmobile.so
%{_libdir}/pkgconfig/gmobile.pc
%{_datadir}/gir-1.0

%if %{with docs}
%files docs
%license COPYING COPYING.LIB
%doc examples/
%{_docdir}/gmobile-0/
%endif

%changelog
%autochangelog


---


Review template:

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

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



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

C/C++:
[x]: Package does not contain kernel modules.
[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]: Package contains no static executables.
[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", "GNU Lesser General Public License,
     Version 2.1", "*No copyright* GNU Lesser General Public License,
     Version 2.1", "GNU General Public License v3.0 or later and/or GNU
     Lesser General Public License v3.0 or later and/or GNU Lesser General
     Public License, Version 2.1", "GNU General Public License, Version 3".
     68 files have unknown license. Detailed output of licensecheck in
     /home/bob/packaging/review/gmobile/review-gmobile/licensecheck.txt
[!]: License file installed when any subpackage combination is installed.
[!]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[x]: Package does not own files or directories owned by other packages.
[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
[-]: 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.
[!]: 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.
[!]: 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]: The License field must be a valid SPDX expression.
[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 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]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 1250 bytes in 1 files.
[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).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %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]: Fully versioned dependency in subpackages if applicable.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: The placement of pkgconfig(.pc) files are correct.
[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: gmobile-0.2.0-1.fc41.x86_64.rpm
          gmobile-devel-0.2.0-1.fc41.x86_64.rpm
          gmobile-debuginfo-0.2.0-1.fc41.x86_64.rpm
          gmobile-debugsource-0.2.0-1.fc41.x86_64.rpm
          gmobile-0.2.0-1.fc41.src.rpm
========================================================= rpmlint session starts =========================================================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
rpmlintrc: [PosixPath('/tmp/tmpv1hovj9s')]
checks: 32, packages: 5

gmobile-devel.x86_64: W: summary-ended-with-dot Development headers for the gmobile library.
gmobile-devel.x86_64: W: no-documentation
=================== 5 packages and 0 specfiles checked; 0 errors, 2 warnings, 30 filtered, 0 badness; has taken 0.5 s ====================

Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.5.0
configuration:
    /usr/lib/python3.12/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 4

gmobile-devel.x86_64: W: summary-ended-with-dot Development headers for the gmobile library.
gmobile-devel.x86_64: W: no-documentation
 4 packages and 0 specfiles checked; 0 errors, 2 warnings, 26 filtered, 0 badness; has taken 0.4 s 


NEEDINFO me for followpup.

Comment 8 Robert-André Mauchin 🐧 2024-06-09 07:05:32 UTC
Requires:       %{?epoch:%{epoch}:}%{version}-%{release}

I made an error here 

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

Comment 9 Tomi Lähteenmäki 2024-06-09 15:56:07 UTC
Thank you so much for the review! All things should be now fixed. From the personal preference ones, I added the "v" for rm but left out the "rf" so I don't forget to drop it if the static library is no longer installed.

The "systemd-rpm-macros" however, the build fails with this if it is not in BuildRequires:

> RPM build errors:
>      File must begin with "/": %{_udevrulesdir}/*.rules
>      File must begin with "/": %{_udevhwdbdir}/*.hwdb

what would be proper way to fix this?

Attaching the URLs with the fixed spec even tho the build fails:

Spec URL: https://download.copr.fedorainfracloud.org/results/lihis/gmobile/fedora-rawhide-x86_64/07578549-gmobile/gmobile.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/lihis/gmobile/fedora-rawhide-x86_64/07578549-gmobile/gmobile-0.2.0-4.fc41.src.rpm

Comment 10 Tomi Lähteenmäki 2024-06-10 06:01:06 UTC
> The "systemd-rpm-macros" however, the build fails with this if it is not in BuildRequires:
>
>> RPM build errors:
>>      File must begin with "/": %{_udevrulesdir}/*.rules
>>      File must begin with "/": %{_udevhwdbdir}/*.hwdb
>
> what would be proper way to fix this?

I guess it's to BuildRequire systemd? Added it so updated URLs

Spec URL: https://download.copr.fedorainfracloud.org/results/lihis/gmobile/fedora-rawhide-x86_64/07583282-gmobile/gmobile.spec
SRPM URL: https://download.copr.fedorainfracloud.org/results/lihis/gmobile/fedora-rawhide-x86_64/07583282-gmobile/gmobile-0.2.0-5.fc41.src.rpm

Comment 11 Fedora Review Service 2024-06-10 06:24:19 UTC
Created attachment 2036915 [details]
The .spec file difference from Copr build 7468105 to 7583336

Comment 12 Fedora Review Service 2024-06-10 06:24:21 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7583336
(failed)

Build log:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2281588-gmobile/fedora-rawhide-x86_64/07583336-gmobile/builder-live.log.gz

Please make sure the package builds successfully at least for Fedora Rawhide.

- If the build failed for unrelated reasons (e.g. temporary network
  unavailability), please ignore it.
- If the build failed because of missing BuildRequires, please make sure they
  are listed in the "Depends On" field


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 13 Fedora Review Service 2024-06-10 12:32:40 UTC
Created attachment 2036922 [details]
The .spec file difference from Copr build 7583336 to 7585833

Comment 14 Fedora Review Service 2024-06-10 12:32:42 UTC
Copr build:
https://copr.fedorainfracloud.org/coprs/build/7585833
(succeeded)

Review template:
https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2281588-gmobile/fedora-rawhide-x86_64/07585833-gmobile/fedora-review/review.txt

Please take a look if any issues were found.


---
This comment was created by the fedora-review-service
https://github.com/FrostyX/fedora-review-service

If you want to trigger a new Copr build, add a comment containing new
Spec and SRPM URLs or [fedora-review-service-build] string.

Comment 15 david08741 2024-06-10 14:08:11 UTC
(In reply to Robert-André Mauchin 🐧 from comment #7)
> Use rm -v for confirmation in the logs, and %{buildroot} instead of
> ${RPM_BUILD_ROOT}/
> 
> 
> rm ${RPM_BUILD_ROOT}/%{_libdir}/libgmobile.a
> 
> ->
> 
> rm -rfv %{buildroot}%{_libdir}/libgmobile.a
> 

The rpm documentation [0] says ${RPM_....} should be preferred, i.e. ${RPM_BUILD_ROOT} should be used instead of %{buildroot}

[0] https://rpm-software-management.github.io/rpm/manual/spec.html#build-scriptlets

Comment 16 Tomi Lähteenmäki 2024-06-10 14:42:25 UTC
(In reply to david08741 from comment #15)
> The rpm documentation [0] says ${RPM_....} should be preferred, i.e.
> ${RPM_BUILD_ROOT} should be used instead of %{buildroot}
> 
> [0]
> https://rpm-software-management.github.io/rpm/manual/spec.html#build-
> scriptlets

Fedora Packaging Guidelines [0] says to pick a style and use it consistently throughout your packaging. I was about to switch to ${RPM_BUILD_ROOT} per the recent discussion in devel-list [1] but since I have used %{buildroot} in my other packages it would be consistent.

[0] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_using_buildroot_and_optflags_vs_rpm_build_root_and_rpm_opt_flags
[1] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/75YHNFYFT4EMA4PDKQRFRPFTVLWCFBCU/#L6GYEJFRLEPTPOAQDKJKFYLKWSBPGPYK

Comment 17 Robert-André Mauchin 🐧 2024-06-12 20:55:28 UTC
Package approved.

Please add it to Koschei and release-monitoring.org.
Add it to the relevant SIG if necessary.
Consider finding a comaintainer to help.

Comment 18 Tomi Lähteenmäki 2024-06-13 04:05:25 UTC
Could you update

Comment 19 Tomi Lähteenmäki 2024-06-13 04:06:35 UTC
Could you update the review status? I can't request repo if the status has not been changed by you.

Comment 20 Robert-André Mauchin 🐧 2024-06-18 00:45:29 UTC
my bad, done

Comment 21 Fedora Admin user for bugzilla script actions 2024-06-18 04:03:12 UTC
The Pagure repository was created at https://src.fedoraproject.org/rpms/gmobile

Comment 22 Tomi Lähteenmäki 2024-06-18 04:05:07 UTC
Thank you and big thanks for doing the review!

Comment 23 Fedora Update System 2024-06-18 16:17:49 UTC
FEDORA-2024-c5b896efbb (gmobile-0.2.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-c5b896efbb

Comment 24 Fedora Update System 2024-06-18 16:23:25 UTC
FEDORA-2024-c5b896efbb (gmobile-0.2.0-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 25 Fedora Update System 2024-06-18 16:23:32 UTC
FEDORA-2024-c5b896efbb (gmobile-0.2.0-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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