Skip to content

Commit

Permalink
Enable more dependencies to be auto updated by renovate
Browse files Browse the repository at this point in the history
 - Add git ref data dource parsing to renovate to enable updating dependencies following git master
 - Improve release parser for compatibility with private gitlab deploys
  • Loading branch information
HeavenVolkoff committed Feb 14, 2024
1 parent b2c77a0 commit a628b5f
Show file tree
Hide file tree
Showing 20 changed files with 108 additions and 54 deletions.
63 changes: 30 additions & 33 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,59 +37,56 @@
{
"fileMatch": ["^stages/.*\\.sh$"],
"matchStrings": [
"#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\n_tag='(?<currentValue>.*)'\\s"
"#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?( registryUrl=(?<registryUrl>.*?))?\\n_tag='(?<currentValue>.*)'\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
},
{
"fileMatch": ["^stages/.*\\.sh$"],
"matchStrings": [
"#\\s*renovate:\\s*depName=(?<depName>.*?)\\n_commit='(?<currentDigestShort>.*)'"
],
"versioningTemplate": "git",
"datasourceTemplate": "git-refs"
},
{
"fileMatch": ["^Dockerfile$"],
"matchStrings": [
"#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?\\n(ENV|ARG) .*?_VERSION='(?<currentValue>.*)'\\s"
"#\\s*renovate:\\s*datasource=(?<datasource>.*?) depName=(?<depName>.*?)( versioning=(?<versioning>.*?))?( registryUrl=(?<registryUrl>.*?))?\\n(ENV|ARG) .*?_VERSION='(?<currentValue>.*)'\\s"
],
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
}
],

