]> gitweb.morketsmerke.org Git - immudex-testing.git/commitdiff
Usunięcie niepotrzebnych pozostałości po starym sposobie wydawania immudex-testing 2
authorxf0r3m <jakubstasinski@protonmail.com>
Wed, 16 Aug 2023 14:34:13 +0000 (16:34 +0200)
committerxf0r3m <jakubstasinski@protonmail.com>
Wed, 16 Aug 2023 14:34:13 +0000 (16:34 +0200)
rewinding.txt [deleted file]
tests.sh [deleted file]

diff --git a/rewinding.txt b/rewinding.txt
deleted file mode 100644 (file)
index d3e5d75..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-Możliwe jest dokonanie zmian w archiwum .squashfs. Wymaga to trochę zachodu
-i nieco więcej zasobów. 
-
-Na początku należy zainstalować pakiet squashfs-tools. Chcąc rozpakować
-archiwum należy dysponować ilością wolnej pamięci operacyjnej powyżej 500MB.
-
-Rozpakowanie archiwum należy rozpocząć od utworzenienia katalogu docelowego.
-Na przykład katalogu chroot na dysku (dodatkowej partycji, poza instalacją
-immudex). Następnie możemy wydać poniższe polecenie:
-
-sudo unsquashfs -f -d chroot/ /run/live/medium/live/filesystem.squashfs
-
-Za pomocą tego polecenie całe archiwum zostanie wypakowane do tego katalogu,
-w którym możemy dowolnie zmieniać. Po zakończeniu wprowadzania zmian,
-pliki z katalogu należy spakować do archiwum .squashfs.
-
-sudo mksquashfs chroot filesystem.squashfs -e boot
-
-Tak utworzone archiwum należy skopiować na dysk, poprzedzając to zmianą
-opcji montowania dysku w systemie. Po skopiowaniu archium system należy
-niezwłocznie uruchomić ponownie.
-
-sudo mount /dev/vda1 /run/live/medium -o remount,rw
-
-Zapobiegawczo usuwam stare archiwum, aby nie powodowało potencjalnego
-konfliktu podczas kopiowania nowego. O wiele lepszym rozwiązaniem jest
-pozostawienie starego archiwum w ramach kopii. W momencie gdy coś nie
-zadziała nie zostaniemy uziemieni na czas pobrania nowego archiwum z
-sourceforge.net
-
-sudo rm /run/live/medium/live/filesystem.squashfs
-
-sudo cp filesystem.squashfs /run/live/medium/live
-
-sudo reboot
diff --git a/tests.sh b/tests.sh
deleted file mode 100755 (executable)
index 0efc984..0000000
--- a/tests.sh
+++ /dev/null
@@ -1,512 +0,0 @@
-#!/bin/bash
-
-function is_in_file() {
-  grep -q "^${1}$" $2 2>/dev/null;
-  return $?;
-}
-
-function is_file_correct() {
-  cmp $1 $2 > /dev/null 2>&1;
-  return $?;
-}
-
-function is_running() {
-  ps -aux | grep "$1" | head -1 | grep -q $2;
-  return $?;
-}
-
-function is_package_installed() {
-  apt list --installed 2>/dev/null | grep -q $1;
-  return $?
-}
-
-function is_immudex_lightdm_wallpaper() {
-  value='background = /usr/share/images/desktop-base/lightdm_wallpaper.jpg';
-  file="/etc/lightdm/lightdm-gtk-greeter.conf";
-  result=$(grep -q "^${value}$" $file);
-  return $result;
-}
-
-function is_immudex_lightdm_default_user_image() {
-  value='default-user-image = /usr/share/images/desktop-base/immudex_xfce_greeter_logo.png';
-  file="/etc/lightdm/lightdm-gtk-greeter.conf";
-  result=$(grep -q "^${value}$" $file);
-  return $result;
-}
-
-function is_immudex_lightdm_theme() {
-  value='theme-name = Adwaita-dark';
-  file="/etc/lightdm/lightdm-gtk-greeter.conf";
-  result=$(grep -q "^${value}$" $file);
-  return $result;
-}
-
-function is_immudex_default_wallpaper_set() {
-  value="/usr/share/images/desktop-base/d13_wallpaper.png";
-  file="/usr/share/images/desktop-base/default";
-  if [ -L $file ] && $(file $file | grep -q "${value}$"); then
-    return 0;
-  else
-    return 1;
-  fi  
-}
-
-function is_immudex_panel_whiskermenu_ok() {
-  value="$HOME/immudex-testing/files/104/whiskermenu-1.rc";
-  file="/home/user/.config/xfce4/panel/whiskermenu-1.rc";
-  result=$(is_file_correct $value $file);
-  return $result;
-}
-
-function is_immudex_panel_activator_1_ok() {
-  value='Name=Firefox ESR (Firejailed)';
-  value1="Exec=/usr/local/bin/secured-firefox";
-  file="/home/user/.config/xfce4/panel/launcher-5/16844254192.desktop";
-  result=$($(grep -q "^${value}$" $file 2> /dev/null) && $(is_in_file $value1 $file));
-  return $result;
-}
-
-function is_immudex_panel_activator_2_ok() {
-  value="Exec=xfce4-terminal";
-  value1='Name=Terminal Emulator';
-  file="/home/user/.config/xfce4/panel/launcher-7/16844254905.desktop"
-  result=$($(is_in_file $value $file) && $(grep -q "^${value}$" $file 2>/dev/null));
-  return $result;
-}
-
-function is_immudex_panel_activatior_3_ok() {
-  value="Name=Padlock";
-  value1='Exec=xfce4-terminal -x /usr/local/bin/padlock';
-  file="/home/user/.config/xfce4/panel/launcher-14/16844255236.desktop";
-  result=$($(is_in_file $value $file) && $(grep -q "^${value1}$" $file 2>/dev/null));
-  return $result;
-}
-
-function is_immudex_widget_connky_running() {
-  value='conky --daemonize --pause=5';
-  value1="$USER";
-  result=$(ps -aux | grep "$value" | head -1 | grep -q $value1);
-  return $result;
-}
-
-function is_immudex_conky_file_ok() {
-  wget -q https://github.com/xf0r3m/xfcedebian/raw/d13/conkyrc -O /tmp/d13_conkyrc;
-  value="/tmp/d13_conkyrc";
-  value1="/home/user/.conkyrc";
-  result=$(is_file_correct $value $value1);
-  return $result;    
-}
-
-function is_immudex_keyboard_shortcut_config_ok() {
-  value="$HOME/immudex-testing/files/104/xfce4-keyboard-shortcuts.xml";
-  value1="/home/user/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_check_terminal_config() {
-  value="BackgroundMode=TERMINAL_BACKGROUND_IMAGE";
-  value1="MiscDefaultGeometry=100x30";
-  value2="BackgroundImageFile=/usr/share/images/desktop-base/lofi_girl.jpg";
-  value3="BackgroundImageStyle=TERMINAL_BACKGROUND_STYLE_FILLED";
-  value4="BackgroundImageShading=0,750000";
-  value5='FontName=Source Code Pro Medium 12';
-  file="/home/user/.config/xfce4/terminal/terminalrc";
-  result=$($(is_in_file $value $file) &&\
-  $(is_in_file $value1 $file) &&\
-  $(is_in_file $value2 $file) &&\
-  $(is_in_file $value3 $file) &&\
-  $(is_in_file $value4 $file) &&\
-  $(grep -q "^${value5}$" $file));
-  return $result; 
-}
-
-function is_immudex_xfce_notes_config() {
-  value="$HOME/immudex-testing/files/100/gtk-main.css";
-  value1="/usr/share/xfce4-notes-plugin/gtk-3.0/gtk-main.css";
-  result=$(is_file_correct $value $value1);
-       return $result;
-}
-
-function is_immudex_irssi_config_file_ok() {
-  value="$HOME/immudex-testing/files/100/config";
-  value1="/home/user/.irssi/config";
-  result=$(sudo cmp $value $value1);
-  return $result;
-}
-
-function is_immudex_irssi_default_theme_ok() {
-  value="$HOME/immudex-testing/files/100/default.theme";
-  value1="/home/user/.irssi/default.theme";
-  result=$(sudo cmp $value $value1);
-  return $result;
-}
-
-function is_immudex_libreoffice_config_dir() {
-  [ -d /home/user/.config/libreoffice ];
-  return $?;
-}
-
-function is_immudex_firejail_config_ok() {
-  value="$HOME/immudex-testing/files/100/firejail.config";
-  value1="/etc/firejail/firejail.config";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_notifier_distro_autostart_file_ok() {
-  value="$HOME/immudex-testing/files/100/Notifier\ \-\ distro.desktop";
-  value1="/home/user/.config/autostart/Notifier\ \-\ distro.desktop";
-  result=$(eval "cmp $value $value1 > /dev/null 2>&1");
-  return $result;
-}
-
-function is_immudex_notifier_packages_autostart_file_ok() {
-  value="$HOME/immudex-testing/files/Notifier\ \-\ packages.desktop";
-  value1="/home/xf0r3m/.config/autostart/Notifier\ \-\ packages.desktop";
-  result=$(eval "cmp $value $value1 > /dev/null 2>&1");
-  return $result;
-}
-
-function is_immudex_redshift_config_ok() {
-  value="$HOME/immudex-testing/files/100/redshift.conf";
-  value1="/etc/skel/.config/redshift.conf";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_redshift_autostart_file_ok() {
-  value="$HOME/immudex-testing/files/100/redshift.desktop";
-  value1="/etc/skel/.config/autostart/redshift.desktop";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-#Do wyjaśnienia w repozytorium jest "starszy" plik niż na obrazie
-function is_immudex_user_defined_mime_ok() {
-  value="$HOME/immudex-testing/files/100/mimeapps.list";
-  value1="/etc/skel/.config/mimeapps.list";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_sync_sh_share_dir() {
-  [ -d /usr/share/sync.sh ];
-  return $?;
-}
-
-function is_immudex_hostname_service_file_ok() {
-  value="$HOME/immudex-testing/files/100/immudex_hostname.service";
-  value1="/etc/systemd/system/immudex_hostname.service";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_right_firefox_profile() {
-  value='user_pref("extensions.lastPlatformVersion", "115.0.2");';
-  file="/home/user/.mozilla/firefox/l9vw01ma.default-esr/prefs.js";
-  result=$(sudo grep -q "^${value}$" $file 2> /dev/null);
-  return $result;
-}
-
-function is_immudex_apply_image_ok() {
-  value="$HOME/immudex-testing/images/100/apply.png";
-  value1="/usr/share/icons/apply.png";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_rss_image_ok() {
-  value="$HOME/immudex-testing/images/100/rss.png";
-  value1="/usr/share/icons/rss.png";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_notes_background_image_ok() {
-  value="$HOME/immudex-testing/images/100/notes-background.jpg";
-  value1="/usr/share/images/desktop-base/notes-background.jpg";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function isnt_immudex_notrespass_backgroung_file() {
-  [ ! -f /usr/share/images/desktop-base/no_trespass_abandon.jpeg ];
-  return $?;
-}
-
-function is_immudex_hostname_service_enabled() {
-  systemctl status immudex_hostname.service --no-pager | grep -q 'enabled';
-  return $?;
-}
-
-function is_immudex_motd2_enabled() {
-  value="/usr/local/bin/motd2";
-  file="/etc/bash.bashrc";
-  result=$(is_in_file $value $file);
-  return $result;
-}
-
-function is_immudex_chhome_alias() {
-  value="alias chhome";
-  file="/etc/bash.bashrc";
-  result=$(grep -q "^${value}" $file 2>/dev/null);
-  return $result;
-}
-
-function is_immudex_ping_command_has_setuid() {
-  [ -u /usr/bin/ping ];
-  return $?;
-}
-
-function is_immudex_is_default_hostname() {
-  value="immudex";
-  file="/etc/hostname";
-  result=$(is_in_file $value $file);
-  return $result;
-}
-
-function is_immudex_has_resolv_in_etc_hosts() {
-  value='127.0.1.1  immudex';
-  file="/etc/hosts";
-  result=$(grep -q "^${value}$" $file 2>/dev/null);
-  return $result;
-}
-
-function is_immudex_user_is_in_sudoers_file() {
-  value='user ALL=(ALL:ALL) NOPASSWD:ALL';
-  file="/etc/sudoers";
-  result=$(sudo grep -q "^${value}$" $file 2>/dev/null);
-  return $result;
-}
-
-function is_immudex_xf0r3m_is_in_sudoers_file() {
-  value='xf0r3m ALL=(ALL:ALL) NOPASSWD:ALL';
-  file="/etc/sudoers";
-  result=$(sudo grep -q "^${value}$" $file 2>/dev/null);
-  return $result;
-}
-
-function is_immudex_dot_bashrc_user_file() {
-  [ -f /home/user/.bashrc ];
-  return $?;
-}
-
-function is_immudex_user_profile_image() {
-  value="/usr/share/images/desktop-base/immudex_xfce_greeter_logo.png";
-  [ -L /home/user/.face ] && $(file /home/user/.face | grep -q "${value}$");
-  return $?;
-}
-
-function is_immudex_user_profile_image_icon() {
-  value=".face";
-  [ -L /home/user/.face.icon ] && $(file /home/user/.face.icon | grep -q "${value}$");
-  return $?;
-}
-
-function is_immudex_user_fonts_dir() {
-  [ -d /home/user/.fonts ];
-  return $?;
-}
-
-function is_immudex_user_dot_profile_file() {
-  [ -f /home/user/.profile ];
-  return $?;
-}
-
-function is_immudex_user_dot_vimrc_file() {
-  [ -f /home/user/.vimrc ];
-  return $?;
-}
-
-function is_immudex_xfce4_notes_autostart() {
-  value="$HOME/immudex-testing/files/autostart-x4notes.desktop";
-  value1="/home/xf0r3m/.config/autostart/autostart-x4notes.desktop";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_create_media_ok() {
-  value="$HOME/immudex-testing/tools/106/create_media";
-  value1="/usr/local/bin/create_media";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_immudex_hostname_ok() {
-  value="$HOME/immudex-testing/tools/106/immudex_hostname";
-  value1="/usr/local/bin/immudex_hostname";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_pl_ok() { 
-  value="$HOME/immudex-testing/tools/105/pl";
-  value1="/usr/local/bin/pl";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_newsfeed_ok() {
-  value="$HOME/immudex-testing/tools/103/newsfeed";
-  value1="/usr/local/bin/newsfeed";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_immudex_addons_ok() {
-  value="$HOME/immudex-testing/tools/101/immudex_addons";
-  value1="/usr/local/bin/immudex_addons";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_autostart-x4notes_ok() {
-  value="$HOME/immudex-testing/tools/100/autostart-x4notes";
-  value1="/usr/local/bin/autostart-x4notes";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_immudex_branch_ok() {
-  value="$HOME/immudex-testing/tools/100/immudex_branch";
-  value1="/usr/local/bin/immudex_branch";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_immudex_crypt_ok() {
-  value="$HOME/immudex-testing/tools/100/immudex_crypt";
-  value1="/usr/local/bin/immudex_crypt";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_immudex_install_ok() {
-  value="$HOME/immudex-testing/tools/100/immudex_install";
-  value1="/usr/local/bin/immudex_install";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_immudex_upgrade_ok() {
-  value="$HOME/immudex-testing/tools/100/immudex_upgrade";
-  value1="/usr/local/bin/immudex_upgrade";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_import_gpgkeys_ok() {
-  value="$HOME/immudex-testing/tools/100/import_gpgkeys";
-  value1="/usr/local/bin/import_gpgkeys";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_import_sshkeys_ok() {
-  value="$HOME/immudex-testing/tools/100/import_sshkeys";
-  value1="/usr/local/bin/import_sshkeys";
-  result=$(is_file_correct $value $value1);
-       return $result;
-}
-
-function is_immudex_tool_library_ok() {
-  value="$HOME/immudex-testing/tools/100/library.sh";
-  value1="/usr/local/bin/library.sh";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_meteo_ok() {
-  value="$HOME/immudex-testing/tools/100/meteo";
-  value1="/usr/local/bin/meteo";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_morketsmerke_ok() {
-  value="$HOME/immudex-testing/tools/100/morketsmerke";
-  value1="/usr/local/bin/morketsmerke";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_motd2_ok() {
-  value="$HOME/immudex-testing/tools/100/motd2";
-  value1="/usr/local/bin/motd2";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_notifier_ok() {
-  value="$HOME/immudex-testing/tools/100/notifier";
-  value1="/usr/local/bin/notifier";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_padlock_ok() {
-  value="$HOME/immudex-testing/tools/100/padlock";
-  value1="/usr/local/bin/padlock";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_secured-firefox_ok() {
-  value="$HOME/immudex-testing/tools/100/secured-firefox";
-  value1="/usr/local/bin/secured-firefox";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_shoutcasts_ok() {
-  value="$HOME/immudex-testing/tools/100/shoutcasts";
-  value1="/usr/local/bin/shoutcasts";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_sync_ok() {
-  value="$HOME/immudex-testing/tools/100/sync.sh";
-  value1="/usr/local/bin/sync.sh";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-function is_immudex_tool_ytplay_ok() {
-  value="$HOME/immudex-testing/tools/100/ytplay";
-  value1="/usr/local/bin/ytplay";
-  result=$(is_file_correct $value $value1);
-  return $result;
-}
-
-list="live-boot systemd-sysv tzdata locales keyboard-configuration console-setup firejail ufw cryptsetup lsof extlinux grub-efi-amd64 efibootmgr bash-completion etherwake wakeonlan cifs-utils wget figlet mpv youtube-dl vim-gtk3 redshift irssi nmap nfs-common remmina python3-pip ffmpeg debootstrap squashfs-tools xorriso syslinux-efi grub-pc-bin grub-efi-amd64-bin mtools dosfstools chrony python3-venv isolinux rsync mutt gimp openvpn netselect-apt gvfs-backends dnsutils";
-
-function check_packages() {
-  for i in $@; do
-    echo -n "Zainstalowano $i ...";
-    if is_package_installed $1; then
-      echo -e "[ \e[32mOK\e[0m ]";
-    else
-      echo -e "[ \e[31mFail\e[0m ]";
-    fi
-
-  done
-}
-
-
-flist="is_immudex_lightdm_wallpaper is_immudex_lightdm_default_user_image is_immudex_lightdm_theme is_immudex_default_wallpaper_set is_immudex_panel_whiskermenu_ok is_immudex_panel_activator_1_ok is_immudex_panel_activator_2_ok is_immudex_panel_activatior_3_ok is_immudex_widget_connky_running is_immudex_conky_file_ok is_immudex_keyboard_shortcut_config_ok is_immudex_check_terminal_config is_immudex_xfce_notes_config is_immudex_irssi_config_file_ok is_immudex_irssi_default_theme_ok is_immudex_libreoffice_config_dir is_immudex_firejail_config_ok is_immudex_notifier_distro_autostart_file_ok is_immudex_notifier_packages_autostart_file_ok is_immudex_redshift_config_ok is_immudex_redshift_autostart_file_ok is_immudex_user_defined_mime_ok is_immudex_sync_sh_share_dir is_immudex_hostname_service_file_ok is_immudex_right_firefox_profile is_immudex_apply_image_ok is_immudex_rss_image_ok is_immudex_notes_background_image_ok isnt_immudex_notrespass_backgroung_file is_immudex_hostname_service_enabled is_immudex_motd2_enabled is_immudex_chhome_alias is_immudex_ping_command_has_setuid is_immudex_user_is_in_sudoers_file is_immudex_xf0r3m_is_in_sudoers_file is_immudex_dot_bashrc_user_file is_immudex_user_profile_image is_immudex_user_profile_image_icon is_immudex_user_fonts_dir is_immudex_user_dot_profile_file is_immudex_user_dot_vimrc_file is_immudex_xfce4_notes_autostart is_immudex_tool_create_media_ok is_immudex_tool_immudex_hostname_ok is_immudex_tool_pl_ok is_immudex_tool_newsfeed_ok is_immudex_tool_immudex_addons_ok is_immudex_tool_autostart-x4notes_ok is_immudex_tool_immudex_branch_ok is_immudex_tool_immudex_crypt_ok is_immudex_tool_immudex_install_ok is_immudex_tool_immudex_upgrade_ok is_immudex_tool_import_gpgkeys_ok is_immudex_tool_import_sshkeys_ok is_immudex_tool_library_ok is_immudex_tool_meteo_ok is_immudex_tool_morketsmerke_ok is_immudex_tool_motd2_ok is_immudex_tool_notifier_ok is_immudex_tool_padlock_ok is_immudex_tool_secured-firefox_ok is_immudex_tool_shoutcasts_ok is_immudex_tool_sync_ok is_immudex_tool_ytplay_ok";
-
-function tests() {
-  for fn in $@; do
-    echo -n "Test: $fn ... ";
-    if $fn; then
-      echo -e "[ \e[32mOK\e[0m ]";
-    else
-      echo -e "[ \e[31mFail\e[0m ]";
-    fi
-  done
-}
-
-check_packages $list;
-tests $flist;