Skip to content

Commit

Permalink
[ci skip] Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 7a1c468
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 23:57:00 2024 -0600

    Update nuts-query.info

commit d0b508e
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 22:30:05 2024 -0600

    ...

commit b794003
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 18:42:12 2024 -0600

    chk ota

commit a12456e
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 18:35:40 2024 -0600

    *sigh*

commit e27d3ff
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 18:30:28 2024 -0600

    fffs

commit 321f418
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 18:07:46 2024 -0600

    ffs

commit 03fca8b
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 17:30:07 2024 -0600

    chk ota

commit d718bbb
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 17:28:22 2024 -0600

    Update nuts-ccu

    put the new stuff at the end

commit 804d633
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 17:09:45 2024 -0600

    Update nuts-ccu

commit b4066f4
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 17:08:00 2024 -0600

    Squashed commit of the following:

    commit 25b51cb
    Author: Uri Herrera <[email protected]>
    Date:   Mon Jul 8 15:56:03 2024 -0600

        Update nuts-ccu

        rm unnecessary messages

    commit 3095eeb
    Author: Uri Herrera <[email protected]>
    Date:   Mon Jul 8 15:52:07 2024 -0600

        Update nuts-ccu

        organize the cleanup stuff better

commit bdee030
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 16:54:25 2024 -0600

    ...

commit b72a256
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 13:33:42 2024 -0600

    update copyright year, clarify the availability of

    updates in case there's no update archive

commit 6054466
Author: Uri Herrera <[email protected]>
Date:   Mon Jul 8 03:31:48 2024 -0600

    chk ota

commit db2ce0a
Author: Uri Herrera <[email protected]>
Date:   Tue Jun 25 12:22:50 2024 -0600

    ...
  • Loading branch information
