-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify manpage makefiles, move pages to better sexions, revisit some #12196
Conversation
c5db9d7
to
a25740b
Compare
a25740b
to
139f723
Compare
What seems to be a common solution to the "BSD General Commands Manual" problem is to pre-render the pages with |
139f723
to
a4ab519
Compare
Rebased |
I gave this a really quick skim. I don't see anything wrong textually at first glance. I agree with the assessment about OpenZFS as the section. I also agree with the solution of changing it at build-time for Linux, as this is friendlier to BSD as noted. I think I disagree with the "Move properties, parameters, events, and concepts to section 7" commit. I think it's fine for zfsprops and zfsconcepts to be in either 8 (System administration commands and daemons) or 5 (File formats and conventions), but I don't think 7 (Miscellaneous) is appropriate for those or the others that are in 5 now. I got the section names from: https://en.wikipedia.org/wiki/Man_page#Manual_sections I'm happy to approve this if: that commit is dropped, that commit is moved to a new PR, someone convinces me section 7 is appropriate, or @behlendorf or @ahrens makes an executive decisions that section 7 will be used. |
The .7 migration is taken from #12149, but you'll be hard-pressed to find any explicit reasoning there. I don't feel too strongly about moving (all of) these to .7, but these have been bugging me for a while too, so I'd like to arrive at some good consensus of where to put them. These pages moved to .7:
According to FreeBSD, the sexions are as such:
And man-db:
Straight off the bat: none of these pages are programs or commands (indeed, zfs*.8 and zpool*.8 are leftovers from the unified zfs.8 and zpool.8 pages, aren't they?), so it's not 1. Likewise for 2, 3, and 6. This leaves 4, 5, 7, and 8. According to FreeBSD's intro(4):
then follow The device abstraction, Accessing Devices, and Drivers without device nodes subsexions. FreeBSD stores what seem to be surprisingly useful descriptions of most kernel drivers and their ioctl interfaces. According to Linux man-pages' intro(4):
It also has 40 files in it (9 of which aliases, 2 to ioctls in .2): laconic descriptions of /dev/{zero,full,null,ttyS,tty} (ttyS(4), in particular, says
lol), drivers removed in 2.6.35 (wavelan(4)), potentially-useful descriptions of some other drivers from 4.9 (smartpqi(4), but just give it time), and some ioctl interfaces (sd(4), st(4), "The information returned in the parameter is the disk geometry of the drive as understood by DOS!"). There's an argument to be made for {spl,zfs}-module-parameters.4. It's a valid interpretation of what sexion 4 means. Would it be my go-to before? Not really, but then I don't use FreeBSD enough to have a high opinion of sexion 4. There's something to be said about zfs-events.4. According to FreeBSD's intro(5):
According to Linux man-pages' intro(5):
Indeed! These are in agreement. .5 consists entirely of file formats. Exclusively. According to FreeBSD's intro(8):
It also says
But
These are rare, and scrolling through the listing I've found one other non-command page (YP(8)/NIS(8), "yp – description of the YP/NIS system", with improved defaults and administrtor's notes. it also references SunOS 4.x (and that's the thing that dates it least), wasn't touched since 2011, and I can't really stop asking myself why it's in .8). According to Linux man-pages' intro(8):
Obviously much stricter, and I haven't noted a single page (well, beside the ones in question :Р) on my system that isn't a daemon or an administrative command. It goes without saying that these pages have no place in .8. According to FreeBSD's intro(7):
According to Linux man-pages' intro(7):
"The rest." Well, zfsconcepts.7 and zpoolconcepts.7 make explicit sense here, considering they're, well, overviews. Considering all of this, I propose the following filing, in descending order of preference:
Thoughts? |
The convention on Linux is that man pages for stuff in {/usr}/bin goes in section 1 and man pages for commands in {/usr}/sbin go in section 8. So zfs-* and zpool-* should be in section 8 at the moment. Though one can make an argument that I can see the case for section 4 for module parameters, especially on FreeBSD. I think you've made a fairly compelling case for section 7. I'll approve this and we'll see what other people think. |
Section 4 seems like the right place to put the module options and event descriptions to me. Even though virtually all of the Linux modules don't bother to document their kernel parameters I did find one which does. The While we're at it we could also rename I think putting everything else listed in this PR in section 7 would make good sense. |
While section 4 for does have an exception for pseudo devices like The zfs-events manual page, having spent a bit more time with it, seems to describe a way to interface with the zfs in the kernel, so would it make more sense to put it in section 9? Otherwise, I really don't think it belongs in section 4 and the only other place for it seems to be section 7. Both FreeBSD and Linux seems pretty explicit that only
This makes a lot of sense to me, and as it happens it, there aren't any conflicts for zfs.4 and spl.4 in either FreeBSD or FreeBSD Ports (I checked using ports-mgmt/pkg-provides). |
Section 4 is for kernel-userspace interfaces – for the most part this means files under /dev, especially on berkeley derivatives, and that for the most part means physical devices because a modern kernel is 90% drivers by weight, but it describes kernel modules (and their parameters, the vast majority of .4 in FreeBSD has a LOADER TUNABLES sexion) and interfaces in general, so it's not that scandalous. How's this look?
|
zfs-events seems to fit better in section 7. It documents the event information one obtains by the |
Regarding Everything else looks good to me. |
The prevailing style is to use either nothing, or the originating organisational umbrella (here: OpenZFS), and these aren't Linux manpages This also deduplicates the substitution code, and makes adding/removing sexions simpler in future Signed-off-by: Ahelenia Ziemiańska <[email protected]>
a4ab519
to
607f4fd
Compare
Sure, makes sense; updated as follows:
|
607f4fd
to
9a912aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating this. I skimmed through all the updated pages locally and they looked good. I also verified the updated to me, I also verified the new install-data-hook
is working correctly on Linux. So my only feedback is the suggested tweak to zpool-events.8
.
The pages moved as follows: zpool-features.{5 => 7} spl{-module-parameters.5 => .4} zfs{-module-parameters.5 => .4} zfs-events.5 => into zpool-events.8 zfsconcepts.{8 => 7} zfsprops.{8 => 7} zpoolconcepts.{8 => 7} zpoolprops.{8 => 7} Signed-off-by: Ahelenia Ziemiańska <[email protected]> Co-authored-by: Daniel Ebdrup Jensen <[email protected]> Closes openzfs#12149
Most notably this fixes the vdev_id(8) non-.Xrs in vdev_id.conf.5 Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
9a912aa
to
c3fe354
Compare
Motivation and Context
#12149
Description
On top of #12169 for now, that move, and some pages I revisited having the benefit of hind-sight, having rewritten every manpage now
One thing that is potentially controversial here is that I replaced the
.Os
->.Os Linux
with.Os OpenZFS
– the prevailing style is to either leave this blank or set.Os
to the organisational umbrella the page came out of (Debian/OpenSSL/&c.), which is OpenZFS in this case (and definitely not Linux).How Has This Been Tested?
Looked at it? I trust that judicious use of
git grep -i zpoolprops.8
and/orfind man -type f -exec sed -i 's/Xr zpoolprops 8/Xr zpoolprops 7/' {} +
with manual touch-ups where necessary got everything.If you turn the OpenZFS back into Linux, the installed tree is identical before/after
Types of changes
Checklist:
Signed-off-by
.