[Bug 1859627] Review Request: arm-none-eabi-gdb - GDB for (remote) debugging ARM bare-metal targets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1859627



--- Comment #7 from Andy Mender <andymenderunix@xxxxxxxxx> ---
I built the package in a Fedora 33/Rawhide x86-64 mock environment locally and
it builds cleanly, however `fedora-review` struggles with creating its build
environment.

COPR build from your SRPM:
https://copr.fedorainfracloud.org/coprs/andymenderunix/arm-none-eabi/build/1575927/
COPR build with the "pkgconfig(mpfr)" workaround:
https://copr.fedorainfracloud.org/coprs/andymenderunix/arm-none-eabi/build/1575928/

> %define target arm-none-eabi
> %define gdb_datarootdir %{_datadir}/gdb-%{target}-%{version}

Use the %global macro instead.

> License:        GPLv3+

Some source files from libiberty are BSD licensed:
gdb-9.2/libiberty/bsearch.c: BSD 3-clause "New" or "Revised" License
gdb-9.2/libiberty/random.c: BSD 3-clause "New" or "Revised" License
gdb-9.2/libiberty/strtol.c: BSD 3-clause "New" or "Revised" License
gdb-9.2/libiberty/strtoll.c: BSD 3-clause "New" or "Revised" License
gdb-9.2/libiberty/strtoul.c: BSD 3-clause "New" or "Revised" License
gdb-9.2/libiberty/strtoull.c: BSD 3-clause "New" or "Revised" License

The "License:" block should contain "GPLv3+ and BSD".

> BuildRequires:  texinfo
> BuildRequires:  texinfo-tex
> BuildRequires:  make
> BuildRequires:  gcc-c++
> BuildRequires:  autoconf
> BuildRequires:  pkgconfig(mpfr)
> BuildRequires:  pkgconfig(ncurses)
> BuildRequires:  pkgconfig(expat)

If you could sort the BuildRequires alphabetically and add gcc like so:
BuildRequires:  gcc

It's pulled in implicitly, but it's always better to be explicit :).

I also realized that Fedora 31 doesn't support "pkgconfig(mpfr)", so if you
want this package to go into Fedora 31, you need this workaround:
%if 0%{?fedora} >= 32
BuildRequires:  pkgconfig(mpfr)
%else
BuildRequires:  mpfr-devel
%endif

> %prep
> %setup -q -c -n %{name}
> chmod 644 %{SOURCE0}

Is this needed to avoid permission issues during the build?

> CFLAGS="$RPM_OPT_FLAGS" ../gdb-%{version}/configure --prefix=%{_prefix} \
>         --libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir} \
>         --datarootdir=%{gdb_datarootdir} --disable-rpath \
>         --target=%{target} --disable-nls --disable-werror --without-python --without-doc --with-xml --with-expat

- You can replace $RPM_OPT_FLAGS with the %{optflags} macro.
- I'm not sure about the current "--prefix" setting, since gdb is theoretically
a part of GCC and the prefix should include the target as well
("--prefix=%{_prefix}/%{target}"). The point here is to avoid invading
directories of the main on-target GCC package.

> %install
> cd build
> %make_install

Add the "-p" flag to %make_install to preserve timestamps.

> # we don't want these as this is a cross-compiler
> rm -rf $RPM_BUILD_ROOT%{_infodir}
> rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a

> # Get rid of the shared lib
> rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{target}-sim.a

> # Non-linux targets don't have syscalls
> rm -rf $RPM_BUILD_ROOT%{_prefix}/share/gdb/syscalls

I would probably replace $RPM_BUILD_ROOT with the %{buildroot} macro. This is
not a strong requirement, because the package consistently uses $RPM_BUILD_ROOT
everywhere.

> %{_bindir}/%{target}-*

This should be more specific to your binaries. Based on the mandir entries, you
should have lines like these:
%{_bindir}/%{target}-gdb
%{_bindir}/%{target}-gdbserver
%{_bindir}/%{target}-gdb-add-index
%{_bindir}/%{target}-gdbinit

