From patchwork Thu Oct 24 09:34:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Wielaard X-Patchwork-Id: 99480 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A1B4B3858D3C for ; Thu, 24 Oct 2024 09:34:36 +0000 (GMT) X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id B3A313858D28 for ; Thu, 24 Oct 2024 09:34:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3A313858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B3A313858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=45.83.234.184 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729762466; cv=none; b=QMnoECWmkASo4tBkDqPX1CPtufgRKNzsHjksOQPc5eiNbY+7QcFNOoZ1kj+n9W1ENMzB1Jn/V6Pd6q1BEGjdNWybV8Tog9qytVycitpnONgXqgx5KljhK6ZheWlKueW5nfKAl9Tko2hBWzNpDdRdIZgeJiERLgrX4iI6KyHdens= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729762466; c=relaxed/simple; bh=Kw7J9JdZArK7aR+1d8RpZfiZC5b1/dyGyzIsyWDTBl4=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=NboHrLodNuPbU8j7tiRx99H681/DMXt0pDbZtW+YVX+6ar4vuJ4QblsBe7M18WDfqPq60/8OwEhn4+zHGtkHpdosO6MS6F+eRVmsuATXP6mPpHA92Ke0qXJr2Hpgbn2Xd9pmntxnE4FVITNeDa+fYfa84AlSSF+ciamGSreAi60= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mwielaar-thinkpadp1gen3.rmtnl.csb (deer0x08.wildebeest.org [172.31.17.138]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 28D3F303C2A0; Thu, 24 Oct 2024 11:34:17 +0200 (CEST) Received: by mwielaar-thinkpadp1gen3.rmtnl.csb (Postfix, from userid 10916) id 04B435F1DB6; Thu, 24 Oct 2024 11:34:17 +0200 (CEST) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Serhei Makarov , Mark Wielaard Subject: [PATCH] config: Enable Debuginfod RPM sig checking and eu-stacktrace in spec Date: Thu, 24 Oct 2024 11:34:11 +0200 Message-ID: <20241024093411.460194-1-mark@klomp.org> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: elfutils-devel-bounces~patchwork=sourceware.org@sourceware.org For testing that the eu-stacktrace and debuginfod ima verification code builds correctly explicitly add --enable-stacktrace and --enable-debuginfod-ima-verification to configure. * config/elfutils.spec.in (enable_stacktrace): New global, depends on arch. (BuildRequires): Add sysprof-capture-devel. (configure): Add --enable-stacktrace and --enable-debuginfod-ima-verification. (files): Add eu-stacktrace. Signed-off-by: Mark Wielaard --- config/elfutils.spec.in | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index e63a3c1083ef..96934514818d 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -7,6 +7,13 @@ License: GPLv3+ and (GPLv2+ or LGPLv3+) and GFDL Source: ftp://sourceware.org/pub/elfutils/%{version}/elfutils-%{version}.tar.bz2 Summary: A collection of utilities and DSOs to handle ELF files and DWARF data +# eu-stacktrace currently only supports x86_64 +%ifarch x86_64 +%global enable_stacktrace 1 +%else +%global enable_stacktrace 0 +%endif + Requires: elfutils-libelf = %{version}-%{release} Requires: elfutils-libs = %{version}-%{release} # Can be a Recommends if rpm supports that @@ -53,6 +60,11 @@ BuildRequires: ima-evm-utils-devel BuildRequires: openssl-devel BuildRequires: rpm-sign +# For eu-stacktrace +%if %{enable_stacktrace} +BuildRequires: sysprof-capture-devel +%endif + %define _gnu %{nil} %define _programprefix eu- @@ -197,7 +209,13 @@ such servers to download those files on demand. %setup -q %build -%configure --program-prefix=%{_programprefix} --enable-debuginfod --enable-debuginfod-urls +%configure --program-prefix=%{_programprefix} \ + --enable-debuginfod \ + --enable-debuginfod-urls=https://debuginfod.elfutils.org/ \ +%if %{enable_stacktrace} + --enable-stacktrace \ +%endif + --enable-debuginfod-ima-verification make -s %{?_smp_mflags} %install @@ -259,6 +277,9 @@ fi %{_bindir}/eu-size %{_bindir}/eu-srcfiles %{_bindir}/eu-stack +%if %{enable_stacktrace} +%{_bindir}/eu-stacktrace +%endif %{_bindir}/eu-strings %{_bindir}/eu-strip %{_bindir}/eu-unstrip