9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] checkman.awk Patch
@ 2025-04-12 21:14 Dave Woodman
  2025-04-13 13:01 ` qwx
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Woodman @ 2025-04-12 21:14 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

Hi,

Rebuilding the man pages gives complaints along the lines of:

Checking libraries
nm: cannot open /386/lib/lib9p.a
nm: cannot open /386/lib/libauth.a
nm: cannot open /386/lib/libauthsrv.a
nm: cannot open /386/lib/libbin.a
nm: cannot open /386/lib/libbio.a
...

when building for architectures other than 386 unless the 386 libraries 
have been explicitly built.

I would like to propose the attached (simple) patch to make the relevant 
awk script aware of the current architecture by replacing all the lines 
of the form

    getnmlist("/386/lib/lib9p.a")

with

    getnmlist("/"ENVIRON["objtype"]"/lib/lib9p.a")

Regards,

Dave

[-- Attachment #2: checkman.awk.diff --]
[-- Type: text/plain, Size: 2551 bytes --]

diff 8bcc99861e091e22f0950be771fdb1f1c01a35a0 uncommitted
--- a/sys/lib/man/checkman.awk
+++ b/sys/lib/man/checkman.awk
@@ -201,32 +201,32 @@
 	print ""
 	print "Checking libraries"
 	getindex("/sys/man/2")
-	getnmlist("/386/lib/lib9p.a")
-	getnmlist("/386/lib/libauth.a")
-	getnmlist("/386/lib/libauthsrv.a")
-	getnmlist("/386/lib/libbin.a")
-	getnmlist("/386/lib/libbio.a")
-	getnmlist("/386/lib/libc.a")
-	getnmlist("/386/lib/libcontrol.a")
-	getnmlist("/386/lib/libdisk.a")
-	getnmlist("/386/lib/libdraw.a")
-	getnmlist("/386/lib/libflate.a")
-	getnmlist("/386/lib/libframe.a")
-	getnmlist("/386/lib/libgeometry.a")
-	getnmlist("/386/lib/libhtml.a")
-	getnmlist("/386/lib/libhttpd.a")
-	getnmlist("/386/lib/libip.a")
-	getnmlist("/386/lib/libmach.a")
-	getnmlist("/386/lib/libmemdraw.a")
-	getnmlist("/386/lib/libmemlayer.a")
-	getnmlist("/386/lib/libmp.a")
-	getnmlist("/386/lib/libndb.a")
-	getnmlist("/386/lib/libplumb.a")
-	getnmlist("/386/lib/libregexp.a")
-	getnmlist("/386/lib/libsec.a")
-	getnmlist("/386/lib/libstdio.a")
-	getnmlist("/386/lib/libString.a")
-	getnmlist("/386/lib/libthread.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/lib9p.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libauth.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libauthsrv.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libbin.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libbio.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libc.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libcontrol.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libdisk.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libdraw.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libflate.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libframe.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libgeometry.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libhtml.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libhttpd.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libip.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libmach.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libmemdraw.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libmemlayer.a")
+	getnmlist("/"ENVIRON["objtpye"]"/lib/libmp.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libndb.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libplumb.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libregexp.a")
+	getnmlist("/"ENVIRON["objtyoe"]"/lib/libsec.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libstdio.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libString.a")
+	getnmlist("/"ENVIRON["objtype"]"/lib/libthread.a")
 	for (i in List) {
 		if (!(i in Index) && !(i in Omittedlib))
 			print "Need", i, "(in " List[i] ")"

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9front] checkman.awk Patch
  2025-04-12 21:14 [9front] checkman.awk Patch Dave Woodman
@ 2025-04-13 13:01 ` qwx
  2025-04-13 20:42   ` Dave Woodman
  0 siblings, 1 reply; 10+ messages in thread
From: qwx @ 2025-04-13 13:01 UTC (permalink / raw)
  To: 9front

On Sat Apr 12 23:15:15 +0200 2025, dave@naffnet.org.uk wrote:

> Hi,
> 
> Rebuilding the man pages gives complaints along the lines of:
> 
> Checking libraries
> nm: cannot open /386/lib/lib9p.a
> nm: cannot open /386/lib/libauth.a
> nm: cannot open /386/lib/libauthsrv.a
> nm: cannot open /386/lib/libbin.a
> nm: cannot open /386/lib/libbio.a
> ...
> 
> when building for architectures other than 386 unless the 386 libraries 
> have been explicitly built.
> 
> I would like to propose the attached (simple) patch to make the relevant 
> awk script aware of the current architecture by replacing all the lines 
> of the form
> 
>     getnmlist("/386/lib/lib9p.a")
> 
> with
> 
>     getnmlist("/"ENVIRON["objtype"]"/lib/lib9p.a")
> 
> Regards,
> 
> Dave

I think this is a good idea, but we should go further.  There are
missing libraries in that list and the getbinlist() call should also
be changed; I suspect there's other stuff that should be brought up to
date at the same time, all of this has barely been touched since it
was imported in 2011.

For your patch specifically, there's a couple of typos that break it,
and I would read the environment variable just once before the
getnmlist() calls.  I'm also wondering whether $cputype would make
more sense than $objtype in this particular instance.

In any case, it would be nice to do a sweep across the script and
other files, and fix anything that might be out of date.  Maybe we
could even make it faster at the same time, or easier to keep up to
date.

Thanks,
qwx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9front] checkman.awk Patch
  2025-04-13 13:01 ` qwx
