Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2663970rdb; Mon, 12 Feb 2024 12:04:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVX+8rdE3RvszNVdoeVGQhoTv0rYL+B2MZe60DdBeiwX3/4Kk2CtQr0tbEHikz9FU5z/fMX45NfzgC9aJ7ucXN5+zWiLygkY/HJQtXnrw== X-Google-Smtp-Source: AGHT+IF63V/5PBXCu/rU8RsDkQyXqP0CyX90uc1oUHXs0apmlXwmzupf6zKDX6nRTfMXZoeuPAMB X-Received: by 2002:a17:90b:3754:b0:296:89e3:ab7 with SMTP id ne20-20020a17090b375400b0029689e30ab7mr4851674pjb.7.1707768250172; Mon, 12 Feb 2024 12:04:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707768250; cv=pass; d=google.com; s=arc-20160816; b=I5TOoc/+lOgcdQPNV0UW0CC0V+jMVe0f5iU4pyVkLulEOwObM1OFMy7wI3QRHxYCSg VLUFHsRbpuhmFwsO5Y6jXUPgRSIbgd9CdJz9O/neD1AXC3Ff+PcgJLkhKLWJ3CTWp55v bdy1SLi3OsQWKJNPbR5u/jsK3B0ns/oL9QA72YYMzfEHX4BLo+RBWQ5pNBw29ygSjYiJ xR0sJe2eZg4CGNLz/uPU0ZNzf7fqd617Q01aItjRyQFisMB5c53xCqeHMxomjdf5fJKV qy8QP+5fCIeSdesMFFaQQJxOeSa3kJLV5+zIDwFlnAW2TkEGeO0/KTN9GY1rIvycSoKL OUwA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=av2LJdxojUrY+yQxR+xd4lw3wtnhtjCmzDVAok1+btU=; fh=AEolCGddNs60t9Bw4K/IzJqTDStvcBBTcRRfhTs3lUc=; b=HLKVtI9dHlZQUWkBkDuH8a+n2A8kKBXdH1sIALgp2AFyvgQ8+PE4aGy81Uyh9boU0l K/swcOXY2lwJ2L2lX5fCHX/XEVKQ2nH7bfbz3NjBei3zFviDvlRg3pCth11pmH+DEFAt xRK+gaTuS0upTZAi+f+HtctEjK+zrdto6edmJF5Lg/0n0RTONZTGKbGAuZtJC+hapA65 y46GabLaW0/aSMgW3NtPv4+Ye6fM3nwuyrM5UbZl1ogrcfHyMK4B/hNUtDqMofoVknpO Pf3Q+WJC2XURu8GWJ8QoQbD/4AbNnPfnaoB/CaDG0oT2UuXlqarCRDN4S5SM0M243ys8 o76w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G47AdXp1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-1797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCX1FtPWQ8cTQR9T17l/Dfx9m+sF81mgUFF19XH/571F4wUVzxcPoZ/PgzzuyVAeXy53ILPn0uXINkkk/OehID1puRPHkhbg5By49cD24Q== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l190-20020a6388c7000000b005ced19e2d21si680677pgd.676.2024.02.12.12.04.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 12:04:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=G47AdXp1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-1797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8B922B2308F for ; Mon, 12 Feb 2024 20:03:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2BEF4BAA6; Mon, 12 Feb 2024 20:02:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G47AdXp1" X-Original-To: linux-bluetooth@vger.kernel.org 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 A26A5481B7 for ; Mon, 12 Feb 2024 20:02:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707768160; cv=none; b=iwHy5SC1PPuh1CDboVliZ8FYZjNcVFfmjLSmZf1Q5LB3y2lPRigMX6nwfF+/KOc49ebAJXMKK5NxCCKZgfqkmJ/XrH4fF4OvPFdBY/GcqGuFU6s8x24ApdP9mbd9iT5cpV532A7afS/uStBy8xUAhZZPPrxeDxAeoHm0sZNPn6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707768160; c=relaxed/simple; bh=86t49+zrMpop3+LBasTQDP6WPhep6F5sBzb6VCO3Wq4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PmEs3zmzKMOQcxy9DIAkdXPMQlMcGiiJXleHsv2q1f/7LxMfm6skbXkjdmaNoSjsg+iKTMXwekwPW6QwI6dH/CvrFyu6iTK3JtoTZCHGC34bAq39z91QeLOS837jYetYQXRZefDqK2jzdHHCe3+q55pYKgsjHlWcdGKKs98j224= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G47AdXp1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 2B6A4C43330; Mon, 12 Feb 2024 20:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707768160; bh=86t49+zrMpop3+LBasTQDP6WPhep6F5sBzb6VCO3Wq4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=G47AdXp1Yx8Fbt/rIV7md4ZSXNgcComT5o1jTeCmOSP0rHKWPT+OVATCr6t7lSGWA zumZ7ScSiTpsP/z/SnkTIg7Db3xQ8iO7SWhOG6mJ+qABblwWfC62SoRG42iv3lG9sq l+TlnQe9ayo8pyt0lacPSAbqLvspECFwpAqrk9Qc7P06XOUqBczNc/AZ7Mxn7DJREq s2pLcWORKw2bEHxBqMGbCjqxOM5snVbWcviXt2GY7FfFa2yvQkIvyKSy7LPwRZ6p62 +lUOcVCvvUgfsbDf+1DXqIXVWmcBmxaO6PD07+h+x/eiTPPJhD7geZKVWRpOsAy6TN /I2zSMtT0XQ0g== 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 1C0D7C48BC4; Mon, 12 Feb 2024 20:02:40 +0000 (UTC) From: Emil Velikov via B4 Relay Date: Mon, 12 Feb 2024 20:02:44 +0000 Subject: [PATCH BlueZ v2 08/10] build: ship all config files with --enable-datafiles Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240212-disto-patches-v2-8-8bab1bd08f4d@gmail.com> References: <20240212-disto-patches-v2-0-8bab1bd08f4d@gmail.com> In-Reply-To: <20240212-disto-patches-v2-0-8bab1bd08f4d@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=1707768157; l=1705; i=emil.l.velikov@gmail.com; s=20230301; h=from:subject:message-id; bh=ukSb4msDR5fjqRG8A0bYJ7QVffGjcQu3Z3Tc8kb10CQ=; b=xK9CkzK5fzFcBBf720C/4yHCdPEbAhMR5/IPP7H4Utn9Q6IxtCEuQdWid5wFzg/1UgK7/n5nW erVHcLvEa7xDpk2ornXWv57kq853YKNOtRfvzMBeU1DNOQM2GP9fqBe 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 we ship only the dbus/systemd policy files and omit the other four - /etc/bluetooth/{main,mesh-main,input,network}.conf. Outside of those files, there is no documentation what the defaults are and the other possible options. A number of distributions (Arch, Gentoo, Fedora) have opted to manually copy those into the package. Alas this does not scale and leaves other distros at disadvantage, in a sense. Note: we need a custom install target to ensure confdir and statedir have the correct permissions. --- Some distributions do toggle some of the default values, by patching the source tree. Future patches will add support for more maintainable configuration handling akin to `man sysctl.d`. --- Makefile.am | 8 +++++++- Makefile.mesh | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 2b1b9acdf..2cbfed2db 100644 --- a/Makefile.am +++ b/Makefile.am @@ -31,11 +31,17 @@ AM_LDFLAGS = $(MISC_LDFLAGS) confdir = $(sysconfdir)/bluetooth statedir = $(localstatedir)/lib/bluetooth +install-data-hook: + install -dm555 $(DESTDIR)$(confdir) + install -dm700 $(DESTDIR)$(statedir) + if DATAFILES dbusdir = $(DBUS_CONFDIR)/dbus-1/system.d dbus_DATA = src/bluetooth.conf -conf_DATA = +conf_DATA = src/main.conf +conf_DATA += profiles/input/input.conf +conf_DATA += profiles/network/network.conf state_DATA = endif diff --git a/Makefile.mesh b/Makefile.mesh index ea50383d2..e4c9fa6a3 100644 --- a/Makefile.mesh +++ b/Makefile.mesh @@ -3,6 +3,7 @@ if MESH if DATAFILES dbus_DATA += mesh/bluetooth-mesh.conf +conf_DATA += mesh/mesh-main.conf endif if SYSTEMD -- 2.43.0