Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update build system for v1.9.0, use cmake #49

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 27 additions & 31 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ ARG ZNC_RELEASE
RUN \
echo "**** install build packages ****" && \
apk add -U --update --no-cache \
argon2-dev \
autoconf \
automake \
boost-dev\
build-base \
c-ares-dev \
cyrus-sasl-dev \
Expand All @@ -21,7 +23,11 @@ RUN \
perl-dev \
python3-dev \
swig \
tcl-dev
tar \
tcl-dev && \
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir pip setuptools && \
pip install -U --no-cache-dir cmake

RUN \
echo "**** compile znc ****" && \
Expand All @@ -31,57 +37,47 @@ RUN \
fi && \
mkdir -p \
/tmp/znc && \
git clone --branch "${ZNC_RELEASE}" --depth 1 \
--recurse-submodules \
https://github.com/znc/znc.git \
/tmp/znc && \
curl -o \
/tmp/znc-src.tar.gz -L \
"https://znc.in/releases/archive/${ZNC_RELEASE}.tar.gz" && \
tar xf \
/tmp/znc-src.tar.gz -C \
/tmp/znc --strip-components=1 && \
curl -o \
/tmp/playback.tar.gz -L \
/tmp/playback.tar.gz -L \
https://github.com/jpnurmi/znc-playback/archive/master.tar.gz && \
tar xf \
/tmp/playback.tar.gz -C \
/tmp/playback.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
curl -o \
/tmp/znc-push.tar.gz -L \
/tmp/znc-push.tar.gz -L \
https://github.com/jreese/znc-push/archive/master.tar.gz && \
tar xf \
/tmp/znc-push.tar.gz -C \
/tmp/znc-push.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
curl -o \
/tmp/znc-clientbuffer.tar.gz -L \
/tmp/znc-clientbuffer.tar.gz -L \
https://github.com/CyberShadow/znc-clientbuffer/archive/master.tar.gz && \
tar xf \
/tmp/znc-clientbuffer.tar.gz -C \
/tmp/znc-clientbuffer.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
curl -o \
/tmp/znc-palaver.tar.gz -L \
/tmp/znc-palaver.tar.gz -L \
https://github.com/cocodelabs/znc-palaver/archive/master.tar.gz && \
tar xf \
/tmp/znc-palaver.tar.gz -C \
/tmp/znc-palaver.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
cd /tmp/znc && \
export CFLAGS="$CFLAGS -D_GNU_SOURCE" && \
./configure \
--build=$CBUILD \
--enable-cyrus \
--enable-perl \
--enable-python \
--enable-swig \
--enable-tcl \
--host=$CHOST \
--infodir=/usr/share/info \
--localstatedir=/var \
--mandir=/usr/share/man \
--prefix=/usr \
--sysconfdir=/etc && \
mkdir -p build && \
cd build && \
cmake .. \
-DWANT_PYTHON=yes \
-DWANT_PERL=yes \
-DWANT_TCL=yes && \
make && \
make DESTDIR=/tmp/znc install

RUN \
echo "**** determine runtime packages ****" && \
scanelf --needed --nobanner /tmp/znc/usr/bin/znc \
scanelf --needed --nobanner /tmp/znc/usr/local/bin/znc \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
Expand All @@ -95,7 +91,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine:3.19
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
LABEL maintainer="notaptalca"

# copy files from build stage
COPY --from=buildstage /tmp/znc/usr/ /usr/
Expand Down
59 changes: 27 additions & 32 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.19 as buildstage
ARG ZNC_RELEASE

RUN \
echo "**** install build packages ****" && \
apk add -U --update --no-cache \
argon2-dev \
autoconf \
automake \
boost-dev\
build-base \
c-ares-dev \
cyrus-sasl-dev \
Expand All @@ -21,7 +22,11 @@ RUN \
perl-dev \
python3-dev \
swig \
tcl-dev
tar \
tcl-dev && \
python3 -m venv /lsiopy && \
pip install -U --no-cache-dir pip setuptools && \
pip install -U --no-cache-dir cmake

