From patchwork Tue Jan 16 13:51:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 763143 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E798D1BDEB for ; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l6ZdvcDq" Received: by smtp.kernel.org (Postfix) with ESMTPS id 7E821C43390; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413118; bh=v581bSOdOyMpozQT9vj5G6J+25HR0DSQw4nzso23mjE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=l6ZdvcDqm9yojKiQPtlNgf1UJu6y3a4WoR4GeNWTFaywhNcCJXkHUimJP7KDkViub QYowyyGiQnaobHVrI+JC4VmTMsgSCIDvpefVvVeb9oTtX5ZRKTCH9DPraFGjXjRaq1 CgZIJtSw8eFLBoPMZIwErz+OR2eBhu4hk3U/2H9ytwzNyOLw5LNMgNFwBk7+cvO62g 6KuMsqrbNBhcAMXyoyj1ubKfaychEZoAKNfbB2Z9qGzNOcQf5MNtNGZrlbts9YxkAK ArzLj4yxLUKaOwiVdfPBSSe4/hzV6FRKmBgMpk/vOZy/jyp70mzaOCnrkh2fxHCPFh HKu04bj4UHkOA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 658D4C47DA2; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Tue, 16 Jan 2024 13:51:55 +0000 Subject: [PATCH BlueZ 01/10] build: remove unused AM_CONDITIONAL Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-autofoo-v1-1-626f6b54bd06@gmail.com> References: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> In-Reply-To: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413116; l=571; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=hH4p4F+DSfBor5eMwxN/Bc+wtZkc5eQ4tXjcGVPVcjs=; b=E5JrIt6fd61wpw7r69bcAqOtkrQCPq7kOdXJNP6pFSTJT0vUGQskOTDUYX7SOkqIiUFSSEWyS 1yqT6gixO4VBx5Y0iBeqBKCzz5yJlcpPRuAxzAGxMgBmV+HDwq70Chl X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 3e10ec970..307a2f30c 100644 --- a/configure.ac +++ b/configure.ac @@ -238,7 +238,6 @@ if (test "${enable_tools}" != "no" && test "${enable_udev}" != "no"); then AC_DEFINE(HAVE_UDEV_HWDB_NEW, 1, [Define to 1 if you have the udev_hwdb_new() function.])) fi -AM_CONDITIONAL(UDEV, test "${enable_udev}" != "no") AC_ARG_WITH([udevdir], AS_HELP_STRING([--with-udevdir=DIR], [path to udev directory]), [path_udevdir=${withval}]) From patchwork Tue Jan 16 13:51:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 764039 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E79E01BDED for ; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nn/m/g4q" Received: by smtp.kernel.org (Postfix) with ESMTPS id 86BA8C433B1; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413118; bh=v7O5hzNUNXVmaKklVJEFPYjg9TQY/N2p3/fzUWvgjUk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=nn/m/g4qPJRH/LFB6PB+Tz+PQEvj30q2lHr+sNYYYSF+5rlHbL9oqijNAb+KKDVFs 5ROQmYN6cGi14lxxspEiNK6saZoyzwVqP3a1mxBUmTPSe7/l1XH3OUYw3BoXTgXgci FxJXgZPpQiIB66KZ+8gdoXit37ipVkTRESWgSK3WvMOVQ9ueZ7eXiPwNeNsMtDd8aY SWEtcPyuE6pTUPKiZ9QrNGVY6L+Wq5tykh4k6MzwzEUuwmTmUHXLKXyXSeyUvFX0RL V8Yob4nPx8yx4PPiQkg0E2OlowYY7jHO/j8z7uE9FM7OpLC7eC49xKjQzEJEKD6UUA FlUEY7kYJlwEw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7104AC47DA6; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Tue, 16 Jan 2024 13:51:56 +0000 Subject: [PATCH BlueZ 02/10] build: tweak PKG_CHECK_MODULES calls Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-autofoo-v1-2-626f6b54bd06@gmail.com> References: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> In-Reply-To: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413116; l=5425; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=RW5Zf7nNK2DwOoLbGkq4IW19GMpKuijCPPAeggcVrpw=; b=6wlQkFWxx6x6fIC4BHAroYhs7X82ZDxKVtEQYfLhjJF4Xy7jGyQ5ePM0KokZRpKVe4qel/JaF 7Jl3fRtRceMBA+VVtSh43Tm2AgADmjxn92+BxS/9Yah0u0mgbVAfDQk X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov There's no need to call AC_SUBST after a PKG_CHECK_MODULES call, since the variables are always set. As an example: the produced Makefile.in and Makefile are identical before/after this change. Similarly, we don't need the "dummy=yes" and manual AC_MSG_ERROR() call - pkg-config (or pkgconf) will produce the same and in some cases better error messages. --- configure.ac | 59 ++++++++++++----------------------------------------------- 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/configure.ac b/configure.ac index 307a2f30c..7cbfa8846 100644 --- a/configure.ac +++ b/configure.ac @@ -72,23 +72,16 @@ AC_CHECK_LIB(dl, dlopen, dummy=yes, AC_CHECK_HEADERS(linux/types.h linux/if_alg.h linux/uinput.h linux/uhid.h sys/random.h) -PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes, - AC_MSG_ERROR(GLib >= 2.28 is required)) -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) +PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28) if (test "${enable_threads}" = "yes"); then AC_DEFINE(NEED_THREADS, 1, [Define if threading support is required]) - PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, - AC_MSG_ERROR(GThread >= 2.16 is required)) + PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16) GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" fi -PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.10, dummy=yes, - AC_MSG_ERROR(D-Bus >= 1.10 is required)) -AC_SUBST(DBUS_CFLAGS) -AC_SUBST(DBUS_LIBS) +PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.10) AC_ARG_WITH([dbusconfdir], AS_HELP_STRING([--with-dbusconfdir=DIR], [path to D-Bus configuration directory]), @@ -230,10 +223,7 @@ AM_CONDITIONAL(MONITOR, test "${enable_monitor}" != "no") AC_ARG_ENABLE(udev, AS_HELP_STRING([--disable-udev], [disable udev device support]), [enable_udev=${enableval}]) if (test "${enable_tools}" != "no" && test "${enable_udev}" != "no"); then - PKG_CHECK_MODULES(UDEV, libudev >= 172, dummy=yes, - AC_MSG_ERROR(libudev >= 172 is required)) - AC_SUBST(UDEV_CFLAGS) - AC_SUBST(UDEV_LIBS) + PKG_CHECK_MODULES(UDEV, libudev >= 172) AC_CHECK_LIB(udev, udev_hwdb_new, AC_DEFINE(HAVE_UDEV_HWDB_NEW, 1, [Define to 1 if you have the udev_hwdb_new() function.])) @@ -260,10 +250,7 @@ AC_ARG_ENABLE(mesh, AS_HELP_STRING([--enable-mesh], AM_CONDITIONAL(MESH, test "${enable_mesh}" = "yes") if (test "${enable_mesh}" = "yes"); then - PKG_CHECK_MODULES(JSONC, json-c >= 0.13, dummy=yes, - AC_MSG_ERROR(json-c >= 0.13 is required)) - AC_SUBST(JSON_CFLAGS) - AC_SUBST(JSON_LIBS) + PKG_CHECK_MODULES(JSONC, json-c >= 0.13) fi AC_ARG_ENABLE(midi, AS_HELP_STRING([--enable-midi], @@ -271,19 +258,13 @@ AC_ARG_ENABLE(midi, AS_HELP_STRING([--enable-midi], AM_CONDITIONAL(MIDI, test "${enable_midi}" = "yes") if (test "${enable_midi}" = "yes"); then - PKG_CHECK_MODULES(ALSA, alsa, dummy=yes, - AC_MSG_ERROR(ALSA lib is required for MIDI support)) - AC_SUBST(ALSA_CFLAGS) - AC_SUBST(ALSA_LIBS) + PKG_CHECK_MODULES(ALSA, alsa) fi AC_ARG_ENABLE(obex, AS_HELP_STRING([--disable-obex], [disable OBEX profile support]), [enable_obex=${enableval}]) if (test "${enable_obex}" != "no"); then - PKG_CHECK_MODULES(ICAL, libical, dummy=yes, - AC_MSG_ERROR(libical is required)) - AC_SUBST(ICAL_CFLAGS) - AC_SUBST(ICAL_LIBS) + PKG_CHECK_MODULES(ICAL, libical) fi AM_CONDITIONAL(OBEX, test "${enable_obex}" != "no") @@ -295,10 +276,7 @@ AC_ARG_ENABLE([external_ell], AS_HELP_STRING([--enable-external-ell], [enable external Embedded Linux library]), [enable_external_ell=${enableval}]) if (test "${enable_external_ell}" = "yes"); then - PKG_CHECK_MODULES(ELL, ell >= 0.39, dummy=yes, - AC_MSG_ERROR(Embedded Linux library >= 0.39 is required)) - AC_SUBST(ELL_CFLAGS) - AC_SUBST(ELL_LIBS) + PKG_CHECK_MODULES(ELL, ell >= 0.39) fi if (test "${enable_external_ell}" != "yes" && (test "${enable_btpclient}" = "yes" || test "${enable_mesh}" = "yes")); then @@ -442,17 +420,11 @@ AC_ARG_ENABLE(android, AS_HELP_STRING([--enable-android], AM_CONDITIONAL(ANDROID, test "${enable_android}" = "yes") if (test "${enable_android}" = "yes"); then - PKG_CHECK_MODULES(SBC, sbc >= 1.2, dummy=yes, - AC_MSG_ERROR(SBC library >= 1.2 is required)) - AC_SUBST(SBC_CFLAGS) - AC_SUBST(SBC_LIBS) + PKG_CHECK_MODULES(SBC, sbc >= 1.2) fi if (test "${enable_android}" = "yes"); then - PKG_CHECK_MODULES(SPEEXDSP, speexdsp >= 1.2, dummy=yes, - AC_MSG_ERROR(SPEEXDSP library >= 1.2 is required)) - AC_SUBST(SPEEXDSP_CFLAGS) - AC_SUBST(SPEEXDSP_LIBS) + PKG_CHECK_MODULES(SPEEXDSP, speexdsp >= 1.2) fi AC_DEFINE_UNQUOTED(ANDROID_STORAGEDIR, "${storagedir}/android", @@ -466,15 +438,8 @@ if (test -z "${plugin_phonebook}"); then fi if (test "${plugin_phonebook}" = "ebook"); then - PKG_CHECK_MODULES(LIBEBOOK, [libebook-1.2 >= 3.3], dummy=yes, - AC_MSG_ERROR(libebook >= 3.3 is required)) - AC_SUBST(LIBEBOOK_CFLAGS) - AC_SUBST(LIBEBOOK_LIBS) - PKG_CHECK_MODULES(LIBEDATESERVER, [libedataserver-1.2 >= 3.3], - dummy=yes, - AC_MSG_ERROR(libedataserver >= 3.3 is required)) - AC_SUBST(LIBEDATESERVER_CFLAGS) - AC_SUBST(LIBEDATESERVER_LIBS) + PKG_CHECK_MODULES(LIBEBOOK, libebook-1.2 >= 3.3) + PKG_CHECK_MODULES(LIBEDATESERVER, libedataserver-1.2 >= 3.3) fi AC_SUBST(PLUGIN_PHONEBOOK, [${plugin_phonebook}]) From patchwork Tue Jan 16 13:51:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 763142 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E79BB1BDEC for ; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QAlFGVoP" Received: by smtp.kernel.org (Postfix) with ESMTPS id 921BAC43142; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413118; bh=BIvkMvmnQ9fsJ3sZWb/mlyvl8YIRqyKWFVGxMtyq+1k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=QAlFGVoPydyVO2MRjdsZ9FTRU1Zl0JSAwaH3lbNuDNBCJtPLjnDQZwjHiN1XrBpin FvxbT34/v7MVrkr7AaGBx4QK9dfrZ1QKOl8FYwtlqyeRNcRRXws+V3ugdgAN/jsEXT K1uF9JLM/o7KFuyD0dNpNz+QhTipt7NygFYKykRlX5/TKsPyC1oMoEReVwbWtCF7rX Y+fgCZ5SwYgQwIEjj3axyI8RVqnT/QBFvAp8K1S3b4drksrzDp1gL76+CFQdL8FVLe Es29x3xv+Yg6k2Gf1Fb1o8amfgQXPTl9ZatjLaseTn8l4RQjGtMwqkGenhL7dVVDhp 0kLtsxxEnRY7w== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D725C4707C; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Tue, 16 Jan 2024 13:51:57 +0000 Subject: [PATCH BlueZ 03/10] build: require libudev 196, circa 2012 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-autofoo-v1-3-626f6b54bd06@gmail.com> References: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> In-Reply-To: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413116; l=1719; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=nLN3WkSkihgDvnnZcl9Nn8E9C8mCNtO7PTdfVC6NKvk=; b=YhnaU6pHuWBl7qCgjNDL+pYfKSio1h1hEIve69poO8V3sYNxhxfgxRQ3HX6WzopevuWXHjhyJ 4X7OmlNRc1+AackBXGIVs/XYXPAK3YNz4b07JGFjBeN+dpJzbPQ6uLh X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov libudev 196 (systemd really) was released back in 2012, which introduces the hwdb API. Bump the requirement, since even long retired distributions like Debian oldold stable (aka Buster) include newer versions. --- configure.ac | 6 ++---- monitor/hwdb.c | 2 +- src/oui.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 7cbfa8846..cab5da581 100644 --- a/configure.ac +++ b/configure.ac @@ -223,10 +223,8 @@ AM_CONDITIONAL(MONITOR, test "${enable_monitor}" != "no") AC_ARG_ENABLE(udev, AS_HELP_STRING([--disable-udev], [disable udev device support]), [enable_udev=${enableval}]) if (test "${enable_tools}" != "no" && test "${enable_udev}" != "no"); then - PKG_CHECK_MODULES(UDEV, libudev >= 172) - AC_CHECK_LIB(udev, udev_hwdb_new, - AC_DEFINE(HAVE_UDEV_HWDB_NEW, 1, - [Define to 1 if you have the udev_hwdb_new() function.])) + PKG_CHECK_MODULES(UDEV, libudev >= 196) + AC_DEFINE(HAVE_UDEV, 1, [Define to 1 if udev is required]) fi AC_ARG_WITH([udevdir], AS_HELP_STRING([--with-udevdir=DIR], diff --git a/monitor/hwdb.c b/monitor/hwdb.c index 22de9edfb..6c0d052bb 100644 --- a/monitor/hwdb.c +++ b/monitor/hwdb.c @@ -19,7 +19,7 @@ #include "hwdb.h" -#ifdef HAVE_UDEV_HWDB_NEW +#ifdef HAVE_UDEV #include bool hwdb_get_vendor_model(const char *modalias, char **vendor, char **model) diff --git a/src/oui.c b/src/oui.c index c434f416f..7b3040fb0 100644 --- a/src/oui.c +++ b/src/oui.c @@ -16,7 +16,7 @@ #include "lib/bluetooth.h" #include "oui.h" -#ifdef HAVE_UDEV_HWDB_NEW +#ifdef HAVE_UDEV #include char *batocomp(const bdaddr_t *ba) From patchwork Tue Jan 16 13:51:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 764037 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EAC21BF22 for ; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l2poX1+1" Received: by smtp.kernel.org (Postfix) with ESMTPS id 97F35C433A6; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413118; bh=ZUiUk2GFPMUsiFqT8IBmALQGVVZxpBQhiXl+gWzi+Fc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=l2poX1+1KvP12Z0W5qUgXNe/fKpIea4SVTNpYjysPltAGAJ6bNg3zjE90qIR0O61J xjJG/B8LHh07AD0/3/13khUfYIX13Qxbfy6pbnmTDoLHZbNg2IiSVnRzTLTC9LyPkz Nbln2/m9qU93Jt/O6oCc8wfZxjDKg2HPXflBpuycGUf3a/PBSfTkeAXkhq7i6rd+QF kSEyVZRVCZpzdHHqknkso/Nr/jkwPj5YLRif4vCxmKtazwgxkpK3PWXhR9I010um5u /3tR2BHFU6XqphBkwkIB/4rKKdqc4Y/zFVclbn/fCBiWgMrqYpok8RIL3Dr9RUQWYt GQfR3q8qNkgeA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88794C47DA9; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Tue, 16 Jan 2024 13:51:58 +0000 Subject: [PATCH BlueZ 04/10] build: remove dummy {conf,state}{dir,_DATA} Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-autofoo-v1-4-626f6b54bd06@gmail.com> References: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> In-Reply-To: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413116; l=1330; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=Q7TCSQ+lTvESiDlf6GOyquny1w/mZRux7BcOUrFyJvw=; b=zs56xedLr7+3P9GVPhMkEbqsSEm7QL/Q4Kpgf8Qzj3WFC+8RBHORpib/q5pJKGYtdK7PmuODy hBTjQ2t+zOzAIof2UuaVXZf+ViPYKlmDFtMhLMhoxpUb7wpjNUOEY80 X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov The project does not install anything in the respective confdir and statedir(s). Since no files are installed, the respective folders are not created either - systemd will create them prior to starting the service(s). The *dir variables themselves are no longer used in *service.in, so remove everything. --- Makefile.am | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index e738eb3a5..16d6bf160 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,15 +28,9 @@ AM_CFLAGS = $(MISC_CFLAGS) $(WARNING_CFLAGS) $(UDEV_CFLAGS) $(LIBEBOOK_CFLAGS) \ $(LIBEDATASERVER_CFLAGS) $(ell_cflags) AM_LDFLAGS = $(MISC_LDFLAGS) -confdir = $(sysconfdir)/bluetooth -statedir = $(localstatedir)/lib/bluetooth - if DATAFILES dbusdir = $(DBUS_CONFDIR)/dbus-1/system.d dbus_DATA = src/bluetooth.conf - -conf_DATA = -state_DATA = endif if SYSTEMD @@ -747,9 +741,7 @@ MAINTAINERCLEANFILES = Makefile.in \ SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ $(SED) -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \ - -e 's,@libexecdir\@,$(libexecdir),g' \ - -e 's,@statedir\@,$(statedir),g' \ - -e 's,@confdir\@,$(confdir),g' \ + -e 's,@libexecdir\@,$(libexecdir),g' < $< > $@ if RUN_RST2MAN From patchwork Tue Jan 16 13:51:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 763139 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 449A41BF26 for ; Tue, 16 Jan 2024 13:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ox0XJKeJ" Received: by smtp.kernel.org (Postfix) with ESMTPS id A3ADCC43143; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413118; bh=xIKRvutDfGrk64nQV8LGv/L07p9HoubFZiadhFozn28=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Ox0XJKeJ+JDZa5Xsf7sKW3nYPx2cCBlctJCD7/gm8TcqB+EE6U00QlsnZjhXoTwUW Aj5Fo+u1kupiSsg63+ASgk+qUqeBLR7savFCQ9IRA3NVLjLkU0IbNCAjYc6YF8iX2q 1iRFoje1bnO9CWtXgMkz5rLLbLoCdHskdJ1Acy1R8oiAm8b7Cgy6xD/E77LNfNSh+M T6i0uFqi4fHxq0Q6ftZ5VDguoAXZ6jGR9ppKQEPS9t1yda7IrdbRULJWE0V3wZNeKW cTp3sJcuYBxEUQ7bXtZvo9q4N642QHLUIesvosfGkScRSsTPsgK1GYczc9Y3Uzr11C uGSn3AcO0LayQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91634C47DAC; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Tue, 16 Jan 2024 13:51:59 +0000 Subject: [PATCH BlueZ 05/10] build: remove unused variable builtin_nodist Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-autofoo-v1-5-626f6b54bd06@gmail.com> References: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> In-Reply-To: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413116; l=721; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=1rROEGp9NOWMlEicl4MnpoSQNRD9hD+pCI8aDd5Iw2Y=; b=6jtaeZ6PO/Q9YbEwDcmhoxjfYFo0I1NkXk0OaOcsnq4hzzT1mYAgRHMErs2ozaGoGUvadEUbF /OQSpMQba1kCv9RFKEWeiuhh3tfrzReStoPvq40JPvAWx+1Zl4sGwyf X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov --- Makefile.am | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 16d6bf160..564f1b935 100644 --- a/Makefile.am +++ b/Makefile.am @@ -282,7 +282,6 @@ gobex_sources = gobex/gobex.h gobex/gobex.c \ builtin_modules = builtin_sources = builtin_cppflags = -builtin_nodist = builtin_ldadd = include Makefile.plugins @@ -344,7 +343,7 @@ src_bluetoothd_CPPFLAGS = $(AM_CPPFLAGS) -DBLUETOOTH_PLUGIN_BUILTIN \ $(BACKTRACE_CFLAGS) $(builtin_cppflags) src_bluetoothd_SHORTNAME = bluetoothd -builtin_files = src/builtin.h $(builtin_nodist) +builtin_files = src/builtin.h nodist_src_bluetoothd_SOURCES = $(builtin_files) From patchwork Tue Jan 16 13:52:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 763140 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FE781BDFB for ; Tue, 16 Jan 2024 13:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ApJLJNf7" Received: by smtp.kernel.org (Postfix) with ESMTPS id AADF5C43601; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413118; bh=oSBR49ZYtm2Ne2TBfdgcT8bcfRYNWoBxVia8FYQ10Ko=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=ApJLJNf70bDvQUBBSE9L3bzkeRo1FiTUMqLrcR4fmkqNRKJ5TUETtlsl85tYvy1RS Cws14670FSLv3zM5kaBPxnmbcJohlFcWJUWvswqnSnm3EP3FJme2fmmzvyHpHNmpIG jGdEwpZwCCUr4/4VVQS2qmkjSXSM0Wd+pE4NWRbOd0xGj+Sx7mBNpwPXK25pByLZfP 7QyDlz4DkGNinOY6Q6+xnA8drjHHfug+yPQEFRbdDrq4zIkWlZ8Ue3LIvLAFuP6osJ XZCVpAzzau2k1igxdhFx0xDpl/lR861tlp255970iLNHfe9wBRW+WStE8bEFN0NrI7 fQE3LUHYV8PkQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A943C47077; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Tue, 16 Jan 2024 13:52:00 +0000 Subject: [PATCH BlueZ 06/10] build: remove .service files from DEPENDENCIES lists Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-autofoo-v1-6-626f6b54bd06@gmail.com> References: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> In-Reply-To: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413116; l=2006; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=DuGow5VEhfCAdhkTLDcYWkDA2anwlvRVmTKY2spMLAs=; b=stau6M2z0zUkfJnG32fvib7RtUs/Yv5GMyHxHncOVRZfCsBmsh+ZWsHzw9RgzVOwzMXdNPUdO 1HvJeDY9c4xChBWIW/Q/ihAfLhuhk+irWPPRMByJGQwYFJE3ZTS3cxz X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov The DEPENDENCES lists are for binary objects, while the service files are required by systemd (et al) after the install stage. The services files are referenced by _DATA, so the service.in -> service conversion can happen then. --- Makefile.am | 3 +-- Makefile.mesh | 3 +-- Makefile.tools | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 564f1b935..2be214631 100644 --- a/Makefile.am +++ b/Makefile.am @@ -335,8 +335,7 @@ src_bluetoothd_LDFLAGS = $(AM_LDFLAGS) -Wl,--export-dynamic \ src_bluetoothd_DEPENDENCIES = lib/libbluetooth-internal.la \ gdbus/libgdbus-internal.la \ - src/libshared-glib.la \ - src/bluetooth.service + src/libshared-glib.la src_bluetoothd_CPPFLAGS = $(AM_CPPFLAGS) -DBLUETOOTH_PLUGIN_BUILTIN \ -DPLUGINDIR=\""$(build_plugindir)"\" \ diff --git a/Makefile.mesh b/Makefile.mesh index 63f085de1..a66e47442 100644 --- a/Makefile.mesh +++ b/Makefile.mesh @@ -45,8 +45,7 @@ mesh/main.$(OBJEXT): src/builtin.h lib/bluetooth/bluetooth.h mesh_bluetooth_meshd_SOURCES = $(mesh_sources) mesh/main.c mesh_bluetooth_meshd_LDADD = src/libshared-ell.la $(ell_ldadd) -ljson-c -mesh_bluetooth_meshd_DEPENDENCIES = $(ell_dependencies) src/libshared-ell.la \ - mesh/bluetooth-mesh.service +mesh_bluetooth_meshd_DEPENDENCIES = $(ell_dependencies) src/libshared-ell.la if MANPAGES man_MANS += mesh/bluetooth-meshd.8 diff --git a/Makefile.tools b/Makefile.tools index e541084e9..6fda3f51d 100644 --- a/Makefile.tools +++ b/Makefile.tools @@ -71,8 +71,7 @@ pkglibexec_PROGRAMS += tools/btmon-logger tools_btmon_logger_SOURCES = tools/btmon-logger.c tools_btmon_logger_LDADD = src/libshared-mainloop.la -tools_btmon_logger_DEPENDENCIES = src/libshared-mainloop.la \ - tools/bluetooth-logger.service +tools_btmon_logger_DEPENDENCIES = src/libshared-mainloop.la if SYSTEMD systemdsystemunit_DATA += tools/bluetooth-logger.service From patchwork Tue Jan 16 13:52:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 764036 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4348F1BF25 for ; Tue, 16 Jan 2024 13:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="La4mUWC4" Received: by smtp.kernel.org (Postfix) with ESMTPS id B2FBAC4166A; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413118; bh=UCRr7mExKULPEhuMSeVm/SL6b5yFc2e+yH0Met1qPRQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=La4mUWC4cM9nIlTdXdzo0nttJ3WlXRdZ26ELs8MH8I0leJk1AH9nxwzkIOL8hsKGw MDOYJ7MVqitELaDrUdEAaKr7oTgDRx+dbqKJ/ZiGMMcEv9qtyOdQXg6qMaay07x0s+ jsj72o6pn0VoerDeGpkPLf9tfX5X1JRWWy4XCV2y6rc/rMtsmxe+5/6MuwdWYOAA/D d5KGAjD620WQrC0CdZFUEdM5+gEgksJPMSgotTuG/xXWS5Lt6wwSrj1FSd5zA7+rOR K6XFWxjH4/DTnQ/TgAjJ2ThUVEuutU/bESSe+4/FBXmiO2o5p4yt1s6XkH/z8Dn3kV WQ3Ihvy/4KVag== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4A51C47DA6; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Tue, 16 Jan 2024 13:52:01 +0000 Subject: [PATCH BlueZ 07/10] build: remove explicit DEPENDENCIES handling Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-autofoo-v1-7-626f6b54bd06@gmail.com> References: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> In-Reply-To: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413116; l=3024; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=gNLYCa6gQWMALTDx8zted1MgMRNVmkqOD1MZVczYw+8=; b=owCAWh6QAAMYL8ZcPObqTFrWy2kTp/oylq5lR8F/UIC2kNOB1RwhvFzRt8z3JrGIjtTtFcyGF YWLj5gEVEY7BbusNWW0ZJwyK/C9plSRVyiIUN4YlvTWw8EUueUNrck1 X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov We currently duplicate the DEPENDENCIES handling that autotools does for us. We have two types of objects - libraries or generated headers. Former are part of the LDADD, the latter in BUILT_SOURCES. --- Makefile.am | 7 ------- Makefile.mesh | 1 - Makefile.tools | 2 -- 3 files changed, 10 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2be214631..6007f9eb7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -77,7 +77,6 @@ lib_LTLIBRARIES += lib/libbluetooth.la lib_libbluetooth_la_SOURCES = $(lib_headers) $(lib_sources) lib_libbluetooth_la_LDFLAGS = $(AM_LDFLAGS) -version-info 22:12:19 -lib_libbluetooth_la_DEPENDENCIES = $(local_headers) endif noinst_LTLIBRARIES += lib/libbluetooth-internal.la @@ -94,12 +93,10 @@ gdbus_libgdbus_internal_la_SOURCES = gdbus/gdbus.h \ if EXTERNAL_ELL ell_cflags = @ELL_CFLAGS@ ell_ldadd = @ELL_LIBS@ -ell_dependencies = ell_built_sources = ell/shared else ell_cflags = ell_ldadd = ell/libell-internal.la -ell_dependencies = $(ell_ldadd) ell_built_sources = ell/shared ell/internal ell/ell.h noinst_LTLIBRARIES += ell/libell-internal.la @@ -333,10 +330,6 @@ src_bluetoothd_LDADD = lib/libbluetooth-internal.la \ src_bluetoothd_LDFLAGS = $(AM_LDFLAGS) -Wl,--export-dynamic \ -Wl,--version-script=$(srcdir)/src/bluetooth.ver -src_bluetoothd_DEPENDENCIES = lib/libbluetooth-internal.la \ - gdbus/libgdbus-internal.la \ - src/libshared-glib.la - src_bluetoothd_CPPFLAGS = $(AM_CPPFLAGS) -DBLUETOOTH_PLUGIN_BUILTIN \ -DPLUGINDIR=\""$(build_plugindir)"\" \ $(BACKTRACE_CFLAGS) $(builtin_cppflags) diff --git a/Makefile.mesh b/Makefile.mesh index a66e47442..45fa90339 100644 --- a/Makefile.mesh +++ b/Makefile.mesh @@ -45,7 +45,6 @@ mesh/main.$(OBJEXT): src/builtin.h lib/bluetooth/bluetooth.h mesh_bluetooth_meshd_SOURCES = $(mesh_sources) mesh/main.c mesh_bluetooth_meshd_LDADD = src/libshared-ell.la $(ell_ldadd) -ljson-c -mesh_bluetooth_meshd_DEPENDENCIES = $(ell_dependencies) src/libshared-ell.la if MANPAGES man_MANS += mesh/bluetooth-meshd.8 diff --git a/Makefile.tools b/Makefile.tools index 6fda3f51d..1cde39f94 100644 --- a/Makefile.tools +++ b/Makefile.tools @@ -71,7 +71,6 @@ pkglibexec_PROGRAMS += tools/btmon-logger tools_btmon_logger_SOURCES = tools/btmon-logger.c tools_btmon_logger_LDADD = src/libshared-mainloop.la -tools_btmon_logger_DEPENDENCIES = src/libshared-mainloop.la if SYSTEMD systemdsystemunit_DATA += tools/bluetooth-logger.service @@ -577,7 +576,6 @@ noinst_PROGRAMS += tools/btpclient tools/btpclientctl tools_btpclient_SOURCES = tools/btpclient.c src/shared/btp.c src/shared/btp.h tools_btpclient_LDADD = lib/libbluetooth-internal.la \ src/libshared-ell.la $(ell_ldadd) -tools_btpclient_DEPENDENCIES = lib/libbluetooth-internal.la $(ell_dependencies) tools/btpclient.$(OBJEXT): src/libshared-ell.la ell/internal tools_btpclientctl_SOURCES = tools/btpclientctl.c client/display.c From patchwork Tue Jan 16 13:52:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 763141 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E9481BDFA for ; Tue, 16 Jan 2024 13:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oYx3IjcR" Received: by smtp.kernel.org (Postfix) with ESMTPS id C0869C4166B; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413118; bh=NrMeV1DY7y6YbbZnhADgIrw/iDntZOgYxe4lPF8AWnU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=oYx3IjcRkqL5upN5QGXG1+AHnbOo9ht0ZfM7asW32IBWo5HkOvv9v/bwrb9AZGCGP emEyxj6QAStxFf1/1TXPjMDFOE/5vOkL22PQ7EYnvOfKKQbjEa9E0kd5G+kE2tG2lA 7MsI8ZkN5e3Hm9cZVaZhx99ePzsbMHKognFgD/AAKRMR3Cn9p5IYD/9e+uoNVwnVDb N6TChPF1ExKNrPPNA4yWlnzGHlYhYGct/8Et6DxUaMb636VeJ7d4cOsi0/siRhx9rs T9sBIL18DCz9F8oS2TX1788K/uEDcJbbKn0iwRkdyGfwFKmSoMHsgTC7MFiIsWFn9e BgHPbtiHiCi7Q== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B050CC47DA2; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Tue, 16 Jan 2024 13:52:02 +0000 Subject: [PATCH BlueZ 08/10] build: manage .service.in files via configure.ac Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-autofoo-v1-8-626f6b54bd06@gmail.com> References: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> In-Reply-To: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413116; l=6063; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=G7E9Qvp7mze6RyBm9kJgLYkN1NaERQCWTsgqpWktqpU=; b=j7ohvHMhVq+7otGGqMtR+WZALKbj8/vKKTt9TPOaj/HcYNqhlE3epKUXkwa8ZzniQAP8XqiMe 7LFRroTITX7B9hy2OinyxfnUfrNsDiMI2Avs8tIPDB+ds3CVhRq3D1H X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov Considering we do basic substitution, we don't need to manually sed, track dependencies, dist nor clean. Just add the files to AC_CONFIG_FILES() call it a day - it does everything for us. --- Makefile.am | 12 ++---------- Makefile.mesh | 5 +---- Makefile.obexd | 4 ++-- Makefile.tools | 3 --- configure.ac | 11 ++++++++++- mesh/bluetooth-mesh.service.in | 2 +- obexd/src/obex.service.in | 2 +- src/bluetooth.service.in | 2 +- tools/bluetooth-logger.service.in | 2 +- 9 files changed, 19 insertions(+), 24 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6007f9eb7..9bb27c911 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,7 +41,7 @@ dbussystembusdir = $(DBUS_SYSTEMBUSDIR) dbussystembus_DATA = src/org.bluez.service endif -EXTRA_DIST += src/bluetooth.service.in src/org.bluez.service +EXTRA_DIST += src/org.bluez.service plugindir = $(libdir)/bluetooth/plugins @@ -339,7 +339,7 @@ builtin_files = src/builtin.h nodist_src_bluetoothd_SOURCES = $(builtin_files) -CLEANFILES += $(builtin_files) src/bluetooth.service +CLEANFILES += $(builtin_files) if MANPAGES man_MANS += src/bluetoothd.8 @@ -730,11 +730,6 @@ MAINTAINERCLEANFILES = Makefile.in \ aclocal.m4 configure config.h.in config.sub config.guess \ ltmain.sh depcomp compile missing install-sh mkinstalldirs test-driver -SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ - $(SED) -e 's,@pkglibexecdir\@,$(pkglibexecdir),g' \ - -e 's,@libexecdir\@,$(libexecdir),g' - < $< > $@ - if RUN_RST2MAN RST2MAN_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ $(RST2MAN) --strict --no-raw \ @@ -744,9 +739,6 @@ RST2MAN_PROCESS = $(AM_V_GEN)test -f $@ || \ { echo "Generated manual page $@ does not exist"; false; } endif -%.service: %.service.in Makefile - $(SED_PROCESS) - %.1: %.rst Makefile $(RST2MAN_PROCESS) diff --git a/Makefile.mesh b/Makefile.mesh index 45fa90339..ea50383d2 100644 --- a/Makefile.mesh +++ b/Makefile.mesh @@ -51,9 +51,6 @@ man_MANS += mesh/bluetooth-meshd.8 endif manual_pages += mesh/bluetooth-meshd.8 -CLEANFILES += mesh/bluetooth-mesh.service - endif -EXTRA_DIST += mesh/bluetooth-mesh.conf mesh/bluetooth-mesh.service.in \ - mesh/org.bluez.mesh.service mesh/mesh-main.conf +EXTRA_DIST += mesh/bluetooth-mesh.conf mesh/org.bluez.mesh.service mesh/mesh-main.conf diff --git a/Makefile.obexd b/Makefile.obexd index 5d1a4ff65..c2b5c6d7a 100644 --- a/Makefile.obexd +++ b/Makefile.obexd @@ -7,7 +7,7 @@ dbussessionbusdir = $(DBUS_SESSIONBUSDIR) dbussessionbus_DATA = obexd/src/org.bluez.obex.service endif -EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service +EXTRA_DIST += obexd/src/org.bluez.obex.service if OBEX @@ -112,6 +112,6 @@ obexd/src/builtin.h: obexd/src/genbuiltin $(obexd_builtin_sources) $(AM_V_at)$(MKDIR_P) $(dir $@) $(AM_V_GEN)$(srcdir)/obexd/src/genbuiltin $(obexd_builtin_modules) > $@ -CLEANFILES += obexd/src/builtin.h $(builtin_files) obexd/src/obex.service +CLEANFILES += obexd/src/builtin.h EXTRA_DIST += obexd/src/genbuiltin diff --git a/Makefile.tools b/Makefile.tools index 1cde39f94..044342e29 100644 --- a/Makefile.tools +++ b/Makefile.tools @@ -77,9 +77,6 @@ systemdsystemunit_DATA += tools/bluetooth-logger.service endif endif -CLEANFILES += tools/bluetooth-logger.service -EXTRA_DIST += tools/bluetooth-logger.service.in - if TESTING noinst_PROGRAMS += emulator/btvirt emulator/b1ee emulator/hfp \ peripheral/btsensor tools/3dsp \ diff --git a/configure.ac b/configure.ac index cab5da581..b4d362494 100644 --- a/configure.ac +++ b/configure.ac @@ -441,5 +441,14 @@ if (test "${plugin_phonebook}" = "ebook"); then fi AC_SUBST(PLUGIN_PHONEBOOK, [${plugin_phonebook}]) -AC_CONFIG_FILES(Makefile src/bluetoothd.rst lib/bluez.pc mesh/bluetooth-meshd.rst) +AC_CONFIG_FILES( + lib/bluez.pc + Makefile + mesh/bluetooth-meshd.rst + mesh/bluetooth-mesh.service + obexd/src/obex.service + src/bluetoothd.rst + src/bluetooth.service + tools/bluetooth-logger.service +) AC_OUTPUT diff --git a/mesh/bluetooth-mesh.service.in b/mesh/bluetooth-mesh.service.in index c8afbf53e..9c3ff01a3 100644 --- a/mesh/bluetooth-mesh.service.in +++ b/mesh/bluetooth-mesh.service.in @@ -5,7 +5,7 @@ ConditionPathIsDirectory=/sys/class/bluetooth [Service] Type=dbus BusName=org.bluez.mesh -ExecStart=@pkglibexecdir@/bluetooth-meshd +ExecStart=@exec_prefix@/bluetooth/bluetooth-meshd NotifyAccess=main LimitNPROC=1 ProtectHome=true diff --git a/obexd/src/obex.service.in b/obexd/src/obex.service.in index fc0dce993..03d09a679 100644 --- a/obexd/src/obex.service.in +++ b/obexd/src/obex.service.in @@ -4,7 +4,7 @@ Description=Bluetooth OBEX service [Service] Type=dbus BusName=org.bluez.obex -ExecStart=@pkglibexecdir@/obexd +ExecStart=@exec_prefix@/bluetooth/obexd [Install] Alias=dbus-org.bluez.obex.service diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in index beb98ce0c..63e157587 100644 --- a/src/bluetooth.service.in +++ b/src/bluetooth.service.in @@ -6,7 +6,7 @@ ConditionPathIsDirectory=/sys/class/bluetooth [Service] Type=dbus BusName=org.bluez -ExecStart=@pkglibexecdir@/bluetoothd +ExecStart=@exec_prefix@/bluetooth/bluetoothd NotifyAccess=main #WatchdogSec=10 #Restart=on-failure diff --git a/tools/bluetooth-logger.service.in b/tools/bluetooth-logger.service.in index 009002731..5657c8d84 100644 --- a/tools/bluetooth-logger.service.in +++ b/tools/bluetooth-logger.service.in @@ -4,7 +4,7 @@ ConditionPathIsDirectory=/sys/class/bluetooth [Service] Type=simple -ExecStart=@pkglibexecdir@/btmon-logger -p -b /var/log/bluetooth/hci.log +ExecStart=@exec_prefix@/bluetooth/btmon-logger -p -b /var/log/bluetooth/hci.log NotifyAccess=main CapabilityBoundingSet=CAP_NET_RAW LimitNPROC=1 From patchwork Tue Jan 16 13:52:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 764035 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 407B61BF23 for ; Tue, 16 Jan 2024 13:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="katrSkco" Received: by smtp.kernel.org (Postfix) with ESMTPS id CC043C4166C; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413118; bh=LY6HxNa1Rb7kL6kWsoMm88OVVfL0zYKMiI+DT18wXSc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=katrSkcoNG8CGfQKRT44TKIUfkOAFQCGTGExOjcZL/HDwceICFA7Ftj88a9juTUZh pbTSd/XF2RwRcraxJFs8A8jitjomn1Wa+WSrT7ym4OZLYerdMztx9YcPlNDde7ak+Z nTsLlsHnDund4Oreme17yL1MBqgofgfF/xmfMytxMQF8YbaYwG6hi/c+l0qASjZTrE UWDXsI8hA8tCK5K7IfUJjjunVuCWzyT4aJFP9jgMWzv8ERHuYUsrOqpR5otEAZvT0O pVNsul2143Jjq4Nmg+GuMFAO1F2u94M1ldNKb4Qqz87Y4ctExBjtPFQDCgdv4DihBb qlWuX5GdkI2kw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9FB8C4707C; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Tue, 16 Jan 2024 13:52:03 +0000 Subject: [PATCH BlueZ 09/10] build: enable gc/dead code removal Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-autofoo-v1-9-626f6b54bd06@gmail.com> References: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> In-Reply-To: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413116; l=776; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=tXVcdUfXETqQpcM+wIkv5sahEbGpnPS14+ukiFkfzcc=; b=YJpXGBb1WaXwi5eDQsIi0UBhNBBbCzabSiP2A+Ct6xRvyDikxhZReDeIqGsTqS3CZMg822lFX hzIFEZpe69ZBwYlIena8ier+Ae0HsGw5DkNWFGE3L+rUCBKisSKUy+G X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov Currently, there's plenty of unused code in most binaries. Enable -fdata/function-sections, which allows the linker garbage collection to do its job. On a maintainer build, this reduces the (unstriped) binaries from 117 to 114MiB. --- acinclude.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/acinclude.m4 b/acinclude.m4 index c5d6de7b3..4b73a5bfc 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -134,6 +134,8 @@ AC_DEFUN([MISC_FLAGS], [ misc_cflags="$misc_cflags --coverage" misc_ldflags="$misc_ldflags --coverage" fi + misc_cflags="$misc_cflags -ffunction-sections -fdata-sections" + misc_ldflags="$misc_ldflags -Wl,--gc-sections" AC_SUBST([MISC_CFLAGS], $misc_cflags) AC_SUBST([MISC_LDFLAGS], $misc_ldflags) ]) From patchwork Tue Jan 16 13:52:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov via B4 Relay X-Patchwork-Id: 763138 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41ED31BF24 for ; Tue, 16 Jan 2024 13:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DyddiC5+" Received: by smtp.kernel.org (Postfix) with ESMTPS id D3018C433C7; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705413118; bh=mt/cAQdRVMGpUk5mi/AqEYZMGwI2MZPm2Ce6zyWCPO4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=DyddiC5+g5NoxlXF12dRRJvzHHVzoMXMMBtX+X5iMU9/pBDM+nTdAy6d+sSTwcM41 c37b6dl8/IEkKh+D/wQQwh8unPfLUCAVfc5f6DldH1ue4UUTLJHdN9fsja7wr/RSL7 hfcqri3MM9/UHyxo4bHnnlYI6g/l/Kyg4VxduuVaaQHkSg5Rv4X3iyUXn04gknYgRG We9UNbNomk0g4hSL6EfwnmZ4qEmx1SSQSMzwYtROStnum4jhHrLRVIJxRO/zDn2w80 2jnZSvSZloIFO6zKLbJQqw/2KVhEMwbZB3V/EFY9v0ZEa1nWRIswnh+YHxWv6G52Rd G6fq96WAMkTRw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3B67C47DA9; Tue, 16 Jan 2024 13:51:58 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Tue, 16 Jan 2024 13:52:04 +0000 Subject: [PATCH BlueZ 10/10] build: install dbus-org.bluez.obex.service symlink Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-autofoo-v1-10-626f6b54bd06@gmail.com> References: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> In-Reply-To: <20240116-autofoo-v1-0-626f6b54bd06@gmail.com> To: linux-bluetooth@vger.kernel.org Cc: Emil Velikov X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1705413116; l=1158; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=fbR9nv2+W1T7EdTJDnrPWv8eu5ZYYznbyAyGjdmqMMc=; b=lntGRy6vfw67/RdyRn1wKOmw5nySnByTOkfOJaLCbTRo4gN+JWUSU6NuaI4j3n8Tnb8BkPHeT +K8fPKrZ3NgAtdzq5O18S9R0GPvQImUsVDZ/ACYA5LenKGiZcCRy69f X-Developer-Key: i=emil.l.velikov@gmail.com; a=ed25519; pk=qeUTVTNyI3rcR2CfNNWsloTihgzmtbZo98GdxwZKCkY= X-Endpoint-Received: by B4 Relay for emil.l.velikov@gmail.com/20230301 with auth_id=35 X-Original-From: Emil Velikov Reply-To: From: Emil Velikov obex.service has an alias(dbus-org.bluez.obex.service) which is created as it's enabled. At the same time, the dbus service references the alias itself. Thus the dbus socket activation can happen, only when the service is already enabled/running... Which defeats the whole purpose. Create/install the respective symlink/alias, so that any user looking for the dbus will start it. Note: we need a hook here instead of LN_S to create the in-tree file, since `install' aggressively dereferences it. --- Makefile.obexd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile.obexd b/Makefile.obexd index c2b5c6d7a..363295d0e 100644 --- a/Makefile.obexd +++ b/Makefile.obexd @@ -3,6 +3,12 @@ if SYSTEMD systemduserunitdir = $(SYSTEMD_USERUNITDIR) systemduserunit_DATA = obexd/src/obex.service +install-data-hook: + $(LN_S) -f obex.service $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service + +uninstall-hook: + rm -f $(DESTDIR)$(SYSTEMD_USERUNITDIR)/dbus-org.bluez.obex.service + dbussessionbusdir = $(DBUS_SESSIONBUSDIR) dbussessionbus_DATA = obexd/src/org.bluez.obex.service endif