Page MenuHomeFreeBSD

share/man: Move many manpages to more correct packages
ClosedPublic

Authored by ivy on Thu, Jul 24, 8:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 29, 7:30 AM
Unknown Object (File)
Tue, Jul 29, 12:39 AM
Unknown Object (File)
Mon, Jul 28, 3:21 PM
Unknown Object (File)
Mon, Jul 28, 2:24 AM
Unknown Object (File)
Sun, Jul 27, 2:08 PM
Unknown Object (File)
Sun, Jul 27, 9:38 AM
Unknown Object (File)
Sat, Jul 26, 9:06 PM
Unknown Object (File)
Sat, Jul 26, 8:13 PM

Details

Summary

At the moment, all the manpages in share/man are in the utilities-man
package. Move some of them to the package they should actually be in,
using the new MANGROUPS feature.

Move all of section 3 to clibs-man. Although some of these are from
/usr/include/sys rather than libc, you can't practically use them
without libc, and clibs-man is where the libc manpages live already.

Move all of sections 4 and 9 to a new kernel-man package, except for
atf-test-case.4 which goes to tests-man. atf-test-case.4 is in the
wrong section, but this needs to be fixed upstream.

kernel-man requires special handling in generate-ucl.lua since it's
got a -man suffix but doesn't want the ' (manual pages)' automatic
suffix. For now, fix this by adding a list of packages that don't
get automatic suffixes.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ivy requested review of this revision.Thu, Jul 24, 8:40 PM

fix TESTSPACKAGE in man4 and MANGROUPS in man8

This revision is now accepted and ready to land.Fri, Jul 25, 6:47 AM
ivy added a subscriber: ifreund_freebsdfoundation.org.

@ifreund_freebsdfoundation.org: i'd appreciate a review on this one just to check that the existence of "FreeBSD-kernel-man" package doesn't confuse the pkgbase installer, since it looks a bit like it's a kernel package (but it's not).

In D51504#1176453, @ivy wrote:

@ifreund_freebsdfoundation.org: i'd appreciate a review on this one just to check that the existence of "FreeBSD-kernel-man" package doesn't confuse the pkgbase installer, since it looks a bit like it's a kernel package (but it's not).

Hey, thanks for the ping! Adding a FreeBSD-kernel-man packages will indeed confuse pkgbase bsdinstall and the release scripts a little due to our current use of fragile pattern matching on package names.

Unless I'm mistaken though, the only result of this confusion would be that the FreeBSD-kernel-man package is not installed. There shouldn't be any errors or installation failures resulting from the confusion.

I'll write a quick patch to handle the existence of FreeBSD-kernel-man in a minute.

@ivy This should be all that's necessary to teach pkgbase installer related code about FreeBSD-kernel-man. Would you like to include this in your patch or should I submit a separate patch?

diff --git a/release/scripts/pkgbase-stage.lua b/release/scripts/pkgbase-stage.lua
index 01eec8c44e4..1b48b4faede 100755
--- a/release/scripts/pkgbase-stage.lua
+++ b/release/scripts/pkgbase-stage.lua
@@ -46,7 +46,9 @@ local function select_packages(pkg, media, all_libcompats)
                        table.insert(components["src"], package)
                elseif package == "FreeBSD-tests" or package:match("^FreeBSD%-tests%-.*") then
                        table.insert(components["tests"], package)
-               elseif package:match("^FreeBSD%-kernel%-.*") then
+               elseif package:match("^FreeBSD%-kernel%-.*") and
+                       package ~= "FreeBSD-kernel-man"
+               then
                        -- Kernels other than FreeBSD-kernel-generic are ignored
                        if package == "FreeBSD-kernel-generic" then
                                table.insert(components["kernel"], package)
diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in
index cf8e84de692..d123394c170 100755
--- a/usr.sbin/bsdinstall/scripts/pkgbase.in
+++ b/usr.sbin/bsdinstall/scripts/pkgbase.in
@@ -165,7 +165,9 @@ local function select_packages(pkg, options)
                        table.insert(components["src"], package)
                elseif package == "FreeBSD-tests" or package:match("^FreeBSD%-tests%-.*") then
                        table.insert(components["tests"], package)
-               elseif package:match("^FreeBSD%-kernel%-.*") then
+               elseif package:match("^FreeBSD%-kernel%-.*") and
+                       package ~= "FreeBSD-kernel-man"
+               then
                        -- Kernels other than FreeBSD-kernel-generic are ignored
                        if package == "FreeBSD-kernel-generic" then
                                table.insert(components["kernel"], package)

Would you like to include this in your patch or should I submit a separate patch?

thanks! if you don't mind, i think it would make more sense for you to land that as you can definitely test it better than i can :-)

i'm not sure how the timing works out but, if no one objects to D51490 i'll probably land both that and this change later today (GMT+1) as i have a few other changes queued up that depend on MANGROUPS. i'm not too bothered if there's a brief period between then and when you land the installer changes as long as nothing actually breaks.

In D51504#1176486, @ivy wrote:

Would you like to include this in your patch or should I submit a separate patch?

thanks! if you don't mind, i think it would make more sense for you to land that as you can definitely test it better than i can :-)

i'm not sure how the timing works out but, if no one objects to D51490 i'll probably land both that and this change later today (GMT+1) as i have a few other changes queued up that depend on MANGROUPS. i'm not too bothered if there's a brief period between then and when you land the installer changes as long as nothing actually breaks.

That sounds reasonable to me, I don't think a short period on main where the installer fails to install a single man page package is much of a problem.

I'll test both with this patch but no fix in the installer as well as the installer fix and submit a separate patch with the fix :)

@ivy I've tested that this change works as expected with the existing installer scripts and merely causes the kernel man pages to not be installed by the installer (though the user can of course manually install them later).

I opened https://reviews.freebsd.org/D51519 which fixes that minor issue.

emaste added a subscriber: emaste.

LGTM. I didn't do a deep check of 100% of the share/man/*/Makefile changes