get-it.md 6.36 KB
Newer Older
bernd's avatar
bernd committed
1 2 3
Get it
======

Bernd Paysan's avatar
Bernd Paysan committed
4 5 6
net2o currently is still experimental and the protocol can have incompatible
changes at any time, so keep net2o up to date when you try it.  Any day can be
a “flag day”.
bernd's avatar
bernd committed
7

bernd's avatar
bernd committed
8 9 10 11 12
Get it for Debian GNU/Linux
---------------------------

I've created a Debian repository to make it easy to install net2o.

bernd's avatar
bernd committed
13 14 15
If you don't have https transport for apt installed, do that first,
since I'll redirect you to https in any case:

Bernd Paysan's avatar
Bernd Paysan committed
16
    sudo apt install apt-transport-https
bernd's avatar
bernd committed
17

bernd's avatar
bernd committed
18 19
Create a debian sources.list file pointing to the net2o repository,
and add my key to the trust db so that Debian can verify the packets,
20
update the repository data and install net2o, so enter:
bernd's avatar
bernd committed
21

Bernd Paysan's avatar
Bernd Paysan committed
22
    sudo -s
bernd's avatar
bernd committed
23
    cat >/etc/apt/sources.list.d/net2o.list <<EOF
Bernd Paysan's avatar
Bernd Paysan committed
24
    deb [arch=i386,amd64,armhf,armel,arm64,powerpc,mips,mipsel,all] https://net2o.de/debian testing main
bernd's avatar
bernd committed
25
    EOF
bernd's avatar
bernd committed
26

27
Remove the architectures on the list above which you don't need; on
bernd's avatar
bernd committed
28 29 30
Debian testing, the list is not necessary, on older versions, the all
part is not searched if you don't have that list, then Gforth fails to
install the gforth-common part.
bernd's avatar
bernd committed
31

Bernd Paysan's avatar
Bernd Paysan committed
32 33 34 35 36
    wget -O - https://net2o.de/bernd@net2o.de-yubikey.pgp.asc | apt-key add -
    apt update
    apt install net2o-gui
    exit

Bernd Paysan's avatar
Bernd Paysan committed
37 38 39 40 41 42 43
There are actually three repositories: stable, testing and unstable; at the
moment, all packages are the same; when net2o matures, stable/testing/unstable
will get different roles, just like Debian (stable=old and rusted, testing=new
and somewhat tested, unstable=most recent).  Binaries are available for amd64,
i386, armhf, arm64, powerpc, armel, mips, and mipsel (in order of how often
they get updated).  More depend on availability of Debian distributions that
run on qemu…
bernd's avatar
bernd committed
44

Bernd Paysan's avatar
Bernd Paysan committed
45
### Key information (new Key from October 18th, 2017)
Bernd Paysan's avatar
Bernd Paysan committed
46

Bernd Paysan's avatar
Bernd Paysan committed
47
I changed to a Yubikey-based signature.  The key's fingerprint is:
Bernd Paysan's avatar
Bernd Paysan committed
48 49 50

    60E71A15 93575330 99A0AAF9 CAF021DB 3B7FA946

51 52 53 54 55 56 57
When you do an `apt-key list`, the result should contain this key:

    pub   4096R/3B7FA946 2017-09-20
    uid                  Bernd Paysan (yubikey) <bernd@net2o.de>
    sub   4096R/3E1896A1 2017-09-20
    sub   4096R/50C9A69B 2017-09-20

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
Get it in a Docker Container
----------------------------

