-
Notifications
You must be signed in to change notification settings - Fork 3k
Makefile.inc1: Also cleanup (un)compressed manpages #1295
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
base: main
Are you sure you want to change the base?
Conversation
(I don't really understand where is the appropriate place to have this conversation so I'm posting both places -- guidance welcome) Maybe that's a feature? With compressed manual pages, you can install a locally modified manual page alongside the compressed ones. Man(1) chooses the uncompressed version first, and the compressed versions are still tracked and updated with the system, while leaving the locally modified manuals alone. There are other ways to do this, but this way is zero conf. Nobody told me to do it this way, but I've been doing this for years. If others agree that it's better to clean them up instead, I'm okay with that. |
Why would you have a locally modified manual page? I enabled ZFS compression and having compressed manual pages is a waste. |
hier(7): "A well-maintained installation will include a customized version of this document." Best reason: man page developmemt and testing. Corner reason: upstream and user are opinionated about doc in divergent ways. Secret reason: keeps their playbook in the form of examples in custom manpages 😎
I have had this setup sometimes but that's pretty custom. Iirc without_mancompress is a src.conf setup. I could manpath +/man/working just as easily as you could rm /.gz. How much of a waste is it? Zfs compression knows to bypass compressed files. Again, I don't object to changing it, but I do think it's important that this is mentioned as part of the discussion. |
This is the worst reason. Why use a staging manpage in production? You could manpath for that. |
@@ -3522,6 +3537,21 @@ check-old-files: .PHONY | ||
echo $${catpage}; \ | ||
fi; \ | ||
done | sort | ||
.if ${MK_MANCOMPRESS} != "yes" |
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.
I wonder if this could somehow just be on the inner if rather than having two identical calls copies of the loop
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.
I wonder if this could somehow just be on the inner if rather than having two identical calls copies of the loop
The problem are the backslashes.
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.
Let me play with something to overcome that
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.
I've not found time to do this, so please don't let it block this. We/I can refine after the comment when I find time.
I test in production because I'm embarrassed when I proposed flawed changes in default behavior and scared of mutually unknown unknowns. |
6b9b9e7
to
00e948e
Compare
Added support to also cleanup manpages for arches not included in MAN_ARCH, if specified. |
00e948e
to
638df6c
Compare
I wonder... what do you think about making this a script in tools/build somewhere that we run. Then the repetition won't be a problem... |
I did just that in a new commit. Tell me if you like this approach to improve it further and then squash and rebase. |
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.
I'm less certain of a need for cleanup script vs doing it inline.
@@ -3497,6 +3497,23 @@ delete-old-files: .PHONY | ||
rm ${RM_I} $${catpage} <&3; \ | ||
fi; \ | ||
done | ||
.if ${MK_MANCOMPRESS} != "yes" |
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.
I think the comment here would be:
# Remove compressed copies of uncompressed manpages.
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.
Or at least, if we had a cleanup script, the cleanup script should do all the things including removing catpages, dealing with mismatched MAN_ARCH pages, etc. To that end, I would probably just leave the last commit off and focus on the first ones. I think the duplication is ok TBH.
b6b0cc6
to
080bd5c
Compare
I applied your suggestions. Hopefully fixed now.. |
IIUC @jrtc27's comment in the bug tracker, this is actually a bug fix. I would like to humbly request changes to commit msg:
EDIT: forgot some trailer details, sorry. |
We all care about commit messages. And I'll change it after:
I've been doing PR's before and know the drill.;) |
Sorry, I did not mean to imply otherwise. I've been enjoying following your work, which is very cool and well above my skill level! |
Actually, I've been never asked to add the |
We must have a conversation about the wastefulness of compressed manpages. They don't save that much space and the way we install them fills up space in ZFS snapshots by removing manpages and then installing them:
|
DO NOT ADD PULL REQUEST: LINES TO YOUR COMMIT MESSAGES OK. Please don't add these, as it slows me down when I'm landing the pull request. My landing software automatically adds them and I have to go in and remove the duplicates. |
I'm sorry for suggesting the incorrect information. |
080bd5c
to
11e26a3
Compare
Looking at it again, this looks good enough for now. Is there some reason for @bapt to do the review? |
I've been using this patch on STABLE-14 for weeks without issues. |
It's been months and this hasn't been merged. What happened? |
For me, it's just no time. |
This PR has been working for me on 14 & 15. Can we merge at least for 15? |
I plan on merging this on Friday this week. |
Cleanup (un)compressed manpages in the
check-old-files
&delete-old-files
targets.Also cleanup manpages for arches not included in MAN_ARCH, if specified.
PR:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279792