From 87ec58aed15ea7329ed76a519e07f5a8b6a859f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Mon, 8 Aug 2022 20:11:02 +0200 Subject: [PATCH 1/2] xbps-src: explicitly disallow pattern on build deps It is not possible to use version other than currently in template. Specifying pattern breaks build if dependency isn't in binary repo already. That it worked when in repo was a coincidence. Let's detect exact version requirement with regex equivalent to `xbps-uhelper getpkgname`. bash-5.1$ for x in a-{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}; do [[ $x = *[\>\<]* || $x =~ -[^-_]*[0-9][^-_]*_[0-9_]+$ ]]; bash=$?; xbps-uhelper getpkgname $x > /dev/null 2> /dev/null; xbps=$?; if [ $bash != $xbps ]; then echo $x; fi; done bash-5.1$ Co-authored-by: Duncaen --- common/xbps-src/shutils/common.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 1aeeaddc268e..fdc0c5eedd92 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -477,6 +477,12 @@ setup_pkg() { fi fi + for x in ${hostmakedepends} ${makedepends} ${checkdepends}; do + if [[ $x = *[\<\>]* || $x =~ -[^-_]*[0-9][^-_]*_[0-9_]+$ ]]; then + msg_error "$pkgver: specifying version in build dependency '$x' is invalid, template version is used always\n" + fi + done + FILESDIR=$XBPS_SRCPKGDIR/$sourcepkg/files PATCHESDIR=$XBPS_SRCPKGDIR/$sourcepkg/patches DESTDIR=$XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/${sourcepkg}-${version} From 7e178b86b8ce84a73ef3b26da3e8b4772abf09c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Wed, 10 Aug 2022 17:58:09 +0200 Subject: [PATCH 2/2] openocd: runtime depend on exact version of jimtcl build time version requrement is not valid an does not ensure runtime version change --- srcpkgs/openocd/template | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/srcpkgs/openocd/template b/srcpkgs/openocd/template index c492f86d321c..9309090c35de 100644 --- a/srcpkgs/openocd/template +++ b/srcpkgs/openocd/template @@ -1,7 +1,7 @@ # Template file for 'openocd' pkgname=openocd version=0.11.0+1 -revision=1 +revision=2 # update to a commit that has a compatible jimtcl version _commit=830d70bfc66ada2a68c73283b9e4fa4770d408ee _jimtcl_version=0.81 @@ -44,6 +44,7 @@ hostmakedepends="automake pkg-config libtool which" makedepends="hidapi-devel libftdi1-devel jimtcl-devel libusb-devel libjaylink-devel capstone-devel" +depends="jimtcl-devel>=${_jimtcl_version}_1<=${_jimtcl_version}_9999" short_desc="Open On-Chip Debugger" maintainer="Érico Nogueira " license="GPL-2.0-or-later"