From patchwork Fri Nov 21 16:19:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_Mart=C3=ADnez?= X-Patchwork-Id: 413112 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 96BC7140186 for ; Sat, 22 Nov 2014 03:21:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C225BA45E3; Fri, 21 Nov 2014 16:21:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Posh44caZtld; Fri, 21 Nov 2014 16:21:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 304D9A45F9; Fri, 21 Nov 2014 16:21:04 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5855D1C257C for ; Fri, 21 Nov 2014 16:21:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5464690C0F for ; Fri, 21 Nov 2014 16:21:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wfIaoAceZD6B for ; Fri, 21 Nov 2014 16:21:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qg0-f45.google.com (mail-qg0-f45.google.com [209.85.192.45]) by whitealder.osuosl.org (Postfix) with ESMTPS id B46B690FEF for ; Fri, 21 Nov 2014 16:21:01 +0000 (UTC) Received: by mail-qg0-f45.google.com with SMTP id f51so3900366qge.32 for ; Fri, 21 Nov 2014 08:21:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=bUUEHQKZb6iHZCsXArwslxiBj5zRU2KhV/zGa5c44eg=; b=D+lI77qQ4lNDTVB221LvyEMBudkWbhRirrVhfpa+gTAMKXa9wJdHMKqtoVfU/mqCKu gsnNOI9ZuzC435LP7UaBth7HdRbPm2yV+6IbRBDqx9RkFAzhamvyj0TvZh1HiIQqOjkk N1fZFr1YvOVCBAZwfwkqJWSmAXm4WnH9fVnku8ItPZzXzcm4TjF//x5JBP0tCVjHxinn iM9GNIZHzmUOTvz0S1dk/JlFGsQ4imLZ5z6rjMfpU/v4GeFc6OrTinB7yRcIiUtgk5rZ eOdUQAB/chZ9ZpS9TGIQSM9duOKFH3jeOctcLovU0LEkANDkozje0L2WESm0c9Oasmtk JPDg== X-Gm-Message-State: ALoCoQmQag7ziVE2Kg8OrUlU+E373WR+P4pSy18508e+tGXSMYRZs/WFotltZRcRPOFmqMFZWPCe X-Received: by 10.224.138.2 with SMTP id y2mr7810741qat.52.1416586855385; Fri, 21 Nov 2014 08:20:55 -0800 (PST) Received: from localhost (host150.181-14-218.telecom.net.ar. [181.14.218.150]) by mx.google.com with ESMTPSA id p67sm5012357qga.26.2014.11.21.08.20.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Nov 2014 08:20:54 -0800 (PST) From: =?UTF-8?q?Guido=20Mart=C3=ADnez?= To: buildroot@busybox.net Date: Fri, 21 Nov 2014 13:19:08 -0300 Message-Id: <1416586748-12936-10-git-send-email-guido@vanguardiasur.com.ar> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1416586748-12936-1-git-send-email-guido@vanguardiasur.com.ar> References: <1416586748-12936-1-git-send-email-guido@vanguardiasur.com.ar> MIME-Version: 1.0 Cc: Thomas Petazzoni , "Yann E. MORIN" Subject: [Buildroot] [PATCH v4 9/9] fs/iso9660: use install instead of cp X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This way we don't depend on the permissions of files under boot/ or fs/, which aren't tracked. While we're at it, change all 'cp' usages into 'install' with the correct mode for each file. Signed-off-by: Guido Martínez --- fs/iso9660/iso9660.mk | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk index 908f0e9..5b44ba4 100644 --- a/fs/iso9660/iso9660.mk +++ b/fs/iso9660/iso9660.mk @@ -14,20 +14,22 @@ ROOTFS_ISO9660_DEPENDENCIES = grub host-cdrkit host-fakeroot linux rootfs-cpio $(BINARIES_DIR)/rootfs.iso9660: $(ROOTFS_ISO9660_DEPENDENCIES) @$(call MESSAGE,"Generating root filesystem image rootfs.iso9660") - mkdir -p $(ISO9660_TARGET_DIR) - mkdir -p $(ISO9660_TARGET_DIR)/boot/grub - cp $(GRUB_DIR)/stage2/stage2_eltorito $(ISO9660_TARGET_DIR)/boot/grub/ - cp $(ISO9660_BOOT_MENU) $(ISO9660_TARGET_DIR)/boot/grub/menu.lst + $(INSTALL) -D -m 0644 $(GRUB_DIR)/stage2/stage2_eltorito \ + $(ISO9660_TARGET_DIR)/boot/grub/stage2_eltorito + $(INSTALL) -D -m 0644 $(ISO9660_BOOT_MENU) \ + $(ISO9660_TARGET_DIR)/boot/grub/menu.lst ifeq ($(BR2_TARGET_GRUB_SPLASH),) $(SED) '/^splashimage/d' $(ISO9660_TARGET_DIR)/boot/grub/menu.lst else - cp boot/grub/splash.xpm.gz $(ISO9660_TARGET_DIR)/ + $(INSTALL) -D -m 0644 boot/grub/splash.xpm.gz \ + $(ISO9660_TARGET_DIR)/splash.xpm.gz endif - cp $(LINUX_IMAGE_PATH) $(ISO9660_TARGET_DIR)/kernel + $(INSTALL) -D -m 0644 $(LINUX_IMAGE_PATH) $(ISO9660_TARGET_DIR)/kernel ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) $(SED) '/initrd/d' $(ISO9660_TARGET_DIR)/boot/grub/menu.lst else - cp $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) $(ISO9660_TARGET_DIR)/initrd + $(INSTALL) -D -m 0644 $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \ + $(ISO9660_TARGET_DIR)/initrd endif # Use fakeroot to pretend all target binaries are owned by root rm -f $(FAKEROOT_SCRIPT)