From 26978384222350e328ee29b3a17c6556b8f23af8 Mon Sep 17 00:00:00 2001 From: Jashank Jeremy Date: Mar 24 2020 03:04:37 +0000 Subject: Issue 50971 - Back out use of `env' and `sed' detection. Bug Description: As noted by @vashirov, both Debian and Fedora packaging guidelines forbid use of `env' in Python shebangs. Fix Description: Back out parts of changes introduced in PR 50969; these changes will be rolled into the FreeBSD port. FreeBSD users will not be able to build from a tarball. Relates: https://pagure.io/389-ds-base/issue/50971 Author: Jashank Jeremy (@jashankj) Review by: [ - ] --- diff --git a/autogen.sh b/autogen.sh index 058cec8..06a5fac 100755 --- a/autogen.sh +++ b/autogen.sh @@ -59,15 +59,8 @@ checkvers() { return 0 } -# We use GNU sed-isms, so if `gsed' exists, use that instead. -sed=sed -if command -v gsed >/dev/null -then - sed=gsed -fi - # Check autoconf version -AC_VERSION=`autoconf --version | $sed '/^autoconf/ {s/^.* \([1-9][0-9.]*\)$/\1/; q}'` +AC_VERSION=`autoconf --version | sed '/^autoconf/ {s/^.* \([1-9][0-9.]*\)$/\1/; q}'` if checkvers "$AC_VERSION" $ac_need_maj $ac_need_min ; then echo Found valid autoconf version $AC_VERSION else @@ -76,7 +69,7 @@ else fi # Check automake version -AM_VERSION=`automake --version | $sed '/^automake/ {s/^.* \([1-9][0-9.]*\)$/\1/; q}'` +AM_VERSION=`automake --version | sed '/^automake/ {s/^.* \([1-9][0-9.]*\)$/\1/; q}'` if checkvers "$AM_VERSION" $am_need_maj $am_need_min $am_need_rev ; then echo Found valid automake version $AM_VERSION else @@ -90,7 +83,7 @@ fi # letter - note that the shell -lt and -gt comparisons will fail with # test: 6b: integer expression expected if the number to compare # contains a non-digit -LT_VERSION=`libtool --version | $sed '/GNU libtool/ {s/^.* \([1-9][0-9a-zA-Z.]*\)$/\1/; s/[a-zA-Z]//g; q}'` +LT_VERSION=`libtool --version | sed '/GNU libtool/ {s/^.* \([1-9][0-9a-zA-Z.]*\)$/\1/; s/[a-zA-Z]//g; q}'` if checkvers "$LT_VERSION" $lt_need_maj $lt_need_min $lt_need_rev ; then echo Found valid libtool version $LT_VERSION else diff --git a/buildnum.py b/buildnum.py index eff4b44..c2cede7 100755 --- a/buildnum.py +++ b/buildnum.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/python3 # --- BEGIN COPYRIGHT BLOCK --- # Copyright (C) 2020 Red Hat, Inc. # All rights reserved.