Update streamserver nginx to 1.25.0 and remove fdk-aac.

master
Icedream 2023-05-28 16:01:16 +02:00
parent 3eee711838
commit c3fd2735da
Signed by: icedream
GPG Key ID: 468BBEEBB9EC6AEA
2 changed files with 141 additions and 4 deletions

View File

@ -1,4 +1,5 @@
ARG NGINX_VERSION=1.20.1
#ARG NGINX_VERSION=1.23.3
ARG NGINX_VERSION=1.25.0
FROM icedream/nginx as icedream-nginx
@ -20,11 +21,12 @@ RUN yes "" | abuild-keygen -a -i
# Check out aports
RUN git config --global user.name Docker
RUN git config --global user.email "$(whoami)@localhost"
RUN git clone --depth=1 -b 3.12-stable git://git.alpinelinux.org/aports
# alpine docker image for nginx 1.25.0 uses alpine 3.17.3
RUN git clone --depth=1 -b 3.17-stable git://git.alpinelinux.org/aports
WORKDIR /usr/src/aports
# Apply package changes
COPY patches/aports /patches/
COPY patches/aports-3.17 /patches/
RUN git am /patches/*.patch
WORKDIR /usr/src/aports/community/ffmpeg-serverkomplex
@ -44,7 +46,11 @@ RUN git clone --depth=1 --recursive https://github.com/kaltura/nginx-vod-module.
###
FROM nginx:${NGINX_VERSION}-alpine
# This is the final image but with added fdk-aac support. We currently don't use
# it and the patch for the ffmpeg package is currently broken so it gets
# skipped.
FROM nginx:${NGINX_VERSION}-alpine AS final-patched
RUN \
export DEBIAN_FRONTEND=noninteractive &&\
if command -v apk >/dev/null 2>/dev/null; then apk add --no-cache gnupg; else apt-get update && apt-get install -y gnupg wget ca-certificates && apt-get clean; fi
@ -65,3 +71,22 @@ RUN \
rm -rf /packages
RUN sed -i '1s#^#load_module modules/ngx_http_vod_module.so;\n#' /etc/nginx/nginx.conf
###
FROM nginx:${NGINX_VERSION}-alpine AS final
RUN \
export DEBIAN_FRONTEND=noninteractive &&\
if command -v apk >/dev/null 2>/dev/null; then apk add --no-cache gnupg; else apt-get update && apt-get install -y gnupg wget ca-certificates && apt-get clean; fi
COPY --from=icedream-nginx /usr/local/bin/docker-* /usr/local/bin/
COPY --from=module-source /usr/src/ /usr/src/nginx-modules/
RUN apk update
RUN apk add ffmpeg ffmpeg-dev openssl openssl-dev
RUN \
docker-nginx-download-source &&\
docker-nginx-build \
--add-dynamic-module=../nginx-modules/nginx-vod-module --with-file-aio &&\
rm -rf /packages
RUN sed -i '1s#^#load_module modules/ngx_http_vod_module.so;\n#' /etc/nginx/nginx.conf

View File

@ -0,0 +1,112 @@
From 3f7a41c28220ae6aa0ade50873399c94dd1a97c0 Mon Sep 17 00:00:00 2001
From: Carl Kittelberger <icedream@icedream.pw>
Date: Tue, 10 Jan 2023 09:27:50 +0100
Subject: [PATCH] Build non-free binary with fdk-aac support.
---
...01-ffbuild-libversion.sh-add-shebang.patch | 0
...util-clean-up-unused-FF_SYMVER-macro.patch | 0
.../{ffmpeg => ffmpeg-serverkomplex}/APKBUILD | 20 ++++++++++++++++---
...av_stream_get_first_dts-for-chromium.patch | 0
.../flto-auto.patch | 0
5 files changed, 17 insertions(+), 3 deletions(-)
rename community/{ffmpeg => ffmpeg-serverkomplex}/0001-ffbuild-libversion.sh-add-shebang.patch (100%)
rename community/{ffmpeg => ffmpeg-serverkomplex}/0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch (100%)
rename community/{ffmpeg => ffmpeg-serverkomplex}/APKBUILD (94%)
rename community/{ffmpeg => ffmpeg-serverkomplex}/add-av_stream_get_first_dts-for-chromium.patch (100%)
rename community/{ffmpeg => ffmpeg-serverkomplex}/flto-auto.patch (100%)
diff --git a/community/ffmpeg/0001-ffbuild-libversion.sh-add-shebang.patch b/community/ffmpeg-serverkomplex/0001-ffbuild-libversion.sh-add-shebang.patch
similarity index 100%
rename from community/ffmpeg/0001-ffbuild-libversion.sh-add-shebang.patch
rename to community/ffmpeg-serverkomplex/0001-ffbuild-libversion.sh-add-shebang.patch
diff --git a/community/ffmpeg/0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch b/community/ffmpeg-serverkomplex/0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
similarity index 100%
rename from community/ffmpeg/0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
rename to community/ffmpeg-serverkomplex/0001-libavutil-clean-up-unused-FF_SYMVER-macro.patch
diff --git a/community/ffmpeg/APKBUILD b/community/ffmpeg-serverkomplex/APKBUILD
similarity index 94%
rename from community/ffmpeg/APKBUILD
rename to community/ffmpeg-serverkomplex/APKBUILD
index d45301c1ef..068ed06ad9 100644
--- a/community/ffmpeg/APKBUILD
+++ b/community/ffmpeg-serverkomplex/APKBUILD
@@ -2,13 +2,13 @@
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Jakub Skrzypnik <j.skrzypnik@openmailbox.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-pkgname=ffmpeg
+pkgname=ffmpeg-serverkomplex
pkgver=5.1.2
pkgrel=1
pkgdesc="Complete and free Internet live audio and video broadcasting solution for Linux/Unix"
url="https://ffmpeg.org/"
arch="all"
-license="GPL-2.0-or-later AND LGPL-2.1-or-later"
+license="GPL-2.0-or-later AND LGPL-2.1-or-later AND non-free"
options="!check" # tests/data/hls-lists.append.m3u8 fails
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
makedepends="
@@ -17,6 +17,7 @@ makedepends="
bzip2-dev
coreutils
dav1d-dev
+ fdk-aac-dev
fontconfig-dev
freetype-dev
fribidi-dev
@@ -179,7 +180,9 @@ build() {
--enable-libfribidi \
--enable-gnutls \
--enable-gpl \
+ --enable-nonfree \
--enable-libass \
+ --enable-libfdk-aac\
--enable-libmp3lame \
--enable-libpulse \
--enable-libvorbis \
@@ -219,6 +222,15 @@ build() {
${CC:-gcc} -o tools/qt-faststart $CFLAGS tools/qt-faststart.c
}
+prepare() {
+ mv ffmpeg-*/ "${builddir}"
+}
+
+dev() {
+ provides="ffmpeg-dev"
+ default_dev
+}
+
# https://ffmpeg.org/fate.html
check() {
./configure \
@@ -229,6 +241,7 @@ check() {
}
package() {
+ provides="ffmpeg"
make DESTDIR="$pkgdir" install install-man
install -D -m755 tools/qt-faststart "$pkgdir/usr/bin/qt-faststart"
# strip --strip-debug "$pkgdir"/usr/lib/*.a
@@ -236,7 +249,8 @@ package() {
libs() {
pkgdesc="Libraries for ffmpeg"
- replaces="ffmpeg"
+ replaces="ffmpeg-serverkomplex"
+ provides="ffmpeg-libs"
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/lib "$subpkgdir"/usr
}
diff --git a/community/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch b/community/ffmpeg-serverkomplex/add-av_stream_get_first_dts-for-chromium.patch
similarity index 100%
rename from community/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch
rename to community/ffmpeg-serverkomplex/add-av_stream_get_first_dts-for-chromium.patch
diff --git a/community/ffmpeg/flto-auto.patch b/community/ffmpeg-serverkomplex/flto-auto.patch
similarity index 100%
rename from community/ffmpeg/flto-auto.patch
rename to community/ffmpeg-serverkomplex/flto-auto.patch
--
2.38.1