From b413ba0271d71a0f07daff943dbd9e859c4f6dd4 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Aug 10 2018 13:39:05 +0000 Subject: Ticket 49891 - Use "--python3" macro for python scripts Description: Make sure all python scripts use the macro "__python3" for its shebang. https://pagure.io/389-ds-base/issue/49891 Reviewed by: vashirov(Thanks!) --- diff --git a/ldap/admin/src/scripts/ds-logpipe.py b/ldap/admin/src/scripts/ds-logpipe.py index f29a9ff..fd67682 100644 --- a/ldap/admin/src/scripts/ds-logpipe.py +++ b/ldap/admin/src/scripts/ds-logpipe.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 from __future__ import print_function diff --git a/ldap/admin/src/scripts/ds-replcheck b/ldap/admin/src/scripts/ds-replcheck index 3b96cb6..feae3f8 100755 --- a/ldap/admin/src/scripts/ds-replcheck +++ b/ldap/admin/src/scripts/ds-replcheck @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # --- BEGIN COPYRIGHT BLOCK --- # Copyright (C) 2018 Red Hat, Inc. diff --git a/rpm/389-ds-base.spec.in b/rpm/389-ds-base.spec.in index af34aba..6eeaccf 100644 --- a/rpm/389-ds-base.spec.in +++ b/rpm/389-ds-base.spec.in @@ -329,6 +329,9 @@ A cockpit UI Plugin for configuring and administering the 389 Directory Server cp %{SOURCE2} README.devel +# Make sure python3 is used in shebangs +sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!%{__python3}|' ldap/admin/src/scripts/{*.py,ds-replcheck,readnsstate} + %build %if %{use_clang}