From c9437b6238e347d06c65c4c8dc8b6713f3d8dcd1 Mon Sep 17 00:00:00 2001 From: Mattia Procopio Date: Wed, 12 Jun 2024 16:53:54 +0200 Subject: [PATCH 01/38] Add a video to show how to change timezone --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f5f3a56..82f3562 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,12 @@ this likely means that unfortunately your raspberry pi rev cannot boot the image Once you are logged in the first thing you should do is update the system, open the terminal and type `update-astroarch` command # Set timezone -Do not forget to set the right timezone! to do so run `sudo timedatectl set-timezone Foo/Bar` where Foo/Bar is something like `Europe/Rome` +Here a small video that will show you how to set the timezone without the terminal +https://github.com/devDucks/astroarch/assets/4163222/a935b491-5b7a-444d-9f89-a01a279063de + +If you want to use the terminal list first the available timezone with `timedatecl list-timezones` and then set the right one with `tsudo timedatectl set-timezone Foo/Bar` where Foo/Bar is something like `Europe/Rome` + +Do not forget to set the right timezone! # Passwords To save you some time, here the default password you will need for AstroArch: From db9b30966616c34c310a1cbc149f0a4a234c843a Mon Sep 17 00:00:00 2001 From: Mattia Procopio Date: Wed, 12 Jun 2024 16:55:30 +0200 Subject: [PATCH 02/38] Drop blank like to show the video --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 82f3562..7a27368 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ Once you are logged in the first thing you should do is update the system, open # Set timezone Here a small video that will show you how to set the timezone without the terminal + https://github.com/devDucks/astroarch/assets/4163222/a935b491-5b7a-444d-9f89-a01a279063de If you want to use the terminal list first the available timezone with `timedatecl list-timezones` and then set the right one with `tsudo timedatectl set-timezone Foo/Bar` where Foo/Bar is something like `Europe/Rome` From dbb0fa6d5e14443d82cd62715652952f63f8284e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Carlin?= Date: Sun, 29 Sep 2024 12:18:26 +0200 Subject: [PATCH 03/38] Update files for the driver vc4-kms-v3d (#106) --- BUILD.md | 2 +- astroarch_build.sh | 11 ++-- configs/99-v3d.conf | 1 - configs/config.txt | 96 +++++++++++++--------------- configs/kwinrc | 1 - configs/xorg.conf | 50 ++++++++------- systemd/astroarch-onboarding.service | 12 ++++ systemd/x0vncserver.service | 1 + 8 files changed, 90 insertions(+), 84 deletions(-) create mode 100644 systemd/astroarch-onboarding.service diff --git a/BUILD.md b/BUILD.md index 32f5c94..dfc9abe 100644 --- a/BUILD.md +++ b/BUILD.md @@ -87,7 +87,7 @@ After reboot, few final steps may be made to improve further the final image, ma - Set a wallpaper - Edit `/boot/cmdline.txt` replacing the default content with ``` - root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw rootwait console=serial0,115200 console=tty1 fsck.repair=yes + root=UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw rootwait console=serial0,115200 console=tty1 fsck.repair=yes plymouth.ignore-serial-consoles video=HDMI-A-1:1920x1080@60D ``` - start Kstars without acknowledging any message, start ekos simulator, go to the guiding tab and download the most common indexes - enable the resize script to do its magic on the user's first boot - run `sudo systemctl enable resize_once` diff --git a/astroarch_build.sh b/astroarch_build.sh index 1b91f2a..3d5c949 100644 --- a/astroarch_build.sh +++ b/astroarch_build.sh @@ -44,7 +44,7 @@ pacman -Syu base-devel pipewire-jack gnu-free-fonts wireplumber \ ksystemlog discover kwalletmanager kgpg qt5-serialbus \ qt5-serialport qt5ct udisks2-qt5 xorg-fonts-misc fuse2 \ fortune-mod cowsay pacman-contrib arandr neofetch \ - astromonitor kscreen sddm-kcm flatpak --noconfirm --ask 4 + astromonitor kscreen sddm-kcm flatpak ckbcomp astroarch-onboarding --noconfirm --ask 4 # Allow wheelers to sudo without password to install packages sed -i 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers @@ -99,6 +99,7 @@ ln -s /home/astronaut/.astroarch/systemd/novnc.service /usr/lib/systemd/system/n ln -s /home/astronaut/.astroarch/systemd/x0vncserver.service /etc/systemd/system/x0vncserver.service ln -s /home/astronaut/.astroarch/systemd/resize_once.service /etc/systemd/system/resize_once.service ln -s /home/astronaut/.astroarch/configs/.astroarch.version /home/astronaut/.astroarch.version +ln -s /home/astronaut/.astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/astroarch-onboarding.service # Copy xorg config cp /home/astronaut/.astroarch/configs/xorg.conf /etc/X11/ @@ -153,17 +154,17 @@ su astronaut -c "cp /home/astronaut/.astroarch/configs/kscreenlockerrc /home/ast timedatectl set-timezone Europe/London # If we are on a raspberry let's adjust /boot/config.txt +sed -i 's/max_framebuffers=2/max_framebuffers=2\nframebuffer_depth=24/g' /boot/config.txt +sed -i 's/dtoverlay=vc4-kms-v3d/dtoverlay=vc4-kms-v3d,cma-512/g' /boot/config.txt echo dtparam=i2c_arm=on >> /boot/config.txt echo dtparam=audio=on >> /boot/config.txt echo disable_overscan=1 >> /boot/config.txt echo gpu_mem=256 >> /boot/config.txt -echo disable_splash=1 >> /boot/config.txt echo 3dtparam=krnbt=on >> /boot/config.txt -echo hdmi_drive=2 >> /boot/config.txt echo dtoverlay=i2c-rtc >> /boot/config.txt +echo kernel=kernel8.img >> /boot/config.txt +echo hdmi_enable_4kp60=1 >> /boot/config.tx echo i2c-dev > /etc/modules-load.d/raspberrypi.conf -sed -i 's/dtoverlay=vc4-kms-v3d/dtoverlay=vc4-fkms-v3d/g' /boot/config.txt -sed -i 's/max_framebuffers=2/max_framebuffers=2\nframebuffer_depth=24/g' /boot/config.txt # Pi5 only settings should go here echo [pi5] >> /boot/config.txt diff --git a/configs/99-v3d.conf b/configs/99-v3d.conf index 6e58d21..f23cd13 100644 --- a/configs/99-v3d.conf +++ b/configs/99-v3d.conf @@ -3,5 +3,4 @@ Section "OutputClass" MatchDriver "vc4" Driver "modesetting" Option "PrimaryGPU" "true" - Option "AccelMethod" "none" EndSection diff --git a/configs/config.txt b/configs/config.txt index f40f701..83b25e6 100644 --- a/configs/config.txt +++ b/configs/config.txt @@ -1,68 +1,58 @@ -# uncomment if you get no picture on HDMI for a default "safe" mode -#hdmi_safe=1 +# For more options and information see: +# http://rptl.io/configtxt -# uncomment this if your display has a black border of unused pixels visible -# and your display can output without overscan -disable_overscan=1 +initramfs initramfs-linux.img followkernel -# uncomment the following to adjust overscan. Use positive numbers if console -# goes off screen, and negative if there is too much border -#overscan_left=16 -#overscan_right=16 -#overscan_top=16 -#overscan_bottom=16 +# Uncomment some or all of these to enable the optional hardware interfaces +#dtparam=i2c_arm=on +#dtparam=i2s=on +#dtparam=spi=on -# uncomment to force a console size. By default it will be display's size minus -# overscan. -#framebuffer_width=1280 -#framebuffer_height=720 +# Additional overlays and parameters are documented +# /boot/firmware/overlays/README -# uncomment if hdmi display is not detected and composite is being output -hdmi_force_hotplug=1 -hdmi_group:0=2 -hdmi_mode:0=69 +# Automatically load overlays for detected cameras +camera_auto_detect=1 -# 4k Resolution -# Comment above and uncomment the follow to get 4k resolution -#hdmi_group=1 -#hdmi_mode=95 +# Automatically load overlays for detected DSI displays +display_auto_detect=1 -# uncomment to force a HDMI mode rather than DVI. This can make audio work in -# DMT (computer monitor) modes -#hdmi_drive=2 +# Enable DRM VC4 V3D driver +dtoverlay=vc4-kms-v3d,cma-512 +max_framebuffers=2 +framebuffer_depth=24 -# uncomment to increase signal to HDMI, if you have interference, blanking, or -# no display -#config_hdmi_boost=4 +# Uncomment if hdmi display is not detected and composite is being output +#hdmi_force_hotplug=1 -# uncomment for composite PAL -#sdtv_mode=2 +# Uncomment if you want to disable wifi or bluetooth respectively +#dtoverlay=disable-wifi +#dtoverlay=disable-bt -#uncomment to overclock the arm. 700 MHz is the default. -#arm_freq=800 +# Uncomment this to enable infrared communication. +#dtoverlay=gpio-ir,gpio_pin=17 +#dtoverlay=gpio-ir-tx,gpio_pin=18 -# Uncomment some or all of these to enable the optional hardware interfaces -dtparam=i2c_arm=on -#dtparam=i2s=on -dtparam=spi=on +# Run as fast as firmware / board allows +arm_boost=1 -# Additional overlays and parameters are documented /boot/overlays/README +[cm4] +# Enable host mode on the 2711 built-in XHCI USB controller. +# This line should be removed if the legacy DWC2 controller is required +# (e.g. for USB device mode) or if USB support is not required. +otg_mode=1 -# Enable audio (loads snd_bcm2835) +[all] +dtparam=i2c_arm=on dtparam=audio=on -# Hardware clock -dtoverlay=i2c-rtc,ds3231 - -[pi4] -# Enable DRM VC4 V3D driver on top of the dispmanx display stack -dtoverlay=vc4-fkms-v3d -max_framebuffers=2 -#hdmi_enable_4kp60=1 -hdmi_enable_4k=1 +disable_overscan=1 gpu_mem=256 -max_framebuffer_width=3840 -max_framebuffer_height=2160 +#disable_splash=1 +3dtparam=krnbt=on +#hdmi_drive=2 +dtoverlay=i2c-rtc +kernel=kernel8.img +hdmi_enable_4kp60=1 -[all] -#dtoverlay=vc4-fkms-v3d -enable_uart=1 +[pi5] +dtparam=rtc_bbat_vchg=3000000 diff --git a/configs/kwinrc b/configs/kwinrc index c01d0da..3750cd6 100644 --- a/configs/kwinrc +++ b/configs/kwinrc @@ -2,5 +2,4 @@ update_info=kwin.upd:replace-scalein-with-scale,kwin.upd:port-minimizeanimation-effect-to-js,kwin.upd:port-scale-effect-to-js,kwin.upd:port-dimscreen-effect-to-js,kwin.upd:auto-bordersize,kwin.upd:animation-speed,kwin.upd:desktop-grid-click-behavior,kwin.upd:no-swap-encourage,kwin.upd:make-translucency-effect-disabled-by-default,kwin.upd:remove-flip-switch-effect,kwin.upd:remove-cover-switch-effect,kwin.upd:remove-cubeslide-effect,kwin.upd:remove-xrender-backend,kwin.upd:enable-scale-effect-by-default [Compositing] -Enabled=false OpenGLIsUnsafe=false diff --git a/configs/xorg.conf b/configs/xorg.conf index 628489e..417be45 100644 --- a/configs/xorg.conf +++ b/configs/xorg.conf @@ -1,57 +1,61 @@ -Section "ServerLayout" - Identifier "Main Layout" - Screen 0 "Screen 1" - Screen 1 "Screen 0" +Section "Module" + Load "dri2" + Load "glamoregl" +EndSection + +Section "DRI" + Mode 0666 EndSection Section "Monitor" Identifier "Monitor0" HorizSync 28.0-80.0 VertRefresh 48.0-75.0 - Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync - Option "PreferredMode" "1920x1080_60" + Modeline "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync + Option "PreferredMode" "1920x1080" EndSection Section "Device" - Identifier "Dummycard0" - Driver "dummy" - VideoRam 192000 - Option "ConstantDPI" "true" - Option "NoDDC" "true" - Option "IgnoreEDID" "true" + Identifier "hdmi-a-1" + Driver "modesetting" + Option "AccelMethod" "glamor" EndSection Section "Screen" DefaultDepth 24 Identifier "Screen0" - Device "Dummycard0" + Device "hdmi-a-1" Monitor "Monitor0" SubSection "Display" Depth 24 - Modes "1920x1080_60.00" - EndSubSection + Modes "1920x1080" + EndSubSection EndSection - + Section "Monitor" Identifier "Monitor1" HorizSync 28.0-80.0 VertRefresh 48.0-75.0 - Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync - Option "PreferredMode" "1920x1080_60" + Modeline "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync + Option "PreferredMode" "1920x1080" EndSection Section "Device" - Identifier "hdmi-a-1" - Driver "modesetting" + Identifier "Dummycard0" + Driver "dummy" + VideoRam 192000 + Option "ConstantDPI" "true" + Option "NoDDC" "true" + Option "IgnoreEDID" "true" EndSection Section "Screen" DefaultDepth 24 Identifier "Screen1" - Device "hdmi-a-1" + Device "Dummycard0" Monitor "Monitor1" SubSection "Display" Depth 24 - Modes "1920x1080_60.00" - EndSubSection + Modes "1920x1080" + EndSubSection EndSection diff --git a/systemd/astroarch-onboarding.service b/systemd/astroarch-onboarding.service new file mode 100644 index 0000000..6b75a1e --- /dev/null +++ b/systemd/astroarch-onboarding.service @@ -0,0 +1,12 @@ +[Unit] +Description=AstroArch onboarding configurator + +[Service] +User=root +Group=root +ExecStart=/bin/bash /usr/share/calamares/.astroarch/configs/calamares_astroarch/run-astroarch-onboarding.sh +ExecStop=/bin/systemctl disable astroarch-onboarding.service +Type=oneshot + +[Install] +WantedBy=multi-user.target diff --git a/systemd/x0vncserver.service b/systemd/x0vncserver.service index 4b0c199..57fb6ae 100644 --- a/systemd/x0vncserver.service +++ b/systemd/x0vncserver.service @@ -1,6 +1,7 @@ [Unit] Description=Remote desktop service (VNC) for :0 display Requires=display-manager.service +After=network-online.target After=display-manager.service [Service] From dffbe822439a0ef51c217702a9d8cb5308b39214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Carlin?= Date: Thu, 3 Oct 2024 15:19:44 +0200 Subject: [PATCH 04/38] Use Kdialog for AstroArch Tweak Tool (#113) --- README.md | 10 ++++- astroarch_build.sh | 2 +- desktop/AstroArch-Tweak-Tool | 20 +++++++++ scripts/astroarch-tweak-tool.zsh | 72 ++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+), 3 deletions(-) create mode 100755 desktop/AstroArch-Tweak-Tool create mode 100755 scripts/astroarch-tweak-tool.zsh diff --git a/README.md b/README.md index 7a27368..dc76ac0 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,8 @@ The followings are some useful commands that you can run from the terminal so yo - `use-astro-bleeding-edge` => install bleeding edge packages for Kstars and INDI - `use-astro-stable` => install stable packages for Kstars and INDI +The AstroArch Tweak Tool utility allows you to easily run all these commands + # Connecting via browser (noVNC) By default `AstroArch` will start a hostpot called `AstroArch`, to connect to that WiFi network use the password `astronomy` @@ -239,9 +241,11 @@ ADDITIONAL CONSIDERATIONS (use these as guidelines): If you are having trouble getting the signal, you may need to protect your USB3 cables (they interfere with the GPS signal) if the device is not recognized (which is very unlikely on ArchLinux), we do not recommend using ttyXXX as it may point to other serial devices after a reboot +These commands are in the AstroArch Tweak Tool utility + # How to enable bluetooth By default there are no packages to enabling bluetooth, to install them and enabling bluetooth functionalities run the following command `bluetooth_on`, this command will install the BT packages and enable the bluetooth daemon to run automatically at boot. -If you want to disable bluetooth daemon autostart just run `bluetooth_off` and if you want to remove it run `bluetooth_remove` +If you want to disable bluetooth daemon autostart just run `bluetooth_off` and if you want to remove it run `bluetooth_remove`. These commands are in the AstroArch Tweak Tool utility # How to enable FTP Identical to Bluetooth, there is no default package to activate an FTP server. @@ -250,7 +254,9 @@ To install and activate it, run the following command `ftp_on`. This command wil To connect from a remote station, use an FTP client such as FileZilla or other. All you need to do is identify yourself with the astronaut user, his password and the IP address where the server is located. You will easily find the IP address of your LAN or WLAN with the ifconfig command in a console. Once connected, you can very quickly transfer your files in both directions. -If you want to disable the automatic start of the FTP server, simply run `ftp_off` and if you want to remove it, run `ftp_remove`. +If you want to disable the automatic start of the FTP server, simply run `ftp_off` and if you want to remove it, run `ftp_remove`. + +These commands are in the AstroArch Tweak Tool utility # Where to find more packages? If you want to install more packages you should look what is available here https://archlinuxarm.org/packages - if you find the package there you can easily install it running `sudo pacman -S PACKAGE_NAME`, diff --git a/astroarch_build.sh b/astroarch_build.sh index 3d5c949..8f9177b 100644 --- a/astroarch_build.sh +++ b/astroarch_build.sh @@ -44,7 +44,7 @@ pacman -Syu base-devel pipewire-jack gnu-free-fonts wireplumber \ ksystemlog discover kwalletmanager kgpg qt5-serialbus \ qt5-serialport qt5ct udisks2-qt5 xorg-fonts-misc fuse2 \ fortune-mod cowsay pacman-contrib arandr neofetch \ - astromonitor kscreen sddm-kcm flatpak ckbcomp astroarch-onboarding --noconfirm --ask 4 + astromonitor kscreen sddm-kcm flatpak ckbcomp astroarch-onboarding kdialog --noconfirm --ask 4 # Allow wheelers to sudo without password to install packages sed -i 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers diff --git a/desktop/AstroArch-Tweak-Tool b/desktop/AstroArch-Tweak-Tool new file mode 100755 index 0000000..455280d --- /dev/null +++ b/desktop/AstroArch-Tweak-Tool @@ -0,0 +1,20 @@ +[Desktop Entry] +Categories=System +Comment[fr_CH]=Tools for AstroArch +Comment=Tools for AstroArch +Encoding=UTF-8 +Exec=/home/astronaut/.astroarch/scripts/astroarch-tweak-tool.zsh +GenericName[fr_CH]=AstroArch Tweak Tool +GenericName=AstroArch Tweak Tool +Icon=/home/astronaut/.astroarch/assets/icons/novnc-192x192.png +MimeType= +Name[fr_CH]=AstroArch Tweak Tool +Name=AstroArch Tweak Tool +Path= +StartupNotify=true +Terminal=true +TerminalOptions= +Type=Application +Version=1.0 +X-KDE-SubstituteUID=false +X-KDE-Username= diff --git a/scripts/astroarch-tweak-tool.zsh b/scripts/astroarch-tweak-tool.zsh new file mode 100755 index 0000000..a45fd87 --- /dev/null +++ b/scripts/astroarch-tweak-tool.zsh @@ -0,0 +1,72 @@ +#!/bin/zsh +result=$(kdialog --menu "Select action" 1 "Update-astroarch" 2 "Set GPS" 3 "Set Bluetooth" 4 "Set FTP" 5 "Rollback Kstars/Indi" 6 "Install Kstars/Indi stable/bleeding-edge" --title "AstroArch Tweak Tool") +source ~/.zshrc +case $result in + 1) + update-astroarch + ;; + 2) + gps=$(kdialog --menu "Select action" 1 "Activate default GPS" 2 "Activate Usb Ublox GPS" 3 "Activate UART GPS" 4 "Stop GPS" --title "AstroArch GPS") + case $gps in + 1) + gps_on + ;; + 2) + gps_ublox_on + ;; + 3) + gps_uart_on + ;; + 4) + gps_off + ;; + esac + ;; + 3) + bluetooth=$(kdialog --combobox "Select action for Bluetooth" "ON" "OFF" --title "AstroArch bluetooth") + case $bluetooth in + ON) + bluetooth_on + ;; + OFF) + bluetooth_off + ;; + esac + ;; + 4) + ftp=$(kdialog --combobox "Select action for FTP" "ON" "OFF" --title "AstroArch FTP") + case $ftp in + ON) + ftp_on + ;; + OFF) + ftp_off + ;; + esac + ;; + 5) + rollback=$(kdialog --combobox "Select action for rollback" "Full-Kstars-Indi" "Indi" "Kstars" --title "AstroArch Rollback") + case $rollback in + Full-Kstars-Indi) + astro-rollback-full + ;; + Indi) + astro-rallback-indi + ;; + Kstars) + astro-rollback-kstars + ;; + esac + ;; + 6) + install_kstars=$(kdialog --combobox " Select the Kstars installation version" "Bleeding-edge" "Stable" --title "AstroArch Install Kstars") + case $install_kstars in + Bleeding-edg) + use-astro-bleeding-edge + ;; + Stable) + use-astro-stable + ;; + esac + ;; +esac From f28e0ae1c48cb8240ab72db1e9fef002a62f4c4f Mon Sep 17 00:00:00 2001 From: sc74 Date: Tue, 1 Oct 2024 18:16:15 +0200 Subject: [PATCH 05/38] Use Kdialog for AstroArch Tweak Tool --- scripts/astroarch-tweak-tool.zsh | 72 -------------------------------- 1 file changed, 72 deletions(-) delete mode 100755 scripts/astroarch-tweak-tool.zsh diff --git a/scripts/astroarch-tweak-tool.zsh b/scripts/astroarch-tweak-tool.zsh deleted file mode 100755 index a45fd87..0000000 --- a/scripts/astroarch-tweak-tool.zsh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/zsh -result=$(kdialog --menu "Select action" 1 "Update-astroarch" 2 "Set GPS" 3 "Set Bluetooth" 4 "Set FTP" 5 "Rollback Kstars/Indi" 6 "Install Kstars/Indi stable/bleeding-edge" --title "AstroArch Tweak Tool") -source ~/.zshrc -case $result in - 1) - update-astroarch - ;; - 2) - gps=$(kdialog --menu "Select action" 1 "Activate default GPS" 2 "Activate Usb Ublox GPS" 3 "Activate UART GPS" 4 "Stop GPS" --title "AstroArch GPS") - case $gps in - 1) - gps_on - ;; - 2) - gps_ublox_on - ;; - 3) - gps_uart_on - ;; - 4) - gps_off - ;; - esac - ;; - 3) - bluetooth=$(kdialog --combobox "Select action for Bluetooth" "ON" "OFF" --title "AstroArch bluetooth") - case $bluetooth in - ON) - bluetooth_on - ;; - OFF) - bluetooth_off - ;; - esac - ;; - 4) - ftp=$(kdialog --combobox "Select action for FTP" "ON" "OFF" --title "AstroArch FTP") - case $ftp in - ON) - ftp_on - ;; - OFF) - ftp_off - ;; - esac - ;; - 5) - rollback=$(kdialog --combobox "Select action for rollback" "Full-Kstars-Indi" "Indi" "Kstars" --title "AstroArch Rollback") - case $rollback in - Full-Kstars-Indi) - astro-rollback-full - ;; - Indi) - astro-rallback-indi - ;; - Kstars) - astro-rollback-kstars - ;; - esac - ;; - 6) - install_kstars=$(kdialog --combobox " Select the Kstars installation version" "Bleeding-edge" "Stable" --title "AstroArch Install Kstars") - case $install_kstars in - Bleeding-edg) - use-astro-bleeding-edge - ;; - Stable) - use-astro-stable - ;; - esac - ;; -esac From cb1511abd6a2aa0787850c7bd1e4a1491111debc Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 17 Oct 2024 15:12:26 +0200 Subject: [PATCH 06/38] Added notifications for astroarch-tweak-tool --- plugins/bluetooth/bluetooth.plugin.zsh | 15 ++-- plugins/ftp/ftp.plugin.zsh | 10 ++- plugins/gps/gps.plugin.zsh | 18 ++++- scripts/astroarch-tweak-tool.zsh | 102 +++++++++++++++++++++++++ 4 files changed, 133 insertions(+), 12 deletions(-) create mode 100755 scripts/astroarch-tweak-tool.zsh diff --git a/plugins/bluetooth/bluetooth.plugin.zsh b/plugins/bluetooth/bluetooth.plugin.zsh index 7f2dd09..26aed51 100644 --- a/plugins/bluetooth/bluetooth.plugin.zsh +++ b/plugins/bluetooth/bluetooth.plugin.zsh @@ -1,10 +1,11 @@ function _check_bluez_installed() { - check=$(pacman -Q | grep 'bluez|bluez-utils|bluez-hid2hci|bluedevil') - if [[ $check -eq 0 ]]; then + check=$(pacman -Q | grep -E -c 'bluez|bluez-utils|bluez-hid2hci|bluedevil') + if [[ $check -lt 6 ]]; then echo "Bluetooth packages not installed, installing them now..." + echo 'astro' | sudo -S echo '' yes | LC_ALL=en_US.UTF-8 sudo pacman -S bluez bluez-utils bluez-hid2hci bluedevil - sudo sed -i 's/#DiscoverableTimeout=0/DiscoverableTimeout=0/g' /etc/bluetooth/main.conf + echo 'astro' | sudo sed -i 's/#DiscoverableTimeout=0/DiscoverableTimeout=0/g' /etc/bluetooth/main.conf sudo sed -i 's/#AlwaysPairable=true/AlwaysPairable=true/g' /etc/bluetooth/main.conf sudo sed -i 's/#PairableTimeout=0/PairableTimeout=0/g' /etc/bluetooth/main.conf sudo sed -i 's/#AutoEnable=true/AutoEnable=true/g' /etc/bluetooth/main.conf @@ -15,17 +16,21 @@ function _check_bluez_installed() function bluetooth_on() { _check_bluez_installed + echo 'astro' | sudo -S echo '' sudo systemctl enable bluetooth.service --now - echo "Bluetooth turned ON and enabled to autostart at every boot" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'BLUETOOTH ON' 'Bluetooth turned ON and enabled to autostart at every boot' } function bluetooth_off() { + echo 'astro' | sudo -S echo '' sudo systemctl disable bluetooth.service --now - echo "Bluetooth disabled, remember to re-enable it if you want it to start automatically at boot" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'BLUETOOTH OFF' 'Bluetooth disabled, remember to re-enable it if you want it to start automatically at boot' } function bluetooth_remove() { + echo 'astro' | sudo -S echo '' yes | LC_ALL=en_US.UTF-8 sudo pacman -Rcs bluez bluez-utils bluez-hid2hci bluedevil + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'BLUETOOTH' "Bluetooth packets removed" } diff --git a/plugins/ftp/ftp.plugin.zsh b/plugins/ftp/ftp.plugin.zsh index bc0c143..22a5b30 100644 --- a/plugins/ftp/ftp.plugin.zsh +++ b/plugins/ftp/ftp.plugin.zsh @@ -4,6 +4,7 @@ function _check_vsftpd_installed() echo "FTP is already installed" else echo "FTP packages not installed, installing them now..." + echo 'astro' | sudo -S echo '' yes | LC_ALL=en_US.UTF-8 sudo pacman -S vsftpd sudo sed -i 's/#write_enable=YES/write_enable=YES/g' /etc/vsftpd.conf sudo sed -i 's/#local_enable=YES/local_enable=YES/g' /etc/vsftpd.conf @@ -28,20 +29,23 @@ function _check_vsftpd_installed() function ftp_on() { _check_vsftpd_installed + echo 'astro' | sudo -S echo '' sudo systemctl enable vsftpd.service --now - echo "FTP server turned ON and enabled to autostart at every boot" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'FTP ON' 'FTP server turned ON and enabled to autostart at every boot' } function ftp_off() { + echo 'astro' | sudo -S echo '' sudo systemctl disable vsftpd.service --now - echo "FTP server disabled, remember to re-enable it if you want it to start automatically at boot" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'FTP OFF' 'FTP server disabled, remember to re-enable it if you want it to start automatically at boot' } function ftp_remove() { + echo 'astro' | sudo -S echo '' sudo systemctl disable vsftpd.service --now yes | LC_ALL=en_US.UTF-8 sudo pacman -Rcs vsftpd sudo rm /etc/vsftpd.chroot_list - echo "FTP server remove" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'FTP' "FTP server remove" } diff --git a/plugins/gps/gps.plugin.zsh b/plugins/gps/gps.plugin.zsh index d010ee9..ff67426 100644 --- a/plugins/gps/gps.plugin.zsh +++ b/plugins/gps/gps.plugin.zsh @@ -12,6 +12,7 @@ function _check_gpsd_installed() function gps_ublox_on() { _check_gpsd_installed + echo 'astro' | sudo -S echo '' sudo systemctl enable gpsd.service --now sudo sh -c "echo 'refclock SHM 0 offset 0.5 delay 0.2 refid NMEA' >> /etc/chrony.conf" sudo sh -c "echo 'driftfile /var/lib/chrony/drift' >> /etc/chrony.conf" @@ -22,12 +23,13 @@ function gps_ublox_on() sudo sh -c 'echo "GPSD_OPTIONS=\""-n\" >> /etc/default/gpsd' sudo sh -c 'echo "DEVICES=\""/dev/ttyACM0\" >> /etc/default/gpsd' sudo sh -c 'echo "USBAUTO=\""false\" >> /etc/default/gpsd' - echo "GPS server turned ON and enabled to autostart at every boot" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'GPS USB UBLOX ON' 'GPS server turned ON and enabled to autostart at every boot' } function gps_on() { _check_gpsd_installed + echo 'astro' | sudo -S echo '' sudo sh -c "echo 'refclock SHM 0 offset 0.5 delay 0.2 refid NMEA' >> /etc/chrony.conf" sudo sh -c "echo 'driftfile /var/lib/chrony/drift' >> /etc/chrony.conf" sudo rm /etc/default/gpsd @@ -38,11 +40,19 @@ function gps_on() sudo sh -c 'echo "DEVICES=\""/dev/gps0\" >> /etc/default/gpsd' sudo sh -c 'echo "USBAUTO=\""true\" >> /etc/default/gpsd' sudo systemctl enable gpsd.service --now - echo "GPS server turned ON and enabled to autostart at every boot" + if [[ "$gps" == "GPS UART ON" ]] ; then + echo $gps + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 $gps 'GPS server turned ON and enabled to autostart at every boot' + else + echo "standart" + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'GPS ON' 'GPS server turned ON and enabled to autostart at every boot' + fi } function gps_uart_on() { + echo 'astro' | sudo -S echo '' + gps="GPS UART ON" sudo sh -c 'echo "dtparam=spi=on" >> /boot/config.txt' sudo sh -c 'echo "enable_uart=1" >> /boot/config.txt' gps_on @@ -50,8 +60,8 @@ function gps_uart_on() function gps_off() { - sudo systemctl disable gpsd.service --now - echo "GPS server disabled, remember to re-enable it if you want it to start automatically at boot" + echo 'astro' | sudo -S systemctl disable gpsd.service --now + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'GPS OFF ' 'GPS server disabled, remember to re-enable it if you want it to start automatically at boot' sudo sh -c 'sed -i "s~dtparam=spi=on~~g" /boot/config.txt' sudo sh -c 'sed -i "s~enable_uart=1~~g" /boot/config.txt' } diff --git a/scripts/astroarch-tweak-tool.zsh b/scripts/astroarch-tweak-tool.zsh new file mode 100755 index 0000000..abd2336 --- /dev/null +++ b/scripts/astroarch-tweak-tool.zsh @@ -0,0 +1,102 @@ +#!/bin/zsh +result=$(kdialog --menu "Select action" 1 "Update-astroarch" 2 "Set GPS" 3 "Set Bluetooth" 4 "Set FTP" 5 "Rollback Kstars/Indi" 6 "Install Kstars/Indi stable/bleeding-edge" --title "AstroArch Tweak Tool") +source ~/.zshrc +case $result in + 1) + update-astroarch + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Update AstroArch' 'Update completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Update AstroArch' 'Update returns an error' + fi + ;; + 2) + gps=$(kdialog --menu "Select action" 1 "Activate default GPS" 2 "Activate Usb Ublox GPS" 3 "Activate UART GPS" 4 "Stop GPS" --title "AstroArch GPS") + case $gps in + 1) + gps_on + ;; + 2) + gps_ublox_on + ;; + 3) + gps_uart_on + ;; + 4) + gps_off + ;; + esac + ;; + 3) + bluetooth=$(kdialog --combobox "Select action for Bluetooth" "ON" "OFF" --title "AstroArch bluetooth") + case $bluetooth in + ON) + bluetooth_on + ;; + OFF) + bluetooth_off + ;; + esac + ;; + 4) + ftp=$(kdialog --combobox "Select action for FTP" "ON" "OFF" --title "AstroArch FTP") + case $ftp in + ON) + ftp_on + ;; + OFF) + ftp_off + ;; + esac + ;; + 5) + rollback=$(kdialog --combobox "Select action for rollback" "Full-Kstars-Indi" "Indi" "Kstars" --title "AstroArch Rollback") + case $rollback in + Full-Kstars-Indi) + astro-rollback-full + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback full' 'Completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback full' 'Returns an error' + fi + ;; + Indi) + astro-rallback-indi + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback indi' 'Completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback indi' 'Returns an error' + fi + ;; + Kstars) + astro-rollback-kstars + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback kstars' 'Completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Rollback kstars' 'Returns an error' + fi + ;; + esac + ;; + 6) + install_kstars=$(kdialog --combobox " Select the Kstars installation version" "Bleeding-edge" "Stable" --title "AstroArch Install Kstars") + case $install_kstars in + Bleeding-edg) + use-astro-bleeding-edge + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Installation Kstars bleeding-edge' 'Completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Installation Kstars bleeding-edge' 'Returns an error' + fi + ;; + Stable) + use-astro-stable + if [ $? -eq 0 ] ; then + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Installation Kstars' 'Completed' + else + notify-send --app-name 'AstroArch' --icon="/home/astronaut/.astroarch/assets/icons/novnc-icon.svg" -t 10000 'Installation Kstars' 'Returns an error' + fi + ;; + esac + ;; +esac From b5fd22e0fa809970e1d53b63b338738d68cb4aea Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 17 Oct 2024 15:18:48 +0200 Subject: [PATCH 07/38] Tip to no longer ask password with sudo --- configs/.zshrc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/configs/.zshrc b/configs/.zshrc index 1e2664d..f25b98c 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -26,10 +26,10 @@ done; source $ZSH/oh-my-zsh.sh EDITOR=nano -INDI_ROLLBACK_VERSION=2.0.7-1 -INDI_LIBS_ROLLBACK_VERSION=2.0.7-1 -INDI_DRIVERS_ROLLBACK_VERSION=2.0.7-1 -KSTARS_ROLLBACK_VERSION=3.7.0-1 +INDI_ROLLBACK_VERSION=2.0.9-1 +INDI_LIBS_ROLLBACK_VERSION=2.0.9-1 +INDI_DRIVERS_ROLLBACK_VERSION=2.0.9-1 +KSTARS_ROLLBACK_VERSION=3.7.2-1 # Alias section alias update-astromonitor='wget -O - https://raw.githubusercontent.com/MattBlack85/astro_monitor/main/install.sh | sh' @@ -40,17 +40,20 @@ bash /home/astronaut/.astroarch/scripts/aa_motd.sh function use-astro-bleeding-edge() { + echo 'astro' | sudo -S echo '' sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars-git libindi-git indi-3rdparty-drivers-git indi-3rdparty-libs-git } function use-astro-stable() { + echo 'astro' | sudo -S echo '' sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars libindi indi-3rdparty-drivers indi-3rdparty-libs } function astro-rollback-indi() { + echo 'astro' | sudo -S echo '' setopt localoptions rmstarsilent mkdir -p ~/.rollback cd ~/.rollback @@ -64,6 +67,7 @@ function astro-rollback-indi() function astro-rollback-kstars() { + echo 'astro' | sudo -S echo '' setopt localoptions rmstarsilent mkdir -p ~/.rollback cd ~/.rollback @@ -75,6 +79,7 @@ function astro-rollback-kstars() function update-astroarch() { + echo 'astro' | sudo -S echo '' # Store actual version OLD_VER=$(cat /home/$USER/.astroarch.version) @@ -89,6 +94,11 @@ function update-astroarch() zsh /home/$USER/.astroarch/scripts/$NEW_VER.sh fi; + # Temporary fix for kde-portal duplicated conf + if [ -f /usr/share/xdg-desktop-portal/kde-portal.conf ]; then + sudo mv /usr/share/xdg-desktop-portal/kde-portal.conf /usr/share/xdg-desktop-portal/kde-portal.conf.old + fi; + # Update the repo content yes | LC_ALL=en_US.UTF-8 sudo pacman -Sy From d78fa54b1bb5406d1fed4c4eaa7b3ffc376c07ea Mon Sep 17 00:00:00 2001 From: sc74 Date: Sun, 2 Mar 2025 13:22:40 +0000 Subject: [PATCH 08/38] update .zshrc with OS history and updates --- configs/.zshrc | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/configs/.zshrc b/configs/.zshrc index f25b98c..ca1b931 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -80,19 +80,43 @@ function astro-rollback-kstars() function update-astroarch() { echo 'astro' | sudo -S echo '' - # Store actual version - OLD_VER=$(cat /home/$USER/.astroarch.version) + + # Setting the update history file + UPDATE_HISTORY="/home/astronaut/.astroarch/.update_history" + if [ ! -f "$UPDATE_HISTORY" ]; then + touch "$UPDATE_HISTORY" + fi + + # Backup the current version BEFORE updating the repository + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + OLD_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + OLD_VER="1.9.0" # Valeur par défaut si le fichier est manquant + fi # Checkout latest changes from git cd /home/$USER/.astroarch git pull origin main cd - > /dev/null 2>&1 - NEW_VER=$(cat /home/$USER/.astroarch/configs/.astroarch.version) - - if [ $OLD_VER != $NEW_VER ]; then - zsh /home/$USER/.astroarch/scripts/$NEW_VER.sh - fi; + # Reading the new version after updating + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + NEW_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + echo "Error: Unable to read updated version of AstroArch" + exit 1 + fi + + # Check and run update scripts only if they are not saved + for ver in $(seq $(echo $OLD_VER | tr -d .) $(echo $NEW_VER | tr -d .)); do + SCRIPT_PATH="/home/astronaut/.astroarch/scripts/1.${ver}.sh" + + if [ -f "$SCRIPT_PATH" ] && ! grep -q "1.${ver}.sh" "$UPDATE_HISTORY"; then + echo "=== Application de la mise à jour 1.${ver}... ===" + zsh "$SCRIPT_PATH" + echo "1.${ver}.sh" >> "$UPDATE_HISTORY" + fi + done # Temporary fix for kde-portal duplicated conf if [ -f /usr/share/xdg-desktop-portal/kde-portal.conf ]; then From 8cf516730e49901ef43bf373e1bacd61ade534a2 Mon Sep 17 00:00:00 2001 From: sc74 Date: Sun, 2 Mar 2025 14:01:49 +0000 Subject: [PATCH 09/38] Convert versions to correct numeric format --- configs/.zshrc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/configs/.zshrc b/configs/.zshrc index ca1b931..f25abac 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -107,14 +107,21 @@ function update-astroarch() exit 1 fi - # Check and run update scripts only if they are not saved - for ver in $(seq $(echo $OLD_VER | tr -d .) $(echo $NEW_VER | tr -d .)); do - SCRIPT_PATH="/home/astronaut/.astroarch/scripts/1.${ver}.sh" + # Convert versions to correct numeric format (ex: 1.9.2 → 10902) + OLD_NUM=$(echo "$OLD_VER" | awk -F. '{ printf "%d%02d%02d", $1, $2, $3 }') + NEW_NUM=$(echo "$NEW_VER" | awk -F. '{ printf "%d%02d%02d", $1, $2, $3 }') - if [ -f "$SCRIPT_PATH" ] && ! grep -q "1.${ver}.sh" "$UPDATE_HISTORY"; then - echo "=== Application de la mise à jour 1.${ver}... ===" - zsh "$SCRIPT_PATH" - echo "1.${ver}.sh" >> "$UPDATE_HISTORY" + # Check and run update scripts only if they are not saved + for script in $(ls /home/astronaut/.astroarch/scripts/1.*.sh | sort -V); do + SCRIPT_VER=$(basename "$script" | sed 's/1.\([0-9]*\).sh/\1/') # Extrait la version X.Y.Z + SCRIPT_NUM=$(echo "$SCRIPT_VER" | awk -F. '{ printf "%d%02d%02d", $1, $2, $3 }') + + if [[ $SCRIPT_NUM -gt $OLD_NUM && $SCRIPT_NUM -le $NEW_NUM ]]; then + if ! grep -q "$(basename "$script")" "$UPDATE_HISTORY"; then + echo "=== Application de la mise à jour $(basename "$script")... ===" + zsh "$script" + echo "$(basename "$script")" >> "$UPDATE_HISTORY" + fi fi done From daaf240547ad3b990084ce6e058466728adb5f21 Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 20 Mar 2025 16:06:18 +0000 Subject: [PATCH 10/38] Bootstrap process for building AstroArch from existing AstroArch --- build-astroarch/AA_build_fromAA.sh | 114 +++++++++ build-astroarch/astroarch_build_chroot.sh | 238 ++++++++++++++++++ .../desktop/plasmasystemsettings.sh.desktop | 6 + .../desktop/update-astroarch.sh.desktop | 6 + .../scripts/clear-install-astroarch.sh | 12 + .../scripts/plasmasystemsettings.sh | 9 + build-astroarch/scripts/update-astroarch.sh | 3 + .../systemd/clear-install-astroarch.service | 10 + .../systemd/clear-install-astroarch.timer | 9 + 9 files changed, 407 insertions(+) create mode 100755 build-astroarch/AA_build_fromAA.sh create mode 100755 build-astroarch/astroarch_build_chroot.sh create mode 100644 build-astroarch/desktop/plasmasystemsettings.sh.desktop create mode 100644 build-astroarch/desktop/update-astroarch.sh.desktop create mode 100755 build-astroarch/scripts/clear-install-astroarch.sh create mode 100755 build-astroarch/scripts/plasmasystemsettings.sh create mode 100755 build-astroarch/scripts/update-astroarch.sh create mode 100644 build-astroarch/systemd/clear-install-astroarch.service create mode 100644 build-astroarch/systemd/clear-install-astroarch.timer diff --git a/build-astroarch/AA_build_fromAA.sh b/build-astroarch/AA_build_fromAA.sh new file mode 100755 index 0000000..ac90e5c --- /dev/null +++ b/build-astroarch/AA_build_fromAA.sh @@ -0,0 +1,114 @@ +#!/bin/bash +# Exit on the first error, if any + +set -e + +# Grab the OS architecture for further forked logic +ARCH=$(uname -m) + +#paru -S pishrink-git + +# Choose disk to write and prepare +count=0 +IFS=$'\n' +for device_info in `lsblk -d -n -o NAME,TYPE,SIZE`; do +count=$((count+1)) +device_name=$(echo $device_info | cut -d" " -f1) +dev[$count]=$device_name +printf '%s: %s\n' "$count" "$device_info" +done + +read -rp "Select disk (numbers 1-$count): " selection + +DISK="/dev/${dev[$selection]}" +PART1="$DISK"1"" +PART2="$DISK"2"" + +echo "Installing on $DISK" +echo "Are you sure ?" +read -p "Press enter to continue" +echo +echo "Erase disk $DISK" +read -p "Press enter to continue" +sudo -S dd if=/dev/zero of=$DISK bs=440 count=1 status=progress +echo +echo "Make partitions on $DISK" +#read -p "Press enter to continue" +( + echo p; + echo o; + echo n; + echo ; + echo ; + echo ; + echo +537M; + echo t; + echo 0c; + echo a; + echo n; + echo ; + echo ; + echo ; + echo ; + echo w; +) | sudo fdisk $DISK +echo +echo "Format partitions on $DISK" +#read -p "Press enter to continue" +sudo mkfs.vfat -n 'BOOT' $PART1 +echo y | sudo mkfs.ext4 $PART2 +echo "done" + + +# Create folder and mount +echo "Create folder root" +if [ ! -d ~/root ]; then + mkdir ~/root +fi +echo "Mount partitions in folder" +#read -p "Press enter to continue" +sudo mount $PART2 ~/root +if [ ! -d ~/root/boot ]; then + sudo mkdir ~/root/boot +fi +sudo mount $PART1 ~/root/boot + +# Install base +echo "Install ArchLinux base" +#read -p "Press enter to continue" +sudo pacstrap -K ~/root base base-devel linux-rpi linux-rpi-headers linux-firmware-whence linux-firmware linux-api-headers archlinuxarm-keyring + +# Copy some files in chroot +echo $DISK > diskchroot +sudo cp ~/diskchroot ~/root +sudo cp ~/astroarch_build_chroot.sh ~/root +sudo mkdir -p ~/root/kstars/astronomy/ +sudo cp ~/.local/share/kstars/astrometry/* ~/root/kstars/astronomy/ +sudo cp /home/astronaut/.astroarch/scripts/update-astroarch.sh ~/root + +# a supprimer si git a jour +sudo cp /home/astronaut/.astroarch/desktop/plasmasystemsettings.sh.desktop ~/root/ +sudo cp /home/astronaut/.astroarch/scripts/plasmasystemsettings.sh ~/root/ +sudo cp /home/astronaut/.astroarch/desktop/update-astroarch.sh.desktop ~/root/ +sudo cp /home/astronaut/.astroarch/scripts/update-astroarch.sh ~/root/ +sudo cp /home/astronaut/.astroarch/scripts/clear-install-astroarch.sh ~/root/ +sudo cp /home/astronaut/.astroarch/systemd/clear-install-astroarch.service ~/root/ +sudo cp /home/astronaut/.astroarch/systemd/clear-install-astroarch.timer ~/root/ +sudo cp ~/.zshrc2 ~/root/ + + +# Enter chroot and install AstroArch +echo "arch-chroot : install AstroArch" +#read -p "Press enter to continue" +sudo -S arch-chroot ~/root /astroarch_build_chroot.sh + +# Umount disk and delete folder +echo "umount" $DISK +sudo umount -l $PART1 +sudo umount -l $PART2 +echo "delete folder root" +sudo rm -R ~/root + +echo "create image astroarch" +#sudo dd if=$DISK of=astroarch.img bs=8M status=progress +#sudo pishrink.sh -za astroarch.img astroarch-X.X.X.img.gz diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh new file mode 100755 index 0000000..787881f --- /dev/null +++ b/build-astroarch/astroarch_build_chroot.sh @@ -0,0 +1,238 @@ +#!/bin/bash + +source /etc/profile + +# Exit on the first error, if any +set -e + +# Grab the OS architecture for further forked logic +ARCH=$(uname -m) + +DISK=$(cat 'diskchroot') +UUID_part1=$(blkid -o value -s UUID "$DISK"1"") +UUID_part2=$(blkid -o value -s UUID "$DISK"2"") +echo $DISK + +# If we are on a raspberry let's adjust /boot/config.txt +echo dtparam=i2c_arm=on >> /boot/config.txt +echo dtparam=audio=on >> /boot/config.txt +echo disable_overscan=1 >> /boot/config.txt +echo gpu_mem=256 >> /boot/config.txt +echo disable_splash=1 >> /boot/config.txt +echo 3dtparam=krnbt=on >> /boot/config.txt +echo hdmi_drive=2 >> /boot/config.txt +echo dtoverlay=i2c-rtc >> /boot/config.txt +echo i2c-dev > /etc/modules-load.d/raspberrypi.conf +sed -i 's/dtoverlay=vc4-kms-v3d/dtoverlay=vc4-fkms-v3d/g' /boot/config.txt +sed -i 's/max_framebuffers=2/max_framebuffers=2\nframebuffer_depth=24/g' /boot/config.txt + +# Pi5 only settings should go here +echo [pi5] >> /boot/config.txt +echo dtparam=rtc_bbat_vchg=3000000 >> /boot/config.txt + +sed -i 's/root=\/dev\/mmcblk0p2/root=UUID='$UUID_part2'/' /boot/cmdline.txt + +# ROOT PASSWD +echo "root passwd" +echo "root:root" | chpasswd + +# FSTAB +cat << EOF >> /etc/fstab +# Static information about the filesystems. +# See fstab(5) for details. + +UUID=$UUID_part1 /boot vfat defaults,noexec,nodev,showexec 0 0 +UUID=$UUID_part2 / ext4 rw,relatime 0 1 +EOF + +# Parallelize pacman download to 5 and use pacman as progress bar +sed -i 's|ParallelDownloads = 5|ParallelDownloads=5|g' /etc/pacman.conf +sed -i '/ParallelDownloads=5/aILoveCandy' /etc/pacman.conf +sed -i '/ParallelDownloads=5/aDisableDownloadTimeout' /etc/pacman.conf + +# Add astroarch pacman repo to pacman.conf (it must go first) +sed -i 's|\[core\]|\[astromatto\]\nSigLevel = Optional TrustAll\nServer = http://astroarch.astromatto.com:9000/$arch\n\n\[core\]|' /etc/pacman.conf + +# config hostnames +echo "astroarch" > /etc/hostname +echo "127.0.0.1 localhost" >> /etc/hosts +echo "127.0.1.1 astroarch" >> /etc/hosts + +# Bootstrap pacman-key +pacman-key --init && pacman-key --populate archlinuxarm + +# Update all packages now +pacman -Syu --noconfirm + +# Install just 2 packages for the next actions +#pacman -S wget git --noconfirm + +# install packages +pacman -Syu wget git pipewire-jack gnu-free-fonts wireplumber \ + zsh plasma-desktop sddm networkmanager xf86-video-dummy \ + network-manager-applet networkmanager-qt chromium xorg konsole \ + gpsd breeze-icons hicolor-icon-theme knewstuff5 tigervnc \ + knotifyconfig5 kplotting5 qt6-datavis3d qt5-quickcontrols \ + qt5-websockets qtkeychain stellarsolver xf86-video-fbdev \ + xplanet plasma-nm dhcp dnsmasq kate plasma-systemmonitor \ + dolphin uboot-tools usbutils cloud-guest-utils samba paru \ + websockify novnc astrometry.net gsc kstars phd2 packagekit-qt6 \ + indi-3rdparty-libs indi-3rdparty-drivers \ + i2c-tools indiserver-ui astro_dmx openssl-1.1 firefox chrony \ + ksystemlog discover kwalletmanager kgpg dhcpcd \ + qt6-serialport qt6ct udisks2-qt5 xorg-fonts-misc fuse2 \ + fortune-mod cowsay pacman-contrib arandr neofetch \ + astromonitor kscreen sddm-kcm flatpak \ + arch-install-scripts argon2 astroarch-status-notifications atkmm bc cairomm dialog dnssec-anchors dosfstools \ + ecryptfs-utils geoclue glibmm gparted gtkmm3 imath iw kdenetwork-filesharing lbzip2 ldns libcamera libcamera-ipa \ + libdeflate libomxil-bellagio libsigc++ libsoup lrzip lzop nano net-tools netctl networkmanager-qt5 nilfs-utils \ + openexr openresolv pangomm partimage pbzip2 pigz pixz qt5-serialport \ + qt5ct raspberrypi-utils rpi5-eeprom screen sshfs vi wireless-regdb wireless_tools drbl dtc --noconfirm --ask 4 + +# Uncomment en_US UTF8 and generate locale files +sed -i -e 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen +locale-gen + +# Set a standard TZ to avoid breaking plasma clock widget +timedatectl set-timezone Europe/London + +# Allow wheelers to sudo without password to install packages +sed -i 's/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers + +# create user astro with home, add it to wheel +useradd -G wheel -m astronaut +echo "astronaut:astro" | chpasswd + +# Add astronaut to uucp for serial device ownership +usermod -aG uucp,sys,network,power,audio,input,lp,storage,video,users astronaut +su astronaut -c "xdg-user-dirs-update" + +# Add sddm user to video group +usermod -aG video sddm + +# Pull the brain repo, this will be used for scripting out the final image +#su astronaut -c "git clone https://github.com/devDucks/astroarch.git /home/astronaut/.astroarch" +su astronaut -c "git clone -b 1.10 --single-branch https://github.com/sc74/astroarch.git /home/astronaut/.astroarch" + +# Allow x11 forwarding over SSH +sed -i 's/#AllowTcpForwarding yes/AllowTcpForwarding yes/g' /etc/ssh/sshd_config +sed -i 's/#X11DisplayOffset 10/X11DisplayOffset 10/g' /etc/ssh/sshd_config +sed -i 's/#X11UseLocalhost yes/X11UseLocalhost yes/g' /etc/ssh/sshd_config + +# Make all necessary folders +mkdir /etc/sddm.conf.d +#su astronaut -c "mkdir -p /home/astronaut/.config" +su astronaut -c "mkdir -p /home/astronaut/Pictures/wallpapers" +#su astronaut -c "mkdir -p /home/astronaut/Desktop" + +# install oh-my-zsh and set the default shell to zsh +chsh -s /usr/bin/zsh astronaut +rm /home/astronaut/.bash* +cd /home/astronaut +ZSH=/home/astronaut/.oh-my-zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended +chown astronaut:astronaut .oh-my-zsh/ + +# Set the samba pass +ln -s /home/astronaut/.astroarch/configs/smb.conf /etc/samba/smb.conf +systemctl start smb +(echo astro; echo astro) | smbpasswd -s -a astronaut +systemctl stop smb + +# Link a zsh config for astronaut +su astronaut -c "ln -s /home/astronaut/.astroarch/configs/.zshrc /home/astronaut/.zshrc" + +# Start NetworkManager and sleep to create the hotspot +systemctl start NetworkManager +sleep 5 + +# Remove eventually existing systemd configs we are going to substitute +rm -f /usr/lib/systemd/system/novnc.service + +# Disable systemd-timesyncd and enable chronyd +systemctl disable systemd-timesyncd +systemctl enable chronyd + +# Symlink now files +ln -s /home/astronaut/.astroarch/configs/kde_settings.conf /etc/sddm.conf.d/kde_settings.conf +ln -s /home/astronaut/.astroarch/systemd/novnc.service /usr/lib/systemd/system/novnc.service +ln -s /home/astronaut/.astroarch/systemd/x0vncserver.service /etc/systemd/system/x0vncserver.service +ln -s /home/astronaut/.astroarch/configs/.astroarch.version /home/astronaut/.astroarch.version + +# Copy xorg config +cp /home/astronaut/.astroarch/configs/xorg.conf /etc/X11/ + +# Copy v3d X config +cp /home/astronaut/.astroarch/configs/99-v3d.conf /etc/X11/xorg.conf.d + +# Copy the polkit script to allow rebooting, shutting down with no errors +cp /home/astronaut/.astroarch/configs/99-polkit-power.rules /etc/polkit-1/rules.d/ + +# Copy the systemd unit to create AP / resize +cp /home/astronaut/.astroarch/systemd/create_ap.service /etc/systemd/system/ +cp /home/astronaut/.astroarch/systemd/resize_once.service /etc/systemd/system/ + +# Enable vncserver +systemctl enable x0vncserver + +# Copy the config for kwinrc +su astronaut -c "cp /home/astronaut/.astroarch/configs/kwinrc /home/astronaut/.config" + +# Enable now all services +systemctl enable sddm.service novnc.service dhcpcd.service NetworkManager.service avahi-daemon.service nmb.service smb.service create_ap.service resize_once.service sshd.service systemd-networkd.service systemd-resolved.service + +# Script for autostart settings plasma +mkdir -p /home/astronaut/.config/autostart/ +cp /plasmasystemsettings.sh.desktop /home/astronaut/.config/autostart/ +cp /plasmasystemsettings.sh /home/astronaut/.astroarch/scripts/ + +# Script autostart update-astroarch +cp /update-astroarch.sh.desktop /home/astronaut/.config/autostart/ +cp /update-astroarch.sh /home/astronaut/.astroarch/scripts/ + +# Install astrometry files +mkdir -p /home/astronaut/.local/share/kstars/astrometry/ +cp /kstars/astronomy/* /home/astronaut/.local/share/kstars/astrometry/ + +# Clear script in autostart +cp /clear-install-astroarch.service /etc/systemd/system/ +cp /clear-install-astroarch.timer /etc/systemd/system/ +cp /clear-install-astroarch.sh /home/astronaut/.astroarch/scripts/ +systemctl enable clear-install-astroarch.timer + +# Copy wallpapers +su astronaut -c "cp /home/astronaut/.astroarch/wallpapers/bubble.jpg /home/astronaut/Pictures/wallpapers" +su astronaut -c "cp /home/astronaut/.astroarch/wallpapers/south-milky.jpg /home/astronaut/Pictures/wallpapers" +su astronaut -c "cp /home/astronaut/.astroarch/wallpapers/pacman.jpg /home/astronaut/Pictures/wallpapers" + +# Copy desktop icons +su astronaut -c "ln -s /usr/share/applications/org.kde.konsole.desktop /home/astronaut/Desktop/Konsole" +su astronaut -c "ln -s /usr/share/applications/org.kde.kstars.desktop /home/astronaut/Desktop/Kstars" +su astronaut -c "ln -s /usr/share/applications/astrodmx_capture.desktop /home/astronaut/Desktop/AstroDMx_capture" +su astronaut -c "ln -s /usr/share/applications/phd2.desktop /home/astronaut/Desktop/phd2.desktop" +su astronaut -c "ln -s /usr/share/applications/xgps.desktop /home/astronaut/Desktop/xgps.desktop" +su astronaut -c "ln -s /usr/share/applications/indiserver-ui.desktop /home/astronaut/Desktop/indiserver-ui.desktop" + +# Remove actual novnc icons +rm -r /usr/share/webapps/novnc/app/images/icons/* + +# Copy custom novnc icons folder +cp -r /home/astronaut/.astroarch/assets/icons/* /usr/share/webapps/novnc/app/images/icons + +# Copy the screensaver config, by default it is off +su astronaut -c "cp /home/astronaut/.astroarch/configs/kscreenlockerrc /home/astronaut/.config/kscreenlockerrc" + +# Disable Kwallet by default +su astronaut -c "echo $'[Wallet]\nEnabled=false' > /home/astronaut/.config/kwalletrc" + +# a supprimer +cp /.zshrc2 /home/astronaut/.astroarch/configs/.zshrc + +# Assigns files to user astronaut +chown -R astronaut:astronaut /home/astronaut + +# Take sudoers to the original state +sed -i 's/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers +sed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/g' /etc/sudoers + +echo "exit arch-chroot" +exit diff --git a/build-astroarch/desktop/plasmasystemsettings.sh.desktop b/build-astroarch/desktop/plasmasystemsettings.sh.desktop new file mode 100644 index 0000000..e546b88 --- /dev/null +++ b/build-astroarch/desktop/plasmasystemsettings.sh.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Exec=/home/astronaut/.astroarch/scripts/plasmasystemsettings.sh +Icon=application-x-shellscript +Name=plasmasystemsettings.sh +Type=Application +X-KDE-AutostartScript=true diff --git a/build-astroarch/desktop/update-astroarch.sh.desktop b/build-astroarch/desktop/update-astroarch.sh.desktop new file mode 100644 index 0000000..41c6755 --- /dev/null +++ b/build-astroarch/desktop/update-astroarch.sh.desktop @@ -0,0 +1,6 @@ +[Desktop Entry] +Exec=/home/astronaut/.astroarch/scripts/update-astroarch.sh +Icon=application-x-shellscript +Name=update-astroarch.sh +Type=Application +X-KDE-AutostartScript=true diff --git a/build-astroarch/scripts/clear-install-astroarch.sh b/build-astroarch/scripts/clear-install-astroarch.sh new file mode 100755 index 0000000..c61cf5e --- /dev/null +++ b/build-astroarch/scripts/clear-install-astroarch.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +rm /home/astronaut/.config/autostart/plasmasystemsettings.sh.desktop +rm /home/astronaut/.config/autostart/update-astroarch.sh.desktop +rm -R /kstars +rm /diskchroot +rm /astroarch_build_chroot.sh +rm /.zshrc2 +rm /clear-install-astroarch.service +rm /clear-install-astroarch.timer +rm /clear-install-astroarch.sh + diff --git a/build-astroarch/scripts/plasmasystemsettings.sh b/build-astroarch/scripts/plasmasystemsettings.sh new file mode 100755 index 0000000..e7dfdc0 --- /dev/null +++ b/build-astroarch/scripts/plasmasystemsettings.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +lookandfeeltool -a org.kde.breezedark.desktop + +kwriteconfig6 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group 'Containments' --group '1' --group 'Wallpaper' --group 'org.kde.slideshow' --group 'General' --key 'SlidePaths' "/home/astronaut/Pictures/wallpapers/" + +kwriteconfig6 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group 'Containments' --group '1' --key 'wallpaperplugin' "org.kde.slideshow" + +systemctl restart --user plasma-plasmashell diff --git a/build-astroarch/scripts/update-astroarch.sh b/build-astroarch/scripts/update-astroarch.sh new file mode 100755 index 0000000..8de091c --- /dev/null +++ b/build-astroarch/scripts/update-astroarch.sh @@ -0,0 +1,3 @@ +#!/usr/bin/bash + +konsole -e '/usr/bin/zsh -i -c update-astroarch' diff --git a/build-astroarch/systemd/clear-install-astroarch.service b/build-astroarch/systemd/clear-install-astroarch.service new file mode 100644 index 0000000..4c6fca2 --- /dev/null +++ b/build-astroarch/systemd/clear-install-astroarch.service @@ -0,0 +1,10 @@ +[Unit] +Description=Clear install astroarch + +[Service] +Type=oneshot +ExecStart=/bin/bash /home/astronaut/.astroarch/scripts/clear-install-astroarch.sh +ExecStop=/bin/systemctl disable clear-install-astroarch.service + +[Install] +WantedBy=multi-user.target diff --git a/build-astroarch/systemd/clear-install-astroarch.timer b/build-astroarch/systemd/clear-install-astroarch.timer new file mode 100644 index 0000000..fd254b7 --- /dev/null +++ b/build-astroarch/systemd/clear-install-astroarch.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Timer clear install astroarch + +[Timer] +OnBootSec=2min +Unit=clear-install-astroarch.service + +[Install] +WantedBy=timers.target From c4d8e1d9d004e0014188285bfe332cf0cde73457 Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 20 Mar 2025 16:24:25 +0000 Subject: [PATCH 11/38] Bootstrap process for building AstroArch from existing AstroArch part2 --- build-astroarch/configs/.zshrc | 172 +++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 build-astroarch/configs/.zshrc diff --git a/build-astroarch/configs/.zshrc b/build-astroarch/configs/.zshrc new file mode 100644 index 0000000..59b9ed5 --- /dev/null +++ b/build-astroarch/configs/.zshrc @@ -0,0 +1,172 @@ +export PATH=/usr/share/GSC/bin:$HOME/bin:/usr/local/bin:$PATH +export ZSH="$HOME/.oh-my-zsh" +export LC_CTYPE=en_US.UTF-8 +export SYSTEMD_TIMEDATED_NTP_SERVICES=chronyd.service + +ZSH_THEME="af-magic" +ZSH_CUSTOM=$HOME/.astroarch + +EXTRA_ZSH=$HOME/extra.zsh + +zstyle ':omz:update' mode disabled + +ENABLE_CORRECTION="false" +HIST_STAMPS="yyyy-mm-dd" + +plugins=(git archlinux) + +# Find all plugins and append them to plugins +for dir in $HOME/.astroarch/plugins/**/*.plugin.zsh; do + split=(${(s:/:)dir}) + last=$split[-1] + name=(${(s:.:)last}) + plugins+=($name[1]) +done; + +source $ZSH/oh-my-zsh.sh + +EDITOR=nano +INDI_ROLLBACK_VERSION=2.0.9-1 +INDI_LIBS_ROLLBACK_VERSION=2.0.9-1 +INDI_DRIVERS_ROLLBACK_VERSION=2.0.9-1 +KSTARS_ROLLBACK_VERSION=3.7.2-1 + +# Alias section +alias update-astromonitor='wget -O - https://raw.githubusercontent.com/MattBlack85/astro_monitor/main/install.sh | sh' +alias astro-rollback-full='astro-rollback-indi && astro-rollback-kstars' + +# Run aa_motd.sh +bash /home/astronaut/.astroarch/scripts/aa_motd.sh + +function use-astro-bleeding-edge() +{ + echo 'astro' | sudo -S echo '' + sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars-git libindi-git indi-3rdparty-drivers-git indi-3rdparty-libs-git +} + +function use-astro-stable() +{ + echo 'astro' | sudo -S echo '' + sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars libindi indi-3rdparty-drivers indi-3rdparty-libs +} + + +function astro-rollback-indi() +{ + echo 'astro' | sudo -S echo '' + setopt localoptions rmstarsilent + mkdir -p ~/.rollback + cd ~/.rollback + wget -O indi-3rdparty-drivers-${INDI_DRIVERS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz http://astromatto.com:9000/aarch64/indi-3rdparty-drivers-${INDI_DRIVERS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz + wget -O libindi-${INDI_ROLLBACK_VERSION}-aarch64.pkg.tar.xz http://astromatto.com:9000/aarch64/libindi-${INDI_ROLLBACK_VERSION}-aarch64.pkg.tar.xz + wget -O indi-3rdparty-libs-${INDI_LIBS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz http://astromatto.com:9000/aarch64/indi-3rdparty-libs-${INDI_LIBS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz + sudo pacman -U libindi* indi* --noconfirm + cd - > /dev/null 2>&1 + rm -rf ~/.rollback/* +} + +function astro-rollback-kstars() +{ + echo 'astro' | sudo -S echo '' + setopt localoptions rmstarsilent + mkdir -p ~/.rollback + cd ~/.rollback + wget -O kstars-${KSTARS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz http://astromatto.com:9000/aarch64/kstars-${KSTARS_ROLLBACK_VERSION}-aarch64.pkg.tar.xz + sudo pacman -U kstars* --noconfirm + cd - > /dev/null 2>&1 + rm -rf ~/.rollback/* +} + +function update-astroarch() +{ + echo 'astro' | sudo -S echo '' + + # Fonction pour convertir une version (ex: 1.9 ou 1.9.1) en nombre (ex: 10900 ou 10901) + version_to_num() { + local version=$1 + local major minor patch + IFS='.' read -r major minor patch <<< "$version" + minor=${minor:-0} + patch=${patch:-0} + printf "%d%02d%02d" "$major" "$minor" "$patch" + } + + # Définition des fichiers et variables + UPDATE_HISTORY="/home/astronaut/.astroarch/.update_history" + if [ ! -f "$UPDATE_HISTORY" ]; then + touch "$UPDATE_HISTORY" + fi + + # Récupération de l'ancienne version (bien qu'elle ne sera plus utilisée pour le test) + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + OLD_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + OLD_VER="1.9.0" # Valeur par défaut si le fichier est absent + fi + + # Mise à jour depuis le dépôt Git + cd /home/$USER/.astroarch + git pull origin main + cd - > /dev/null 2>&1 + + # Lecture de la nouvelle version après mise à jour + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + NEW_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + echo "Error: Unable to read updated version of AstroArch" + exit 1 + fi + + # Conversion des versions en format numérique + OLD_NUM=$(version_to_num "$OLD_VER") + NEW_NUM=$(version_to_num "$NEW_VER") + MIN_VERSION="1.9.0" + MIN_NUM=$(version_to_num "$MIN_VERSION") + + echo "Ancienne version : $OLD_VER ($OLD_NUM)" + echo "Nouvelle version : $NEW_VER ($NEW_NUM)" + echo "Version minimale requise : $MIN_VERSION ($MIN_NUM)" + + # Parcours des scripts de mise à jour + for script in /home/astronaut/.astroarch/scripts/1.*.sh; do + SCRIPT_BASENAME=$(basename "$script") + # Récupération de la version en retirant uniquement l'extension .sh + SCRIPT_VER=$(basename "$script" .sh) + SCRIPT_NUM=$(version_to_num "$SCRIPT_VER") + + echo "Vérification du script : $SCRIPT_BASENAME (version $SCRIPT_VER, $SCRIPT_NUM, $MIN_NUM, $NEW_NUM)" + + # On applique le script uniquement si : + # - La version du script est strictement supérieure à la version minimale (1.9.0) + # - Inférieure ou égale à la nouvelle version + if [[ $SCRIPT_NUM -gt $MIN_NUM && $SCRIPT_NUM -le $NEW_NUM ]]; then + if ! grep -Fq "$SCRIPT_BASENAME" "$UPDATE_HISTORY"; then + echo "=== Application de la mise à jour $SCRIPT_BASENAME... ===" + zsh "$script" + echo "$SCRIPT_BASENAME" >> "$UPDATE_HISTORY" + else + echo "Déjà appliqué : $SCRIPT_BASENAME" + fi + else + echo "Ignoré : $SCRIPT_BASENAME" + fi + done + + # Temporary fix for kde-portal duplicated conf + if [ -f /usr/share/xdg-desktop-portal/kde-portal.conf ]; then + sudo mv /usr/share/xdg-desktop-portal/kde-portal.conf /usr/share/xdg-desktop-portal/kde-portal.conf.old + fi; + + # Update the repo content + yes | LC_ALL=en_US.UTF-8 sudo pacman -Sy + + # Update always keyring first, than all of the other packages + yes | LC_ALL=en_US.UTF-8 sudo pacman -S archlinux-keyring --noconfirm + + # Now upgrade all system packages, but ask user to choose in case of conflicts/choices + yes | LC_ALL=en_US.UTF-8 sudo pacman -Syu +} + +if [ -f $EXTRA_ZSH ]; then + source $EXTRA_ZSH +fi From a9f360612cbbfeea90a0e704fbd84aa441cdbc8d Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 20 Mar 2025 18:06:45 +0000 Subject: [PATCH 12/38] Bootstrap process for building AstroArch from existing AstroArch part3 --- build-astroarch/AA_build_fromAA.sh | 13 ---- build-astroarch/astroarch_build_chroot.sh | 16 ++--- .../scripts/clear-install-astroarch.sh | 2 + configs/.zshrc | 70 ++++++++++++------- 4 files changed, 53 insertions(+), 48 deletions(-) diff --git a/build-astroarch/AA_build_fromAA.sh b/build-astroarch/AA_build_fromAA.sh index ac90e5c..9af437d 100755 --- a/build-astroarch/AA_build_fromAA.sh +++ b/build-astroarch/AA_build_fromAA.sh @@ -81,21 +81,8 @@ sudo pacstrap -K ~/root base base-devel linux-rpi linux-rpi-headers linux-firmwa # Copy some files in chroot echo $DISK > diskchroot sudo cp ~/diskchroot ~/root -sudo cp ~/astroarch_build_chroot.sh ~/root sudo mkdir -p ~/root/kstars/astronomy/ sudo cp ~/.local/share/kstars/astrometry/* ~/root/kstars/astronomy/ -sudo cp /home/astronaut/.astroarch/scripts/update-astroarch.sh ~/root - -# a supprimer si git a jour -sudo cp /home/astronaut/.astroarch/desktop/plasmasystemsettings.sh.desktop ~/root/ -sudo cp /home/astronaut/.astroarch/scripts/plasmasystemsettings.sh ~/root/ -sudo cp /home/astronaut/.astroarch/desktop/update-astroarch.sh.desktop ~/root/ -sudo cp /home/astronaut/.astroarch/scripts/update-astroarch.sh ~/root/ -sudo cp /home/astronaut/.astroarch/scripts/clear-install-astroarch.sh ~/root/ -sudo cp /home/astronaut/.astroarch/systemd/clear-install-astroarch.service ~/root/ -sudo cp /home/astronaut/.astroarch/systemd/clear-install-astroarch.timer ~/root/ -sudo cp ~/.zshrc2 ~/root/ - # Enter chroot and install AstroArch echo "arch-chroot : install AstroArch" diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index 787881f..b139568 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -139,7 +139,7 @@ systemctl start smb systemctl stop smb # Link a zsh config for astronaut -su astronaut -c "ln -s /home/astronaut/.astroarch/configs/.zshrc /home/astronaut/.zshrc" +su astronaut -c "ln -s /home/astronaut/.astroarch/build-astroarch/configs/.zshrc /home/astronaut/.zshrc" # Start NetworkManager and sleep to create the hotspot systemctl start NetworkManager @@ -182,21 +182,18 @@ systemctl enable sddm.service novnc.service dhcpcd.service NetworkManager.servic # Script for autostart settings plasma mkdir -p /home/astronaut/.config/autostart/ -cp /plasmasystemsettings.sh.desktop /home/astronaut/.config/autostart/ -cp /plasmasystemsettings.sh /home/astronaut/.astroarch/scripts/ +cp /home/astronaut/.astroarch/build-astroarch/desktop/plasmasystemsettings.sh.desktop /home/astronaut/.config/autostart/ # Script autostart update-astroarch -cp /update-astroarch.sh.desktop /home/astronaut/.config/autostart/ -cp /update-astroarch.sh /home/astronaut/.astroarch/scripts/ +cp /home/astronaut/.astroarch/build-astroarch/desktop/update-astroarch.sh.desktop /home/astronaut/.config/autostart/ # Install astrometry files mkdir -p /home/astronaut/.local/share/kstars/astrometry/ cp /kstars/astronomy/* /home/astronaut/.local/share/kstars/astrometry/ # Clear script in autostart -cp /clear-install-astroarch.service /etc/systemd/system/ -cp /clear-install-astroarch.timer /etc/systemd/system/ -cp /clear-install-astroarch.sh /home/astronaut/.astroarch/scripts/ +cp /home/astronaut/.astroarch/build-astroarch/scripts/clear-install-astroarch.service /etc/systemd/system/ +cp /home/astronaut/.astroarch/build-astroarch/scripts/clear-install-astroarch.timer /etc/systemd/system/ systemctl enable clear-install-astroarch.timer # Copy wallpapers @@ -224,9 +221,6 @@ su astronaut -c "cp /home/astronaut/.astroarch/configs/kscreenlockerrc /home/ast # Disable Kwallet by default su astronaut -c "echo $'[Wallet]\nEnabled=false' > /home/astronaut/.config/kwalletrc" -# a supprimer -cp /.zshrc2 /home/astronaut/.astroarch/configs/.zshrc - # Assigns files to user astronaut chown -R astronaut:astronaut /home/astronaut diff --git a/build-astroarch/scripts/clear-install-astroarch.sh b/build-astroarch/scripts/clear-install-astroarch.sh index c61cf5e..498e978 100755 --- a/build-astroarch/scripts/clear-install-astroarch.sh +++ b/build-astroarch/scripts/clear-install-astroarch.sh @@ -10,3 +10,5 @@ rm /clear-install-astroarch.service rm /clear-install-astroarch.timer rm /clear-install-astroarch.sh +rm /home/astronaut/.zshrc +ln -s /home/astronaut/.astroarch/configs/.zshrc /home/astronaut/.zshrc diff --git a/configs/.zshrc b/configs/.zshrc index f25abac..e716bf2 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -40,20 +40,17 @@ bash /home/astronaut/.astroarch/scripts/aa_motd.sh function use-astro-bleeding-edge() { - echo 'astro' | sudo -S echo '' sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars-git libindi-git indi-3rdparty-drivers-git indi-3rdparty-libs-git } function use-astro-stable() { - echo 'astro' | sudo -S echo '' sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars libindi indi-3rdparty-drivers indi-3rdparty-libs } function astro-rollback-indi() { - echo 'astro' | sudo -S echo '' setopt localoptions rmstarsilent mkdir -p ~/.rollback cd ~/.rollback @@ -67,7 +64,6 @@ function astro-rollback-indi() function astro-rollback-kstars() { - echo 'astro' | sudo -S echo '' setopt localoptions rmstarsilent mkdir -p ~/.rollback cd ~/.rollback @@ -79,27 +75,36 @@ function astro-rollback-kstars() function update-astroarch() { - echo 'astro' | sudo -S echo '' - # Setting the update history file + # Fonction pour convertir une version (ex: 1.9 ou 1.9.1) en nombre (ex: 10900 ou 10901) + version_to_num() { + local version=$1 + local major minor patch + IFS='.' read -r major minor patch <<< "$version" + minor=${minor:-0} + patch=${patch:-0} + printf "%d%02d%02d" "$major" "$minor" "$patch" + } + + # Définition des fichiers et variables UPDATE_HISTORY="/home/astronaut/.astroarch/.update_history" if [ ! -f "$UPDATE_HISTORY" ]; then touch "$UPDATE_HISTORY" fi - # Backup the current version BEFORE updating the repository + # Récupération de l'ancienne version (bien qu'elle ne sera plus utilisée pour le test) if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then OLD_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) else - OLD_VER="1.9.0" # Valeur par défaut si le fichier est manquant + OLD_VER="1.9.0" # Valeur par défaut si le fichier est absent fi - # Checkout latest changes from git + # Mise à jour depuis le dépôt Git cd /home/$USER/.astroarch git pull origin main cd - > /dev/null 2>&1 - # Reading the new version after updating + # Lecture de la nouvelle version après mise à jour if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then NEW_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) else @@ -107,21 +112,38 @@ function update-astroarch() exit 1 fi - # Convert versions to correct numeric format (ex: 1.9.2 → 10902) - OLD_NUM=$(echo "$OLD_VER" | awk -F. '{ printf "%d%02d%02d", $1, $2, $3 }') - NEW_NUM=$(echo "$NEW_VER" | awk -F. '{ printf "%d%02d%02d", $1, $2, $3 }') - - # Check and run update scripts only if they are not saved - for script in $(ls /home/astronaut/.astroarch/scripts/1.*.sh | sort -V); do - SCRIPT_VER=$(basename "$script" | sed 's/1.\([0-9]*\).sh/\1/') # Extrait la version X.Y.Z - SCRIPT_NUM=$(echo "$SCRIPT_VER" | awk -F. '{ printf "%d%02d%02d", $1, $2, $3 }') - - if [[ $SCRIPT_NUM -gt $OLD_NUM && $SCRIPT_NUM -le $NEW_NUM ]]; then - if ! grep -q "$(basename "$script")" "$UPDATE_HISTORY"; then - echo "=== Application de la mise à jour $(basename "$script")... ===" - zsh "$script" - echo "$(basename "$script")" >> "$UPDATE_HISTORY" + # Conversion des versions en format numérique + OLD_NUM=$(version_to_num "$OLD_VER") + NEW_NUM=$(version_to_num "$NEW_VER") + MIN_VERSION="1.9.0" + MIN_NUM=$(version_to_num "$MIN_VERSION") + + echo "Ancienne version : $OLD_VER ($OLD_NUM)" + echo "Nouvelle version : $NEW_VER ($NEW_NUM)" + echo "Version minimale requise : $MIN_VERSION ($MIN_NUM)" + + # Parcours des scripts de mise à jour + for script in /home/astronaut/.astroarch/scripts/1.*.sh; do + SCRIPT_BASENAME=$(basename "$script") + # Récupération de la version en retirant uniquement l'extension .sh + SCRIPT_VER=$(basename "$script" .sh) + SCRIPT_NUM=$(version_to_num "$SCRIPT_VER") + + echo "Vérification du script : $SCRIPT_BASENAME (version $SCRIPT_VER, $SCRIPT_NUM, $MIN_NUM, $NEW_NUM)" + + # On applique le script uniquement si : + # - La version du script est strictement supérieure à la version minimale (1.9.0) + # - Inférieure ou égale à la nouvelle version + if [[ $SCRIPT_NUM -gt $MIN_NUM && $SCRIPT_NUM -le $NEW_NUM ]]; then + if ! grep -Fq "$SCRIPT_BASENAME" "$UPDATE_HISTORY"; then + echo "=== Application de la mise à jour $SCRIPT_BASENAME... ===" + zsh "$script" + echo "$SCRIPT_BASENAME" >> "$UPDATE_HISTORY" + else + echo "Déjà appliqué : $SCRIPT_BASENAME" fi + else + echo "Ignoré : $SCRIPT_BASENAME" fi done From 5ea40d3ce741141418d28d8fcacf2d35772aa677 Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 20 Mar 2025 18:55:34 +0000 Subject: [PATCH 13/38] Bootstrap process for building AstroArch from existing AstroArch part4 --- build-astroarch/AA_build_fromAA.sh | 1 + build-astroarch/astroarch_build_chroot.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build-astroarch/AA_build_fromAA.sh b/build-astroarch/AA_build_fromAA.sh index 9af437d..2fe3fb8 100755 --- a/build-astroarch/AA_build_fromAA.sh +++ b/build-astroarch/AA_build_fromAA.sh @@ -83,6 +83,7 @@ echo $DISK > diskchroot sudo cp ~/diskchroot ~/root sudo mkdir -p ~/root/kstars/astronomy/ sudo cp ~/.local/share/kstars/astrometry/* ~/root/kstars/astronomy/ +sudo cp astroarch_build_chroot.sh /home/astronaut/root # Enter chroot and install AstroArch echo "arch-chroot : install AstroArch" diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index b139568..ba97731 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -192,8 +192,8 @@ mkdir -p /home/astronaut/.local/share/kstars/astrometry/ cp /kstars/astronomy/* /home/astronaut/.local/share/kstars/astrometry/ # Clear script in autostart -cp /home/astronaut/.astroarch/build-astroarch/scripts/clear-install-astroarch.service /etc/systemd/system/ -cp /home/astronaut/.astroarch/build-astroarch/scripts/clear-install-astroarch.timer /etc/systemd/system/ +cp /home/astronaut/.astroarch/build-astroarch/systemd/clear-install-astroarch.service /etc/systemd/system/ +cp /home/astronaut/.astroarch/build-astroarch/systemd/clear-install-astroarch.timer /etc/systemd/system/ systemctl enable clear-install-astroarch.timer # Copy wallpapers From 2b2077f432b5e0fb62df1d091f3f4565915baa02 Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 20 Mar 2025 20:21:27 +0000 Subject: [PATCH 14/38] Bootstrap process for building AstroArch from existing AstroArch update --- .../desktop/plasmasystemsettings.sh.desktop | 14 +++++++++++++- .../desktop/update-astroarch.sh.desktop | 14 +++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/build-astroarch/desktop/plasmasystemsettings.sh.desktop b/build-astroarch/desktop/plasmasystemsettings.sh.desktop index e546b88..ce12500 100644 --- a/build-astroarch/desktop/plasmasystemsettings.sh.desktop +++ b/build-astroarch/desktop/plasmasystemsettings.sh.desktop @@ -1,6 +1,18 @@ [Desktop Entry] -Exec=/home/astronaut/.astroarch/scripts/plasmasystemsettings.sh +Comment= +Comment= +Exec=/home/astronaut/.astroarch/build-astroarch/scripts/plasmasystemsettings.sh +GenericName= +GenericName= Icon=application-x-shellscript +MimeType= Name=plasmasystemsettings.sh +Name=plasmasystemsettings.sh +Path= +StartupNotify=true +Terminal=false +TerminalOptions= Type=Application X-KDE-AutostartScript=true +X-KDE-SubstituteUID=false +X-KDE-Username= diff --git a/build-astroarch/desktop/update-astroarch.sh.desktop b/build-astroarch/desktop/update-astroarch.sh.desktop index 41c6755..2fee822 100644 --- a/build-astroarch/desktop/update-astroarch.sh.desktop +++ b/build-astroarch/desktop/update-astroarch.sh.desktop @@ -1,6 +1,18 @@ [Desktop Entry] -Exec=/home/astronaut/.astroarch/scripts/update-astroarch.sh +Comment= +Comment= +Exec=/home/astronaut/.astroarch/build-astroarch/scripts/update-astroarch.sh +GenericName= +GenericName= Icon=application-x-shellscript +MimeType= Name=update-astroarch.sh +Name=update-astroarch.sh +Path= +StartupNotify=true +Terminal=false +TerminalOptions= Type=Application X-KDE-AutostartScript=true +X-KDE-SubstituteUID=false +X-KDE-Username= From 247fa6519485a18b628459ba2c4135bbcd84c86c Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 20 Mar 2025 20:40:38 +0000 Subject: [PATCH 15/38] Bootstrap process for building AstroArch from existing AstroArch update2 --- build-astroarch/scripts/clear-install-astroarch.sh | 5 ----- build-astroarch/systemd/clear-install-astroarch.service | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/build-astroarch/scripts/clear-install-astroarch.sh b/build-astroarch/scripts/clear-install-astroarch.sh index 498e978..16f3379 100755 --- a/build-astroarch/scripts/clear-install-astroarch.sh +++ b/build-astroarch/scripts/clear-install-astroarch.sh @@ -4,11 +4,6 @@ rm /home/astronaut/.config/autostart/plasmasystemsettings.sh.desktop rm /home/astronaut/.config/autostart/update-astroarch.sh.desktop rm -R /kstars rm /diskchroot -rm /astroarch_build_chroot.sh -rm /.zshrc2 -rm /clear-install-astroarch.service -rm /clear-install-astroarch.timer -rm /clear-install-astroarch.sh rm /home/astronaut/.zshrc ln -s /home/astronaut/.astroarch/configs/.zshrc /home/astronaut/.zshrc diff --git a/build-astroarch/systemd/clear-install-astroarch.service b/build-astroarch/systemd/clear-install-astroarch.service index 4c6fca2..d25e591 100644 --- a/build-astroarch/systemd/clear-install-astroarch.service +++ b/build-astroarch/systemd/clear-install-astroarch.service @@ -3,7 +3,7 @@ Description=Clear install astroarch [Service] Type=oneshot -ExecStart=/bin/bash /home/astronaut/.astroarch/scripts/clear-install-astroarch.sh +ExecStart=/bin/bash /home/astronaut/.astroarch/build-astroarch/scripts/clear-install-astroarch.sh ExecStop=/bin/systemctl disable clear-install-astroarch.service [Install] From 843b9429a20538ae5d953c3a3b91ebb0871968a4 Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 20 Mar 2025 20:51:15 +0000 Subject: [PATCH 16/38] Bootstrap process for building AstroArch from existing AstroArch update3 --- build-astroarch/astroarch_build_chroot.sh | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index ba97731..d121a22 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -13,23 +13,6 @@ UUID_part1=$(blkid -o value -s UUID "$DISK"1"") UUID_part2=$(blkid -o value -s UUID "$DISK"2"") echo $DISK -# If we are on a raspberry let's adjust /boot/config.txt -echo dtparam=i2c_arm=on >> /boot/config.txt -echo dtparam=audio=on >> /boot/config.txt -echo disable_overscan=1 >> /boot/config.txt -echo gpu_mem=256 >> /boot/config.txt -echo disable_splash=1 >> /boot/config.txt -echo 3dtparam=krnbt=on >> /boot/config.txt -echo hdmi_drive=2 >> /boot/config.txt -echo dtoverlay=i2c-rtc >> /boot/config.txt -echo i2c-dev > /etc/modules-load.d/raspberrypi.conf -sed -i 's/dtoverlay=vc4-kms-v3d/dtoverlay=vc4-fkms-v3d/g' /boot/config.txt -sed -i 's/max_framebuffers=2/max_framebuffers=2\nframebuffer_depth=24/g' /boot/config.txt - -# Pi5 only settings should go here -echo [pi5] >> /boot/config.txt -echo dtparam=rtc_bbat_vchg=3000000 >> /boot/config.txt - sed -i 's/root=\/dev\/mmcblk0p2/root=UUID='$UUID_part2'/' /boot/cmdline.txt # ROOT PASSWD @@ -158,6 +141,9 @@ ln -s /home/astronaut/.astroarch/systemd/novnc.service /usr/lib/systemd/system/n ln -s /home/astronaut/.astroarch/systemd/x0vncserver.service /etc/systemd/system/x0vncserver.service ln -s /home/astronaut/.astroarch/configs/.astroarch.version /home/astronaut/.astroarch.version +# Copy config.txt in /boot +cp /home/astronaut/.astroarch/configs/config.txt /boot + # Copy xorg config cp /home/astronaut/.astroarch/configs/xorg.conf /etc/X11/ From f87e15ad1e30f06e305220dfd92851add0ab1ce0 Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 20 Mar 2025 21:40:23 +0000 Subject: [PATCH 17/38] Bootstrap process for building AstroArch from existing AstroArch update4 --- build-astroarch/scripts/plasmasystemsettings.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build-astroarch/scripts/plasmasystemsettings.sh b/build-astroarch/scripts/plasmasystemsettings.sh index e7dfdc0..ba14749 100755 --- a/build-astroarch/scripts/plasmasystemsettings.sh +++ b/build-astroarch/scripts/plasmasystemsettings.sh @@ -1,9 +1,17 @@ #!/bin/bash -lookandfeeltool -a org.kde.breezedark.desktop +kwriteconfig6 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group 'Containments' --group '1' --key 'wallpaperplugin' "org.kde.slideshow" + +sleep 1 kwriteconfig6 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group 'Containments' --group '1' --group 'Wallpaper' --group 'org.kde.slideshow' --group 'General' --key 'SlidePaths' "/home/astronaut/Pictures/wallpapers/" -kwriteconfig6 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group 'Containments' --group '1' --key 'wallpaperplugin' "org.kde.slideshow" +sleep 1 + +lookandfeeltool -a org.kde.breezedark.desktop + +sleep 1 systemctl restart --user plasma-plasmashell + +sleep 1 From 124387bf94b85aba0e858f993c22ef9ec41f6781 Mon Sep 17 00:00:00 2001 From: sc74 Date: Fri, 21 Mar 2025 21:04:26 +0000 Subject: [PATCH 18/38] Bootstrap process for building AstroArch from existing AstroArch update5 --- build-astroarch/scripts/plasmasystemsettings.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-astroarch/scripts/plasmasystemsettings.sh b/build-astroarch/scripts/plasmasystemsettings.sh index ba14749..d710ed4 100755 --- a/build-astroarch/scripts/plasmasystemsettings.sh +++ b/build-astroarch/scripts/plasmasystemsettings.sh @@ -1,5 +1,7 @@ #!/bin/bash +sleep 30 + kwriteconfig6 --file "$HOME/.config/plasma-org.kde.plasma.desktop-appletsrc" --group 'Containments' --group '1' --key 'wallpaperplugin' "org.kde.slideshow" sleep 1 @@ -13,5 +15,3 @@ lookandfeeltool -a org.kde.breezedark.desktop sleep 1 systemctl restart --user plasma-plasmashell - -sleep 1 From 9ef445c9a610fc306a1a87777033557ca478c3db Mon Sep 17 00:00:00 2001 From: sc74 Date: Sat, 22 Mar 2025 23:50:52 +0000 Subject: [PATCH 19/38] Bootstrap process for building AstroArch from existing AstroArch update6 --- build-astroarch/astroarch_build_chroot.sh | 2 +- scripts/1.9.3.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 scripts/1.9.3.sh diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index d121a22..b205666 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -164,7 +164,7 @@ systemctl enable x0vncserver su astronaut -c "cp /home/astronaut/.astroarch/configs/kwinrc /home/astronaut/.config" # Enable now all services -systemctl enable sddm.service novnc.service dhcpcd.service NetworkManager.service avahi-daemon.service nmb.service smb.service create_ap.service resize_once.service sshd.service systemd-networkd.service systemd-resolved.service +systemctl enable sshd.service systemd-networkd.service systemd-resolved.service sddm.service novnc.service dhcpcd.service NetworkManager.service avahi-daemon.service nmb.service smb.service create_ap.service resize_once.service # Script for autostart settings plasma mkdir -p /home/astronaut/.config/autostart/ diff --git a/scripts/1.9.3.sh b/scripts/1.9.3.sh new file mode 100644 index 0000000..891b6bf --- /dev/null +++ b/scripts/1.9.3.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# First run 1.9.2.sh to be sure that old changes will be applied +bash /home/astronaut/.astroarch/scripts/1.9.2.sh + +check_asn=$(pacman -Q | grep -c astroarch-status-notifications) + +if [ $check_asn -eq 0 ]; then + echo "====================" + echo "AA status notifications not found... Installing" + sudo pacman -Sy astroarch-status-notifications --noconfirm + echo "AA status notifications installed" + echo "====================" +fi From 48734c72d37e9302fdb2c161845b1b429bee42e2 Mon Sep 17 00:00:00 2001 From: sc74 Date: Tue, 25 Mar 2025 20:52:02 +0000 Subject: [PATCH 20/38] Add astroarch-onboarding --- build-astroarch/astroarch_build_chroot.sh | 14 ++++++++++---- build-astroarch/systemd/astroarch-onboarding.timer | 9 +++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 build-astroarch/systemd/astroarch-onboarding.timer diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index b205666..d95a770 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -47,11 +47,8 @@ pacman-key --init && pacman-key --populate archlinuxarm # Update all packages now pacman -Syu --noconfirm -# Install just 2 packages for the next actions -#pacman -S wget git --noconfirm - # install packages -pacman -Syu wget git pipewire-jack gnu-free-fonts wireplumber \ +pacman -S wget git pipewire-jack gnu-free-fonts wireplumber \ zsh plasma-desktop sddm networkmanager xf86-video-dummy \ network-manager-applet networkmanager-qt chromium xorg konsole \ gpsd breeze-icons hicolor-icon-theme knewstuff5 tigervnc \ @@ -214,5 +211,14 @@ chown -R astronaut:astronaut /home/astronaut sed -i 's/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers sed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/g' /etc/sudoers +# repository sc74.github.io +su astronaut -c "git clone https://github.com/sc74/sc74.github.io.git /home/astronaut/.astroarch/sc74.github.io" +sed -i 's|\[core\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[core\]|' /etc/pacman.conf +pacman -Syu --noconfirm + +# Onboarding +pacman -S astroarch-onboarding +systemctl enable astroarch-onboarding.timer + echo "exit arch-chroot" exit diff --git a/build-astroarch/systemd/astroarch-onboarding.timer b/build-astroarch/systemd/astroarch-onboarding.timer new file mode 100644 index 0000000..2fb44b1 --- /dev/null +++ b/build-astroarch/systemd/astroarch-onboarding.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Timer astroarch-onboarding + +[Timer] +OnBootSec=1min +Unit=astroarch-onboarding.service + +[Install] +WantedBy=timers.target From 986017924713eb78017e96fa4b6f53c2c23ff2e1 Mon Sep 17 00:00:00 2001 From: sc74 Date: Tue, 25 Mar 2025 22:01:32 +0000 Subject: [PATCH 21/38] Add astroarch-onboarding update --- build-astroarch/astroarch_build_chroot.sh | 3 +++ build-astroarch/diskchroot | 1 + 2 files changed, 4 insertions(+) create mode 100644 build-astroarch/diskchroot diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index d95a770..fe9eebc 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -29,6 +29,7 @@ UUID=$UUID_part2 / ext4 rw,relatime 0 EOF # Parallelize pacman download to 5 and use pacman as progress bar +sed -i 's|DownloadUser = alpm|#DownloadUser = alpm|g' /etc/pacman.conf sed -i 's|ParallelDownloads = 5|ParallelDownloads=5|g' /etc/pacman.conf sed -i '/ParallelDownloads=5/aILoveCandy' /etc/pacman.conf sed -i '/ParallelDownloads=5/aDisableDownloadTimeout' /etc/pacman.conf @@ -220,5 +221,7 @@ pacman -Syu --noconfirm pacman -S astroarch-onboarding systemctl enable astroarch-onboarding.timer +sed -i 's|#DownloadUser = alpm|DownloadUser = alpm|g' /etc/pacman.conf + echo "exit arch-chroot" exit diff --git a/build-astroarch/diskchroot b/build-astroarch/diskchroot new file mode 100644 index 0000000..3368963 --- /dev/null +++ b/build-astroarch/diskchroot @@ -0,0 +1 @@ +/dev/sdc From 1dfeff77e24af41f1bcd223d6d2a1095dd7acb86 Mon Sep 17 00:00:00 2001 From: sc74 Date: Wed, 26 Mar 2025 17:01:22 +0000 Subject: [PATCH 22/38] update build --- build-astroarch/astroarch_build_chroot.sh | 32 +++++++++++++++-------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index fe9eebc..f713fc4 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -29,7 +29,6 @@ UUID=$UUID_part2 / ext4 rw,relatime 0 EOF # Parallelize pacman download to 5 and use pacman as progress bar -sed -i 's|DownloadUser = alpm|#DownloadUser = alpm|g' /etc/pacman.conf sed -i 's|ParallelDownloads = 5|ParallelDownloads=5|g' /etc/pacman.conf sed -i '/ParallelDownloads=5/aILoveCandy' /etc/pacman.conf sed -i '/ParallelDownloads=5/aDisableDownloadTimeout' /etc/pacman.conf @@ -68,7 +67,7 @@ pacman -S wget git pipewire-jack gnu-free-fonts wireplumber \ ecryptfs-utils geoclue glibmm gparted gtkmm3 imath iw kdenetwork-filesharing lbzip2 ldns libcamera libcamera-ipa \ libdeflate libomxil-bellagio libsigc++ libsoup lrzip lzop nano net-tools netctl networkmanager-qt5 nilfs-utils \ openexr openresolv pangomm partimage pbzip2 pigz pixz qt5-serialport \ - qt5ct raspberrypi-utils rpi5-eeprom screen sshfs vi wireless-regdb wireless_tools drbl dtc --noconfirm --ask 4 + qt5ct raspberrypi-utils rpi5-eeprom screen sshfs vi wireless-regdb wireless_tools drbl dtc # Uncomment en_US UTF8 and generate locale files sed -i -e 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen @@ -162,7 +161,7 @@ systemctl enable x0vncserver su astronaut -c "cp /home/astronaut/.astroarch/configs/kwinrc /home/astronaut/.config" # Enable now all services -systemctl enable sshd.service systemd-networkd.service systemd-resolved.service sddm.service novnc.service dhcpcd.service NetworkManager.service avahi-daemon.service nmb.service smb.service create_ap.service resize_once.service +systemctl enable systemd-resolved.service dhcpcd.service sshd.service systemd-networkd.service sddm.service novnc.service NetworkManager.service avahi-daemon.service nmb.service smb.service create_ap.service resize_once.service # Script for autostart settings plasma mkdir -p /home/astronaut/.config/autostart/ @@ -208,20 +207,31 @@ su astronaut -c "echo $'[Wallet]\nEnabled=false' > /home/astronaut/.config/kwall # Assigns files to user astronaut chown -R astronaut:astronaut /home/astronaut -# Take sudoers to the original state -sed -i 's/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers -sed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/g' /etc/sudoers - +# Onboarding # repository sc74.github.io su astronaut -c "git clone https://github.com/sc74/sc74.github.io.git /home/astronaut/.astroarch/sc74.github.io" sed -i 's|\[core\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[core\]|' /etc/pacman.conf pacman -Syu --noconfirm - -# Onboarding -pacman -S astroarch-onboarding +# Disable alpm for repo in disk +sed -i 's|DownloadUser = alpm|#DownloadUser = alpm|g' /etc/pacman.conf +# Install package astroarch-onboarding +pacman -S astroarch-onboarding --noconfirm --ask 4 +cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.timer /etc/systemd/system/ +cp /home/astronaut/.astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ +# Enable service astroarch-onboarding systemctl enable astroarch-onboarding.timer - +# Script autostart astroarch_onboarding +cp /home/astronaut/.astroarch/config/calamares_astroarch/AstroArch-onboarding.desktop /home/astronaut/.config/autostart/ +# delete repo sc74 +sed -i 's|[sc74]||g' /etc/pacman.conf +sed -i 's|SigLevel = Optional TrustAll||g' /etc/pacman.conf +sed -i 's|Server = file:///home/astronaut/.astroarch/sc74.github.io/aarch64||g' /etc/pacman.conf +# Enable alpm sed -i 's|#DownloadUser = alpm|DownloadUser = alpm|g' /etc/pacman.conf +# Take sudoers to the original state +sed -i 's/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers +sed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/g' /etc/sudoers + echo "exit arch-chroot" exit From 0b5cafc7afdbcf9a0b30b35f76e0f0e2585721f1 Mon Sep 17 00:00:00 2001 From: sc74 Date: Wed, 26 Mar 2025 21:43:07 +0000 Subject: [PATCH 23/38] update onboarding sh --- build-astroarch/astroarch_build_chroot.sh | 46 +++++++++++------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index f713fc4..a9270f3 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -50,24 +50,24 @@ pacman -Syu --noconfirm # install packages pacman -S wget git pipewire-jack gnu-free-fonts wireplumber \ zsh plasma-desktop sddm networkmanager xf86-video-dummy \ - network-manager-applet networkmanager-qt chromium xorg konsole \ - gpsd breeze-icons hicolor-icon-theme knewstuff5 tigervnc \ - knotifyconfig5 kplotting5 qt6-datavis3d qt5-quickcontrols \ - qt5-websockets qtkeychain stellarsolver xf86-video-fbdev \ - xplanet plasma-nm dhcp dnsmasq kate plasma-systemmonitor \ - dolphin uboot-tools usbutils cloud-guest-utils samba paru \ - websockify novnc astrometry.net gsc kstars phd2 packagekit-qt6 \ - indi-3rdparty-libs indi-3rdparty-drivers \ - i2c-tools indiserver-ui astro_dmx openssl-1.1 firefox chrony \ - ksystemlog discover kwalletmanager kgpg dhcpcd \ - qt6-serialport qt6ct udisks2-qt5 xorg-fonts-misc fuse2 \ - fortune-mod cowsay pacman-contrib arandr neofetch \ - astromonitor kscreen sddm-kcm flatpak \ - arch-install-scripts argon2 astroarch-status-notifications atkmm bc cairomm dialog dnssec-anchors dosfstools \ - ecryptfs-utils geoclue glibmm gparted gtkmm3 imath iw kdenetwork-filesharing lbzip2 ldns libcamera libcamera-ipa \ - libdeflate libomxil-bellagio libsigc++ libsoup lrzip lzop nano net-tools netctl networkmanager-qt5 nilfs-utils \ - openexr openresolv pangomm partimage pbzip2 pigz pixz qt5-serialport \ - qt5ct raspberrypi-utils rpi5-eeprom screen sshfs vi wireless-regdb wireless_tools drbl dtc + network-manager-applet networkmanager-qt chromium xorg konsole \ + gpsd breeze-icons hicolor-icon-theme knewstuff5 tigervnc \ + knotifyconfig5 kplotting5 qt6-datavis3d qt5-quickcontrols \ + qt5-websockets qtkeychain stellarsolver xf86-video-fbdev \ + xplanet plasma-nm dhcp dnsmasq kate plasma-systemmonitor \ + dolphin uboot-tools usbutils cloud-guest-utils samba paru \ + websockify novnc astrometry.net gsc kstars phd2 packagekit-qt6 \ + indi-3rdparty-libs indi-3rdparty-drivers \ + i2c-tools indiserver-ui astro_dmx openssl-1.1 firefox chrony \ + ksystemlog discover kwalletmanager kgpg dhcpcd \ + qt6-serialport qt6ct udisks2-qt5 xorg-fonts-misc fuse2 \ + fortune-mod cowsay pacman-contrib arandr neofetch \ + astromonitor kscreen sddm-kcm flatpak ark \ + arch-install-scripts argon2 astroarch-status-notifications atkmm bc cairomm dialog dnssec-anchors dosfstools \ + ecryptfs-utils geoclue glibmm gparted gtkmm3 imath iw kdenetwork-filesharing lbzip2 ldns libcamera libcamera-ipa \ + libdeflate libomxil-bellagio libsigc++ libsoup lrzip lzop nano net-tools netctl networkmanager-qt5 nilfs-utils \ + openexr openresolv pangomm partimage pbzip2 pigz pixz qt5-serialport \ + qt5ct raspberrypi-utils rpi5-eeprom screen sshfs vi wireless-regdb wireless_tools drbl dtc --noconfirm --ask 4 # Uncomment en_US UTF8 and generate locale files sed -i -e 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen @@ -208,12 +208,12 @@ su astronaut -c "echo $'[Wallet]\nEnabled=false' > /home/astronaut/.config/kwall chown -R astronaut:astronaut /home/astronaut # Onboarding +# Disable alpm for repo in disk +sed -i 's|DownloadUser = alpm|#DownloadUser = alpm|g' /etc/pacman.conf # repository sc74.github.io su astronaut -c "git clone https://github.com/sc74/sc74.github.io.git /home/astronaut/.astroarch/sc74.github.io" sed -i 's|\[core\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[core\]|' /etc/pacman.conf pacman -Syu --noconfirm -# Disable alpm for repo in disk -sed -i 's|DownloadUser = alpm|#DownloadUser = alpm|g' /etc/pacman.conf # Install package astroarch-onboarding pacman -S astroarch-onboarding --noconfirm --ask 4 cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.timer /etc/systemd/system/ @@ -221,11 +221,9 @@ cp /home/astronaut/.astroarch/systemd/astroarch-onboarding.service /etc/systemd/ # Enable service astroarch-onboarding systemctl enable astroarch-onboarding.timer # Script autostart astroarch_onboarding -cp /home/astronaut/.astroarch/config/calamares_astroarch/AstroArch-onboarding.desktop /home/astronaut/.config/autostart/ +cp /home/astronaut/.astroarch/configs/calamares_astroarch/AstroArch-onboarding.desktop /home/astronaut/.config/autostart/ # delete repo sc74 -sed -i 's|[sc74]||g' /etc/pacman.conf -sed -i 's|SigLevel = Optional TrustAll||g' /etc/pacman.conf -sed -i 's|Server = file:///home/astronaut/.astroarch/sc74.github.io/aarch64||g' /etc/pacman.conf +sed -i -e '/\[sc74\]/,+2d' /etc/pacman.conf # Enable alpm sed -i 's|#DownloadUser = alpm|DownloadUser = alpm|g' /etc/pacman.conf From 267e81c68aeaaeb46d6b61cdd89bb52bb1e8839d Mon Sep 17 00:00:00 2001 From: sc74 Date: Wed, 26 Mar 2025 21:44:59 +0000 Subject: [PATCH 24/38] update vncserver service --- systemd/x0vncserver.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/x0vncserver.service b/systemd/x0vncserver.service index 57fb6ae..d5d368b 100644 --- a/systemd/x0vncserver.service +++ b/systemd/x0vncserver.service @@ -1,7 +1,7 @@ [Unit] Description=Remote desktop service (VNC) for :0 display Requires=display-manager.service -After=network-online.target +#After=network-online.target After=display-manager.service [Service] From 4b509eccb7f579ddd2049dda38254029641815de Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 27 Mar 2025 19:42:10 +0000 Subject: [PATCH 25/38] update script --- build-astroarch/astroarch_build_chroot.sh | 7 ++++--- build-astroarch/systemd/astroarch-onboarding.timer | 9 --------- systemd/astroarch-onboarding.service | 12 ------------ 3 files changed, 4 insertions(+), 24 deletions(-) delete mode 100644 build-astroarch/systemd/astroarch-onboarding.timer delete mode 100644 systemd/astroarch-onboarding.service diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index a9270f3..b59a043 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -216,12 +216,13 @@ sed -i 's|\[core\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home pacman -Syu --noconfirm # Install package astroarch-onboarding pacman -S astroarch-onboarding --noconfirm --ask 4 -cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.timer /etc/systemd/system/ +#cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.timer /etc/systemd/system/ cp /home/astronaut/.astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ # Enable service astroarch-onboarding -systemctl enable astroarch-onboarding.timer +#systemctl enable astroarch-onboarding.timer +systemctl enable astroarch-onboarding.service # Script autostart astroarch_onboarding -cp /home/astronaut/.astroarch/configs/calamares_astroarch/AstroArch-onboarding.desktop /home/astronaut/.config/autostart/ +#cp /home/astronaut/.astroarch/configs/calamares_astroarch/AstroArch-onboarding.desktop /home/astronaut/.config/autostart/ # delete repo sc74 sed -i -e '/\[sc74\]/,+2d' /etc/pacman.conf # Enable alpm diff --git a/build-astroarch/systemd/astroarch-onboarding.timer b/build-astroarch/systemd/astroarch-onboarding.timer deleted file mode 100644 index 2fb44b1..0000000 --- a/build-astroarch/systemd/astroarch-onboarding.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Timer astroarch-onboarding - -[Timer] -OnBootSec=1min -Unit=astroarch-onboarding.service - -[Install] -WantedBy=timers.target diff --git a/systemd/astroarch-onboarding.service b/systemd/astroarch-onboarding.service deleted file mode 100644 index 6b75a1e..0000000 --- a/systemd/astroarch-onboarding.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=AstroArch onboarding configurator - -[Service] -User=root -Group=root -ExecStart=/bin/bash /usr/share/calamares/.astroarch/configs/calamares_astroarch/run-astroarch-onboarding.sh -ExecStop=/bin/systemctl disable astroarch-onboarding.service -Type=oneshot - -[Install] -WantedBy=multi-user.target From 9fee9b81758460b810310f93ea35187c42b56237 Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 27 Mar 2025 22:16:28 +0000 Subject: [PATCH 26/38] update script build --- build-astroarch/astroarch_build_chroot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index b59a043..965cdb1 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -217,7 +217,7 @@ pacman -Syu --noconfirm # Install package astroarch-onboarding pacman -S astroarch-onboarding --noconfirm --ask 4 #cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.timer /etc/systemd/system/ -cp /home/astronaut/.astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ +cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ # Enable service astroarch-onboarding #systemctl enable astroarch-onboarding.timer systemctl enable astroarch-onboarding.service From be0ad947b4380091c6463c5edc0926528f2b0fb0 Mon Sep 17 00:00:00 2001 From: sc74 Date: Sat, 29 Mar 2025 00:18:39 +0000 Subject: [PATCH 27/38] update script clean --- build-astroarch/astroarch_build_chroot.sh | 3 ++- build-astroarch/scripts/clear-install-astroarch.sh | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index 965cdb1..ff30e3e 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -215,7 +215,8 @@ su astronaut -c "git clone https://github.com/sc74/sc74.github.io.git /home/astr sed -i 's|\[core\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[core\]|' /etc/pacman.conf pacman -Syu --noconfirm # Install package astroarch-onboarding -pacman -S astroarch-onboarding --noconfirm --ask 4 +pacman -S astroarch-onboarding rustdesk-bin indi-pylibcamera libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi libpisp python-libcamera-rpi \ + gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps --noconfirm --ask 4 #cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.timer /etc/systemd/system/ cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ # Enable service astroarch-onboarding diff --git a/build-astroarch/scripts/clear-install-astroarch.sh b/build-astroarch/scripts/clear-install-astroarch.sh index 16f3379..f21cfbc 100755 --- a/build-astroarch/scripts/clear-install-astroarch.sh +++ b/build-astroarch/scripts/clear-install-astroarch.sh @@ -1,9 +1,16 @@ #!/bin/bash -rm /home/astronaut/.config/autostart/plasmasystemsettings.sh.desktop -rm /home/astronaut/.config/autostart/update-astroarch.sh.desktop + rm -R /kstars rm /diskchroot - +rm /astroarch_build_chroot.sh +rm /home/astronaut/.config/autostart/plasmasystemsettings.sh.desktop +rm /home/astronaut/.config/autostart/update-astroarch.sh.desktop rm /home/astronaut/.zshrc ln -s /home/astronaut/.astroarch/configs/.zshrc /home/astronaut/.zshrc +rm -R /home/astronaut/.astroarch/sc74.github.io +rm /home/astronaut/.config/autostart/AstroArch-onboarding.desktop + +systemctl disable clear-install-astroarch.timer +systemctl disable astroarch-onboarding.timer + From 47ad8d54cb008ea3389edf7efdd7f151b37dc13c Mon Sep 17 00:00:00 2001 From: sc74 Date: Sat, 29 Mar 2025 01:18:17 +0000 Subject: [PATCH 28/38] update script build --- build-astroarch/astroarch_build_chroot.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index ff30e3e..adf2d9b 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -215,7 +215,8 @@ su astronaut -c "git clone https://github.com/sc74/sc74.github.io.git /home/astr sed -i 's|\[core\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[core\]|' /etc/pacman.conf pacman -Syu --noconfirm # Install package astroarch-onboarding -pacman -S astroarch-onboarding rustdesk-bin indi-pylibcamera libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi libpisp python-libcamera-rpi \ +yes | LC_ALL=en_US.UTF-8 pacman -R libcamera libcamera-ipa +yes | LC_ALL=en_US.UTF-8 pacman -S astroarch-onboarding rustdesk-bin indi-pylibcamera libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi libpisp \ gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps --noconfirm --ask 4 #cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.timer /etc/systemd/system/ cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ From e4041f43f3b673f9991be7e45c2466e3bcb40fc0 Mon Sep 17 00:00:00 2001 From: sc74 Date: Sat, 29 Mar 2025 23:40:15 +0000 Subject: [PATCH 29/38] update script and file for build --- BUILD.md | 17 +++++++++++++++++ build-astroarch/astroarch_build_chroot.sh | 20 ++++++++++---------- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/BUILD.md b/BUILD.md index dfc9abe..ca95931 100644 --- a/BUILD.md +++ b/BUILD.md @@ -104,3 +104,20 @@ Using `pishrink` follow these steps: - `sudo ./pishrink.sh -za astroarch.img astroarch-X.X.X.img.gz` the gzipped image is ready to be distributed and can be flashed on other media + +## Building with an AstroArch script from an existing AstroArch version +## (according to this description https://wiki.archlinux.org/title/Install_Arch_Linux_from_existing_Linux) + +Copy the AA_build_fromAA.sh and astroarch_build_chroot.sh files from the GitHub site https://github.com/sc74/astroarch/tree/1.10/build-astroarch to your Home directory + +Make them executable with the command chown +x followed by the file name. Mount a drive or disk and simply run the command AA_build_fromAA.sh + +The script will simply ask you which device you want to install on and the password for astronaut + +At the end of the process, you will have a working installation on your device and an image to install on another device + +The scripts are easily modifiable to create your own AstroArch. The first script allows you to pass the files needed for the build + +The second builds the OS. You can add packages, services, and any other files to customize your setup + + diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index adf2d9b..992e5ac 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -207,28 +207,28 @@ su astronaut -c "echo $'[Wallet]\nEnabled=false' > /home/astronaut/.config/kwall # Assigns files to user astronaut chown -R astronaut:astronaut /home/astronaut +######################################################################################## +# This section allows you to install some packages from a GitHub repo. If the packages are on your site with a repo, install the packages in the packages section. Then copy the services to /etc/systemd/system and enable them # Onboarding # Disable alpm for repo in disk sed -i 's|DownloadUser = alpm|#DownloadUser = alpm|g' /etc/pacman.conf -# repository sc74.github.io +# Repository sc74.github.io su astronaut -c "git clone https://github.com/sc74/sc74.github.io.git /home/astronaut/.astroarch/sc74.github.io" sed -i 's|\[core\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[core\]|' /etc/pacman.conf pacman -Syu --noconfirm # Install package astroarch-onboarding -yes | LC_ALL=en_US.UTF-8 pacman -R libcamera libcamera-ipa -yes | LC_ALL=en_US.UTF-8 pacman -S astroarch-onboarding rustdesk-bin indi-pylibcamera libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi libpisp \ - gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps --noconfirm --ask 4 -#cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.timer /etc/systemd/system/ +yes | LC_ALL=en_US.UTF-8 pacman -S astroarch-onboarding --noconfirm --ask 4 cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ -# Enable service astroarch-onboarding -#systemctl enable astroarch-onboarding.timer systemctl enable astroarch-onboarding.service -# Script autostart astroarch_onboarding -#cp /home/astronaut/.astroarch/configs/calamares_astroarch/AstroArch-onboarding.desktop /home/astronaut/.config/autostart/ -# delete repo sc74 + +# Install some packages +pacman -S rustdesk-bin indi-pylibcamera libcamera-rpi python-libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi \ + gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps rustdesk-bin --noconfirm --ask 4 +# Delete repo sc74 sed -i -e '/\[sc74\]/,+2d' /etc/pacman.conf # Enable alpm sed -i 's|#DownloadUser = alpm|DownloadUser = alpm|g' /etc/pacman.conf +######################################################################################## # Take sudoers to the original state sed -i 's/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers From 23a4716bba7800f74e8146545d6256f23b01b881 Mon Sep 17 00:00:00 2001 From: sc74 Date: Sun, 30 Mar 2025 00:57:15 +0000 Subject: [PATCH 30/38] update script --- build-astroarch/astroarch_build_chroot.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index 992e5ac..4982e51 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -214,7 +214,7 @@ chown -R astronaut:astronaut /home/astronaut sed -i 's|DownloadUser = alpm|#DownloadUser = alpm|g' /etc/pacman.conf # Repository sc74.github.io su astronaut -c "git clone https://github.com/sc74/sc74.github.io.git /home/astronaut/.astroarch/sc74.github.io" -sed -i 's|\[core\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[core\]|' /etc/pacman.conf +sed -i 's|\[astromatto\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[astromatto\]|' /etc/pacman.conf pacman -Syu --noconfirm # Install package astroarch-onboarding yes | LC_ALL=en_US.UTF-8 pacman -S astroarch-onboarding --noconfirm --ask 4 @@ -223,7 +223,7 @@ systemctl enable astroarch-onboarding.service # Install some packages pacman -S rustdesk-bin indi-pylibcamera libcamera-rpi python-libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi \ - gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps rustdesk-bin --noconfirm --ask 4 + gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps --noconfirm --ask 4 # Delete repo sc74 sed -i -e '/\[sc74\]/,+2d' /etc/pacman.conf # Enable alpm From 31263d262f9d242337495aadfac7ad36c1b20592 Mon Sep 17 00:00:00 2001 From: sc74 Date: Tue, 1 Apr 2025 20:34:05 +0100 Subject: [PATCH 31/38] update script, add file cmdline.txt --- build-astroarch/AA_build_fromAA.sh | 25 +++++++++++++---------- build-astroarch/astroarch_build_chroot.sh | 11 +++++++++- build-astroarch/diskchroot | 1 - configs/cmdline.txt | 1 + 4 files changed, 25 insertions(+), 13 deletions(-) delete mode 100644 build-astroarch/diskchroot create mode 100755 configs/cmdline.txt diff --git a/build-astroarch/AA_build_fromAA.sh b/build-astroarch/AA_build_fromAA.sh index 2fe3fb8..d6af279 100755 --- a/build-astroarch/AA_build_fromAA.sh +++ b/build-astroarch/AA_build_fromAA.sh @@ -72,31 +72,34 @@ if [ ! -d ~/root/boot ]; then sudo mkdir ~/root/boot fi sudo mount $PART1 ~/root/boot - -# Install base -echo "Install ArchLinux base" -#read -p "Press enter to continue" -sudo pacstrap -K ~/root base base-devel linux-rpi linux-rpi-headers linux-firmware-whence linux-firmware linux-api-headers archlinuxarm-keyring - +echo 'astro' | sudo -S echo '' # Copy some files in chroot echo $DISK > diskchroot sudo cp ~/diskchroot ~/root +echo 'astro' | sudo -S echo '' sudo mkdir -p ~/root/kstars/astronomy/ sudo cp ~/.local/share/kstars/astrometry/* ~/root/kstars/astronomy/ +echo 'astro' | sudo -S echo '' sudo cp astroarch_build_chroot.sh /home/astronaut/root - +echo 'astro' | sudo -S echo '' +# Install base +echo "Install ArchLinux base" +#read -p "Press enter to continue" +# sudo pacstrap -K ~/root base base-devel linux-rpi linux-rpi-headers linux-firmware-whence linux-firmware linux-api-headers archlinuxarm-keyring +sudo pacstrap -K ~/root base linux-rpi linux-firmware base-devel linux-api-headers archlinuxarm-keyring +echo 'astro' | sudo -S echo '' # Enter chroot and install AstroArch echo "arch-chroot : install AstroArch" #read -p "Press enter to continue" sudo -S arch-chroot ~/root /astroarch_build_chroot.sh - +echo 'astro' | sudo -S echo '' # Umount disk and delete folder echo "umount" $DISK sudo umount -l $PART1 sudo umount -l $PART2 echo "delete folder root" sudo rm -R ~/root - +echo 'astro' | sudo -S echo '' echo "create image astroarch" -#sudo dd if=$DISK of=astroarch.img bs=8M status=progress -#sudo pishrink.sh -za astroarch.img astroarch-X.X.X.img.gz +sudo dd if=$DISK of=astroarch.img bs=8M status=progress +sudo pishrink.sh -za astroarch.img astroarch-X.X.X.img.gz diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index 4982e51..8286ae8 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -14,6 +14,7 @@ UUID_part2=$(blkid -o value -s UUID "$DISK"2"") echo $DISK sed -i 's/root=\/dev\/mmcblk0p2/root=UUID='$UUID_part2'/' /boot/cmdline.txt +sed -i '/root/ s/$/ video=HDMI-A-1:1920x1080M@60D/' /boot/cmdline.txt # ROOT PASSWD echo "root passwd" @@ -41,9 +42,14 @@ echo "astroarch" > /etc/hostname echo "127.0.0.1 localhost" >> /etc/hosts echo "127.0.1.1 astroarch" >> /etc/hosts + # Bootstrap pacman-key pacman-key --init && pacman-key --populate archlinuxarm +# Allows installation without asking for the root password after waiting +#sed -i 's|# unlock_time = 600|unlock_time = 0|g' /etc/security/faillock.conf +#sed -i 's|# root_unlock_time = 900|root_unlock_time = 0|g' /etc/security/faillock.conf + # Update all packages now pacman -Syu --noconfirm @@ -172,7 +178,7 @@ cp /home/astronaut/.astroarch/build-astroarch/desktop/update-astroarch.sh.deskto # Install astrometry files mkdir -p /home/astronaut/.local/share/kstars/astrometry/ -cp /kstars/astronomy/* /home/astronaut/.local/share/kstars/astrometry/ +mv /kstars/astronomy/* /home/astronaut/.local/share/kstars/astrometry/ # Clear script in autostart cp /home/astronaut/.astroarch/build-astroarch/systemd/clear-install-astroarch.service /etc/systemd/system/ @@ -230,6 +236,9 @@ sed -i -e '/\[sc74\]/,+2d' /etc/pacman.conf sed -i 's|#DownloadUser = alpm|DownloadUser = alpm|g' /etc/pacman.conf ######################################################################################## +# Restores faillock +sed -i 's|unlock_time = 0|# unlock_time = 600|g' /etc/security/faillock.conf + # Take sudoers to the original state sed -i 's/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/g' /etc/sudoers sed -i 's/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/g' /etc/sudoers diff --git a/build-astroarch/diskchroot b/build-astroarch/diskchroot deleted file mode 100644 index 3368963..0000000 --- a/build-astroarch/diskchroot +++ /dev/null @@ -1 +0,0 @@ -/dev/sdc diff --git a/configs/cmdline.txt b/configs/cmdline.txt new file mode 100755 index 0000000..10532c0 --- /dev/null +++ b/configs/cmdline.txt @@ -0,0 +1 @@ +root=UUID=c2cea082-7f3e-43e2-b6a1-0c8540d350cc rw rootwait console=serial0,115200 console=tty1 fsck.repair=yes video=HDMI-A-1:1920x1080M@60D From c486093cb4d4fdadf3c8e10fe7c22e939e9794f5 Mon Sep 17 00:00:00 2001 From: sc74 Date: Tue, 1 Apr 2025 22:20:22 +0100 Subject: [PATCH 32/38] update script zshrc --- build-astroarch/configs/.zshrc | 46 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/build-astroarch/configs/.zshrc b/build-astroarch/configs/.zshrc index 59b9ed5..1ff3586 100644 --- a/build-astroarch/configs/.zshrc +++ b/build-astroarch/configs/.zshrc @@ -81,7 +81,7 @@ function update-astroarch() { echo 'astro' | sudo -S echo '' - # Fonction pour convertir une version (ex: 1.9 ou 1.9.1) en nombre (ex: 10900 ou 10901) + # Function to convert a version (eg: 1.9 or 1.9.1) to a number (eg: 10900 or 10901) version_to_num() { local version=$1 local major minor patch @@ -91,25 +91,25 @@ function update-astroarch() printf "%d%02d%02d" "$major" "$minor" "$patch" } - # Définition des fichiers et variables + # Defining files and variables UPDATE_HISTORY="/home/astronaut/.astroarch/.update_history" if [ ! -f "$UPDATE_HISTORY" ]; then touch "$UPDATE_HISTORY" fi - # Récupération de l'ancienne version (bien qu'elle ne sera plus utilisée pour le test) + # Recovering the old version (although it will no longer be used for testing) if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then OLD_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) else - OLD_VER="1.9.0" # Valeur par défaut si le fichier est absent + OLD_VER="1.9.0" # Default value if the file is missing fi - # Mise à jour depuis le dépôt Git + # Update from Git repository cd /home/$USER/.astroarch git pull origin main cd - > /dev/null 2>&1 - # Lecture de la nouvelle version après mise à jour + # Reading the new version after updating if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then NEW_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) else @@ -117,38 +117,42 @@ function update-astroarch() exit 1 fi - # Conversion des versions en format numérique + # Converting versions into digital format OLD_NUM=$(version_to_num "$OLD_VER") NEW_NUM=$(version_to_num "$NEW_VER") MIN_VERSION="1.9.0" MIN_NUM=$(version_to_num "$MIN_VERSION") - echo "Ancienne version : $OLD_VER ($OLD_NUM)" - echo "Nouvelle version : $NEW_VER ($NEW_NUM)" - echo "Version minimale requise : $MIN_VERSION ($MIN_NUM)" + echo "Old version : $OLD_VER ($OLD_NUM)" + echo "New version : $NEW_VER ($NEW_NUM)" + echo "Minimum version required : $MIN_VERSION ($MIN_NUM)" - # Parcours des scripts de mise à jour + # Update Scripts Walkthrough for script in /home/astronaut/.astroarch/scripts/1.*.sh; do SCRIPT_BASENAME=$(basename "$script") - # Récupération de la version en retirant uniquement l'extension .sh + # Recovering the version by removing only the .sh extension SCRIPT_VER=$(basename "$script" .sh) SCRIPT_NUM=$(version_to_num "$SCRIPT_VER") - echo "Vérification du script : $SCRIPT_BASENAME (version $SCRIPT_VER, $SCRIPT_NUM, $MIN_NUM, $NEW_NUM)" + echo "Script Check : $SCRIPT_BASENAME (version $SCRIPT_VER, $SCRIPT_NUM, $MIN_NUM, $NEW_NUM)" - # On applique le script uniquement si : - # - La version du script est strictement supérieure à la version minimale (1.9.0) - # - Inférieure ou égale à la nouvelle version - if [[ $SCRIPT_NUM -gt $MIN_NUM && $SCRIPT_NUM -le $NEW_NUM ]]; then - if ! grep -Fq "$SCRIPT_BASENAME" "$UPDATE_HISTORY"; then - echo "=== Application de la mise à jour $SCRIPT_BASENAME... ===" + # The script is only applied if: + # - if the script is not in history + # - The script version is strictly higher than the minimum version (1.9.0) + if ! grep -Fq "$SCRIPT_BASENAME" "$UPDATE_HISTORY"; then + if [[ $SCRIPT_NUM -gt $MIN_NUM ]]; then + echo "=== Applying the update $SCRIPT_BASENAME... ===" zsh "$script" echo "$SCRIPT_BASENAME" >> "$UPDATE_HISTORY" + if [[ $SCRIPT_NUM -gt $NEW_NUM ]]; then + echo $SCRIPT_VER > /home/astronaut/.astroarch/configs/.astroarch.version + echo "update version" + fi else - echo "Déjà appliqué : $SCRIPT_BASENAME" + echo "Already applied : $SCRIPT_BASENAME" fi else - echo "Ignoré : $SCRIPT_BASENAME" + echo "Ignored : $SCRIPT_BASENAME" fi done From 6b41a4f24d74052f34171c52e4f767eb33331c69 Mon Sep 17 00:00:00 2001 From: sc74 Date: Tue, 1 Apr 2025 22:23:10 +0100 Subject: [PATCH 33/38] update script --- build-astroarch/AA_build_fromAA.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build-astroarch/AA_build_fromAA.sh b/build-astroarch/AA_build_fromAA.sh index d6af279..e21c5f3 100755 --- a/build-astroarch/AA_build_fromAA.sh +++ b/build-astroarch/AA_build_fromAA.sh @@ -102,4 +102,5 @@ sudo rm -R ~/root echo 'astro' | sudo -S echo '' echo "create image astroarch" sudo dd if=$DISK of=astroarch.img bs=8M status=progress +echo 'astro' | sudo -S echo '' sudo pishrink.sh -za astroarch.img astroarch-X.X.X.img.gz From 186c12f6a8ce486153f8bfe134251aada72b5c88 Mon Sep 17 00:00:00 2001 From: sc74 Date: Wed, 2 Apr 2025 21:21:44 +0100 Subject: [PATCH 34/38] Add Script 1.10-sc74.sh --- build-astroarch/astroarch_build_chroot.sh | 15 +++--- scripts/1.10-sc74.sh | 62 +++++++++++++++++++++++ 2 files changed, 71 insertions(+), 6 deletions(-) create mode 100755 scripts/1.10-sc74.sh diff --git a/build-astroarch/astroarch_build_chroot.sh b/build-astroarch/astroarch_build_chroot.sh index 8286ae8..875a509 100755 --- a/build-astroarch/astroarch_build_chroot.sh +++ b/build-astroarch/astroarch_build_chroot.sh @@ -63,12 +63,12 @@ pacman -S wget git pipewire-jack gnu-free-fonts wireplumber \ xplanet plasma-nm dhcp dnsmasq kate plasma-systemmonitor \ dolphin uboot-tools usbutils cloud-guest-utils samba paru \ websockify novnc astrometry.net gsc kstars phd2 packagekit-qt6 \ - indi-3rdparty-libs indi-3rdparty-drivers \ + indi-3rdparty-libs indi-3rdparty-drivers rpi-imager \ i2c-tools indiserver-ui astro_dmx openssl-1.1 firefox chrony \ - ksystemlog discover kwalletmanager kgpg dhcpcd \ + ksystemlog discover kwalletmanager kgpg dhcpcd spectacle \ qt6-serialport qt6ct udisks2-qt5 xorg-fonts-misc fuse2 \ - fortune-mod cowsay pacman-contrib arandr neofetch \ - astromonitor kscreen sddm-kcm flatpak ark \ + fortune-mod cowsay pacman-contrib arandr neofetch nss-mdns \ + astromonitor kscreen sddm-kcm flatpak ark cups cups-pdf\ arch-install-scripts argon2 astroarch-status-notifications atkmm bc cairomm dialog dnssec-anchors dosfstools \ ecryptfs-utils geoclue glibmm gparted gtkmm3 imath iw kdenetwork-filesharing lbzip2 ldns libcamera libcamera-ipa \ libdeflate libomxil-bellagio libsigc++ libsoup lrzip lzop nano net-tools netctl networkmanager-qt5 nilfs-utils \ @@ -118,6 +118,9 @@ cd /home/astronaut ZSH=/home/astronaut/.oh-my-zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended chown astronaut:astronaut .oh-my-zsh/ +# Set local Hostname resolution +sed -i 's|hosts: mymachines |&mdns_minimal [NOTFOUND=return] |g' /etc/nsswitch.conf + # Set the samba pass ln -s /home/astronaut/.astroarch/configs/smb.conf /etc/samba/smb.conf systemctl start smb @@ -167,7 +170,7 @@ systemctl enable x0vncserver su astronaut -c "cp /home/astronaut/.astroarch/configs/kwinrc /home/astronaut/.config" # Enable now all services -systemctl enable systemd-resolved.service dhcpcd.service sshd.service systemd-networkd.service sddm.service novnc.service NetworkManager.service avahi-daemon.service nmb.service smb.service create_ap.service resize_once.service +systemctl enable systemd-resolved.service dhcpcd.service sshd.service systemd-networkd.service sddm.service novnc.service NetworkManager.service avahi-daemon.service nmb.service smb.service create_ap.service resize_once.service cups.service # Script for autostart settings plasma mkdir -p /home/astronaut/.config/autostart/ @@ -221,7 +224,7 @@ sed -i 's|DownloadUser = alpm|#DownloadUser = alpm|g' /etc/pacman.conf # Repository sc74.github.io su astronaut -c "git clone https://github.com/sc74/sc74.github.io.git /home/astronaut/.astroarch/sc74.github.io" sed -i 's|\[astromatto\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[astromatto\]|' /etc/pacman.conf -pacman -Syu --noconfirm +yes | LC_ALL=en_US.UTF-8 pacman -Syu --noconfirm # Install package astroarch-onboarding yes | LC_ALL=en_US.UTF-8 pacman -S astroarch-onboarding --noconfirm --ask 4 cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ diff --git a/scripts/1.10-sc74.sh b/scripts/1.10-sc74.sh new file mode 100755 index 0000000..15de809 --- /dev/null +++ b/scripts/1.10-sc74.sh @@ -0,0 +1,62 @@ +#!/usr/bin/env bash + +# clone git repo sc74 +mkdir -p /home/astronaut/.astroarch/sc74 +cd /home/astronaut/.astroarch/sc74 +git clone -b 1.10 --single-branch https://github.com/sc74/astroarch.git /home/astronaut/.astroarch/sc74 + +# Update files for the driver vc4-kms-v3d #106 +sudo cp /home/astronaut/.astroarch/sc74/configs/cmdline.txt /boot +sudo cp /home/astronaut/.astroarch/sc74/configs/config.txt /boot +sudo cp /home/astronaut/.astroarch/sc74/configs/xorg.conf /etc/X11/ +sudo cp /home/astronaut/.astroarch/sc74/configs/99-v3d.conf /etc/X11/xorg.conf.d +sudo cp /home/astronaut/.astroarch/sc74/configs/kwinrc /home/astronaut/.config + +# Delete repo sc74 +sudo rm -Rf /home/astronaut/.astroarch/sc74 + +# DisableDownloadTimeout in pacman.conf +if [ $(grep -c DisableDownloadTimeout /etc/pacman.conf) -eq 0 ]; then + sudo sed -i '/ParallelDownloads=5/aDisableDownloadTimeout' /etc/pacman.conf +fi + +# Add some packages +sudo pacman -S spectacle nano + +# Printer +sudo pacman -S cups cups-pdf +sudo systemctl enable cups.service + +# Set local Hostname resolution +sudo pacman -S nss-mdns +sudo sed -i 's|hosts: mymachines |&mdns_minimal [NOTFOUND=return] |g' /etc/nsswitch.conf + +######################################################################################## +# This section allows you to install some packages from a GitHub repo. If the packages are on your site with a repo, install the packages in the packages section. Then copy the services to /etc/systemd/system and enable them + +# Onboarding + +# Repository sc74.github.io +git clone https://github.com/sc74/sc74.github.io.git /home/astronaut/.astroarch/sc74.github.io +sudo sed -i 's|\[astromatto\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[astromatto\]|' /etc/pacman.conf +yes | LC_ALL=en_US.UTF-8 sudo pacman -Syu --noconfirm +# Install package astroarch-onboarding +yes | LC_ALL=en_US.UTF-8 sudo pacman -S astroarch-onboarding --noconfirm --ask 4 +sudo cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ +sudo systemctl enable astroarch-onboarding.service + +# Install some packages +sudo pacman -S rustdesk-bin indi-pylibcamera libcamera-rpi python-libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi \ + gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps --noconfirm --ask 4 +# Delete repo sc74 +sudo sed -i -e '/\[sc74\]/,+2d' /etc/pacman.conf + + +# delete repo sc74.github.io +sudo rm -Rf /home/astronaut/.astroarch/sc74.github.io + +######################################################################################## + +echo "Reboot system now" +read -p "Press enter to continue" +reboot From 1681b459792730fddfed4c05a8fb610da9a21638 Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 3 Apr 2025 22:07:22 +0200 Subject: [PATCH 35/38] update script --- configs/.zshrc | 51 ++++++++++++++++++++++++++------------------ scripts/1.10-sc74.sh | 5 +++-- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/configs/.zshrc b/configs/.zshrc index e716bf2..1ff3586 100644 --- a/configs/.zshrc +++ b/configs/.zshrc @@ -40,17 +40,20 @@ bash /home/astronaut/.astroarch/scripts/aa_motd.sh function use-astro-bleeding-edge() { + echo 'astro' | sudo -S echo '' sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars-git libindi-git indi-3rdparty-drivers-git indi-3rdparty-libs-git } function use-astro-stable() { + echo 'astro' | sudo -S echo '' sudo pacman -Sy && yes | LC_ALL=en_US.UTF-8 sudo pacman -S kstars libindi indi-3rdparty-drivers indi-3rdparty-libs } function astro-rollback-indi() { + echo 'astro' | sudo -S echo '' setopt localoptions rmstarsilent mkdir -p ~/.rollback cd ~/.rollback @@ -64,6 +67,7 @@ function astro-rollback-indi() function astro-rollback-kstars() { + echo 'astro' | sudo -S echo '' setopt localoptions rmstarsilent mkdir -p ~/.rollback cd ~/.rollback @@ -75,8 +79,9 @@ function astro-rollback-kstars() function update-astroarch() { + echo 'astro' | sudo -S echo '' - # Fonction pour convertir une version (ex: 1.9 ou 1.9.1) en nombre (ex: 10900 ou 10901) + # Function to convert a version (eg: 1.9 or 1.9.1) to a number (eg: 10900 or 10901) version_to_num() { local version=$1 local major minor patch @@ -86,25 +91,25 @@ function update-astroarch() printf "%d%02d%02d" "$major" "$minor" "$patch" } - # Définition des fichiers et variables + # Defining files and variables UPDATE_HISTORY="/home/astronaut/.astroarch/.update_history" if [ ! -f "$UPDATE_HISTORY" ]; then touch "$UPDATE_HISTORY" fi - # Récupération de l'ancienne version (bien qu'elle ne sera plus utilisée pour le test) + # Recovering the old version (although it will no longer be used for testing) if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then OLD_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) else - OLD_VER="1.9.0" # Valeur par défaut si le fichier est absent + OLD_VER="1.9.0" # Default value if the file is missing fi - # Mise à jour depuis le dépôt Git + # Update from Git repository cd /home/$USER/.astroarch git pull origin main cd - > /dev/null 2>&1 - # Lecture de la nouvelle version après mise à jour + # Reading the new version after updating if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then NEW_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) else @@ -112,38 +117,42 @@ function update-astroarch() exit 1 fi - # Conversion des versions en format numérique + # Converting versions into digital format OLD_NUM=$(version_to_num "$OLD_VER") NEW_NUM=$(version_to_num "$NEW_VER") MIN_VERSION="1.9.0" MIN_NUM=$(version_to_num "$MIN_VERSION") - echo "Ancienne version : $OLD_VER ($OLD_NUM)" - echo "Nouvelle version : $NEW_VER ($NEW_NUM)" - echo "Version minimale requise : $MIN_VERSION ($MIN_NUM)" + echo "Old version : $OLD_VER ($OLD_NUM)" + echo "New version : $NEW_VER ($NEW_NUM)" + echo "Minimum version required : $MIN_VERSION ($MIN_NUM)" - # Parcours des scripts de mise à jour + # Update Scripts Walkthrough for script in /home/astronaut/.astroarch/scripts/1.*.sh; do SCRIPT_BASENAME=$(basename "$script") - # Récupération de la version en retirant uniquement l'extension .sh + # Recovering the version by removing only the .sh extension SCRIPT_VER=$(basename "$script" .sh) SCRIPT_NUM=$(version_to_num "$SCRIPT_VER") - echo "Vérification du script : $SCRIPT_BASENAME (version $SCRIPT_VER, $SCRIPT_NUM, $MIN_NUM, $NEW_NUM)" + echo "Script Check : $SCRIPT_BASENAME (version $SCRIPT_VER, $SCRIPT_NUM, $MIN_NUM, $NEW_NUM)" - # On applique le script uniquement si : - # - La version du script est strictement supérieure à la version minimale (1.9.0) - # - Inférieure ou égale à la nouvelle version - if [[ $SCRIPT_NUM -gt $MIN_NUM && $SCRIPT_NUM -le $NEW_NUM ]]; then - if ! grep -Fq "$SCRIPT_BASENAME" "$UPDATE_HISTORY"; then - echo "=== Application de la mise à jour $SCRIPT_BASENAME... ===" + # The script is only applied if: + # - if the script is not in history + # - The script version is strictly higher than the minimum version (1.9.0) + if ! grep -Fq "$SCRIPT_BASENAME" "$UPDATE_HISTORY"; then + if [[ $SCRIPT_NUM -gt $MIN_NUM ]]; then + echo "=== Applying the update $SCRIPT_BASENAME... ===" zsh "$script" echo "$SCRIPT_BASENAME" >> "$UPDATE_HISTORY" + if [[ $SCRIPT_NUM -gt $NEW_NUM ]]; then + echo $SCRIPT_VER > /home/astronaut/.astroarch/configs/.astroarch.version + echo "update version" + fi else - echo "Déjà appliqué : $SCRIPT_BASENAME" + echo "Already applied : $SCRIPT_BASENAME" fi else - echo "Ignoré : $SCRIPT_BASENAME" + echo "Ignored : $SCRIPT_BASENAME" fi done diff --git a/scripts/1.10-sc74.sh b/scripts/1.10-sc74.sh index 15de809..a46f3ef 100755 --- a/scripts/1.10-sc74.sh +++ b/scripts/1.10-sc74.sh @@ -12,6 +12,9 @@ sudo cp /home/astronaut/.astroarch/sc74/configs/xorg.conf /etc/X11/ sudo cp /home/astronaut/.astroarch/sc74/configs/99-v3d.conf /etc/X11/xorg.conf.d sudo cp /home/astronaut/.astroarch/sc74/configs/kwinrc /home/astronaut/.config +# Update .zshrc +cp -rf /home/astronaut/.astroarch/sc74/configs/.zshrc /home/astronaut/.astroarch/configs + # Delete repo sc74 sudo rm -Rf /home/astronaut/.astroarch/sc74 @@ -34,8 +37,6 @@ sudo sed -i 's|hosts: mymachines |&mdns_minimal [NOTFOUND=return] |g' /etc/nsswi ######################################################################################## # This section allows you to install some packages from a GitHub repo. If the packages are on your site with a repo, install the packages in the packages section. Then copy the services to /etc/systemd/system and enable them -# Onboarding - # Repository sc74.github.io git clone https://github.com/sc74/sc74.github.io.git /home/astronaut/.astroarch/sc74.github.io sudo sed -i 's|\[astromatto\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[astromatto\]|' /etc/pacman.conf From d723ee97a85ac9d53c7fe646552581f2604f2edb Mon Sep 17 00:00:00 2001 From: sc74 Date: Thu, 3 Apr 2025 22:59:33 +0200 Subject: [PATCH 36/38] update folder script for sc74 --- {scripts => scripts-sc74}/1.10-sc74.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {scripts => scripts-sc74}/1.10-sc74.sh (100%) diff --git a/scripts/1.10-sc74.sh b/scripts-sc74/1.10-sc74.sh similarity index 100% rename from scripts/1.10-sc74.sh rename to scripts-sc74/1.10-sc74.sh From a7ef94f9b91f5c8348c407a06a6e3fd6f9e2eab2 Mon Sep 17 00:00:00 2001 From: sc74 Date: Fri, 4 Apr 2025 14:20:02 +0100 Subject: [PATCH 37/38] update script for 1.10-sc74.sh --- scripts-sc74/1.10-sc74.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts-sc74/1.10-sc74.sh b/scripts-sc74/1.10-sc74.sh index a46f3ef..9cf8ce7 100755 --- a/scripts-sc74/1.10-sc74.sh +++ b/scripts-sc74/1.10-sc74.sh @@ -1,5 +1,10 @@ #!/usr/bin/env bash +# Update .zshrc +cp -rf /home/astronaut/.astroarch/sc74/configs/.zshrc /home/astronaut/.astroarch/configs +exec zshrc +update-astroarch + # clone git repo sc74 mkdir -p /home/astronaut/.astroarch/sc74 cd /home/astronaut/.astroarch/sc74 @@ -12,9 +17,6 @@ sudo cp /home/astronaut/.astroarch/sc74/configs/xorg.conf /etc/X11/ sudo cp /home/astronaut/.astroarch/sc74/configs/99-v3d.conf /etc/X11/xorg.conf.d sudo cp /home/astronaut/.astroarch/sc74/configs/kwinrc /home/astronaut/.config -# Update .zshrc -cp -rf /home/astronaut/.astroarch/sc74/configs/.zshrc /home/astronaut/.astroarch/configs - # Delete repo sc74 sudo rm -Rf /home/astronaut/.astroarch/sc74 From d5ea993c5ef2572736aa28c8acceb1f2e164db26 Mon Sep 17 00:00:00 2001 From: sc74 Date: Sat, 5 Apr 2025 10:28:31 +0100 Subject: [PATCH 38/38] update 1.10-sc74.sh --- scripts-sc74/1.10-sc74.sh | 129 +++++++++++++++++++++++++++++++++----- 1 file changed, 112 insertions(+), 17 deletions(-) diff --git a/scripts-sc74/1.10-sc74.sh b/scripts-sc74/1.10-sc74.sh index 9cf8ce7..f7811db 100755 --- a/scripts-sc74/1.10-sc74.sh +++ b/scripts-sc74/1.10-sc74.sh @@ -1,15 +1,114 @@ #!/usr/bin/env bash -# Update .zshrc -cp -rf /home/astronaut/.astroarch/sc74/configs/.zshrc /home/astronaut/.astroarch/configs -exec zshrc -update-astroarch +# DisableDownloadTimeout in pacman.conf +if [ $(grep -c DisableDownloadTimeout /etc/pacman.conf) -eq 0 ]; then + sudo sed -i '/ParallelDownloads=5/aDisableDownloadTimeout' /etc/pacman.conf +fi + +# Checkout latest changes from git + cd /home/$USER/.astroarch + git pull origin main + cd - > /dev/null 2>&1 # clone git repo sc74 mkdir -p /home/astronaut/.astroarch/sc74 cd /home/astronaut/.astroarch/sc74 git clone -b 1.10 --single-branch https://github.com/sc74/astroarch.git /home/astronaut/.astroarch/sc74 +# Update .zshrc +cp -rf /home/astronaut/.astroarch/sc74/configs/.zshrc /home/astronaut/.astroarch/configs + +echo 'astro' | sudo -S echo '' + + # Function to convert a version (eg: 1.9 or 1.9.1) to a number (eg: 10900 or 10901) + version_to_num() { + local version=$1 + local major minor patch + IFS='.' read -r major minor patch <<< "$version" + minor=${minor:-0} + patch=${patch:-0} + printf "%d%02d%02d" "$major" "$minor" "$patch" + } + + # Defining files and variables + UPDATE_HISTORY="/home/astronaut/.astroarch/.update_history" + if [ ! -f "$UPDATE_HISTORY" ]; then + touch "$UPDATE_HISTORY" + fi + + # Recovering the old version (although it will no longer be used for testing) + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + OLD_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + OLD_VER="1.9.0" # Default value if the file is missing + fi + + # Update from Git repository + cd /home/$USER/.astroarch + git pull origin main + cd - > /dev/null 2>&1 + + # Reading the new version after updating + if [ -f "/home/astronaut/.astroarch/configs/.astroarch.version" ]; then + NEW_VER=$(cat /home/astronaut/.astroarch/configs/.astroarch.version) + else + echo "Error: Unable to read updated version of AstroArch" + exit 1 + fi + + # Converting versions into digital format + OLD_NUM=$(version_to_num "$OLD_VER") + NEW_NUM=$(version_to_num "$NEW_VER") + MIN_VERSION="1.9.0" + MIN_NUM=$(version_to_num "$MIN_VERSION") + + echo "Old version : $OLD_VER ($OLD_NUM)" + echo "New version : $NEW_VER ($NEW_NUM)" + echo "Minimum version required : $MIN_VERSION ($MIN_NUM)" + + # Update Scripts Walkthrough + for script in /home/astronaut/.astroarch/scripts/1.*.sh; do + SCRIPT_BASENAME=$(basename "$script") + # Recovering the version by removing only the .sh extension + SCRIPT_VER=$(basename "$script" .sh) + SCRIPT_NUM=$(version_to_num "$SCRIPT_VER") + + echo "Script Check : $SCRIPT_BASENAME (version $SCRIPT_VER, $SCRIPT_NUM, $MIN_NUM, $NEW_NUM)" + + # The script is only applied if: + # - if the script is not in history + # - The script version is strictly higher than the minimum version (1.9.0) + if ! grep -Fq "$SCRIPT_BASENAME" "$UPDATE_HISTORY"; then + if [[ $SCRIPT_NUM -gt $MIN_NUM ]]; then + echo "=== Applying the update $SCRIPT_BASENAME... ===" + zsh "$script" + echo "$SCRIPT_BASENAME" >> "$UPDATE_HISTORY" + if [[ $SCRIPT_NUM -gt $NEW_NUM ]]; then + echo $SCRIPT_VER > /home/astronaut/.astroarch/configs/.astroarch.version + echo "update version" + fi + else + echo "Already applied : $SCRIPT_BASENAME" + fi + else + echo "Ignored : $SCRIPT_BASENAME" + fi + done + + # Temporary fix for kde-portal duplicated conf + if [ -f /usr/share/xdg-desktop-portal/kde-portal.conf ]; then + sudo mv /usr/share/xdg-desktop-portal/kde-portal.conf /usr/share/xdg-desktop-portal/kde-portal.conf.old + fi; + + # Update the repo content + yes | LC_ALL=en_US.UTF-8 sudo pacman -Sy + + # Update always keyring first, than all of the other packages + yes | LC_ALL=en_US.UTF-8 sudo pacman -S archlinux-keyring --noconfirm + + # Now upgrade all system packages, but ask user to choose in case of conflicts/choices + yes | LC_ALL=en_US.UTF-8 sudo pacman -Syu + # Update files for the driver vc4-kms-v3d #106 sudo cp /home/astronaut/.astroarch/sc74/configs/cmdline.txt /boot sudo cp /home/astronaut/.astroarch/sc74/configs/config.txt /boot @@ -20,37 +119,33 @@ sudo cp /home/astronaut/.astroarch/sc74/configs/kwinrc /home/astronaut/.config # Delete repo sc74 sudo rm -Rf /home/astronaut/.astroarch/sc74 -# DisableDownloadTimeout in pacman.conf -if [ $(grep -c DisableDownloadTimeout /etc/pacman.conf) -eq 0 ]; then - sudo sed -i '/ParallelDownloads=5/aDisableDownloadTimeout' /etc/pacman.conf -fi - # Add some packages -sudo pacman -S spectacle nano +yes | LC_ALL=en_US.UTF-8 sudo pacman -S spectacle nano # Printer -sudo pacman -S cups cups-pdf +yes | LC_ALL=en_US.UTF-8 sudo pacman -S cups cups-pdf sudo systemctl enable cups.service # Set local Hostname resolution -sudo pacman -S nss-mdns +yes | LC_ALL=en_US.UTF-8 sudo pacman -S nss-mdns sudo sed -i 's|hosts: mymachines |&mdns_minimal [NOTFOUND=return] |g' /etc/nsswitch.conf ######################################################################################## # This section allows you to install some packages from a GitHub repo. If the packages are on your site with a repo, install the packages in the packages section. Then copy the services to /etc/systemd/system and enable them # Repository sc74.github.io -git clone https://github.com/sc74/sc74.github.io.git /home/astronaut/.astroarch/sc74.github.io +cd /home/astronaut/.astroarch +git clone https://github.com/sc74/sc74.github.io.git sudo sed -i 's|\[astromatto\]|\[sc74\]\nSigLevel = Optional TrustAll\nServer = file:///home/astronaut/.astroarch/sc74.github.io/aarch64\n\n\[astromatto\]|' /etc/pacman.conf -yes | LC_ALL=en_US.UTF-8 sudo pacman -Syu --noconfirm +yes | LC_ALL=en_US.UTF-8 sudo pacman -Syu # Install package astroarch-onboarding -yes | LC_ALL=en_US.UTF-8 sudo pacman -S astroarch-onboarding --noconfirm --ask 4 +yes | LC_ALL=en_US.UTF-8 sudo pacman -S astroarch-onboarding sudo cp /home/astronaut/.astroarch/build-astroarch/systemd/astroarch-onboarding.service /etc/systemd/system/ sudo systemctl enable astroarch-onboarding.service # Install some packages -sudo pacman -S rustdesk-bin indi-pylibcamera libcamera-rpi python-libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi \ - gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps --noconfirm --ask 4 +yes | LC_ALL=en_US.UTF-8 sudo pacman -S rustdesk-bin indi-pylibcamera libcamera-rpi python-libcamera-rpi libcamera-ipa-rpi libcamera-docs-rpi libcamera-tools-rpi gst-plugin-libcamera-rpi python-pycamera2 rpicam-apps + # Delete repo sc74 sudo sed -i -e '/\[sc74\]/,+2d' /etc/pacman.conf