Skip to content
Snippets Groups Projects

MVP build process

Merged Erick Hitter requested to merge 1-add-build into master
Compare and Show latest version
2 files
+ 37
25
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 22
24
@@ -16,13 +16,8 @@ echo ""
# Common paths.
NGINX_SRC_DIR="$OG_DIR/src/nginx"
export NGINX_SRC_DIR
mkdir -p "$NGINX_SRC_DIR"
NGINX_SRC_ARCHIVE="$OG_DIR/src/nginx-src.tar.gz"
export NGINX_SRC_ARCHIVE
NGINX_SRC_ARCHIVE_SIGNATURE="$OG_DIR/src/nginx-src.tar.gz.asc"
export NGINX_SRC_ARCHIVE_SIGNATURE
mkdir -p "$NGINX_SRC_DIR"
OPENSSL_DIR="$OG_DIR/src/openssl"
export OPENSSL_DIR
@@ -34,10 +29,9 @@ NGINX_CT_DIR="$OG_DIR/src/nginx_ct"
export NGINX_CT_DIR
# Dependency: OpenSSL
echo "DEPENDENCY: OpenSSL"
echo ""
echo "DEPENDENCY: OpenSSL AT $OPENSSL_TAG"
git clone -q --recursive --depth 1 https://github.com/openssl/openssl.git -b "$OPENSSL_TAG" "$OPENSSL_DIR"
cd "$OPENSSL_DIR" || exit
./config
# Dependency: ngx_brotli (no tagged releases)
echo ""
@@ -46,23 +40,20 @@ git clone -q --recursive --depth 1 https://github.com/google/ngx_brotli.git "$NG
# Dependency: nginx-ct
echo ""
echo "DEPENDENCY: nginx-ct"
echo "DEPENDENCY: nginx-ct AT $NGINX_CT_TAG"
git clone -q --recursive --depth 1 https://github.com/grahamedgecombe/nginx-ct.git -b "$NGINX_CT_TAG" "$NGINX_CT_DIR"
# nginx from git mirror
echo ""
echo "CLONING nginx FROM GIT MIRROR AT $NGINX_TAG"
git clone -q --recursive --depth 1 https://github.com/nginx/nginx.git -b "$NGINX_TAG" "$NGINX_SRC_DIR"
# Configure nginx
echo ""
echo "DOWNLOADING & VERIFYING NGINX RELEASE"
cd "$OG_DIR" || exit
# Disabled as nginx is signing with individuals' keys.
#curl -o "$NGINX_SRC_ARCHIVE" "$NGINX_SRC"
#curl -o "$NGINX_SRC_ARCHIVE_SIGNATURE" "$NGINX_SIGNING"
#gpg --import <(curl https://nginx.org/keys/nginx_signing.key)
#gpg --verify "$NGINX_SRC_ARCHIVE_SIGNATURE" "$NGINX_SRC_ARCHIVE"
tar -zxvf "$NGINX_SRC_ARCHIVE" -C "$NGINX_SRC_DIR" --strip 1
cd "$NGINX_SRC_DIR" || exit
./configure \
echo "CONFIGURE NGINX"
cd "$NGINX_SRC_DIR" || exit 1
./auto/configure \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
@@ -106,5 +97,12 @@ cd "$NGINX_SRC_DIR" || exit
echo ""
echo "BUILDING NGINX"
echo "Using $(nproc) jobs"
make -j"$(nproc)"
"$NGINX_SRC_DIR/objs/nginx -V"
make
if [[ ! -f "$NGINX_SRC_DIR/objs/nginx" ]]; then
exit 1
fi
# Verify build works
cd "$NGINX_SRC_DIR/objs" || exit 1
./nginx -V
Loading