Re: [CentOS-virt] xen4centos kernel version / debuginfo

2017-06-12 Thread Sarah Newman
On 06/12/2017 03:25 PM, Kevin Stange wrote:
> On 06/12/2017 05:17 PM, Sarah Newman wrote:
>> Is there any problem moving to 4.9.31? This contains upstream commits 
>> f2e767bb5d6ee0d9 for mpt3sas and
>> 69861e0a52f87333 for dom0 memory mappings.
> 
> 4.9.31-27 is tagged for testing presently along with updated firmware.
> I have it running on one hypervisor on Xen-44 and it has been stable for
> 3 days so far.  We could probably use some more testing before tagging
> it stable.
> 
> I have been having some dom0 page allocation failures on 4.9.25... does
> 69861e0a52f87333 address that issue?  I was having trouble determining
> if it was related.

I don't know if it addresses it. I have also been having similar problems.

> 
> https://buildlogs.centos.org/centos/6/virt/x86_64/xen/
> 
>> I am also trying to build a debuginfo package but it's not correct. 
>> Specifically I'm able to get vmlinux but the .debug files for modules are
>> stripped, which isn't right. Does anyone know how to fix this?
> 
> How are you building?  CentOS builds with mock, but I'm not super
> familiar with the environment.  rpmbuild -b doesn't seem to always work
> that well.

I am building with mock.

There are currently no debuginfo packages, this is a capability I'm trying to 
add.

>> I'm also not sure how you're supposed to build the kernel-firmware package 
>> with the current spec file definition.
> 
> I'm also not sure about how the firmware builds work but here's the Koji
> builds from the last update:
> 
> http://cbs.centos.org/koji/buildinfo?buildID=17333
> http://cbs.centos.org/koji/buildinfo?buildID=17332
> 

Not from the kernel spec file, apparently, even though there's tons of 
references in there. I wonder why this changed.

--Sarah
___
CentOS-virt mailing list
CentOS-virt@centos.org
https://lists.centos.org/mailman/listinfo/centos-virt


Re: [CentOS-virt] xen4centos kernel version / debuginfo

2017-06-12 Thread Kevin Stange
On 06/12/2017 05:17 PM, Sarah Newman wrote:
> Is there any problem moving to 4.9.31? This contains upstream commits 
> f2e767bb5d6ee0d9 for mpt3sas and
> 69861e0a52f87333 for dom0 memory mappings.

4.9.31-27 is tagged for testing presently along with updated firmware.
I have it running on one hypervisor on Xen-44 and it has been stable for
3 days so far.  We could probably use some more testing before tagging
it stable.

I have been having some dom0 page allocation failures on 4.9.25... does
69861e0a52f87333 address that issue?  I was having trouble determining
if it was related.

https://buildlogs.centos.org/centos/6/virt/x86_64/xen/

> I am also trying to build a debuginfo package but it's not correct. 
> Specifically I'm able to get vmlinux but the .debug files for modules are
> stripped, which isn't right. Does anyone know how to fix this?

How are you building?  CentOS builds with mock, but I'm not super
familiar with the environment.  rpmbuild -b doesn't seem to always work
that well.

Here's info from the last build:

http://cbs.centos.org/koji/buildinfo?buildID=17331
http://cbs.centos.org/koji/buildinfo?buildID=17330

> I'm also not sure how you're supposed to build the kernel-firmware package 
> with the current spec file definition.

I'm also not sure about how the firmware builds work but here's the Koji
builds from the last update:

http://cbs.centos.org/koji/buildinfo?buildID=17333
http://cbs.centos.org/koji/buildinfo?buildID=17332

-- 
Kevin Stange
Chief Technology Officer
Steadfast | Managed Infrastructure, Datacenter and Cloud Services
800 S Wells, Suite 190 | Chicago, IL 60607
312.602.2689 X203 | Fax: 312.602.2688
ke...@steadfast.net | www.steadfast.net
___
CentOS-virt mailing list
CentOS-virt@centos.org
https://lists.centos.org/mailman/listinfo/centos-virt


[CentOS-virt] xen4centos kernel version / debuginfo

2017-06-12 Thread Sarah Newman
Is there any problem moving to 4.9.31? This contains upstream commits 
f2e767bb5d6ee0d9 for mpt3sas and
69861e0a52f87333 for dom0 memory mappings.

I am also trying to build a debuginfo package but it's not correct. 
Specifically I'm able to get vmlinux but the .debug files for modules are
stripped, which isn't right. Does anyone know how to fix this?

I'm also not sure how you're supposed to build the kernel-firmware package with 
the current spec file definition.

--Sarah
diff --git a/SOURCES/config-x86_64 b/SOURCES/config-x86_64
index 93bee84..33df253 100644
--- a/SOURCES/config-x86_64
+++ b/SOURCES/config-x86_64
@@ -631,7 +631,7 @@ CONFIG_LEGACY_VSYSCALL_EMULATE=y
 # CONFIG_CMDLINE_BOOL is not set
 CONFIG_MODIFY_LDT_SYSCALL=y
 CONFIG_HAVE_LIVEPATCH=y
-# CONFIG_LIVEPATCH is not set
+CONFIG_LIVEPATCH=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
 CONFIG_USE_PERCPU_NUMA_NODE_ID=y
