From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has uploaded a new change for review.
Change subject: spec: rpmlint: clean non-executable-script ......................................................................
spec: rpmlint: clean non-executable-script
This patch removes the shebang from python modules that are not executable. It makes sure that python scripts are marked as such by autoconf, and that no python file would be listed as both a script and a module.
Change-Id: I0b2ccc1157880b75286097f0c2623616779f0113 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M automation/check-patch.sh M lib/api/vdsmapi.py M lib/vdsm/tool/dummybr.py M lib/vdsm/tool/nwfilter.py M tests/Makefile.am M tests/alignmentScanTests.py M vdsm.spec.in M vdsm/virt/Makefile.am 8 files changed, 4 insertions(+), 18 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/48/69348/1
diff --git a/automation/check-patch.sh b/automation/check-patch.sh index ee89fef..939161b 100755 --- a/automation/check-patch.sh +++ b/automation/check-patch.sh @@ -30,5 +30,5 @@ yum -y install "$EXPORT_DIR/"!(*.src).rpm export LC_ALL=C # no idea why this is suddenly needed rpmlint "$EXPORT_DIR/"*.src.rpm - ! rpmlint "$EXPORT_DIR/"!(*.src).rpm | grep '(dir-or-file-in-var-run|wrong-script-interpreter)' + ! rpmlint "$EXPORT_DIR/"!(*.src).rpm | grep '(dir-or-file-in-var-run|wrong-script-interpreter|non-executable-script)' fi diff --git a/lib/api/vdsmapi.py b/lib/api/vdsmapi.py index 7392a3d..57d9aba 100755 --- a/lib/api/vdsmapi.py +++ b/lib/api/vdsmapi.py @@ -1,4 +1,3 @@ -#!/usr/bin/python2 # # Copyright 2016 Red Hat, Inc. # diff --git a/lib/vdsm/tool/dummybr.py b/lib/vdsm/tool/dummybr.py index 8624eb9..01ffb6f 100644 --- a/lib/vdsm/tool/dummybr.py +++ b/lib/vdsm/tool/dummybr.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # Copyright 2012 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify @@ -56,7 +55,3 @@ if not os.path.exists('/sys/class/net/%s' % DUMMY_BRIDGE): createEphemeralBridge(DUMMY_BRIDGE) addBridgeToLibvirt(DUMMY_BRIDGE) - - -if __name__ == '__main__': - main() diff --git a/lib/vdsm/tool/nwfilter.py b/lib/vdsm/tool/nwfilter.py index 7b1bdb4..bcb5cfd 100755 --- a/lib/vdsm/tool/nwfilter.py +++ b/lib/vdsm/tool/nwfilter.py @@ -1,4 +1,3 @@ -#! /usr/bin/python2 # Copyright 2012-2013 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify @@ -92,6 +91,3 @@ <filterref filter='no-mac-spoofing'/> <filterref filter='no-arp-mac-spoofing'/> </filter> ''' - -if __name__ == '__main__': - main() diff --git a/tests/Makefile.am b/tests/Makefile.am index 3976889..fbe242b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -340,9 +340,6 @@ hookValidation.py \ fakelib.py \ fakesanlock.py \ - fake-virt-v2v \ - fake-ssh-add \ - fake-ssh-agent \ monkeypatch.py \ storagefakelib.py \ storagetestlib.py \ @@ -354,8 +351,10 @@ $(NULL)
dist_vdsmtests_SCRIPTS = \ + fake-virt-v2v \ + fake-ssh-add \ + fake-ssh-agent \ run_tests.sh \ - testValidation.py \ $(NULL)
all-local: \ diff --git a/tests/alignmentScanTests.py b/tests/alignmentScanTests.py index da589f9..762c8a5 100644 --- a/tests/alignmentScanTests.py +++ b/tests/alignmentScanTests.py @@ -1,4 +1,3 @@ -#!/usr/bin/python2 # # Copyright (c) 2016 Red Hat, Inc. # Copyright (c) 2012, Sasha Tomic tomic80@gmail.com diff --git a/vdsm.spec.in b/vdsm.spec.in index eef5a4f..1f4858a 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -896,7 +896,6 @@ %{_datadir}/%{vdsm_name}/virt/recovery.py* %{_datadir}/%{vdsm_name}/virt/vmtune.py* %{_datadir}/%{vdsm_name}/virt/vm.py* -%{_datadir}/%{vdsm_name}/virt/vm_migrate_hook.py* %{_datadir}/%{vdsm_name}/virt/vmxml.py* %{_datadir}/%{vdsm_name}/virt/vmdevices/__init__.py* %{_datadir}/%{vdsm_name}/virt/vmdevices/common.py* diff --git a/vdsm/virt/Makefile.am b/vdsm/virt/Makefile.am index 7ee277d..897faf0 100644 --- a/vdsm/virt/Makefile.am +++ b/vdsm/virt/Makefile.am @@ -28,7 +28,6 @@ domain_descriptor.py \ recovery.py \ vm.py \ - vm_migrate_hook.py \ vmtune.py \ vmxml.py \ $(NULL)
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: spec: rpmlint: clean non-executable-script ......................................................................
Patch Set 1:
ci please build
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: spec: rpmlint: clean non-executable-script ......................................................................
Patch Set 1:
(2 comments)
https://gerrit.ovirt.org/#/c/69348/1/tests/Makefile.am File tests/Makefile.am:
PS1, Line 358:
where is testValidation.py?
It is under dist_vdsmtests_PYTHON. It should be ONLY there, since it does not need to be executable.
https://gerrit.ovirt.org/#/c/69348/1/vdsm/virt/Makefile.am File vdsm/virt/Makefile.am:
PS1, Line 31:
what happened to the hook?
it should be ONLY and executable (it is never imported) and should be deployed ONLY under /usr/libexec/vdsm.
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has posted comments on this change.
Change subject: spec: rpmlint: clean non-executable-script ......................................................................
Patch Set 2: Verified+1
From Dan Kenigsberg danken@redhat.com:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: spec: rpmlint: clean non-executable-script ......................................................................
spec: rpmlint: clean non-executable-script
This patch removes the shebang from python modules that are not executable. It makes sure that python scripts are marked as such by autoconf, and that no python file is listed as both a script and a module.
Change-Id: I0b2ccc1157880b75286097f0c2623616779f0113 Signed-off-by: Dan Kenigsberg danken@redhat.com --- M automation/check-patch.sh M lib/api/vdsmapi.py M lib/vdsm/tool/dummybr.py M lib/vdsm/tool/nwfilter.py M tests/Makefile.am M tests/alignmentScanTests.py M vdsm.spec.in M vdsm/virt/Makefile.am M vdsm_hooks/checkips/checkips_utils.py 9 files changed, 4 insertions(+), 19 deletions(-)
Approvals: Piotr Kliczewski: Looks good to me, approved Jenkins CI: Passed CI tests Irit Goihman: Looks good to me, but someone else must approve Dan Kenigsberg: Verified
vdsm-patches@lists.fedorahosted.org