@ 2025-04-13 20:42   ` Dave Woodman
  2025-04-14  0:02     ` qwx
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Woodman @ 2025-04-13 20:42 UTC (permalink / raw)
  To: 9front

On 13/04/2025 14:01, qwx@sciops.net wrote:
> On Sat Apr 12 23:15:15 +0200 2025, dave@naffnet.org.uk wrote:
>
>> Hi,
>>
>> Rebuilding the man pages gives complaints along the lines of:
>>
>> Checking libraries
>> nm: cannot open /386/lib/lib9p.a
>> nm: cannot open /386/lib/libauth.a
>> nm: cannot open /386/lib/libauthsrv.a
>> nm: cannot open /386/lib/libbin.a
>> nm: cannot open /386/lib/libbio.a
>> ...
>>
>> when building for architectures other than 386 unless the 386 libraries
>> have been explicitly built.
>>
>> I would like to propose the attached (simple) patch to make the relevant
>> awk script aware of the current architecture by replacing all the lines
>> of the form
>>
>>      getnmlist("/386/lib/lib9p.a")
>>
>> with
>>
>>      getnmlist("/"ENVIRON["objtype"]"/lib/lib9p.a")
>>
>> Regards,
>>
>> Dave
> I think this is a good idea, but we should go further.  There are
> missing libraries in that list and the getbinlist() call should also
> be changed; I suspect there's other stuff that should be brought up to
> date at the same time, all of this has barely been touched since it
> was imported in 2011.
>
> For your patch specifically, there's a couple of typos that break it,
> and I would read the environment variable just once before the
> getnmlist() calls.  I'm also wondering whether $cputype would make
> more sense than $objtype in this particular instance.
>
> In any case, it would be nice to do a sweep across the script and
> other files, and fix anything that might be out of date.  Maybe we
> could even make it faster at the same time, or easier to keep up to
> date.
>
> Thanks,
> qwx
>
>
I will an item to give this a more thorough going-over on my to-do list.

Dave



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9front] checkman.awk Patch
  2025-04-13 20:42   ` Dave Woodman
@ 2025-04-14  0:02     ` qwx
  2025-04-14  6:36       ` Dave Woodman
       [not found]       ` <13a27ef0-fafd-4a63-900a-6f3c4a4d9a3e@naffnet.org.uk>
  0 siblings, 2 replies; 10+ messages in thread
From: qwx @ 2025-04-14  0:02 UTC (permalink / raw)
  To: 9front

On Sun Apr 13 22:42:22 +0200 2025, dave@naffnet.org.uk wrote:
> I will an item to give this a more thorough going-over on my to-do list.
> 
> Dave

To be clear, I don't think your patch shouldn't be merged after some
minor corrections, nor am I insinuating that you should fix everything
yourself right now.  I'm just thinking out loud; for this whole thing
to be maximally useful, it needs some sprucing up.

Thanks,
qwx


