]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
doc: add build & install
authorIker Pedrosa <ipedrosa@redhat.com>
Tue, 14 Mar 2023 15:41:30 +0000 (16:41 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 3 Apr 2023 15:42:22 +0000 (10:42 -0500)
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
doc/contributions/build_install.md [new file with mode: 0644]

diff --git a/doc/contributions/build_install.md b/doc/contributions/build_install.md
new file mode 100644 (file)
index 0000000..2c0618d
--- /dev/null
@@ -0,0 +1,68 @@
+# Build & install
+
+The following page explains how to build and install the shadow project.
+Additional information on how to do this in a container environment is provided
+at the end of the page.
+
+## Local
+
+### Dependency installation
+
+This projects depends on other software packages that need to be installed
+before building it. We recommend using the dependency installation commands
+provided by the distributions to install them. Some examples below.
+
+Debian:
+```
+apt-get build-dep shadow
+```
+
+Fedora:
+```
+dnf builddep shadow-utils
+```
+
+### Configure
+
+The first step is to configure it. You can use the
+`autogen.sh` script provided by the project. Example:
+
+```
+./autogen.sh --without-selinux --enable-man --with-yescrypt
+```
+
+### Build
+
+The next step is to build the project:
+
+```
+make -j4
+```
+
+### Install
+
+The last step is to install it. We recommend avoiding this step and using a
+disposable system like a VM or a container instead.
+
+```
+make install
+```
+
+## Containers
+
+Alternatively, you can use any of the preconfigured container images builders
+to build and install shadow.
+
+You can either generate a single image by running the following command from
+the root folder of the project (i.e. Alpine):
+
+```
+docker build -f share/containers/alpine.dockerfile . --output build-out/alpine
+```
+
+Or generate all of the images with the `container-build.sh` script, as if you
+were running some of the CI checks locally:
+
+```
+share/container-build.sh
+```
\ No newline at end of file