Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1894326lqg; Mon, 4 Mar 2024 07:03:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUDzlNAQhHw7etyLkopDVQR1Okdj4A7F9a9FAsyphCDarC/oQBm4CorhWBquOQmkNcnjFlblYb0T69WIG9tXcNpKYWCdJwGjeaZFC+yxQ== X-Google-Smtp-Source: AGHT+IGS5zmuimp50wz+HAYlGrbwEgfH39fWeD6FNCVtyvvMPZhNV7jqO6SkN+hAWWwK2fj2uOsw X-Received: by 2002:a05:6a21:328a:b0:1a0:e944:15b7 with SMTP id yt10-20020a056a21328a00b001a0e94415b7mr8905900pzb.5.1709564621728; Mon, 04 Mar 2024 07:03:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709564621; cv=pass; d=google.com; s=arc-20160816; b=JateBc5dpwrFKrvNvUR28yiOPP8cjpZ0HAY4DEuDYEWeo8MV77O6fo+tFN919wNoBL ZGK3fktodDra2IMKD2gYgFVvbKI3DlwmzH8AtzrlAal5ZVgZHUW+C5CmkESfb1NyVw0E sXKpPB7sd0EomawNXbAjUbqjzgw7UYQdwtXjW+QN9o1IJRZhUz6GJsddao6TGnosMoA0 4guyGBR+mZEENWAzn8KwGgv79lk72pd0i8ahheEiHD25/wYbL/FBOfIjfopHAdR9CZh1 cqHawsSuhq7YEMCwyWmXx2RQrZ00n0fkLvE2stz/GfQvSlR7h76naB0pVN1cwezoH8bQ lKdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=lY8moMvHRyYcCcSUNVc2Yw+Si8qOEzQdwU9Ch2hsvzg=; fh=5QnP6Ald7AiOA2/Z4CRr9OnWhwWrmisXqauhV3o5eLI=; b=vI+3ZkYG0LvqETm9nH2eRcS+GzHVkCdHF3CaGZy5FHlnOT5eR5BAt6DbRPCQcBgEco cJWImn3yWyd5x7G8H2ixTDQBnPwZQuBeBVay6rzIzoPOHYP/Bzdjy2ICtq8Vzr46r9Da fTH4MabNxYK28jasFQcQZrPzWLXAZZJNyHjyA9PRNoLuizrYFPXRnir7KlsdYRlJwl4J S80ADuxmHXqD/KNtjrJMDB89Qt2dQwncKyR1Wsh8CtARsLbpz8768pnWRGcVxyyHdP5w CYKzWqPwP/cEFPLtpXovzuC5l65h8g/lsDIxXNyyxnIuDKY810/35cxpxb1rMad2mQbZ Nwgw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@max.gautier.name header.s=fdn header.b=RgnlNAwU; arc=pass (i=1 spf=pass spfdomain=max.gautier.name dkim=pass dkdomain=max.gautier.name dmarc=pass fromdomain=max.gautier.name); spf=pass (google.com: domain of linux-bluetooth+bounces-2267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2267-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=max.gautier.name Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id p19-20020a634f53000000b005dcbba892cdsi8522516pgl.327.2024.03.04.07.03.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 07:03:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2267-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=@max.gautier.name header.s=fdn header.b=RgnlNAwU; arc=pass (i=1 spf=pass spfdomain=max.gautier.name dkim=pass dkdomain=max.gautier.name dmarc=pass fromdomain=max.gautier.name); spf=pass (google.com: domain of linux-bluetooth+bounces-2267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2267-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=max.gautier.name 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 60CD6B28458 for ; Mon, 4 Mar 2024 14:31:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B4EF245BE6; Mon, 4 Mar 2024 14:30:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=max.gautier.name header.i=@max.gautier.name header.b="RgnlNAwU" X-Original-To: linux-bluetooth@vger.kernel.org Received: from taslin.fdn.fr (taslin.fdn.fr [80.67.169.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3E3DC2C6 for ; Mon, 4 Mar 2024 14:30:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.67.169.77 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709562653; cv=none; b=Mc7N8lFp4b9I+SzTyb21QmjnG4nR5Xu6lzofpGXLbeVtBkd8WnXVrb/qdfG3i0kI6FWnqYDnBqFzo6WLAMqooxbulCgonAXnnRYtnfJrGuP+LC64LhYpFsB6KwcczpSyXtjszfC19GFL+3Gr2T99F2UbPPVYFKXhRGcVU5D9Y6E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709562653; c=relaxed/simple; bh=jwMbm9EbrTydYIVwf5E5ShO9zeWFXcKUmesnDkAZEt4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kY1CdHwKGXSbMuMZPySFo+U+nw3HnotiGmkDuA+Kpv9Wtl4fBjolOKdVfHj+b/WIdM7SPdWHD2tsh1QkEFzrSIReGlnIBgvjjuExQtMWwL06pBbnlUAYUMlyMy/BpWQZxrH6bkk1bDgRCLZ/9ghVXHc3pQQc1B4tkQHbn/BLw74= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=max.gautier.name; spf=pass smtp.mailfrom=max.gautier.name; dkim=pass (2048-bit key) header.d=max.gautier.name header.i=@max.gautier.name header.b=RgnlNAwU; arc=none smtp.client-ip=80.67.169.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=max.gautier.name Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=max.gautier.name Received: from localhost (unknown [IPv6:2001:910:10ee:0:3e59:337d:d116:8f67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by taslin.fdn.fr (Postfix) with ESMTPSA id 7B55860249; Mon, 4 Mar 2024 15:22:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=max.gautier.name; s=fdn; t=1709562126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=lY8moMvHRyYcCcSUNVc2Yw+Si8qOEzQdwU9Ch2hsvzg=; b=RgnlNAwUmcopA6hZxKtHWo8ai/s5uEwcXbZpviY0dKlRtJKJfTF9fQiQI31lZd8+EuepgX TJqwEz/gpwnNFUF+N0UFMuCsS6HHW3OZ6TQOURB/ZNhkykY2e8cj4zHQvkWQRQAF04XPs/ PWf58GVp0kjPhEeNSgqGmrS34Xi+rdu1Mn4UDEQTITcQuQ8fxLYHM/Apul2ptLwKNaSHPG nEbwObp25MzzZFvWyPmTz8M4kfhVWmtMCWProHEiFtCSKex1Ldkf5i8jE1jl3N3H80TYK6 19jsVZAbJQc1NM0Zpb9r+78Hhlt+7qH6Ym5r687oUu/5N5J1ywJtYACqeFQDBA== From: Max Gautier To: linux-bluetooth@vger.kernel.org Cc: Max Gautier Subject: [PATCH BlueZ] Don't install conf and state dir on systemd Date: Mon, 4 Mar 2024 15:21:57 +0100 Message-ID: <20240304142200.69968-1-mg@max.gautier.name> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The bluetooth.service file already specify the State and Configuration directories with the correct modes, which guarantee they will be available (with proper permissions) when bluetoohd starts. Not installing those helps implementing the "Hermetic /usr" pattern (TL;DR: '/usr' contains everything necessary to boostrap a working system) Handling this in upstream bluez (rather than in distribution packaging scripts) avoid duplication of efforts between distros. Links: https://0pointer.net/blog/fitting-everything-together.html --- Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile.am b/Makefile.am index d94839856..ed4f9dc51 100644 --- a/Makefile.am +++ b/Makefile.am @@ -422,7 +422,12 @@ include Makefile.obexd include android/Makefile.am include Makefile.mesh +if SYSTEMD +install-data-hook: obexd-add-service-symlink +else install-data-hook: bluetoothd-fix-permissions obexd-add-service-symlink +endif + uninstall-hook: obexd-remove-service-symlink if HID2HCI -- 2.44.0