RUN \
echo "**** compile znc ****" && \
Expand All @@ -31,57 +36,47 @@ RUN \
fi && \
mkdir -p \
/tmp/znc && \
git clone --branch "${ZNC_RELEASE}" --depth 1 \
--recurse-submodules \
https://github.com/znc/znc.git \
/tmp/znc && \
curl -o \
/tmp/znc-src.tar.gz -L \
"https://znc.in/releases/archive/${ZNC_RELEASE}.tar.gz" && \
tar xf \
/tmp/znc-src.tar.gz -C \
/tmp/znc --strip-components=1 && \
curl -o \
/tmp/playback.tar.gz -L \
/tmp/playback.tar.gz -L \
https://github.com/jpnurmi/znc-playback/archive/master.tar.gz && \
tar xf \
/tmp/playback.tar.gz -C \
/tmp/playback.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
curl -o \
/tmp/znc-push.tar.gz -L \
/tmp/znc-push.tar.gz -L \
https://github.com/jreese/znc-push/archive/master.tar.gz && \
tar xf \
/tmp/znc-push.tar.gz -C \
/tmp/znc-push.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
curl -o \
/tmp/znc-clientbuffer.tar.gz -L \
/tmp/znc-clientbuffer.tar.gz -L \
https://github.com/CyberShadow/znc-clientbuffer/archive/master.tar.gz && \
tar xf \
/tmp/znc-clientbuffer.tar.gz -C \
/tmp/znc-clientbuffer.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
curl -o \
/tmp/znc-palaver.tar.gz -L \
/tmp/znc-palaver.tar.gz -L \
https://github.com/cocodelabs/znc-palaver/archive/master.tar.gz && \
tar xf \
/tmp/znc-palaver.tar.gz -C \
/tmp/znc-palaver.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
cd /tmp/znc && \
export CFLAGS="$CFLAGS -D_GNU_SOURCE" && \
./configure \
--build=$CBUILD \
--enable-cyrus \
--enable-perl \
--enable-python \
--enable-swig \
--enable-tcl \
--host=$CHOST \
--infodir=/usr/share/info \
--localstatedir=/var \
--mandir=/usr/share/man \
--prefix=/usr \
--sysconfdir=/etc && \
mkdir -p build && \
cd build && \
cmake .. \
-DWANT_PYTHON=yes \
-DWANT_PERL=yes \
-DWANT_TCL=yes && \
make && \
make DESTDIR=/tmp/znc install

RUN \
echo "**** determine runtime packages ****" && \
scanelf --needed --nobanner /tmp/znc/usr/bin/znc \
scanelf --needed --nobanner /tmp/znc/usr/local/bin/znc \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
Expand All @@ -95,7 +90,7 @@ FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.19
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="sparklyballs"
LABEL maintainer="notaptalca"

# copy files from build stage
COPY --from=buildstage /tmp/znc/usr/ /usr/
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The architectures supported by this image are:

## Application Setup

To log in to the application, browse to http://<hostip>:6501.
To log in to the application, browse to `http://<hostip>:6501`.

* Default User: admin
* Default Password: admin
Expand Down Expand Up @@ -275,6 +275,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **22.02.24:** - Update build system for v1.9.0 (use cmake).
* **23.12.23:** - Rebase to Alpine 3.19.
* **12.07.23:** - Rebasing to Alpine 3.18.
* **07.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)
Expand Down
5 changes: 3 additions & 2 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ optional_block_1: false
# application setup block
app_setup_block_enabled: true
app_setup_block: |
To log in to the application, browse to http://<hostip>:6501.
To log in to the application, browse to `http://<hostip>:6501`.

* Default User: admin
* Default Password: admin
`change password ASAP.`
# changelog
changelogs:
- { date: "23.12.23:", desc: "Rebase to Alpine 3.19."}
- {date: "22.02.24:", desc: "Update build system for v1.9.0 (use cmake)."}
- {date: "23.12.23:", desc: "Rebase to Alpine 3.19."}
- {date: "12.07.23:", desc: "Rebasing to Alpine 3.18."}
- {date: "07.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}
- {date: "13.02.23:", desc: "Rebase to Alpine 3.17, migrate to s6v3."}
Expand Down
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/init-znc-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mkdir -p \

# generate license file
if [[ ! -f /config/znc.pem ]]; then
/usr/bin/znc -d /config -p
/usr/local/bin/znc -d /config -p
fi

while [[ ! -f "/config/znc.pem" ]]; do
Expand Down
2 changes: 1 addition & 1 deletion root/etc/s6-overlay/s6-rc.d/svc-znc/run
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ PORT=$(grep "Port =" /config/configs/znc.conf | awk -F '=' '{print $2;exit}')

exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${PORT}" \
s6-setuidgid abc /usr/bin/znc -d /config \
s6-setuidgid abc /usr/local/bin/znc -d /config \
--foreground