RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1995915 - don't use pre-generated documentation when building NetworkManager package
Summary: don't use pre-generated documentation when building NetworkManager package
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2021-12-20
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: NetworkManager
Version: 8.5
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: beta
: ---
Assignee: Thomas Haller
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On: 2052721
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-20 07:14 UTC by Thomas Haller
Modified: 2022-11-08 11:14 UTC (History)
9 users (show)

Fixed In Version: NetworkManager-1.39.3-1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 10:07:31 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-94178 0 None None None 2021-08-20 07:15:03 UTC
Red Hat Product Errata RHBA-2022:7680 0 None None None 2022-11-08 10:08:04 UTC

Description Thomas Haller 2021-08-20 07:14:16 UTC
For RHEL/Fedora RPMs of NetworkManager, we of course base them on the upstream release tarball. That tarball contains a pre-generated documentation.

For Fedora RPM builds, we always regenerate the documentation during package build. But for RHEL builds, we currently use the pre-generated docs.

That has at least two problems:

- the pre-generated docs are generated with a certain set of configure options (as controlled by the upstream release script). These configure options might not be the same as the downstream options. Docs might depend on the configure option, so when we use pre-generated docs in RHEL they might be wrong or we may need to patch them.

- when we do a follow-up patch (bugfix) to the package which affects the documentation, then either the documentation is wrong, or we need to patch them too.

For that reason, there is also a patch "9999-fix-pregen-doc.patch" in our dist-git, to fixup documentation.


Using pre-generated docs is presumably done to avoid multilib issues, when docs get build twice on different architectures. Whether that is still an actual problem is unclear (and needs to be investigated). At least, for Fedora we don't do this, so it's not clear what the problem actually is.


Let's stop using pre-generated docs.

In the early phase of rhel-8.6 development, change

   %bcond_with    regen_docs

so that we build the docs. Then see what issues it causes (multilib issues?). If there are any, solve them differently, but not by using pregenerated docs.

Comment 1 Beniamino Galvani 2021-09-10 07:43:57 UTC
We are pre-generating documentation to avoid multilib conflicts:

http://pkgs.devel.redhat.com/cgit/rpms/NetworkManager/commit/?id=829341cbed6f7e59887e2e721edd8adf53350611

In other packages, like nm-applet, we also had multilib conflicts and they were fixed in the latest versions of build tools (gtk-doc and xslt). So, I think it would be worth to try to switch back to generating the documentation during build and see if there are still issues. In this way we can ensure that the documentation is always up-to-date, and less maintenance effort is required.

Comment 4 Gris Ge 2022-01-18 08:01:16 UTC
This rpm spec related issue does not require bug tracking. Just use existing rebase bug to change the SPEC file, no QE or errata effort required for this issue.

Comment 5 Thomas Haller 2022-01-18 08:06:17 UTC
this issue was not fixed.

we ship RPMs, thus, the way we build our RPM (or problems with that) are subject to a rhbz.
Even if the issue had only a very remote practical application for RHEL (which it has not), then we still track our tasks (also) a rhbz. Just closing the bug is wrong.

Comment 7 Thomas Haller 2022-01-18 09:40:56 UTC
scratch build:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=42456262


dist-git patch:

