From patchwork Tue Dec 11 09:21:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Titouan Christophe X-Patchwork-Id: 1010913 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=railnova.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=railnova-eu.20150623.gappssmtp.com header.i=@railnova-eu.20150623.gappssmtp.com header.b="fJL/oAxs"; 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 43DZFk47yzz9s4s for ; Tue, 11 Dec 2018 20:21:45 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6492A22721; Tue, 11 Dec 2018 09:21:41 +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 cHhD0BjY58OI; Tue, 11 Dec 2018 09:21:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 0E86E22643; Tue, 11 Dec 2018 09:21:39 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E1C4D1C2006 for ; Tue, 11 Dec 2018 09:21:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DF92C81CCA for ; Tue, 11 Dec 2018 09:21:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 29XzFGvhrwF5 for ; Tue, 11 Dec 2018 09:21:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by hemlock.osuosl.org (Postfix) with ESMTPS id 9F13281BA0 for ; Tue, 11 Dec 2018 09:21:35 +0000 (UTC) Received: by mail-ed1-f49.google.com with SMTP id p6so11928533eds.0 for ; Tue, 11 Dec 2018 01:21:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=railnova-eu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kk2c/rDhI7WJmEoCUMf1EAg2rKzmPXasGS70rohlG+g=; b=fJL/oAxsnt7L3XMJyMPicgnSfYMSUUHw19zaPO9pwkH+hQVn2JUiVWx5bgw5oF+/8Q yRMkc+Cz3aL38JS9NP8UX6DVJgknRnxFNj68oGfpbXAPoW00uF4By2hkchB925lyAof4 b32sRzmXE/56XU9FK68Xrz9xasdjjeps8DLwtSBLaSZRUjRFMZUhBmt8e9AkoI/GlqG8 HG1yndOWoV41wXzcxeVtsF9kZaAtZJF7cpJf5NRv05eQn4IGS12B2c6Yy/1MSNbmHgef BiVbMYzfWUP77pS+fA8O/0A4XAuyJWxQB+sq8eBriAGLa6zJfbmQFflSQI9KhSO3NhSs NMow== 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:mime-version :content-transfer-encoding; bh=kk2c/rDhI7WJmEoCUMf1EAg2rKzmPXasGS70rohlG+g=; b=WrxCZLwkLan6t8st1Wqey7EGfQ+7UeGwFrjd0X10R03A8Dtp+GvOLvNGoH3WLuiBu8 lKEnDEqiA9h8WMGt9UJkRVcnBVnmIoY2GzCZkIjelxS3aP9KBwUSTm8u6FDBWaslbqfn aYzdJRaoiclnWOaNOOLijY60zXD5t3iec5wI1U4VUTif1HieOlzfKCkAB05pYaQjau63 DvAHAZBPuCAAirwIz40B2ZHfSZhrKeXrmXRWSFNfSFNNYNiW8amD5gTpoDZR2KqiLGCM PuraQvYn6kKWXikR5pI24Mij9gUZ7isonrhFhhDvxekLIbc8F5wu+VEtwVMWf+p5d+WE r5mw== X-Gm-Message-State: AA+aEWbJIrjlFq+yv1a1j+manAZUCaDSqSSFl72d69L6iLU5y2T4i0Mx fncQJmsATVzNIv4OWEUtIr8wmD6afpOXy2ll X-Google-Smtp-Source: AFSGD/W4Zto5gwimZkb8HRMflCymV0XprREQ2GzUqxxKqTmqgsfeFGrmM1mDRsuQK3GhVMtnbWNPyQ== X-Received: by 2002:a17:906:a44:: with SMTP id x4-v6mr11900644ejf.177.1544520093745; Tue, 11 Dec 2018 01:21:33 -0800 (PST) Received: from taurus.fritz.box (213.219.144.89.adsl.dyn.edpnet.net. [213.219.144.89]) by smtp.gmail.com with ESMTPSA id n22-v6sm2160031ejk.75.2018.12.11.01.21.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Dec 2018 01:21:32 -0800 (PST) From: Titouan Christophe To: buildroot@buildroot.org Date: Tue, 11 Dec 2018 10:21:06 +0100 Message-Id: <20181211092107.23800-1-titouan.christophe@railnova.eu> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [Buildroot] [v3] package/mosquitto: installing the mosquitto broker can be optional 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: Peter Korsgaard , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The mosquitto package provides both the MQTT client library and a broker, and the latter may be not needed (when connecting to a remote broker). It should be therefore possible to not install and start it on the target Signed-off-by: Titouan Christophe --- Changes v1->v2: * Remove a useless patch to modify mosquitto's Makefile * Change the setting name from BR2_PACKAGE_MOSQUITTO_INSTALL_BROKER to BR2_PACKAGE_MOSQUITTO_BROKER * Don't create a mosquitto user Changes v2-> v3: * Require BR2_USE_MMU only for the broker * However there seems to be no real world example of (!MMU && STATIC_LIBS) in buildroot at the moment * Remove the dependency on BR2_TOOLCHAIN_HAS_SYNC_4, tested on: * br-m68k-5208-full.config [SKIPPED] * br-m68k-68040-full.config [OK] * br-sparc-uclibc.config [OK] * br-sparc-uclibc.config [OK] * Fix missing quotes around a variable in make invocation --- package/mosquitto/Config.in | 15 +++++++++++---- package/mosquitto/mosquitto.mk | 13 ++++++++++--- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/package/mosquitto/Config.in b/package/mosquitto/Config.in index 1e6418a4de..82bb83a8f4 100644 --- a/package/mosquitto/Config.in +++ b/package/mosquitto/Config.in @@ -1,7 +1,5 @@ config BR2_PACKAGE_MOSQUITTO bool "mosquitto" - depends on BR2_USE_MMU # fork() - depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on !BR2_STATIC_LIBS # builds .so help Mosquitto is an open source message broker that implements @@ -15,6 +13,15 @@ config BR2_PACKAGE_MOSQUITTO http://mosquitto.org/ comment "mosquitto needs a toolchain w/ dynamic library" - depends on BR2_USE_MMU - depends on BR2_TOOLCHAIN_HAS_SYNC_4 depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_MOSQUITTO_BROKER + bool "install the mosquitto broker" + default y + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_MOSQUITTO + help + Build and install the mosquitto broker onto target. + +comment "the mosquitto broker needs a system with MMU" + depends on !BR2_USE_MMU \ No newline at end of file diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk index fcce0535cb..fd36d4452e 100644 --- a/package/mosquitto/mosquitto.mk +++ b/package/mosquitto/mosquitto.mk @@ -67,24 +67,30 @@ endef MOSQUITTO_POST_PATCH_HOOKS += MOSQUITTO_DISABLE_CPP endif +MOSQUITTO_MAKE_DIRS = lib client +ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER),y) + MOSQUITTO_MAKE_DIRS += src +endif + define MOSQUITTO_BUILD_CMDS - $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DIRS="$(MOSQUITTO_MAKE_DIRS)" \ $(MOSQUITTO_MAKE_OPTS) endef define MOSQUITTO_INSTALL_STAGING_CMDS - $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DIRS="$(MOSQUITTO_MAKE_DIRS)" \ $(MOSQUITTO_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install endef define MOSQUITTO_INSTALL_TARGET_CMDS - $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) DIRS="$(MOSQUITTO_MAKE_DIRS)" \ $(MOSQUITTO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install rm -f $(TARGET_DIR)/etc/mosquitto/*.example $(INSTALL) -D -m 0644 $(@D)/mosquitto.conf \ $(TARGET_DIR)/etc/mosquitto/mosquitto.conf endef +ifeq ($(BR2_PACKAGE_MOSQUITTO_BROKER),y) define MOSQUITTO_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 package/mosquitto/S50mosquitto \ $(TARGET_DIR)/etc/init.d/S50mosquitto @@ -101,5 +107,6 @@ endef define MOSQUITTO_USERS mosquitto -1 nogroup -1 * - - - Mosquitto user endef +endif $(eval $(generic-package))