Commit 8cc0c9c3 authored by arpinux's avatar arpinux
Browse files

improve nakedbuild + préciser les fichiers + ajout de l'option 'full'

parent 5ef47f6a
......@@ -8,9 +8,10 @@ WTFPL © 2020-2021 https://nakedeb.arpinux.org
* mise à jour Debian 11.0
* mise à jour du script de build
* ...
* ajout de cryptsetup
* ajout de cryptsetup pour le chiffrement des volumes internes ou externes
* ajout iotop et nethogs pour la surveillance
* remplacement de compton par picom
* ajout de l'option 'full' dans le build
TODO
* mise à jour de la documentation
* ...
......
......@@ -23,7 +23,7 @@ juste avant la compression en squashfs
pour isolinux et grub, les lanceurs pour le liveCD
- [config/package-lists](config/package-lists/) : les listes des paquets nécessaires.
- nakedeb.list.chroot pour les paquets à coller dans le système
- nakedeb.list.binary pour coller uniquement dans le live (les paquets UEFI)
- nakedeb.list.binary pour coller dans le live (les paquets UEFI)
[pkgs](/pkgs)
-------------
......
......@@ -3,39 +3,40 @@ nakeDeb
[nakeDeb homepage](https://nakedeb.arpinux.org)
* deb build depends : equivs
* live build depends : live-build live-tools
* torrent depends : mktorrent
to build an ISO :
-----------------
* edit 'nakedbuild' script to adjust release and set $USER
* edit and modify 'auto' and 'config'
* adjust pkgs/foo
* check naked'adds versions
* check bashmount & veracrypt updates
* launch as root from sources repository :
* `./nakedbuild 32` to build nakedeb i386
* `./nakedbuild 64` to build nakedeb amd64
* `./nakedbuild 32 nf` to build nakedeb i386 non-free
* `./nakedbuild 64 nf` to build nakedeb amd64 non-free
* `./nakedbuild clean` to clean build directory & cache
make sure to `clean` before cross-arch building
* dépendances pour les paquets debian : equivs
* dépendances pour live-build : live-build live-tools
* dépendance pour construire le fichier torrent : mktorrent
construire une ISO :
--------------------
* éditer le script 'nakedbuild' pour ajuster la version et le $USER
* éditer le contenu de 'auto/' et 'config/' selon vos besoins
* ajuster les paquets contenus dans pkgs/foo selon vos besoins
* vérifier les mises à jour de bashmount et veracrypt
* lancer en mode administrateur :
* `./nakedbuild 32` > nakedeb i386 (FIXME)
* `./nakedbuild 64` > nakedeb amd64 (~750M)
* `./nakedbuild 32 nf` > nakedeb i386 non-free (FIXME)
* `./nakedbuild 64 nf` > nakedeb amd64 non-free (~780M)
* `./nakedbuild 32 nf full` > nakedeb i386 non-free full system (FIXME)
* `./nakedbuild 64 nf full` > nakedeb amd64 non-free full system (~1.1G)
* `./nakedbuild clean` > nettoyage du dossier de construction et du cache
assurez-vous de lancer `nakedbuild clean` avant de construire une autre architecture
------
option : apt-cacher-ng
* install : `apt install apt-cacher-ng`
* config : `export http_proxy=http://localhost:3142/`
* enable : `systemctl start apt-cacher-ng`
* use : put `--apt-http-proxy "http://127.0.0.1:3142/"` in the build script
* installer : `apt install apt-cacher-ng`
* configurer : `export http_proxy=http://localhost:3142/`
* activer : `systemctl start apt-cacher-ng`
* utiliser : déjà intégré dans le script de build
------
howto convert html help pages to manpage
comment convertir les pages d'aide html en manpage
* `pandoc page.html -t markdown -o page.md`
* supprimer les liens vers les images
......@@ -58,3 +59,18 @@ nakedeb(7), nakedkbd(7)
.SH AUTHORS
arnault perret <nakedev@arpinux.org>.
```
------
option : signer le fichier md5 pour distribuer l'ISO
`gpg --detach-sig --sign nakedeb-${VERSION}.md5`
en remplaçant ${VERSION} par la version de votre nakedeb.
------
aide, contact, retours :
* forum : https://nakedeb.arpinux.org/crew
* contact : contact [at] arpinux [dot] org
......@@ -43,8 +43,11 @@ une clé USB basique d'1G facilement utilisable.
sources :
---------
les sources de la version stable sont
[disponibles sur git](https://framagit.org/3hg/nakedeb/-/releases)
les sources de la version stable sont [disponibles sur git](https://framagit.org/3hg/nakedeb/-/releases)
howto :
-------
pour construire votre nakeDeb, direction le [HowTo](/HOWTO.md)
licence :
---------
......
#!/bin/sh
set -e
echo "-----------------------------------------------------------------"
echo "INFO: update command-not-found database"
update-command-not-found
echo "-----------------------------------------------------------------"
#!/bin/sh
set -e
echo "-----------------------------------------------------------------"
echo "INFO: set urxvtcd as default X terminal emulator"
update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/bin/urxvtcd 90
echo "-----------------------------------------------------------------"
## automatic edition by nakedbuild
## DO NOT EDIT!
## automatic edition by nakedbuild
## DO NOT EDIT!
......@@ -27,7 +27,7 @@ moc moc-ffmpeg-plugin
## gtk -----------------------------------------------------------------
mesa-utils arc-theme picom lxappearance arandr xcalib sct
## fonts ---------------------------------------------------------------
console-data console-common xfonts-terminus fonts-hack-ttf
console-setup console-data console-common xfonts-terminus fonts-hack-ttf
fonts-fork-awesome
## archives ------------------------------------------------------------
dtrx zip unrar-free file-roller
......
......@@ -12,8 +12,9 @@ NKDIR="$(realpath "$(dirname "$0")")"
LOG="${NKDIR}/${VERSION}.log"
RESET="## automatic edition by nakedbuild\n## DO NOT EDIT!"
VCHOOK="${NKDIR}/config/hooks/normal/veracrypt.chroot"
NFHOOK="${NKDIR}/config/hooks/normal/nonfree.chroot"
VCHOOK="${NKDIR}/config/hooks/normal/n3-veracrypt.chroot"
NFHOOK="${NKDIR}/config/hooks/normal/n4-nonfree.chroot"
FULLHOOK="${NKDIR}/config/hooks/normal/n5-fullsystem.chroot"
# cd work directory ----------------------------------------------------
cd ${NKDIR}
......@@ -30,6 +31,7 @@ elif [ "$1" == "clean" ]; then
rm -Rf cache
echo -e "${RESET}" > ${VCHOOK}
echo -e "${RESET}" > ${NFHOOK}
echo -e "${RESET}" > ${FULLHOOK}
exit 0
else
# no args or wrong args > help
......@@ -37,6 +39,7 @@ else
fi
# open log -------------------------------------------------------------
# ouverture du fichier de log avec les informations sur le système hôte
echo -e "----\n${PROJECT} - ${HOMEPAGE} - ${CONTACT}" > ${LOG}
echo -e "$(date)" >> ${LOG}
echo -e "building ${VERSION} ${ARCH}" >> ${LOG}
......@@ -47,7 +50,8 @@ if [ "$2" == "nf" ]; then
fi
# setup veracrypt ------------------------------------------------------
echo -e "----\nINFO: setting up veracrypt\n" >> ${LOG}
# mise en place de la version (32/64) de VeraCrypt dans le dossier de build
echo -e "----\nINFO: setting up veracrypt" >> ${LOG}
VERA="veracrypt_1.24-Update7"
mkdir -p config/includes.chroot
cp ${NKDIR}/ressources/veracrypt/${VERA}_${ARCH}.tar.gz ${NKDIR}/config/includes.chroot/
......@@ -55,22 +59,19 @@ cp ${NKDIR}/ressources/veracrypt/${VERA}_${ARCH}.tar.gz ${NKDIR}/config/includes
cat <<EOF > ${VCHOOK}
#!/bin/sh
set -e
echo "--------------------------"
echo "INFO: Installing veracrypt"
cd /
tar zxf ${VERA}_${ARCH}.tar.gz
rm ${VERA}_${ARCH}.tar.gz
echo "--------------------------"
EOF
# nonfree option hook --------------------------------------------------
# option pour ajouter les dépôts non-free et les firmwares non-free à nakeDeb.
# ajoutez vos firmwares préférés ici.
if [ "$2" == "nf" ]; then
echo -e "----\nINFO: setting up nonfree option hook\n" >> ${LOG}
echo -e "----\nINFO: setting up nonfree option hook" >> ${LOG}
cat <<EOF > ${NFHOOK}
#!/bin/sh
set -e
echo "-------------------------"
echo "INFO: set nakedeb-nonfree"
echo "deb http://deb.debian.org/debian/ bullseye non-free" > /etc/apt/sources.list.d/nonfree.list
echo "deb http://security.debian.org/debian-security bullseye-security non-free" >> /etc/apt/sources.list.d/nonfree.list
echo "deb http://deb.debian.org/debian/ bullseye-updates non-free" >> /etc/apt/sources.list.d/nonfree.list
......@@ -78,19 +79,37 @@ echo "deb http://deb.debian.org/debian/ bullseye-proposed-updates non-free" >> /
apt update
apt upgrade -y
apt install -y firmware-linux firmware-linux-nonfree firmware-misc-nonfree
echo "-------------------------"
EOF
else
echo -e "${RESET}" > ${NFHOOK}
fi
# full system option hook ----------------------------------------------
# cette version n'est pas distribuée : c'est un option à utiliser @home
# en complément de la version non-free.
# vous pouvez ajouter/enlever les applications désirées dans la liste.
if [ "$3" == "full" ]; then
echo -e "----\nINFO: setting up full system option hook" >> ${LOG}
cat <<EOF > ${FULLHOOK}
#!/bin/sh
set -e
apt update
apt install -y firefox-esr thunderbird gthumb gimp inkscape mcomix filezilla \
audacity easytag libreoffice libreoffice-gtk3 libreoffice-l10n-fr unison-gtk
EOF
else
echo -e "${RESET}" > ${FULLHOOK}
fi
# setup preseed --------------------------------------------------------
echo -e "----\nINFO: setting up naked preseed\n" >> ${LOG}
# mise en place du fichier de pré-configuration de l'installateur debian.
echo -e "----\nINFO: setting up naked preseed" >> ${LOG}
mkdir -p config/includes.chroot/usr/bin
install -m 755 ressources/nakedpreseed config/includes.chroot/usr/bin/nakedpreseed
# setup debs -----------------------------------------------------------
echo -e "----\nINFO: building deb's\n" >> ${LOG}
# construction des paquets-modules intégrés à nakeDeb
echo -e "----\nINFO: building deb's" >> ${LOG}
mkdir -p config/packages
#cleaning
find pkgs -iname "*.deb" -exec rm {} \;
......@@ -98,7 +117,7 @@ find pkgs -iname "*.buildinfo" -exec rm -f {} \;
find pkgs -iname "*.changes" -exec rm -f {} \;
#building debs
for p in pkgs/*; do cd $p; ./mkdeb; cd ${NKDIR}; done | tee -a ${LOG}
echo -e "----\nINFO: nakedpkgs lintian output\n" >> ${LOG}
echo -e "----\nINFO: nakedpkgs lintian output" >> ${LOG}
find pkgs -iname "*.deb" -exec lintian -q {} >> ${LOG} \;
find pkgs -iname "*.deb" -exec mv {} config/packages \;
......@@ -109,6 +128,11 @@ case ${ARCH} in
i386) lb config -a "${ARCH}" -k 686 | tee -a ${LOG};;
amd64) lb config -a "${ARCH}" | tee -a ${LOG};;
esac
# if apt-cacher-ng
if dpkg-query -W apt-cacher-ng &>"/dev/null"; then
export http_proxy="http://127.0.0.1:3142/"
lb config --apt-http-proxy "${http_proxy}"
fi
# common config
lb config --iso-volume "${VERSION}" --iso-application "${VERSION}" \
--iso-publisher "${PROJECT}; ${HOMEPAGE}; ${CONTACT}" | tee -a ${LOG}
......@@ -119,10 +143,14 @@ lb build
# rename ---------------------------------------------------------------
if test -f live-image-${ARCH}.hybrid.iso; then
echo -e "----\nINFO: renommer\n"
echo -e "----\nINFO: renommer"
ISODIR="${NKDIR}/nakedeb-${ARCH}"
if [ "$2" == "nf" ]; then
NAME="${VERSION}-${DEBV}-${ARCH}-nonfree"
if [ "$3" == "full" ]; then
NAME="${VERSION}-${DEBV}-${ARCH}-nonfree-full"
else
NAME="${VERSION}-${DEBV}-${ARCH}-nonfree"
fi
else
NAME="${VERSION}-${DEBV}-${ARCH}"
fi
......@@ -131,19 +159,20 @@ if test -f live-image-${ARCH}.hybrid.iso; then
mv chroot.packages.install ${ISODIR}/${NAME}.pkgs
mv ${LOG} ${ISODIR}/${NAME}.log
cd ${ISODIR}
echo -e "----\nINFO: calculate md5sum\n"
echo -e "----\nINFO: calculate md5sum"
md5sum ${NAME}.iso > ${NAME}.md5
echo -e "----\nINFO: make torrent\n"
echo -e "----\nINFO: make torrent"
cp ${NKDIR}/ressources/mkp2p ${ISODIR}
./mkp2p ${NAME}.iso
rm mkp2p
cd ${NKDIR}
echo -e "----\nINFO: permissions\n"
echo -e "----\nINFO: permissions"
# !! adjust to your $USER !!
chown -R arp:arp ${ISODIR}
echo -e "----\nINFO: nettoyage\n"
echo -e "----\nINFO: nettoyage"
echo -e "${RESET}" > ${VCHOOK}
echo -e "${RESET}" > ${NFHOOK}
echo -e "${RESET}" > ${FULLHOOK}
lb clean
echo -e "----\nbuild made in $(($SECONDS/60)) minutes\n"; exit 0
else
......
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