#23 Fix build when %_bindir==%_sbindir
Merged a month ago by coiby. Opened a month ago by zbyszek.
rpms/ zbyszek/kexec-tools bin-sbin-merge  into  rawhide

file modified
+6 -3
@@ -145,6 +145,8 @@ 

  %define archdef ARCH=ppc



+ sed -r -i 's|/usr/sbin|%_sbindir|g' makedumpfile-*/Makefile




  %configure \
@@ -156,7 +158,7 @@ 

      --host=powerpc64le-redhat-linux-gnu \

      --build=powerpc64le-redhat-linux-gnu \


-     --sbindir=/usr/sbin

+     --sbindir=%{_sbindir}

  rm -f kexec-tools.spec.in


@@ -172,7 +174,7 @@ 


  # kdump-utils

  %define kdump_utils_dir kdump-utils-%{kdump_utils_ver}

- make DESTDIR=%{buildroot} -C %kdump_utils_dir install

+ %make_install -C %kdump_utils_dir sbindir=%_sbindir


  # makedumpfile

@@ -249,8 +251,9 @@ 




+ %{_bindir}/kdumpctl


- %{_bindir}/*

+ %{_sbindir}/vmcore-dmesg


  %config(noreplace,missingok) %{_sysconfdir}/sysconfig/kdump

  %config(noreplace,missingok) %verify(not mtime) %{_sysconfdir}/kdump.conf

Build succeeded.

Hi @zbyszek,

For the makedumpfile subpackage, the path of makedumpfile binary is hard-coded to /usr/sbin. Shall we fix makedumpfile before merging this PR?

In this patch, the location is "fixed" using sed. I'd be nice to push this upstream, but OTOH, it's a one-line change, so I think it's fine it is applied downstream for now and then fixed upstream at leisure.

Thanks for the clarification! I'm going to merge the PR but find%{_sbindir}/vmcore-dmesg belongs to the kexec-tools subpackage.

Updated. %{_sbindir}/vmcore-dmesg is now in kexec-tools only.

Pull-Request has been merged by coiby

a month ago