diff --git a/SPECS/kernel.spec b/SPECS/kernel.spec
index 17fe8eb..8f5990f 100644
--- a/SPECS/kernel.spec
+++ b/SPECS/kernel.spec
@@ -8,7 +8,7 @@
 %endif
  
 # Define the version of the Linux Kernel Archive tarball.
-%define LKAver 4.9.25 
+%define LKAver 4.9.31
 
 # Define the buildid, if required.
 #define buildid .1
@@ -33,6 +33,13 @@
 %define with_vdso_install %{?_without_vdso_install: 0} %{?!_without_vdso_install: 1}
 # use dracut instead of mkinitrd
 %define with_dracut   %{?_without_dracut:   0} %{?!_without_dracut:   1}
+# kernel-debuginfo
+%define with_debuginfo %{?_without_debuginfo: 0} %{?!_without_debuginfo: 1}
+
+%if !%{with_debuginfo}
+%define _enable_debug_packages 0
+%endif
+%define debuginfodir /usr/lib/debug
 
 # Build only the kernel-doc & kernel-firmware packages.
 %ifarch noarch
@@ -42,6 +49,7 @@
 %define with_perf 0
 %define with_vdso_install 0
 %define with_firmware 0
+%define with_debuginfo 0
 %endif
 
 # Build only the 32-bit kernel-headers package.
@@ -91,7 +99,7 @@
 %endif
 
 # Set pkg_release.
-%define pkg_release 27%{?buildid}%{?dist}
+%define pkg_release 28%{?buildid}%{?dist}
 
 #
 # Three sets of minimum package version requirements in the form of Conflicts.
@@ -170,6 +178,7 @@ BuildRequires: xmlto, asciidoc, bc
 %if %{with_perf}
 BuildRequires: elfutils-libelf-devel zlib-devel binutils-devel newt-devel, numactl-devel
 BuildRequires: python-devel perl(ExtUtils::Embed) gtk2-devel bison 
+BuildRequires: elfutils-devel systemtap-sdt-devel audit-libs-devel
 %endif
 BuildRequires: python openssl-devel
 
@@ -186,7 +195,7 @@ Source3: config-x86_64
 Patch1: blktap2.patch
 Patch10001: export-for-xenfb2.patch
 #Patch10002: xen-apic-id-fix.patch
-Patch10003: xen-nested-dom0-fix.patch
+#Patch10003: xen-nested-dom0-fix.patch
 
 %description
 This package provides the Linux kernel (vmlinuz), the core of any
@@ -300,6 +309,14 @@ Provides: perl(Perf::Trace::Util) = 0.01
 This package provides the perf tool and the supporting documentation.
 %endif
 
+%if %{with_debuginfo}
+%package debuginfo
+Summary: Kernel source files used by %{name}-debuginfo packages
+Group: Development/Debug
+%description debuginfo
+This package provides debug information for kernel-%{version}-%{release}.
+%endif
+
 # Disable the building of the debug package(s).
 %define debug_package %{nil}
 
@@ -335,11 +352,23 @@ pushd linux-%{version}-%{release}.%{_target_cpu} > /dev/null
 %patch1 -p1
 %patch10001 -p1
 #%patch10002 -p1
-%patch10003 -p1
+#%patch10003 -p1
 
 popd > /dev/null
 
 %build
+
+%if %{with_debuginfo}
+# This override tweaks the kernel makefiles so that we run debugedit on an
+# object before embedding it.  When we later run find-debuginfo.sh, it will
+# run debugedit again.  The edits it does change the build ID bits embedded
+# in the stripped object, but repeating debugedit is a no-op.  We do it
+# beforehand to get the proper final build ID bits into the embedded image.
+# This affects the vDSO images in vmlinux, and the vmlinux image in bzImage.
+export AFTER_LINK=\
+'sh -xc "/usr/lib/rpm/debugedit -b $$RPM_BUILD_DIR -d /usr/src/debug -i $@"'
+%endif
+
 BuildKernel() {
 Flavour=$1
 
@@ -361,6 +390,11 @@ BuildKernel() {
 %{__make} -s CONFIG_DEBUG_SECTION_MISMATCH=y ARCH=%{buildarch} V=1 %{?_smp_mflags} modules
 
 # Install the results into the RPM_BUILD_ROOT directory.
+%if %{with_debuginfo}
+mkdir -p $RPM_BUILD_ROOT%{debuginfodir}/boot
+install -m 644 System.map $RPM_BUILD_ROOT/%{debuginfodir}/boot/System.map-%{KVRFA}
+%endif
+
 %{__mkdir_p} $RPM_BUILD_ROOT/boot
 %{__install} -m 644 .config $RPM_BUILD_ROOT/boot/config-%{KVRFA}
 %{__install} -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-%{KVRFA}
@@ -469,6 +503,14 @@ hwcap 1 nosegneg"
 touch -r $RPM_BUILD_ROOT/lib/modules/%{KVRFA}/build/Makefile $RPM_BUILD_ROOT/lib/modules/%{KVRFA}/build/include/generated/autoconf.h
 touch -r $RPM_BUILD_ROOT/lib/modules/%{KVRFA}/build/Makefile $RPM_BUILD_ROOT/lib/modules/%{KVRFA}/build/include/generated/uapi/linux/version.h
 
+#
+# save the vmli