Commit 390f33a4 authored by Ophélie Gagnard's avatar Ophélie Gagnard

install.sh: Install a specific python version (3.7.12) so that...

install.sh: Install a specific python version (3.7.12) so that scan-filesystem/cython/Makefile uses it and works everytime.
parent 0bc31dec
......@@ -3,9 +3,21 @@
set -eux
# installing miscellaneous useful packages
apt -y install make autopoint autoconf libtool libattr1.dev musl-tools mmv sbsigntool
apt -y install make autopoint autoconf libtool libattr1-dev musl-tools mmv sbsigntool
# installing more necessary packages to activate Secure Boot with our own keys
apt -y install efitools
# installing (download and compile)a specific version of python to make sure the whole installation process work
if [ ! -d "/opt/python-3.7.12/include/python3.7m" ]; then
wget https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tgz
tar zxf Python-3.7.12.tgz
cd Python-3.7.12/
./configure --prefix=/opt/python-3.7.12
make
make install
cd ..
fi
rm -f Python-3.7.12.tgz
rm -rf Python-3.7.12/
## Install dracut
if ! which dracut ; then
......
......@@ -2,6 +2,7 @@
ifeq (,)
INCLUDE_DIRS = -I/usr/include/python3.7
PYTYON_PATH = /opt/python-3.7.12/include/python3.7m/
else
......@@ -49,10 +50,10 @@ run: $(EXT)
nopython: main.cpp#$(EXE)
mkdir -p logs
# Error expected here, writing a C program using the error messages
-g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread -I/usr/include/python3.7 main.cpp -lcrypto -lfmt -o main 2> logs/link_errors
-g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread -I$(PYTHON_PATH) main.cpp -lcrypto -lfmt -o main 2> logs/link_errors
./parse_link_errors.py < logs/link_errors
make fake_python.o
g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread -I/usr/include/python3.7 main.cpp fake_python.o -lcrypto -lfmt -o metadata-collect-agent
g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread -I$(PYTHON_PATH) main.cpp fake_python.o -lcrypto -lfmt -o metadata-collect-agent
#-ln -f ../../metadata-collect-agent metadata-collect-agent
-ln -f metadata-collect-agent ../../dracut.module/90metadata-collect/metadata-collect-agent
#-ln -f metadata-collect-agent ../../debian.package.unsafe/unsafe-boot-metadata-collect-agent/sbin/metadata-collect-agent
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment