From patchwork Tue Mar 10 13:26:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2828 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48cG7x1rzKz3yBQ for ; Tue, 10 Mar 2020 13:26:21 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48cG7w36ckz1vZ; Tue, 10 Mar 2020 13:26:20 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48cG7w19YDz2yy3; Tue, 10 Mar 2020 13:26:20 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48cG7t6Svcz2yTX for ; Tue, 10 Mar 2020 13:26:18 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48cG7t1QTfz1dd; Tue, 10 Mar 2020 13:26:18 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1583846778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=67w7xchXWK9uOrHAI7ud6OGY5f9a8bTwgp4O/kK1qxM=; b=UW5YvBU1HgjBnkq5w0pKnbSH0FwAyYh4OdelTUkKY8MSlKi6cq6wx+W2WewxwyLqFnDiuc oO7D4Ko5JU3RRhAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1583846778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=67w7xchXWK9uOrHAI7ud6OGY5f9a8bTwgp4O/kK1qxM=; b=RSBU75g4p1viShx3D3CRXUJcRNYJOsbY3EiZY/cVCJ2xwSlWNbynzyDoGl2xdRGl6L5g3f uh9XMGbohRYMqyEPjT8aLS2t4xmQAwsH75tHcfbVd6cjCJJ8JSHvelycV+uNuApa4ElcpH +IsjssdKl6cRUm1k4XhwZy/a/XqTq89qX66+BjAYBVcIQuXyvrSK5H5gtXbR+tubNxUC6q wwkeFI22KootRmkrqwVryQfdfrH/XEafQi3Srj88CkqeHA0pztK5HQRq4XxacORuguDcWP blbUgsJDmmuDsOqy/HrPsDzYwmaS15Ac8GV9V90p8ZwB29iriaW6APTCBRALAg== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 1/4] make.sh: Make /tmp a ramdisk if ramdisks are enabled Date: Tue, 10 Mar 2020 13:26:03 +0000 Message-Id: <20200310132606.21372-2-michael.tremer@ipfire.org> In-Reply-To: <20200310132606.21372-1-michael.tremer@ipfire.org> References: <20200310132606.21372-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" The build system is writing a large amount of temporary file systems that might land on disk or at least in the journal. This change will speed up the build and remove a lot of I/O usage. Signed-off-by: Michael Tremer --- make.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/make.sh b/make.sh index 984fc95b2..188355a0d 100755 --- a/make.sh +++ b/make.sh @@ -476,6 +476,9 @@ prepareenv() { if [ "${ENABLE_RAMDISK}" = "on" ]; then mkdir -p $BASEDIR/build/usr/src mount -t tmpfs tmpfs -o size=4G,nr_inodes=1M,mode=1777 $BASEDIR/build/usr/src + + mkdir -p ${BASEDIR}/build/tmp + mount -t tmpfs tmpfs -o size=4G,nr_inodes=1M,mode=1777 ${BASEDIR}/build/tmp fi mkdir -p $BASEDIR/build/usr/src/{cache,config,doc,html,langs,lfs,log,src,ccache} From patchwork Tue Mar 10 13:26:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2829 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48cG7y6nn5z3wbr for ; Tue, 10 Mar 2020 13:26:22 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48cG7w6Cttz23L; Tue, 10 Mar 2020 13:26:20 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48cG7w4D0qz2yxL; Tue, 10 Mar 2020 13:26:20 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48cG7v0FP8z2yj7 for ; Tue, 10 Mar 2020 13:26:19 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48cG7t64v1zC3; Tue, 10 Mar 2020 13:26:18 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1583846778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tVNkngwNoHfgAzIh9SmDet2T5qqjoKmj9vYdhl0zmEg=; b=h/FAaFdLdZyy0c7f4feptYQV1p3MUVtF14a1Eu8YgU1FIduvmoIPE5SvSsVZUXxF+vyZXP 3ceZmzRO86YLOLAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1583846778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tVNkngwNoHfgAzIh9SmDet2T5qqjoKmj9vYdhl0zmEg=; b=tBgUp1YoURr2wjfufS71tzbU7w43qWh1TNl+em7A/qyhmn0Hv920KiCfMFsJ9eAJBSsbN/ ar2m3hsZ+Lv3mQM5BBtXGBuT2Dz89jFA0jpLk9gbRNJSImPMstATioCJJn110EGAPNGQCl TuYTOOskCEJ0MszoGN507dq7eUrznt2+5Qpke6UUvxn5V6cCpnWQxU4PQ8wYQgno/Si/OE NfOHYZBeFzfv6JEIR2rqPvQvQdtk121VVe9C0aZYWjP0/yl7Xk3KYoqb+xWybzjNIXiZNv Kdb99IotZ9epK5qZ7DtpKuAY6jaLuzU3GVwJJKYaC8QdL7RZjStnftzNfWLZ1g== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 2/4] cdrom: Do not write the temporary tarball to disk Date: Tue, 10 Mar 2020 13:26:04 +0000 Message-Id: <20200310132606.21372-3-michael.tremer@ipfire.org> In-Reply-To: <20200310132606.21372-1-michael.tremer@ipfire.org> References: <20200310132606.21372-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" In order to remove any duplicate files in the tarball, we have to unpack it again. The whole filesystem is written to disk twice which is unnecessary. This patch removes that temporary step and reduces IO during the build. Signed-off-by: Michael Tremer --- lfs/cdrom | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lfs/cdrom b/lfs/cdrom index b26db754b..836cae981 100644 --- a/lfs/cdrom +++ b/lfs/cdrom @@ -29,6 +29,9 @@ VER = ipfire THISAPP = cdrom TARGET = $(DIR_INFO)/$(THISAPP) +# Fail when there is an error in the tar pipe +SHELL=/bin/bash -o pipefail + ifeq "$(BUILD_PLATFORM)" "arm" TAR_OPTIONS = else @@ -147,7 +150,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # since stage2 has been executed.. echo "$(SYSTEM_RELEASE)" > /etc/system-release - rm -rf /install/cdrom /tmp/* + rm -rf /install/cdrom mkdir -p /install/cdrom/doc # Clear mtab (prevents .journal problems) @@ -158,18 +161,18 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) BUILDTARGET="$(BUILDTARGET)" BUILD_ARCH="$(BUILD_ARCH)" KVER="$(KVER)" \ $(DIR_SRC)/src/scripts/archive.files \ $(DIR_SRC)/config/rootfiles/common \ - > /tmp/ROOTFILES + > $(DIR_TMP)/ROOTFILES # Compress root filesystem # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES - tar -c --exclude='#*' --exclude='proc/*' --exclude='dev/pts/*' \ - --exclude='__pycache__' --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 - @mkdir /tmp/sys - cd /tmp && tar cf - * | xz $(XZ_OPT) > /install/cdrom/distro.img && rm -rf * + rm -rf $(DIR_TMP)/root && mkdir -p $(DIR_TMP)/root + tar -c --exclude='#*' --exclude='proc/*' --exclude='dev/pts/*' --exclude='tmp/*' \ + --exclude='__pycache__' \ + -C / --files-from=$(DIR_TMP)/ROOTFILES | tar -x -C $(DIR_TMP)/root + rm -f $(DIR_TMP)/ROOTFILES + mkdir $(DIR_TMP)/root/sys + cd $(DIR_TMP)/root && tar cf - * | xz $(XZ_OPT) > /install/cdrom/distro.img + rm -rf $(DIR_TMP)/root # Other files touch /install/cdrom/$(SNAME)-$(VERSION)-core$(CORE).media From patchwork Tue Mar 10 13:26:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2831 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48cG80124xz3yBQ for ; Tue, 10 Mar 2020 13:26:24 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48cG7x4CFdz247; Tue, 10 Mar 2020 13:26:21 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48cG7x2Q7kz2yTX; Tue, 10 Mar 2020 13:26:21 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48cG7v1Yccz2yxL for ; Tue, 10 Mar 2020 13:26:19 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48cG7t71kKz1nN; Tue, 10 Mar 2020 13:26:18 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1583846779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fW7PzpykPj0JqPVkBNRrQTcdYaA9Yr9iqjkgYJW/vkU=; b=sFm50fAGH57jCZiQkFMr7vzctsFYr5M8ADGWUNAKsauk97Msm3XvMbyAi3W02g28ro1bjW HCNPdJi7riKEBQCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1583846779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fW7PzpykPj0JqPVkBNRrQTcdYaA9Yr9iqjkgYJW/vkU=; b=Am845fxMFRl26pfx1yFuKDGlxjI5xxx2fxszOY6V6l8MD2tBa8udiTT0kei4Io+39Wczun lPiLe/Td2No9QcOhpJhunD+YwECEXdkEFv97vgdKnU1hMJJ46GfnWcn/bznZJ4e/cEuV5r ncIFC/c8ObTTpVLRb9ukMtWxPYMcpKnMTxx9s1vcOGgzifSvejlkbKAisv6SFIZRa79ybD 16IFIvQbCNe3x4zo4DyD3wfQ6lg0JSJPg+UHdU0lk6IeVyPxji/g9GLDfwsIhcIwKyZEyv jiUevC550mNpzVnw7bhKj0Fl2hHAI5ZtuSjIFdUT6Cr41NR3GX8cHa0vf0uGnw== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 3/4] cdrom+flash-image: Move all temporary files to /tmp Date: Tue, 10 Mar 2020 13:26:05 +0000 Message-Id: <20200310132606.21372-4-michael.tremer@ipfire.org> In-Reply-To: <20200310132606.21372-1-michael.tremer@ipfire.org> References: <20200310132606.21372-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Since /tmp is now a ramdisk, we move all temporary files into it. Signed-off-by: Michael Tremer --- lfs/cdrom | 71 +++++++++++++++++++++++++----------------------- lfs/flash-images | 8 +++--- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/lfs/cdrom b/lfs/cdrom index 836cae981..f18b80a03 100644 --- a/lfs/cdrom +++ b/lfs/cdrom @@ -150,8 +150,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) # since stage2 has been executed.. echo "$(SYSTEM_RELEASE)" > /etc/system-release - rm -rf /install/cdrom - mkdir -p /install/cdrom/doc + # Create a directory to authorise the CDROM in + rm -rf $(DIR_TMP)/cdrom && mkdir -p $(DIR_TMP)/cdrom # Clear mtab (prevents .journal problems) rm -vf /etc/mtab @@ -171,40 +171,43 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) -C / --files-from=$(DIR_TMP)/ROOTFILES | tar -x -C $(DIR_TMP)/root rm -f $(DIR_TMP)/ROOTFILES mkdir $(DIR_TMP)/root/sys - cd $(DIR_TMP)/root && tar cf - * | xz $(XZ_OPT) > /install/cdrom/distro.img + cd $(DIR_TMP)/root && tar cf - * | xz $(XZ_OPT) > $(DIR_TMP)/cdrom/distro.img rm -rf $(DIR_TMP)/root # Other files - touch /install/cdrom/$(SNAME)-$(VERSION)-core$(CORE).media - sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > /install/cdrom/README.txt - cp $(DIR_SRC)/doc/COPYING /install/cdrom/ - cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc + touch $(DIR_TMP)/cdrom/$(SNAME)-$(VERSION)-core$(CORE).media + sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > $(DIR_TMP)/cdrom/README.txt + cp $(DIR_SRC)/doc/COPYING $(DIR_TMP)/cdrom/ - mkdir -p /install/cdrom/boot/isolinux + # Install documentation + -mkdir -pv $(DIR_TMP)/cdrom/doc + cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} $(DIR_TMP)/cdrom/doc + + mkdir -p $(DIR_TMP)/cdrom/boot/isolinux ifeq "$(HAS_KERNEL)" "1" - cp /boot/vmlinuz-$(KVER)-ipfire /install/cdrom/boot/isolinux/vmlinuz - dracut --force --early-microcode -a "installer" --strip --xz /install/cdrom/boot/isolinux/instroot $(KVER)-ipfire + cp /boot/vmlinuz-$(KVER)-ipfire $(DIR_TMP)/cdrom/boot/isolinux/vmlinuz + dracut --force --early-microcode -a "installer" --strip --xz $(DIR_TMP)/cdrom/boot/isolinux/instroot $(KVER)-ipfire endif ifeq "$(HAS_ISOLINUX)" "1" - dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog - cp $(DIR_SRC)/config/syslinux/boot.png /install/cdrom/boot/isolinux/boot.png - cp /usr/share/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin - cp /usr/share/hwdata/pci.ids /install/cdrom/boot/isolinux/pci.ids - cp -vf /usr/share/syslinux/*.c32 /install/cdrom/boot/isolinux/ + dd if=/dev/zero bs=1k count=2 > $(DIR_TMP)/cdrom/boot/isolinux/boot.catalog + cp $(DIR_SRC)/config/syslinux/boot.png $(DIR_TMP)/cdrom/boot/isolinux/boot.png + cp /usr/share/syslinux/isolinux.bin $(DIR_TMP)/cdrom/boot/isolinux/isolinux.bin + cp /usr/share/hwdata/pci.ids $(DIR_TMP)/cdrom/boot/isolinux/pci.ids + cp -vf /usr/share/syslinux/*.c32 $(DIR_TMP)/cdrom/boot/isolinux/ sed -e "s/VERSION/$(VERSION) - Core $(CORE)/g" \ $(DIR_SRC)/config/syslinux/syslinux.cfg \ - > /install/cdrom/boot/isolinux/isolinux.cfg + > $(DIR_TMP)/cdrom/boot/isolinux/isolinux.cfg endif ifeq "$(HAS_MEMTEST)" "1" # Install memtest - cp /usr/lib/memtest86+/memtest.bin /install/cdrom/boot/isolinux/memtest + cp /usr/lib/memtest86+/memtest.bin $(DIR_TMP)/cdrom/boot/isolinux/memtest endif ifeq "$(HAS_IPXE)" "1" - cp /usr/share/ipfire-netboot/ipxe.lkrn /install/cdrom/boot/isolinux/netboot + cp /usr/share/ipfire-netboot/ipxe.lkrn $(DIR_TMP)/cdrom/boot/isolinux/netboot endif ifeq "$(EFI)" "1" @@ -213,43 +216,43 @@ ifeq "$(EFI)" "1" $(DIR_SRC)/config/cdrom/grub-efi.cfg > /tmp/grub-efi.cfg # Build a GRUB EFI image - mkdir -pv /install/cdrom/EFI/BOOT + mkdir -pv $(DIR_TMP)/cdrom/EFI/BOOT grub-mkimage \ --format=$(GRUB_ARCH)-efi \ - --output=/install/cdrom/EFI/BOOT/boot$(EFI_ARCH).efi \ - --config=/tmp/grub-efi.cfg \ + --output=$(DIR_TMP)/cdrom/EFI/BOOT/boot$(EFI_ARCH).efi \ + --config=$(DIR_TMP)/grub-efi.cfg \ --compression=xz \ --prefix=/EFI/BOOT \ $$(for mod in $(GRUB_EFI_MODULES); do [ -f "/usr/lib/grub/$(GRUB_ARCH)-efi/$${mod}.mod" ] && echo "$${mod}"; done) # Install GRUB configuration - mkdir -pv /install/cdrom/EFI/BOOT + mkdir -pv $(DIR_TMP)/cdrom/EFI/BOOT sed -e "s/NAME/$(NAME)/g" -e "s/VERSION/$(VERSION)/g" -e "s/ARCH/$(BUILD_ARCH)/g" \ - < $(DIR_SRC)/config/cdrom/grub.cfg > /install/cdrom/EFI/BOOT/grub.cfg + < $(DIR_SRC)/config/cdrom/grub.cfg > $(DIR_TMP)/cdrom/EFI/BOOT/grub.cfg # Create the EFI Eltorito image - dd if=/dev/zero of=/install/cdrom/boot/isolinux/efiboot.img bs=1k count=1440 - mkdosfs -F 12 -n "IPFIRE_EFI" /install/cdrom/boot/isolinux/efiboot.img + dd if=/dev/zero of=$(DIR_TMP)/cdrom/boot/isolinux/efiboot.img bs=1k count=1440 + mkdosfs -F 12 -n "IPFIRE_EFI" $(DIR_TMP)/cdrom/boot/isolinux/efiboot.img # Mount the EFI image - mkdir -pv /install/efiboot.img - mount -o loop /install/cdrom/boot/isolinux/efiboot.img /install/efiboot.img + mkdir -pv $(DIR_TMP)/efiboot.img + mount -o loop $(DIR_TMP)/cdrom/boot/isolinux/efiboot.img $(DIR_TMP)/efiboot.img # Copy the bootloader into the image - mkdir -pv /install/efiboot.img/EFI/BOOT - cp -a /install/cdrom/EFI/BOOT/boot$(EFI_ARCH).efi \ - /install/efiboot.img/EFI/BOOT/boot$(EFI_ARCH).efi + mkdir -p $(DIR_TMP)/efiboot.img/EFI/BOOT + cp -a $(DIR_TMP)/cdrom/EFI/BOOT/boot$(EFI_ARCH).efi \ + $(DIR_TMP)/efiboot.img/EFI/BOOT/boot$(EFI_ARCH).efi # Cleanup - umount /install/efiboot.img - rm -rf /install/efiboot.img /tmp/grub-efi.cfg + umount $(DIR_TMP)/efiboot.img + rm -rf $(DIR_TMP)/efiboot.img $(DIR_TMP)/grub-efi.cfg endif - cd /install/cdrom && find -type f ! -name md5sum.txt | grep -v "./boot" | \ + cd $(DIR_TMP)/cdrom && find -type f ! -name md5sum.txt | grep -v "./boot" | \ xargs md5sum > md5sum.txt mkdir -p /install/images - cd /install/cdrom && mkisofs $(ISO_ARGS) \ + cd $(DIR_TMP)/cdrom && mkisofs $(ISO_ARGS) \ -o /install/images/$(SNAME)-$(VERSION).$(BUILD_ARCH)-full-core$(CORE).iso . ifeq "$(HAS_ISOLINUX)" "1" diff --git a/lfs/flash-images b/lfs/flash-images index e4af896f1..422acac22 100644 --- a/lfs/flash-images +++ b/lfs/flash-images @@ -55,8 +55,8 @@ md5 : ############################################################################### # Installation Details ############################################################################### -MNThdd := /install/harddisk -IMG := /install/images/image.img +MNThdd := $(DIR_TMP)/harddisk +IMG := $(DIR_TMP)/image.img # All sizes in blocks ifeq "$(BUILD_PLATFORM)" "arm" @@ -152,9 +152,9 @@ endif # Install IPFire ifneq "$(BUILD_PLATFORM)" "arm" - tar -x --xz -C $(MNThdd)/ -f /install/cdrom/distro.img + tar -x --xz -C $(MNThdd)/ -f $(DIR_TMP)/cdrom/distro.img else - tar -x -C $(MNThdd)/ -f /install/cdrom/distro.img + tar -x -C $(MNThdd)/ -f $(DIR_TMP)/cdrom/distro.img endif -touch $(MNThdd)/lib/modules/$(KVER)-ipfire/modules.dep mkdir $(MNThdd)/proc From patchwork Tue Mar 10 13:26:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 2830 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 48cG7z4QBdz3yBf for ; Tue, 10 Mar 2020 13:26:23 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 48cG7x2KsNz23s; Tue, 10 Mar 2020 13:26:21 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 48cG7w70Kfz2xxQ; Tue, 10 Mar 2020 13:26:20 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 48cG7v2n8Dz2yxh for ; Tue, 10 Mar 2020 13:26:19 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 48cG7v1FHRz1pW; Tue, 10 Mar 2020 13:26:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1583846779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rk9ZD+PeEdrcpMa1aKGF0r/4znZlzwyC/fKWpGN55AQ=; b=Jih3Adgd3UxBfffZevnf9oXkflsbTK7lG5WFmzz/NjXrEMLFInxEiu/9WYFJw/AbU25gGb Y3CxSk0MVvKiVe5BqLM8xxImdJFTmirUKjvvWe0KjpZ/4fdYLKiJgmLm+V2lLZsD+0Wj0/ FWdtywSyQBipzoat95kBkuCXyIcKYy9v8iVr+G3CJPDLmlPa/VvmkYP8YDS7DzkRn1S9H9 nxZkvmSw3YpyEtvakM6gcREWozMpEEfkC3714evQXRd9ceKX7Q6wygfmgqJnQ2jl9GeagV 7sic/fcxLFiRXo+UElvuHVbMqlzKJagERSun5VeiQzVGCci1dbXgWntmMVJOPA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1583846779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rk9ZD+PeEdrcpMa1aKGF0r/4znZlzwyC/fKWpGN55AQ=; b=9Fb8DuOz0lLnnt8H6Ynq/jVtFatxCZFqhG6ILgnvvj7C3jMXkxS6wMrgBsx5y5Sqh0JqZj tpMPo6mK57MgXEDg== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 4/4] make.sh: Move ccache's temp directory into /tmp Date: Tue, 10 Mar 2020 13:26:06 +0000 Message-Id: <20200310132606.21372-5-michael.tremer@ipfire.org> In-Reply-To: <20200310132606.21372-1-michael.tremer@ipfire.org> References: <20200310132606.21372-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- make.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/make.sh b/make.sh index 188355a0d..9c88592da 100755 --- a/make.sh +++ b/make.sh @@ -504,6 +504,7 @@ prepareenv() { # Run LFS static binary creation scripts one by one export CCACHE_DIR=$BASEDIR/ccache + export CCACHE_TEMPDIR="/tmp" export CCACHE_COMPRESS=1 export CCACHE_COMPILERCHECK="string:toolchain-${TOOLCHAINVER} ${BUILD_ARCH}" @@ -575,6 +576,7 @@ enterchroot() { BUILD_ARCH="${BUILD_ARCH}" \ BUILD_PLATFORM="${BUILD_PLATFORM}" \ CCACHE_DIR=/usr/src/ccache \ + CCACHE_TEMPDIR="${CCACHE_TEMPDIR}" \ CCACHE_COMPRESS="${CCACHE_COMPRESS}" \ CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \ GOCACHE="/usr/src/ccache/go" \ @@ -658,6 +660,7 @@ lfsmake1() { cd $BASEDIR/lfs && env -i \ PATH="${TOOLS_DIR}/ccache/bin:${TOOLS_DIR}/bin:$PATH" \ CCACHE_DIR="${CCACHE_DIR}" \ + CCACHE_TEMPDIR="${CCACHE_TEMPDIR}" \ CCACHE_COMPRESS="${CCACHE_COMPRESS}" \ CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \ CFLAGS="${CFLAGS}" \