Hi,
just noticed by accident that cannot open in Alpine Linux some manuals
e.g. scandir(3).
I've installed 'man-pages' package which contains for some manuals two
versions: POSIX and Linux
(e.g.
https://pkgs.alpinelinux.org/contents?file=scandir.*&path=&name=man-pages&branch=edge&arch=x86_64 )
and installs them into the same subdir.
Then checked mandocdb that scandir(3) is there (also why are there
double slashes?).
/home/juef: sudo /usr/sbin/makewhatis -D -a -T utf8 /usr/share/man 2>&1 | grep scandir
/usr/share/man//man3/scandir.3.gz: Adding to database
/usr/share/man//man3/scandir.3p: Adding to database
(I've slightly modified mandoc (against CVS HEAD) to see a bit more.)
/home/juef/cvs/mandoc: ./man 3 scandir
sec: /usr/share/man/man3/scandir.3p
prio: 5; sec: 3/scandir.3p
resp->file: /usr/share/man/man3/scandir.3p
sec: /usr/share/man/man3/scandir.3.gz
prio: 5; sec: 3/scandir.3.gz
sec: /usr/share/man/man3/alphasort.3p
prio: 5; sec: 3/alphasort.3p
and
/home/juef/cvs/mandoc: ./man 3p scandir
sec: /usr/share/man/man3/scandir.3p
prio: 5; sec: 3/scandir.3p
resp->file: /usr/share/man/man3/scandir.3p
sec: /usr/share/man/man3/alphasort.3p
prio: 5; sec: 3/alphasort.3p
So, mandoc in that case always opens /usr/share/man/man3/scandir.3p
regardless of the section option.
Should mandoc handle such case?
Or should 'man-pages' package be fixed
(i.e. install POSIX manuals in man[0-3]p subdirs, by removing this block:
https://git.alpinelinux.org/cgit/aports/tree/main/man-pages/APKBUILD?id=eb6c8019412e3e5dbcb4112b33f4f89a8ec73dcb#n19
) ?
++ (just an experiment)
# pwd
/usr/share/man
# mkdir mann
# mv man3/scandir.3.gz mann
# /usr/sbin/makewhatis -D -a -T utf8 /usr/share/man
now, `man n scandir`, opens /usr/share/man/mann/scandir.3.gz
So, doesn't mandoc look at the file extention to determine its section?
BTW, POSIX manuals are not gzipped, see for example 3p section:
https://pkgs.alpinelinux.org/contents?file=*.3p&path=&name=man-pages&branch=edge&arch=x86_64
Also, is it possible to not apply less-specific patch if the less[1],
or less-fork[2] was installed beforehand?
https://git.alpinelinux.org/cgit/aports/tree/main/mdocml/pager.patch?id=ae43f02b3cdfb0f944bf352fa81911324ec594fb#n16
+++ Is there a possibility in apk to make a local search
by the file names for all packages including not installed?
Similar what web-interface[3] can do or CRUX's prt-get[4].
[1]: http://www.greenwoodsoftware.com/less/
[2]: https://github.com/gdamore/less-fork
[3]: https://pkgs.alpinelinux.org/contents
[4]: https://crux.nu/doc/prt-get%20-%20User%20Manual.html#info_fsearch
Thanks.
--
https://www.juef.space/
Svyatoslav Mishyn wrote:
> just noticed by accident that cannot open in Alpine Linux some> manuals e.g. scandir(3).> Then checked mandocdb that scandir(3) is there (also why are there> double slashes?).> /home/juef: sudo /usr/sbin/makewhatis -D -a -T utf8 /usr/share/man> 2>&1 | grep scandir> /usr/share/man//man3/scandir.3.gz: Adding to database> /usr/share/man//man3/scandir.3p: Adding to database> Should mandoc handle such case?
Probably yes. man-db has the "-e" option for "extension". Anyway, if
you need a specific manual page you can use "mandoc -l
/usr/share/man/man3/scandir.3.gz".
> Or should 'man-pages' package be fixed
[...]
> now, `man n scandir`, opens /usr/share/man/mann/scandir.3.gz> So, doesn't mandoc look at the file extention to determine its> section?
I made a man3p directory in /usr/share/man, then put scandir.3p there,
now "man scandir" opens the Linux manual page, "man 3p scandir" opens
the alphasort(3p) manual page.
The project itself becomes a mess on Alpine. You have manuals for POSIX
commands, and may suppose that they are for Busybox commands, that
occasionally don't comply with POSIX; unfortunately Busybox doesn't
have its own man pages. You have manuals for glibc functions that
are absent in musl. So, for stuff like kernel headers and system calls
I'm all for having a package.
> +++ Is there a possibility in apk to make a local search> by the file names for all packages including not installed?> Similar what web-interface[3] can do or CRUX's prt-get[4].
Currently you can't search or view contents of an uninstalled package.
This is a nice feature to have though.
--
caóc
---
Unsubscribe: alpine-user+unsubscribe@lists.alpinelinux.org
Help: alpine-user+help@lists.alpinelinux.org
---
(Fri, 02 Feb 14:27) William Pitcock:
> On Fri, Feb 2, 2018 at 9:22 AM, Svyatoslav Mishyn> <svyatoslav.mishyn@gmail.com> wrote:> > +++ Is there a possibility in apk to make a local search> > by the file names for all packages including not installed?> > Similar what web-interface[3] can do or CRUX's prt-get[4].> > There is https://github.com/jessfraz/apk-file for now, but filelists> are a planned feature for apk-tools (probably 2.11 or 2.12 cycle).
Thanks, probably would be useful if there was some API (JSON?) for retrieving
file info from pkgs.alpinelinux.org/contents, as right now apk-file
simply parses HTML.
But, I suppose, when apk-tools will support it, API wouldn't be
interested and needed at all.
--
https://www.juef.space/
(Fri, 02 Feb 19:43) Cág:
> The project itself becomes a mess on Alpine. You have manuals for POSIX> commands, and may suppose that they are for Busybox commands, that> occasionally don't comply with POSIX; unfortunately Busybox doesn't> have its own man pages. You have manuals for glibc functions that> are absent in musl. So, for stuff like kernel headers and system calls> I'm all for having a package.
I have from time to time a desire to combine POSIX, Linux manuals +
manuals from OpenBSD, DragonflyBSD (maybe other OSes) all together,
merge them, clean up, and provide clean & beautiful manual pages for
Linux kernel and libc (probably musl-only?).
But the most tricky part, I think, would be licensing.
As maybe each manual will contain various licenses inside it.
--
https://www.juef.space/