Bug 1552 - [Anolis7]最新版本rpm不支持-n参数导致debug内核编译失败
Summary: [Anolis7]最新版本rpm不支持-n参数导致debug内核编译失败
Status: CONFIRMED
Alias: None
Product: Anolis OS 7
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 7.7
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: geliwei-ali
QA Contact: 云霭
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-29 17:09 UTC by 云霭
Modified: 2022-06-29 17:09 UTC (History)
1 user (show)

See Also:


Attachments
find-debuginfo.sh (14.42 KB, text/x-sh)
2022-06-29 17:09 UTC, 云霭
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 云霭 2022-06-29 17:09:35 UTC
Created attachment 316 [details]
find-debuginfo.sh

【问题概述】
使用anolis7.7最新镜像创建ecs并编译cloud-kernel,使用with-debug选项时,提示:
RPM build errors:
    Could not open %files file ../rpmbuild/BUILD/kernel-4.19.91-57.git.f0a30d6.an7/debugfiles.list: No such file or directory
编译失败

编译过程中有报错:
/usr/lib/rpm/find-debuginfo.sh: line 133: -n/debugsources.list: No such file or directory
/usr/lib/rpm/find-debuginfo.sh: line 134: -n/debugfiles.list: No such file or directory

实际上-n参数未被识别导致了这个报错

/usr/lib/rpm/find-debuginfo.sh内容见附件

kernel.spec相关内容:
%if %{with_debuginfo}
# Fancy new debuginfo generation introduced in Fedora 8.
# The -r flag to find-debuginfo.sh invokes eu-strip --reloc-debug-sections
# which reduces the number of relocations in kernel module .ko.debug files and
# was introduced with rpm 4.9 and elfutils 0.153.
BuildRequires: rpm-build >= 4.9.0-1, elfutils >= 0.153-1
%define debuginfo_args --strict-build-id -r -n
%endif

os信息:
NAME="Anolis OS"
VERSION="7.9"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="7.9"
PRETTY_NAME="Anolis OS 7.9"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugs.openanolis.cn/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

rpm软件包信息:
Name        : rpm
Version     : 4.11.3
Release     : 48.an7
Architecture: x86_64
Install Date: 2022年03月16日 星期三 12时30分14秒
Group       : System Environment/Base
Size        : 2622621
License     : GPLv2+
Signature   : RSA/SHA256, 2022年01月19日 星期三 11时19分55秒, Key ID 619140084873f7c5
Source RPM  : rpm-4.11.3-48.an7.src.rpm
Build Date  : 2022年01月07日 星期五 18时08分06秒
Build Host  : ed354521ffee476a806beabb8237c6a0
Relocations : (not relocatable)
Packager    : OpenAnolis Community
Vendor      : OpenAnolis Community
URL         : http://www.rpm.org/
Summary     : The RPM package management system

【期望结果】
可以正常编译内核包

【实际结果】
编译失败

【问题定位】
rpm-4.11.3-48.an7这个版本缺少了-n参数支持,但是实际上在rpm-4.11.3-40.0.1.an7这个版本已经支持了-n参数