From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 86F2C1393F1 for ; Mon, 14 Sep 2015 05:25:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA02321C03D; Mon, 14 Sep 2015 05:25:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 519E321C03D for ; Mon, 14 Sep 2015 05:25:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 20B8834087F for ; Mon, 14 Sep 2015 05:25:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 55B10178 for ; Mon, 14 Sep 2015 05:25:29 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <1442208604.cd2eb679f30ce189d8951f8f8982538e3fa9eb1d.blueness@gentoo> Subject: [gentoo-commits] proj/grss:master commit in: grs/ X-VCS-Repository: proj/grss X-VCS-Files: grs/ISOIt.py X-VCS-Directories: grs/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: cd2eb679f30ce189d8951f8f8982538e3fa9eb1d X-VCS-Branch: master Date: Mon, 14 Sep 2015 05:25:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 61db5770-6603-43f5-990d-a819f82ae7db X-Archives-Hash: e3d6a86ef8ff9010ecb2aa64346270d6 commit: cd2eb679f30ce189d8951f8f8982538e3fa9eb1d Author: Anthony G. Basile gentoo org> AuthorDate: Mon Sep 14 05:30:04 2015 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Mon Sep 14 05:30:04 2015 +0000 URL: https://gitweb.gentoo.org/proj/grss.git/commit/?id=cd2eb679 grs/ISOIt.py: fix build of busybox. grs/ISOIt.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/grs/ISOIt.py b/grs/ISOIt.py index 7db86d3..dcf05fe 100644 --- a/grs/ISOIt.py +++ b/grs/ISOIt.py @@ -45,6 +45,7 @@ class ISOIt(HashIt): # Paths to where we'll build busybox and the initramfs. busybox_root = os.path.join(self.tmpdir, 'busybox') busybox_path = os.path.join(busybox_root, 'bin/busybox') + makeprofile_path = os.path.join(busybox_root, 'etc/portage/make.profile') savedconfig_dir = os.path.join(busybox_root, 'etc/portage/savedconfig/sys-apps') savedconfig_path = os.path.join(savedconfig_dir, 'busybox') busybox_config = os.path.join(self.libdir, 'scripts/busybox-config') @@ -52,11 +53,13 @@ class ISOIt(HashIt): # Remove any old busybox build directory and prepare new one. shutil.rmtree(busybox_root, ignore_errors=True) os.makedirs(savedconfig_dir, mode=0o755, exist_ok=True) - shutil.copyfile(busybox_config, savedconfig_path) + shutil.copy(busybox_config, savedconfig_path) # Emerge busybox. + os.symlink('/usr/portage/profiles/hardened/linux/amd64', makeprofile_path) cmd = 'emerge --nodeps -1q busybox' - emerge_env = { 'USE' : '-* savedconfig', 'ROOT' : busybox_root } + emerge_env = { 'USE' : '-* savedconfig', 'ROOT' : busybox_root, + 'PORTAGE_CONFIGROOT' : busybox_root } Execute(cmd, timeout=600, extra_env=emerge_env, logfile=self.logfile) # Remove any old initramfs root and prepare a new one. @@ -71,10 +74,12 @@ class ISOIt(HashIt): # Copy the static busybox to the initramfs root. # TODO: we are assuming a static busybox, so we should check. busybox_initramfs_path = os.path.join(initramfs_root, 'bin/busybox') - shutil.copyfile(busybox_path, busybox_initramfs_path) + shutil.copy(busybox_path, busybox_initramfs_path) os.chmod(busybox_initramfs_path, 0o0755) cmd = 'chroot %s /bin/busybox --install -s' % initramfs_root Execute(cmd, timeout=60, logfile=self.logfile) + + # Copy the init script to the initramfs root. initscript_path = os.path.join(self.libdir, 'scripts/initramfs-init') init_initramfs_path = os.path.join(initramfs_root, 'init') shutil.copy(initscript_path, init_initramfs_path) @@ -126,8 +131,8 @@ class ISOIt(HashIt): cmd = 'emerge --nodeps -1q grub:0' emerge_env = { 'USE' : '-* savedconfig', 'ROOT' : grub_root } Execute(cmd, timeout=600, extra_env=emerge_env, logfile=self.logfile) - shutil.copyfile(eltorito_path, isogrub_dir) - shutil.copyfile(menulst_path, isogrub_dir) + shutil.copy(eltorito_path, isogrub_dir) + shutil.copy(menulst_path, isogrub_dir) # 5. create the iso image args = '-R ' # Rock Ridge protocol