Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to build rpm debuginfo package ? #229

Open
wuxin66 opened this issue Mar 17, 2021 · 5 comments
Open

how to build rpm debuginfo package ? #229

wuxin66 opened this issue Mar 17, 2021 · 5 comments

Comments

@wuxin66
Copy link

wuxin66 commented Mar 17, 2021

how to build rpm debuginfo package ?

@wuxin66
Copy link
Author

wuxin66 commented Mar 18, 2021

I delete ”%global debug_package %{nil}“ in containerd.spec but i can't build debuginfo package.
I use "make REF=v1.4.3 docker.io/library/centos:7" command.

@rdeusser
Copy link

@wuxin66 You ever figure this out?

@pprindeville
Copy link

I've made some progress:

diff --git a/rpm/containerd.spec b/rpm/containerd.spec
index dbed8e7..a0ddc77 100644
--- a/rpm/containerd.spec
+++ b/rpm/containerd.spec
@@ -95,6 +95,8 @@ system: image transfer and storage, container execution and supervision,
 low-level storage and network attachments, etc.
 
 
+%debug_package
+
 %prep
 rm -rf %{_topdir}/BUILD/
 if [ ! -d %{_topdir}/SOURCES/containerd ]; then
diff --git a/scripts/build-rpm b/scripts/build-rpm
index 2850d70..1a79d2b 100755
--- a/scripts/build-rpm
+++ b/scripts/build-rpm
@@ -61,7 +61,7 @@ ARCH="$(uname -m)"
 DEST_DIR="/build/${DIST_ID}/${DIST_VERSION}/${ARCH}/"
 (
        set -x
-       rpmbuild -ba "${SPEC_FILE}"
+       rpmbuild --with debug -ba "${SPEC_FILE}"
        mkdir -p "${DEST_DIR}"
        mv -v RPMS/*/*.rpm "${DEST_DIR}"
        mv -v SRPMS/*.rpm "${DEST_DIR}"

different issue, however. Running into the dreading "Missing build-id" errors from RPM (v4.14.3 on CentOS 8.5).

Anyone have a fix for that? I can fork and post my WIP if anyone wants to collaborate.

@pprindeville
Copy link

@wnark
Copy link

wnark commented Oct 29, 2024

@wuxin66 See my WIP: https://github.com/pprindeville/containerd-packaging/tree/centos-build-w-debuginfo

@rdeusser 👋

Does this branch work?I've been trying for a while too, I just can't generate the debuginfo rpm package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants