slinabery pushed to openstack-tempest (master). "Use patchfile to remove shebangs (..more)"

notifications at fedoraproject.org notifications at fedoraproject.org
Thu May 7 21:47:01 UTC 2015


From 66eb918f1775ed3cdd1125d34e6b6bbce790dd6a Mon Sep 17 00:00:00 2001
From: Steve Linabery <slinaber at redhat.com>
Date: Thu, 7 May 2015 16:46:51 -0500
Subject: Use patchfile to remove shebangs

Change-Id: I7d22163e68acaab3ce7af6a2815e7e9b4c580d39

diff --git a/0001-Remove-some-shebangs.patch b/0001-Remove-some-shebangs.patch
new file mode 100644
index 0000000..177cf23
--- /dev/null
+++ b/0001-Remove-some-shebangs.patch
@@ -0,0 +1,44 @@
+From 46d633a27387abcef10b6bdc42f4c9a64975c6d9 Mon Sep 17 00:00:00 2001
+From: Steve Linabery <slinaber at redhat.com>
+Date: Thu, 7 May 2015 16:24:23 -0500
+Subject: [PATCH] Remove some shebangs
+
+---
+ tempest/cmd/cleanup_service.py  | 2 --
+ tempest/common/api_discovery.py | 2 --
+ tempest/stress/cleanup.py       | 2 --
+ 3 files changed, 6 deletions(-)
+
+diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py
+index 1ad12eb..94541e2 100644
+--- a/tempest/cmd/cleanup_service.py
++++ b/tempest/cmd/cleanup_service.py
+@@ -1,5 +1,3 @@
+-#!/usr/bin/env python
+-
+ # Copyright 2014 Dell Inc.
+ #
+ #    Licensed under the Apache License, Version 2.0 (the "License"); you may
+diff --git a/tempest/common/api_discovery.py b/tempest/common/api_discovery.py
+index 59fc87b..6433d39 100644
+--- a/tempest/common/api_discovery.py
++++ b/tempest/common/api_discovery.py
+@@ -1,5 +1,3 @@
+-#!/usr/bin/env python
+-
+ # Copyright 2013 Red Hat, Inc.
+ #
+ #    Licensed under the Apache License, Version 2.0 (the "License"); you may
+diff --git a/tempest/stress/cleanup.py b/tempest/stress/cleanup.py
+index 29c4401..e4791c9 100644
+--- a/tempest/stress/cleanup.py
++++ b/tempest/stress/cleanup.py
+@@ -1,5 +1,3 @@
+-#!/usr/bin/env python
+-
+ # Copyright 2013 Quanta Research Cambridge, Inc.
+ #
+ #    Licensed under the Apache License, Version 2.0 (the "License");
+-- 
+1.9.3
+
diff --git a/openstack-tempest.spec b/openstack-tempest.spec
index 34ede49..92bf386 100644
--- a/openstack-tempest.spec
+++ b/openstack-tempest.spec
@@ -3,13 +3,15 @@
 Name:           openstack-tempest
 Epoch:          1
 Version:        kilo
-Release:        %{timestamp}.1%{?dist}
+Release:        %{timestamp}.2%{?dist}
 Summary:        OpenStack Integration Test Suite (Tempest)
 License:        ASL 2.0
 Url:            https://github.com/redhat-openstack/tempest
 Source0:        https://github.com/redhat-openstack/tempest/archive/openstack-tempest-%{version}-%{timestamp}.tar.gz
 BuildArch:      noarch
 
+Patch0001: 0001-Remove-some-shebangs.patch
+
 BuildRequires:  fdupes
 BuildRequires:  python-sphinx
 BuildRequires:  python-d2to1
@@ -59,10 +61,7 @@ other specific tests useful in validating an OpenStack deployment.
 
 %prep
 %setup -q -n tempest-%{name}-%{version}-%{timestamp}
-# remove shebangs and fix permissions
-find -type f -a \( -name '*.py' -o -name 'py.*' \) \
-   -exec sed -i '1{/^#!/d}' {} \; \
-   -exec chmod u=rw,go=r {} \;
+%patch0001 -p1
 
 %install
 mkdir -p %{buildroot}%{_datarootdir}/%{name}-%{version}
@@ -80,6 +79,9 @@ cp --preserve=mode -r . %{buildroot}%{_datarootdir}/%{name}-%{version}
 %exclude %{_datarootdir}/%{name}-%{version}/.coveragerc
 
 %changelog
+* Thu May 07 2015 Steve Linabery <slinaber at redhat.com> - kilo-20150507.2
+- Remove shebangs from specific .py files with patch file
+
 * Thu May 07 2015 Steve Linabery <slinaber at redhat.com> - kilo-20150507.1
 - Rebase to new midstream tag on kilo branch
 
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/openstack-tempest.git/commit/?h=master&id=66eb918f1775ed3cdd1125d34e6b6bbce790dd6a


More information about the scm-commits mailing list