From nobody Sun Feb 8 12:20:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1594894813; cv=none; d=zohomail.com; s=zohoarc; b=DslIvutW7tgjjx3/pN50BBJrDZDsmPB+bly35vn4/vlIOkb/t7f93M+h7Zx0NvR0NQIxOOCOw4KyVfCEz4tKiBkz9B9RFSTj7uJ4yZcWorWRajhZ5/aPgW5Du0kFuZ7W2IUhNcdLUl3iOzyRRf3rWnIsSa66yftdqZVN10YSTbk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594894813; 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; bh=ee6gc0xGf+i061b/tYoLnf1WEZYhL854MhpSOltOrZk=; b=gmJrXehsE4T9e3ymc4CZ41PUXuKDXr4vz2UBjOHJcYWLTUMm+jvjv57gJnPt+5zx5gi33LnFi9l70y7FMRAjjiXBD5+IX6XSLUD2LWud0NWor6ikc3Cd5JodhfG4ghbJM83ux5i0Jmc4WKIGjgMO94WrNRPYq8NFSrgaa4RR3l4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1594894813855642.1556338613088; Thu, 16 Jul 2020 03:20:13 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-9-K7oLoepZNfSd5rwHc7T2Ww-1; Thu, 16 Jul 2020 06:13:33 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D850D1008303; Thu, 16 Jul 2020 10:13:27 +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 B065370100; Thu, 16 Jul 2020 10:13:27 +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 7B00A730E1; Thu, 16 Jul 2020 10:13:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA5m35018696 for ; Thu, 16 Jul 2020 06:05:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 220182B6DB; Thu, 16 Jul 2020 10:05:48 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 906C72B6E6 for ; Thu, 16 Jul 2020 10:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594894812; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ee6gc0xGf+i061b/tYoLnf1WEZYhL854MhpSOltOrZk=; b=jRklCfaU8a/PXi3DUq4yBxXQ0N18px84v9U6cV3PZ5bRyMpZvjegQ1iMKGxnRXgSvBBp31 YmndVeZmjwOQjhYuL5q/gpvY6IOHhOo3PzO/YdmfTloTJFJu8ivadPhlvA1PjuUn5rbJNq Bg8z24feTscAmqNtvnHc5kqp3LeW/c0= X-MC-Unique: K7oLoepZNfSd5rwHc7T2Ww-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 230/351] meson: src: generate logrotate files Date: Thu, 16 Jul 2020 11:57:46 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- src/Makefile.am | 28 ---------------------------- src/remote/Makefile.inc.am | 7 ------- src/remote/meson.build | 23 +++++++++++++++++++++++ 3 files changed, 23 insertions(+), 35 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 894ec5162a3..07516aa43ae 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,7 +33,6 @@ if WITH_DTRACE_PROBES tapset_DATA =3D endif WITH_DTRACE_PROBES RPC_PROBE_FILES =3D -LOGROTATE_FILES_IN =3D =20 include security/Makefile.inc.am include access/Makefile.inc.am @@ -198,33 +197,6 @@ libvirt_functions.stp: $(RPC_PROBE_FILES) $(top_srcdir= )/scripts/gensystemtap.py =20 endif WITH_DTRACE_PROBES =20 -LOGROTATE_FILES :=3D $(LOGROTATE_FILES_IN:remote/%.in=3D%) - -%.logrotate: remote/%.logrotate.in - $(AM_V_GEN)sed \ - -e 's|[@]localstatedir[@]|$(localstatedir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - -if WITH_LIBVIRTD -install-logrotate: $(LOGROTATE_FILES) - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/logrotate.d/ - for f in $(LOGROTATE_FILES) ; \ - do \ - tgt=3D`echo $$f | sed -e 's/.logrotate//'`; \ - $(INSTALL_DATA) $$f \ - $(DESTDIR)$(sysconfdir)/logrotate.d/$$tgt; \ - done - -uninstall-logrotate: - rm -f $(LOGROTATE_FILES:%.logrotate=3D$(DESTDIR)$(sysconfdir)/logrotate.d= /%) - rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || : - -INSTALL_DATA_LOCAL +=3D install-logrotate -UNINSTALL_LOCAL +=3D uninstall-logrotate -endif WITH_LIBVIRTD - - install-data-local: $(INSTALL_DATA_LOCAL) \ $(INSTALL_DATA_DIRS:%=3Dinstall-data-%) =20 diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index 287dad426cb..8fbe8425b3b 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -1,12 +1,5 @@ # vim: filetype=3Dautomake =20 -LOGROTATE_FILES_IN +=3D \ - remote/libvirtd.qemu.logrotate.in \ - remote/libvirtd.lxc.logrotate.in \ - remote/libvirtd.libxl.logrotate.in \ - remote/libvirtd.logrotate.in \ - $(NULL) - if WITH_LIBVIRTD =20 if WITH_SYSCTL diff --git a/src/remote/meson.build b/src/remote/meson.build index b18754d02c1..3b9f6117b62 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -99,6 +99,13 @@ libvirtd_socket_unit_files =3D [ =20 libvirtd_socket_conflicts =3D ' '.join(libvirtd_socket_unit_files) =20 +logrotate_files =3D [ + 'libvirtd.qemu', + 'libvirtd.lxc', + 'libvirtd.libxl', + 'libvirtd', +] + if conf.has('WITH_REMOTE') remote_driver_lib =3D static_library( 'virt_remote_driver', @@ -196,6 +203,22 @@ if conf.has('WITH_REMOTE') virt_install_dirs +=3D [ localstatedir / 'log' / 'libvirt', ] + + logrotate_conf =3D configuration_data() + logrotate_conf.set('localstatedir', localstatedir) + + foreach name : logrotate_files + log_file =3D configure_file( + input: '@0@.logrotate.in'.format(name), + output: '@0@.logrotate'.format(name), + configuration: logrotate_conf, + ) + install_data( + log_file, + install_dir: sysconfdir / 'logrotate.d', + rename: [ name ], + ) + endforeach endif endif =20 --=20 2.26.2