Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp480455lqp; Mon, 10 Jun 2024 09:39:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX+e4l7BjDm2MgjJLJy3QUv9kb8RZqT1DYtnEKfmp2NvRtQECkiUUEmEnR2oOoOCyS6JnOrxGR1vSNgoS/PMGKh2mKRiTP95E73WxboRg== X-Google-Smtp-Source: AGHT+IFyYd77uQyArgCh0zy3uzyivmAtmT2jzCqWRVhAQvQ2k3MmcvhvMFRTzhinVS6FTY1TFUa4 X-Received: by 2002:a17:906:17d1:b0:a6f:1235:d7d with SMTP id a640c23a62f3a-a6f12350e65mr289850966b.2.1718037573754; Mon, 10 Jun 2024 09:39:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718037573; cv=pass; d=google.com; s=arc-20160816; b=H9e2jVk8jW7ihpLOEfNm8lXRUkBUlhNjyNYT3tNylgE9AYIxfe+8RozRB9ECkxUHC7 hc7WSpfxmoBEu6VtAKtgico535O0EQqoOHVLdsIbu0yR5znX3XED+UebYIHgFW+XHn12 yaBoI5wJeI7HdiHqvBYpH7RoI0+hYKvBilTF0xy6LMolZrZTIQAgmuQykSHGyzkW+xJc fLXqfnthM9K3r3unGbr2K+NTZJM9TKOuwF9EztPuG/3guZwKaqtQ6sE+Z2MpgQVf4bL6 MhPAVsiIfoEmQ4jraLKgXypH1Jx3dFAHoZg/G2PwB2FeGu1oxEXGdV8AY6v0e6mjoxfM 7idg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Cs2+zpw7zAO4JC3ZJJkARQKdcaav8qsg47LwqLONWbc=; fh=Holx/gsvO+HQsywX+F3JNZNWvkftjXvD+Yg8VWBHNAk=; b=Osn86qDwH3Z7PmyeHQxRvu4VD84KPU+YHJ4xsI7ASd8UFeUlYwx6OceSlL/iQOeuYN U77o7f3auiJlFgKBboYoPoM+mvZgyLFpO+vOYhr8OdKk1a50S12SNW+hFgiMjZ5MJMX4 rR4WneQ8faAOA37rODITxMCMHkzWFD6pslZkex8PnAaGWrP8C2WLtXF5NkGtmMBFICw3 0nyXml2mcG3HZDBFCKSmCSJPtNEslW0okye19vTRYuuzSYGD6OXq1TXCmtI8y6Kjut7U Ep1feZa9kB81fkQTahnwXjsRLP1cYMxQ10AimEOL8mfRi9Yl6rUMBMhMlAazyQl+460L xaFw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F0Hr2vM1; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-208562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6efe596fb0si268563966b.130.2024.06.10.09.39.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 09:39:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=F0Hr2vM1; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-208562-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 93F911F242F3 for ; Mon, 10 Jun 2024 16:39:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B9C6145354; Mon, 10 Jun 2024 16:39:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="F0Hr2vM1" 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-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 404B614387C for ; Mon, 10 Jun 2024 16:39:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718037548; cv=none; b=DNJOcrjcWM8/CK3yUUXZI0AIQatVOumbHVi/AWWX6AGfSd2v942IeaeuHV+eJVzJXixNuWS9TH+cjRykBxP66+bRkMm2V+A9/TYhmTg8qZipayzcEKGppPEvlpeXKszjm1goRMx8xieRnpyfdS82SL3sh+KhaIt7HEI8Tr2Y9wE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718037548; c=relaxed/simple; bh=dN+77p+j/b8iZSyHVlGXH1wUBYhYLJsCm7Lq8sxSecA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=d+tufNUAn6ktGrN6iblR0UOIRIKUQmo0uRcQ+0SDatHr21SYRbSIhe09IuoydDlh4Qr2ppAHB7WtPN7mWG0Yt81g0zpL54xf1gVoAogTDLKuat9usGg/AvI+FeuL8asFWMDLVmTpb6o3twP+36wAVU4a2X44IFkwYY3U0G/64wI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=F0Hr2vM1; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1718037546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Cs2+zpw7zAO4JC3ZJJkARQKdcaav8qsg47LwqLONWbc=; b=F0Hr2vM1be5M3wnbM5yK6GBDU4OwTpZ220NnvdYs/Vxcbr18FZD8r2X83vrQjBWyMFOnoI lpVerXP1CeRA/wXsl7MQH3m6JaC8ITqp2gSebcqDrgumpBcAvV/s3lZTBIytMHlwe3f8Lb 1jYr/IzYjEtdauhnUufT/S8I/o1p6WQ= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-537-JCJm8Pe4PTGh1Mp4o2xrng-1; Mon, 10 Jun 2024 12:39:03 -0400 X-MC-Unique: JCJm8Pe4PTGh1Mp4o2xrng-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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 mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6A67D19560BA; Mon, 10 Jun 2024 16:39:01 +0000 (UTC) Received: from optiplex-lnx.redhat.com (unknown [10.22.17.224]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3FB8319560B0; Mon, 10 Jun 2024 16:38:59 +0000 (UTC) From: Rafael Aquini To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Nathan Chancellor , Nicolas Schier Subject: [PATCH] kbuild: rpm-pkg: fix rpmbuild warnings for kernel.spec Date: Mon, 10 Jun 2024 12:38:56 -0400 Message-ID: <20240610163856.693110-1-aquini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Newer revisions of rpmbuild are throwing warnings about the current kernel.spec template having an unversioned kernel-headers in the 'Obsoletes:' field and not being able to source the epoch's date from the spec's missing '%changelog' section: $ make srcrpm-pkg UPD include/config/kernel.release GEN rpmbuild/SPECS/kernel.spec UPD .tmp_HEAD ARCHIVE linux.tar.gz rpmbuild -bs rpmbuild/SPECS/kernel.spec --define='_topdir /mnt/nfs/work/kernel/linux/rpmbuild' warning: line 34: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers warning: source_date_epoch_from_changelog set but %changelog is missing Wrote: /mnt/nfs/work/kernel/linux/rpmbuild/SRPMS/kernel-6.10.0_rc3-1.src.rpm RPM build warnings: line 34: It's not recommended to have unversioned Obsoletes: Obsoletes: kernel-headers source_date_epoch_from_changelog set but %changelog is missing This patch addresses both RPM build warnings. Signed-off-by: Rafael Aquini --- scripts/package/kernel.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec index e095eb1e290e..4d58b29c03ad 100644 --- a/scripts/package/kernel.spec +++ b/scripts/package/kernel.spec @@ -1,3 +1,5 @@ +%global source_date_epoch_from_changelog 0 + # _arch is undefined if /usr/lib/rpm/platform/*/macros was not included. %{!?_arch: %define _arch dummy} %{!?make: %define make make} @@ -27,7 +29,7 @@ The Linux Kernel, the operating system core itself %package headers Summary: Header files for the Linux kernel for use by glibc Group: Development/System -Obsoletes: kernel-headers +Obsoletes: kernel-headers < %{version} Provides: kernel-headers = %{version} %description headers Kernel-headers includes the C header files that specify the interface -- 2.45.1