From patchwork Sun Jun 12 21:55:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 634263 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rSVCs4W6vz9snl for ; Mon, 13 Jun 2016 07:58:33 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=on/l1EfC; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 25F0C2E195; Sun, 12 Jun 2016 21:58:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uvXbmtHSSI38; Sun, 12 Jun 2016 21:58:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id C0B2E2E8E6; Sun, 12 Jun 2016 21:57:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 06D7F1C120C for ; Sun, 12 Jun 2016 21:56:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EE2BF2E721 for ; Sun, 12 Jun 2016 21:56:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id S6YSAs0sCH-J for ; Sun, 12 Jun 2016 21:56:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by silver.osuosl.org (Postfix) with ESMTPS id B92B12EB79 for ; Sun, 12 Jun 2016 21:55:47 +0000 (UTC) Received: by mail-wm0-f67.google.com with SMTP id m124so10698307wme.3 for ; Sun, 12 Jun 2016 14:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=i9uuawmX/hD0wIYOBADJilqXDy0FNcTR1UhHNPnTGGM=; b=on/l1EfCTqBcf4HAuV2JuCqIDf2uvIMyzsrJkHP6urrL+Mrqpw77V0ZD90D4mUoTtn iklcM/5tUwI7MAshT7HZ273/+57Q4NHISmbsU5YHpmFz/n6LlLz8zttsyWlKLq0NOfek UztHT47R1Ch/jY7yHD6VJ6oh1/cF1JoxaX7Z8QD83bnwnLJwUETmlbLlzOE1rz+EAtHz a0RmIpcu3mYoSqH8nOMfUy7GFh+nqnG36+sQABXE5SqYtxhodJYf+vPkl+vj11Bd4Bjt EqyJYj2FCCyhh42ZWT/q0t8/VQxNQUngaUgzKscdPD2qXCleizTveAKMlziQS+cETwhk dX0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=i9uuawmX/hD0wIYOBADJilqXDy0FNcTR1UhHNPnTGGM=; b=fFgqlBYt+rp+Ri8ktsiNoWY0o2vkua8CI7waH0wC8hVf/LiwPOsvPY7BmK/Jz5T/uS PGo5Rbi7urX94VJMcONu5DZgfdy93EUNEpe+9tYOLX22fpUD4R086MP2eQv81EdMciMo cEqQvky/yUL/D/qDbvi5uhL7zS5KSkwmNwzkUNeLTVjLS8oxKeEjljB/3Sqyl3+69AAX 5Uky05iHcQNB1Mk9g2FMqbJPXYt21H9wFteo0IUfEHdT36T8JNYUCAaF5idoG4JJW9qe ZXKFbBuR5NoUo78sLDp46MOO4Z9dP5L35voz2phGh3iw3U6iDbNvkfJdjbiXS0ld8ldN UssA== X-Gm-Message-State: ALyK8tIe1DTbRQJh0/CoZ6qZ8qFOkejdXmnPgCMA67MTMrgpIhYRkX34Lt18i0pfcQ8Pqw== X-Received: by 10.194.175.36 with SMTP id bx4mr11127294wjc.35.1465768546398; Sun, 12 Jun 2016 14:55:46 -0700 (PDT) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id e133sm10954151wma.6.2016.06.12.14.55.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Jun 2016 14:55:45 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sun, 12 Jun 2016 23:55:18 +0200 Message-Id: <174817d7ac2784b29de4f67f4f51ff7e16b76ccd.1465766789.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: Cc: "Yann E. MORIN" Subject: [Buildroot] [PATCH 13/24] package/skeleton: add macro to rsync skeleton directory 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The rsync command is currently called from a single location. In follow-up patches, it will be called from various places now. It will be easier to update and fix this command if it is defined in a single location, rather than if duplicated in many places. Define a macro that skeleton packages can call to install their skeleton directories. Since at least one occurence of it wants to install in staging, the macro must accept a destination path, rather than hard-code target as the destination. Signed-off-by: "Yann E. MORIN" --- package/skeleton/skeleton.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk index 072d217..e3ae694 100644 --- a/package/skeleton/skeleton.mk +++ b/package/skeleton/skeleton.mk @@ -62,6 +62,14 @@ SKELETON_PATH = system/skeleton endif # ! custom skeleton +# This function rsyncs the skeleton directory in $(1) to the destination +# in $(2), which should be either $(TARTGET_DIR) or $(STAGING_DIR) +define SKELETON_RSYNC + rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \ + --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \ + $(1)/ $(2)/ +endef + # This function handles the merged or non-merged /usr cases ifeq ($(BR2_ROOTFS_MERGED_USR),y) define SKELETON_USR_SYMLINKS_OR_DIRS @@ -86,9 +94,7 @@ SKELETON_LIB_SYMLINK = lib32 endif define SKELETON_INSTALL_TARGET_CMDS - rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \ - --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \ - $(SKELETON_PATH)/ $(TARGET_DIR)/ + $(call SKELETON_RSYNC,$(SKELETON_PATH),$(TARGET_DIR)) $(call SKELETON_USR_SYMLINKS_OR_DIRS,$(TARGET_DIR)) ln -snf lib $(TARGET_DIR)/$(SKELETON_LIB_SYMLINK) ln -snf lib $(TARGET_DIR)/usr/$(SKELETON_LIB_SYMLINK)