From patchwork Wed May 30 04:42:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Fischer X-Patchwork-Id: 1788 Return-Path: Received: from mail01.ipfire.org (mail01.ipfire.org [IPv6:2001:470:7183:25::1]) by web02.i.ipfire.org (Postfix) with ESMTP id 11A3F60603 for ; Tue, 29 May 2018 20:43:13 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id A4EF0115CC3E; Tue, 29 May 2018 19:43:11 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1527619392; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:list-id: list-unsubscribe:list-subscribe:list-post; bh=J6UAp6n/eIHUiB7KM9PuV9MfWUP7kHhKTA7m0I6HjRA=; b=aziaf0MbIH2hOW7kALmZRD7BqdY5ncbV+E1VX6nDVUSkPTGu2EHdJqTTn0H/iP0rIY7uGS E8cq3J5uxhGmtxiN8gncvBl+0OzyhH37nA+4QOwacrxDelkZ2GFGuQkoXAAqnU7MPfEbu2 TCagTYBziaKhDr7JkF5KN1YUJ/bAZPhmsggdIWZmqBWCKsfMg3eGwbZyDnB8uSr7WBmCCQ rCcoZjwtPCMCwDfYJ1zGZALFoiSXTdLvE1+ji186tOhhHQO+db0IITusOuue0ZzMWEejW4 ZxW49FIPYub2ohOHMDNHE/QCNG4XLuIOYGJM5Grr5X/BRTtrd+mBqmilvKMUOA== Authentication-Results: mail01.i.ipfire.org; auth=pass smtp.auth=mfischer smtp.mailfrom=matthias.fischer@ipfire.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1527619386; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=J6UAp6n/eIHUiB7KM9PuV9MfWUP7kHhKTA7m0I6HjRA=; b=kceh3t/gAYa3yoPRspPTn5iX2TYXdF84zmtcm7qJIUU/fO1RzdmYtXy6nU30vu+oA2LzeK JQKKWMMPwo1hi+6TZy15MWfwal5hvWh1WNSpksbO9jnq0XFMuAINFu9nEfEjrh3BTL75ic Mqvi+fY9BizXdXhnCyYeitNTQyfIZdW3xNrGhk11DeHBaqlYEobwGDqm9wy374+51zys9D 6CEphGzroWXKDZ9Qtb0s2h/l5Oi2iy16smc7iQzB2g8G33yfjFXU/0HICuoF2ZUf/7dz36 CvCWQgZCWrzNR7pziZFrdAsZj6ZJk6hMdT4wJdzJ4X8AgWiqBbgjEq+0W9+r8w== Received: from Devel.localdomain (p5B0A2E81.dip0.t-ipconnect.de [91.10.46.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 0F6B910D1B82 for ; Tue, 29 May 2018 19:43:05 +0100 (BST) From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH] tar: Update to 1.30 (V2) Date: Tue, 29 May 2018 20:42:58 +0200 Message-Id: <20180529184258.29492-1-matthias.fischer@ipfire.org> X-Mailer: git-send-email 2.17.0 X-Spamd-Result: default: False [-4.96 / 11.00]; ASN(0.00)[asn:3320, ipnet:91.0.0.0/10, country:DE]; DKIM_SIGNED(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_CONTAINS_FROM(1.00)[]; RCVD_COUNT_ZERO(0.00)[0]; RCPT_COUNT_ONE(0.00)[1]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM(-2.86)[-0.953,0] X-Spam-Status: No, score=-4.96 X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" For details see: https://www.gnu.org/software/tar/ Second attempt to update 'tar' to 1.30. Since new 'tar' has changes in commandline option parsing, the first commit broke cdrom build and probably some others. Sorry for the noise... Thanks to Marcel for tips and diffs and Arne for reverting. Here, these patches built without any errors, I hope it's all right now. Could somebody please have a look at this? Best, Matthias Signed-off-by: Matthias Fischer --- lfs/Config | 8 +++----- lfs/cdrom | 5 ++--- lfs/core-updates | 7 +++---- lfs/tar | 6 +++--- make.sh | 4 ++-- 5 files changed, 13 insertions(+), 17 deletions(-) diff --git a/lfs/Config b/lfs/Config index cf70f81f9..8e8e5879b 100644 --- a/lfs/Config +++ b/lfs/Config @@ -205,13 +205,11 @@ define PAK sed -e 's/BUILDTARGET/$(BUILDTARGET)/g' -e 's/KVER/$(KVER)/g' -e 's/MACHINE/$(BUILD_ARCH)/g' -i /install/packages/package/ROOTFILES sed -e 's/xxxKVERxxx/$(KVER)/g' -i /install/packages/package/install.sh chmod 755 /install/packages/package/{{,un}install,update}.sh - cd / && tar cf /install/packages/package/files.tmp --files-from=/install/packages/package/ROOTFILES --exclude='#*' \ - -p --numeric-owner + cd / && tar cfp /install/packages/package/files.tmp --numeric-owner --exclude='#*' --files-from=/install/packages/package/ROOTFILES # Double tar to remove double files - tar xf /install/packages/package/files.tmp -C /install/packages/package/tmp/ \ - -p --numeric-owner + tar xfp /install/packages/package/files.tmp --numeric-owner -C /install/packages/package/tmp/ rm -f /install/packages/package/files.tmp - cd /install/packages/package/tmp/ && tar cf - -p --numeric-owner * | xz $(XZ_OPT) > /install/packages/package/files.tar.xz + cd /install/packages/package/tmp/ && tar cJp --numeric-owner * | xz $(XZ_OPT) > /install/packages/package/files.tar.xz rm -r /install/packages/package/tmp -cat /install/packages/package/ROOTFILES | grep -v "#" > /install/packages/package/ROOTFILES.tmp mv /install/packages/package/ROOTFILES.tmp /install/packages/package/ROOTFILES diff --git a/lfs/cdrom b/lfs/cdrom index 00f185d81..6382034b5 100644 --- a/lfs/cdrom +++ b/lfs/cdrom @@ -65,9 +65,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # Compress root filesystem # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES - tar -c -C / --files-from=/tmp/ROOTFILES \ - -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \ - --exclude='proc/*' --exclude='tmp/ROOTFILES' + tar -c --exclude='#*' --exclude='proc/*' --exclude='dev/pts/*' --exclude='tmp/ROOTFILES' \ + -C / --files-from=/tmp/ROOTFILES -f /$(SNAME).tar rm -f /tmp/ROOTFILES tar -x -C /tmp -f /$(SNAME).tar rm -f /$(SNAME).tar diff --git a/lfs/core-updates b/lfs/core-updates index d34926967..3d12d40b1 100644 --- a/lfs/core-updates +++ b/lfs/core-updates @@ -72,10 +72,9 @@ core/%: sed -e "s/KVER/$(KVER)/g" -i /tmp/ROOTFILES #Remove doubled files with tar/untar/tar to save space - tar -c -C / --files-from=/tmp/ROOTFILES \ - -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \ - --exclude='proc/*' --exclude='tmp/ROOTFILES' \ - --exclude-from=$(DIR_SRC)/config/rootfiles/$@/exclude + tar -c --exclude='proc/*' --exclude='tmp/ROOTFILES' --exclude='#*' --exclude='dev/pts/*' \ + --exclude-from=$(DIR_SRC)/config/rootfiles/$@/exclude \ + -C / --files-from=/tmp/ROOTFILES -f /$(SNAME).tar mv -f /tmp/ROOTFILES /install/packages/package/ROOTFILES tar -p --numeric-owner -x -C /tmp -f /$(SNAME).tar rm -f /$(SNAME).tar diff --git a/lfs/tar b/lfs/tar index 6a949a003..4e914b535 100644 --- a/lfs/tar +++ b/lfs/tar @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2018 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -24,7 +24,7 @@ include Config -VER = 1.28 +VER = 1.30 THISAPP = tar-$(VER) DL_FILE = $(THISAPP).tar.bz2 @@ -50,7 +50,7 @@ objects = $(DL_FILE) $(DL_FILE) = $(DL_FROM)/$(DL_FILE) -$(DL_FILE)_MD5 = 8f32b2bc1ed7ddf4cf4e4a39711341b0 +$(DL_FILE)_MD5 = 8404e4c1fc5a3000228ab2b8ad674a65 install : $(TARGET) diff --git a/make.sh b/make.sh index bfcfbc3e4..1050eb03b 100755 --- a/make.sh +++ b/make.sh @@ -1785,8 +1785,8 @@ toolchain) buildtoolchain echo "`date -u '+%b %e %T'`: Create toolchain image for ${BUILD_ARCH}" | tee -a $LOGFILE test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains - cd $BASEDIR && tar -cf- --exclude='log/_build.*.log' build/${TOOLS_DIR} build/bin/sh log | xz ${XZ_OPT} \ - > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz + cd $BASEDIR && XZ_OPT="$(XZ_OPT)" tar -Jc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz --xz \ + build/${TOOLS_DIR} build/bin/sh log >> $LOGFILE md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz \ > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5 stdumount