From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] common/hooks/do-extract/00-distfiles.sh: support deb files
Date: Thu, 10 Nov 2022 09:14:57 +0100 [thread overview]
Message-ID: <20221110081457.4FhyveNQ4DJ8QR-U_CBAVXPvRM6O-mqzKt9Z6OLLXL8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-40405@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages deb-extract
https://github.com/void-linux/void-packages/pull/40405
common/hooks/do-extract/00-distfiles.sh: support deb files
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
TODO: convert all deb packages to use this isntead of overriding do_extract or build_style=fetch or something
A patch file from https://github.com/void-linux/void-packages/pull/40405.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-deb-extract-40405.patch --]
[-- Type: text/x-diff, Size: 1803 bytes --]
From bd3fe8231c96146319b919ce71c8232c797ec253 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Tue, 8 Nov 2022 22:36:31 -0500
Subject: [PATCH] common/hooks/do-extract/00-distfiles.sh: support deb files
---
| 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
--git a/common/hooks/do-extract/00-distfiles.sh b/common/hooks/do-extract/00-distfiles.sh
index c173fe2af1ea..b3f3b90b7b80 100644
--- a/common/hooks/do-extract/00-distfiles.sh
+++ b/common/hooks/do-extract/00-distfiles.sh
@@ -3,7 +3,7 @@
hook() {
local srcdir="$XBPS_SRCDISTDIR/$pkgname-$version"
- local f j curfile found extractdir innerdir num_dirs
+ local f j curfile found extractdir innerdir innerfile num_dirs
local TAR_CMD
if [ -z "$distfiles" -a -z "$checksum" ]; then
@@ -62,6 +62,7 @@ hook() {
*.tar) cursufx="tar";;
*.zip) cursufx="zip";;
*.rpm) cursufx="rpm";;
+ *.deb) cursufx="deb";;
*.patch) cursufx="txt";;
*.diff) cursufx="txt";;
*.txt) cursufx="txt";;
@@ -84,7 +85,7 @@ hook() {
cd "$extractdir"
case ${cursufx} in
gz)
- gunzip -f $curfile
+ gunzip -f $curfile
;;
bz2)
bunzip2 -f $curfile
@@ -120,6 +121,17 @@ hook() {
msg_error "$pkgver: cannot find rpmextract for extraction.\n"
fi
;;
+ deb)
+ if command -v bsdtar &>/dev/null; then
+ bsdtar -x -O -f "$srcdir/$curfile" "data.tar.*" |
+ bsdtar -C "$extractdir" -x --no-same-permissions --no-same-owner
+ if [ $? -ne 0 ]; then
+ msg_error "$pkgver: extracting $curfile into $XBPS_BUILDDIR.\n"
+ fi
+ else
+ msg_error "$pkgver: cannot find bsdtar for extraction.\n"
+ fi
+ ;;
txt)
cp -f $srcdir/$curfile "$extractdir"
;;
next prev parent reply other threads:[~2022-11-10 8:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 6:08 [PR PATCH] " classabbyamp
2022-11-09 11:12 ` [PR PATCH] [Updated] " sgn
2022-11-10 8:14 ` classabbyamp [this message]
2022-11-10 8:37 ` classabbyamp
2022-11-10 9:21 ` classabbyamp
2022-11-10 9:23 ` classabbyamp
2022-11-10 9:34 ` classabbyamp
2022-11-11 8:03 ` classabbyamp
2022-11-11 8:04 ` classabbyamp
2022-11-11 8:16 ` [PR PATCH] [Updated] " classabbyamp
2022-11-11 9:03 ` [PR REVIEW] " sgn
2022-11-11 9:03 ` sgn
2022-11-11 11:21 ` classabbyamp
2022-11-11 11:25 ` [PR PATCH] [Updated] " classabbyamp
2022-11-17 2:42 ` classabbyamp
2022-11-19 4:19 ` [PR PATCH] [Updated] " classabbyamp
2022-11-19 4:32 ` classabbyamp
2022-11-19 4:47 ` [PR PATCH] [Merged]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221110081457.4FhyveNQ4DJ8QR-U_CBAVXPvRM6O-mqzKt9Z6OLLXL8@z \
--to=classabbyamp@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).