Skip to content

Commit

Permalink
Remove argon2 submodule and update README.
Browse files Browse the repository at this point in the history
All of the supported OSes now have argon2 packages, so we use those
instead. This greatly simplifies the building process.
  • Loading branch information
lisdude authored and sorressean committed Mar 12, 2022
1 parent 694b80a commit 772c88a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 35 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "src/dependencies/phc-winner-argon2"]
path = src/dependencies/phc-winner-argon2
url = https://github.com/P-H-C/phc-winner-argon2
[submodule "src/dependencies/vectorclass"]
path = src/dependencies/vectorclass
url = https://github.com/vectorclass/version2
Expand Down
37 changes: 6 additions & 31 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ ToastStunt is a fork of the LambdaMOO / Stunt server. It has a number of feature
* [Features](#features)
* [ChangeLog](ChangeLog.md)
* [Build Instructions](#build-instructions)
* [Debian/Ubuntu](#debian-ubuntu)
* [REL/CentOS](#rel-centos)
* [Debian/Ubuntu/WSL](#debianubuntuwsl)
* [Gentoo](#gentoo)
* [FreeBSD](#freebsd)
* [macOS](#macos)
Expand Down Expand Up @@ -44,7 +43,7 @@ ToastStunt is a fork of the LambdaMOO / Stunt server. It has a number of feature

- Basic threading support:
- background.cc (a library, of sorts, to make it easier to thread builtins)
- Threaded builtins: sqlite_query, sqlite_execute, locate_by_name, sort, slice, argon2, argon2_verify, connection_name_lookup
- Threaded builtins: sqlite_query, sqlite_execute, locate_by_name, sort, argon2, argon2_verify, connection_name_lookup
- set_thread_mode (an argument of 0 will disable threading for all builtins in the current verb, 1 will re-enable, and no arguments will print the current mode)
- `thread_pool()` (database control over the the thread pools)

Expand Down Expand Up @@ -148,19 +147,9 @@ ToastStunt is a fork of the LambdaMOO / Stunt server. It has a number of feature
- Allow handling of SIGUSR signals in the database with `#0:handle_signal()`

## Build Instructions
### **Debian/Ubuntu**
### **Debian/Ubuntu/WSL**
```bash
apt install build-essential bison gperf cmake libsqlite3-dev libaspell-dev libpcre3-dev nettle-dev g++ libcurl4-openssl-dev
mkdir build && cd build
cmake ../
make -j2
```

### **REL/CentOS**
```bash
yum group install -y "Development Tools"
yum install -y sqlite-devel pcre-devel aspell-devel nettle-devel gperf centos-release-scl
yum install -y devtoolset-7
apt install build-essential bison gperf cmake libsqlite3-dev libaspell-dev libpcre3-dev nettle-dev g++ libcurl4-openssl-dev libargon2-dev libssl-dev
mkdir build && cd build
cmake ../
make -j2
Expand All @@ -176,7 +165,7 @@ make -j2

### **FreeBSD**
```bash
pkg install bison gperf gcc cmake sqlite3 aspell pcre nettle
pkg install bison gperf gcc cmake sqlite3 aspell pcre nettle libargon2
mkdir build && cd build
cmake ../
make -j2
Expand All @@ -189,28 +178,14 @@ If using OpenSSL, you may have to export an environment variable before running
- Apple Silicon: `export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"`
- Intel: `export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig"`

Follow the instructions in the notes section below to compile and install Argon2. **NOTE**: In the last step, the install prefix should be changed to `/usr/local`

```bash
brew install pcre aspell nettle cmake openssl
brew install pcre aspell nettle cmake openssl argon2
mkdir build && cd build
cmake ../
make -j2
```

## **Notes**
### Argon2
Many distributions do not include [Libargon2](https://github.com/P-H-C/phc-winner-argon2) which is required for Argon2id password hashing. As such, it has been included as a Git submodule in this repository. To build it yourself, follow these steps:

1. Inside of the ToastStunt repository, checkout all available submodules: `git submodule update --init`
2. `cd src/dependencies/phc-winner-argon2`
3. Build the library: `make`
4. Install it on your system: `make install PREFIX=/usr`

**NOTE**: macOS users should instead use `make install PREFIX=/usr/local` in step 4.

**NOTE**: FreeBSD users should use `gmake`.

### CMake Build Options
There are a few build options available to developers:

Expand Down
1 change: 0 additions & 1 deletion src/dependencies/phc-winner-argon2
Submodule phc-winner-argon2 deleted from 62358b

0 comments on commit 772c88a

Please sign in to comment.