Bug 1953633 - Review Request: debugedit - Tools for debuginfo creation
Summary: Review Request: debugedit - Tools for debuginfo creation
Keywords:
Status: CLOSED CURRENTRELEASE
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: 1957744
TreeView+ depends on / blocked
 
Reported: 2021-04-26 14:43 UTC by Mark Wielaard
Modified: 2022-05-24 12:19 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1957744 (view as bug list)
Environment:
Last Closed: 2022-05-24 12:19:44 UTC
Type: ---
ngompa13: fedora-review+


Attachments (Terms of Use)

Description Mark Wielaard 2021-04-26 14:43:01 UTC
Spec URL: https://fedorapeople.org/~mjw/debugedit.spec
SRPM URL: https://fedorapeople.org/~mjw/debugedit-0.1-3.src.rpm
Description: The debugedit project provides programs and scripts for creating debuginfo and source file distributions, collect build-ids and rewrite source paths in DWARF data for debugging, tracing and profiling.
Fedora Account System Username: mjw

Comment 1 Mark Wielaard 2021-04-26 14:45:12 UTC
This is part of https://fedoraproject.org/wiki/Changes/RPM-4.17
** Split debugedit to its own project and package

Comment 2 Neal Gompa 2021-04-27 01:06:31 UTC
Taking this review.

Comment 3 Neal Gompa 2021-04-27 01:07:52 UTC
> Source: ftp://sourceware.org/pub/debugedit/%{name}-%{version}.tar.xz
> Source1: ftp://sourceware.org/pub/debugedit/%{name}-%{version}.tar.xz.asc

Please don't use FTP (HTTPS preferred!) and use numbered sources (Source0, Source1, etc.) since you have multiple sources.

Comment 4 Neal Gompa 2021-04-27 01:09:19 UTC
> %{_bindir}/find-debuginfo.sh

Is this intended to be called by users? If not, this should be in %{_libexecdir}. Also, does this *really* need to be suffixed with .sh when it's marked as an executable?

Comment 5 Mark Wielaard 2021-04-27 01:17:54 UTC
(In reply to Neal Gompa from comment #3)
> > Source: ftp://sourceware.org/pub/debugedit/%{name}-%{version}.tar.xz
> > Source1: ftp://sourceware.org/pub/debugedit/%{name}-%{version}.tar.xz.asc
> 
> Please don't use FTP (HTTPS preferred!) and use numbered sources (Source0,
> Source1, etc.) since you have multiple sources.

Fixed.
Spec URL: https://fedorapeople.org/~mjw/debugedit.spec
SRPM URL: https://fedorapeople.org/~mjw/debugedit-0.1-4.src.rpm

