Commit 13c4ee26 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

We need to create temporary home folder as pip brings alot of files during build

parent b31089fa
......@@ -29,15 +29,17 @@ all: mongodb-service
tar xf mongo-r4.2.4.tar.gz
patch -Np1 -d mongo-r4.2.4 < mongo-r4.2.4-no_debug.patch
cd mongo-r4.2.4 && pip3 install -r buildscripts/requirements.txt
mkdir mongo-home
cd mongo-r4.2.4 && HOME=$(CURDIR)/mongo-home pip3 install -r buildscripts/requirements.txt
cd mongo-r4.2.4 && scons all --release --opt=on --disable-warnings-as-errors MONGO_VERSION=4.2.4 -j 1
cd mongo-r4.2.4 && scons --prefix=/usr install --disable-warnings-as-errors MONGO_VERSION=4.2.4
cd mongo-r4.2.4 && pip3 uninstall -y -r buildscripts/requirements.txt
cd mongo-r4.2.4 && HOME=$(CURDIR)/mongo-home pip3 uninstall -y -r buildscripts/requirements.txt
@echo "$$MONGODB_SERVICE" > /lib/systemd/system/mongodb.service
systemctl enable mongodb.service
install -v -Dm755 mongod.conf /etc
install -v -m755 -o mongodb -g mongodb -d /var/lib/mongodb
@echo "d /run/mongodb 755 mongodb mongodb -" > /usr/lib/tmpfiles.d/mongodb.conf
rm -rf mongo-home
rm -rf mongo-r4.2.4
swapoff swap
......@@ -60,5 +62,5 @@ TimeoutStartSec=180
[Install]
WantedBy=multi-user.target
endef MONGODB_SERVICE
endef
export MONGODB_SERVICE
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