From nobody Sat Feb 7 10:08:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1566388249; cv=none; d=zoho.com; s=zohoarc; b=YVGaruAh1eHVmcCPr8PoXLtIyxe8LrPZ6HFPo4kXL3hhzbPghsan8xlql+57EGYxQ89XBsj2o2f/SahH5N4SPxdD7yi1Lz99qxPfPBykt1NSGw69/Iai60gjIWNCkQo8sZRqYuPL7Plf5Bh88hde33Da8EdGiX5iI5h1iLgfzbo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566388249; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=chc5/sc7UpUCW8Mqxd9LzB0ITROpsdjpBGbZqJH5EUY=; b=assNEp4QamTKnySPdl75eFOcndD7P2Yoevrlo/1Mx/815lomv/c7TumPl/A413c+KsMxkJIAISC6mXr0frMld0xhbo05afi6O3mmO1a985A23PpGV4f7f0MpR39IDky9XPxnFNn+uLuf8JcSAcw5VpLqDvEds/vA34bHTDNQRSk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1566388249655410.33775691946096; Wed, 21 Aug 2019 04:50:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D6073086213; Wed, 21 Aug 2019 11:50:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2088D5EE1D; Wed, 21 Aug 2019 11:50:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D8FEFE205; Wed, 21 Aug 2019 11:50:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x7LBoNmJ003495 for ; Wed, 21 Aug 2019 07:50:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id D005C5C25B; Wed, 21 Aug 2019 11:50:23 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-61.ams2.redhat.com [10.36.112.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id DFAF05C21A; Wed, 21 Aug 2019 11:50:22 +0000 (UTC) From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Date: Wed, 21 Aug 2019 12:50:10 +0100 Message-Id: <20190821115011.11240-6-berrange@redhat.com> In-Reply-To: <20190821115011.11240-1-berrange@redhat.com> References: <20190821115011.11240-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/6] build: support customization of runstatedir variable with old autoconf X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Wed, 21 Aug 2019 11:50:49 +0000 (UTC) Many distros have moved /var/run to /run with the introduction of systemd. /var/run still exists as a symlink to /run, but its usage is deprecated. autoconf added a --runstatedir option back in 2013 but there's still no new release of autoconf that includes this. gnulib meanwhile added support to propagate this arg's value to configmake.h, but it falls back to $localstatedir/run for autoconf 2.69 and older, which is what every distro today has. To deal with this problem we add a --with-runstatedir arg that then sets the $runstatedir env variable that future autoconf's --runstatedir arg will also use. This finally enables $runstatedir to be pointed to /run. Signed-off-by: Daniel P. Berrang=C3=A9 --- configure.ac | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/configure.ac b/configure.ac index f41c6d5d86..120312e4ca 100644 --- a/configure.ac +++ b/configure.ac @@ -129,6 +129,29 @@ if test -d $srcdir/.git && git --version >/dev/null 2>= &1 ; then AB_VERSION=3D`cd $srcdir && git describe --match 'v[[0-9]]*' 2>/dev/null` fi =20 +dnl autoconf 2.70 adds a --runstatedir option so that downstreams +dnl can point to /run instead of the historic /var/run, but +dnl autoconf hasn't had a release since 2012. +dnl +dnl gnulib sets configmake.h to include runstatedir, but sets +dnl it to $localstatedir/run if $runstatedir env var is not set +dnl which is useless for apps that need to use /run without +dnl waiting for autoconf 2.70 +dnl +dnl we introduce --with-runstatedir and then overwrite the +dnl value of $runstatedir so gnulib's configmake.h becomes useful +AC_ARG_WITH( + [runstatedir], + [AS_HELP_STRING( + [--with-runstatedir], + [State directory for temporary sockets, pid files, etc])]) + +if test -n "$with_runstatedir" +then + runstatedir=3D$with_runstatedir +fi + + gl_EARLY gl_INIT =20 --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list