From nobody Mon Sep 16 19:20:21 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 1717793390781922.2858513932721; Fri, 7 Jun 2024 13:49:50 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 032FF1BDB; Fri, 7 Jun 2024 16:49:48 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E73181B0E; Fri, 7 Jun 2024 16:48:20 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D85FC1A8F; Fri, 7 Jun 2024 16:48:17 -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 18A8118CE for ; Fri, 7 Jun 2024 16:48:12 -0400 (EDT) Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-183-aKgSnmJbNNKDo1JKzDxaww-1; Fri, 07 Jun 2024 16:48:10 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1A9173806706 for ; Fri, 7 Jun 2024 20:48:10 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.3]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41E613C23; Fri, 7 Jun 2024 20:48:09 +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=-0.6 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,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717793292; 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=Skb5+IJTWaHRQeHtrt04cgmNXwKjlXspZukFtC7110U=; b=ESJ9kdRfSH4tqXBoSSwCklg3zxhaAoj/r6mxvUYB7Mfk3SiaE/sfQ/MZM9AnAxSDpfcOHd ybPsccfQt8yQfyS0wxhcBIeLMvc3x0hEEg0LWYf68qgfVQvUM+xrij8UKFmJQWbmRo8+50 lP+c7AKRv3yDShemgVq8Sp/W1l6MBv0= X-MC-Unique: aKgSnmJbNNKDo1JKzDxaww-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: devel@lists.libvirt.org Subject: [PATCH] meson: allow systemd sysusersdir to be changed Date: Fri, 7 Jun 2024 21:48:08 +0100 Message-ID: <20240607204808.767903-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2KBLJO5FRKL4RHPBNMPCKLO25BEAPDBG X-Message-ID-Hash: 2KBLJO5FRKL4RHPBNMPCKLO25BEAPDBG 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: 1717793392030100001 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 --- 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..2fc9ab3e96 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 getoption('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