diff --git a/.vscode/ltex.dictionary.en-US.txt b/.vscode/ltex.dictionary.en-US.txt new file mode 100644 index 0000000..6c0f388 --- /dev/null +++ b/.vscode/ltex.dictionary.en-US.txt @@ -0,0 +1 @@ +orbstack diff --git a/Dockerfile b/Dockerfile index 6e3e9b2..1ace51c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,26 +18,29 @@ RUN cp /etc/apt/sources.list.d/debian.sources \ RUN \ echo "**** install build packages ****" 1>&2 \ - && apt update \ - && apt install -y build-essential \ - && apt install -y tzdata \ - && apt install -y libzmq3-dev \ - && apt install -y libldap-dev \ - && apt install -y libsasl2-dev \ - && apt install -y libxml2-dev \ - && apt install -y libxslt1-dev \ - && apt install -y imagemagick \ - && apt install -y git \ - && apt install -y jq \ - && apt install -y curl \ - && apt install -y wget \ - && apt install -y xz-utils \ - && apt install -y bash \ - && apt install -y python3-pip \ - && apt install -y python3-venv \ - && apt install -y python3-dev \ - && apt install -y python3-setuptools \ - && apt install -y golang-go + && apt-get update \ + && apt-get install -y libxcb-xkb-dev \ + && apt-get install -y build-essential \ + && apt-get install -y tzdata \ + && apt-get install -y libzmq3-dev \ + && apt-get install -y libldap-dev \ + && apt-get install -y libsasl2-dev \ + && apt-get install -y libxml2-dev \ + && apt-get install -y libxslt1-dev \ + && apt-get install -y imagemagick \ + && apt-get install -y git \ + && apt-get install -y jq \ + && apt-get install -y curl \ + && apt-get install -y wget \ + && apt-get install -y xz-utils \ + && apt-get install -y bash \ + && apt-get install -y python3-pip \ + && apt-get install -y python3-venv \ + && apt-get install -y python3-dev \ + && apt-get install -y python3-setuptools \ + && apt-get install -y golang-go \ + && apt-get install -y google-mock \ + && apt-get install -y file RUN echo "**** create tmp dir ****" 1>&2 \ && mkdir -p /tmp @@ -79,9 +82,9 @@ ENV LD_LIBRARY_PATH=/usr/lib:/opt/calibre/lib ENV PATH=$PATH:/opt/calibre/bin ENV LC_ALL=C ENV CALIBRE_INSTALLER=https://download.calibre-ebook.com/linux-installer.sh -RUN apt install -y libopengl0 \ - && apt install -y libegl1 \ - && apt install -y libxcb-cursor0 \ +RUN apt-get install -y libopengl0 \ + && apt-get install -y libegl1 \ + && apt-get install -y libxcb-cursor0 \ && curl -L ${CALIBRE_INSTALLER} \ | sh /dev/stdin @@ -97,8 +100,9 @@ RUN echo "**** download calibre-web ****" 1>&2 \ RUN echo "**** apply calibre-web patches ****" 1>&2 \ && cd /app/calibreweb \ - && for p in /tmp/patches/calibre-web/* ; do \ - patch -p0 < ${p} ; \ + && for p in /tmp/patches/calibre-web/*.patch ; do \ + patch -p0 < ${p} \ + || cat optional-requirements.txt ; \ done RUN echo "**** build & install calibre-web ****" 1>&2 \ @@ -116,8 +120,6 @@ RUN echo "**** copy unrar and kepubify to app folder ****" 1>&2 \ RUN yes | /app/bin/pip3 uninstall google-api-python-client -RUN yes | /app/bin/pip3 uninstall gevent -RUN yes | /app/bin/pip3 uninstall greenlet RUN yes | /app/bin/pip3 uninstall httplib2 RUN yes | /app/bin/pip3 uninstall oauth2client RUN yes | /app/bin/pip3 uninstall uritemplate @@ -150,12 +152,13 @@ RUN apt-get install --no-install-recommends -y tzdata \ libsasl2-2 \ libnspr4 \ libnss3 \ - libxslt1 \ + libxslt1.1 \ libxml2 \ imagemagick \ bash \ procps \ vim \ + libxcb-xkb1 \ python3 COPY --from=build /app /app diff --git a/README.md b/README.md index bc48106..101211d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ diff -c cps/templates/remote_login.html ../calibre-web/cps/templates/remote_login.html > remote_login.patch ``` -Build the image on mac OS with orbstack docker: +Build the image on macOS with orbstack docker: ```bash docker build . --platform linux/amd64 --debug ``` + +docker build . --no-cache --load --platform linux/amd64 2>&1 | tee build.log \ No newline at end of file diff --git a/patches/calibre-web/optional-requirements.patch b/patches/calibre-web/optional-requirements.patch index b1ec0d9..68c6cb9 100644 --- a/patches/calibre-web/optional-requirements.patch +++ b/patches/calibre-web/optional-requirements.patch @@ -1,11 +1,67 @@ -*** optional-requirements.txt Fri Dec 27 13:03:56 2024 ---- optional-requirements.txt Fri Dec 27 13:06:30 2024 -*************** -*** 45,47 **** ---- 45,50 ---- - - # Kobo integration - jsonschema>=3.2.0,<4.24.0 -+ -+ # QRCode for MagicLink -+ qrcode>=8.0 +--- optional-requirements.txt.sav 2025-03-08 10:20:58 ++++ optional-requirements.txt 2025-03-08 10:21:06 +@@ -1,5 +1,55 @@ + # GDrive Integration ++# google-api-python-client>=1.7.11,<2.200.0 ++# gevent>20.6.0,<24.3.0 ++# greenlet>=0.4.17,<3.2.0 ++# httplib2>=0.9.2,<0.23.0 ++# oauth2client>=4.0.0,<4.1.4 ++# uritemplate>=3.0.0,<4.2.0 ++# pyasn1-modules>=0.0.8,<0.5.0 ++# pyasn1>=0.1.9,<0.7.0 ++# PyDrive2>=1.3.1,<1.22.0 ++# PyYAML>=3.12,<6.1 ++# rsa>=3.4.2,<4.10.0 ++ ++# Gmail ++google-auth-oauthlib>=0.4.3,<1.3.0 + google-api-python-client>=1.7.11,<2.200.0 ++ ++# goodreads ++goodreads>=0.3.2,<0.4.0 ++python-Levenshtein>=0.12.0,<0.27.0 ++ ++# ldap login ++python-ldap>=3.0.0,<3.5.0 ++Flask-SimpleLDAP>=1.4.0,<2.1.0 ++ ++# oauth ++Flask-Dance>=2.0.0,<7.1.0 ++SQLAlchemy-Utils>=0.33.5,<0.42.0 ++ ++# metadata extraction ++rarfile>=3.2,<5.0 ++scholarly>=1.2.0,<1.8 ++markdown2>=2.0.0,<2.5.0 ++html2text>=2020.1.16,<2024.2.26 ++python-dateutil>=2.1,<2.10.0 ++beautifulsoup4>=4.0.1,<4.13.0 ++faust-cchardet>=2.1.18,<2.1.20 ++py7zr>=0.15.0,<0.21.0 ++mutagen>=1.40.0,<1.50.0 ++pycountry>=20.0.0,<25.0.0 ++ ++# Comics ++natsort>=2.2.0,<8.5.0 ++comicapi>=2.2.0,<3.3.0 ++ ++# Kobo integration ++jsonschema>=3.2.0,<4.24.0 ++ ++# QRCode for MagicLink ++qrcode>=8.0 ++# GDrive Integration ++google-api-python-client>=1.7.11,<2.200.0 + gevent>20.6.0,<24.3.0 + greenlet>=0.4.17,<3.2.0 + httplib2>=0.9.2,<0.23.0 +\ No newline at end of file +@@ -45,3 +95,6 @@ + + # Kobo integration + jsonschema>=3.2.0,<4.24.0 ++ ++# QRCode for magic link ++qrcode>=8.0 +\ No newline at end of file