mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-08-24 21:21:47 +02:00
Bubblewrap and libcap install scripts
This commit is contained in:
parent
7c285bddf3
commit
720a63aadf
53
INSTALL.rst
53
INSTALL.rst
@ -45,6 +45,8 @@ Requirements
|
|||||||
- |ZeroMQ| : networking library
|
- |ZeroMQ| : networking library
|
||||||
- `GMP <https://gmplib.org/>`_ : Gnu Multiple Precision Arithmetic Library
|
- `GMP <https://gmplib.org/>`_ : Gnu Multiple Precision Arithmetic Library
|
||||||
- |OCaml| compiler with |OPAM| package manager
|
- |OCaml| compiler with |OPAM| package manager
|
||||||
|
- `Bubblewrap <https://github.com/projectatomic/bubblewrap>`_ : Sandboxing tool required by Opam
|
||||||
|
- `libcap https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git`_ : POSIX capabilities required by Bubblewrap
|
||||||
- |Ninja| : a parallel build system
|
- |Ninja| : a parallel build system
|
||||||
|
|
||||||
|
|
||||||
@ -86,6 +88,8 @@ The following packages are supported by the :command:`configure` installer:
|
|||||||
* zeromq
|
* zeromq
|
||||||
* f77zmq
|
* f77zmq
|
||||||
* gmp
|
* gmp
|
||||||
|
* libcap
|
||||||
|
* bwrap
|
||||||
* ocaml ( :math:`\approx` 10 minutes)
|
* ocaml ( :math:`\approx` 10 minutes)
|
||||||
* ezfio
|
* ezfio
|
||||||
* docopt
|
* docopt
|
||||||
@ -243,6 +247,55 @@ With Debian or Ubuntu, you can use
|
|||||||
sudo apt install libgmp-dev
|
sudo apt install libgmp-dev
|
||||||
|
|
||||||
|
|
||||||
|
libcap
|
||||||
|
------
|
||||||
|
|
||||||
|
Libcap is a library for getting and setting POSIX.1e draft 15 capabilities.
|
||||||
|
|
||||||
|
* Download the latest version of libcap here:
|
||||||
|
`<https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git/snapshot/libcap-2.25.tar.gz>`_
|
||||||
|
and move it in the :file:`${QP_ROOT}/external` directory
|
||||||
|
|
||||||
|
* Extract the archive, go into the :file:`libcap-*/libcap` directory and run
|
||||||
|
the following command
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
prefix=$QP_ROOT make install
|
||||||
|
|
||||||
|
With Debian or Ubuntu, you can use
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
sudo apt install libcap-dev
|
||||||
|
|
||||||
|
|
||||||
|
Bubblewrap
|
||||||
|
----------
|
||||||
|
|
||||||
|
Bubblewrap is an unprivileged sandboxing tool.
|
||||||
|
|
||||||
|
* Download Bubblewrap here:
|
||||||
|
`<https://github.com/projectatomic/bubblewrap/releases/download/v0.3.3/bubblewrap-0.3.3.tar.xz>`_
|
||||||
|
and move it in the :file:`${QP_ROOT}/external` directory
|
||||||
|
|
||||||
|
* Extract the archive, go into the :file:`bubblewrap-*` directory and run
|
||||||
|
the following commands
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
./configure --prefix=$QP_ROOT && make -j 8
|
||||||
|
make install-exec-am
|
||||||
|
|
||||||
|
|
||||||
|
With Debian or Ubuntu, you can use
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
sudo apt install bubblewrap
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OCaml
|
OCaml
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
40
configure
vendored
40
configure
vendored
@ -175,7 +175,7 @@ if [[ "${PACKAGES}.x" != ".x" ]] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${PACKAGES} = all ]] ; then
|
if [[ ${PACKAGES} = all ]] ; then
|
||||||
PACKAGES="zlib ninja irpf90 zeromq f77zmq gmp ocaml ezfio docopt resultsFile bats"
|
PACKAGES="bwrap libcap zlib ninja irpf90 zeromq f77zmq gmp ocaml ezfio docopt resultsFile bats"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -206,6 +206,32 @@ EOF
|
|||||||
make install
|
make install
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
elif [[ ${PACKAGE} = bwrap ]] ; then
|
||||||
|
|
||||||
|
download \
|
||||||
|
"https://github.com/projectatomic/bubblewrap/releases/download/v0.3.3/bubblewrap-0.3.3.tar.xz" \
|
||||||
|
"${QP_ROOT}"/external/bwrap.tar.xz
|
||||||
|
execute << EOF
|
||||||
|
cd "\${QP_ROOT}"/external
|
||||||
|
tar --xz --extract --file bwrap.tar.xz
|
||||||
|
rm bwrap.tar.xz
|
||||||
|
cd bubblewrap*
|
||||||
|
./configure --prefix=$QP_ROOT && make -j 8
|
||||||
|
make install-exec-am
|
||||||
|
EOF
|
||||||
|
|
||||||
|
elif [[ ${PACKAGE} = libcap ]] ; then
|
||||||
|
|
||||||
|
download \
|
||||||
|
"https://git.kernel.org/pub/scm/linux/kernel/git/morgan/libcap.git/snapshot/libcap-2.25.tar.gz" \
|
||||||
|
"${QP_ROOT}"/external/libcap.tar.gz
|
||||||
|
execute << EOF
|
||||||
|
cd "\${QP_ROOT}"/external
|
||||||
|
tar --gunzip --extract --file libcap.tar.gz
|
||||||
|
rm libcap.tar.gz
|
||||||
|
cd libcap-*/libcap
|
||||||
|
prefix=$QP_ROOT make install
|
||||||
|
EOF
|
||||||
|
|
||||||
elif [[ ${PACKAGE} = irpf90 ]] ; then
|
elif [[ ${PACKAGE} = irpf90 ]] ; then
|
||||||
|
|
||||||
@ -399,6 +425,18 @@ if [[ ${ZLIB} = $(not_found) ]] ; then
|
|||||||
fail
|
fail
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
BWRAP=$(find_exe bwrap)
|
||||||
|
if [[ ${BWRAP} = $(not_found) ]] ; then
|
||||||
|
error "Bubblewrap (bwrap) is not installed."
|
||||||
|
fail
|
||||||
|
fi
|
||||||
|
|
||||||
|
LIBCAP=$(find_lib -lcap)
|
||||||
|
if [[ ${LIBCAP} = $(not_found) ]] ; then
|
||||||
|
error "Libcap (libcap) is not installed."
|
||||||
|
fail
|
||||||
|
fi
|
||||||
|
|
||||||
OPAM=$(find_exe opam)
|
OPAM=$(find_exe opam)
|
||||||
if [[ ${OPAM} = $(not_found) ]] ; then
|
if [[ ${OPAM} = $(not_found) ]] ; then
|
||||||
error "OPAM (ocaml) package manager is not installed."
|
error "OPAM (ocaml) package manager is not installed."
|
||||||
|
Loading…
Reference in New Issue
Block a user