forked from hyphanet/fred
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.clean-build
56 lines (41 loc) · 2.68 KB
/
README.clean-build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
These are instructions on how to rebuild Freenet completely from source.
It is difficult for everyone to build all components, so the default Freenet
source package ships with some pre-compiled binaries. However, this means that
users need to trust that these binaries haven't been compromised.
For the paranoid, we offer the option of building these binaries yourself, so
that this extra trust is not necessary[1]. Unfortunately, this involves more
effort than the default build path; help in easing this would be appreciated.
== Considerations ==
(Properties can be set in override.properties, similar to build.properties)
A. The build scripts need to know where the contrib jars are. By default, they
look in lib/freenet; you can override this by setting `lib.contrib.dir` - see
build.properties for more details.
B. You may need to install extra Java libraries. These are listed in build.xml,
in the <path> elements. If you already have these installed, but ANT can't find
them, you can try setting the "java.class.dirs.user" property.
B.1. If you're doing a clean-build for security reasons, then you'll want to
clean-build these libraries too. Google's source package for GWT actually uses
many binary components during the build process, which makes a clean-build next
to impossible; however (e.g.) Debian's GWT source package[2] is pure source.
B.2. It's also a good idea to make sure you received the source code correctly.
Most modern package managers (e.g. APT) have signature verification, or you can
try HTTPS (e.g. logged in on googlecode).
C. There is a good deal of native code in freenet-ext.jar that won't be rebuilt
by our automatic build-scripts. You'll need to do this manually; they are: fec,
NativeBigInteger, NativeThread, win_wrapper and wrapper. This is probably the
most tedious step and needs to be done *before* the below command.
== Clean-building ==
The pre-compiled components are freenet-ext.jar (ext) and the GWT-generated
javascript (gjs). The former is a separate package ("contrib"), whereas the
latter is strictly contained within this package.
To use the build scripts, you need to install ant. To compile all of the above
completely from source, the recommended method is to use build-clean.xml:
$ ... # retrieve and build external packages (e.g. contrib)
$ ... # set build properties
$ ant -f build-clean.xml dist
NOTE: the default checkout of this package contains some pre-built javascript;
running `dist` will remove it and re-build it from source. You can also remove
it separately by running the `clean-gjs` target.
[1] However, you still need to trust your compiler and operating system; see
Ken Thompson's "Reflections on Trusting Trust".
[2] http://packages.debian.org/source/sid/gwt