"packageRules": [
{
"packageNames": ["ziglang/zig"],
"extractVersion": "^(?<version>.+)$"
},
{
"packageNames": ["mesonbuild/meson"],
"extractVersion": "^(?<version>.+)$"
},
{
"packageNames": ["Kitware/CMake"],
"extractVersion": "^v(?<version>.+)$"
},
{
"packageNames": ["NixOS/patchelf"],
"extractVersion": "^(?<version>.+)$"
},
{
"packageNames": ["joseluisq/macosx-sdks"],
"extractVersion": "^(?<version>.+)$"
},
{
"packageNames": ["strukturag/libde265"],
"extractVersion": "^v(?<version>.+)$"
},
{
"packageNames": ["strukturag/libde265"],
"packageNames": [
"Kitware/CMake",
"DLTcollab/sse2neon",
"tukaani-project/xz",
"xiph/ogg",
"strukturag/libde265",
"xiph/vorbis",
"Fintel/libvpl",
"xiph/opus",
"AOMediaCodec/SVT-AV1",
"strukturag/libheif",
"protocolbuffers/protobuf",
"microsoft/onnxruntime"
],
"extractVersion": "^v(?<version>.+)$"
},
{
"packageNames": ["strukturag/libheif"],
"extractVersion": "^v(?<version>.+)$"
"packageNames": ["mm2/Little-CMS"],
"extractVersion": "^lcms(?<version>.+)$"
},
{
"packageNames": ["protocolbuffers/protobuf"],
"extractVersion": "^v(?<version>.+)$"
"packageNames": ["FFmpeg/nv-codec-headers"],
"extractVersion": "^n(?<version>.+)$"
},
{
"packageNames": ["microsoft/onnxruntime"],
"extractVersion": "^v(?<version>.+)$"
"packageNames": ["sekrit-twc/zimg"],
"extractVersion": "^release-(?<version>.+)$"
},
{
"packageNames": ["bblanchon/pdfium-binaries"],
Expand Down
5 changes: 4 additions & 1 deletion stages/00-apple/01-xar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ echo "Download xar ..."

mkdir -p "xar/build"

curl_tar 'https://github.com/tpoechtrager/xar/archive/5fa4675.tar.gz' 'xar' 1
# renovate: [email protected]:tpoechtrager/xar.git
_commit='5fa4675'

curl_tar "https://github.com/tpoechtrager/xar/archive/${_commit}.tar.gz" 'xar' 1

cd xar/xar

Expand Down
5 changes: 4 additions & 1 deletion stages/00-apple/02-tapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ echo "Download tapi ..."

mkdir -p "tapi"

curl_tar 'https://github.com/tpoechtrager/apple-libtapi/archive/b8c5ac4.tar.gz' 'tapi' 1
# renovate: [email protected]:tpoechtrager/apple-libtapi.git
_commit='b8c5ac4'

curl_tar "https://github.com/tpoechtrager/apple-libtapi/archive/${_commit}.tar.gz" 'tapi' 1

cd tapi

Expand Down
5 changes: 4 additions & 1 deletion stages/00-apple/03-dispatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ echo "Download dispatch ..."

mkdir -p 'dispatch/build'

curl_tar 'https://github.com/tpoechtrager/apple-libdispatch/archive/ee39300.tar.gz' 'dispatch' 1
# renovate: [email protected]:tpoechtrager/apple-libdispatch.git
_commit='ee39300'

curl_tar "https://github.com/tpoechtrager/apple-libdispatch/archive/${_commit}.tar.gz" 'dispatch' 1

cd dispatch/build

Expand Down
5 changes: 4 additions & 1 deletion stages/00-apple/04-cctools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ echo "Download cctools ..."

mkdir -p "cctools"

curl_tar 'https://github.com/tpoechtrager/cctools-port/archive/a98286d.tar.gz' 'cctools' 1
# renovate: [email protected]:tpoechtrager/cctools-port.git
_commit='a98286d'

curl_tar "https://github.com/tpoechtrager/cctools-port/archive/${_commit}.tar.gz" 'cctools' 1

cd cctools/cctools

Expand Down
5 changes: 4 additions & 1 deletion stages/10-sse2neon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ echo "Download sse2neon..."

mkdir -p sse2neon

curl_tar 'https://github.com/DLTcollab/sse2neon/archive/refs/tags/v1.7.0.tar.gz' 'sse2neon' 1
# renovate: datasource=github-releases depName=DLTcollab/sse2neon
_tag='1.7.0'

curl_tar "https://github.com/DLTcollab/sse2neon/archive/refs/tags/v${_tag}.tar.gz" 'sse2neon' 1

# Remove unused components
rm -r sse2neon/{.ci,.github,tests}
Expand Down
7 changes: 5 additions & 2 deletions stages/20-bzip2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

case "$TARGET" in
*darwin*)
# MacOS ships bzip2
# MacOS SDK ships bzip2
export UNSUPPORTED=1
exit 1
;;
Expand All @@ -11,7 +11,10 @@ esac
echo "Download bzip2..."
mkdir -p bzip2

curl_tar 'https://gitlab.com/bzip2/bzip2/-/archive/66c46b8/bzip2.tar.gz' bzip2 1
# renovate: [email protected]:bzip2/bzip2.git
_commit='66c46b8'

curl_tar "https://gitlab.com/bzip2/bzip2/-/archive/${_commit}/bzip2.tar.gz" bzip2 1

sed -i '/add_subdirectory(man)/d' bzip2/CMakeLists.txt

Expand Down
7 changes: 5 additions & 2 deletions stages/20-zlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

case "$TARGET" in
*darwin*)
# MacOS ships zlib
# MacOS SDK ships zlib
export UNSUPPORTED=1
exit 1
;;
Expand All @@ -11,7 +11,10 @@ esac
echo "Download zlib..."
mkdir -p zlib

curl_tar 'https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.1.6.tar.gz' zlib 1
# renovate: datasource=github-releases depName=zlib-ng/zlib-ng
_tag='2.1.6'

curl_tar "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/${_tag}.tar.gz" zlib 1

