https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Bug ID: 1901306 Summary: Review Request: tlpi - Utilities to display namespaces and control groups Product: Fedora Version: rawhide Hardware: All OS: Linux Status: NEW Component: Package Review Severity: medium Priority: medium Assignee: nobody@fedoraproject.org Reporter: goeran@uddeborg.se QA Contact: extras-qa@fedoraproject.org CC: package-review@lists.fedoraproject.org Target Milestone: --- Classification: Fedora
Spec URL: ftp://ftp.uddeborg.se/pub/tlpi/tlpi.spec SRPM URL: ftp://ftp.uddeborg.se/pub/tlpi/tlpi-201025-1.fc33.src.rpm Description: The book The Linux Programming Interface and training courses given by man7.org are accompanied with a set of code examples. Some of these examples are useful in their own right. This package includes the following utilities. - pid_namespaces Show the PID namespace hierarchy. - namespace_of Show the namespace memberships of one or more processes in the context of the user or PID namespace hierarchy. See the bundled source code for further documentation. - userns_overview Display a hierarchical view of the user namespaces on the system along with the member processes for each namespace. - view_v2_cgroups Display one or more subtrees in the cgroups v2 hierarchy. The following info is displayed for each cgroup: the cgroup type, the controllers enabled in the cgroup, and the process and thread members of the cgroup.
Fedora Account System Username: goeran
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Sheng Mao shngmao@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |shngmao@gmail.com
--- Comment #1 from Sheng Mao shngmao@gmail.com ---
%doc namespaces/namespaces_of.go
Why not also pack the source code of the other three go files?
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Göran Uddeborg goeran@uddeborg.se changed:
What |Removed |Added ---------------------------------------------------------------------------- Doc Type|--- |If docs needed, set a value
--- Comment #2 from Göran Uddeborg goeran@uddeborg.se --- As indicated in the %description, in the beginning of namespaces_of.go there is a comment which could be useful for the end user. For the other programs the corresponding explanations are much shorter, short enough I could include it in extenso in the package description.
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
--- Comment #3 from Göran Uddeborg goeran@uddeborg.se --- Updated version for Fedora 34, now including an explicit build requirement on gcc-go. SPEC: ftp://ftp.uddeborg.se/pub/tlpi/tlpi-2.spec SRPM: ftp://ftp.uddeborg.se/pub/tlpi/tlpi-201025-2.fc34.src.rpm
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Göran Uddeborg goeran@uddeborg.se changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(goeran@uddeborg.s | |e) |
--- Comment #5 from Göran Uddeborg goeran@uddeborg.se --- Updated versions with the most recent upstreams sources:
Spec: ftp://ftp.uddeborg.se/pub/tlpi/tlpi-3.spec SRPM: ftp://ftp.uddeborg.se/pub/tlpi/tlpi-220211-1.fc36.src.rpm
Only some minor modifications were made in the update to the programs included in this Fedora package.
Product: Fedora Version: rawhide Component: Package Review
Göran Uddeborg goeran@uddeborg.se has canceled Package Review package-review@lists.fedoraproject.org's request for Göran Uddeborg goeran@uddeborg.se's needinfo: Bug 1901306: Review Request: tlpi - Utilities to display namespaces and control groups https://bugzilla.redhat.com/show_bug.cgi?id=1901306
--- Comment #5 from Göran Uddeborg goeran@uddeborg.se --- Updated versions with the most recent upstreams sources:
Spec: ftp://ftp.uddeborg.se/pub/tlpi/tlpi-3.spec SRPM: ftp://ftp.uddeborg.se/pub/tlpi/tlpi-220211-1.fc36.src.rpm
Only some minor modifications were made in the update to the programs included in this Fedora package.
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
--- Comment #6 from Göran Uddeborg goeran@uddeborg.se --- In case anyone would like to use these programs, I've made the package available via copr: https://copr.fedorainfracloud.org/coprs/goeran/tlpi/
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Petr Menšík pemensik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pemensik@redhat.com
--- Comment #7 from Petr Menšík pemensik@redhat.com --- It would help if you used http:// for pointing to those URL. It seems fedora-review tool is not able to download those files from FTP anymore.
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Petr Menšík pemensik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |fedora-review+ Status|NEW |POST
--- Comment #8 from Petr Menšík pemensik@redhat.com --- Package Review ==============
Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed
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++/
===== MUST items =====
C/C++: [x]: Package does not contain kernel modules. [x]: Package contains no static executables. [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: "Unknown or generated", "GNU Affero General Public License v3.0", "GNU Lesser General Public License, Version 3", "*No copyright* GNU Lesser General Public License, Version 3 GNU General Public License, Version 3", "GNU General Public License v3.0 or later", "GNU Lesser General Public License v3.0 or later", "GNU General Public License v2.0 or later", "GNU General Public License v3.0 or later GNU General Public License v2.0 or later". 75 files have unknown license. Detailed output of licensecheck in /home/pemensik/fedora/rawhide/review-tlpi/licensecheck.txt [x]: License file installed when any subpackage combination is installed. [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. [x]: 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 40960 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). [?]: Package functions as described. [!]: 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. [-]: %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]: 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: tlpi-220211-1.fc38.x86_64.rpm tlpi-debuginfo-220211-1.fc38.x86_64.rpm tlpi-debugsource-220211-1.fc38.x86_64.rpm tlpi-220211-1.fc38.src.rpm ============================================================= rpmlint session starts ============================================================= rpmlint: 2.4.0 configuration: /usr/lib/python3.10/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/tmpdk2o1jmo')] checks: 31, packages: 4
tlpi.x86_64: W: position-independent-executable-suggested /usr/bin/namespaces_of tlpi.x86_64: W: position-independent-executable-suggested /usr/bin/pid_namespaces tlpi.x86_64: W: position-independent-executable-suggested /usr/bin/userns_overview tlpi.x86_64: W: position-independent-executable-suggested /usr/bin/view_v2_cgroups tlpi.x86_64: W: no-manual-page-for-binary namespaces_of tlpi.x86_64: W: no-manual-page-for-binary pid_namespaces tlpi.x86_64: W: no-manual-page-for-binary userns_overview tlpi.x86_64: W: no-manual-page-for-binary view_v2_cgroups ============================== 4 packages and 0 specfiles checked; 0 errors, 8 warnings, 0 badness; has taken 0.7 s ==============================
Rpmlint (debuginfo) ------------------- Checking: tlpi-debuginfo-220211-1.fc38.x86_64.rpm ============================================================= rpmlint session starts ============================================================= rpmlint: 2.4.0 configuration: /usr/lib/python3.10/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/tmp1yth827b')] checks: 31, packages: 1
============================== 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.2 s ==============================
Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.4.0 configuration: /usr/lib/python3.11/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: 31, packages: 3
tlpi.x86_64: W: unused-direct-shlib-dependency /usr/bin/namespaces_of /lib64/libm.so.6 tlpi.x86_64: W: unused-direct-shlib-dependency /usr/bin/pid_namespaces /lib64/libm.so.6 tlpi.x86_64: W: unused-direct-shlib-dependency /usr/bin/userns_overview /lib64/libm.so.6 tlpi.x86_64: W: unused-direct-shlib-dependency /usr/bin/view_v2_cgroups /lib64/libm.so.6 tlpi.x86_64: W: position-independent-executable-suggested /usr/bin/namespaces_of tlpi.x86_64: W: position-independent-executable-suggested /usr/bin/pid_namespaces tlpi.x86_64: W: position-independent-executable-suggested /usr/bin/userns_overview tlpi.x86_64: W: position-independent-executable-suggested /usr/bin/view_v2_cgroups tlpi.x86_64: W: no-manual-page-for-binary namespaces_of tlpi.x86_64: W: no-manual-page-for-binary pid_namespaces tlpi.x86_64: W: no-manual-page-for-binary userns_overview tlpi.x86_64: W: no-manual-page-for-binary view_v2_cgroups 3 packages and 0 specfiles checked; 0 errors, 12 warnings, 0 badness; has taken 1.4 s
Source checksums ---------------- https://man7.org/tlpi/code/download/tlpi-220211-dist.tar.gz : CHECKSUM(SHA256) this package : f57f0b1c759319411a656410c7abb92d104daf3e1c23793fc606f922eb9dab7d CHECKSUM(SHA256) upstream package : f57f0b1c759319411a656410c7abb92d104daf3e1c23793fc606f922eb9dab7d
Requires -------- tlpi (rpmlib, GLIBC filtered): ld-linux-x86-64.so.2()(64bit) libc.so.6()(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libgcc_s.so.1(GCC_3.3.1)(64bit) libgo.so.22()(64bit) libm.so.6()(64bit) rtld(GNU_HASH)
tlpi-debuginfo (rpmlib, GLIBC filtered):
tlpi-debugsource (rpmlib, GLIBC filtered):
Provides -------- tlpi: tlpi tlpi(x86-64)
tlpi-debuginfo: debuginfo(build-id) tlpi-debuginfo tlpi-debuginfo(x86-64)
tlpi-debugsource: tlpi-debugsource tlpi-debugsource(x86-64)
Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23 Command line :/usr/bin/fedora-review --name tlpi Buildroot used: fedora-rawhide-x86_64 Active plugins: Generic, C/C++, Shell-api Disabled plugins: Haskell, Python, Ocaml, Perl, Java, SugarActivity, fonts, R, PHP Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Petr Menšík pemensik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags| |needinfo?(goeran@uddeborg.s | |e)
--- Comment #9 from Petr Menšík pemensik@redhat.com --- I have passed the review.
Since the core of tlpi distribution is large collection of code examples, I think it would make sense to export also BuildArch: noarch subpackage containing the code as documentation (%doc), perhaps in %_datadir/%{name}/examples directory. Easy way to install and read those examples by package manager would be nice I think. It would be possible to downloading them from srpm, but that is not so user friendly.
I might be at least compiled in %check phase. There are some examples not compiling on my system, but most of them can be compiled. Would it make sense to make those examples installable as a package too?
For example installing ./cap/show_secbits binary to /usr/bin/tlpi-cap-show_secbits executable. Of course those should be in separate subpackage, because most people would not need them. But since they are included, why not building them?
I have made useful list with simple command: make all find * -type f -executable | while read F; do DN=$(dirname -- "$F"); BN=$(basename -- "$F"); echo install $F %{_bindir}/tlpi-$DN-$BN; done
It might be part of tlpi-examples-bin or something similar. Would that make sense?
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
--- Comment #10 from Petr Menšík pemensik@redhat.com --- Now I see they just need some dependencies. Even better reason to have it as package, which would Recommends: required devel packages, gcc and make. Explained on https://man7.org/tlpi/code/faq.html
Used following diff to skip broken examples:
diff --git a/acl/Makefile b/acl/Makefile index ef35fae..68748c3 100644 --- a/acl/Makefile +++ b/acl/Makefile @@ -2,7 +2,8 @@ include ../Makefile.inc
GEN_EXE =
-LINUX_EXE = acl_update acl_view +# Both are broken +LINUX_EXE = #acl_update acl_view
EXE = ${GEN_EXE} ${LINUX_EXE}
diff --git a/signals/Makefile b/signals/Makefile index 8b70f0e..3568525 100644 --- a/signals/Makefile +++ b/signals/Makefile @@ -1,10 +1,11 @@ include ../Makefile.inc
GEN_EXE = catch_rtsigs demo_SIGFPE ignore_pending_sig intquit \ - nonreentrant nonatomic_uint64 \ + nonreentrant \ ouch sig_receiver sig_sender sig_speed_sigsuspend \ sigmask_longjmp sigmask_siglongjmp \ t_kill t_sigaltstack t_sigsuspend t_sigqueue t_sigwaitinfo +# Broken: nonatomic_uint64
LINUX_EXE = signalfd_sigval
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Petr Menšík pemensik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|nobody@fedoraproject.org |pemensik@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
--- Comment #11 from Göran Uddeborg goeran@uddeborg.se --- Thank you for your review and suggestions. I will consider it all and be back with an updated version as soon as I get some time.
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Göran Uddeborg goeran@uddeborg.se changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(goeran@uddeborg.s |needinfo?(pemensik@redhat.c |e) |om)
--- Comment #12 from Göran Uddeborg goeran@uddeborg.se --- Ok, here is my next try. I have followed your suggestion and made two subpackages "examples" and "examples-bin". I also made a separate package "licenses" for the license files which is required by the other packages.
In addition, all binaries are built position independent now, something which required a bit of patching of some of the Makefiles.
Finally I have upgraded to the most recent upstreams version.
Since this is a significant update since the previous review, not just a few corrections, I welcome you to take a closer look than with most review updates if you wish and have the time. I'll wait asking for a distgit repository until you reply one way or the other.
Updated files can be found under these (https ☺) links:
https://www.uddeborg.se/tlpi/tlpi-4.spec https://www.uddeborg.se/tlpi/tlpi-221220-1.fc38.src.rpm
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
--- Comment #13 from Jakub Kadlčík jkadlcik@redhat.com --- Copr build: https://copr.fedorainfracloud.org/coprs/build/5288902 (succeeded)
Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-rev...
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
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Petr Menšík pemensik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(pemensik@redhat.c | |om) |
--- Comment #14 from Petr Menšík pemensik@redhat.com --- please use %make_build CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" instead of just make to pass default rpm hardening flags to the build. Otherwise it looks good.
and use install -p where possible, it should make unmodified files keep their last modified time.
Otherwise yes, that is how I thought about it. Thanks, looks good to me!
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
--- Comment #15 from Göran Uddeborg goeran@uddeborg.se --- Thank you for the review! I'll do the last changes you suggested and request a repo now.
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
--- Comment #16 from Fedora Admin user for bugzilla script actions fedora-admin-xmlrpc@fedoraproject.org --- The Pagure repository was created at https://src.fedoraproject.org/rpms/tlpi
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|POST |MODIFIED
--- Comment #17 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-902128f1c5 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-902128f1c5
https://bugzilla.redhat.com/show_bug.cgi?id=1901306
Fedora Update System updates@fedoraproject.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|MODIFIED |CLOSED Resolution|--- |ERRATA Last Closed| |2023-01-31 20:42:15
--- Comment #18 from Fedora Update System updates@fedoraproject.org --- FEDORA-2023-902128f1c5 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
package-review@lists.fedoraproject.org