Commit 1feb0de4 authored by Silvio Rhatto's avatar Silvio Rhatto
Browse files

Merge branch 'fix/build' into 'main'

Build script improvements

See merge request !81
parents e22477e7 d7f48422
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -8,8 +8,10 @@
* Run lint during CI/CD.
* Standardize build/install script names.
* Use timestamps in the configuration log file names (closes [tpo/onion-services/onionspray#46][]).
* Build script improvements ([tpo/onion-services/onionspray!81][]).

[tpo/onion-services/onionspray#46]: https://gitlab.torproject.org/tpo/onion-services/onionspray/-/issues/46
[tpo/onion-services/onionspray!81]: https://gitlab.torproject.org/tpo/onion-services/onionspray/-/merge_requests/81

## v1.6.0 - 2024-02-09

+11 −15
Original line number Diff line number Diff line
@@ -48,15 +48,8 @@ Onionspray have optional requirements, depending on what you want to do:

## Preparation

To ensure all software is properly built, make sure that `/sbin` is available
at your `$PATH` environment variable[^path-env].

If unsure, you can safely run the following command:

    export PATH=$PATH:/sbin

You main also want to add the `onionspray` folder into your `$PATH`, so you
can invoke Onionspray anywhere:
You main want to add the `onionspray` folder into your `$PATH`, so you can
invoke Onionspray anywhere:

    export PATH=$PATH:/path/to/onionspray

@@ -72,12 +65,6 @@ Or instead of invoking by it's full path name, such as

    /path/tonionspray/onionspray

[^path-env]: This is especially valid for LuaJIT, whose compilation [might fail
  if /sbin is not on $PATH][] with the `you need to have ldconfig in your PATH
  env when enabling luajit` error message.

[might fail if /sbin is not on $PATH]: https://stackoverflow.com/questions/75568064/openresty-you-need-to-have-ldconfig-in-your-path-env-when-enabling-luajit

## Per-platform installation

Onionspray is installed directly from it's [repository][].
@@ -90,6 +77,15 @@ Onionspray is installed directly from it's [repository][].

    Check issue [tpo/onion-services/onionspray#33][] for details.

!!! tip "Keeping the source code"

    By default, the Onionspray build procedures will cleanup all dependencies'
    source code after compilation.

    Use the `--keep-sources` flag on the build scripts to preserve the sources,
    which can be helpful for debugging, testing and other tinkering. Builds
    running a second time with this flag tends to complete faster.

[tpo/onion-services/onionspray#33]: https://gitlab.torproject.org/tpo/onion-services/onionspray/-/issues/33

[repository]: https://gitlab.torproject.org/tpo/onion-services/onionspray/
+6 −0
Original line number Diff line number Diff line
#!/bin/sh -x

# source code handling
if echo $* | grep -q -- '--keep-sources'; then
  export ONIONSPRAY_KEEP_SOURCES="1"
fi

# platform-independent lib.sh
cd `dirname $0` || exit 1
opt_dir=`pwd`
@@ -13,6 +18,7 @@ libevent-devel
openssl-devel
pcre-devel
"

# i wonder if i need to pare this down to something more minimalist?
sudo yum -y groupinstall 'Development Tools'
sudo yum -y install $shared_deps || exit 1
+5 −0
Original line number Diff line number Diff line
#!/bin/sh -x

# source code handling
if echo $* | grep -q -- '--keep-sources'; then
  export ONIONSPRAY_KEEP_SOURCES="1"
fi

# platform-independent lib.sh
cd `dirname $0` || exit 1
opt_dir=`pwd`
+5 −0
Original line number Diff line number Diff line
#!/bin/sh -x

# source code handling
if echo $* | grep -q -- '--keep-sources'; then
  export ONIONSPRAY_KEEP_SOURCES="1"
fi

# platform-independent lib.sh
cd `dirname $0` || exit 1
opt_dir=`pwd`
Loading