# Patch cmake to disable armv6 assembly, it thinks we support it, but we don't
sed -i 's/HAVE_ARMV6_INLINE_ASM OR HAVE_ARMV6_INTRIN/HAVE_ARMV6_INLINE_ASM AND HAVE_ARMV6_INTRIN/' zlib/CMakeLists.txt
Expand Down
5 changes: 4 additions & 1 deletion stages/25-lcms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "Download lcms..."
mkdir -p lcms

curl_tar 'https://github.com/mm2/Little-CMS/releases/download/lcms2.16/lcms2-2.16.tar.gz' lcms 1
# renovate: datasource=github-releases depName=mm2/Little-CMS versioning=semver-coerced
_tag='2.16'

curl_tar "https://github.com/mm2/Little-CMS/releases/download/lcms${_tag}/lcms2-${_tag}.tar.gz" lcms 1

case "$TARGET" in
aarch64*)
Expand Down
5 changes: 4 additions & 1 deletion stages/25-lzma.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "Download lzma..."
mkdir -p lzma

curl_tar 'https://github.com/tukaani-project/xz/releases/download/v5.4.6/xz-5.4.6.tar.xz' lzma 1
# renovate: datasource=github-releases depName=tukaani-project/xz
_tag='5.4.6'

curl_tar "https://github.com/tukaani-project/xz/releases/download/v${_tag}/xz-${_tag}.tar.xz" lzma 1

case "$TARGET" in
*darwin*)
Expand Down
5 changes: 4 additions & 1 deletion stages/25-ogg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "Download ogg..."
mkdir -p ogg

curl_tar 'https://github.com/xiph/ogg/releases/download/v1.3.5/libogg-1.3.5.tar.gz' ogg 1
# renovate: datasource=github-releases depName=xiph/ogg versioning=semver-coerced
_tag='1.3.5'

curl_tar "https://github.com/xiph/ogg/releases/download/v${_tag}/libogg-${_tag}.tar.gz" ogg 1

# Remove some superfluous files
rm -rf ogg/{.github,install-sh,depcomp,Makefile.in,config.sub,aclocal.m4,config.guess,ltmain.sh,m4,configure,doc}
Expand Down
5 changes: 4 additions & 1 deletion stages/45-dav1d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "Download dav1d..."
mkdir -p dav1d

curl_tar 'https://github.com/videolan/dav1d/archive/refs/tags/1.3.0.tar.gz' dav1d 1
# renovate: datasource=gitlab-releases depName=videolan/dav1d registryUrl=https://code.videolan.org
_tag='1.3.0'

curl_tar "https://code.videolan.org/videolan/dav1d/-/archive/${_tag}/dav1d-${_tag}.tar.bz2" dav1d 1

sed -i "/subdir('doc')/d" dav1d/meson.build
sed -i "/subdir('tools')/d" dav1d/meson.build
Expand Down
5 changes: 4 additions & 1 deletion stages/45-vorbis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "Download vorbis..."
mkdir -p vorbis

curl_tar 'https://github.com/xiph/vorbis/releases/download/v1.3.7/libvorbis-1.3.7.tar.gz' vorbis 1
# renovate: datasource=github-releases depName=xiph/vorbis versioning=semver-coerced
_tag='1.3.7'

curl_tar "https://github.com/xiph/vorbis/releases/download/v${_tag}/libvorbis-${_tag}.tar.gz" vorbis 1

# Remove some superfluous files
rm -rf vorbis/{.github,symbian,install-sh,depcomp,macosx,Makefile.in,config.sub,aclocal.m4,config.guess,test,examples,vq,ltmain.sh,m4,configure,doc}
Expand Down
5 changes: 4 additions & 1 deletion stages/50-nvenc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ fi
echo "Download nvenv..."
mkdir -p nvenv