> %dir %{_datadir}/gdb-%{target}-%{version}
> %{_datadir}/gdb-%{target}-%{version}/*

Replace these with:
%{_datadir}/gdb-%{target}-%{version}/

> %files devel
> %{_includedir}/gdb/jit-reader.h

This is quite risky, because the regular gdb package also installs this header
file. Not sure how/whether they differ, but you would need to at least make
your package own the /usr/include/gdb dir. To me that doesn't sound like a good
idea.

> %changelog
> * Wed Jul 22 2020 Austin Chang <austin880625@xxxxxxxxx> - 9.2
> - Rebuilt the package for newer version.

The version in this %changelog entry should contain a revision number, so
"9.2-1" instead of "9.2".

The full review matrix based on COPR build 1575928 (the one with the
"pkgconfig(mpfr)" fix):

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

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


Issues:
=======
- Provides: bundled(gnulib) in place as required.
  Note: Bundled gnulib but no Provides: bundled(gnulib)
  See:
  https://fedoraproject.org/wiki/Bundled_Libraries#Requirement_if_you_bundle
- 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.
  Note: License file copying.c is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text
- Package does not use a name that already exists.
  Note: A package with this name already exists. Please check
  https://src.fedoraproject.org/rpms/arm-none-eabi-gdb
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/Naming/#_conflicting_package_names


===== 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]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

Generic:
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
     Note: Using prebuilt packages
[x]: 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: "GNU Lesser General Public License", "Unknown or generated",
     "GPL (v3 or later)", "Expat License", "FSF Unlimited License (with
     Retention) GPL (v2 or later)", "FSF Unlimited License (with
     Retention)", "FSF All Permissive License", "GPL (v2 or later)", "GNU
     General Public License", "*No copyright* GPL (v3 or later)", "GNU
     Lesser General Public License (v2 or later)", "GPL (v3.1)", "GNU
     Lesser General Public License (v2.1 or later)", "*No copyright* Public
     domain", "BSD 3-clause "New" or "Revised" License", "GNU Free
     Documentation License (v1.3 or later)", "NTP License", "zlib/libpng
     license", "GNU Free Documentation License (v1.3)", "GPL (v3 or later)
     GNU Lesser General Public License (v2.1 or later)", "Public domain",
     "ISC License GPL (v3 or later)", "GNU General Public License (v3)",
     "*No copyright* GPL (v3)", "Public domain GPL (v3 or later)", "GPL (v3
     or later) (with incorrect FSF address)", "GNU Lesser General Public
     License (v3 or later)", "GPL (v2 or later) (with incorrect FSF
     address)", "GPL (with incorrect FSF address)", "*No copyright* Boost
     Software License 1.0", "Boost Software License 1.0", "*No copyright*
     zlib/libpng license". 5211 files have unknown license. Detailed output
     of licensecheck in /home/amender/rpmbuild/SPECS/arm-none-eabi-
     gdb/copr-build-1575928/review-arm-none-eabi-gdb/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[!]: Package must own all directories that it creates.
     Note: Directories without known owners: /usr/include/gdb
[x]: %build honors applicable compiler flags or justifies otherwise.
[x]: Package contains no bundled libraries without FPC exception.
[!]: 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.
[!]: 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.
[?]: Useful -debuginfo package or justification otherwise.
[x]: Package is not known to require an ExcludeArch tag.
[!]: Package complies to the Packaging Guidelines
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Package requires other packages for directories it uses.
[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 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 0 bytes in 0 files.
[x]: Packages must not store files under /srv, /opt or /usr/local

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

Generic:
[x]: Reviewer should test that the package builds in mock.
[-]: 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.
[-]: 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.
[!]: Packages should try to preserve timestamps of original installed
     files.
[!]: Spec use %global instead of %define unless justified.
     Note: %define requiring justification: %define target arm-none-eabi,
     %define gdb_datarootdir %{_datadir}/gdb-%{target}-%{version}
[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]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.

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

Generic:
[x]: Rpmlint is run on debuginfo package(s).
     Note: No rpmlint messages.
[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.
[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: arm-none-eabi-gdb-9.2-1.fc33.x86_64.rpm
          arm-none-eabi-gdb-devel-9.2-1.fc33.x86_64.rpm
          arm-none-eabi-gdb-debuginfo-9.2-1.fc33.x86_64.rpm
          arm-none-eabi-gdb-debugsource-9.2-1.fc33.x86_64.rpm
          arm-none-eabi-gdb-9.2-1.fc33.src.rpm
arm-none-eabi-gdb.x86_64: W: incoherent-version-in-changelog 9.2 ['9.2-1.fc33',
'9.2-1']
arm-none-eabi-gdb.x86_64: W: no-manual-page-for-binary arm-none-eabi-run
arm-none-eabi-gdb-devel.x86_64: W: no-documentation
arm-none-eabi-gdb.src:18: W: mixed-use-of-spaces-and-tabs (spaces: line 4, tab:
line 18)
5 packages and 0 specfiles checked; 0 errors, 4 warnings.




Rpmlint (debuginfo)
-------------------
Checking: arm-none-eabi-gdb-debuginfo-9.2-1.fc33.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
(none): E: no installed packages by name arm-none-eabi-gdb-debugsource
(none): E: no installed packages by name arm-none-eabi-gdb
(none): E: no installed packages by name arm-none-eabi-gdb-devel
(none): E: no installed packages by name arm-none-eabi-gdb-debuginfo
0 packages and 0 specfiles checked; 0 errors, 0 warnings.



Source checksums
----------------
http://ftp.gnu.org/gnu/gdb/gdb-9.2.tar.xz :
  CHECKSUM(SHA256) this package     :
360cd7ae79b776988e89d8f9a01c985d0b1fa21c767a4295e5f88cb49175c555
  CHECKSUM(SHA256) upstream package :
360cd7ae79b776988e89d8f9a01c985d0b1fa21c767a4295e5f88cb49175c555


Requires
--------
arm-none-eabi-gdb (rpmlib, GLIBC filtered):
    /usr/bin/sh
    libc.so.6()(64bit)
    libdl.so.2()(64bit)
    libexpat.so.1()(64bit)
    libgcc_s.so.1()(64bit)
    libgcc_s.so.1(GCC_3.0)(64bit)
    libgcc_s.so.1(GCC_3.4)(64bit)
    libgmp.so.10()(64bit)
    libm.so.6()(64bit)
    libmpfr.so.6()(64bit)
    libncursesw.so.6()(64bit)
    libpthread.so.0()(64bit)
    libstdc++.so.6()(64bit)
    libstdc++.so.6(CXXABI_1.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.11)(64bit)
    libstdc++.so.6(CXXABI_1.3.2)(64bit)
    libstdc++.so.6(CXXABI_1.3.3)(64bit)
    libstdc++.so.6(CXXABI_1.3.5)(64bit)
    libstdc++.so.6(CXXABI_1.3.8)(64bit)
    libstdc++.so.6(CXXABI_1.3.9)(64bit)
    libtinfo.so.6()(64bit)
    rtld(GNU_HASH)

arm-none-eabi-gdb-devel (rpmlib, GLIBC filtered):
    arm-none-eabi-gdb(x86-64)

arm-none-eabi-gdb-debuginfo (rpmlib, GLIBC filtered):

arm-none-eabi-gdb-debugsource (rpmlib, GLIBC filtered):



Provides
--------
arm-none-eabi-gdb:
    arm-none-eabi-gdb
    arm-none-eabi-gdb(x86-64)

arm-none-eabi-gdb-devel:
    arm-none-eabi-gdb-devel
    arm-none-eabi-gdb-devel(x86-64)

arm-none-eabi-gdb-debuginfo:
    arm-none-eabi-gdb-debuginfo
    arm-none-eabi-gdb-debuginfo(x86-64)
    debuginfo(build-id)

arm-none-eabi-gdb-debugsource:
    arm-none-eabi-gdb-debugsource
    arm-none-eabi-gdb-debugsource(x86-64)


-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
_______________________________________________
package-review mailing list -- package-review@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to package-review-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/package-review@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite Conditions]     [KDE Users]

  Powered by Linux