Skip to content

Commit

Permalink
python: Fixup python shebangs to python3.
Browse files Browse the repository at this point in the history
Builds on RHEL 8.2 systems are failing due to this issue.

See [1] as to why this is necessary.

I used the following command to identify files that need this fix:
find . -type f -executable | /usr/lib/rpm/redhat/brp-mangle-shebangs

I also updated the copyright notices as needed.

1. https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error

Fixes: 1ca0323 ("Require Python 3 and remove support for Python 2.")
Signed-off-by: Greg Rose <[email protected]>
Acked-by: Aaron Conole <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
gvrose8192 authored and igsilya committed Aug 26, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 79a5251 commit 90c1cb3
Showing 13 changed files with 52 additions and 23 deletions.
4 changes: 2 additions & 2 deletions ofproto/ipfix-gen-entities
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (C) 2012 Nicira, Inc.
# Copyright (C) 2012, 2020 Nicira, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
4 changes: 2 additions & 2 deletions ovsdb/dot2pic
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env python
#!/usr/bin/env python3

# Copyright (c) 2009, 2010, 2011, 2013, 2017 Nicira, Inc.
# Copyright (c) 2009, 2010, 2011, 2013, 2017, 2020 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
4 changes: 2 additions & 2 deletions ovsdb/ovsdb-doc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/python
#!/usr/bin/python3

# Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
# Copyright (c) 2010, 2011, 2012, 2013, 2014, 2015, 2020 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
4 changes: 2 additions & 2 deletions python/build/soutil.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env python
#!/usr/bin/env python3

# Copyright (c) 2008, 2017 Nicira, Inc.
# Copyright (c) 2008, 2017, 2020 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
15 changes: 14 additions & 1 deletion tests/ovsdb-monitor-sort.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#! /usr/bin/env python
#!/usr/bin/env python3
# Copyright (c) 2020 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Breaks lines read from stdin into groups using blank lines as
# group separators, then sorts lines within the groups for
4 changes: 2 additions & 2 deletions tests/sendpkt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env python
#!/usr/bin/env python3

# Copyright (c) 2018 VMware, Inc.
# Copyright (c) 2018, 2020 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
4 changes: 2 additions & 2 deletions tests/test-l7.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright (c) 2015, 2016 Nicira, Inc.
#!/usr/bin/env python3
# Copyright (c) 2015, 2016, 2020 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
18 changes: 17 additions & 1 deletion tests/uuidfilt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright (c) 2020 VMware, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Breaks lines read from stdin into groups using blank lines as
# group separators, then sorts lines within the groups for
# reproducibility.

import re
import sys
4 changes: 2 additions & 2 deletions utilities/ovs-dev.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright (c) 2013, 2014, 2015, 2016 Nicira, Inc.
#!/usr/bin/env python3
# Copyright (c) 2013, 2014, 2015, 2016, 2020 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
4 changes: 2 additions & 2 deletions utilities/ovs-pipegen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env python
# Copyright (c) 2013, 2014, 2015 Nicira, Inc.
#! /usr/bin/env python3
# Copyright (c) 2013, 2014, 2015, 2020 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
4 changes: 2 additions & 2 deletions xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# xapi plugin script to update the cache of configuration items in the
# ovs-vswitchd configuration that are managed in the xapi database when
# integrated with Citrix management tools.

# Copyright (C) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2020 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
2 changes: 1 addition & 1 deletion xenserver/opt_xensource_libexec_interface-reconfigure
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2008,2009 Citrix Systems, Inc.
#
4 changes: 2 additions & 2 deletions xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env python
# Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
#!/usr/bin/env python3
# Copyright (c) 2009, 2010, 2011, 2012, 2013, 2020 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

0 comments on commit 90c1cb3

Please sign in to comment.