curl_tar 'https://github.com/FFmpeg/nv-codec-headers/releases/download/n12.1.14.0/nv-codec-headers-12.1.14.0.tar.gz' nvenv 1
# renovate: datasource=github-releases depName=FFmpeg/nv-codec-headers versioning=semver-coerced
_tag='12.1.14.0'

curl_tar "https://github.com/FFmpeg/nv-codec-headers/releases/download/n${_tag}/nv-codec-headers-${_tag}.tar.gz" nvenv 1

# Backup source
bak_src 'nvenv'
Expand Down
5 changes: 4 additions & 1 deletion stages/50-onevpl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ esac
echo "Download oneVPL..."
mkdir -p oneVPL

curl_tar 'https://github.com/intel/libvpl/archive/refs/tags/v2.10.1.tar.gz' oneVPL 1
# renovate: datasource=github-releases depName=intel/libvpl
_tag='2.10.1'

curl_tar "https://github.com/intel/libvpl/archive/refs/tags/v${_tag}.tar.gz" oneVPL 1

sed -i '/add_subdirectory(examples)/d' oneVPL/CMakeLists.txt

Expand Down
5 changes: 4 additions & 1 deletion stages/50-opus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "Download opus..."
mkdir -p opus

curl_tar 'https://github.com/xiph/opus/releases/download/v1.4/opus-1.4.tar.gz' opus 1
# renovate: datasource=github-releases depName=xiph/opus versioning=semver-coerced
_tag='1.4'

curl_tar "https://github.com/xiph/opus/releases/download/v${_tag}/opus-${_tag}.tar.gz" opus 1

# Required patch to fix meson for arm builds
curl 'https://github.com/xiph/opus/commit/20c032d.patch' \
Expand Down
5 changes: 4 additions & 1 deletion stages/50-svt-av1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "Download svt-av1..."
mkdir -p svt-av1

curl_tar 'https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v1.8.0/SVT-AV1-v1.8.0.tar.gz' svt-av1 1
# renovate: datasource=gitlab-releases depName=AOMediaCodec/SVT-AV1
_tag='1.8.0'

curl_tar "https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v${_tag}/SVT-AV1-v${_tag}.tar.gz" svt-av1 1

case "$TARGET" in
x86_64*)
Expand Down
5 changes: 4 additions & 1 deletion stages/50-x264.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
echo "Download x264..."
mkdir -p x264

# renovate: [email protected]:videolan/x264.git
_commit='c1962404'

# Using master due to aarch64 improvements
curl_tar 'https://code.videolan.org/videolan/x264/-/archive/c1962404/x264.tar.bz2' x264 1
curl_tar "https://code.videolan.org/videolan/x264/-/archive/${_commit}/x264.tar.bz2" x264 1

# Some minor fixes to x264's pkg-config
for patch in \
Expand Down
5 changes: 4 additions & 1 deletion stages/50-x265.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
echo "Download x265..."
mkdir -p x265

# renovate: [email protected]:multicoreware/x265_git.git
_commit='ce8642f'

# Need to use master, because the latest release doesn't support optmized aarch64 and it is from 2021
curl_tar 'https://bitbucket.org/multicoreware/x265_git/get/ce8642f.tar.bz2' x265 1
curl_tar "https://bitbucket.org/multicoreware/x265_git/get/${_commit}.tar.bz2" x265 1

# Remove some superfluous files
rm -rf x265/{doc,build}
Expand Down
5 changes: 4 additions & 1 deletion stages/50-zimg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "Download zimg..."
mkdir -p zimg

curl_tar 'https://github.com/sekrit-twc/zimg/archive/refs/tags/release-3.0.5.tar.gz' zimg 1
# renovate: datasource=github-releases depName=sekrit-twc/zimg
_tag='3.0.5'

curl_tar "https://github.com/sekrit-twc/zimg/archive/refs/tags/release-${_tag}.tar.gz" zimg 1

case "$TARGET" in
*windows*)
Expand Down

0 comments on commit a628b5f

Please sign in to comment.