From nobody Fri Oct 18 06:14:50 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 17180099136691018.5182771982792; Mon, 10 Jun 2024 01:58:33 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 6C41E1947; Mon, 10 Jun 2024 04:58:32 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id F23AF1940; Mon, 10 Jun 2024 04:58:12 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id ADE32192B; Mon, 10 Jun 2024 04:58:09 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 3219F1775 for ; Mon, 10 Jun 2024 04:58:09 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-669-SaVAion-OsmjH6MYAYv27Q-1; Mon, 10 Jun 2024 04:58:07 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A3C29195609F for ; Mon, 10 Jun 2024 08:58:03 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.32]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7DD661955E74; Mon, 10 Jun 2024 08:57:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: *** X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,RCVD_IN_SBL_CSS,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718009888; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wfSY2mVH6fyG8Tj+FUskXiKe7e+fhAFftrTm3qyLlT8=; b=TvKQ9rBeUIqTzCJY1ZHYB7KVXzfDrb1wbMiYQu1xfuhHKAmPLj4HYQ1I1aE3YmdRW6J0gd 8qBtiBFb4EmFfsMRP6iS7H45K3DANTvSb3QWDY0T3sKzimdtO55MBYx6/BknLK95rfz+1S R7eafv6Gvre58IrGdMkEqvpQUGqjLYs= X-MC-Unique: SaVAion-OsmjH6MYAYv27Q-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: devel@lists.libvirt.org Subject: [PATCH v2] meson: allow systemd sysusersdir to be changed Date: Mon, 10 Jun 2024 09:57:55 +0100 Message-ID: <20240610085755.822832-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ELQ4HMBXYAMRCZCQJROYTYMB5EI7ZA27 X-Message-ID-Hash: ELQ4HMBXYAMRCZCQJROYTYMB5EI7ZA27 X-MailFrom: berrange@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Yaakov Selkowitz X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1718009914936100001 Content-Type: text/plain; charset="utf-8" We currently hardcode the systemd sysusersdir, but it is desirable to be able to choose a different location in some cases. For example, Fedora flatpak builds change the RPM %_sysusersdir macro, but we can't currently honour that. Reported-by: Yaakov Selkowitz Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Michal Privoznik --- libvirt.spec.in | 1 + meson.build | 5 +++++ meson_options.txt | 1 + src/qemu/meson.build | 2 +- 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 244e5e824c..347a609add 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1328,6 +1328,7 @@ export SOURCE_DATE_EPOCH=3D$(stat --printf=3D'%Y' %{_= specdir}/libvirt.spec) -Drunstatedir=3D%{_rundir} \ -Dinitconfdir=3D%{_sysconfdir}/sysconfig \ -Dunitdir=3D%{_unitdir} \ + -Dsysusersdir=3D%{_sysusersdir} \ %{?arg_qemu} \ %{?arg_openvz} \ %{?arg_lxc} \ diff --git a/meson.build b/meson.build index 295613fd93..5c7cd7ec2e 100644 --- a/meson.build +++ b/meson.build @@ -100,6 +100,11 @@ if unitdir =3D=3D '' unitdir =3D prefix / 'lib' / 'systemd' / 'system' endif =20 +sysusersdir =3D get_option('sysusersdir') +if sysusersdir =3D=3D '' + sysusersdir =3D prefix / 'lib' / 'sysusers.d' +endif + bindir =3D prefix / get_option('bindir') datadir =3D prefix / get_option('datadir') includedir =3D prefix / get_option('includedir') diff --git a/meson_options.txt b/meson_options.txt index a4f1dd769f..50d71427cb 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -5,6 +5,7 @@ option('system', type: 'boolean', value: false, description= : 'Set install paths option('runstatedir', type: 'string', value: '', description: 'State direc= tory for temporary sockets, pid files, etc') option('initconfdir', type: 'string', value: '', description: 'directory f= or init script configuration files') option('unitdir', type: 'string', value: '', description: 'directory for s= ystemd unit files') +option('sysusersdir', type: 'string', value: '', description: 'directory f= or sysusers files') # dep:tests option('expensive_tests', type: 'feature', value: 'auto', description: 'se= t the default for enabling expensive tests (long timeouts)') option('test_coverage', type: 'boolean', value: false, description: 'turn = on code coverage instrumentation') diff --git a/src/qemu/meson.build b/src/qemu/meson.build index 907893d431..57356451e4 100644 --- a/src/qemu/meson.build +++ b/src/qemu/meson.build @@ -163,7 +163,7 @@ if conf.has('WITH_QEMU') # Install the sysuser config for the qemu driver install_data( 'libvirt-qemu.sysusers.conf', - install_dir: prefix / 'lib' / 'sysusers.d', + install_dir: sysusersdir, rename: [ 'libvirt-qemu.conf' ], ) =20 --=20 2.43.0