docker: alpine 3.24

This commit is contained in:
ed 2026-06-12 21:47:04 +00:00
parent c3eb9ecec2
commit a48afe87b9
4 changed files with 54 additions and 22 deletions

View file

@ -8,7 +8,7 @@ all:
ff: ff:
# legally comfy # legally comfy
/usr/bin/time ./build-no265.sh img /usr/bin/time ./build-no265.sh pull img
zlib: zlib:

View file

@ -1,9 +1,13 @@
#!/bin/ash #!/bin/ash
set -e set -e
AVER=3.24
[ $1 = 1 ] && hub=1 [ $1 = 1 ] && hub=1
uname -a uname -a
apk update
apk upgrade -al
apk add alpine-sdk doas wget apk add alpine-sdk doas wget
echo permit nopass root > /etc/doas.d/u.conf echo permit nopass root > /etc/doas.d/u.conf
cp -pv /root/.abuild/*.pub /etc/apk/keys/ || abuild-keygen -ina cp -pv /root/.abuild/*.pub /etc/apk/keys/ || abuild-keygen -ina
@ -13,7 +17,7 @@ cp -pv /root/.abuild/*.pub /etc/apk/keys/ || abuild-keygen -ina
mkdir /ffmpeg mkdir /ffmpeg
cd /ffmpeg cd /ffmpeg
base=https://github.com/alpinelinux/aports/raw/refs/heads/3.23-stable/community/ffmpeg/ base=https://github.com/alpinelinux/aports/raw/refs/heads/$AVER-stable/community/ffmpeg/
wget ${base}APKBUILD wget ${base}APKBUILD
awk <APKBUILD -vb="$base" '/"/{o=0}/^source=/{o=1;next}o{print b $1}' | wget -i- awk <APKBUILD -vb="$base" '/"/{o=0}/^source=/{o=1;next}o{print b $1}' | wget -i-
cp -pv APKBUILD /root/ cp -pv APKBUILD /root/
@ -29,16 +33,23 @@ prepare() {
default_prepare default_prepare
tar -cC/opt/patch/ffmpeg . | tar -x tar -cC/opt/patch/ffmpeg . | tar -x
patch -p1 <aac-lc-only.patch patch -p1 <aac-lc-only.patch
awk >t <libavcodec/aac/aacdec_tab.c '/^[^ \t]/{o=0} /^(static|const).*( sbr_|_hcod)/{o=1} !o{print;next} {gsub(/\{ *-?[0-9]+, *-?[0-9]+ *\}/, "{ 1, 1 }")}1'
mv t libavcodec/aac/aacdec_tab.c
# invent the missing disable-option for this crap
sed -ri 's/(^v4l2_m2m_deps=")/\1videotoolbox /' configure
} }
EOF EOF
## ##
## shrink-ray ## shrink-ray
sed -ri 's/--enable-lib(bluray|placebo|rav1e|shaderc)/--disable-lib\1/; s/--enable-(vdpau)/--disable-\1/; s/\b(rav1e|shaderc)-dev//; s/\blib(bluray|placebo|vdpau|xfixes)-dev\b//' APKBUILD sed -ri 's/--enable-lib(bluray|dvdnav|dvdread|placebo|rav1e|shaderc)/--disable-lib\1/; s/--enable-(vdpau)/--disable-\1/; s/\b(rav1e|shaderc)-dev//; s/\blib(bluray|placebo|vdpau|xfixes)-dev\b//' APKBUILD
# `- rm placebo+shaderc to drop spirv-tools (1.7 MiB apk) # `- rm placebo+shaderc to drop spirv-tools (1.7 MiB apk)
sed -ri 's/--enable-libxcb/--disable-libxcb --disable-indev=xcbgrab --disable-ffplay --disable-encoder=opus /' APKBUILD sed -ri 's/--enable-libxcb/--disable-libxcb --disable-indev=xcbgrab --disable-ffplay --disable-encoder=opus --disable-decoder=metasound --disable-decoder=twinvq/' APKBUILD
# `- metasound+twinvq = +450 KiB apk
sed -ri 's/\bffplay$//; s/\bsdl2-dev\b//' APKBUILD sed -ri 's/\bffplay$//; s/\bsdl2-dev\b//' APKBUILD
## ##
@ -52,6 +63,8 @@ sed -ri 's/(--disable-vulkan)/\1 --disable-devices --disable-hwaccels --disable-
# `- s/av1/libdav1d/; s/libvorbis/vorbis/; s/opus/libopus/; libvorbis and mpg123 gets pulled in by openmpt # `- s/av1/libdav1d/; s/libvorbis/vorbis/; s/opus/libopus/; libvorbis and mpg123 gets pulled in by openmpt
} }
[ $1 -gt 1 ] && sed -ri 's/(--disable-libxcb )/\1--disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages /' APKBUILD
p=/root/packages/$(abuild -A) p=/root/packages/$(abuild -A)
rm -rf $p rm -rf $p
abuild -FrcK abuild -FrcK
@ -59,6 +72,7 @@ abuild -FrcK
mkdir $p/ex mkdir $p/ex
mv $p/ffmpeg-d* $p/ex # dbg,dev,doc mv $p/ffmpeg-d* $p/ex # dbg,dev,doc
cp -pv src/ffmpeg-*/ffbuild/config.log $p/ cp -pv src/ffmpeg-*/ffbuild/config.log $p/
#tar -cz src > $p/.tar
[ $hub ] && rm -rf $p.hub && mv $p $p.hub [ $hub ] && rm -rf $p.hub && mv $p $p.hub

