Hello, please find attached a diff to update u9fs to the latest commit. Some linux distributions are using that bitbucket repository as upstream (at least void and nix -- void has a typo in the version as it uses the same commit I'm fetching.) The MASTER_SITE plan9.bell-labs.com doesn't seem to be available anymore.
There was some (small) development on it over the While here i've also tweaked a bit COMMENT, dropped some unused patches, avoided the patch for the makefile by setting ALL_TARGET and the CFLAGS, and installing the manpage. The manpage talks like the user is on a plan9 system and that's reflected even in the section number (4, which is for file servers there IIRC, where for us is device divers.) For this reason i decided to change the section to 8 and adjust it in the manpage, but otherwise leaving it unchanged. Tested locally by running it over inetd(8) and connecting with a client, it works fine. OK? P.S.: should it be installed in sbin rather than bin? Index: Makefile =================================================================== RCS file: /home/cvs/ports/plan9/u9fs/Makefile,v retrieving revision 1.5 diff -u -p -r1.5 Makefile --- Makefile 11 Mar 2022 19:49:09 -0000 1.5 +++ Makefile 28 Aug 2022 08:38:40 -0000 @@ -1,28 +1,31 @@ -COMMENT= serve 9P from Unix +COMMENT= 9P server for Unix -DISTNAME= u9fs-20110118 -REVISION= 0 +DISTNAME= u9fs-20210125 CATEGORIES= plan9 -MASTER_SITES= http://plan9.bell-labs.com/sources/contrib/sl/u9fs/ \ - http://openbsd.stanleylieber.com/u9fs/ -EXTRACT_SUFX= -src.tgz +MASTER_SITES= https://bitbucket.org/plan9-from-bell-labs/u9fs/get/ + +COMMIT= d65923fd17e8 +DISTFILES= ${DISTNAME}{${COMMIT}}${EXTRACT_SUFX} MAINTAINER= Stanley Lieber <s...@stanleylieber.com> # MIT PERMIT_PACKAGE= Yes -WANTLIB= c +WANTLIB= c -WRKDIST= ${WRKDIR} +WRKDIST= ${WRKDIR}/plan9-from-bell-labs-u9fs-${COMMIT} MAKE_FILE= makefile -MAKE_FLAGS= CC=${CC} +CFLAGS += -D_BSD_SOURCE -I. +MAKE_FLAGS= CFLAGS='${CFLAGS}' +ALL_TARGET= u9fs NO_TEST= Yes do-install: ${INSTALL_PROGRAM} ${WRKDIST}/u9fs ${PREFIX}/bin/u9fs + ${INSTALL_MAN} ${WRKDIST}/u9fs.man ${PREFIX}/man/man8/u9fs.8 .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /home/cvs/ports/plan9/u9fs/distinfo,v retrieving revision 1.2 diff -u -p -r1.2 distinfo --- distinfo 18 Jan 2015 03:14:56 -0000 1.2 +++ distinfo 28 Aug 2022 08:22:21 -0000 @@ -1,2 +1,2 @@ -SHA256 (u9fs-20110118-src.tgz) = NnNgEnSprGLNvz9E2QkGWg+35luqtrc1ScBMkvlDbvs= -SIZE (u9fs-20110118-src.tgz) = 33674 +SHA256 (u9fs-20210125.tar.gz) = IBYZwcKbrRye0byIav57SWXP0HgbIpbJ3ofbELpxYV0= +SIZE (u9fs-20210125.tar.gz) = 38319 Index: patches/patch-makefile =================================================================== RCS file: patches/patch-makefile diff -N patches/patch-makefile --- patches/patch-makefile 11 Mar 2022 19:49:09 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,23 +0,0 @@ ---- makefile.orig Sat Mar 29 21:21:38 2003 -+++ makefile Tue Mar 15 14:41:10 2011 -@@ -15,7 +15,7 @@ - # If you need <inttypes.h> copy sun-inttypes.h to inttypes.h. - # - #CC=cc --CFLAGS=-g -I. -+CFLAGS+=-g -I. - LD=cc - LDFLAGS= - LDTAIL= -@@ -57,7 +57,9 @@ u9fs: $(OFILES) - clean: - rm -f *.o u9fs - --install: u9fs -- cp u9fs ../../bin -+#install: u9fs -+# cp u9fs ../../bin -+ -+all: u9fs - - .PHONY: clean install Index: patches/patch-oldfcall_c =================================================================== RCS file: patches/patch-oldfcall_c diff -N patches/patch-oldfcall_c --- patches/patch-oldfcall_c 11 Mar 2022 19:49:09 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,7 +0,0 @@ ---- oldfcall.c.orig Sat Mar 2 19:05:52 2002 -+++ oldfcall.c Tue Mar 15 14:43:08 2011 -@@ -1,3 +1,4 @@ -+#include <stdlib.h> - #include <plan9.h> - #include <fcall.h> - #include <oldfcall.h> Index: patches/patch-safecpy_c =================================================================== RCS file: patches/patch-safecpy_c diff -N patches/patch-safecpy_c --- patches/patch-safecpy_c 11 Mar 2022 19:49:09 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,8 +0,0 @@ ---- safecpy.c.orig Tue Mar 15 14:41:45 2011 -+++ safecpy.c Tue Mar 15 14:41:53 2011 -@@ -1,4 +1,5 @@ - #include <stdio.h> -+#include <string.h> - - void - safecpy(char *to, char *from, int tolen) Index: patches/patch-u9fs_man =================================================================== RCS file: patches/patch-u9fs_man diff -N patches/patch-u9fs_man --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-u9fs_man 28 Aug 2022 08:37:17 -0000 @@ -0,0 +1,11 @@ +change the section; 8 is more appropriate for an inetd(8) application. + +Index: u9fs.man +--- u9fs.man.orig ++++ u9fs.man +@@ -1,4 +1,4 @@ +-.TH U9FS 4 ++.TH U9FS 8 + .SH NAME + u9fs \- serve 9P from Unix + .SH SYNOPSIS Index: pkg/PLIST =================================================================== RCS file: /home/cvs/ports/plan9/u9fs/pkg/PLIST,v retrieving revision 1.2 diff -u -p -r1.2 PLIST --- pkg/PLIST 11 Mar 2022 19:49:09 -0000 1.2 +++ pkg/PLIST 28 Aug 2022 08:37:45 -0000 @@ -1 +1,2 @@ @bin bin/u9fs +@man man/man8/u9fs.8