> On 13/04/2025 14:01, qwx@sciops.net wrote:
> > On Sat Apr 12 23:15:15 +0200 2025, dave@naffnet.org.uk wrote:
> >
> >> Hi,
> >>
> >> Rebuilding the man pages gives complaints along the lines of:
> >>
> >> Checking libraries
> >> nm: cannot open /386/lib/lib9p.a
> >> nm: cannot open /386/lib/libauth.a
> >> nm: cannot open /386/lib/libauthsrv.a
> >> nm: cannot open /386/lib/libbin.a
> >> nm: cannot open /386/lib/libbio.a
> >> ...
> >>
> >> when building for architectures other than 386 unless the 386 libraries
> >> have been explicitly built.
> >>
> >> I would like to propose the attached (simple) patch to make the relevant
> >> awk script aware of the current architecture by replacing all the lines
> >> of the form
> >>
> >>      getnmlist("/386/lib/lib9p.a")
> >>
> >> with
> >>
> >>      getnmlist("/"ENVIRON["objtype"]"/lib/lib9p.a")
> >>
> >> Regards,
> >>
> >> Dave
> > I think this is a good idea, but we should go further.  There are
> > missing libraries in that list and the getbinlist() call should also
> > be changed; I suspect there's other stuff that should be brought up to
> > date at the same time, all of this has barely been touched since it
> > was imported in 2011.
> >
> > For your patch specifically, there's a couple of typos that break it,
> > and I would read the environment variable just once before the
> > getnmlist() calls.  I'm also wondering whether $cputype would make
> > more sense than $objtype in this particular instance.
> >
> > In any case, it would be nice to do a sweep across the script and
> > other files, and fix anything that might be out of date.  Maybe we
> > could even make it faster at the same time, or easier to keep up to
> > date.
> >
> > Thanks,
> > qwx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9front] checkman.awk Patch
  2025-04-14  0:02     ` qwx
@ 2025-04-14  6:36       ` Dave Woodman
       [not found]       ` <13a27ef0-fafd-4a63-900a-6f3c4a4d9a3e@naffnet.org.uk>
  1 sibling, 0 replies; 10+ messages in thread
From: Dave Woodman @ 2025-04-14  6:36 UTC (permalink / raw)
  To: 9front

Hi,

We are in agreement - I'd like to do more to this (additional libraries 
etc) and then supply a better patch.

I was let to this tangentially from something else I'm playing with, 
which  I'd like to get closer to finishing, and will revisit 
checkman.awk soon.

Dave.

On 14/04/2025 01:02, qwx@sciops.net wrote:
> On Sun Apr 13 22:42:22 +0200 2025, dave@naffnet.org.uk wrote:
>> I will an item to give this a more thorough going-over on my to-do list.
>>
>> Dave
> To be clear, I don't think your patch shouldn't be merged after some
> minor corrections, nor am I insinuating that you should fix everything
> yourself right now.  I'm just thinking out loud; for this whole thing
> to be maximally useful, it needs some sprucing up.
>
> Thanks,
> qwx
>
>
>> On 13/04/2025 14:01, qwx@sciops.net wrote:
>>> On Sat Apr 12 23:15:15 +0200 2025, dave@naffnet.org.uk wrote:
>>>
>>>> Hi,
>>>>
>>>> Rebuilding the man pages gives complaints along the lines of:
>>>>
>>>> Checking libraries
>>>> nm: cannot open /386/lib/lib9p.a
>>>> nm: cannot open /386/lib/libauth.a
>>>> nm: cannot open /386/lib/libauthsrv.a
>>>> nm: cannot open /386/lib/libbin.a
>>>> nm: cannot open /386/lib/libbio.a
>>>> ...
>>>>
>>>> when building for architectures other than 386 unless the 386 libraries
>>>> have been explicitly built.
>>>>
>>>> I would like to propose the attached (simple) patch to make the relevant
>>>> awk script aware of the current architecture by replacing all the lines
>>>> of the form
>>>>
>>>>       getnmlist("/386/lib/lib9p.a")
>>>>
>>>> with
>>>>
>>>>       getnmlist("/"ENVIRON["objtype"]"/lib/lib9p.a")
>>>>
>>>> Regards,
>>>>
>>>> Dave
>>> I think this is a good idea, but we should go further.  There are
>>> missing libraries in that list and the getbinlist() call should also
>>> be changed; I suspect there's other stuff that should be brought up to
>>> date at the same time, all of this has barely been touched since it
>>> was imported in 2011.
>>>
>>> For your patch specifically, there's a couple of typos that break it,
>>> and I would read the environment variable just once before the
>>> getnmlist() calls.  I'm also wondering whether $cputype would make
>>> more sense than $objtype in this particular instance.
>>>
>>> In any case, it would be nice to do a sweep across the script and
>>> other files, and fix anything that might be out of date.  Maybe we
>>> could even make it faster at the same time, or easier to keep up to
>>> date.
>>>
>>> Thanks,
>>> qwx


.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9front] checkman.awk Patch
       [not found]       ` <13a27ef0-fafd-4a63-900a-6f3c4a4d9a3e@naffnet.org.uk>
