Re: [9fans] git9 on 9legacy

2019-12-05 Thread ori
> Very cool. I just tried and it seems to work.
> 
> patch/apply rc-line-split
> 
> This patch does not apply cleanly on 9legacy because of conflict with
> rc-badrunes patch
> (see http://www.9legacy.org/patch.html) which is included in 9legacy CD
> image.

Ah, I was working from miller's pi image. I've not been following what the
differences between the various images are; I assumed that 9legacy and the
pi image were close enough. What's the best way to get in sync on the pi?

> I've installed the commands in a "git9" directory instead of "git", so it
> doesn't conflict with the 9legacy git script (
> http://www.9legacy.org/9legacy/tools/git), which I still want to have
> around for 'go get'. It's possible we can have a more complete git script
> with the help of git9.

Yes.  I've thought about this a bit, and I think the approach I like
most is a 'git/compat' script, which would leave you in a namespace
where 'git' is a git-compatible-enough script that you could use for
foreign software like go. Something like:

#!/bin/rc
bind -b /sys/lib/git/compat /bin

Where /sys/lib/git/compat is a directory containing a 'git' script
with all of the compatibility switches and mangling that's needed.

But I don't have the 'git' script that we'd put there, and I don't
know what sufficient compatibility looks like, so I'd need someone
else to help out on that end.

One notable omission in git9, by the way, is http clones. This is
something go may want. I personally don't miss them, so I'm unlikely
to get around to them soon, but I have a good idea of how to go about
them, and I'd be happy to help out anyone interested in getting it
done.


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T8be5c9b686015974-M7bd4cfb938079cb3351a52ee
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] git9 on 9legacy

2019-12-05 Thread Fazlul Shahriar
Very cool. I just tried and it seems to work.

patch/apply rc-line-split

This patch does not apply cleanly on 9legacy because of conflict with
rc-badrunes patch
(see http://www.9legacy.org/patch.html) which is included in 9legacy CD
image.

I've installed the commands in a "git9" directory instead of "git", so it
doesn't conflict with the 9legacy git script (
http://www.9legacy.org/9legacy/tools/git), which I still want to have
around for 'go get'. It's possible we can have a more complete git script
with the help of git9.

fhs

--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T8be5c9b686015974-Mba1fca18cabf0967551ce54f
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


[9fans] along the way...

2019-12-05 Thread ori
I realized that the ape-erik patch was only available as a
diff on 9legacy.org, and was missing inttypes.h for arm,
so I fixed that omission, and imported it as something
that you can get with patch/apply:

patch/apply ape-erik

I also ran into an issue with bad assembly in ape causing
crashes with any code that called getfcr(). There was a
variant of the code that implemented getfcr() uising VFP
sitting in /sys/src/libc/getfcr.vfp.s, so I replaced the
implementations in both libc and ape with it. It seems to
work, and matches what we have on 9front. It's certainly
no more wrong than what was there, but an extra pair of
arm-familiar eyes would be appreciated on that patch.

patch/apply rpi-getfcr-vfp

Talking with miller off-list, making the default arm
floating point use vfp seems like a good idea, which
would probably make this patch the right choice.

I couldn't figure out how to delete files with patch/create,
so there will probably be a bit of junk left laying around
from the ape-erik patch application.


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T12f163bbd73cfb63-M8302ba5adc55f0717dc94195
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] git9 on 9legacy

2019-12-05 Thread ori
>> I got a box running 9legacy running, 
> 
> usb keyboard/mouse are working?

Yes, more or less - I've had the keyboard flake out
on me. But it's a raspberry pi, not a pc.


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T04ec34b12463154b-Maf9c89ff89dacc803e9910c0
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


Re: [9fans] git9 on 9legacy

2019-12-05 Thread kokamoto
> I got a box running 9legacy running, 

usb keyboard/mouse are working?

Kenji


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T04ec34b12463154b-M951fed502f0a1e59a8e76b6a
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription


[9fans] git9 on 9legacy

2019-12-05 Thread ori
I got a box running 9legacy running, and fixed the portability
issues in git9, since it didn't seem like anyone else was going
to do the work.

There are two patches needed which I put on sources:

- rc-line-split:
implement `delim{...} syntax for rc

- walk
port walk command to 9legacy.

Other than that, there were a couple of tweaks needed to
git9 itself: 9legacy has no '%z' format specifier, which
means that there's no way of printing pointer differences;
that's ok, they weren't really used for anything important.

And 9legacy awk is still an ape program, which means that
it uses /bin/sh. Some of the system calls that git9 was
doing from within awk used rc syntax. I pulled the code
up into awk, and made the commands shell agnostic.

So, to summarize:

# get dependencies
patch/apply rc-line-split
patch/apply walk
cd /sys/src
mk all
mk install

# get bootstrap version of git9
cd /tmp
hget http://github.com/oridb/git9/archive/master.tar.gz | tar xvz
cd git9-master
mk all
mk install

# now you can get stuff with git
git/clone git://github.com/oridb/git9
cd git9
mk install


--
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T8be5c9b686015974-M1a1610578d6852668653999e
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription