Mon Apr 29 08:40:04 2024 UTC (39d)
mk: Correctly engineer previous change.

Rather than breaking many of the 23 platforms that pkgsrc purports to support,
move the EXTRACT_OPTS_TAR logic into the individual package that needed it.
If there are other packages that need this they can easily copy the required
two lines.

It's worth noting here that only bsdtar has a problem with this, gtar extracts
the file fine (with warnings).


(jperkin)
diff -r1.12 -r1.13 pkgsrc/filesystems/fuse-sshfs/Makefile
diff -r1.22 -r1.23 pkgsrc/mk/extract/extract

cvs diff -r1.12 -r1.13 pkgsrc/filesystems/fuse-sshfs/Makefile (expand / switch to unified diff)

--- pkgsrc/filesystems/fuse-sshfs/Makefile 2023/11/22 19:46:10 1.12
+++ pkgsrc/filesystems/fuse-sshfs/Makefile 2024/04/29 08:40:04 1.13
@@ -1,29 +1,33 @@ @@ -1,29 +1,33 @@
1# $NetBSD: Makefile,v 1.12 2023/11/22 19:46:10 wiz Exp $ 1# $NetBSD: Makefile,v 1.13 2024/04/29 08:40:04 jperkin Exp $
2 2
3DISTNAME= sshfs-3.7.4a 3DISTNAME= sshfs-3.7.4a
4PKGNAME= fuse-${DISTNAME} 4PKGNAME= fuse-${DISTNAME}
5CATEGORIES= filesystems 5CATEGORIES= filesystems
6#MASTER_SITES= ${MASTER_SITE_GITHUB:=libfuse/} 6#MASTER_SITES= ${MASTER_SITE_GITHUB:=libfuse/}
7MASTER_SITES= ${MASTER_SITE_GITHUB:=deadbeefsociety/} 7MASTER_SITES= ${MASTER_SITE_GITHUB:=deadbeefsociety/}
8GITHUB_PROJECT= sshfs 8GITHUB_PROJECT= sshfs
9GITHUB_RELEASE= ${DISTNAME} 9GITHUB_RELEASE= ${DISTNAME}
10EXTRACT_SUFX= .tar.xz 10EXTRACT_SUFX= .tar.xz
 11EXTRACT_USING= bsdtar
11 12
12MAINTAINER= pkgsrc-users@NetBSD.org 13MAINTAINER= pkgsrc-users@NetBSD.org
13HOMEPAGE= https://github.com/deadbeefsociety/sshfs/ 14HOMEPAGE= https://github.com/deadbeefsociety/sshfs/
14COMMENT= File system client based on the SFTP protocol 15COMMENT= File system client based on the SFTP protocol
15LICENSE= gnu-gpl-v2 16LICENSE= gnu-gpl-v2
16 17
 18# Cannot restore extended attributes: com.apple.provenance
 19EXTRACT_OPTS_TAR.${DISTNAME}${EXTRACT_SUFX}= --no-xattr
 20
17USE_LANGUAGES= c 21USE_LANGUAGES= c
18USE_TOOLS= pkg-config 22USE_TOOLS= pkg-config
19 23
20PYTHON_FOR_BUILD_ONLY= tool 24PYTHON_FOR_BUILD_ONLY= tool
21PYTHON_VERSIONS_INCOMPATIBLE= 27 25PYTHON_VERSIONS_INCOMPATIBLE= 27
22 26
23.include "../../lang/python/pyversion.mk" 27.include "../../lang/python/pyversion.mk"
24 28
25TOOL_DEPENDS+= ${PYPKGPREFIX}-docutils-[0-9]*:../../textproc/py-docutils 29TOOL_DEPENDS+= ${PYPKGPREFIX}-docutils-[0-9]*:../../textproc/py-docutils
26 30
27SUBST_CLASSES+= rst2man 31SUBST_CLASSES+= rst2man
28SUBST_STAGE.rst2man= pre-configure 32SUBST_STAGE.rst2man= pre-configure
29SUBST_FILES.rst2man+= meson.build 33SUBST_FILES.rst2man+= meson.build

