diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2018-03-12 12:46:18 +0100 |
---|---|---|
committer | Sören Tempel <soeren+git@soeren-tempel.net> | 2018-03-12 12:50:10 +0100 |
commit | 1b6a167de8ce02d69dc8a8c8f4638aefd27c0ebe (patch) | |
tree | 14377bab1cbca49531fb3ec6f51c5ecb37862f8d /main | |
parent | 53eca00d555f64bd2da618c0ae5cdfbee8670f4a (diff) | |
download | aports-1b6a167de8ce02d69dc8a8c8f4638aefd27c0ebe.tar.bz2 aports-1b6a167de8ce02d69dc8a8c8f4638aefd27c0ebe.tar.xz |
main/mkinitfs: fix extract-unsafe-symlink warning
Diffstat (limited to 'main')
-rw-r--r-- | main/mkinitfs/0001-mkinitfs-set-EXTRACT_UNSAFE_SYMLINKS-1.patch | 34 | ||||
-rw-r--r-- | main/mkinitfs/APKBUILD | 6 |
2 files changed, 38 insertions, 2 deletions
diff --git a/main/mkinitfs/0001-mkinitfs-set-EXTRACT_UNSAFE_SYMLINKS-1.patch b/main/mkinitfs/0001-mkinitfs-set-EXTRACT_UNSAFE_SYMLINKS-1.patch new file mode 100644 index 0000000000..373d3b600b --- /dev/null +++ b/main/mkinitfs/0001-mkinitfs-set-EXTRACT_UNSAFE_SYMLINKS-1.patch @@ -0,0 +1,34 @@ +From 83c27a9d413d6d02ffe61f681e2f20a1000f6c05 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net> +Date: Mon, 12 Mar 2018 11:38:43 +0100 +Subject: [PATCH] mkinitfs: set EXTRACT_UNSAFE_SYMLINKS=1 + +This is needed because busybox >= 1.28 complains if a cpio archive +contains symlinks with ".." components or symlinks starting with "/". In +this case the archive contains the symlink /bin/sh which points to +/bin/busybox and thus causes the following warning to be emitted: + + cpio: skipping unsafe symlink to '/bin/busybox' in archive, set EXTRACT_UNSAFE_SYMLINKS=1 to extract + +This commit fixes this by setting the magic environment variable. +--- + mkinitfs.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/mkinitfs.in b/mkinitfs.in +index 83333ca..e783a18 100755 +--- a/mkinitfs.in ++++ b/mkinitfs.in +@@ -47,7 +47,8 @@ initfs_base() { + $(feature_files "$basedir" files) \ + \ + | sed -e "s|^$basedir||" | sort -u \ +- | cpio --quiet -pdm "$tmpdir" || return 1 ++ | EXTRACT_UNSAFE_SYMLINKS=1 cpio --quiet -pdm "$tmpdir" \ ++ || return 1 + + # copy init + cd "$startdir" +-- +2.16.2 + diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD index 06898352f8..e7c7621f67 100644 --- a/main/mkinitfs/APKBUILD +++ b/main/mkinitfs/APKBUILD @@ -2,7 +2,7 @@ pkgname=mkinitfs pkgver=3.2.0 _ver=${pkgver%_git*} -pkgrel=7 +pkgrel=8 pkgdesc="Tool to generate initramfs images for Alpine" url="https://git.alpinelinux.org/cgit/mkinitfs" arch="all" @@ -19,6 +19,7 @@ source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$_ver.tar.xz 0001-skip-hooks-on-diskless-install.patch 0001-nlplug-findfs-add-primitive-support-for-LUKS2-contai.patch 0001-initramfs-do-not-relocate-mountpoint-for-netboot.patch + 0001-mkinitfs-set-EXTRACT_UNSAFE_SYMLINKS-1.patch " builddir="$srcdir/$pkgname-$_ver" @@ -35,4 +36,5 @@ package() { sha512sums="906bfbce677d4ece9c9fea7b2a529121740bc9d96ea011be083303cc5c56162f09271b0a673e9e335234ccf2f293109bda1eda333698a95357d0772c86f498af mkinitfs-3.2.0.tar.xz f5c9b21e53c663dac1b8f33f929dbe067492f0dc1bd5ef5310ef531033f31fc3fa0b6de6dce03cecaf90b8ed47b278d0f1f7c64dbbeede7621c895ee3ea79864 0001-skip-hooks-on-diskless-install.patch 4d298d73cc6e557c51de805721ef4b9f002498af5dd9f0aebfd6620ec84d1fadde76888bc2d40efc71dc0a8497aa0586ac65d596eb0021bfed633adcc3aca3b4 0001-nlplug-findfs-add-primitive-support-for-LUKS2-contai.patch -4387357cfcd3441c5d8777e42c0e62a73fa446aacd2faac081947afc39bdd8fb91e12b34f3b69a6827bd7d0705f54514b77c0ff4c38ee0d70553050117c42576 0001-initramfs-do-not-relocate-mountpoint-for-netboot.patch" +4387357cfcd3441c5d8777e42c0e62a73fa446aacd2faac081947afc39bdd8fb91e12b34f3b69a6827bd7d0705f54514b77c0ff4c38ee0d70553050117c42576 0001-initramfs-do-not-relocate-mountpoint-for-netboot.patch +2240813d69ea83351a11e122f09f4ca6df007a05d40f1036d8fa06d35bb8d9ef347f711de8238d8d76affdb33d648fb5d7973e6f8f479c6e38662f66c7936012 0001-mkinitfs-set-EXTRACT_UNSAFE_SYMLINKS-1.patch" |