diff options
author | 2013-12-30 17:17:28 +0000 | |
---|---|---|
committer | 2017-01-07 17:50:39 -0800 | |
commit | 054c583f4911bb014c4c0fefb4a5ae4b1be9e617 (patch) | |
tree | 9bbee3e8d5321ed8fc124611ab827c77992691ae | |
parent | Minor fixes and enhmacements in splash support (diff) | |
download | genkernel-054c583f4911bb014c4c0fefb4a5ae4b1be9e617.tar.gz genkernel-054c583f4911bb014c4c0fefb4a5ae4b1be9e617.tar.bz2 genkernel-054c583f4911bb014c4c0fefb4a5ae4b1be9e617.zip |
Additional source file archive formats support
This patch mainly replaces tar xjf with tar xf as modern tar supports not only bzip2...
(minor tweaks to apply)
Fixes: https://bugs.gentoo.org/show_bug.cgi?id=496512#c8
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r-- | defaults/linuxrc | 2 | ||||
-rwxr-xr-x | gen_compile.sh | 22 | ||||
-rwxr-xr-x | gen_determineargs.sh | 2 | ||||
-rwxr-xr-x | gen_initramfs.sh | 12 | ||||
-rwxr-xr-x | gen_package.sh | 20 |
5 files changed, 29 insertions, 29 deletions
diff --git a/defaults/linuxrc b/defaults/linuxrc index 7133cd4e..66f7bd98 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -851,7 +851,7 @@ FSTAB do tarname=$(basename ${targz}) good_msg "Adding additional package ${tarname}" - (cd ${NEW_ROOT} ; /bin/tar -xzf ${targz}) + (cd ${NEW_ROOT} ; /bin/tar -xf ${targz}) done fi fi diff --git a/gen_compile.sh b/gen_compile.sh index ef72a23d..7df01546 100755 --- a/gen_compile.sh +++ b/gen_compile.sh @@ -434,7 +434,7 @@ compile_busybox() { # current .config. if [ -f "${BUSYBOX_BINCACHE}" ] then - oldconfig_md5="$(tar -xjf "${BUSYBOX_BINCACHE}" -O .config.gk_orig 2>/dev/null | md5sum)" + oldconfig_md5="$(tar -xf "${BUSYBOX_BINCACHE}" -O .config.gk_orig 2>/dev/null | md5sum)" newconfig_md5="$(md5sum < "${TEMP}/busybox-config")" if [ "${oldconfig_md5}" != "${newconfig_md5}" ] then @@ -452,7 +452,7 @@ compile_busybox() { then cd "${TEMP}" rm -rf "${BUSYBOX_DIR}" > /dev/null - /bin/tar -jxpf ${BUSYBOX_SRCTAR} || + /bin/tar -xpf ${BUSYBOX_SRCTAR} || gen_die 'Could not extract busybox source tarball!' [ -d "${BUSYBOX_DIR}" ] || gen_die "Busybox directory ${BUSYBOX_DIR} is invalid!" @@ -475,7 +475,7 @@ compile_busybox() { gen_die 'Busybox executable does not exist!' ${UTILS_CROSS_COMPILE}strip "${TEMP}/${BUSYBOX_DIR}/busybox" || gen_die 'Could not strip busybox binary!' - tar -cj -C "${TEMP}/${BUSYBOX_DIR}" -f "${BUSYBOX_BINCACHE}" busybox .config .config.gk_orig || + tar -C "${TEMP}/${BUSYBOX_DIR}" -cjf "${BUSYBOX_BINCACHE}" busybox .config .config.gk_orig || gen_die 'Could not create the busybox bincache!' cd "${TEMP}" @@ -493,7 +493,7 @@ compile_lvm() { gen_die "Could not find LVM source tarball: ${LVM_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" cd "${TEMP}" rm -rf ${LVM_DIR} > /dev/null - /bin/tar -zxpf ${LVM_SRCTAR} || + /bin/tar -xpf ${LVM_SRCTAR} || gen_die 'Could not extract LVM source tarball!' [ -d "${LVM_DIR}" ] || gen_die "LVM directory ${LVM_DIR} is invalid!" @@ -541,7 +541,7 @@ compile_mdadm() { gen_die "Could not find MDADM source tarball: ${MDADM_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" cd "${TEMP}" rm -rf "${MDADM_DIR}" > /dev/null - /bin/tar -jxpf "${MDADM_SRCTAR}" || + /bin/tar -xpf "${MDADM_SRCTAR}" || gen_die 'Could not extract MDADM source tarball!' [ -d "${MDADM_DIR}" ] || gen_die "MDADM directory ${MDADM_DIR} is invalid!" @@ -580,13 +580,13 @@ compile_dmraid() { gen_die "Could not find DMRAID source tarball: ${DMRAID_SRCTAR}! Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" cd "${TEMP}" rm -rf ${DMRAID_DIR} > /dev/null - /bin/tar -jxpf ${DMRAID_SRCTAR} || + /bin/tar -xpf ${DMRAID_SRCTAR} || gen_die 'Could not extract DMRAID source tarball!' [ -d "${DMRAID_DIR}" ] || gen_die "DMRAID directory ${DMRAID_DIR} is invalid!" rm -rf "${TEMP}/lvm" > /dev/null mkdir -p "${TEMP}/lvm" - /bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/lvm" || + /bin/tar -xpf "${LVM_BINCACHE}" -C "${TEMP}/lvm" || gen_die "Could not extract LVM2 binary cache!"; cd "${DMRAID_DIR}" @@ -637,7 +637,7 @@ compile_fuse() { gen_die "Could not find fuse source tarball: ${FUSE_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" cd "${TEMP}" rm -rf "${FUSE_DIR}" - tar -zxpf "${FUSE_SRCTAR}" + tar -xpf "${FUSE_SRCTAR}" [ ! -d "${FUSE_DIR}" ] && gen_die "fuse directory ${FUSE_DIR} invalid" cd "${FUSE_DIR}" @@ -675,7 +675,7 @@ compile_unionfs_fuse() { gen_die "Could not find unionfs-fuse source tarball: ${UNIONFS_FUSE_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" cd "${TEMP}" rm -rf "${UNIONFS_FUSE_DIR}" - tar -jxpf "${UNIONFS_FUSE_SRCTAR}" + tar -xpf "${UNIONFS_FUSE_SRCTAR}" [ ! -d "${UNIONFS_FUSE_DIR}" ] && gen_die "unionfs-fuse directory ${UNIONFS_FUSE_DIR} invalid" cd "${UNIONFS_FUSE_DIR}" @@ -707,7 +707,7 @@ compile_iscsi() { gen_die "Could not find iSCSI source tarball: ${ISCSI_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" cd "${TEMP}" rm -rf "${ISCSI_DIR}" - tar -zxpf "${ISCSI_SRCTAR}" + tar -xpf "${ISCSI_SRCTAR}" [ ! -d "${ISCSI_DIR}" ] && gen_die "ISCSI directory ${ISCSI_DIR} invalid" print_info 1 'iSCSI: >> Compiling...' @@ -762,7 +762,7 @@ compile_gpg() { gen_die "Could not find gnupg source tarball: ${GPG_SRCTAR}. Please place it there, or place another version, changing /etc/genkernel.conf as necessary!" cd "${TEMP}" rm -rf "${GPG_DIR}" - tar -jxf "${GPG_SRCTAR}" + tar -xf "${GPG_SRCTAR}" [ ! -d "${GPG_DIR}" ] && gen_die "gnupg directory ${GPG_DIR} invalid" cd "${GPG_DIR}" diff --git a/gen_determineargs.sh b/gen_determineargs.sh index cae8c66f..23084a15 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -4,7 +4,7 @@ get_KV() { if [ "${KERNEL_SOURCES}" = '0' -a -e "${KERNCACHE}" ] then - /bin/tar -xj -C ${TEMP} -f ${KERNCACHE} kerncache.config + /bin/tar -x -C ${TEMP} -f ${KERNCACHE} kerncache.config if [ -e ${TEMP}/kerncache.config ] then VER=`grep ^VERSION\ \= ${TEMP}/kerncache.config | awk '{ print $3 };'` diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 612ae86e..8bbaa2ca 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -143,7 +143,7 @@ append_busybox() { fi mkdir -p "${TEMP}/initramfs-busybox-temp/bin/" - tar -xjf "${BUSYBOX_BINCACHE}" -C "${TEMP}/initramfs-busybox-temp/bin" busybox || + tar -xf "${BUSYBOX_BINCACHE}" -C "${TEMP}/initramfs-busybox-temp/bin" busybox || gen_die 'Could not extract busybox bincache!' chmod +x "${TEMP}/initramfs-busybox-temp/bin/busybox" @@ -224,7 +224,7 @@ append_blkid(){ # fi # cd ${TEMP} # mkdir -p "${TEMP}/initramfs-fuse-temp/lib/" -# tar -C "${TEMP}/initramfs-fuse-temp/lib/" -xjf "${FUSE_BINCACHE}" +# tar -C "${TEMP}/initramfs-fuse-temp/lib/" -xf "${FUSE_BINCACHE}" # cd "${TEMP}/initramfs-fuse-temp/" # find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \ # || gen_die "compressing fuse cpio" @@ -257,7 +257,7 @@ append_unionfs_fuse() { # print_info 1 'SUSPEND: Adding support (compiling binaries)...' # compile_suspend # mkdir -p "${TEMP}/initramfs-suspend-temp/" -# /bin/tar -jxpf "${SUSPEND_BINCACHE}" -C "${TEMP}/initramfs-suspend-temp" || +# /bin/tar -xpf "${SUSPEND_BINCACHE}" -C "${TEMP}/initramfs-suspend-temp" || # gen_die "Could not extract suspend binary cache!" # mkdir -p "${TEMP}/initramfs-suspend-temp/etc" # cp -f /etc/suspend.conf "${TEMP}/initramfs-suspend-temp/etc" || @@ -316,7 +316,7 @@ append_dmraid(){ print_info 1 'DMRAID: Adding support (compiling binaries)...' compile_dmraid mkdir -p "${TEMP}/initramfs-dmraid-temp/" - /bin/tar -jxpf "${DMRAID_BINCACHE}" -C "${TEMP}/initramfs-dmraid-temp" || + /bin/tar -xpf "${DMRAID_BINCACHE}" -C "${TEMP}/initramfs-dmraid-temp" || gen_die "Could not extract dmraid binary cache!"; [ -x /sbin/dmsetup -a -x /sbin/kpartx ] && copy_binaries \ "${TEMP}/initramfs-dmraid-temp/" \ @@ -390,7 +390,7 @@ append_lvm(){ else print_info 1 ' LVM: Adding support (compiling binaries)...' compile_lvm || gen_die "Could not compile LVM" - /bin/tar -jxpf "${LVM_BINCACHE}" -C "${TEMP}/initramfs-lvm-temp" || + /bin/tar -xpf "${LVM_BINCACHE}" -C "${TEMP}/initramfs-lvm-temp" || gen_die "Could not extract lvm binary cache!"; # Remove any dynamic binaries that exist, so the rest of the code will # fail better if something is missing @@ -462,7 +462,7 @@ append_mdadm(){ else print_info 1 ' MDADM: Adding support (compiling binaries)...' compile_mdadm - /bin/tar -jxpf "${MDADM_BINCACHE}" -C "${TEMP}/initramfs-mdadm-temp" || + /bin/tar -xpf "${MDADM_BINCACHE}" -C "${TEMP}/initramfs-mdadm-temp" || gen_die "Could not extract mdadm binary cache!"; fi fi diff --git a/gen_package.sh b/gen_package.sh index b08ff032..d82322fa 100755 --- a/gen_package.sh +++ b/gen_package.sh @@ -7,13 +7,13 @@ gen_minkernpackage() { mkdir "${TEMP}/minkernpackage" || gen_die 'Could not make a directory for the kernel package!' if [ "${KERNCACHE}" != "" ] then - /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} kernel-${ARCH}-${KV} + /bin/tar -x -C ${TEMP}/minkernpackage -f ${KERNCACHE} kernel-${ARCH}-${KV} mv minkernpackage/{kernel-${ARCH}-${KV},kernel-${KNAME}-${ARCH}-${KV}} - /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} config-${ARCH}-${KV} + /bin/tar -x -C ${TEMP}/minkernpackage -f ${KERNCACHE} config-${ARCH}-${KV} mv minkernpackage/{config-${ARCH}-${KV},config-${KNAME}-${ARCH}-${KV}} if isTrue "${GENZIMAGE}" then - /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} kernelz-${ARCH}-${KV} + /bin/tar -x -C ${TEMP}/minkernpackage -f ${KERNCACHE} kernelz-${ARCH}-${KV} mv minkernpackage/{kernelz-${ARCH}-${KV},kernelz-${KNAME}-${ARCH}-${KV}} fi if [ ! -f minkernpackage/kernel-${KNAME}-${ARCH}-${KV} \ @@ -44,7 +44,7 @@ gen_minkernpackage() { if [ "${KERNCACHE}" != "" ] then - /bin/tar -xj -C ${TEMP}/minkernpackage -f ${KERNCACHE} System.map-${ARCH}-${KV} + /bin/tar -x -C ${TEMP}/minkernpackage -f ${KERNCACHE} System.map-${ARCH}-${KV} mv minkernpackage/{System.map-${ARCH}-${KV},System.map-${KNAME}-${ARCH}-${KV}} || gen_die 'Could not copy System.map from kerncache for the kernel package!' else @@ -123,7 +123,7 @@ gen_kerncache() gen_kerncache_extract_kernel() { - /bin/tar -f ${KERNCACHE} -C ${TEMP} -xj + /bin/tar -xf ${KERNCACHE} -C ${TEMP} copy_image_with_preserve "kernel" \ "${TEMP}/kernel-${ARCH}-${KV}" \ "kernel-${KNAME}-${ARCH}-${KV}" @@ -147,9 +147,9 @@ gen_kerncache_extract_modules() print_info 1 'Extracting kerncache kernel modules' if [ "${INSTALL_MOD_PATH}" != '' ] then - /bin/tar -xjf ${KERNCACHE} --strip-components 1 -C ${INSTALL_MOD_PATH}/lib + /bin/tar -xf ${KERNCACHE} --strip-components 1 -C ${INSTALL_MOD_PATH}/lib else - /bin/tar -xjf ${KERNCACHE} --strip-components 1 -C /lib + /bin/tar -xf ${KERNCACHE} --strip-components 1 -C /lib fi fi } @@ -160,7 +160,7 @@ gen_kerncache_extract_config() then print_info 1 'Extracting kerncache config to /etc/kernels' mkdir -p /etc/kernels - /bin/tar -xjf ${KERNCACHE} -C /etc/kernels config-${ARCH}-${KV} + /bin/tar -xf ${KERNCACHE} -C /etc/kernels config-${ARCH}-${KV} mv /etc/kernels/config-${ARCH}-${KV} /etc/kernels/kernel-config-${ARCH}-${KV} fi } @@ -174,7 +174,7 @@ gen_kerncache_is_valid() BUILD_KERNEL=0 # Can make this more secure .... - /bin/tar -xj -f ${KERNCACHE} -C ${TEMP} + /bin/tar -xf ${KERNCACHE} -C ${TEMP} if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV} ] then print_info 1 'Valid kernel cache found; no sources will be used' @@ -189,7 +189,7 @@ gen_kerncache_is_valid() KERNEL_CONFIG="${CMD_KERNEL_CONFIG}" fi - /bin/tar -xj -f ${KERNCACHE} -C ${TEMP} + /bin/tar -xf ${KERNCACHE} -C ${TEMP} if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${KERNEL_CONFIG} ] then |