Skip to content

Commit

Permalink
launch Python interpreter with "sane" options
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjelinek committed Mar 22, 2017
1 parent 3f51226 commit a60ef43
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -29,10 +29,13 @@
[rhbz#1434111])
- Pcs no longer allows to create a stonith resource based on an agent whose
name contains a colon ([rhbz#1415080])
- Pcs command now launches Python interpreter with "sane" options (python -Es)
([rhbz#1328882])

[CVE-2017-2661]: https://access.redhat.com/security/cve/CVE-2017-2661
[rhbz#1303969]: https://bugzilla.redhat.com/show_bug.cgi?id=1303969
[rhbz#1315627]: https://bugzilla.redhat.com/show_bug.cgi?id=1315627
[rhbz#1328882]: https://bugzilla.redhat.com/show_bug.cgi?id=1328882
[rhbz#1334429]: https://bugzilla.redhat.com/show_bug.cgi?id=1334429
[rhbz#1362493]: https://bugzilla.redhat.com/show_bug.cgi?id=1362493
[rhbz#1378742]: https://bugzilla.redhat.com/show_bug.cgi?id=1378742
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Expand Up @@ -5,7 +5,7 @@ IS_DEBIAN=false
DISTRO_DEBIAN_VER_8=false

ifndef PYTHON
PYTHON=python
PYTHON := $(shell which python)
endif

ifeq ($(UNAME_OS_GNU),true)
Expand Down Expand Up @@ -99,7 +99,14 @@ pcsd_fonts = \
install:
# make Python interpreter execution sane (via -Es flags)
echo -e "[build]\nexecutable = $(PYTHON) -Es\n" > setup.cfg
$(PYTHON) setup.py install --root=$(or ${DESTDIR}, /) ${EXTRA_SETUP_OPTS}
# fix excessive script interpreting "executable" quoting with old setuptools:
# https://github.com/pypa/setuptools/issues/188
# https://bugzilla.redhat.com/1353934
sed -i '1s|^\(#!\)"\(.*\)"$$|\1\2|' ${DESTDIR}${PREFIX}/bin/pcs
rm setup.cfg
mkdir -p ${DESTDIR}${PREFIX}/sbin/
mv ${DESTDIR}${PREFIX}/bin/pcs ${DESTDIR}${PREFIX}/sbin/pcs
install -D -m644 pcs/bash_completion ${BASH_COMPLETION_DIR}/pcs
Expand Down

0 comments on commit a60ef43

Please sign in to comment.