cvs diff -r1.22 -r1.23 pkgsrc/mk/extract/extract (expand / switch to unified diff)

--- pkgsrc/mk/extract/extract 2024/04/28 18:07:33 1.22
+++ pkgsrc/mk/extract/extract 2024/04/29 08:40:04 1.23
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: extract,v 1.22 2024/04/28 18:07:33 wiz Exp $ 3# $NetBSD: extract,v 1.23 2024/04/29 08:40:04 jperkin Exp $
4# 4#
5# Copyright (c) 2006 The NetBSD Foundation, Inc. 5# Copyright (c) 2006 The NetBSD Foundation, Inc.
6# All rights reserved. 6# All rights reserved.
7# 7#
8# This code is derived from software contributed to The NetBSD Foundation 8# This code is derived from software contributed to The NetBSD Foundation
9# by Johnny C. Lam. 9# by Johnny C. Lam.
10# 10#
11# Redistribution and use in source and binary forms, with or without 11# Redistribution and use in source and binary forms, with or without
12# modification, are permitted provided that the following conditions 12# modification, are permitted provided that the following conditions
13# are met: 13# are met:
14# 1. Redistributions of source code must retain the above copyright 14# 1. Redistributions of source code must retain the above copyright
15# notice, this list of conditions and the following disclaimer. 15# notice, this list of conditions and the following disclaimer.
16# 2. Redistributions in binary form must reproduce the above copyright 16# 2. Redistributions in binary form must reproduce the above copyright
@@ -248,27 +248,27 @@ tar) @@ -248,27 +248,27 @@ tar)
248 case "$extract_using" in 248 case "$extract_using" in
249 /*) paxprog="$extract_using" ;; 249 /*) paxprog="$extract_using" ;;
250 *) paxprog="${PAX}" ;; 250 *) paxprog="${PAX}" ;;
251 esac 251 esac
252 if ${TEST} -n "$exclude_file"; then 252 if ${TEST} -n "$exclude_file"; then
253 exclude=yes 253 exclude=yes
254 set -- dummy `${CAT} "$exclude_file"`; shift 254 set -- dummy `${CAT} "$exclude_file"`; shift
255 fi 255 fi
256 ${TEST} "$exclude" = no || exclude_flag="-c" 256 ${TEST} "$exclude" = no || exclude_flag="-c"
257 $decompress_cat "$distfile" | 257 $decompress_cat "$distfile" |
258 $paxprog ${EXTRACT_OPTS_PAX} $exclude_flag -O -r ${1+"$@"} 258 $paxprog ${EXTRACT_OPTS_PAX} $exclude_flag -O -r ${1+"$@"}
259 ;; 259 ;;
260 *tar) 260 *tar)
261 : ${EXTRACT_OPTS_TAR=--no-xattrs} 261 : ${EXTRACT_OPTS_TAR=}
262 case "$extract_using" in 262 case "$extract_using" in
263 /*) tarprog="$extract_using" ;; 263 /*) tarprog="$extract_using" ;;
264 *) tarprog="${TAR}" ;; 264 *) tarprog="${TAR}" ;;
265 esac 265 esac
266 tmpfile= 266 tmpfile=
267 if ${TEST} "$exclude" = "yes"; then 267 if ${TEST} "$exclude" = "yes"; then
268 tmpfile="${TMPDIR}/$self.$$" 268 tmpfile="${TMPDIR}/$self.$$"
269 ${RM} -f "$tmpfile" 269 ${RM} -f "$tmpfile"
270 trap "\${RM} -f \"\$tmpfile\"" 0 270 trap "\${RM} -f \"\$tmpfile\"" 0
271 for i in ${1+"$@"}; do 271 for i in ${1+"$@"}; do
272 ${ECHO} "$i" >> "$tmpfile" 272 ${ECHO} "$i" >> "$tmpfile"
273 done 273 done
274 exclude_file="$tmpfile" 274 exclude_file="$tmpfile"