summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-06-20 11:30:41 +0100
committerSam James <sam@gentoo.org>2024-06-20 11:30:41 +0100
commit341b9bf36b212a4de56cc82c490e3aa4ddcbd480 (patch)
treec714ce47ea766a55dc44ec742c4f85508f26cb7b /app-crypt
parentsys-apps/man-pages: optimize src_unpack (diff)
downloadgentoo-341b9bf36b212a4de56cc82c490e3aa4ddcbd480.tar.gz
gentoo-341b9bf36b212a4de56cc82c490e3aa4ddcbd480.tar.bz2
gentoo-341b9bf36b212a4de56cc82c490e3aa4ddcbd480.zip
app-crypt/loop-aes-losetup: optimize src_unpack
As just done in util-linux & btrfs-progs. Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/loop-aes-losetup/loop-aes-losetup-2.40.1.ebuild23
1 files changed, 8 insertions, 15 deletions
diff --git a/app-crypt/loop-aes-losetup/loop-aes-losetup-2.40.1.ebuild b/app-crypt/loop-aes-losetup/loop-aes-losetup-2.40.1.ebuild
index 3d63e7cb0604..d73e67c758ad 100644
--- a/app-crypt/loop-aes-losetup/loop-aes-losetup-2.40.1.ebuild
+++ b/app-crypt/loop-aes-losetup/loop-aes-losetup-2.40.1.ebuild
@@ -51,24 +51,17 @@ PATCHES=(
)
src_unpack() {
- if use verify-sig ; then
- mkdir "${T}"/verify-sig || die
- pushd "${T}"/verify-sig &>/dev/null || die
-
- # Upstream sign the decompressed .tar
- # Let's do it separately in ${T} then cleanup to avoid external
- # effects on normal unpack.
- cp "${DISTDIR}"/${MY_P}.tar.xz . || die
- xz -d ${MY_P}.tar.xz || die
- verify-sig_verify_detached ${MY_P}.tar "${DISTDIR}"/${MY_P}.tar.sign "${BROOT}"/usr/share/openpgp-keys/karelzak.asc
-
- popd &>/dev/null || die
- rm -r "${T}"/verify-sig || die
+ # Upstream sign the decompressed .tar
+ if use verify-sig; then
+ einfo "Unpacking ${MY_P}.tar.xz ..."
+ verify-sig_verify_detached - "${DISTDIR}"/${MY_P}.tar.sign \
+ < <(xz -cd "${DISTDIR}"/${MY_P}.tar.xz | tee >(tar -x)) "${BROOT}"/usr/share/openpgp-keys/karelzak.asc
+ assert "Unpack failed"
verify-sig_verify_detached "${DISTDIR}"/${LOOPAES_P}.tar.bz2{,.sign}
+ else
+ default
fi
-
- default
}
src_prepare() {