@ 2025-04-16  7:50         ` Dave Woodman
       [not found]         ` <a607b564-3a9e-443f-aa14-b22c6b6af589@naffnet.org.uk>
  1 sibling, 0 replies; 10+ messages in thread
From: Dave Woodman @ 2025-04-16  7:50 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

Following welcome feedback (thanks qwx) I have attached revised versions 
of the patch for consideration.

The difference between the two is one of control - the first will 
process only the libraries specified in a list, and the second will 
process all libraries present in the directory, regardless of origin.

I therefore ask here which would be the approach preferred by the community.

Thanks,

Dave

[-- Attachment #2.1: Type: text/plain, Size: 363 bytes --]

from postmaster@9front:
The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Type: text/plain; charset=UTF-8; name="checkman.awk_patch1"
	Content-Disposition: attachment; filename="checkman.awk_patch1"
	Content-Transfer-Encoding: base64

[-- Attachment #2.2: checkman.awk_patch1.suspect --]
[-- Type: application/octet-stream, Size: 2080 bytes --]

diff ba59008e1da6bdf87648f9cc44aac83095c49600 uncommitted
--- a/sys/lib/man/checkman.awk
+++ b/sys/lib/man/checkman.awk
@@ -172,6 +172,7 @@
 }
 
 END {
+	cputype = ENVIRON["cputype"]
 	print "Checking Cross-Referenced Pages"
 	for (i in Refs) {
 		if (!(i in Pages)){
@@ -185,7 +186,7 @@
 	getindex("/sys/man/4")
 	getindex("/sys/man/7")
 	getindex("/sys/man/8")
-	getbinlist("/386/bin")
+	getbinlist("/"cputype"/bin")
 	getbinlist("/rc/bin")
 	for (i in List) {
 		if (!(i in Index) && !(i in Omitted))
@@ -200,33 +201,20 @@
 	clearlist()
 	print ""
 	print "Checking libraries"
+	libs = "lib9p libauth libauthsrv libbin libbio libc libcontrol\
+			libdisk libdraw libflate libframe libgeometry libhtml\
+			libhttpd libip libmach libmemdraw libmemlayer libmp\
+			libndb libplumb libregexp libsec libstdio libString\
+			libthread libaml libavl libcomplete libdtracy libfis\
+			libjson libl libpcm libsat libscribble libsunrpc libttf\
+			libventi"
+
+	split(libs, liblist)
+
 	getindex("/sys/man/2")
-	getnmlist("/386/lib/lib9p.a")
-	getnmlist("/386/lib/libauth.a")
-	getnmlist("/386/lib/libauthsrv.a")
-	getnmlist("/386/lib/libbin.a")
-	getnmlist("/386/lib/libbio.a")
-	getnmlist("/386/lib/libc.a")
-	getnmlist("/386/lib/libcontrol.a")
-	getnmlist("/386/lib/libdisk.a")
-	getnmlist("/386/lib/libdraw.a")
-	getnmlist("/386/lib/libflate.a")
-	getnmlist("/386/lib/libframe.a")
-	getnmlist("/386/lib/libgeometry.a")
-	getnmlist("/386/lib/libhtml.a")
-	getnmlist("/386/lib/libhttpd.a")
-	getnmlist("/386/lib/libip.a")
-	getnmlist("/386/lib/libmach.a")
-	getnmlist("/386/lib/libmemdraw.a")
-	getnmlist("/386/lib/libmemlayer.a")
-	getnmlist("/386/lib/libmp.a")
-	getnmlist("/386/lib/libndb.a")
-	getnmlist("/386/lib/libplumb.a")
-	getnmlist("/386/lib/libregexp.a")
-	getnmlist("/386/lib/libsec.a")
-	getnmlist("/386/lib/libstdio.a")
-	getnmlist("/386/lib/libString.a")
-	getnmlist("/386/lib/libthread.a")
+	for (l in liblist) {
+		getnmlist("/"cputype"/lib/"liblist[l]".a")
+	}
 	for (i in List) {
 		if (!(i in Index) && !(i in Omittedlib))
 			print "Need", i, "(in " List[i] ")"

[-- Attachment #3.1: Type: text/plain, Size: 363 bytes --]

from postmaster@9front:
The following attachment had content that we can't
prove to be harmless.  To avoid possible automatic
execution, we changed the content headers.
The original header was:

	Content-Type: text/plain; charset=UTF-8; name="checkman.awk_patch2"
	Content-Disposition: attachment; filename="checkman.awk_patch2"
	Content-Transfer-Encoding: base64

[-- Attachment #3.2: checkman.awk_patch2.suspect --]
[-- Type: application/octet-stream, Size: 1659 bytes --]

diff ba59008e1da6bdf87648f9cc44aac83095c49600 uncommitted
--- a/sys/lib/man/checkman.awk
+++ b/sys/lib/man/checkman.awk
@@ -172,6 +172,7 @@
 }
 
 END {
+	cputype = ENVIRON["cputype"]
 	print "Checking Cross-Referenced Pages"
 	for (i in Refs) {
 		if (!(i in Pages)){
@@ -185,7 +186,7 @@
 	getindex("/sys/man/4")
 	getindex("/sys/man/7")
 	getindex("/sys/man/8")
-	getbinlist("/386/bin")
+	getbinlist("/"cputype"/bin")
 	getbinlist("/rc/bin")
 	for (i in List) {
 		if (!(i in Index) && !(i in Omitted))
@@ -201,32 +202,8 @@
 	print ""
 	print "Checking libraries"
 	getindex("/sys/man/2")
-	getnmlist("/386/lib/lib9p.a")
-	getnmlist("/386/lib/libauth.a")
-	getnmlist("/386/lib/libauthsrv.a")
-	getnmlist("/386/lib/libbin.a")
-	getnmlist("/386/lib/libbio.a")
-	getnmlist("/386/lib/libc.a")
-	getnmlist("/386/lib/libcontrol.a")
-	getnmlist("/386/lib/libdisk.a")
-	getnmlist("/386/lib/libdraw.a")
-	getnmlist("/386/lib/libflate.a")
-	getnmlist("/386/lib/libframe.a")
-	getnmlist("/386/lib/libgeometry.a")
-	getnmlist("/386/lib/libhtml.a")
-	getnmlist("/386/lib/libhttpd.a")
-	getnmlist("/386/lib/libip.a")
-	getnmlist("/386/lib/libmach.a")
-	getnmlist("/386/lib/libmemdraw.a")
-	getnmlist("/386/lib/libmemlayer.a")
-	getnmlist("/386/lib/libmp.a")
-	getnmlist("/386/lib/libndb.a")
-	getnmlist("/386/lib/libplumb.a")
-	getnmlist("/386/lib/libregexp.a")
-	getnmlist("/386/lib/libsec.a")
-	getnmlist("/386/lib/libstdio.a")
-	getnmlist("/386/lib/libString.a")
-	getnmlist("/386/lib/libthread.a")
+	while ("ls /"cputype"/lib/lib*.a" | getline l) 
+		getnmlist(l)
 	for (i in List) {
 		if (!(i in Index) && !(i in Omittedlib))
 			print "Need", i, "(in " List[i] ")"

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9front] checkman.awk Patch
       [not found]         ` <a607b564-3a9e-443f-aa14-b22c6b6af589@naffnet.org.uk>
@ 2025-04-19 20:45           ` Dave Woodman
  2025-04-21  1:24             ` qwx
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Woodman @ 2025-04-19 20:45 UTC (permalink / raw)
  To: 9front

[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]

Given no expressed opinion either way, I propose that the second 
approach be used - that which reads all available libraries (as 
suggested by qwx).

The suggested patch is attached.
Dave.

On 16/04/2025 08:50, Dave Woodman wrote:
> Following welcome feedback (thanks qwx) I have attached revised 
> versions of the patch for consideration.
>
> The difference between the two is one of control - the first will 
> process only the libraries specified in a list, and the second will 
> process all libraries present in the directory, regardless of origin.
>
> I therefore ask here which would be the approach preferred by the 
> community.
>
> Thanks,
>
> Dave
>
> from postmaster@9front:
> The following attachment had content that we can't
> prove to be harmless.  To avoid possible automatic
> execution, we changed the content headers.
> The original header was:
>
> 	Content-Type: text/plain; charset=UTF-8; name="checkman.awk_patch1"
> 	Content-Disposition: attachment; filename="checkman.awk_patch1"
> 	Content-Transfer-Encoding: base64
>
> from postmaster@9front:
> The following attachment had content that we can't
> prove to be harmless.  To avoid possible automatic
> execution, we changed the content headers.
> The original header was:
>
> 	Content-Type: text/plain; charset=UTF-8; name="checkman.awk_patch2"
> 	Content-Disposition: attachment; filename="checkman.awk_patch2"
> 	Content-Transfer-Encoding: base64


[-- Attachment #2: checkman.awk.diff --]
[-- Type: text/plain, Size: 1659 bytes --]

diff ba59008e1da6bdf87648f9cc44aac83095c49600 uncommitted
--- a/sys/lib/man/checkman.awk
+++ b/sys/lib/man/checkman.awk
@@ -172,6 +172,7 @@
 }
 
 END {
+	cputype = ENVIRON["cputype"]
 	print "Checking Cross-Referenced Pages"
 	for (i in Refs) {
 		if (!(i in Pages)){
@@ -185,7 +186,7 @@
 	getindex("/sys/man/4")
 	getindex("/sys/man/7")
 	getindex("/sys/man/8")
-	getbinlist("/386/bin")
+	getbinlist("/"cputype"/bin")
 	getbinlist("/rc/bin")
 	for (i in List) {
 		if (!(i in Index) && !(i in Omitted))
@@ -201,32 +202,8 @@
 	print ""
 	print "Checking libraries"
 	getindex("/sys/man/2")
-	getnmlist("/386/lib/lib9p.a")
-	getnmlist("/386/lib/libauth.a")
-	getnmlist("/386/lib/libauthsrv.a")
-	getnmlist("/386/lib/libbin.a")
-	getnmlist("/386/lib/libbio.a")
-	getnmlist("/386/lib/libc.a")
-	getnmlist("/386/lib/libcontrol.a")
-	getnmlist("/386/lib/libdisk.a")
-	getnmlist("/386/lib/libdraw.a")
-	getnmlist("/386/lib/libflate.a")
-	getnmlist("/386/lib/libframe.a")
-	getnmlist("/386/lib/libgeometry.a")
-	getnmlist("/386/lib/libhtml.a")
-	getnmlist("/386/lib/libhttpd.a")
-	getnmlist("/386/lib/libip.a")
-	getnmlist("/386/lib/libmach.a")
-	getnmlist("/386/lib/libmemdraw.a")
-	getnmlist("/386/lib/libmemlayer.a")
-	getnmlist("/386/lib/libmp.a")
-	getnmlist("/386/lib/libndb.a")
-	getnmlist("/386/lib/libplumb.a")
-	getnmlist("/386/lib/libregexp.a")
-	getnmlist("/386/lib/libsec.a")
-	getnmlist("/386/lib/libstdio.a")
-	getnmlist("/386/lib/libString.a")
-	getnmlist("/386/lib/libthread.a")
+	while ("ls /"cputype"/lib/lib*.a" | getline l) 
+		getnmlist(l)
 	for (i in List) {
 		if (!(i in Index) && !(i in Omittedlib))
 			print "Need", i, "(in " List[i] ")"

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9front] checkman.awk Patch
  2025-04-19 20:45           ` Dave Woodman
@ 2025-04-21  1:24             ` qwx
  2025-04-21  7:09               ` Dave Woodman
  0 siblings, 1 reply; 10+ messages in thread
From: qwx @ 2025-04-21  1:24 UTC (permalink / raw)
  To: 9front

On Sat Apr 19 22:45:39 +0200 2025, dave@naffnet.org.uk wrote:

> Given no expressed opinion either way, I propose that the second 
> approach be used - that which reads all available libraries (as 
> suggested by qwx).
> 
> The suggested patch is attached.
> Dave.

After some discussion, this seems sensible, but it might be desirable
to also mask off errors for some unix-derived libraries like libsunrpc
for nfs, which this time we can hardcode.  I've amended the patch with
this idea.  Comments?

Thanks,
qwx

diff 2476c1c21e0b9e292b82ac084731ccca219af103 uncommitted
--- a/sys/lib/man/checkman.awk
+++ b/sys/lib/man/checkman.awk
@@ -68,6 +68,8 @@
 	Omittedlib["main"] = 1
 	Omittedlib["oseek"] = 1
 	Omittedlib["sysr1"] = 1
+
+	Omittedfile["libsunrpc.a"] = 1
 }
 
 FNR==1	{
@@ -172,6 +174,7 @@
 }
 
 END {
+	cputype = ENVIRON["cputype"]
 	print "Checking Cross-Referenced Pages"
 	for (i in Refs) {
 		if (!(i in Pages)){
@@ -185,7 +188,7 @@
 	getindex("/sys/man/4")
 	getindex("/sys/man/7")
 	getindex("/sys/man/8")
-	getbinlist("/386/bin")
+	getbinlist("/"cputype"/bin")
 	getbinlist("/rc/bin")
 	for (i in List) {
 		if (!(i in Index) && !(i in Omitted))
@@ -201,32 +204,10 @@
 	print ""
 	print "Checking libraries"
 	getindex("/sys/man/2")
-	getnmlist("/386/lib/lib9p.a")
-	getnmlist("/386/lib/libauth.a")
-	getnmlist("/386/lib/libauthsrv.a")
-	getnmlist("/386/lib/libbin.a")
-	getnmlist("/386/lib/libbio.a")
-	getnmlist("/386/lib/libc.a")
-	getnmlist("/386/lib/libcontrol.a")
-	getnmlist("/386/lib/libdisk.a")
-	getnmlist("/386/lib/libdraw.a")
-	getnmlist("/386/lib/libflate.a")
-	getnmlist("/386/lib/libframe.a")
-	getnmlist("/386/lib/libgeometry.a")
-	getnmlist("/386/lib/libhtml.a")
-	getnmlist("/386/lib/libhttpd.a")
-	getnmlist("/386/lib/libip.a")
-	getnmlist("/386/lib/libmach.a")
-	getnmlist("/386/lib/libmemdraw.a")
-	getnmlist("/386/lib/libmemlayer.a")
-	getnmlist("/386/lib/libmp.a")
-	getnmlist("/386/lib/libndb.a")
-	getnmlist("/386/lib/libplumb.a")
-	getnmlist("/386/lib/libregexp.a")
-	getnmlist("/386/lib/libsec.a")
-	getnmlist("/386/lib/libstdio.a")
-	getnmlist("/386/lib/libString.a")
-	getnmlist("/386/lib/libthread.a")
+	while ("ls -p /"cputype"/lib/lib*.a" | getline l) {
+		if (!(l in Omittedfile))
+			getnmlist("/"cputype"/lib/"l)
+	}
 	for (i in List) {
 		if (!(i in Index) && !(i in Omittedlib))
 			print "Need", i, "(in " List[i] ")"

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9front] checkman.awk Patch
  2025-04-21  1:24             ` qwx
@ 2025-04-21  7:09               ` Dave Woodman
  2025-04-26 12:11                 ` qwx
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Woodman @ 2025-04-21  7:09 UTC (permalink / raw)
  To: 9front

On 21/04/2025 02:24, qwx@sciops.net wrote:
> On Sat Apr 19 22:45:39 +0200 2025, dave@naffnet.org.uk wrote:
>
>> Given no expressed opinion either way, I propose that the second
>> approach be used - that which reads all available libraries (as
>> suggested by qwx).
>>
>> The suggested patch is attached.
>> Dave.
> After some discussion, this seems sensible, but it might be desirable
> to also mask off errors for some unix-derived libraries like libsunrpc
> for nfs, which this time we can hardcode.  I've amended the patch with
> this idea.  Comments?
>
> Thanks,
> qwx

That seems eminently sensible to me - thanks

Cheers,

Dave


>
> diff 2476c1c21e0b9e292b82ac084731ccca219af103 uncommitted
> --- a/sys/lib/man/checkman.awk
> +++ b/sys/lib/man/checkman.awk
> @@ -68,6 +68,8 @@
>   	Omittedlib["main"] = 1
>   	Omittedlib["oseek"] = 1
>   	Omittedlib["sysr1"] = 1
> +
> +	Omittedfile["libsunrpc.a"] = 1
>   }
>   
>   FNR==1	{
> @@ -172,6 +174,7 @@
>   }
>   
>   END {
> +	cputype = ENVIRON["cputype"]
>   	print "Checking Cross-Referenced Pages"
>   	for (i in Refs) {
>   		if (!(i in Pages)){
> @@ -185,7 +188,7 @@
>   	getindex("/sys/man/4")
>   	getindex("/sys/man/7")
>   	getindex("/sys/man/8")
> -	getbinlist("/386/bin")
> +	getbinlist("/"cputype"/bin")
>   	getbinlist("/rc/bin")
>   	for (i in List) {
>   		if (!(i in Index) && !(i in Omitted))
> @@ -201,32 +204,10 @@
>   	print ""
>   	print "Checking libraries"
>   	getindex("/sys/man/2")
> -	getnmlist("/386/lib/lib9p.a")
> -	getnmlist("/386/lib/libauth.a")
> -	getnmlist("/386/lib/libauthsrv.a")
> -	getnmlist("/386/lib/libbin.a")
> -	getnmlist("/386/lib/libbio.a")
> -	getnmlist("/386/lib/libc.a")
> -	getnmlist("/386/lib/libcontrol.a")
> -	getnmlist("/386/lib/libdisk.a")
> -	getnmlist("/386/lib/libdraw.a")
> -	getnmlist("/386/lib/libflate.a")
> -	getnmlist("/386/lib/libframe.a")
> -	getnmlist("/386/lib/libgeometry.a")
> -	getnmlist("/386/lib/libhtml.a")
> -	getnmlist("/386/lib/libhttpd.a")
> -	getnmlist("/386/lib/libip.a")
> -	getnmlist("/386/lib/libmach.a")
> -	getnmlist("/386/lib/libmemdraw.a")
> -	getnmlist("/386/lib/libmemlayer.a")
> -	getnmlist("/386/lib/libmp.a")
> -	getnmlist("/386/lib/libndb.a")
> -	getnmlist("/386/lib/libplumb.a")
> -	getnmlist("/386/lib/libregexp.a")
> -	getnmlist("/386/lib/libsec.a")
> -	getnmlist("/386/lib/libstdio.a")
> -	getnmlist("/386/lib/libString.a")
> -	getnmlist("/386/lib/libthread.a")
> +	while ("ls -p /"cputype"/lib/lib*.a" | getline l) {
> +		if (!(l in Omittedfile))
> +			getnmlist("/"cputype"/lib/"l)
> +	}
>   	for (i in List) {
>   		if (!(i in Index) && !(i in Omittedlib))
>   			print "Need", i, "(in " List[i] ")"
>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [9front] checkman.awk Patch
  2025-04-21  7:09               ` Dave Woodman
@ 2025-04-26 12:11                 ` qwx
  0 siblings, 0 replies; 10+ messages in thread
From: qwx @ 2025-04-26 12:11 UTC (permalink / raw)
  To: 9front

On Mon Apr 21 09:15:07 +0200 2025, dave@naffnet.org.uk wrote:
> On 21/04/2025 02:24, qwx@sciops.net wrote:
> > On Sat Apr 19 22:45:39 +0200 2025, dave@naffnet.org.uk wrote:
> >
> >> Given no expressed opinion either way, I propose that the second
> >> approach be used - that which reads all available libraries (as
> >> suggested by qwx).
> >>
> >> The suggested patch is attached.
> >> Dave.
> > After some discussion, this seems sensible, but it might be desirable
> > to also mask off errors for some unix-derived libraries like libsunrpc
> > for nfs, which this time we can hardcode.  I've amended the patch with
> > this idea.  Comments?
> >
> > Thanks,
> > qwx
> 
> That seems eminently sensible to me - thanks
> 
> Cheers,
> 
> Dave

Pushed.

Thanks again,
qwx

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-04-26 12:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-12 21:14 [9front] checkman.awk Patch Dave Woodman
2025-04-13 13:01 ` qwx
2025-04-13 20:42   ` Dave Woodman
2025-04-14  0:02     ` qwx
2025-04-14  6:36       ` Dave Woodman
     [not found]       ` <13a27ef0-fafd-4a63-900a-6f3c4a4d9a3e@naffnet.org.uk>
2025-04-16  7:50         ` Dave Woodman
     [not found]         ` <a607b564-3a9e-443f-aa14-b22c6b6af589@naffnet.org.uk>
2025-04-19 20:45           ` Dave Woodman
2025-04-21  1:24             ` qwx
2025-04-21  7:09               ` Dave Woodman
2025-04-26 12:11                 ` qwx

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).