Pull the docker image from my [Dockerhub account](https://hub.docker.com/r/forthy42/net2o) with

    docker pull forthy42/net2o

Create a directory for the files net2o will use.  This will be mounted as
`/net2o` in the container.  A minimal config file is needed for net2o to find
the other data:

    mkdir ~/net2o.dk
    cat <<EOF  >~/net2o.dk/config
	.net2o="/net2o"
	.net2o-config="/net2o"
	.net2o-cache="/net2o"
	EOF

optionally copy *other* existing net2o files into this directory keeping the
directory structure intact.

Create an alias to run the docker:

    alias n2o="docker run -ti --rm -v ~/net2o.dk:/net2o --user $(id -u):$(id -g) forthy42/net2o"

Bernd Paysan's avatar
Bernd Paysan committed
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Get it in a Snap Container
--------------------------

I created a snap container.  You need to get snap for your Linux distribution
(in Ubuntu, it's already there).

<iframe src="https://snapcraft.io/net2o/embedded?button=black" frameborder="0"
width="100%" height="300px" style="border: 1px solid #CCC; border-radius:
2px;"></iframe>

or the CLI way:

    sudo snap install net2o

And then set an alias

    alias n2o=/snap/bin/net2o.n2o

101 102
Your data currently resides inside your `~/snap/net2o/current/` hierarchy, but
that needs to change to make it more useful.
Bernd Paysan's avatar
Bernd Paysan committed
103

bernd's avatar
bernd committed
104 105 106
Get it for Android
------------------

Bernd Paysan's avatar
Bernd Paysan committed
107 108 109
You need: An Android phone with at least Android 4.0, and Gforth, either from
the [Play Store](https://play.google.com/store/apps/details?id=gnu.gforth), or
from [net2o.de/android](https://net2o.de/android/Gforth.apk).
bernd's avatar
bernd committed
110 111

This installs Gforth with the Gforth icons, and a ready-to-run net2o
bernd's avatar
bernd committed
112 113 114
icon in the app drawer.  Just tap on the net2o icon to run net2o;
you'll be asked to create a key on the first run, and to open up a key
on any further run.
bernd's avatar
bernd committed
115

Bernd Paysan's avatar
Bernd Paysan committed
116 117
### Key information

Bernd Paysan's avatar
Bernd Paysan committed
118
The [certificate](https://net2o.de/bernd@net2o.de-android.cer) has the
119
SHA-1/SHA256 fingerprint and the informations as follows:
Bernd Paysan's avatar
Bernd Paysan committed
120

121 122
    sha-1:  00:44:1B:9D:F8:0B:9D:9E:2F:68:9D:0F:B9:B4:85:28:D4:10:5C:7E
	sha256: 87:21:D8:3A:FF:47:8D:50:D0:02:00:C7:06:A1:00:6A:69:1C:37:47:88:52:94:45:C7:E0:DA:8A:47:99:F2:97
Bernd Paysan's avatar
Bernd Paysan committed
123 124
    CN=Bernd Paysan, OU=dev, O=net2o, L=München, ST=Deutschland, C=DE

Bernd Paysan's avatar
Bernd Paysan committed
125 126 127
and signs with sha1rsa2048 (Google!).  If you want to verify the apk yourself,
download the [certificate](https://net2o.de/bernd@net2o.de-android.cer), add
it to your keyring and check:
Bernd Paysan's avatar
Bernd Paysan committed
128 129 130 131

    keytool -importcert -file bernd@net2o.de-android.cer
    jarsigner -verify -verbose Gforth.apk

bernd's avatar
bernd committed
132 133 134
Get it for Windows
------------------

Bernd Paysan's avatar
Bernd Paysan committed
135
You need: A 32/64 bit x86/amd64 Windows. You need to install
Bernd Paysan's avatar
Bernd Paysan committed
136
[Gforth](http://www.complang.tuwien.ac.at/forth/gforth/Snapshots/current/gforth.exe)
bernd's avatar
bernd committed
137
from the latest Snapshot first.
bernd's avatar
bernd committed
138

Bernd Paysan's avatar
Bernd Paysan committed
139 140
Then you install the current [net2o](https://net2o.de/windows/net2o.exe)
snapshot.
bernd's avatar
bernd committed
141

142
### Key information (new key for September 22th 2019)
143

144 145
I changed my key to a Certum smartcard based rsa2048 key, this is the first
update, and I generated a new key pair for that.
146

Bernd Paysan's avatar
Bernd Paysan committed
147 148
These files are now signed with a [sha256rsa2048
certificate](https://net2o.de/bernd@net2o.de-windows.crt) with the
149
SHA-1/SHA256 fingerprint
Bernd Paysan's avatar
Bernd Paysan committed
150

151 152
    sha-1:  96:0b:7e:b8:cb:7f:52:f6:70:00:bf:23:5e:25:66:c9:eb:9c:d0:3c
	sha256: 72:BE:1C:EE:D9:4E:20:94:92:7A:13:BC:C6:8F:7C:E9:3F:15:81:F6:6E:91:85:6B:F6:C5:E1:BA:15:22:01:DA
153 154 155 156 157
	E = bernd@net2o.de
	CN = Open Source Developer, Bernd Paysan
	L = München
	O = Open Source Developer
	C = DE
158

bernd's avatar
bernd committed
159 160
Get it for PC from source
-------------------------
161

Bernd Paysan's avatar
Bernd Paysan committed
162 163 164 165
You need: A Linux machine, Windows with Cygwin or better Cygwin64, Mac OS X
with fink/brew development tools (please use GCC, don't use XCode's clang, it
takes ages to compile Gforth with clang).  You could also compile the Android
version with Android SDK+NDK, but that's a different story.
166 167

You want to have the following packets installed: git automake
bernd's avatar
bernd committed
168 169 170
autoconf make gcc libtool libtool-bin libltdl7-dev yodl emacs
libpcre3-dev bison fossil (libtool-ltdl on RedHat/Centos; the
libtool-bin is for Debian). Or get Fossil here:
171 172 173 174 175
[fossil](http://www.fossil-scm.org/index.html/doc/tip/www/index.wiki)

Get the [do](https://fossil.net2o.de/net2o/doc/trunk/do) file
(latest revision), put it into your net2o folder, and let it run.

176 177 178 179 180 181
    mkdir net2o
    cd net2o
    wget https://fossil.net2o.de/net2o/doc/trunk/do
    chmod +x do
    ./do

182
This script will ask for your root password to install Gforth and the
bernd's avatar
bernd committed
183 184
a few libraries.

bernd's avatar
bernd committed
185
[Try it](try-it.md)
186
-------------------