Hi Xunlei,
On Mon, Jun 5, 2017 at 8:46 PM, Xunlei Pang <xpang(a)redhat.com> wrote:
On 06/02/2017 at 02:07 AM, Bhupesh Sharma wrote:
> Hi Xunlei,
>
> Thanks for the review.
> Please see my comments inline.
>
> On Wed, May 31, 2017 at 9:27 AM, Xunlei Pang <xpang(a)redhat.com> wrote:
>> On 05/31/2017 at 03:21 AM, Bhupesh Sharma wrote:
>>> On Wed, Apr 12, 2017 at 3:19 PM, Bhupesh Sharma <bhsharma(a)redhat.com>
wrote:
>>>> Resolves: BZ1433852
>>>>
https://bugzilla.redhat.com/show_bug.cgi?id=1433852
>>>>
>>>> This patchset fixes a couple of issues reported by rpmlint
>>>> when it is run on kexec-tools:
>>>>
>>>> 1. Patch 1 fixes several instances of hardcoded-library-path errors.
>>>> 2. Patch 2 fixes a couple of whitespace errors.
>>>>
>>>> Bhupesh Sharma (2):
>>>> kexec-tools.spec: Fix hardcoded-library-path errors
>>>> kexec-tools.spec: Fix whitespace errors
>>>>
>>>> kexec-tools.spec | 18 +++++++++---------
>>>> 1 file changed, 9 insertions(+), 9 deletions(-)
>>>>
>>>> --
>>>> 2.7.4
>>>>
>>> Ping. Any comments on this patchset.
>>>
>>> I think its a relatively simple patchset and can be merged if there
>>> are no further comments.
>> Hi Bhupesh,
>>
>> I still got the following warnings/errors by rpmlint after applying your
patches:
>> # fedpkg lint
>> No srpm found
>> No rpm found
>> /root/git/kexec-tools/kexec-tools.spec:58: W: unversioned-explicit-obsoletes
diskdumputils
>> /root/git/kexec-tools/kexec-tools.spec:58: W: unversioned-explicit-obsoletes
netdump
>> /root/git/kexec-tools/kexec-tools.spec:58: W: unversioned-explicit-obsoletes
kexec-tools-eppic
>> /root/git/kexec-tools/kexec-tools.spec:176: E: use-of-RPM_SOURCE_DIR
>> /root/git/kexec-tools/kexec-tools.spec:1519: W: macro-in-%changelog %dir
>> /root/git/kexec-tools/kexec-tools.spec: W: invalid-url Source23:
kdump-anaconda-addon-005-25-g2a4398f.tar.gz
>> /root/git/kexec-tools/kexec-tools.spec: W: invalid-url Source19:
eppic_050615.tar.gz
>> 0 packages and 1 specfiles checked; 1 errors, 6 warnings.
>> Could not execute lint: Command 'rpmlint
/root/git/kexec-tools/kexec-tools.spec' returned non-zero exit status 64
>>
> As I noted in <
https://bugzilla.redhat.com/show_bug.cgi?id=1433852#c2>,
> (sorry I should I have captured this in the git log as well..) after
> analysing the rpmlint or fedpkg lint results on kexec-tools, I found
> two obvious issues which can be fixed:
>
> 1. Several instances of hardcoded-library-path errors.
> 2. Couple of whitespace errors.
>
> The rest of the issues reported by rpmlint or fedpkg lint and their
> root cause analysis is given below:
>
> 1. unversioned-explicit-obsoletes - requires the version of the
> package which was obsoleted (e.g. kexec-tools-eppic < x.y , where x.y
> denotes that all older versions than x.y have been obsoleted) :
>
> I couldn't find much information on the same from the earlier
> kexec-tools commit logs. If someone can point me to the version of
> these packages which were obsoleted, I can try and fix the following
> warnings as well:
>
> kexec-tools/kexec-tools.spec:58: W: unversioned-explicit-obsoletes diskdumputils
> kexec-tools/kexec-tools.spec:58: W: unversioned-explicit-obsoletes netdump
> kexec-tools/kexec-tools.spec:58: W: unversioned-explicit-obsoletes
> kexec-tools-eppic
>
> 2. The following error is a false positive as noted in the use of
> $RPM_SOURCE_DIR or %{_sourcedir} in
> <
https://fedoraproject.org/wiki/Packaging:RPM_Source_Dir>
>
> kexec-tools/kexec-tools.spec:176: E: use-of-RPM_SOURCE_DIR
>
> Since we use the following convention in the kexec-tools.spec, it
> falls under the supplementary source files category as noted in the
> *Exceptions* section of the above wiki page:
> SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_target_cpu}
>
> 3. This is a false positive in the change log history:
> kexec-tools/kexec-tools.spec:1499: W: macro-in-%changelog %dir
>
> 4. The following is also a false positive and as per
> <
https://bugzilla.redhat.com/show_bug.cgi?id=566978>, this warning can
> be ignored when the source reference inside the spec file is a file
> instead of a url
> (for e.g eppic_050615.tar.gz below):
>
> kexec-tools/kexec-tools.spec: W: invalid-url Source23:
> kdump-anaconda-addon-005-25-g2a4398f.tar.gz
> kexec-tools/kexec-tools.spec: W: invalid-url Source19: eppic_050615.tar.gz
>
> I took reference from
> <
https://fedoraproject.org/wiki/Common_Rpmlint_issues> to arrive at
> understanding of the above issues in detail.
Hi Bhupesh,
Thanks for the detailed information, seems there is no real effect on the final
kexec-tools rpm,
also dracut.spec acts the same as kexec-tools, cited as follows:
%define dracutlibdir %{_prefix}/lib/dracut
which is incorrect as per fedora rpm packaging guidelines, but
probably that also needs to be addressed for dracut .spec file in a
separate patch.
Moreover, seems "Patch 1/2" will install the kdump library
to {/usr}/lib64 instead of
the original {/usr}/lib on my x86_64 machine:
$ rpm -qf /lib64/kdump/kdump-lib.sh
kexec-tools-2.0.14-12.fc25.x86_64
$ rpm -qf /usr/lib64/kdump/kdump-lib.sh
kexec-tools-2.0.14-12.fc25.x86_64
as a result, this will cause issues like:
[root@ ~]$ kdumpctl restart
/usr/bin/kdumpctl: line 24: /lib/kdump/kdump-lib.sh: No such file or directory
kexec: unloaded kdump kernel
Stopping kdump: [OK]
/usr/bin/kdumpctl: line 374: strip_comments: command not found
Invalid kdump config value for option path.
Starting kdump: [FAILED]
I couldn't reproduce it on a FC26 x86_64 machine and also did not see
it earlier (which is why I was surprised by the issue you shared):
[root@hp-dl380pgen8-02-vm-7 ~]# kdumpctl restart
kexec: unloaded kdump kernel
Stopping kdump: [OK]
No kdump initial ramdisk found.
Rebuilding /boot/initramfs-4.11.0-2.fc26.x86_64kdump.img
kexec: loaded kdump kernel
Starting kdump: [OK]
[root@hp-dl380pgen8-02-vm-7 ~]# rpm -qf /lib64/kdump/kdump-lib.sh
kexec-tools-2.0.14-12.fc26.x86_64
[root@hp-dl380pgen8-02-vm-7 ~]# uname -r
4.11.0-2.fc26.x86_64
However, I noted the following issues on a FC24 x86_64 machine, which
seem related to this:
[root@ibm-x3650m4-02-vm-06 ~]# kdumpctl restart
kexec: unloaded kdump kernel
Stopping kdump: [OK]
/usr/bin/kdumpctl: line 495: is_mount_in_dracut_args: command not found
/usr/bin/kdumpctl: line 572: is_wdt_mod_omitted: command not found
kexec: loaded kdump kernel
Starting kdump: [OK]
The %{_libdir} directive, expands to /lib64/ as is confirmed by:
[root@ibm-x3650m4-02-vm-06 ~]# rpm --eval '%{_libdir}'
/usr/lib64
rather than /lib/, I think we need to add better handling of /lib*
folder paths in the kdump helper scripts as is already done by
dracut-init.sh (see [1]). I would rework this patchset to address this
issue in the kdump helper scripts as well.
[1]
https://git.kernel.org/pub/scm/boot/dracut/dracut.git/tree/dracut-init.sh...
Regards,
Bhupesh