From patchwork Mon Jun 15 07:20:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1309259 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=LTChAu2i; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49ljSG2wPjz9sR4 for ; Mon, 15 Jun 2020 17:21:34 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 31C112001F; Mon, 15 Jun 2020 07:21:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R-U-v+AcS60f; Mon, 15 Jun 2020 07:21:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 5B2D8203C2; Mon, 15 Jun 2020 07:21:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id EA7B61BF4E7 for ; Mon, 15 Jun 2020 07:21:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E36A28705D for ; Mon, 15 Jun 2020 07:21:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NKNFbXgz-cvs for ; Mon, 15 Jun 2020 07:21:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 81D6286F9A for ; Mon, 15 Jun 2020 07:21:25 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id f185so13666201wmf.3 for ; Mon, 15 Jun 2020 00:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Esvtu9w/7S45pbDCeoFUqJryN/+af11fy+m8V4tBfMc=; b=LTChAu2irA+Rt0+T2v3GlbiVyIxDAhkyXuNRLHnoGS33Qr/Cz0mWnkfejLfY13TFCv R94wJQU2qzuYPsAfLBIPS35RwgSqNMcoWCv7RipxebUCxX8EhMlkwnA+hLGwjo2PVQ6X TKj2+89sVvbezqPXMnm9XkztR4GfO1Im0k7pSGXSIRhmLaTVFGYPJKhvY/Xs4MsgRlsS O5yrvCybroHNpwIY8b+Tofo0dqlGF7pYAJnsc6KbkdE5Zb/79Ax6lwJ3ItjscMzgDxlM wURnnRn8w3ZNzH8g/nyNqpUnnM46+hjtzoQqg8wNjrokjWvQymb8A9k201vI0aaTKVNq l+eQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Esvtu9w/7S45pbDCeoFUqJryN/+af11fy+m8V4tBfMc=; b=XSpWdu2ubOoEh3bNPa6Tf4CLcAWm+s1utlbiYIpwOvvZem6/hnYdNy3UGma2an0GMF KNIIAsx2lULHji6bs5NyiVxRYQQT3t++BZtISB2oyLzxmtF3b5+XoqT1hDUIVihbDbKb QBZKv4ChFl1Xnng4MxAp8IfZQqN0xGfE3SYZf0qgNVl99bpNHItsRB6L6nMSqklSJ5lJ d1QoD6A/K1mkWyWQTXRmAkCgxBwtnb61tRg+ht7jVtLJz50g/4gnB2dh3NKoq3mMF7uh VHkf+w8D0l3w1kdWpPcWXvlYOZr4D/dQhzn96PtemLPFmmOsUXUzFTqD+2063RFYLRw9 TZRw== X-Gm-Message-State: AOAM532CD9iLDHIO5Q5fnFMZVqAOJG+z6+fvKu4tLSYIxq5y7pF3XZUh rODJ6R6nJnJmxthAfAcQ5RDZFk3Osrb8cw== X-Google-Smtp-Source: ABdhPJwUZyg7qiriDCEESmH0hht61jdSAoziTvNxUq+wHVp9iLUC866TVfKj0AC87Wfkr8GDBT+hCg== X-Received: by 2002:a05:600c:2294:: with SMTP id 20mr12083136wmf.51.1592205683758; Mon, 15 Jun 2020 00:21:23 -0700 (PDT) Received: from localhost.localdomain (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id q4sm5605291wmc.1.2020.06.15.00.21.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 00:21:23 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Mon, 15 Jun 2020 09:20:49 +0200 Message-Id: <20200615072055.2083-10-nolange79@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200615072055.2083-1-nolange79@gmail.com> References: <20200615072055.2083-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 09/14] package/systemd: option to delete all catalog files X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Norbert Lange , jeremy.rosen@smile.fr, "Yann E. MORIN" , Adam Duskett , Maxime Hadjinlian Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Unless you need to rebuild the database, there is no need for the (source) catalog files. This option removes the files, and the service in a ROOTFS_PRE_CMD_HOOK. Signed-off-by: Norbert Lange --- package/systemd/Config.in | 12 ++++++++++++ package/systemd/systemd.mk | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/package/systemd/Config.in b/package/systemd/Config.in index dd3b8c534d..b09bd36ab6 100644 --- a/package/systemd/Config.in +++ b/package/systemd/Config.in @@ -251,6 +251,18 @@ config BR2_PACKAGE_SYSTEMD_IMPORTD http://www.freedesktop.org/software/systemd/man/machinectl.html#Image%20Transfer%20Commands +config BR2_PACKAGE_SYSTEMD_RETAIN_CATALOGS + bool "retain source catalog files" + help + catalog files are used to provide extended and potentially localized + messages for the journal. + The files reside in /usr/lib/systemd/catalog, but arent used directly, + instead a binary database will be built using these files. + + Only if the database needs to be rebuilt later they need to be retained. + + https://www.freedesktop.org/wiki/Software/systemd/catalog/ + config BR2_PACKAGE_SYSTEMD_LOCALED bool "enable locale daemon" help diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk index d3be92b78c..e117e3a082 100644 --- a/package/systemd/systemd.mk +++ b/package/systemd/systemd.mk @@ -464,6 +464,16 @@ ifneq ($(SYSTEMD_FALLBACK_HOSTNAME),) SYSTEMD_CONF_OPTS += -Dfallback-hostname=$(SYSTEMD_FALLBACK_HOSTNAME) endif +ifneq ($(BR2_PACKAGE_SYSTEMD_RETAIN_CATALOGS),y) +define SYSTEMD_RM_SOURCE_CATALOGS_HOOK + rm -rf $(TARGET_DIR)/usr/lib/systemd/catalog + find $(TARGET_DIR)/usr/lib/systemd/system \ + -name systemd-journal-catalog-update.service -delete +endef + +SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_RM_SOURCE_CATALOGS_HOOK +endif + define SYSTEMD_INSTALL_INIT_HOOK ln -fs multi-user.target \ $(TARGET_DIR)/usr/lib/systemd/system/default.target