View file

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
set -e set -e
AVER=3.24
[ $(id -u) -eq 0 ] && { [ $(id -u) -eq 0 ] && {
echo dont root echo dont root
exit 1 exit 1
@ -34,8 +36,8 @@ wt() {
} }
[ $pull ] && { [ $pull ] && {
for a in $sarchs; do # arm/v6 for a in $sarchs; do
podman pull --arch=$a alpine:latest podman pull --arch=$a alpine:$AVER
done done
podman images --format "{{.ID}} {{.History}}" | podman images --format "{{.ID}} {{.History}}" |
@ -62,19 +64,20 @@ wt() {
# kill abandoned builders # kill abandoned builders
ps aux | awk '/bin\/qemu-[^-]+-static/{print$2}' | xargs -r kill -9 ps aux | awk '/bin\/qemu-[^-]+-static/{print$2}' | xargs -r kill -9
n=0; set -x n=0; set -xo pipefail
for a in $archs; do for a in $archs; do
n=$((n+1)); wt "$n/$a" n=$((n+1)); wt "$n/$a"
#[ $n -le 3 ] || continue #[ $n -le 3 ] || continue
touch b/t.$a.1.$(date +%s) touch b/t.$n.$a.1.$(date +%s)
tar -c arbeidspakke.sh patch/ffmpeg | tar -c arbeidspakke.sh patch/ffmpeg |
time nice podman run \ time nice podman run \
--rm -i --pull=never -v "$self/b:/root:z" localhost/alpine-$a \ --rm -i --pull=never -v "$self/b:/root:z" localhost/alpine-$a \
/bin/ash -c "cd /opt;tar -x;/bin/ash ./arbeidspakke.sh $n $a" 2>&1 | /bin/ash -c "cd /opt;tar -x;/bin/ash ./arbeidspakke.sh $n $a" 2>&1 |
tee b/log.$a awk '{getline a<"/proc/uptime";close("/proc/uptime");sub(/ .*/,"",a);printf"%.2f %s\n",a-p,$0;p=a}' |
tee b/log.$n.$a
touch b/t.$a.2.$(date +%s) touch b/t.$n.$a.2.$(date +%s)
done done
wt -;wt "" wt -;wt ""
} }
@ -89,11 +92,23 @@ echo ok
# 50m01.04 s390x # 50m01.04 s390x
# golflympics # golflympics
# 4:09 x86_64-hub # 3:48 x86_64-hub
# 2:57 x86_64 # 2:46 x86_64
# 2:54 x86 # 2:24 x86
# 31:13 aarch64 # 28:50 aarch64
# 22:38 armv7 # 21:34 armv7
# 32:17 s390x # 31:13 s390x
# 24:27 ppc64le # 22:50 ppc64le
# 2:00:35 summa summarum # 1:53:25 summa summarum
# for a in version muxers demuxers devices decoders encoders filters pix_fmts layouts sample_fmts ; do ffmpeg -hide_banner -$a; done | nc 192.168.123.1 4321
# v=3.24-stable
# echo -n https://dl-cdn.alpinelinux.org/v${v%-*}/releases/x86_64/ >aver
# curl -s $(cat aver)latest-releases.yaml | awk '/alpine-minirootfs-3.*gz$/{print$2;exit}' | grep ... >> aver
# podman import $(cat aver) a324
# f(){ p=/sys/fs;for w in cgroup user.slice user-1000.slice user@1000.service user.slice ;do p="$p/$w";echo $1>"$p/cgroup.subtree_control";done;}
# f +cpuset
# time nice podman run --cpuset-cpus=1 \
# grep -E '^[^0].*' -B2 -A1 log.1.amd64 # offbyone, whatever, just eyeball it
# f -cpuset

View file

@ -1,16 +1,19 @@
#!/bin/bash #!/bin/bash
set -e set -e
v=3.23 AVER=3.24
v=$AVER-stable
#v=master
mkdir -p cver mkdir -p cver
rm -rf cver2 rm -rf cver2
mkdir cver2 mkdir cver2
cd cver2 cd cver2
curl \ curl \
-Lo1 https://raw.githubusercontent.com/alpinelinux/aports/refs/heads/$v-stable/main/musl/APKBUILD \ -Lo1 https://raw.githubusercontent.com/alpinelinux/aports/refs/heads/$v/main/musl/APKBUILD \
-Lo2 https://raw.githubusercontent.com/alpinelinux/aports/refs/heads/$v-stable/main/python3/APKBUILD \ -Lo2 https://raw.githubusercontent.com/alpinelinux/aports/refs/heads/$v/main/python3/APKBUILD \
-Lo3 https://raw.githubusercontent.com/alpinelinux/aports/refs/heads/$v-stable/community/ffmpeg/APKBUILD \ -Lo3 https://raw.githubusercontent.com/alpinelinux/aports/refs/heads/$v/community/ffmpeg/APKBUILD \
; ;
zlib= ff= zlib= ff=