Skip to content

Commit

Permalink
Merge pull request #9 from mariux64/upgrade-2.5.1
Browse files Browse the repository at this point in the history
Upgrade 2.5.1
  • Loading branch information
wwwutz authored Feb 15, 2024
2 parents 071ec2d + 6c84404 commit bcd0277
Show file tree
Hide file tree
Showing 18 changed files with 341 additions and 42 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
/leptonica-*
/nginx-*
/node-*
/pngquant-*
/sqlite-*
/tessconfigs
/tessdata
/tesseract-*
/unpaper-*
/zbar-*
/ffmpeg-*
*.tar
*.tar.gz
*.tar.xz
!/*.patch
!/*.sh
6 changes: 4 additions & 2 deletions Python.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function B_PYTHON {
[ -d "$PREFIX" ] || { echo "PREFIX unset or not a directory";exit; }

# apt install libbz2-dev
# wget "https://www.python.org/ftp/python/3.11.7/Python-3.11.7.tgz"
SRCURL[0]="https://beehive.molgen.mpg.de/ef61f81ec82c490484219c7f0ec96783/Python-3.11.7.tgz"
# wget "https://www.python.org/ftp/python/3.11.8/Python-3.11.8.tgz"
SRCURL[0]="https://beehive.molgen.mpg.de/7fb0bfaa2f6aae4aadcdb51abe957825/Python-3.11.8.tgz"

PREFIX=${PREFIX}/${BUILD_python}

Expand Down Expand Up @@ -51,13 +51,15 @@ ln -vfs python3 ${PREFIX}/bin/python
ln -vfs python3-config ${PREFIX}/bin/python-config
ln -vfs pydoc3 ${PREFIX}/bin/pydoc
ln -vfs idle3 ${PREFIX}/bin/idle
ln -vfs pip3 ${PREFIX}/bin/pip

. $PREFIX/profile

pip3 install --prefix=$PREFIX --upgrade pip
python3 -m pip install --no-cache-dir --upgrade pipenv==2023.10.24
pip3 install meson
pip3 install sphinx

}

B_PYTHON
Expand Down
19 changes: 19 additions & 0 deletions README.todo
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
✔ sqlite => 3.45.1 @done (24-02-12 13:18)
https://sqlite.org/download.html
☐ Python => 3.11.8
https://www.python.org/downloads/release/python-3118/
☐ node => 20.11.0
https://nodejs.org/download/release/latest-v20.x/
☐ unpaper => git latest
https://github.com/unpaper/unpaper
☐ ffmpeg ?
☐ zbar => 0.23.93
https://github.com/mchehab/zbar/releases/tag/0.23.93
☐ leptonica => 1.84.1
https://github.com/DanBloomberg/leptonica/releases
☐ tesseract => 5.3.4
https://github.com/tesseract-ocr/tesseract
☐ nginx => 1.25.3
https://nginx.org/download/


22 changes: 12 additions & 10 deletions build.profile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BUILD_TAG=2.4.2
BUILD_TAG=2.5.1

. build.local

Expand All @@ -11,13 +11,15 @@ NPROC=$(nproc)
XDG_CACHE_HOME=${PREFIX}/cache
TMPDIR=${TMPDIR:-/tmp/${USER}/${BUILD_TAG}}

BUILD_sqlite=sqlite-3.44.2
BUILD_python=Python-3.11.7
BUILD_unpaper=unpaper-7.0.0
BUILD_zbar=zbar-0.23.90
BUILD_leptonica=leptonica-1.83.1
BUILD_tesseract=tesseract-5.3.3
BUILD_node=node-20.10.0
BUILD_nginx=nginx-1.24.0
BUILD_sqlite=sqlite-3.45.1
BUILD_python=Python-3.11.8
BUILD_node=node-20.11.0
BUILD_ffmpeg=ffmpeg-6.1.1
BUILD_pngquant=pngquant-3.0.3-2-g88da53e
BUILD_unpaper=unpaper-7.0.0-99-gf41e9bb
BUILD_zbar=zbar-0.23.93
BUILD_leptonica=leptonica-1.84.1
BUILD_tesseract=tesseract-5.3.4
BUILD_nginx=nginx-1.25.3

BUILD_paperless=paperless-ngx-2.4.2
BUILD_paperless=paperless-ngx-2.5.1
2 changes: 2 additions & 0 deletions buildall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ ln -fs $logfile $LOGS/build.log
[ -d ${BUILD_sqlite} ] || ./sqlite.build.sh
[ -d ${BUILD_python} ] || ./Python.build.sh
[ -d ${BUILD_node} ] || ./node.build.sh
[ -d ${BUILD_ffmpeg} ] || ./ffmpeg.build.sh
[ -d ${BUILD_pngquant} ] || ./pngquant.build.sh
[ -d ${BUILD_unpaper} ] || ./unpaper.build.sh
[ -d ${BUILD_zbar} ] || ./zbar.build.sh
[ -d ${BUILD_leptonica} ] || ./leptonica.build.sh
Expand Down
34 changes: 23 additions & 11 deletions cleanall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,31 @@
set -e
set -x

. build.profile

declare -a RMRF

RMRF=(
$BUILD_sqlite
$BUILD_python
$BUILD_node
$BUILD_ffmpeg
$BUILD_unpaper
$BUILD_pngquant
$BUILD_zbar
$BUILD_leptonica
$BUILD_tesseract
$BUILD_nginx
$BUILD_paperless
./logs
)

function removeall {
set +e
rm -rf ./leptonica-1.83.1
rm -rf ./nginx-1.24.0
rm -rf ./node-20.10.0
rm -rf ./paperless-ngx
rm -rf ./paperless-ngx-2.4.2
rm -rf ./Python-3.11.7
rm -rf ./sqlite-3.44.2
rm -rf ./tesseract-5.3.3
rm -rf ./unpaper-7.0.0
rm -rf ./zbar-0.23.90
rm -rf ./logs/
for i in "${RMRF[@]}"; do
echo "[$i]"
[ -n "$i" ] && [ -d "$i" ] && rm -rf "$i"
done
set -e
}

Expand Down
48 changes: 48 additions & 0 deletions ffmpeg.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash
{
set -x
set -e

. build.profile

function B_FFMPEG {

[ -d "$PREFIX" ] || { echo "PREFIX unset or not a directory";exit; }

# SRCURL[0]="https://ffmpeg.org//releases/${BUILD_ffmpeg}.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/cce359cad7ed0d4f0079f7864080ad36/ffmpeg-6.1.1.tar.gz"

PREFIX=${PREFIX}/${BUILD_ffmpeg}

mkdir -p $PREFIX

cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
PKG_CONFIG_PATH=${PROJECT}/${BUILD_ffmpeg}/lib/pkgconfig${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH
EOF


test -e ${BUILD_ffmpeg}.tar.gz || wget -nv ${SRCURL} -O ${BUILD_ffmpeg}.tar.gz
test -d ${BUILD_ffmpeg} || mkdir -pv ${BUILD_ffmpeg} && tar -xf ${BUILD_ffmpeg}.tar.gz --strip-components=1 -C ${BUILD_ffmpeg}

cd ${BUILD_ffmpeg}

local _conf=(
--prefix=${PREFIX}
--enable-gpl
--enable-version3
--enable-nonfree
--enable-gray
--disable-doc
)

./configure "${_conf[@]}"

make -j $NPROC
make install

}

B_FFMPEG

}
3 changes: 2 additions & 1 deletion leptonica.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ function B_LEPTONICA {

[ -d "$PREFIX" ] || { echo "PREFIX unset or not a directory";exit; }

SRCURL[0]="https://github.com/DanBloomberg/leptonica/releases/download/1.83.1/leptonica-1.83.1.tar.gz"
# SRCURL[0]="https://github.com/DanBloomberg/leptonica/releases/download/1.84.1/leptonica-1.84.1.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/01e6de7af2ba93b8350cdc3f7aeb0fbf/leptonica-1.84.1.tar.gz"

PREFIX=${PREFIX}/${BUILD_leptonica}

Expand Down
118 changes: 118 additions & 0 deletions nginx-1.25.3.chicken.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
diff --git a/html/50x.html b/html/50x.html
index a57c2f9..6ba724b 100644
--- a/html/50x.html
+++ b/html/50x.html
@@ -9,11 +9,9 @@ font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
-<h1>An error occurred.</h1>
-<p>Sorry, the page you are looking for is currently unavailable.<br/>
-Please try again later.</p>
-<p>If you are the system administrator of this resource then you should check
-the error log for details.</p>
-<p><em>Faithfully yours, nginx.</em></p>
+<h1>Bwok.</h1>
+<p>Cock-a-dodle-doooo-cock-a-doooodle-doooooo Cock-a-doodle-dooooo bwwwaaaaaak-bwwwaaak-bwwwaaak Waaak cock-a-doooodle-dooo bok Waaaaaak-waaak-waaak bwwwaaak cock-a-doooodle-doooo-cock-a-dooooodle-doooo Cluckity-cluckity? Pukaak cock-a-doodle-do-cock-a-dooooodle-doooo cluckity. Cluck-cluck Bwok cluck-cluck-cluck cluck-a-buh-gawk Bwok Bwak waaak Bok Cluck-a-buh-gawk-cluck-a-buh-gawk honk Bok-bok-bok Cluck waaaaaaak bwwwaaak cock-a-dooooooodle-doooo pukak!</p>
+<p>.</p>
+<p><em>Bok bok bok.</em></p>
</body>
</html>
diff --git a/html/index.html b/html/index.html
index e8f5622..b6668f7 100644
--- a/html/index.html
+++ b/html/index.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
-<title>Welcome to nginx!</title>
+<title>Cluck-a-buh-gawk-cluck-a-buh-gawk cluck waaaaaaak!</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
@@ -9,15 +9,11 @@ font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
-<h1>Welcome to nginx!</h1>
-<p>If you see this page, the nginx web server is successfully installed and
-working. Further configuration is required.</p>
+<h1>Chicken!</h1>
+<p>Bwok Puk bok pukak bwak-bwak bwok Cluck bwak-bwak waaaaak bwwwaak-bwwwaaaaak.</p>

-<p>For online documentation and support please refer to
-<a href="http://nginx.org/">nginx.org</a>.<br/>
-Commercial support is available at
-<a href="http://nginx.com/">nginx.com</a>.</p>
+<p>Cluckity... Cluckity Puk-puk Waaaaak cock-a-doodle-doo bwak-bwak-bwak cluckity bwwwaak! Cluckity bok-bok Bok bwok-bwok-bwok bwak-bwak-bwak cluck. Cluck wak-waaaak pukaaaak-pukaaaak-pukaaaaak Puk-puk-puk Puk Gobble-gobble bok Pukaaaaaaak-pukaaaaak bwwwak-bwwwak-bwwwaaaaak Puk bwak bwak-bwak waak-waaaaaaak cluck. Pukak Bwok?</p>

-<p><em>Thank you for using nginx.</em></p>
+<p><em>Cluck-cluck-cluck gobble-gobble-gobble honk Gobble-gobble bwwwaaaaaak.</em></p>
</body>
</html>
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 088aa1e..0e1632f 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -10,8 +10,8 @@


#define nginx_version 1025003
-#define NGINX_VERSION "1.25.3"
-#define NGINX_VER "nginx/" NGINX_VERSION
+#define NGINX_VERSION "1.25.4"
+#define NGINX_VER "chicken/" NGINX_VERSION

#ifdef NGX_BUILD
#define NGINX_VER_BUILD NGINX_VER " (" NGX_BUILD ")"
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
index eaf42e3..fd682a3 100644
--- a/src/http/ngx_http_special_response.c
+++ b/src/http/ngx_http_special_response.c
@@ -33,7 +33,7 @@ static u_char ngx_http_error_build_tail[] =


static u_char ngx_http_error_tail[] =
-"<hr><center>nginx</center>" CRLF
+"<hr><center>chicken</center>" CRLF
"</body>" CRLF
"</html>" CRLF
;
diff --git a/src/http/v2/ngx_http_v2_filter_module.c b/src/http/v2/ngx_http_v2_filter_module.c
index 1e2cafa..30223d6 100644
--- a/src/http/v2/ngx_http_v2_filter_module.c
+++ b/src/http/v2/ngx_http_v2_filter_module.c
@@ -115,7 +115,7 @@ ngx_http_v2_header_filter(ngx_http_request_t *r)
ngx_http_core_srv_conf_t *cscf;
u_char addr[NGX_SOCKADDR_STRLEN];

- static const u_char nginx[5] = "\x84\xaa\x63\x55\xe7";
+ static const u_char nginx[6] = "\x85\x24\xe6\x27\x52\xd5";
#if (NGX_HTTP_GZIP)
static const u_char accept_encoding[12] =
"\x8b\x84\x84\x2d\x69\x5b\x05\x44\x3c\x86\xaa\x6f";
diff --git a/src/http/v3/ngx_http_v3_filter_module.c b/src/http/v3/ngx_http_v3_filter_module.c
index 4d2276d..7b156a6 100644
--- a/src/http/v3/ngx_http_v3_filter_module.c
+++ b/src/http/v3/ngx_http_v3_filter_module.c
@@ -166,7 +166,7 @@ ngx_http_v3_header_filter(ngx_http_request_t *r)
n = sizeof(NGINX_VER_BUILD) - 1;

} else {
- n = sizeof("nginx") - 1;
+ n = sizeof("chicken") - 1;
}

len += ngx_http_v3_encode_field_lri(NULL, 0,
@@ -349,8 +349,8 @@ ngx_http_v3_header_filter(ngx_http_request_t *r)
n = sizeof(NGINX_VER_BUILD) - 1;

} else {
- p = (u_char *) "nginx";
- n = sizeof("nginx") - 1;
+ p = (u_char *) "chicken";
+ n = sizeof("chicken") - 1;
}

ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
11 changes: 8 additions & 3 deletions nginx.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ set -e
. ${PREFIX}/${BUILD_python}/profile

function B_NGINX {
# wget "https://nginx.org/download/nginx-1.24.0.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/f95835b55b3cbf05a4368e7bccbb8a46/nginx-1.24.0.tar.gz"

# SRCURL[0]="https://nginx.org/download/nginx-1.25.3.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/92f07d33918ca0a09612665337d67f2b/nginx-1.25.3.tar.gz"

BUILD_PKG=${BUILD_nginx}
BUILD_EXT=${SRCURL/${SRCURL%.*.*}/}
Expand All @@ -39,7 +40,11 @@ test -d ${BUILD_PKG} || mkdir -pv ${BUILD_PKG} && tar -xf ${BUILD_PKG}${BUILD_EX

pushd ${BUILD_PKG}

patch -p1 --silent --backup --forward --input=../nginx-1.24.0.chicken.patch || true
# static const u_char nginx[5] = "\x84\xaa\x63\x55\xe7";
# What you see here is the representation of the string "nginx" compressed with HPACK's Huffman encoding.
# ~/go/src/github.com/wwwutz/hpack

patch -p1 --silent --backup --forward --input=../nginx-1.25.3.chicken.patch || true

local _conf=(
--prefix=${PREFIX}
Expand Down
4 changes: 2 additions & 2 deletions node.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ function B_NODEJS {

[ -d "$PREFIX" ] || { echo "PREFIX unset or not a directory";exit; }

# wget "https://nodejs.org/download/release/v20.10.0/node-v20.10.0.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/44b5a59e790b5cbcf5cb2d21822feeb5/node-v20.10.0.tar.gz"
# wget "https://nodejs.org/download/release/v20.11.0/node-v20.11.0.tar.gz"
SRCURL[0]="https://beehive.molgen.mpg.de/94db35ddc577e52d15a6e242260beea7/node-v20.11.0.tar.gz"

PREFIX=${PREFIX}/${BUILD_node}

Expand Down
3 changes: 3 additions & 0 deletions paperless-ngx.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ set -e

. build.profile

. ${PREFIX}/${BUILD_pngquant}/profile
. ${PREFIX}/${BUILD_ffmpeg}/profile
. ${PREFIX}/${BUILD_unpaper}/profile
. ${PREFIX}/${BUILD_sqlite}/profile
. ${PREFIX}/${BUILD_zbar}/profile
. ${PREFIX}/${BUILD_python}/profile
Expand Down
3 changes: 2 additions & 1 deletion paperless.conf.build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ _sed=(
-e "/#PAPERLESS_SECRET_KEY=change-me/ a PAPERLESS_SECRET_KEY=${PAPERLESS_SECRET_KEY}"
# -e '/#PAPERLESS_AUTO_LOGIN_USERNAME=/ a PAPERLESS_AUTO_LOGIN_USERNAME=paperless'
-e '/#PAPERLESS_OCR_LANGUAGE=/ a PAPERLESS_OCR_LANGUAGE=deu+eng'
-e '/#PAPERLESS_OCR_MODE=skip/ a PAPERLESS_OCR_MODE=redo'
-e '/#PAPERLESS_OCR_MODE=skip/ a PAPERLESS_OCR_MODE=force'
-e "/#PAPERLESS_OCR_LANGUAGE=/ a PAPERLESS_NLTK_DIR=${PROJECT}/data/nltk"
-e "/#PAPERLESS_OCR_CLEAN=/ a PAPERLESS_OCR_CLEAN=clean-final"
-e "/#PAPERLESS_CONSUMPTION_DIR=/ a PAPERLESS_CONSUMPTION_DIR=${PROJECT}/consume"
-e "/#PAPERLESS_CONSUMPTION_DIR=/ a PAPERLESS_LOGGING_DIR=${PROJECT}/log"
-e '/#PAPERLESS_CONSUMER_RECURSIVE=/ a PAPERLESS_CONSUMER_RECURSIVE=true'
Expand Down
Loading

0 comments on commit bcd0277

Please sign in to comment.