Comment 6 Mark Wielaard 2021-04-27 01:18:40 UTC
(In reply to Neal Gompa from comment #4)
> > %{_bindir}/find-debuginfo.sh
> 
> Is this intended to be called by users? If not, this should be in
> %{_libexecdir}. Also, does this *really* need to be suffixed with .sh when
> it's marked as an executable?

That is more a question for upstream. If it is changed upstream, I'll update the package too.

Comment 7 Panu Matilainen 2021-04-27 09:47:40 UTC
Yup, %{_bindir} for any of these is a bit of stretch. Might be easiest to just shove them all into /usr/lib/debugedit which would be closer to how they're currently packaged in rpm.

Comment 8 Neal Gompa 2021-04-27 11:16:01 UTC
(In reply to Panu Matilainen from comment #7)
> Yup, %{_bindir} for any of these is a bit of stretch. Might be easiest to
> just shove them all into /usr/lib/debugedit which would be closer to how
> they're currently packaged in rpm.

Yes, please install these into %{_libexecdir}/debugedit, then.

Comment 9 Mark Wielaard 2021-04-27 16:22:48 UTC
Note the upstream discussion about the exact installation location of the executables is here:
https://sourceware.org/pipermail/debugedit/2021-March/000026.html
For now the consensus (if there really is one) seems to be that it doesn't really matter much, but given that the executables have a documented user interface (or should have one) bindir is more appropriate than libexecdir.

Could we move this discussion on bin/libexec to the upstream list? It seems the fedora package should simply follow what is decided upstream.

Are there any other spec review issues to resolve?

Comment 10 Neal Gompa 2021-04-27 22:08:26 UTC
(In reply to Mark Wielaard from comment #9)
> Note the upstream discussion about the exact installation location of the
> executables is here:
> https://sourceware.org/pipermail/debugedit/2021-March/000026.html
> For now the consensus (if there really is one) seems to be that it doesn't
> really matter much, but given that the executables have a documented user
> interface (or should have one) bindir is more appropriate than libexecdir.
> 
> Could we move this discussion on bin/libexec to the upstream list? It seems
> the fedora package should simply follow what is decided upstream.
> 
> Are there any other spec review issues to resolve?

If you expect *users* to use it, then make man pages and document it and fix the weird ".sh" name for "find-debuginfo". Otherwise, move it to "%{_libexecdir}/debugedit" and deal with making it available in "%{_bindir}" later once you've sorted it out.

Comment 11 Neal Gompa 2021-04-27 22:10:06 UTC
To note, I specifically disagree with the premise that debugedit is documented. It is not. However, *you are upstream*, so I can convey these issues to you directly to resolve them.

Comment 12 Mark Wielaard 2021-04-27 22:25:22 UTC
Hi Neal,

(In reply to Neal Gompa from comment #10)
> If you expect *users* to use it, then make man pages and document it and fix
> the weird ".sh" name for "find-debuginfo". Otherwise, move it to
> "%{_libexecdir}/debugedit" and deal with making it available in "%{_bindir}"
> later once you've sorted it out.

(In reply to Neal Gompa from comment #11)
> To note, I specifically disagree with the premise that debugedit is
> documented. It is not. However, *you are upstream*, so I can convey these
> issues to you directly to resolve them.

I do believe things are documented, just not with man pages, which I agree we should add for the 1.0 release.

I understand your reasons for believing libexecdir/debugedit is a better choice than bindir. If you want my personal opinion then I believe bindir is the right place for now. You can try to convince me otherwise, but I am not the only upstream hackers and I think the discussion and decision where to install things should be made upstream. And if it changes upstream then I'll obviously change the spec to follow that.

So, does that mean this is the only issue you see with the current spec?

Thanks,

Mark

Comment 13 Neal Gompa 2021-04-28 01:16:35 UTC
(In reply to Mark Wielaard from comment #12)
> Hi Neal,
> 
> (In reply to Neal Gompa from comment #10)
> > If you expect *users* to use it, then make man pages and document it and fix
> > the weird ".sh" name for "find-debuginfo". Otherwise, move it to
> > "%{_libexecdir}/debugedit" and deal with making it available in "%{_bindir}"
> > later once you've sorted it out.
> 
> (In reply to Neal Gompa from comment #11)
> > To note, I specifically disagree with the premise that debugedit is
> > documented. It is not. However, *you are upstream*, so I can convey these
> > issues to you directly to resolve them.
> 
> I do believe things are documented, just not with man pages, which I agree
> we should add for the 1.0 release.
> 
> I understand your reasons for believing libexecdir/debugedit is a better
> choice than bindir. If you want my personal opinion then I believe bindir is
> the right place for now. You can try to convince me otherwise, but I am not
> the only upstream hackers and I think the discussion and decision where to
> install things should be made upstream. And if it changes upstream then I'll
> obviously change the spec to follow that.

Meh. This is going to be a problem of your own making anyway, so...

> 
> So, does that mean this is the only issue you see with the current spec?

No, though it is the severe one.

The other issue is this:

> Release: 4

You are missing the DistTag as required for Fedora packages: https://docs.fedoraproject.org/en-US/packaging-guidelines/DistTag/

Comment 14 Neal Gompa 2021-04-28 01:18:38 UTC
> # For do_file, gdb_add_index
> Requires: gdb

Please use a file dependency here, otherwise you'll undo this: https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot

Comment 15 Panu Matilainen 2021-04-28 05:29:35 UTC
As for the placement, I specifically suggested /usr/lib/debugedit rather than libexec, because it's traditionally more of a gray area between /usr/bin and /usr/libexec where all kinds of hard to define stuff lives. These programs quite certainly are NOT "end user" things, but have documented interfaces nevertheless and can be called standalone by knowledgeable users. Which is what I also said in the upstream discussion, so I'll shut up now :)

Comment 16 Neal Gompa 2021-04-28 09:50:17 UTC
(In reply to Panu Matilainen from comment #15)
> As for the placement, I specifically suggested /usr/lib/debugedit rather
> than libexec, because it's traditionally more of a gray area between
> /usr/bin and /usr/libexec where all kinds of hard to define stuff lives.
> These programs quite certainly are NOT "end user" things, but have
> documented interfaces nevertheless and can be called standalone by
> knowledgeable users. Which is what I also said in the upstream discussion,
> so I'll shut up now :)


FWIW, that's fine with /usr/libexec too, that's pretty much what that's for. Putting binaries in /usr/libexec rather than /usr/lib makes it a lot easier for people who want to put noexec on the /usr/lib and /usr/lib64 paths (excluding known systemd paths).

Comment 17 Mark Wielaard 2021-04-29 12:07:39 UTC
(In reply to Neal Gompa from comment #13)
> The other issue is this:
> 
> > Release: 4
> 
> You are missing the DistTag as required for Fedora packages:
> https://docs.fedoraproject.org/en-US/packaging-guidelines/DistTag/

(In reply to Neal Gompa from comment #14)
> > # For do_file, gdb_add_index
> > Requires: gdb
> 
> Please use a file dependency here, otherwise you'll undo this:
> https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot

Both fixed in:
https://fedorapeople.org/~mjw/debugedit.spec
https://fedorapeople.org/~mjw/debugedit-0.1-5.fc33.src.rpm

For the minimal gdb I added a Suggests:

# For do_file, gdb_add_index
# We only need gdb-add-index, so suggest gdb-minimal (full gdb is also ok)
Requires: /usr/bin/gdb-add-index
Suggests: gdb-minimal

Comment 18 Neal Gompa 2021-04-29 15:03:26 UTC
Doesn't look fixed.

Comment 19 Neal Gompa 2021-04-29 15:04:03 UTC
Are you sure you uploaded the changed files? I see exactly the same thing as before...

Comment 20 Mark Wielaard 2021-04-29 15:08:52 UTC
(In reply to Neal Gompa from comment #19)
> Are you sure you uploaded the changed files? I see exactly the same thing as
> before...

Oops. The debugedit-0.1-5.fc33.src.rpm was new, but I forgot to upload the new debugedit.spec. Should now be there https://fedorapeople.org/~mjw/debugedit.spec

Comment 21 Mark Wielaard 2021-05-05 23:03:26 UTC
There is now an upstream 0.2 release, new spec and srpm are here:

https://fedorapeople.org/~mjw/debugedit.spec
https://fedorapeople.org/~mjw/debugedit-0.2-1.fc33.src.rpm

For an 1.0 release there are just some upstream fixes for rpm integration left.
But I believe the Fedora spec is ready now. Are there any issues left to resolve before this can be given an fedora-review+?

Comment 22 Neal Gompa 2021-05-06 00:10:55 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]: Package does not contain any libtool archives (.la)
[x]: Rpath absent or only used for internal libs.

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: "GNU General Public License, Version 2", "GNU Lesser General
     Public License, Version 2.1", "Unknown or generated", "GNU General
     Public License v3.0 or later", "[generated file]", "GNU General Public
     License, Version 3 GNU General Public License, Version 2", "FSF
     Unlimited License (with Retention) GNU General Public License v2.0 or
     later [generated file]", "FSF Unlimited License [generated file]",
     "*No copyright* [generated file]", "GNU General Public License v2.0 or
     later [generated file]", "Expat License [generated file]", "GNU
     General Public License v2.0 or later", "GNU Library General Public
     License v2 or later". 9 files have unknown license. Detailed output of
     licensecheck in /home/ngompa/1953633-debugedit/licensecheck.txt
[x]: License file installed when any subpackage combination is installed.
[x]: If the package is under multiple licenses, the licensing breakdown
     must be documented in the spec.
[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.
[-]: 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.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 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 requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[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]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: 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.
[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]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
[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: debugedit-0.2-1.fc35.x86_64.rpm
          debugedit-debuginfo-0.2-1.fc35.x86_64.rpm
          debugedit-debugsource-0.2-1.fc35.x86_64.rpm
          debugedit-0.2-1.fc35.src.rpm
debugedit.x86_64: W: spelling-error Summary(en_US) debuginfo -> debug info, debug-info, debugging
debugedit.x86_64: W: spelling-error %description -l en_US debuginfo -> debug info, debug-info, debugging
debugedit.x86_64: W: spelling-error %description -l en_US libiberty -> liberty, liberality
debugedit.x86_64: W: spelling-error %description -l en_US libelf -> libel, libels, lib elf
debugedit.x86_64: W: spelling-error %description -l en_US libdw -> libido
debugedit.src: W: spelling-error Summary(en_US) debuginfo -> debug info, debug-info, debugging
debugedit.src: W: spelling-error %description -l en_US debuginfo -> debug info, debug-info, debugging
debugedit.src: W: spelling-error %description -l en_US libiberty -> liberty, liberality
debugedit.src: W: spelling-error %description -l en_US binutils -> bilinguals
debugedit.src: W: spelling-error %description -l en_US elfutils -> futile
debugedit.src: W: spelling-error %description -l en_US libelf -> libel, libels, lib elf
debugedit.src: W: spelling-error %description -l en_US libdw -> libido
4 packages and 0 specfiles checked; 0 errors, 12 warnings.




Rpmlint (debuginfo)
-------------------
Checking: debugedit-debuginfo-0.2-1.fc35.x86_64.rpm
1 packages and 0 specfiles checked; 0 errors, 0 warnings.





Rpmlint (installed packages)
----------------------------
debugedit.x86_64: W: spelling-error Summary(en_US) debuginfo -> debug info, debug-info, debugging
debugedit.x86_64: W: spelling-error %description -l en_US debuginfo -> debug info, debug-info, debugging
debugedit.x86_64: W: spelling-error %description -l en_US libiberty -> liberty, liberality
debugedit.x86_64: W: spelling-error %description -l en_US libelf -> libel, libels, lib elf
debugedit.x86_64: W: spelling-error %description -l en_US libdw -> libido
3 packages and 0 specfiles checked; 0 errors, 5 warnings.



Source checksums
----------------
https://sourceware.org/pub/debugedit/0.2/debugedit-0.2.tar.xz.sig :
  CHECKSUM(SHA256) this package     : 169b45ed03c2edce6d550588d26c2a6445486cf4711466fdc85c3b7bddc1289d
  CHECKSUM(SHA256) upstream package : 169b45ed03c2edce6d550588d26c2a6445486cf4711466fdc85c3b7bddc1289d
https://sourceware.org/pub/debugedit/0.2/debugedit-0.2.tar.xz :
  CHECKSUM(SHA256) this package     : b78258240bb7ec5bbff109495092dcc111aa0393f135f2d2a4b43887ba26a942
  CHECKSUM(SHA256) upstream package : b78258240bb7ec5bbff109495092dcc111aa0393f135f2d2a4b43887ba26a942


Requires
--------
debugedit (rpmlib, GLIBC filtered):
    /usr/bin/bash
    /usr/bin/gdb-add-index
    binutils
    coreutils
    dwz
    elfutils
    findutils
    gawk
    grep
    libc.so.6()(64bit)
    libdw.so.1()(64bit)
    libdw.so.1(ELFUTILS_0.167)(64bit)
    libelf.so.1()(64bit)
    libelf.so.1(ELFUTILS_1.0)(64bit)
    libelf.so.1(ELFUTILS_1.3)(64bit)
    libelf.so.1(ELFUTILS_1.6)(64bit)
    rtld(GNU_HASH)
    sed
    xz

debugedit-debuginfo (rpmlib, GLIBC filtered):

debugedit-debugsource (rpmlib, GLIBC filtered):



Provides
--------
debugedit:
    debugedit
    debugedit(x86-64)

debugedit-debuginfo:
    debugedit-debuginfo
    debugedit-debuginfo(x86-64)
    debuginfo(build-id)

debugedit-debugsource:
    debugedit-debugsource
    debugedit-debugsource(x86-64)



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

Comment 23 Neal Gompa 2021-05-06 00:11:24 UTC
This looks as good as it's going to get, so...

PACKAGE APPROVED.

Comment 24 Neal Gompa 2021-05-06 00:12:46 UTC
I noticed that this is still an issue in the file list:

> %{_bindir}/find-debuginfo.sh
> [...]
> %{_mandir}/man1/find-debuginfo.sh.1*

Please fix this upstream before 1.0 release.

Comment 25 Mark Wielaard 2021-05-06 00:34:31 UTC
(In reply to Neal Gompa from comment #24)
> I noticed that this is still an issue in the file list:
> 
> > %{_bindir}/find-debuginfo.sh
> > [...]
> > %{_mandir}/man1/find-debuginfo.sh.1*
> 
> Please fix this upstream before 1.0 release.

You mean the .sh extension?
Yes, this is upstream bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27640
I hope we can simply change it to find-debuginfo, but I want to double check what that means for rpm compatibility first.

Comment 26 Neal Gompa 2021-05-06 03:52:20 UTC
(In reply to Mark Wielaard from comment #25)
> (In reply to Neal Gompa from comment #24)
> > I noticed that this is still an issue in the file list:
> > 
> > > %{_bindir}/find-debuginfo.sh
> > > [...]
> > > %{_mandir}/man1/find-debuginfo.sh.1*
> > 
> > Please fix this upstream before 1.0 release.
> 
> You mean the .sh extension?
> Yes, this is upstream bug:
> https://sourceware.org/bugzilla/show_bug.cgi?id=27640
> I hope we can simply change it to find-debuginfo, but I want to double check
> what that means for rpm compatibility first.

It doesn't mean anything for RPM compatibility, since we already macroize its usage and can replace it with any path we want. We'll just adjust RPM to point to new paths and be done with it.

Comment 27 Jens Petersen 2021-05-06 07:24:40 UTC
Well I have to agree I don't feel it makes sense to move these programs from /usr/lib/rpm/ into /usr/bin/ ...

Comment 28 Jens Petersen 2021-05-06 07:25:09 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/debugedit

Comment 29 Mark Wielaard 2021-05-06 12:11:26 UTC
(In reply to Jens Petersen from comment #27)
> Well I have to agree I don't feel it makes sense to move these programs from
> /usr/lib/rpm/ into /usr/bin/ ...

The whole idea is that these programs are usable outside of rpm. Other distros can use them independent from rpm (e.g. in flatpak). And developers can use them in their builds when creating redistributable debuginfo/sources whether or not they are creating rpms for them.

Comment 30 Package Review 2022-05-24 12:19:44 UTC
Package is available in repositories, closing.


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