<<<<<
From a1acb0c779c0b1f37bf504af198dc81bc2c837d3 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller>
Date: Tue, 18 Jan 2022 10:17:12 +0100
Subject: [PATCH 1/1] generate docs during build instead of using pre-generated
 (rh #1995915)

Resolves: #1995915
---
 9999-fix-pregen-doc.patch | 44 ---------------------------------------
 NetworkManager.spec       | 14 +++++--------
 2 files changed, 5 insertions(+), 53 deletions(-)
 delete mode 100644 9999-fix-pregen-doc.patch

diff --git a/9999-fix-pregen-doc.patch b/9999-fix-pregen-doc.patch
deleted file mode 100644
index 4d3bca9fe257..000000000000
--- a/9999-fix-pregen-doc.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e1f76a6472f68c52b90679d9fe679a2b1a93b78b Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller>
-Date: Tue, 27 Aug 2019 15:47:32 +0200
-Subject: [PATCH] patch documentation with the proper default values
-
-We don't regenerate the documentation for RHEL builds, but
-the docs from the tarball are generated with a certain set
-of defaults.
-
-Patch the man pages with the proper values.
----
- docs/api/html/NetworkManager.conf.html | 2 +-
- man/NetworkManager.conf.5              | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/docs/api/html/NetworkManager.conf.html b/docs/api/html/NetworkManager.conf.html
-index 765ff10ad2..2ea978c0d5 100644
---- a/docs/api/html/NetworkManager.conf.html
-+++ b/docs/api/html/NetworkManager.conf.html
-@@ -658,7 +658,7 @@ unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth
-           are "<code class="literal">syslog</code>" and "<code class="literal">journal</code>".
-           When NetworkManager is started with "<code class="literal">--debug</code>"
-           in addition all messages will be printed to stderr.
--          If unspecified, the default is "<code class="literal">syslog</code>".
-+          If unspecified, the default is "<code class="literal">journal</code>".
-           </p></td>
- </tr>
- <tr>
-diff --git a/man/NetworkManager.conf.5 b/man/NetworkManager.conf.5
-index fc32393e09..f135e3a9c3 100644
---- a/man/NetworkManager.conf.5
-+++ b/man/NetworkManager.conf.5
-@@ -664,7 +664,7 @@ INFO\&.
- .PP
- \fIbackend\fR
- .RS 4
--The logging backend\&. Supported values are "syslog" and "journal"\&. When NetworkManager is started with "\-\-debug" in addition all messages will be printed to stderr\&. If unspecified, the default is "syslog"\&.
-+The logging backend\&. Supported values are "syslog" and "journal"\&. When NetworkManager is started with "\-\-debug" in addition all messages will be printed to stderr\&. If unspecified, the default is "journal"\&.
- .RE
- .PP
- \fIaudit\fR
--- 
-2.31.1
-
diff --git a/NetworkManager.spec b/NetworkManager.spec
index afd4c340d505..0a5046909203 100644
--- a/NetworkManager.spec
+++ b/NetworkManager.spec
@@ -7,7 +7,7 @@
 %global epoch_version 1
 %global rpm_version 1.36.0
 %global real_version 1.35.4
-%global release_version 0.4
+%global release_version 0.5
 %global snapshot %{nil}
 %global git_sha %{nil}
 
@@ -60,8 +60,7 @@
 %bcond_without ppp
 %bcond_without nmtui
 %bcond_without nm_cloud_setup
-# on RHEL we don't regenerate the documentation
-%bcond_with    regen_docs
+%bcond_without regen_docs
 %if %{bcond_default_debug}
 %bcond_without debug
 %else
@@ -195,12 +194,6 @@ Patch2: 0002-firewall-Default-to-iptables-backend-to-preserve-behavior.patch
 # Bugfixes that are only relevant until next rebase of the package.
 #Patch1000: 1000-some.patch
 
-# The pregenerated docs contain default values and paths that depend
-# on the configure options when creating the source tarball.
-# As last step, patch the documentation with the proper defaults
-# for RHEL.
-Patch9999: 9999-fix-pregen-doc.patch
-
 Requires(post): systemd
 %if 0%{?fedora} || 0%{?rhel} > 7
 Requires(post): systemd-udev
@@ -1169,6 +1162,9 @@ fi
 
 
 %changelog
+* Tue Jan 18 2022 Thomas Haller <thaller> - 1:1.36.0-0.5
+- generate docs during build instead of using pre-generated (rh #1995915)
+
 * Wed Jan 12 2022 Wen Liang <wenliang> - 1:1.36.0-0.4
 - Upgrade to 1.35.4 release (development)
 - ipv4ll: fix assert on external LL address removal (rh #2028404)
-- 
2.34.1


<<<<<



so, there is the potential that this causes multilib issues. But I don't think we will find out, without doing it. And then, the fix for multilib issues might not be to use pre-generate docs, but to fix the actual problems (e.g. where docs are not generated reproducible). I propose to do this, ASAP.

Comment 8 Beniamino Galvani 2022-01-19 14:58:39 UTC
The dist-git patch LGTM. There were multilib issues in the past caused by gtkdoc generating different HTMLs on different architectures, but AFAIK those problems have been solved.

Comment 11 Thomas Haller 2022-01-21 10:49:49 UTC
I updated ITM.
There is no MR, beyond comment 7.

Comment 14 Thomas Haller 2022-02-01 15:04:55 UTC
there is a problem. See https://rpmdiff.engineering.redhat.com/run/528515/3/

Back to NEW (but keep on errata. We must fix this, because the current/latest RHEL build no longer pre-generates the docs)

Comment 15 Thomas Haller 2022-02-01 16:04:50 UTC
(In reply to Thomas Haller from comment #14)
> there is a problem. See https://rpmdiff.engineering.redhat.com/run/528515/3/
> 
> Back to NEW (but keep on errata. We must fix this, because the
> current/latest RHEL build no longer pre-generates the docs)

the problem is:

NetworkManager-libnm-devel:
  File /usr/share/gtk-doc/html/libnm/libnm-nm-wifi-p2p-peer.html got added to aarch64 i686 
  File /usr/share/gtk-doc/html/libnm/NMWifiP2PPeer.html got removed from aarch64 i686

Comment 17 Thomas Haller 2022-02-09 21:05:17 UTC
(In reply to Thomas Haller from comment #15)
> (In reply to Thomas Haller from comment #14)
> > there is a problem. See https://rpmdiff.engineering.redhat.com/run/528515/3/
> > 
> > Back to NEW (but keep on errata. We must fix this, because the
> > current/latest RHEL build no longer pre-generates the docs)
> 
> the problem is:
> 
> NetworkManager-libnm-devel:
>   File /usr/share/gtk-doc/html/libnm/libnm-nm-wifi-p2p-peer.html got added
> to aarch64 i686 
>   File /usr/share/gtk-doc/html/libnm/NMWifiP2PPeer.html got removed from
> aarch64 i686

this is a gtk-doc issue (bug 2052721).

Comment 18 Thomas Haller 2022-02-15 16:35:46 UTC
change reverted: https://src.osci.redhat.com/rpms/NetworkManager/c/5d41d396f622c0c44f2f42e64444f4c0004a8fd8?branch=rhel-8.6.0

Postponing to rhel-8.7.

Comment 24 Thomas Haller 2022-04-28 14:47:13 UTC
fail verification for "1.39.2-2" due to https://rpmdiff.engineering.redhat.com/run/536092/17/

this is already fixed upstream by https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/f1f8ae5a833cd22f59b2f5b880367af484cd9594, the next update on rhel-8.7 will fix this, and we can move to ON_QA again.

Back to POST.

Comment 25 Thomas Haller 2022-05-06 06:01:47 UTC
now it seems good: https://rpmdiff.engineering.redhat.com/run/536996/3/

Back to ON_QA.

Comment 28 errata-xmlrpc 2022-11-08 10:07:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (NetworkManager bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7680


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