From patchwork Fri Feb 15 22:02:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 1043220 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Tlg/l8+K"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 441S1p5nKZz9s3l for ; Sat, 16 Feb 2019 09:03:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E2A1D2154A; Fri, 15 Feb 2019 22:03:08 +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 cIsI8IGvLcIO; Fri, 15 Feb 2019 22:03:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 1A5D521FAC; Fri, 15 Feb 2019 22:03:07 +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 40EC41BF973 for ; Fri, 15 Feb 2019 22:03:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3DDE62154A for ; Fri, 15 Feb 2019 22:03: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 UhbgIEWhx79C for ; Fri, 15 Feb 2019 22:03:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by silver.osuosl.org (Postfix) with ESMTPS id 7F8F722661 for ; Fri, 15 Feb 2019 22:03:04 +0000 (UTC) Received: by mail-ed1-f67.google.com with SMTP id f2so9067730edy.13 for ; Fri, 15 Feb 2019 14:03:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=E7ObWesiwEpxOa0hZRA1gjCkF4laD7qq2bMjoQ/D7zc=; b=Tlg/l8+K0tfv1vmSW2KGzSvVK9GBmTTPCm3VKUBRfFG8c29Y5u2XS0rxemfTbDyChX IHK/ryGM5kqNVwV+DghZ8NWQ0efG1vQHHDT+TylqDc7+OoTw8B8maPPLIYaRXtkWZx8L iegLr1NS4bwyWlawGhe8GlX13v8+cc8Sp+0DqFOvCBG2BJQeO4wbfmRv3EnOjHAnLRvx qnUKpc0BB6Cas7hMvbx03sJHRXU7cJVaUcQRfjU0A14Rruo01ePG0CVbnMQfl2G17teK J3u6Tu30pZzRBEONeBBFbUPN0/W+6tdFV0r0HWNq8CijKVmTO56fvpOTk3QYpxBwRfZl aStg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=E7ObWesiwEpxOa0hZRA1gjCkF4laD7qq2bMjoQ/D7zc=; b=FdO7qmp55FWmdAqCMr9Wnf5TpQBbaAgj+HnWAsIqPXdh9VieVDgz7olD9IL0Pzjdp2 ZW6DW41d0I54qfdZRFnsNTv7EU2yfP1rcO9GT+9WM1DW9LvribimEVwj9T7bb4IlrD9+ 7Ibd6X+W7vJw3SrNl8JlxLDTrBlluYOwpTRYofNIc4BDtgAXLU1Yk1mR3Fq+qiJuYYTr ST0UuoHYsyEAJis/37vd9DZWtfTHuBak2dHPD6F0g3qGZwUGD5AY//X1u50/O3Aow2wF FNcU00FRkmtcqENu2arwSJrk9ebBhbFtjYo4cfj0AbB0vCjR3C7aZc/bt3gSfNmJRILj NsYQ== X-Gm-Message-State: AHQUAub+gXHQ9TmDUpc/D5br11mqPhhyHXyJOut/JDcHYNPJsjEPNb4p OojjXjy3baM4m0m3R0VwMzVUs9c5 X-Google-Smtp-Source: AHgI3IY2iMsaR9Q31cpc38HrU92KS0OZhKN/gLVIN07B20AQrnQCVC4VYcsaVPK7N9OVtpzPcf4CUg== X-Received: by 2002:a50:be44:: with SMTP id b4mr9202833edi.41.1550268182750; Fri, 15 Feb 2019 14:03:02 -0800 (PST) Received: from localhost.localdomain ([37.162.56.132]) by smtp.gmail.com with ESMTPSA id k14sm693560edb.51.2019.02.15.14.03.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Feb 2019 14:03:02 -0800 (PST) From: Angelo Compagnucci X-Google-Original-From: Angelo Compagnucci To: buildroot@buildroot.org Date: Fri, 15 Feb 2019 23:02:57 +0100 Message-Id: <20190215220257.12430-1-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH] package/openssh: adding a way to install only sftp-server X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch adds a way to install only sftp-server in case it is needed by other packages (like dropbear) or a full openssh installation is not needed. Signed-off-by: Angelo Compagnucci --- package/openssh/Config.in | 9 +++++++++ package/openssh/openssh.mk | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/package/openssh/Config.in b/package/openssh/Config.in index 683a9c0e51..ba0dc62f83 100644 --- a/package/openssh/Config.in +++ b/package/openssh/Config.in @@ -9,3 +9,12 @@ config BR2_PACKAGE_OPENSSH friends. http://www.openssh.com/ + +if BR2_PACKAGE_OPENSSH + +config BR2_PACKAGE_OPENSSH_SFTP_ONLY + bool "install only sftp" + help + Install only sftp binary (ex: dropbear sftp support) + +endif diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk index 4fef5caedb..bfd93845d9 100644 --- a/package/openssh/openssh.mk +++ b/package/openssh/openssh.mk @@ -88,4 +88,14 @@ endef OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_SSH_COPY_ID +ifeq ($(BR2_PACKAGE_OPENSSH_SFTP_ONLY),y) +define OPENSSH_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/sftp-server \ + $(TARGET_DIR)/usr/libexec/sftp-server +endef +undefine OPENSSH_INSTALL_INIT_SYSTEMD +undefine OPENSSH_INSTALL_INIT_SYSV +undefine OPENSSH_POST_INSTALL_TARGET_HOOKS +endif + $(eval $(autotools-package))