yum package module: wrong python interpreter

21 views
Skip to first unread message

Xander Cage

unread,
Sep 11, 2020, 8:01:36 AM9/11/20
to help-cfengine

hi,

autogen.sh from a git clone of masterfiles produces a non working yum package module...

root@nimmsag: /home/tremch/git_cfengine/masterfiles_clone/modules/packages # git branch
* 3.12.5
  master

root@nimmsag
: /home/tremch/git_cfengine/masterfiles_clone # ./auto
autogen
.sh      autom4te.cache/
root@nimmsag
: /home/tremch/git_cfengine/masterfiles_clone # ./autogen.sh
./autogen.sh: Running determine-version.sh ...
./autogen.sh: Running autoreconf ...
/home/tremch/git_cfengine/masterfiles_clone
checking build system type
... powerpc-ibm-aix7.2.4.0
checking host system type
... powerpc-ibm-aix7.2.4.0
checking target system type
... powerpc-ibm-aix7.2.4.0
checking
for a BSD-compatible install... /usr/bin/install -c
checking whether build environment
is sane... yes
checking
for a thread-safe mkdir -p... /opt/freeware/bin/mkdir -p
checking
for gawk... gawk
checking whether make sets $
(MAKE)... yes
checking whether make supports nested variables
... yes
checking whether UID
'0' is supported by ustar format... yes
checking whether GID
'0' is supported by ustar format... yes
checking how to create a ustar tar archive
... gnutar
checking
if GNU tar supports --hard-dereference... yes
checking whether to enable maintainer
-specific portions of Makefiles... yes
checking whether make supports nested variables
... (cached) yes
checking
for pkg_install... no
checking
for shunit2... no

Summary:
Version              -> 3.12.5
Core directory       -> not set - tests are disabled
Enterprise directory -> not set - some tests are disabled
Install prefix       -> /var/cfengine
bindir              
-> /var/cfengine/bin

configure
: generating makefile targets
checking that generated files are newer than configure
... done
configure
: creating ./config.status
config
.status: creating Makefile
config
.status: creating controls/update_def.cf
config
.status: creating modules/packages/Makefile
config
.status: creating modules/packages/apt_get
config
.status: creating modules/packages/yum
config
.status: creating modules/packages/zypper
config
.status: creating promises.cf
config
.status: creating standalone_self_upgrade.cf
config
.status: creating tests/Makefile
config
.status: creating tests/acceptance/Makefile
config
.status: creating tests/unit/Makefile

DONE
: Configuration done. Run "make install" to install CFEngine Masterfiles.

root@nimmsag
: /home/tremch/git_cfengine/masterfiles_clone/modules/packages # vi yum
#!/var/cfengine/bin/python

import sys
import os
import subprocess
import re




not sure whats the reason behind this, but this will never work...setting the interpreter line to #!/usr/bin/python fixed this locally.

chris

Vratislav Podzimek

unread,
Sep 11, 2020, 10:43:06 AM9/11/20
to help-c...@googlegroups.com
It works if MPF is fully used, because part of 'update.cf' is a creation of the
'/var/cfengine/bin/python' symlink pointing to '/usr/bin/python' or '/usr/bin/python3' (or some
other possible files).

--
Vratislav
signature.asc

Xander Cage

unread,
Sep 13, 2020, 2:04:24 AM9/13/20
to help-cfengine
no, does definitely not work. firstly the python interpreter string follows the "--prefix" configure option and as i am installing into a separate git repo python is never found. the whole python linking stuff is not aix compatible to, so as i have a 100% aix environment no luck ony my side.

Xander Cage

unread,
Sep 14, 2020, 3:10:59 AM9/14/20
to help-cfengine
everything said above also concerns the zypper module btw...

Bas van der Vlies

unread,
Sep 14, 2020, 3:30:40 AM9/14/20
to christia...@itsv.at, help-c...@googlegroups.com
You can specify your own python path for the package module:
*
https://docs.cfengine.com/docs/3.15/reference-promise-types-packages.html#interpreter

Maybe this is a solution for you.


regards

Xander Cage

unread,
Sep 14, 2020, 4:09:08 AM9/14/20
to help-cfengine
ah..that helps, good to know, thank you.
Reply all
Reply to author
Forward
0 new messages