UriHerrera committed Jul 9, 2024
1 parent ffdbff4 commit 9ffcd99
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 90 deletions.
142 changes: 70 additions & 72 deletions tmp/nuts-ccu
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#############################################################################################################################################################################
# The license used for this file and its contents is: BSD-3-Clause #
# #
# Copyright <2023> <Uri Herrera <[email protected]>> #
# Copyright <2023-2024> <Uri Herrera <[email protected]>> #
# #
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: #
# #
Expand Down Expand Up @@ -133,61 +133,21 @@ spinner() {
# ====== START ======

############################################################################################################
# Start of misc-fixes and edit-conf from iso-tool #
# When updating packages the stuff below will be overwritten, thus we must apply changes from iso-tool #
# When updating packages the stuff below will be overwritten, thus we must apply changes from iso-tool. #
############################################################################################################

# -- Add link for applet window buttons.
# -- NOTE: Update the link on every new release of Plasma.

PLASMA_LIB="5.27.11"

create_symlink /usr/lib/x86_64-linux-gnu/libkdecorations2private.so.$PLASMA_LIB /usr/lib/x86_64-linux-gnu/libkdecorations2private.so.9


# Check session set in SDDM.

if grep -q '^Session=plasma$' /etc/sddm.conf.d/kde_settings.conf; then
puts_info "Detected graphical session set to Plasma (X11) in SDDM, leaving session file unchanged, continuing..."
elif grep -q '^Session=plasmawayland$' /etc/sddm.conf.d/kde_settings.conf; then
if [ -f /usr/share/xsessions/plasma.desktop ]; then
mv /usr/share/xsessions/plasma.desktop /usr/share/xsessions/orig.plasma.desktop.bak
fi
else
puts_info "Detected graphical session set to Plasma (Wayland) in SDDM, renaming X session file, continuing..."
fi


# -- Replace this line in mkinitramfs so it shuts up about dpkg.
# -- We replace this line here because the package from upstream will put it back to its default value.

sed -i "s+DPKG_ARCH=\$(dpkg --print-architecture)+DPKG_ARCH=\$(uname -m | sed \"s/x86_64/amd64/\")+g" /usr/sbin/mkinitramfs


# -- Change path where NetworkManager saves wireless connections.
# -- We replace this line here because the package from upstream will put it back to its default value.

echo -e "\n[keyfile]\npath=/var/lib/NetworkManager" | tee -a /etc/NetworkManager/NetworkManager.conf > /dev/null 2>&1


# -- Add variable to PAM for Firefox to work with touchscreens in Wayland.
# -- We replace this line here because the package from upstream will put it back to its default value.

sed -i "$ a \ " /etc/security/pam_env.conf
sed -i "$ a # Make Firefox work with touchscreens in Wayland" /etc/security/pam_env.conf
sed -i "$ a MOZ_ENABLE_WAYLAND DEFAULT=0 OVERRIDE=1" /etc/security/pam_env.conf


# -- Downloaded these files so they overwrite the files from Debian.

puts_info "Updating misc. and configuration files, continuing..."

#######################################################################################
# Always apply these changes because the packages from Debian will overwrite them. #
#######################################################################################

declare -A FILES_TO_DOWNLOAD=(
# Replace user-setup-apply so that it shuts up about dpkg.
["https://raw.githubusercontent.com/Nitrux/iso-tool/legacy/configs/scripts/others/user-setup-apply"]="/usr/lib/user-setup/user-setup-apply"
# Replace update-grub with our version that doesn't break OUR stuff.
["https://raw.githubusercontent.com/Nitrux/iso-tool/legacy/configs/scripts/others/update-grub"]="/usr/sbin/update-grub"
# Replace /usr/lib/grub/grub-sort-version with a version that doesn't use apt.pkg do it can generate a usable boot menu.
# Replace /usr/lib/grub/grub-sort-version with a version that doesn't use apt.pkg do it can generate a usable boot menu.
["https://raw.githubusercontent.com/Nitrux/iso-tool/legacy/configs/files/grub_files/grub-sort-version"]="/usr/lib/grub/grub-sort-version"
# Replace dnscrypt-proxy default configuration.
["https://raw.githubusercontent.com/Nitrux/iso-tool/legacy/configs/files/other/dnscrypt-proxy-settings/dnscrypt-proxy.toml"]="/etc/dnscrypt-proxy/dnscrypt-proxy.toml"
Expand Down Expand Up @@ -231,7 +191,25 @@ for URL in "${!FILES_TO_DOWNLOAD[@]}"; do
fi
done

puts_success "Success! misc. and configuration files have been updated, continuing..."

# -- Replace this line in mkinitramfs so it shuts up about dpkg.
# -- We replace this line here because the package from upstream will put it back to its default value.

sed -i "s+DPKG_ARCH=\$(dpkg --print-architecture)+DPKG_ARCH=\$(uname -m | sed \"s/x86_64/amd64/\")+g" /usr/sbin/mkinitramfs


# -- Change path where NetworkManager saves wireless connections.
# -- We replace this line here because the package from upstream will put it back to its default value.

echo -e "\n[keyfile]\npath=/var/lib/NetworkManager" | tee -a /etc/NetworkManager/NetworkManager.conf > /dev/null 2>&1


# -- Add variable to PAM for Firefox to work with touchscreens in Wayland.
# -- We replace this line here because the package from upstream will put it back to its default value.

sed -i "$ a \ " /etc/security/pam_env.conf
sed -i "$ a # Make Firefox work with touchscreens in Wayland" /etc/security/pam_env.conf
sed -i "$ a MOZ_ENABLE_WAYLAND DEFAULT=0 OVERRIDE=1" /etc/security/pam_env.conf


# -- Edit NVIDIA X Settings launcher.
Expand All @@ -244,43 +222,63 @@ sed -i 's+Categories=System;Settings;+Categories=Settings;+g' /usr/share/applica
sed -i 's+Categories=System;Settings;Utility;+Categories=Utility;+g' /usr/share/applications/org.corectrl.CoreCtrl.desktop


# -- Create link for gamescope to work.
# -- Check the session set in SDDM. If the session is Plasma X11, leave the file as-is. If the session is Plasma Wayland, then reset this change.

create_symlink /usr/lib/x86_64-linux-gnu/libwlroots.so.12 /usr/lib/x86_64-linux-gnu/libwlroots.so.11
if grep -q '^Session=plasma$' /etc/sddm.conf.d/kde_settings.conf; then
puts_info "Detected graphical session set to Plasma (X11) in SDDM, leaving session file unchanged, continuing..."
elif grep -q '^Session=plasmawayland$' /etc/sddm.conf.d/kde_settings.conf; then
if [ -f /usr/share/xsessions/plasma.desktop ]; then
mv /usr/share/xsessions/plasma.desktop /usr/share/xsessions/orig.plasma.desktop.bak
fi
else
puts_info "Detected graphical session set to Plasma (Wayland) in SDDM, renaming X session file, continuing..."
fi


# -- Install xpadneo and xone drivers using their installer scripts.
# -- FIXME: There are no Debian packages available, if and when they are, switch to use them instead.
#######################################################
# These are changes introduced in the new release. #
#######################################################

ORIGINAL_DIR=$(pwd)
# -- Cleanup the prev. NetworkManager configuration.

TEMP_DIR1=$(mktemp -d)
git clone https://github.com/medusalix/xone "$TEMP_DIR1"
cd "$TEMP_DIR1"
sh install.sh
cd "$ORIGINAL_DIR"
files=(
"/etc/NetworkManager/dnsmasq.d/01-dns_cache.conf"
"/etc/NetworkManager/dnsmasq.d/02-dnscrypt-proxy.conf"
"/etc/NetworkManager/dnsmasq.d/03-dnssec.conf"
"/etc/dnsmasq.d/dns-block.conf"
)

TEMP_DIR2=$(mktemp -d)
git clone https://github.com/atar-axis/xpadneo "$TEMP_DIR2"
cd "$TEMP_DIR2"
bash install.sh
cd "$ORIGINAL_DIR"
for file in "${files[@]}"; do
if [ -e "$file" ]; then
rm "$file"
puts_info "Updating NetworkManager configuration, continuing..."
else
puts_error "NetworkManager conf. file: $file does not exist, skipping..."
fi
done


# -- Remove non-functional NXSC.
# -- Install the firmware that the xone script downloads.

rm -f /usr/bin/nx-software-center
DRIVER_URL='http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab'
FIRMWARE_HASH='48084d9fa53b9bb04358f3bb127b7495dc8f7bb0b3ca1437bd24ef2b6eabdf66'

TEMP_DIR=$(mktemp -d)

# -- Remove services from default runlevel.
curl -L -o "$TEMP_DIR/driver.cab" "$DRIVER_URL" > /dev/null 2>&1
cabextract -F FW_ACC_00U.bin -d "$TEMP_DIR" "$TEMP_DIR/driver.cab" > /dev/null 2>&1
echo "$FIRMWARE_HASH $TEMP_DIR/FW_ACC_00U.bin" | sha256sum -c > /dev/null 2>&1
mv "$TEMP_DIR/FW_ACC_00U.bin" /lib/firmware/xow_dongle.bin

SERVICES=("rc.local" "ntpsec" "plymouth" "dnsmasq")

for SERVICE in "${SERVICES[@]}"; do
puts_info "Stopping and disabling $SERVICE... from OpenRC, continuing..."
# rc-service "$SERVICE" stop || puts_error "Failed to stop $SERVICE."
rc-update del "$SERVICE" || puts_error "Failed to disable $SERVICE."
done
# -- Create links for dbab lists in /etc/NetworkManager/dnsmasq.d.

create_symlink /etc/dnsmasq.d/dbab-map.adblock.conf /etc/NetworkManager/dnsmasq.d/dbab-map.adblock.conf
create_symlink /etc/dnsmasq.d/dbab-map.trashsites.conf /etc/NetworkManager/dnsmasq.d/dbab-map.trashsites.conf


puts_success "Success! misc. and configuration files have been updated, continuing..."


######################################################
# End of misc-fixes and edit-conf from iso-tool #
Expand Down
2 changes: 1 addition & 1 deletion tmp/nuts-crr
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#############################################################################################################################################################################
# The license used for this file and its contents is: BSD-3-Clause #
# #
# Copyright <2023> <Uri Herrera <[email protected]>> #
# Copyright <2023-2024> <Uri Herrera <[email protected]>> #
# #
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: #
# #
Expand Down
8 changes: 3 additions & 5 deletions tmp/nuts-cru
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#############################################################################################################################################################################
# The license used for this file and its contents is: BSD-3-Clause #
# #
# Copyright <2023> <Uri Herrera <[email protected]>> #
# Copyright <2023-2024> <Uri Herrera <[email protected]>> #
# #
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: #
# #
Expand Down Expand Up @@ -293,10 +293,8 @@ sync
puts_success "Success! Backup has been created."


# -- Download the OTA SquashFS with axel.
# -- Check if the OTA SquashFS already exists so it's not downloaded again. If an OTA file was downloaded then rename it.
# -- However, If the OTA file found doesn't match the checksum in nuts-query.info, it will still cause the utility to exit at a later stage.
# -- Use the list of mirrors from the query file, or exit if downloading the file from all mirrors fails.
# -- Download the OTA SquashFS with axel if it doesn't exist. Use the list of mirrors from the query file, or exit if downloading the file from all mirrors fails.
# -- If the OTA file exist but it doesn't match the checksum in nuts-query.info, delete it and exit.

OTA_FILE="$NUTS_DIR_DLS/nuts-ota.squashfs"

Expand Down
10 changes: 5 additions & 5 deletions tmp/nuts-query.info
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Default values for nuts-query
# nuts-query.info 2023 (c) Nitrux Latinoamericana S.C.
# nuts-query.info 2023-2024 (c) Nitrux Latinoamericana S.C.
#

# Define the minimum target for the update.
#
[RELEASE]
MINTARGET=3.4.1
MINTARGET=3.5.0

# Define the name of the file and its checksum.
#
[OTA]
OTAFILE=ota-2024.06.01-19.47-amd64.squashfs
OTASUM=ca74da0c2ff946bc57faa791120bff08
OTAFILE=ota-2024.07.08-18.41-amd64.squashfs
OTASUM=bce625810f99b8da3e3fbebcc4cdf893

# Define the list of mirrors to download the file.
# If multiple mirrors are available, separate them using commas, i.e., url1,url2,url3
#
[URL]
MIRRORLIST=https://master.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.06.01-19.47-amd64.squashfs,https://netactuate.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.06.01-19.47-amd64.squashfs,https://netix.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.06.01-19.47-amd64.squashfs,https://freefr.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.06.01-19.47-amd64.squashfs,https://phoenixnap.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.06.01-19.47-amd64.squashfs,https://ufpr.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.06.01-19.47-amd64.squashfs,https://liquidtelecom.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.06.01-19.47-amd64.squashfs,https://yer.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.06.01-19.47-amd64.squashfs,https://newcontinuum.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.06.01-19.47-amd64.squashfs,https://versaweb.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.06.01-19.47-amd64.squashfs
MIRRORLIST=https://master.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.07.08-18.41-amd64.squashfs,https://netactuate.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.07.08-18.41-amd64.squashfs,https://netix.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.07.08-18.41-amd64.squashfs,https://freefr.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.07.08-18.41-amd64.squashfs,https://phoenixnap.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.07.08-18.41-amd64.squashfs,https://ufpr.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.07.08-18.41-amd64.squashfs,https://liquidtelecom.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.07.08-18.41-amd64.squashfs,https://yer.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.07.08-18.41-amd64.squashfs,https://newcontinuum.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.07.08-18.41-amd64.squashfs,https://versaweb.dl.sourceforge.net/project/nitruxos/Updates/ota-2024.07.08-18.41-amd64.squashfs
2 changes: 1 addition & 1 deletion tmp/nuts-sup
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#############################################################################################################################################################################
# The license used for this file and its contents is: BSD-3-Clause #
# #
# Copyright <2023> <Uri Herrera <[email protected]>> #
# Copyright <2023-2024> <Uri Herrera <[email protected]>> #
# #
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: #
# #
Expand Down
2 changes: 1 addition & 1 deletion tmp/rsync-exclude.list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# List of files and directories to be excluded when using rsync.
# rsync-exclude.list 2023 (c) Nitrux Latinoamericana S.C.
# rsync-exclude.list 2023-2024 (c) Nitrux Latinoamericana S.C.

# This list is used for restore.
#
Expand Down
Loading

0 comments on commit 9ffcd99

Please sign in to comment.