9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] recover(4) go rewrite
       [not found] <CA+ctqrr1EpmmzFtN6sq5JeKKYjgjJPp29Cc-Ps8xTvoH0y_tHQ@mail.gmail.com>
@ 2021-05-11  7:20 ` fgergo
  2021-05-11 19:20   ` kvik
  0 siblings, 1 reply; 4+ messages in thread
From: fgergo @ 2021-05-11  7:20 UTC (permalink / raw)
  To: 9fans

Hi,

 I needed recover(4) on windows, I rewrote most if it in go. This go version:
- doesn't work on plan9,
- can't do authentication (without plan9port's auth in go, iiuc it's hard),
- works on windows and on unix where go works,
- works on android (in termux), though not very useful at the moment,
- works both with or without plan9port,
- uses go net.Dial() address format (host:port),
- when using without plan9port, it won't clean up socket file after terminating,
- needs NAMESPACE set on windows,
- it'll default stay in the foreground.

To use this version of recover you'll need 9pserve in your path. If
you have plan9port installed, you have 9pserve.
If plan9port is not used (eg. on windows, android or on unix without
plan9port) you need to
go get github.com/fhs/mux9p/cmd/9pserve
and put 9pserve executable in your path.

To install recover it's just
go get github.com/fgergo/recover

I use recover+Harvey-os/ufs with tailscale (i.e auth by tailscale is
enough) on most home computers (unix, windows, android). It's fun. All devices
are accessible from all devices, without remounting 9p servers, ha!
(Devices can go away and come back online on a - possibly - different
network without any explicit management.)

If you'd like to have something similar, here are a few possibly
useful instructions:
To build harvey-os/ufs on windows: you need to change all 'File' references
to 'file' in ninep/filesystem/filesystem_windows.go and then build cmd/ufs
On unix and android just
go get github.com/Harvey-OS/ninep/cmd/ufs

On windows in inferno (or acme-sac), to mount the unix socket of
recover, you need to
go get github.com/fgergo/us2stdio
and put us2stdio.exe in your path to access recover-secured file
servers, until inferno on windows can access unix sockets.
(Of course in inferno mount -P is working fine.)

best,
Gergő

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T1d7bf3c39e885267-M8c882a2295e159758d872702
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] recover(4) go rewrite
  2021-05-11  7:20 ` [9fans] recover(4) go rewrite fgergo
@ 2021-05-11 19:20   ` kvik
  2021-05-11 20:23     ` Kurt H Maier
  0 siblings, 1 reply; 4+ messages in thread
From: kvik @ 2021-05-11 19:20 UTC (permalink / raw)
  To: 9fans

>  I needed recover(4) on windows, I rewrote most if it in go.

Where can the original version be found?


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T1d7bf3c39e885267-Md508afb3d00a30003d676ee0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] recover(4) go rewrite
  2021-05-11 19:20   ` kvik
@ 2021-05-11 20:23     ` Kurt H Maier
  2021-05-12  8:53       ` fgergo
  0 siblings, 1 reply; 4+ messages in thread
From: Kurt H Maier @ 2021-05-11 20:23 UTC (permalink / raw)
  To: 9fans

On Tue, May 11, 2021 at 09:20:23PM +0200, kvik@a-b.xyz wrote:
> >  I needed recover(4) on windows, I rewrote most if it in go.
> 
> Where can the original version be found?

At /n/sources/contrib/paurea/recover4e.tgz

paper at /n/sources/contrib/rsc/recover/recover.pdf


khm

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T1d7bf3c39e885267-M40d17a9c88f48d66528a2fdb
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] recover(4) go rewrite
  2021-05-11 20:23     ` Kurt H Maier
@ 2021-05-12  8:53       ` fgergo
  0 siblings, 0 replies; 4+ messages in thread
From: fgergo @ 2021-05-12  8:53 UTC (permalink / raw)
  To: 9fans

Thanks for asking kvik! I just realised the original references could
have been more direct. I added a readme listing the original version
and the authors.
Thank you khm, for the quick references!

If you want to use the C version with plan9port, you'll need to change
post9pservice(pfd[0], srv);
to
post9pservice(pfd[0], srv, nil);

Please also note, that during the rewrite go runtime caught that nwq
can be 0 here:
srv.c:538
srv.c:541
The go version now has nwq > 0.

On 5/11/21, Kurt H Maier <khm@sciops.net> wrote:
> On Tue, May 11, 2021 at 09:20:23PM +0200, kvik@a-b.xyz wrote:
>> >  I needed recover(4) on windows, I rewrote most if it in go.
>>
>> Where can the original version be found?
> 
> At /n/sources/contrib/paurea/recover4e.tgz
> 
> paper at /n/sources/contrib/rsc/recover/recover.pdf
> 
> khm

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T1d7bf3c39e885267-Md878286eb6fe027f05e91c23
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

end of thread, other threads:[~2021-05-12  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CA+ctqrr1EpmmzFtN6sq5JeKKYjgjJPp29Cc-Ps8xTvoH0y_tHQ@mail.gmail.com>
2021-05-11  7:20 ` [9fans] recover(4) go rewrite fgergo
2021-05-11 19:20   ` kvik
2021-05-11 20:23     ` Kurt H Maier
2021-05-12  8:53       ` fgergo

9fans - fans of the OS Plan 9 from Bell Labs

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/9fans

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9fans 9fans/ http://inbox.vuxu.org/9fans \
		9fans@9fans.net
	public-inbox-index 9fans

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9fans


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git