From a3628fc49db4d88ff3e4067268650710d1da3f6f Mon Sep 17 00:00:00 2001
From: Silvino Silva This instructions are done
+ inside chroot. Make sure follow directories exist; For more information read
+ Fakeroot Ports.
+ Add a user that will be used by ports tools, this example pkgmk; You can add your self to group pkgmk. Check if members of this
+ group are under tpe protection. Configure to
+ compile in ram
+ average of 3GB is recommended for core while firefox need at least 30G.
+ Discover id of pkgmk user; Edit fstab, change uid to id of pkgmk, this example 102; Read 4.5. Adjust/Configure the Package Build Process
+ to take advantage of your specific hardware. Packages build with
+ native flag will not run on different hardware. This is the best choice
+ if you want gcc to find the best settings based on your hardware. Edit /etc/pkgmk.conf, remove pipe from compiler flags and let the system
+ get from nproc how many cpu's it can use for compiling; If you want native build change the above example to; Check toolchain for more options on how packages
+ are build. Edit /etc/prt-get.conf; Ccache avoids same code to be compiled by saving
+ the output from compilers and identifying same
+ input by using hashes and distcc distributes
+ compiling process across machines. Don't set native or generic on /etc/pkgmk.conf. Configure pkgmk and define number of cores available,
+ in this example get dynamically Edit
+ /etc/pkgmk.conf and
+ set ccaching directory and instructs to use distcc
+ backend; Set distcc hosts and respective number of
+ cpu cores to send work, hosts names, exp; "worker" must
+ be configured on /etc/hosts. Configure distcc daemon, edit
+ /etc/rc.d/distccd; Create /etc/distcc.conf;
+ This is part of the Tribu System Documentation.
+ Copyright (C) 2020
+ Tribu Team.
+ See the file Gnu Free Documentation License
+ for copying conditions.
- This is part of the Tribu System Documentation.
- Copyright (C) 2020
- Tribu Team.
+ This is part of the LeetIO System Documentation.
+ Copyright (C) 2021
+ LeetIO Team.
See the file Gnu Free Documentation License
for copying conditions.1.4. Ports
+
+ 1.4.1. Ports Layout
+
+
+ # mkdir /usr/ports
+ # mkdir -p /usr/ports/{distfiles,packages,work,pkgbuild}
+
+
+ 1.4.2. Build as user
+
+
+ # useradd -r -U -d /usr/ports -s /bin/false pkgmk
+
+
+
+ # usermod -a -G pkgmk username
+
+
+
+ # chown pkgmk /usr/ports/{distfiles,packages,work,pkgbuild}
+ # chown pkgmk:pkgmk /usr/ports/pkgbuild
+ # chmod g+w /usr/ports/pkgbuild
+
+
+
+ # id pkgmk
+ uid=102(pkgmk) gid=102(pkgmk) groups=102(pkgmk)
+
+
+
+ pkgmk /usr/ports/work tmpfs size=30G,uid=102,defaults,mode=0750 0 0
+
+
+ 1.4.3. Configure pkgmk
+
+
+ #
+ # /etc/pkgmk.conf: pkgmk(8) configuration
+ #
+
+ export CFLAGS="-O2 -march=x86-64"
+ export CXXFLAGS="${CFLAGS}"
+
+ export JOBS=$(nproc)
+ export MAKEFLAGS="-j $JOBS"
+
+ case ${PKGMK_ARCH} in
+ "64"|"")
+ ;;
+ "32")
+ export CFLAGS="${CFLAGS} -m32"
+ export CXXFLAGS="${CXXFLAGS} -m32"
+ export LDFLAGS="${LDFLAGS} -m32"
+ export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
+ ;;
+ *)
+ echo "Unknown architecture selected! Exiting."
+ exit 1
+ ;;
+ esac
+
+ PKGMK_SOURCE_MIRRORS=(https://tribu.semdestino.org/mirror-3.4/distfiles/)
+ # PKGMK_SOURCE_DIR="$PWD"
+ PKGMK_SOURCE_DIR="/usr/ports/distfiles"
+ # PKGMK_PACKAGE_DIR="$PWD"
+ PKGMK_PACKAGE_DIR="/usr/ports/packages"
+ # PKGMK_WORK_DIR="$PWD/work"
+ PKGMK_WORK_DIR="/usr/ports/work/${name}"
+ # PKGMK_DOWNLOAD="no"
+ # PKGMK_IGNORE_SIGNATURE="no"
+ # PKGMK_IGNORE_MD5SUM="no"
+ # PKGMK_IGNORE_FOOTPRINT="no"
+ # PKGMK_IGNORE_NEW="no"
+ # PKGMK_NO_STRIP="no"
+ # PKGMK_DOWNLOAD_PROG="wget"
+ # PKGMK_WGET_OPTS=""
+ # PKGMK_CURL_OPTS=""
+ # PKGMK_COMPRESSION_MODE="gz"
+
+ # End of file
+
+
+
+ export CFLAGS="-O2 -march=native -mtune=native"
+
+
+ 1.4.4. Configure prt-get
+
+
+ ###
+ ### prt-get conf
+ ###
+
+ # note: the order matters: the package found first is used
+ prtdir /usr/ports/core
+ prtdir /usr/ports/opt
+ prtdir /usr/ports/xorg
+
+ # the following line enables the multilib compat-32 collection
+ #prtdir /usr/ports/compat-32
+
+ # the following line enables the user maintained contrib collection
+ prtdir /usr/ports/contrib
+ prtdir /usr/ports/ports
+ prtdir /usr/ports/mate
+ prtdir /usr/ports/kde5
+
+ ### use mypackage form local directory
+ # prtdir /home/packages/build:mypackage
+
+ ### log options:
+ writelog enabled # (enabled|disabled)
+ logmode overwrite # (append|overwrite)
+ rmlog_on_success yes # (no|yes)
+ logfile /usr/ports/pkgbuild/%n.log
+ # path, %p=path to port dir, %n=port name
+ # %v=version, %r=release
+
+ ### use alternate cache file (default: /var/lib/pkg/prt-get.cache
+ # cachefile /mnt/nfs/cache
+
+ ### print README information:
+ readme verbose # (verbose|compact|disabled)
+
+ ### prefer higher versions in sysup / diff
+ preferhigher yes # (yes|no)
+
+ ### use regexp search
+ # useregex no # (yes|no)
+
+ ### run pre- and post-installs scripts; yes is equivalent to the
+ ### --install-scripts option
+ runscripts yes # (no|yes)
+
+ ### expert section ###
+
+ ### alternative commands
+ makecommand sudo -H -u pkgmk fakeroot pkgmk
+ addcommand sudo pkgadd
+ removecommand sudo pkgrm
+ runscriptcommand sudo sh
+
+
+ 1.4.5. Ccache and distcc
+
+
+ $ prt-get depinst ccache distcc
+
+
+
+ # ccache settings
+ export PATH="/usr/lib/ccache/:$PATH"
+ export CCACHE_DIR="/usr/ports/ccache"
+ export CCACHE_PREFIX="distcc"
+ export CCACHE_COMPILERCHECK="%compiler% -dumpversion; crux"
+
+
+
+ ### compile using distcc without ccache
+ ##export PATH="/usr/lib/distcc/:$PATH"
+ ##export DISTCC_HOSTS="localhost/4,lzo,cpp xborg/4,lzo,cpp"
+ ##export PUMP_BUILD=yes
+
+ # distcc settings
+ export JOBS=$(/usr/bin/distcc -j 2> /dev/null)
+ export DISTCC_DIR="/usr/ports/distcc"
+ export MAKEFLAGS="-j ${JOBS}"
+ export SCONSFLAGS="$MAKEFLAGS"
+
+ # local compile only
+ #export JOBS=$(nproc)
+ #export MAKEFLAGS="-j $JOBS"
+
+
+
+ #!/usr/bin/env bash
+ #
+ # /etc/rc.d/distccd: start/stop distcc daemon
+ #
+
+ . /etc/distcc.conf
+ if [ -z "$DISTCC_ALLOW" ]; then
+
+
+
+ DISTCC_ALLOW="10.0.0.0/8"
+ DISTCC_USER="pkgmk"
+ DISTCC_LOG_LEVEL="info"
+
+
+ Core OS Index
+
This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/bash.html b/linux/bash.html index f49d27e..1a7edb2 100644 --- a/linux/bash.html +++ b/linux/bash.html @@ -5,7 +5,7 @@- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/configure.html b/linux/configure.html index a548e5d..2e72c90 100644 --- a/linux/configure.html +++ b/linux/configure.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/dash.html b/linux/dash.html index a9aebee..8da34a3 100644 --- a/linux/dash.html +++ b/linux/dash.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/exim.html b/linux/exim.html index 028bfce..5cfed62 100644 --- a/linux/exim.html +++ b/linux/exim.html @@ -5,7 +5,7 @@- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/hardening.html b/linux/hardening.html index 041f999..0fd13e3 100644 --- a/linux/hardening.html +++ b/linux/hardening.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexAdd unnecessary tests to profile to have less noise.
- Core OS Index -This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/index.html b/linux/index.html index 089d143..33578f7 100644 --- a/linux/index.html +++ b/linux/index.html @@ -2,15 +2,15 @@ -Core OS covers installation and configuration of +
GNU/Linux covers installation and configuration of basic functionality of Crux 3.5 Gnu\Linux operating system. This documentation try's to follow Crux HandBook installation method diverges, for example, by only installing and @@ -162,9 +162,9 @@ Documentation Index
- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/install.html b/linux/install.html index 64fbe02..f42f4a2 100644 --- a/linux/install.html +++ b/linux/install.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/linux.html b/linux/linux.html index 9d568e9..3d992e9 100644 --- a/linux/linux.html +++ b/linux/linux.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/network.html b/linux/network.html index 0d359f3..ec33b25 100644 --- a/linux/network.html +++ b/linux/network.html @@ -5,7 +5,7 @@- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/package.html b/linux/package.html index 5235d01..4b68b6a 100644 --- a/linux/package.html +++ b/linux/package.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/ports.html b/linux/ports.html index 78607bd..28047c5 100644 --- a/linux/ports.html +++ b/linux/ports.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux Index- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/reboot.html b/linux/reboot.html index 1a4783b..f8ab278 100644 --- a/linux/reboot.html +++ b/linux/reboot.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/samhain.html b/linux/samhain.html index 4c940ef..f679749 100644 --- a/linux/samhain.html +++ b/linux/samhain.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux Index- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/sysctl.html b/linux/sysctl.html index 3b1d492..9940d43 100644 --- a/linux/sysctl.html +++ b/linux/sysctl.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/toolchain.html b/linux/toolchain.html index 23f5655..1ee7c89 100644 --- a/linux/toolchain.html +++ b/linux/toolchain.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/linux/tty-terminal.html b/linux/tty-terminal.html index 4da3798..77c7b9d 100644 --- a/linux/tty-terminal.html +++ b/linux/tty-terminal.html @@ -6,7 +6,7 @@ - Core OS Index + GNU/Linux IndexThis is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + GNU/Linux Index +
This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.
diff --git a/tools/dnsmasq.html b/tools/dnsmasq.html index 7c923dd..4d738e4 100644 --- a/tools/dnsmasq.html +++ b/tools/dnsmasq.html @@ -83,9 +83,9 @@ Tools Index- This is part of the Tribu System Documentation. - Copyright (C) 2020 - Tribu Team. + This is part of the LeetIO System Documentation. + Copyright (C) 2021 + LeetIO Team. See the file Gnu Free Documentation License for copying conditions.