forked from pEp.foundation/pEpEngine
Removing rancid doc files. If we have build instructions, we have a responsibility to keep them up to date. If not, they're more dangerous than they're worth.
parent
6b008e7df8
commit
99f47984f0
@ -1,161 +0,0 @@
|
||||
<!-- Copyright 2015-2017, pEp foundation, Switzerland
|
||||
This file is part of the pEp Engine
|
||||
This file may be used under the terms of the Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License
|
||||
See CC_BY-SA.txt -->
|
||||
|
||||
# Build instructions for macOS Sierra
|
||||
|
||||
# Installing packaged dependencies
|
||||
You will find instructions for using either Macports or Homebrew below to install the compile-time dependencies.
|
||||
|
||||
## MacPorts
|
||||
Install MacPorts according to the instructions found [here](https://www.macports.org/install.php).
|
||||
Ensure that Macports' binary paths (`/opt/local/bin` and `/opt/local/sbin`) are in your `PATH` environment variable.
|
||||
|
||||
~~~
|
||||
# general
|
||||
sudo port install mercurial
|
||||
# YML2
|
||||
sudo port install py27-lxml
|
||||
# libetpan
|
||||
sudo port install git autoconf automake libtool
|
||||
# asn1c
|
||||
sudo port install asn1c
|
||||
# engine
|
||||
sudo port install gpgme
|
||||
~~~
|
||||
|
||||
Ensure that `python` is Python 2.7:
|
||||
|
||||
~~~
|
||||
sudo port select python python27
|
||||
~~~
|
||||
|
||||
## Homebrew
|
||||
Install Homebrew according to the instructions found [here](https://docs.brew.sh/Installation.html).
|
||||
Ensure that Homebrew's binary path (`/usr/local/bin`) is in your `PATH` environment variable.
|
||||
|
||||
~~~
|
||||
# general
|
||||
brew install mercurial
|
||||
# YML2
|
||||
# If you don't have pip with your Python 2 distribution, you can install it with brew
|
||||
brew install python
|
||||
pip2 install --user lxml
|
||||
# libetpan
|
||||
brew install git autoconf automake libtool
|
||||
# asn1c
|
||||
brew install asn1c
|
||||
# engine
|
||||
brew install gpgme
|
||||
~~~
|
||||
|
||||
# Installing unpackaged dependencies
|
||||
## YML2
|
||||
To check if lxml is properly installed, you can use this lxml "hello world" command:
|
||||
|
||||
~~~
|
||||
python2 -c 'from lxml import etree; root = etree.Element("root"); print(root.tag)'
|
||||
~~~
|
||||
|
||||
It should generate the following output:
|
||||
|
||||
~~~
|
||||
root
|
||||
~~~
|
||||
|
||||
~~~
|
||||
mkdir -p ~/code/yml2
|
||||
hg clone https://pep.foundation/dev/repos/yml2/ ~/code/yml2
|
||||
~~~
|
||||
|
||||
## libetpan
|
||||
pEp Engine requires libetpan with a set of patches that have not been upstreamed yet.
|
||||
|
||||
~~~
|
||||
mkdir -p ~/code/libetpan
|
||||
git clone https://github.com/fdik/libetpan ~/code/libetpan
|
||||
cd ~/code/libetpan
|
||||
mkdir ~/code/libetpan/build
|
||||
./autogen.sh --prefix="$HOME/code/libetpan/build"
|
||||
make
|
||||
make install
|
||||
~~~
|
||||
|
||||
## GPGME
|
||||
The MacPorts-packaged GPGME links to a version of GNU libiconv that has files in the same include/library paths as GPGME. This version of libiconv must not be visible to the linker when the pEp Engine is build or run.
|
||||
|
||||
Thus the files of the GPGME distribution will have to be manually copied to separate include/library folders, so that no include or library paths used for building the pEp Engine contains files of MacPorts' libiconv distribution.
|
||||
|
||||
~~~
|
||||
mkdir -p ~/code/gpgme/build/include
|
||||
cp /opt/local/include/gpg*.h ~/code/gpgme/build/include
|
||||
mkdir -p ~/code/gpgme/build/lib
|
||||
cp -r /opt/local/lib/libgpg* ~/code/gpgme/build/lib
|
||||
~~~
|
||||
|
||||
It's of course possible to skip MacPort's version, and use a self-compiled GPGME/GPG. The default build configuration assumes this case, and assumes you have installed your GPGME with `$(HOME)` as your prefix.
|
||||
|
||||
# pEp Engine
|
||||
|
||||
~~~
|
||||
mkdir -p ~/code/pep-engine
|
||||
hg clone https://pep.foundation/dev/repos/pEpEngine/ ~/code/pep-engine
|
||||
cd ~/code/pep-engine
|
||||
mkdir ~/code/pep-engine/build
|
||||
~~~
|
||||
|
||||
Edit the build configuration to your needs in `Makefile.conf`, or create a `local.conf` that sets any of the make variables documented in `Makefile.conf`. All the default values for the build configuration variables on each platform are documented in `Makefile.conf`.
|
||||
|
||||
If a dependency is not found in your system's default include or library paths, you will have to specify the according paths in a make variable. Typically, this has to be done at least for YML2, and libetpan.
|
||||
|
||||
For a more detailed explanation of the mechanics of these build configuration files, and overriding defaults, see the comments in `Makefile.conf`.
|
||||
|
||||
Below is a sample `./local.conf` file, for orientation.
|
||||
|
||||
~~~
|
||||
PREFIX=$(HOME)/code/engine/build
|
||||
PER_MACHINE_DIRECTORY=$(PREFIX)/share/pEp
|
||||
|
||||
YML2_PATH=$(HOME)/code/yml2
|
||||
|
||||
ETPAN_LIB=-L$(HOME)/code/libetpan/build/lib
|
||||
ETPAN_INC=-I$(HOME)/code/libetpan/build/include
|
||||
|
||||
GPGME_LIB=-L$(HOME)/lib
|
||||
GPGME_INC=-I$(HOME)/include
|
||||
~~~
|
||||
|
||||
The engine is built as follows:
|
||||
|
||||
~~~
|
||||
make all
|
||||
make db
|
||||
~~~
|
||||
|
||||
If your build fails with an error message similar to the following:
|
||||
|
||||
~~~
|
||||
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 477, in _parse_localename
|
||||
raise ValueError, 'unknown locale: %s' % localename
|
||||
ValueError: unknown locale: UTF-8
|
||||
~~~
|
||||
|
||||
or any other locale-related Python error, make sure Python does not have any locale-related environment variables set.
|
||||
Usually, `unset LC_CTYPE` is sufficient to take care of the problem, but it depends on your macOS's regional and language settings and which terminal emulator you use.
|
||||
This is a bug in Python, see [https://bugs.python.org/issue18378#msg215215](https://bugs.python.org/issue18378#msg215215).
|
||||
|
||||
The unit tests can be run without the engine library being installed, however `system.db` must be installed:
|
||||
|
||||
~~~
|
||||
make -C db install
|
||||
~~~
|
||||
|
||||
Since `system.db` rarely changes, its installation is not needed for every build.
|
||||
|
||||
Tests can be compiled and executed with the following commands:
|
||||
|
||||
~~~
|
||||
make -C test compile
|
||||
make test
|
||||
~~~
|
@ -1,43 +0,0 @@
|
||||
# Using NetPGP instead of GnuPG
|
||||
## Prepare
|
||||
|
||||
Get OpenSSL:
|
||||
curl -O https://www.openssl.org/source/openssl-1.1.0f.tar.gz
|
||||
|
||||
Build it using the openssl-for-ios build script:
|
||||
git clone https://github.com/sinofool/build-openssl-ios/ .
|
||||
|
||||
|
||||
|
||||
and build/install it as shared library.
|
||||
|
||||
```
|
||||
wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz
|
||||
tar xvfz openssl-1.0.1u.tar.gz
|
||||
cd openssl-1.0.1u
|
||||
./Configure darwin64-x86_64-cc --prefix=$HOME shared
|
||||
make install
|
||||
```
|
||||
|
||||
Get and autoconf NetPGP
|
||||
|
||||
```
|
||||
cd $SRC
|
||||
hg clone https://pep.foundation/dev/repos/netpgp-et/
|
||||
cd netpgp-et
|
||||
autoreconf -i
|
||||
```
|
||||
|
||||
## Build
|
||||
|
||||
Important : LDFLAGS is set to help finding OpenSSL shared lib. If not set,
|
||||
system's default libcrypto may silently be used instead, causing memory
|
||||
corruption or crash at runtime.
|
||||
|
||||
```
|
||||
mkdir netpgp_debug
|
||||
cd netpgp_debug
|
||||
$SRC/netpgp-et/configure --with-openssl=$HOME --prefix=$HOME CPPFLAGS=-DDEBUG CXXFLAGS="-g -O0" LDFLAGS="-L${HOME}/lib"
|
||||
make
|
||||
make install
|
||||
```
|
@ -1,58 +0,0 @@
|
||||
<!-- Copyright 2015-2017, pEp foundation, Switzerland
|
||||
This file is part of the pEp Engine
|
||||
This file may be used under the terms of the Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) License
|
||||
See CC_BY-SA.txt -->
|
||||
|
||||
# Information about the pEp Engine
|
||||
|
||||
# Dependencies
|
||||
The p≡p Engine depends on the following projects:
|
||||
|
||||
- run-time dependencies
|
||||
- One of the following OpenPGP implementations:
|
||||
- GnuPG version 2.1.17 or later with GPGME (at least version 1.7.0) [https://gnupg.org/](https://gnupg.org/)
|
||||
- For platforms not supporting pinentry (e.g. Android) - GnuPG version 2.0.30 with GPGME version 1.6.0 (or later) [https://gnupg.org/](https://gnupg.org/)
|
||||
- a fork of NetPGP, [https://pep.foundation/dev/repos/netpgp-et/](https://pep.foundation/dev/repos/netpgp-et/)
|
||||
- Sequoia, which in turn requires:
|
||||
- Rust
|
||||
- libnettle
|
||||
- One of the following MIME libraries:
|
||||
- a fork of libetpan, [https://github.com/fdik/libetpan](https://github.com/fdik/libetpan)
|
||||
- pEpMIME
|
||||
- zlib, [http://zlib.net/](http://zlib.net/)
|
||||
- libcurl (Only with NetPGP), [https://curl.haxx.se/libcurl/](https://curl.haxx.se/libcurl/)
|
||||
- libuuid, [https://www.kernel.org/pub/linux/utils/util-linux/](https://www.kernel.org/pub/linux/utils/util-linux/)
|
||||
- SQLite, [https://sqlite.org](https://sqlite.org)
|
||||
- OpenSSL (Only with NetPGP), [https://www.openssl.org](https://www.openssl.org)
|
||||
- compile-time dependencies
|
||||
- asn1c (version v0.9.28), [http://lionet.info/asn1c/blog/](http://lionet.info/asn1c/blog/)
|
||||
- yml2, [https://fdik.org/yml//toolchain](https://fdik.org/yml//toolchain)
|
||||
- Python 3
|
||||
- LXML
|
||||
- One of the following build systems:
|
||||
- GNU make (on Linux and macOS)
|
||||
- MSBuild distributed with Microsoft Visual Studio 2015 (on Windows)
|
||||
- One of the following compilers for C and C++:
|
||||
- GNU GCC (on Linux)
|
||||
- Apple "clang" LLVM (on MacOS)
|
||||
- Microsoft MSVC/MSVC++ distributed with Microsoft Visual Studio 2015 (on Windows)
|
||||
- A script for compiling OpenSSL for iOS, [https://github.com/sinofool/build-openssl-ios/](https://github.com/sinofool/build-openssl-ios/)
|
||||
- binutils
|
||||
|
||||
# The pEp Engine's databases
|
||||
The p≡p Engine uses two databases:
|
||||
|
||||
- the management database
|
||||
- `~/.pEp_management` on \*NIX
|
||||
- `%LOCALAPPDATA%\pEp\management.db` on Windows
|
||||
- the Trustword database
|
||||
- `/usr/local/share/system.db` on \*NIX
|
||||
- `%ALLUSERSPROFILE%\pEp\system.db` on Windows
|
||||
|
||||
The management db is created by the first call of `init()` of p≡p Engine.
|
||||
It does not need to be created manually.
|
||||
`system.db` is created by using the DDL in `db/create_system_db.sql`; the database content is created by `db/dic2csv.py` out of hunspell's dictionary packages (or something similar) and then imported using `sqlite3`'s `.import` command.
|
||||
Dictionary files for different languages are part of the p≡p Engine source distribution.
|
||||
|
||||
You can test the Trustwords in `system.db` using `db/trustwords.py`.
|
||||
Both Python tools have a `--help` switch.
|
@ -1,2 +0,0 @@
|
||||
# Testing
|
||||
For the documentation of the tests, see `test/README.md`
|
Loading…
Reference in New Issue