]> gitweb.morketsmerke.org Git - immudex.git/commitdiff
Synchronizacja public -> priv
authorxf0r3m <jakubstasinski@protonmail.com>
Wed, 13 Mar 2024 16:54:37 +0000 (17:54 +0100)
committerxf0r3m <jakubstasinski@protonmail.com>
Wed, 13 Mar 2024 16:54:37 +0000 (17:54 +0100)
README.md
addons/lampstack
addons/nvidiaLatest
files/mozilla.tgz
immudex-build
tools/sbin/immudex-create-media
tools/sbin/immudex-crypt
tools/sbin/immudex-hostname
tools/sbin/immudex-install
tools/sbin/immudex-upgrade
versions/base.sh

index a540db1292f01ab3d841785a149c392bc1d2da88..17ede2ef423b90a8883c5d5201f665153143af12 100644 (file)
--- a/README.md
+++ b/README.md
@@ -10,22 +10,30 @@ tej dystrybucji znajdują się pod adresem:
 
 [https://morketsmerke.github.io/articles/immudex/immudex.html](https://morketsmerke.github.io/articles/immudex/immudex.html)
 
+### Dodawanie zmian do obrazu płyty:
+
+Aby dołączyć jakiekolwiek zmiany do obrazu płyty należy przed rozpoczęciem
+procesu tworzenia obrazu płyty umieścić modyfikacje, przed poleceniem `tidy` w
+pliku *versions/base.sh*.
+
+### Zmiany jakich należy dokonać przed stworzeniem obrazu płyty:
+
+Obecnie superużytkownik posiada losowe haslo oraz zablokowana
+jest możliwość zalogowania się na niego. Dostęp do 'root' możemy
+uzyskać za pomocą polecenia 'sudo su'.
+Podstawowy użytkownik (z uprawnieniami sudo)
+jest tworzony podczas budowania obrazu. Podejmowanie czynności
+przed stworzeniem obrazu płyty nie jest póki co wymagane.
+
 ### Tworzenie obrazu płyty dystrybucji:
   
   ```
   $ git clone https://github.com/xf0r3m/immudex
-  $ cd immudex-testing
+  $ cd immudex
   $ ./immudex-build --<amd64/i386> --<testing/stable/oldstable>
   ```
 
-### Dodawanie zmian do obrazu płyty:
-
-Aby dołączyć jakiekolwiek zmiany do obrazu płyty należy przed rozpoczęciem
-procesu tworzenia obrazu płyty umieścić modyfikacje, przed poleceniem `tidy` w
-pliku *versions/base.sh*.
-
 ### Zastrzeżenia i uznanie autorstwa:
 
 immudex is not affiliated with Debian. Debian is a registered trademark owned 
 by Software in the Public Interest, Inc.
-
index 08d7ddf72f97bb115e4d389fcf6aa726325ea2c1..fbb123997c3730778dfab77f7e68685561b23896 100644 (file)
@@ -2,22 +2,22 @@
 
 baseVersion=$(head -1 /etc/apt/sources.list | awk '{print $3}')
 
-apt install lsb-release -y;
-wget https://dev.mysql.com/get/mysql-apt-config_0.8.25-1_all.deb;
-dpkg -i mysql-apt-config_0.8.25-1_all.deb;
+apt install lsb-release gnupg -y;
+wget https://dev.mysql.com/get/mysql-apt-config_0.8.29-1_all.deb
+dpkg -i mysql-apt-config_0.8.29-1_all.deb;
 
-sed -i "s/$baseVersion/bullseye/g" /etc/apt/sources.list;
+sed -i "s/$baseVersion/bookworm/g" /etc/apt/sources.list;
 
 apt update;
 apt install mysql-server -y
 apt-get install --fix-missing
 apt-mark hold libmecab2 libssl1.1 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core mysql-community-client-plugins mysql-community-server mysql-community-server-core
 
-sed -i "s/bullseye/$baseVersion/g" /etc/apt/sources.list; 
+sed -i "s/bookworm/$baseVersion/g" /etc/apt/sources.list; 
 apt update
 apt install apache2 libapache2-mod-php php php-mysql -y;
 apt autoremove;
 apt autoclean;
 apt clean;
 
-rm mysql-apt-config_0.8.25-1_all.deb;
+rm mysql-apt-config_0.8.29-1_all.deb;
index 799a25a6f4c967b43990167f457896561339d401..e53ed42c505c56de8c4cc71c0970b00cc2f5718f 100644 (file)
@@ -14,7 +14,5 @@ else
   cp -vv /etc/apt/sources.list /etc/apt/sources.list.d/nvidia.list;
   sed -e 's/main/contrib non-free non-free-firmware/g' -i /etc/apt/sources.list.d/nvidia.list;
   apt update;
-  apt install -y build-essential dkms linux-headers-\$(uname -r);
-  apt install -y nvidia-detect;
-  apt install -y nvidia-driver;
+  apt install -y build-essential dkms linux-headers-amd64 nvidia-detect nvidia-driver;
 fi
index be64c98ff9eb1e166f9df80da4c8def1fbde131f..540acda28682666e3c0d886d6a8c7b576bc1e8a8 100644 (file)
Binary files a/files/mozilla.tgz and b/files/mozilla.tgz differ
index 2fabc72fc29be378ed5e30e570a83da9727ebd61..2dca94baed71e6868141f7916d4f57e294669ce4 100755 (executable)
@@ -45,9 +45,10 @@ if [ ! -f /sbin/debootstrap ]; then
   create_enviroment 
 fi
 
+#Removing old immudex build directory structure:
 if [ -d ${HOME}/build/immudex-${debver}/${arch} ]; then
   echo -n "Removing old immudex build directory structure...";
-  sudo rm -rvf ${HOME}/build/immudex-${debver} >> immudex_build.log 2>&1;
+  sudo rm -rvf ${HOME}/build/immudex-${debver}/${arch} >> immudex_build.log 2>&1;
   if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
 fi
 
@@ -96,10 +97,18 @@ if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
 echo "-==Setting version for immudex image: $(date)==-" >> immudex_build.log;
 echo -n "Setting version for this immudex image...";
 (cd ${HOME}/immudex && git log --pretty=oneline) | head -1 | awk '{printf $1}' | tee ${HOME}/build/immudex-${debver}/${arch}/staging/live/version >> immudex_build.log 2>&1;
+echo >> immudex_build.log;
 versionShort=$(cut -c 1-7 ${HOME}/build/immudex-${debver}/${arch}/staging/live/version);
 if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
 
+#Setting compilation date for this image:
+echo "-==Setting compilaztion date for immudex image: $(date)==-" >> immudex_build.log;
+echo -n "Setting compilation date for this immudex image...";
+date | tee ${HOME}/build/immudex-${debver}/${arch}/staging/live/compilation_date >> immudex_build.log 2>&1;
+if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
+
 #Getting and copying bootloader files
+echo "-==Getting and copying bootloader files: $(date)==-" >> immudex_build.log;
 echo -n "Copying bootloader files...";
 arch2=$(echo $1 | sed 's/-//g');
 cp -v ${HOME}/immudex/isolinux/${arch2}/* ${HOME}/build/immudex-${debver}/${arch}/staging/isolinux >> immudex_build.log 2>&1;
index 37a4c537be8947e5adf9a4b5df4247ced96e9216..37c0d587374aec0eecd45a8342cd046e51c0125a 100755 (executable)
@@ -6,7 +6,8 @@ ENDCOLOR="\e[0m";
 
 function help() {
   echo "immudex-create-media - script used for write iso image to usb drive(mainly)";
-  echo "@ 2023 morketsmerke.org";
+  echo "@ 2024 morketsmerke.org";
+  echo "Superuser (root) privileges are required.";
   echo "Options:";
   echo "  --i386-efi - creating 32-bit EFI usb drive with iso image";
   echo "  (comapatible with immudex only iso images)";
@@ -15,6 +16,12 @@ function help() {
   echo "  $ immudex-create-media [--i386-efi] [--nuke] <usb_disk> [iso_image]";
 }
 
+if [ $UID -ne 0 ]; then
+  echo "Permission denied!";
+  help;
+  exit 1;
+fi
+
 if [ "$1" ] && [ "$1" = "--i386-efi" ]; then target="i386-efi"; shift; fi
 if [ "$1" ] && [ "$1" = "--nuke" ]; then target="nuke"; shift; fi
 if [ "$1" ] && echo $1 | grep -Eq '/dev/(sd[a-z]|vd[a-z]|mmcblk[0-9])'; then
index d966fff5dc77e8db9f98aa9868b7a10ec97c324d..b163379f5941b1a24cbff070d260a4a58ac4301e 100755 (executable)
@@ -3,7 +3,7 @@
 function help() {
 
   echo "immudex-crypt - script used for listing, open and close crypt_LUKS ppartitions";
-  echo "@ 2023 morketsmerke.org";
+  echo "@ 2024 morketsmerke.org";
   echo "Superuser (root) privileges are required.";
   echo "Options:";
   echo "  list - displaing list of opened and available crypt_LUKS devices";
@@ -151,8 +151,6 @@ if [ "$1" ]; then
     exit 1;
   fi
  
-  #immudexCryptPID=$$;
-  #parentProcessPID=$((immudexCryptPID - 1));
   #immudex-crypt RUID is EUID of sudo, which spawning immudex-crypt
   export RUID=$(grep '^Uid:' /proc/$(pidof -s sudo)/status | awk '{printf $2}');
   export USER=$(grep "$RUID" /etc/passwd | cut -d ":" -f1);
index 673397fd2082e6ba74493c60532610d5be0a3804..f4615685692cc4577ae0bf35d111bd2b8d82e773 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/bash
 
+if [ $UID -ne 0 ]; then
+  echo "Permission denied!";
+  exit 1;
+fi
+
 bootID=$(sed 's/-//g' /proc/sys/kernel/random/boot_id | cut -c 26-33);
 if hostnamectl > /dev/null 2>&1; then
        hName="$(hostnamectl | grep 'Chassis' | cut -d ":" -f 2 | awk '{printf $1}')-${bootID}";
index c2332d6b4b899d155d0984ca4d11296c3ef33062..0b0391ba379a8cd743ac3dae74aa0f44d6234c0e 100755 (executable)
@@ -4,6 +4,11 @@ RED="\e[31m";
 GREEN="\e[32m";
 ENDCOLOR="\e[0m";
 
+if [ $UID -ne 0 ]; then
+  echo "Permission denied!";
+  exit 1;
+fi
+
 while [ true ]; do
   echo -e "${RED}This script will install immudex on first disk on your machine.${ENDCOLOR}";
   echo -e "${RED}It could be destructive for data placed on this disk${ENDCOLR}";
index 9d59bde7bb60d3fec11c048735bb57cd418d1d34..80ef41d20b82261f7db88a8f17f1bcbd0634b690 100755 (executable)
@@ -12,12 +12,24 @@ root="/run/live/medium";
 
 function help() {
   echo "immudex-upgrade - script for searching upgrades and upgrade immudex";
-  echo "@ 2023 morketsmerke.org";
+  echo "@ 2024 morketsmerke.org";
+  echo "Superuser (root) privileges are required.";
   echo "Options:";
   echo " --check - check there are upgrades for immudex";
   echo " --upgrade - upgrade immudex from given source";
+  echo " --myversion - prints images current commit message";
+  echo " --compilation-date - prints date of image creation";
+  echo " --packages-upgradable [--security] - updates apt (packages) list and";
+  echo "   prints available to upgrade packages, with --security modificator";
+  echo "   prints only pacakages from security repository branch";
 }
 
+if [ $UID -ne 0 ]; then
+  echo "Permission denied!";
+  help;
+  exit 1;
+fi
+
 if [ "$1" ]; then
   if [ "$1" ] && [ "$1" = "--check" ]; then
     if check_distro_commit; then 
@@ -61,9 +73,18 @@ if [ "$1" ]; then
     if [ -d /tmp/immudex ]; then 
       (cd /tmp/immudex && git pull > /dev/null 2>&1)
     else
-      git clone https://github.com/xf0r3m/immudex /tmp;
+      git clone https://github.com/xf0r3m/immudex /tmp/immudex;
     fi
     (cd /tmp/immudex && git show $(cat /run/live/medium/live/version))
+  elif [ "$1" ] && [ "$1" = "--packages-upgradable" ]; then
+    apt update;
+    if [ "$2" ] && [ "$2" = "--security" ]; then
+      apt list --upgradable | grep 'security';
+    else
+      apt list --upgradable;
+    fi
+  elif [ "$1" ] && [ "$1" = "--compilation-date" ]; then
+    echo "Image was created: $(cat /run/live/medium/live/compilation_date)";
   else
     help;
     exit 1;
index fbc77d1fb245f5021e2568603e43f50fdd86e22b..19553c8b70d9f60af887e24f9daff2a8918f716c 100644 (file)
@@ -12,8 +12,8 @@ else
 fi
 
 cd;
-if [ -x /usr/bin/git ]; then git clone https://git.morketsmerke.org/git/immudex;
-else apt install git -y && git clone https://git.morketsmerke.org/git/immudex;
+if [ -x /usr/bin/git ]; then git clone https://github.com/xf0r3m/immudex;
+else apt install git -y && git clone https://github.com/xf0r3m/immudex;
 
 fi
 source ~/immudex/versions/template.sh;
@@ -61,8 +61,8 @@ ln -s /usr/bin/yt-dlp /usr/bin/youtube-dl;
 
 cd;
 
-git clone https://git.morketsmerke.org/git/xfcedebian-d13;
-cd xfcedebian-d13;
+git clone https://github.com/xf0r3m/xfcedebian;
+cd xfcedebian;
 bash install.sh;
 
 cd;
@@ -130,7 +130,8 @@ chmod u+s /usr/bin/ping;
 
 /usr/sbin/ufw default deny incoming;
 /usr/sbin/ufw default allow outgoing;
-/usr/sbin/ufw enable;
+#/usr/sbin/ufw enable;
+sed -i '/^ENABLED=/s/ENABLED=no/ENABLED=yes/' /etc/ufw/ufw.conf
 
 echo "immudex" > /etc/hostname;
 echo "127.0.1.1   immudex" >> /etc/hosts;
@@ -153,9 +154,5 @@ rm random;
 echo "root:${rootPassword}" | chpasswd;
 usermod -L root;
 
-#recreate_users;
-#echo "user ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers;
-#echo "xf0r3m ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers;
-
 # Miejsce na twoje zmiany, przed poleceniem 'tidy'
 tidy;