From 1cf557c0e3a2f923bdf6919cb4453b41cb607676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Vasconcellos?= Date: Wed, 10 Jan 2024 23:25:20 -0300 Subject: [PATCH] Remove gcompat (won't be used anymore) - Update ffmpeg patches - Update pdfium - Update protoc --- Dockerfile | 15 +-------------- stages/99-ffmpeg.sh | 38 +++++++++++++++++++------------------- stages/99-gcompat.sh | 38 -------------------------------------- stages/99-pdfium.sh | 2 +- stages/99-protoc.sh | 2 +- 5 files changed, 22 insertions(+), 73 deletions(-) delete mode 100644 stages/99-gcompat.sh diff --git a/Dockerfile b/Dockerfile index 7b27597..87eb30d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -414,16 +414,6 @@ COPY --from=layer-50-zimg "${PREFIX}/." "$PREFIX" #-- -FROM layer-00 AS layer-99-gcompat - -ADD https://git.adelielinux.org/adelie/gcompat/-/raw/1.1.0/LICENSE '/srv/gcompat/LICENSE.gcompat' -ADD https://github.com/void-linux/musl-obstack/raw/v1.2.3/COPYING '/srv/gcompat/COPYING.obstack' -ADD https://github.com/kaniini/libucontext/raw/v1.2/LICENSE '/srv/gcompat/LICENSE.ucontext' - -RUN --mount=type=cache,target=/root/.cache ` - --mount=type=bind,source=stages/99-gcompat.sh,target=/srv/stage.sh ` - /srv/build.sh - FROM layer-00 AS layer-99-protoc ADD https://raw.githubusercontent.com/protocolbuffers/protobuf/v25.0/LICENSE '/srv/protoc/LICENSE' @@ -466,9 +456,6 @@ RUN --mount=type=cache,target=/root/.cache ` FROM layer-00 AS layer-99 -COPY --from=layer-99-gcompat "${OUT}/." "$OUT" -COPY --from=layer-99-gcompat "${PREFIX}/licenses/." "${OUT}/licenses" - COPY --from=layer-99-heif "${OUT}/." "$OUT" COPY --from=layer-99-heif "${PREFIX}/srv/." "${OUT}/srv" COPY --from=layer-99-heif "${PREFIX}/licenses/." "${OUT}/licenses" @@ -505,7 +492,7 @@ RUN find "$OUT/lib" -name '*.lib' -exec ` # https://github.com/NixOS/patchelf/issues/507 RUN --mount=type=cache,target=/root/.cache ` echo 'strip -S "$@" && chmod +x "$@"' >/srv/stage.sh ` - && find "$OUT" -type f \( -name '*.so' -o -name '*.so.*' -o -name '*.dll' -o -name '*.dylib' \) -not -wholename "${OUT}/gcompat/*" -exec /srv/build.sh {} + + && find "$OUT" -type f \( -name '*.so' -o -name '*.so.*' -o -name '*.dll' -o -name '*.dylib' \) -exec /srv/build.sh {} + # Ensure all .so files have the correct rpaths (Linux target only) RUN find "$OUT" -type f \( -name '*.so' -o -name '*.so.*' \) -exec patchelf --set-rpath '$ORIGIN' {} \; diff --git a/stages/99-ffmpeg.sh b/stages/99-ffmpeg.sh index 9d04a59..bb643f9 100755 --- a/stages/99-ffmpeg.sh +++ b/stages/99-ffmpeg.sh @@ -7,25 +7,25 @@ curl_tar 'https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n6.1.1.tar.gz' ffmp # Handbreak patches for patch in \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A01-mov-read-name-track-tag-written-by-movenc.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A02-movenc-write-3gpp-track-titl-tag.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A03-mov-read-3gpp-udta-tags.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A04-movenc-write-3gpp-track-names-tags-for-all-available.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A05-dvdsubdec-fix-processing-of-partial-packets.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A06-dvdsubdec-return-number-of-bytes-used.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A07-dvdsubdec-use-pts-of-initial-packet.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A08-ccaption_dec-fix-pts-in-real_time-mode.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A09-matroskaenc-aac-extradata-updated.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A10-amfenc-Add-support-for-pict_type-field.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A11-amfenc-Fixes-the-color-information-in-the-ou.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A12-amfenc-HDR-metadata.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A13-libavcodec-amfenc-Fix-issue-with-missing-headers-in-.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A14-avcodec-add-ambient-viewing-environment-packet-side-.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A15-avformat-mov-add-support-for-amve-ambient-viewing-en.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A16-videotoolbox-dec-h264.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A17-libswscale-fix-yuv420p-to-p01xle-color-conversion-bu.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A18-qsv-fix-decode-10bit-hdr.patch' \ - 'https://github.com/HandBrake/HandBrake/raw/ce96bc5/contrib/ffmpeg/A19-ffbuild-common-use-gzip-n-flag-for-cuda.patch'; do + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A01-mov-read-name-track-tag-written-by-movenc.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A02-movenc-write-3gpp-track-titl-tag.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A03-mov-read-3gpp-udta-tags.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A04-movenc-write-3gpp-track-names-tags-for-all-available.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A05-dvdsubdec-fix-processing-of-partial-packets.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A06-dvdsubdec-return-number-of-bytes-used.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A07-dvdsubdec-use-pts-of-initial-packet.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A08-ccaption_dec-fix-pts-in-real_time-mode.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A09-matroskaenc-aac-extradata-updated.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A10-amfenc-Add-support-for-pict_type-field.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A11-amfenc-Fixes-the-color-information-in-the-ou.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A12-amfenc-HDR-metadata.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A13-libavcodec-amfenc-Fix-issue-with-missing-headers-in-.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A14-avcodec-add-ambient-viewing-environment-packet-side-.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A15-avformat-mov-add-support-for-amve-ambient-viewing-en.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A16-videotoolbox-dec-h264.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A17-libswscale-fix-yuv420p-to-p01xle-color-conversion-bu.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A18-qsv-fix-decode-10bit-hdr.patch' \ + 'https://github.com/HandBrake/HandBrake/raw/aa9e84d/contrib/ffmpeg/A19-ffbuild-common-use-gzip-n-flag-for-cuda.patch'; do curl "$patch" | patch -F5 -lp1 -d ffmpeg -t done diff --git a/stages/99-gcompat.sh b/stages/99-gcompat.sh deleted file mode 100644 index f90c0f3..0000000 --- a/stages/99-gcompat.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env -S bash -euo pipefail - -case "$TARGET" in - *linux-gnu) - ;; - *) - export UNSUPPORTED=1 - exit 1 - ;; -esac - -echo "Download gcompat..." -mkdir -p gcompat - -cd gcompat -curl -JO 'https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.0/x86_64/apk.static' - -chmod +x apk.static - -./apk.static \ - --arch "${TARGET%%-*}" \ - -X 'http://dl-cdn.alpinelinux.org/alpine/edge/main/' \ - -U --allow-untrusted --root "$(pwd)" --initdb \ - add gcompat - -# Remove unused components -find . -type d -name 'apk' -exec rm -r {} + -find . -name '*.so*' -not -wholename './lib/*' -exec mv -n -t lib {} + || true -rm -r lib64 usr/lib apk.static -find . -empty -type d -delete - -# Adjust rpath to use $ORIGIN -find lib -type f -name '*.so*' -exec patchelf --set-rpath "\$ORIGIN" {} \; - -# Remove musl and ld-musl, as that is always included by the OS -rm lib/ld-musl-*.so.1 lib/libc.musl-*.so.1 -# Copy gcompat and it's dependencies to the output directory -mv "lib" "${OUT}/gcompat" diff --git a/stages/99-pdfium.sh b/stages/99-pdfium.sh index b4f54a4..1e1b32a 100644 --- a/stages/99-pdfium.sh +++ b/stages/99-pdfium.sh @@ -3,7 +3,7 @@ echo "Download pdfium..." mkdir -p pdfium -_tag='chromium/6219' +_tag='chromium/6233' case "$TARGET" in x86_64-windows*) _name='win-x64' diff --git a/stages/99-protoc.sh b/stages/99-protoc.sh index c01832a..e071540 100644 --- a/stages/99-protoc.sh +++ b/stages/99-protoc.sh @@ -3,7 +3,7 @@ echo "Download pdfium..." mkdir -p pdfium -_tag='25.1' +_tag='25.2' case "$TARGET" in x86_64-windows*) _suffix='win64'