* [PATCH 0/7] Improve support for compressed man pages
@ 2016-04-16 0:25 Alexander Miller
[not found] ` <20160416022503.1df762cb.alex.miller-Mmb7MZpHnFY@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Alexander Miller @ 2016-04-16 0:25 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
Hi,
when I looked at the Makefile I noticed it has incomplete compression
support. Most notably the screen and uninstall targets didn't support
switching to a different compression type. More precisely, uninstall
supported only switching from gz or bz2 (but not xz) to uncompressed.
The screen target had no explicit compression support and when it
worked for compressed files it was pure luck.
The patches 2 and 3 provide new recipes for both targets that can
handle any combination of the supported compression types. Any file,
installed or source, may be uncompressed or compressed with any of
gz, bz2, or xz. Whether you compress before or after screen and uninstall
doesn't matter any more.
The other patches add a few minor improvements I'd suggest.
So long,
Alex
---
Alexander Miller (7):
Makefile: Use better xz options
Makefile: Improve uninstall target for compressed man pages
Makefile: Support compressed files for screen target
Makefile: Skip already compressed files in gz/bz2/xz targets
Makefile: Add uncompress target to undo effect of gz/bz2/xz targets
Makefile: Avoid compressing very small files in gz/bz2/xz targets
Makefile: Mention xz in the instructive comment at top
Makefile | 54 +++++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 41 insertions(+), 13 deletions(-)
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 16+ messages in thread[parent not found: <20160416022503.1df762cb.alex.miller-Mmb7MZpHnFY@public.gmane.org>]
* [PATCH 1/7] Makefile: Use better xz options [not found] ` <20160416022503.1df762cb.alex.miller-Mmb7MZpHnFY@public.gmane.org> @ 2016-04-16 0:45 ` Alexander Miller 2016-04-16 0:52 ` [PATCH 2/7] Makefile: Improve uninstall target for compressed man pages Alexander Miller ` (5 subsequent siblings) 6 siblings, 0 replies; 16+ messages in thread From: Alexander Miller @ 2016-04-16 0:45 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA >From xz(1): The selected compression settings determine the memory requirements of the decompressor, thus using a too high preset level might make it painful to decompress the file on an old system with little RAM. Specifically, it's not a good idea to blindly use -9 for everything like it often is with gzip(1) and bzip2(1). With small files like man pages, a large dictionary doesn't help at all; so set a small dictionary size (1MiB). Also, "with text files having one-byte alignment, setting pb=0 can improve compression slightly." Otherwise the defaults are fine (specifically, the extreme presets don't improve compression here and would be a waste of CPU cycles). Signed-off-by: Alexander Miller <alex.miller-Mmb7MZpHnFY@public.gmane.org> --- I made a few tests and the settings described above which should work well in theory also did so in practice. The only surprise was that the extreme presets actually compressed a little worse. Playing with the "nice" parameter could squeeze out a few more bits, but I don't think that would be appropriate; I don't want to optimize the settings for the current man pages content. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 237310d..95ffc2f 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ MANDIR=$(prefix)/share/man GZIP=gzip -9 BZIP2=bzip2 -9 -LZMA=xz -9 +LZMA=xz --lzma2=dict=1M,pb=0 all: screen remove install -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 2/7] Makefile: Improve uninstall target for compressed man pages [not found] ` <20160416022503.1df762cb.alex.miller-Mmb7MZpHnFY@public.gmane.org> 2016-04-16 0:45 ` [PATCH 1/7] Makefile: Use better xz options Alexander Miller @ 2016-04-16 0:52 ` Alexander Miller 2016-04-16 0:59 ` [PATCH 3/7] Makefile: Support compressed files for screen target Alexander Miller ` (4 subsequent siblings) 6 siblings, 0 replies; 16+ messages in thread From: Alexander Miller @ 2016-04-16 0:52 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA Now sources and installed man pages may be in plain/gz/bz2/xz format (independently). Any combination works reliably. Signed-off-by: Alexander Miller <alex.miller-Mmb7MZpHnFY@public.gmane.org> --- I would have preferred find -print0, but sed is line-based. As long as there are no man page filenames with newlines, that's good enough. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 95ffc2f..a14078c 100644 --- a/Makefile +++ b/Makefile @@ -29,9 +29,9 @@ screen: done uninstall remove: - for i in man?/*; do \ - rm -f $(MANDIR)/"$$i" $(MANDIR)/"$$i".gz $(MANDIR)/"$$i".bz2; \ - done + find man? -mindepth 1 -maxdepth 1 -print | \ + sed -e 's/\.\(gz\|bz2\|xz\)$$//; s/.*/&\n&.gz\n&.bz2\n&.xz/' | \ + (cd $(MANDIR) && xargs -d \\n rm -f) gz: for i in man?; do $(GZIP) "$$i"/*; done -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 3/7] Makefile: Support compressed files for screen target [not found] ` <20160416022503.1df762cb.alex.miller-Mmb7MZpHnFY@public.gmane.org> 2016-04-16 0:45 ` [PATCH 1/7] Makefile: Use better xz options Alexander Miller 2016-04-16 0:52 ` [PATCH 2/7] Makefile: Improve uninstall target for compressed man pages Alexander Miller @ 2016-04-16 0:59 ` Alexander Miller 2016-04-16 1:01 ` [PATCH 4/7] Makefile: Skip already compressed files in gz/bz2/xz targets Alexander Miller ` (3 subsequent siblings) 6 siblings, 0 replies; 16+ messages in thread From: Alexander Miller @ 2016-04-16 0:59 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA Now, make screen supports (optional, possibly different) compression of the sources and installed man pages. Thus, allgz/allbz2/allxz/all targets should update correctly even when switching compression types. Signed-off-by: Alexander Miller <alex.miller-Mmb7MZpHnFY@public.gmane.org> --- The formatting of the script is a bit unusual, but I wanted to keep it compact and I think it's still readable. Feel free to add more line breaks to the if blocks or use longer variable names if you don't like it. --- Makefile | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a14078c..8f2e25c 100644 --- a/Makefile +++ b/Makefile @@ -22,11 +22,29 @@ allxz: xz all screen: mkdir -p not_installed for i in man?/*; do \ - if [ $(MANDIR)/"$$i" -nt "$$i" ]; then \ - cmp -s $(MANDIR)/"$$i" "$$i" > /dev/null 2>&1; \ - if [ "$$?" != 0 ]; then mv "$$i" not_installed; fi; \ - fi; \ - done + if b="$${i%.bz2}" && [ "$$b".bz2 = "$$i" ]; then c1=bunzip2; \ + elif b="$${i%.gz}" && [ "$$b".gz = "$$i" ]; then c1=gunzip; \ + elif b="$${i%.xz}" && [ "$$b".xz = "$$i" ]; then c1=unxz; \ + else b="$$i"; c1=; fi; \ + b=$(MANDIR)/"$$b"; \ + if [ "$$b" -nt "$$i" ]; then c2=; \ + elif [ "$$b".bz2 -nt "$$i" ]; then c2=bunzip2; b="$$b.bz2"; \ + elif [ "$$b".gz -nt "$$i" ]; then c2=gunzip; b="$$b.gz"; \ + elif [ "$$b".xz -nt "$$i" ]; then c2=unxz; b="$$b.xz"; \ + else continue; fi; \ + if [ -z "$$c1$$c2" ]; then \ + cmp -s "$$i" "$$b"; \ + elif [ -z "$$c1" ]; then \ + $$c2 -c "$$b" | cmp -s "$$i" -; \ + elif [ -z "$$c2" ]; then \ + $$c1 -c "$$i" | cmp -s - "$$b"; \ + else \ + [ "$$c1" = "$$c2" ] && cmp -s "$$i" "$$b" || \ + $$c1 -c "$$i" | { $$c2 -c "$$b" | \ + cmp -s /dev/fd/3 -; } 3<&0; \ + fi || mv "$$i" not_installed; \ + done; \ + rmdir not_installed 2> /dev/null; true uninstall remove: find man? -mindepth 1 -maxdepth 1 -print | \ -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 4/7] Makefile: Skip already compressed files in gz/bz2/xz targets [not found] ` <20160416022503.1df762cb.alex.miller-Mmb7MZpHnFY@public.gmane.org> ` (2 preceding siblings ...) 2016-04-16 0:59 ` [PATCH 3/7] Makefile: Support compressed files for screen target Alexander Miller @ 2016-04-16 1:01 ` Alexander Miller 2016-04-16 1:09 ` [PATCH 6/7] Makefile: Avoid compressing very small " Alexander Miller ` (2 subsequent siblings) 6 siblings, 0 replies; 16+ messages in thread From: Alexander Miller @ 2016-04-16 1:01 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA Signed-off-by: Alexander Miller <alex.miller-Mmb7MZpHnFY@public.gmane.org> --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8f2e25c..cdedb4a 100644 --- a/Makefile +++ b/Makefile @@ -52,13 +52,16 @@ uninstall remove: (cd $(MANDIR) && xargs -d \\n rm -f) gz: - for i in man?; do $(GZIP) "$$i"/*; done + find man? -mindepth 1 -maxdepth 1 -name '*.[gx]z' -o -name '*.bz2' \ + -o -exec $(GZIP) '{}' + bz2: - for i in man?; do $(BZIP2) "$$i"/*; done + find man? -mindepth 1 -maxdepth 1 -name '*.[gx]z' -o -name '*.bz2' \ + -o -exec $(BZIP2) '{}' + xz: - for i in man?; do $(LZMA) "$$i"/*; done + find man? -mindepth 1 -maxdepth 1 -name '*.[gx]z' -o -name '*.bz2' \ + -o -exec $(LZMA) '{}' + # Use with # make HTDIR=/some/dir HTOPTS=whatever html -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 6/7] Makefile: Avoid compressing very small files in gz/bz2/xz targets [not found] ` <20160416022503.1df762cb.alex.miller-Mmb7MZpHnFY@public.gmane.org> ` (3 preceding siblings ...) 2016-04-16 1:01 ` [PATCH 4/7] Makefile: Skip already compressed files in gz/bz2/xz targets Alexander Miller @ 2016-04-16 1:09 ` Alexander Miller 2016-04-16 1:09 ` [PATCH 7/7] Makefile: Mention xz in the instructive comment at top Alexander Miller 2016-04-16 4:50 ` [PATCH 0/7] Improve support for compressed man pages Mike Frysinger 6 siblings, 0 replies; 16+ messages in thread From: Alexander Miller @ 2016-04-16 1:09 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA Compressing very small files has only disadvantages. There is the overhead of running a decompressor, and because of the added file headers they become even bigger. Since the scan and uninstall targets now properly handle mixing compressed and uncompressed files, it becomes possible to avoid compression where it's not beneficial. Signed-off-by: Alexander Miller <alex.miller-Mmb7MZpHnFY@public.gmane.org> --- If you want to support this feature but disable it by default, you can set NOCOMPRESS_SIZE=0. --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 86b1568..2c5719c 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ MANDIR=$(prefix)/share/man GZIP=gzip -9 BZIP2=bzip2 -9 LZMA=xz --lzma2=dict=1M,pb=0 +NOCOMPRESS_SIZE=256 all: screen remove install @@ -53,15 +54,15 @@ uninstall remove: gz: find man? -mindepth 1 -maxdepth 1 -name '*.[gx]z' -o -name '*.bz2' \ - -o -exec $(GZIP) '{}' + + -o -size +$(NOCOMPRESS_SIZE)c -exec $(GZIP) '{}' + bz2: find man? -mindepth 1 -maxdepth 1 -name '*.[gx]z' -o -name '*.bz2' \ - -o -exec $(BZIP2) '{}' + + -o -size +$(NOCOMPRESS_SIZE)c -exec $(BZIP2) '{}' + xz: find man? -mindepth 1 -maxdepth 1 -name '*.[gx]z' -o -name '*.bz2' \ - -o -exec $(LZMA) '{}' + + -o -size +$(NOCOMPRESS_SIZE)c -exec $(LZMA) '{}' + uncompress: find man? -name '*.gz' -exec gunzip '{}' + \ -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH 7/7] Makefile: Mention xz in the instructive comment at top [not found] ` <20160416022503.1df762cb.alex.miller-Mmb7MZpHnFY@public.gmane.org> ` (4 preceding siblings ...) 2016-04-16 1:09 ` [PATCH 6/7] Makefile: Avoid compressing very small " Alexander Miller @ 2016-04-16 1:09 ` Alexander Miller 2016-04-16 4:50 ` [PATCH 0/7] Improve support for compressed man pages Mike Frysinger 6 siblings, 0 replies; 16+ messages in thread From: Alexander Miller @ 2016-04-16 1:09 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA Signed-off-by: Alexander Miller <alex.miller-Mmb7MZpHnFY@public.gmane.org> --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2c5719c..2c4aa6a 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ # Do "make screen" first, if you want to protect already installed, # more up-to-date manual pages than the ones included in this package. # Do "make install" to copy the pages to their destination. -# Do "make gz" or "make bz2" first if you use compressed source pages. +# Do "make gz", "make bz2", or "make xz" first if you use compressed +# source pages. DESTDIR= prefix?=/usr -- 2.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] Improve support for compressed man pages [not found] ` <20160416022503.1df762cb.alex.miller-Mmb7MZpHnFY@public.gmane.org> ` (5 preceding siblings ...) 2016-04-16 1:09 ` [PATCH 7/7] Makefile: Mention xz in the instructive comment at top Alexander Miller @ 2016-04-16 4:50 ` Mike Frysinger [not found] ` <20160416045058.GS6588-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org> 6 siblings, 1 reply; 16+ messages in thread From: Mike Frysinger @ 2016-04-16 4:50 UTC (permalink / raw) To: Alexander Miller Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 953 bytes --] On 16 Apr 2016 02:25, Alexander Miller wrote: > when I looked at the Makefile I noticed it has incomplete compression > support. Most notably the screen and uninstall targets didn't support > switching to a different compression type. More precisely, uninstall > supported only switching from gz or bz2 (but not xz) to uncompressed. > The screen target had no explicit compression support and when it > worked for compressed files it was pure luck. > The patches 2 and 3 provide new recipes for both targets that can > handle any combination of the supported compression types. Any file, > installed or source, may be uncompressed or compressed with any of > gz, bz2, or xz. Whether you compress before or after screen and uninstall > doesn't matter any more. imo, we should just drop all compression support. distros already handle this properly and pick whatever they want/need. if no one is using this code, then it's just sucking up space. -mike [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20160416045058.GS6588-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org>]
* Re: [PATCH 0/7] Improve support for compressed man pages [not found] ` <20160416045058.GS6588-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org> @ 2016-04-16 16:30 ` Alexander Miller [not found] ` <20160416183013.352f4ba6.alex.miller-Mmb7MZpHnFY@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Alexander Miller @ 2016-04-16 16:30 UTC (permalink / raw) To: Mike Frysinger Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w On Sat, 16 Apr 2016 00:50:58 -0400 Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote: > imo, we should just drop all compression support. distros already > handle this properly and pick whatever they want/need. For distros this is useless, of course. I've never used it either. But I guess there are still people installing stuff from sources without using a package manager, and they might find it convenient. > if no one > is using this code, then it's just sucking up space. I'm not concerned about the space, but code needs to be maintained. IMO, as long as it works, we can keep it; if it has issues we'd better remove it. We can drop compression support or do it right - I'm fine with either option. We shouldn't keep the status quo, though. Alex -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20160416183013.352f4ba6.alex.miller-Mmb7MZpHnFY@public.gmane.org>]
* Re: [PATCH 0/7] Improve support for compressed man pages [not found] ` <20160416183013.352f4ba6.alex.miller-Mmb7MZpHnFY@public.gmane.org> @ 2016-04-18 12:57 ` Michael Kerrisk (man-pages) [not found] ` <5714D9D2.8050501-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2016-04-18 14:49 ` [PATCH 0/7] Improve support for compressed man pages Mike Frysinger 1 sibling, 1 reply; 16+ messages in thread From: Michael Kerrisk (man-pages) @ 2016-04-18 12:57 UTC (permalink / raw) To: Alexander Miller, Mike Frysinger Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, linux-man-u79uwXL29TY76Z2rM5mHXA On 04/16/2016 05:30 PM, Alexander Miller wrote: > On Sat, 16 Apr 2016 00:50:58 -0400 > Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote: > >> imo, we should just drop all compression support. distros already >> handle this properly and pick whatever they want/need. > > For distros this is useless, of course. I've never used it either. > But I guess there are still people installing stuff from sources > without using a package manager, and they might find it convenient. > >> if no one >> is using this code, then it's just sucking up space. > > I'm not concerned about the space, but code needs to be maintained. > IMO, as long as it works, we can keep it; if it has issues we'd > better remove it. > > We can drop compression support or do it right - I'm fine with > either option. We shouldn't keep the status quo, though. I'm inclined to say drop it. Would you mind putting together a patch, Alex? Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <5714D9D2.8050501-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 0/7] Improve support for compressed man pages [not found] ` <5714D9D2.8050501-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2016-04-18 17:10 ` Alexander Miller [not found] ` <20160418191026.7fa8c669.alex.miller-Mmb7MZpHnFY@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: Alexander Miller @ 2016-04-18 17:10 UTC (permalink / raw) To: Michael Kerrisk (man-pages) Cc: Mike Frysinger, linux-man-u79uwXL29TY76Z2rM5mHXA On Mon, 18 Apr 2016 13:57:54 +0100 Michael Kerrisk wrote: > On 04/16/2016 05:30 PM, Alexander Miller wrote: > > On Sat, 16 Apr 2016 00:50:58 -0400 > > Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote: > > > >> imo, we should just drop all compression support. distros already > >> handle this properly and pick whatever they want/need. > > [...] > > > > We can drop compression support or do it right - I'm fine with > > either option. We shouldn't keep the status quo, though. > > I'm inclined to say drop it. Would you mind putting together a > patch, Alex? I'm not sure what exactly we should do. The problem isn't really compressing the files, but the "screen" and "uninstall" targets. If we drop support for compressing man pages ourselves, what shall we do with those targets? They aren't useful for distros either. And they *still* might have to deal with files compressed by the distro's package manager (if a user tries to update manually). We could - drop "screen" and/or "uninstall", too (getting rid of the problem and simplifying the Makefile but being inconvenient for users); - fix them to handle man pages compressed by the distro (but not compressed sources, resulting in only slightly simpler patches than those I've posted); - or explicitly state "screen" (and maybe "uninstall") don't support compressed files. This is problematic IMO, especially since they are used by "make all". Moreover, "uninstall" can remove .gz/.bz2 files but no .xz files right now; this could be changed to include .xz or to exclude .gz/.bz2. What do you want me to drop/fix with a new patch? Alex -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20160418191026.7fa8c669.alex.miller-Mmb7MZpHnFY@public.gmane.org>]
* Re: [PATCH 0/7] Improve support for compressed man pages [not found] ` <20160418191026.7fa8c669.alex.miller-Mmb7MZpHnFY@public.gmane.org> @ 2016-04-18 18:30 ` Mike Frysinger [not found] ` <20160418212955.498ce1dd.alex.miller@gmx.de> 0 siblings, 1 reply; 16+ messages in thread From: Mike Frysinger @ 2016-04-18 18:30 UTC (permalink / raw) To: Alexander Miller Cc: Michael Kerrisk (man-pages), linux-man-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 2335 bytes --] On 18 Apr 2016 19:10, Alexander Miller wrote: > On Mon, 18 Apr 2016 13:57:54 +0100 Michael Kerrisk wrote: > > On 04/16/2016 05:30 PM, Alexander Miller wrote: > > > On Sat, 16 Apr 2016 00:50:58 -0400 > > > Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote: > > > > > >> imo, we should just drop all compression support. distros already > > >> handle this properly and pick whatever they want/need. > > > > [...] > > > > > > We can drop compression support or do it right - I'm fine with > > > either option. We shouldn't keep the status quo, though. > > > > I'm inclined to say drop it. Would you mind putting together a > > patch, Alex? > > I'm not sure what exactly we should do. > The problem isn't really compressing the files, but the "screen" > and "uninstall" targets. > > If we drop support for compressing man pages ourselves, what shall > we do with those targets? They aren't useful for distros either. > And they *still* might have to deal with files compressed by the > distro's package manager (if a user tries to update manually). > We could > - drop "screen" and/or "uninstall", too > (getting rid of the problem and simplifying the Makefile but > being inconvenient for users); > - fix them to handle man pages compressed by the distro > (but not compressed sources, resulting in only slightly simpler > patches than those I've posted); > - or explicitly state "screen" (and maybe "uninstall") don't support > compressed files. This is problematic IMO, especially since they > are used by "make all". Moreover, "uninstall" can remove .gz/.bz2 > files but no .xz files right now; this could be changed to include > .xz or to exclude .gz/.bz2. imo, drop the screen target. for uninstall, that's a semi-common idiom that packages have (and autotools supports out of the box). keeping that sounds fine. i don't think we need to worry about supporting `make uninstall` if the package was installed initially by the distro -- you have to deal with version skew of course which pretty much no one does. just make sure `make install && make uninstall` works sanely. wrt compression, we could be lazy/greedy here too. when we uninstall locale.5, just rm locale.5*. in practice, this is unlikely to be an issue ... -mike [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20160418212955.498ce1dd.alex.miller@gmx.de>]
[parent not found: <20160418212955.498ce1dd.alex.miller-Mmb7MZpHnFY@public.gmane.org>]
* Re: [PATCH] Makefile: Drop compression support and screen target [not found] ` <20160418212955.498ce1dd.alex.miller-Mmb7MZpHnFY@public.gmane.org> @ 2016-04-18 19:45 ` Alexander Miller 0 siblings, 0 replies; 16+ messages in thread From: Alexander Miller @ 2016-04-18 19:45 UTC (permalink / raw) To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w, Mike Frysinger Cc: linux-man-u79uwXL29TY76Z2rM5mHXA Fixup. --- Sorry, I messed it up. I forgot to delete the part of the initial comment mentioning screen. please append this to the previous patch and apply them together. --- diff --git a/Makefile b/Makefile index eef45ef..f494e8f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,3 @@ -# Do "make screen" first, if you want to protect already installed, -# more up-to-date manual pages than the ones included in this package. # Do "make install" to copy the pages to their destination. DESTDIR= -- -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH 0/7] Improve support for compressed man pages [not found] ` <20160416183013.352f4ba6.alex.miller-Mmb7MZpHnFY@public.gmane.org> 2016-04-18 12:57 ` Michael Kerrisk (man-pages) @ 2016-04-18 14:49 ` Mike Frysinger [not found] ` <20160418144918.GK5369-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org> 1 sibling, 1 reply; 16+ messages in thread From: Mike Frysinger @ 2016-04-18 14:49 UTC (permalink / raw) To: Alexander Miller Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w [-- Attachment #1: Type: text/plain, Size: 711 bytes --] On 16 Apr 2016 18:30, Alexander Miller wrote: > On Sat, 16 Apr 2016 00:50:58 -0400 > Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote: > > if no one > > is using this code, then it's just sucking up space. > > I'm not concerned about the space, but code needs to be maintained. > IMO, as long as it works, we can keep it; if it has issues we'd > better remove it. sorry for the ambigious term ... i'm not referring to disk space, but to the code "sucking up space in the Makefiles and our eyes". > We can drop compression support or do it right - I'm fine with > either option. We shouldn't keep the status quo, though. i'm not advocating for the status quo ;) -mike [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <20160418144918.GK5369-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org>]
* Re: [PATCH 0/7] Improve support for compressed man pages [not found] ` <20160418144918.GK5369-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org> @ 2016-04-18 15:08 ` walter harms [not found] ` <5714F856.9090206-fPG8STNUNVg@public.gmane.org> 0 siblings, 1 reply; 16+ messages in thread From: walter harms @ 2016-04-18 15:08 UTC (permalink / raw) To: Alexander Miller, linux-man-u79uwXL29TY76Z2rM5mHXA, mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w Am 18.04.2016 16:49, schrieb Mike Frysinger: > On 16 Apr 2016 18:30, Alexander Miller wrote: >> On Sat, 16 Apr 2016 00:50:58 -0400 >> Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote: >>> if no one >>> is using this code, then it's just sucking up space. >> >> I'm not concerned about the space, but code needs to be maintained. >> IMO, as long as it works, we can keep it; if it has issues we'd >> better remove it. > > sorry for the ambigious term ... i'm not referring to disk space, but > to the code "sucking up space in the Makefiles and our eyes". > >> We can drop compression support or do it right - I'm fine with >> either option. We shouldn't keep the status quo, though. > > i'm not advocating for the status quo ;) > -mike as one of those people that like to have it directly from source ... I would advocate for having just one compression type .gz would be ok. space i nowadays not the main concern but it is convinced to have. re, wh -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <5714F856.9090206-fPG8STNUNVg@public.gmane.org>]
* Re: [PATCH 0/7] Improve support for compressed man pages [not found] ` <5714F856.9090206-fPG8STNUNVg@public.gmane.org> @ 2016-04-18 15:12 ` Mike Frysinger 0 siblings, 0 replies; 16+ messages in thread From: Mike Frysinger @ 2016-04-18 15:12 UTC (permalink / raw) To: walter harms Cc: Alexander Miller, linux-man-u79uwXL29TY76Z2rM5mHXA, mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w [-- Attachment #1: Type: text/plain, Size: 1337 bytes --] On 18 Apr 2016 17:08, walter harms wrote: > Am 18.04.2016 16:49, schrieb Mike Frysinger: > > On 16 Apr 2016 18:30, Alexander Miller wrote: > >> On Sat, 16 Apr 2016 00:50:58 -0400 > >> Mike Frysinger <vapier-aBrp7R+bbdUdnm+yROfE0A@public.gmane.org> wrote: > >>> if no one > >>> is using this code, then it's just sucking up space. > >> > >> I'm not concerned about the space, but code needs to be maintained. > >> IMO, as long as it works, we can keep it; if it has issues we'd > >> better remove it. > > > > sorry for the ambigious term ... i'm not referring to disk space, but > > to the code "sucking up space in the Makefiles and our eyes". > > > >> We can drop compression support or do it right - I'm fine with > >> either option. We shouldn't keep the status quo, though. > > > > i'm not advocating for the status quo ;) > > as one of those people that like to have it directly from source ... > > I would advocate for having just one compression type .gz would be ok. > space i nowadays not the main concern but it is convinced to have. in my experience, the majority of packages nowadays don't try to "help" you out and automatically compress installed man pages. so why should man-pages do it ? you already either (1) have a custom solution or (2) have uncompressed pages installed. -mike [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2016-04-18 19:45 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-16 0:25 [PATCH 0/7] Improve support for compressed man pages Alexander Miller
[not found] ` <20160416022503.1df762cb.alex.miller-Mmb7MZpHnFY@public.gmane.org>
2016-04-16 0:45 ` [PATCH 1/7] Makefile: Use better xz options Alexander Miller
2016-04-16 0:52 ` [PATCH 2/7] Makefile: Improve uninstall target for compressed man pages Alexander Miller
2016-04-16 0:59 ` [PATCH 3/7] Makefile: Support compressed files for screen target Alexander Miller
2016-04-16 1:01 ` [PATCH 4/7] Makefile: Skip already compressed files in gz/bz2/xz targets Alexander Miller
2016-04-16 1:09 ` [PATCH 6/7] Makefile: Avoid compressing very small " Alexander Miller
2016-04-16 1:09 ` [PATCH 7/7] Makefile: Mention xz in the instructive comment at top Alexander Miller
2016-04-16 4:50 ` [PATCH 0/7] Improve support for compressed man pages Mike Frysinger
[not found] ` <20160416045058.GS6588-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org>
2016-04-16 16:30 ` Alexander Miller
[not found] ` <20160416183013.352f4ba6.alex.miller-Mmb7MZpHnFY@public.gmane.org>
2016-04-18 12:57 ` Michael Kerrisk (man-pages)
[not found] ` <5714D9D2.8050501-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-18 17:10 ` Alexander Miller
[not found] ` <20160418191026.7fa8c669.alex.miller-Mmb7MZpHnFY@public.gmane.org>
2016-04-18 18:30 ` Mike Frysinger
[not found] ` <20160418212955.498ce1dd.alex.miller@gmx.de>
[not found] ` <20160418212955.498ce1dd.alex.miller-Mmb7MZpHnFY@public.gmane.org>
2016-04-18 19:45 ` [PATCH] Makefile: Drop compression support and screen target Alexander Miller
2016-04-18 14:49 ` [PATCH 0/7] Improve support for compressed man pages Mike Frysinger
[not found] ` <20160418144918.GK5369-UgUKS2FnFs9+urZeOPWqwQ@public.gmane.org>
2016-04-18 15:08 ` walter harms
[not found] ` <5714F856.9090206-fPG8STNUNVg@public.gmane.org>
2016-04-18 15:12 ` Mike Frysinger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).