kexec-tools: work around broken release tarball

There are hard links from files to themselves in the tarball and
bsdtar fails to extract them. Skip extraction and use GNU tar instead.
This commit is contained in:
Jürgen Buchmüller 2020-05-27 11:51:03 +02:00
parent d6a26fcf3d
commit cd5c2e15d8

View file

@ -2,7 +2,9 @@
pkgname=kexec-tools pkgname=kexec-tools
version=2.0.20 version=2.0.20
revision=1 revision=1
create_wrksrc=yes
build_style=gnu-configure build_style=gnu-configure
hostmakedepends="tar xz"
makedepends="zlib-devel liblzma-devel" makedepends="zlib-devel liblzma-devel"
short_desc="Tools to support fast kexec reboots" short_desc="Tools to support fast kexec reboots"
maintainer="Orphaned <orphan@voidlinux.org>" maintainer="Orphaned <orphan@voidlinux.org>"
@ -10,6 +12,7 @@ license="GPL-2.0-only"
homepage="http://kernel.org/pub/linux/utils/kernel/kexec/" homepage="http://kernel.org/pub/linux/utils/kernel/kexec/"
distfiles="${KERNEL_SITE}/utils/kernel/kexec/${pkgname}-${version}.tar.xz" distfiles="${KERNEL_SITE}/utils/kernel/kexec/${pkgname}-${version}.tar.xz"
checksum=dad8077f0315445d1f6335579fc4ade222facf82a67124974c7be5303ba4f8c8 checksum=dad8077f0315445d1f6335579fc4ade222facf82a67124974c7be5303ba4f8c8
skip_extraction="${pkgname}-${version}.tar.xz"
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
i686*) broken="https://build.voidlinux.org/builders/i686_builder/builds/19200/steps/shell_3/logs/stdio" ;; i686*) broken="https://build.voidlinux.org/builders/i686_builder/builds/19200/steps/shell_3/logs/stdio" ;;
@ -19,6 +22,14 @@ case "$XBPS_TARGET_MACHINE" in
ppc-musl) nopie=yes;; # textrels not supported ppc-musl) nopie=yes;; # textrels not supported
esac esac
do_extract() {
# bsdtar fails to extract version 2.0.20 tarball which
# contains (buggy) hard links from files to themselves.
tar --strip-components 1 --no-same-owner --extract --file \
${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}-${version}.tar.xz \
--directory ${wrksrc}
}
pre_build() { pre_build() {
rm ${XBPS_WRAPPERDIR}/strip rm ${XBPS_WRAPPERDIR}/strip
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in