On 2022/08/28 15:06:30 +0200, Omar Polo <op@openbsd.org> wrote:
> 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
...time.
>
> 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.
quasi two week bump, plus slightly improved diff:
- install u9fs in sbin rather than bin
- fix the inetd.conf example in the manpage: i don't want to
encourage people to change their /etc/services just to add 9fs to
it and fix the paths so it works out of the box, make it copy-paste
ready :)
ok?
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 8 Sep 2022 14:03:32 -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 <sl@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_PROGRAM} ${WRKDIST}/u9fs ${PREFIX}/sbin/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 8 Sep 2022 14:10:28 -0000
@@ -0,0 +1,43 @@
+- change the section: 8 is more appropriate
+- adjust the inetd example
+
+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
+@@ -217,29 +217,11 @@ device access may produce unpredictable
+ results if the block size of the device is greater than 8192,
+ the maximum data size of a 9P message.
+ .PP
+-The source to
+-.I u9fs
+-is in the Plan 9 directory
+-.BR /sys/src/cmd/unix/u9fs .
+-To install
+-.I u9fs
+-on a Unix system with an ANSI C compiler, copy the source to a directory on that system
+-and run
+-.BR make .
+-Then install the binary in
+-.BR /usr/etc/u9fs .
+ Add this line to
+ .BR inetd.conf :
+ .IP
+ .EX
+-9fs stream tcp nowait root /usr/etc/u9fs u9fs
+-.EE
+-.PP
+-and this to
+-.BR services :
+-.IP
+-.EX
+-9fs 564/tcp 9fs # Plan 9 fs
++564 stream tcp nowait root /usr/local/sbin/u9fs u9fs
+ .EE
+ .LP
+ Due to a bug in their
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 8 Sep 2022 14:03:54 -0000
@@ -1 +1,2 @@
-@bin bin/u9fs
+@man man/man8/u9fs.8
+@bin sbin/u9fs
No comments:
Post a Comment