diff --git a/openEuler.patch b/openEuler.patch index e66178c..9506cc9 100644 --- a/openEuler.patch +++ b/openEuler.patch @@ -1,9 +1,9 @@ diff --git a/raspi-config b/raspi-config -index 4716caa..8fe1c59 100755 +index bf24fa9..c6599aa 100755 --- a/raspi-config +++ b/raspi-config -@@ -11,8 +11,8 @@ CONFIG=/boot/config.txt - USER=${SUDO_USER:-$(who -m | awk '{ print $1 }')} +@@ -12,8 +12,8 @@ USER=${SUDO_USER:-$(who -m | awk '{ print $1 }')} + INIT="$(ps --no-headers -o comm 1)" is_pi () { - ARCH=$(dpkg --print-architecture) @@ -13,7 +13,7 @@ index 4716caa..8fe1c59 100755 return 0 else return 1 -@@ -98,15 +98,18 @@ has_analog() { +@@ -117,15 +117,18 @@ has_analog() { } is_installed() { @@ -35,7 +35,7 @@ index 4716caa..8fe1c59 100755 echo $ver } -@@ -133,7 +136,7 @@ configuration of the Raspberry Pi. Although it can be run +@@ -152,7 +155,7 @@ configuration of the Raspberry Pi. Although it can be run at any time, some of the options may have difficulties if you have heavily customised your installation. @@ -44,7 +44,7 @@ index 4716caa..8fe1c59 100755 " 20 70 1 return 0 } -@@ -144,7 +147,7 @@ get_can_expand() { +@@ -163,7 +166,7 @@ get_can_expand() { PART_NUM="$(echo "$ROOT_PART" | grep -o "[[:digit:]]*$")" @@ -53,22 +53,15 @@ index 4716caa..8fe1c59 100755 echo 1 exit fi -@@ -165,19 +168,30 @@ do_expand_rootfs() { +@@ -182,14 +185,25 @@ do_expand_rootfs() { - # NOTE: the NOOBS partition layout confuses parted. For now, let's only - # agree to work with a sufficiently simple partition layout -- if [ "$PART_NUM" -ne 2 ]; then -+ if [ "$PART_NUM" -ne 3 ]; then - whiptail --msgbox "Your partition layout is not currently supported by this tool. You are probably using NOOBS, in which case your root filesystem is already expanded anyway." 20 60 2 -- return 0 -+ return -1 - fi + PART_NUM="$(echo "$ROOT_PART" | grep -o "[[:digit:]]*$")" - LAST_PART_NUM=$(parted "$ROOT_DEV" -ms unit s p | tail -n 1 | cut -f 1 -d:) + PART_INFO=$(parted "$ROOT_DEV" -ms unit s p) + + LAST_PART_NUM=$(echo "$PART_INFO" | tail -n 1 | cut -f 1 -d:) - if [ $LAST_PART_NUM -ne $PART_NUM ]; then + if [ "$LAST_PART_NUM" -ne "$PART_NUM" ]; then whiptail --msgbox "$ROOT_PART is not the last partition. Don't know how to expand" 20 60 2 - return 0 + return -1 @@ -89,7 +82,7 @@ index 4716caa..8fe1c59 100755 [ "$PART_START" ] || return 1 # Return value will likely be error for fdisk as it fails to reload the # partition table because the root fs is mounted -@@ -193,6 +207,15 @@ $PART_START +@@ -205,6 +219,15 @@ $PART_START p w EOF @@ -105,7 +98,7 @@ index 4716caa..8fe1c59 100755 ASK_TO_REBOOT=1 # now set up an init.d script -@@ -229,6 +252,7 @@ EOF +@@ -241,6 +264,7 @@ EOF if [ "$INTERACTIVE" = True ]; then whiptail --msgbox "Root partition has been resized.\nThe filesystem will be enlarged upon the next reboot" 20 60 2 fi @@ -113,7 +106,21 @@ index 4716caa..8fe1c59 100755 } set_config_var() { -@@ -407,8 +431,9 @@ do_blanking() { +@@ -397,9 +421,12 @@ do_overscan_kms() { + echo "xrandr --output HDMI-$DEV --set \"left margin\" $PIX --set \"right margin\" $PIX --set \"top margin\" $PIX --set \"bottom margin\" $PIX" >> /usr/share/ovscsetup.sh + fi + else +- echo "#!/bin/sh\nxrandr --output HDMI-$DEV --set \"left margin\" $PIX --set \"right margin\" $PIX --set \"top margin\" $PIX --set \"bottom margin\" $PIX" > /usr/share/ovscsetup.sh ++ echo -e "#!/bin/sh\nxrandr --output HDMI-$DEV --set \"left margin\" $PIX --set \"right margin\" $PIX --set \"top margin\" $PIX --set \"bottom margin\" $PIX" > /usr/share/ovscsetup.sh + fi + if ! grep -q ovscsetup /usr/share/dispsetup.sh 2> /dev/null ; then ++ if [ ! -f /usr/share/dispsetup.sh ]; then ++ echo -e "#!/bin/sh\nexit 0" > /usr/share/dispsetup.sh ++ fi + sed /usr/share/dispsetup.sh -i -e "s#exit#if [ -e /usr/share/ovscsetup.sh ] ; then\n. /usr/share/ovscsetup.sh\nfi\nexit#" + fi + if [ "$INTERACTIVE" = True ]; then +@@ -424,8 +451,9 @@ do_blanking() { CURRENT=1 fi if [ "$INTERACTIVE" = True ]; then @@ -125,7 +132,136 @@ index 4716caa..8fe1c59 100755 fi whiptail --yesno "Would you like to enable screen blanking?" $DEFAULT 20 60 2 RET=$? -@@ -807,7 +832,7 @@ clear_overclock () { +@@ -577,69 +605,74 @@ do_change_timezone() { + + get_wifi_country() { + CODE=${1:-0} +- if [ -e /etc/default/crda ]; then +- . /etc/default/crda +- elif systemctl -q is-active dhcpcd; then +- REGDOMAIN="$(wpa_cli get country | tail -n 1)" +- else +- REGDOMAIN="$(iw reg get | sed -n "0,/country/s/^country \(.\+\):.*$/\1/p")" ++ IFACE="$(list_wlan_interfaces | head -n 1)" ++ if [ -z "$IFACE" ]; then ++ if [ "$INTERACTIVE" = True ]; then ++ whiptail --msgbox "No wireless interface found" 20 60 ++ fi ++ return 1 ++ fi ++ if ! wpa_cli -i "$IFACE" status > /dev/null 2>&1; then ++ if [ "$INTERACTIVE" = True ]; then ++ whiptail --msgbox "Could not communicate with wpa_supplicant" 20 60 ++ fi ++ return 1 + fi +- if [ -z "$REGDOMAIN" ] \ +- || ! grep -q "^${REGDOMAIN}[[:space:]]" /usr/share/zoneinfo/iso3166.tab; then ++ wpa_cli -i "$IFACE" save_config > /dev/null 2>&1 ++ COUNTRY="$(wpa_cli -i "$IFACE" get country)" ++ if [ "$COUNTRY" = "FAIL" ]; then + return 1 + fi +- if [ "$CODE" = 0 ]; then +- echo "$REGDOMAIN" ++ if [ $CODE = 0 ]; then ++ echo "$COUNTRY" + fi + return 0 + } + + do_wifi_country() { +- if [ "$INTERACTIVE" = True ]; then +- value=$(sed '/^#/d' /usr/share/zoneinfo/iso3166.tab | tr '\t\n' '/') +- oIFS="$IFS" +- IFS="/" +- #shellcheck disable=2086 +- REGDOMAIN=$(whiptail --menu "Select the country in which the Pi is to be used" 20 60 10 ${value} 3>&1 1>&2 2>&3) +- IFS="$oIFS" +- else +- REGDOMAIN=$1 +- fi +- if ! grep -q "^${REGDOMAIN}[[:space:]]" /usr/share/zoneinfo/iso3166.tab; then ++ IFACE="$(list_wlan_interfaces | head -n 1)" ++ if [ -z "$IFACE" ]; then + if [ "$INTERACTIVE" = True ]; then +- whiptail --msgbox "$REGDOMAIN is not a valid ISO/IEC 3166-1 alpha2 code" 20 60 ++ whiptail --msgbox "No wireless interface found" 20 60 + fi + return 1 + fi +- if [ -e /etc/default/crda ]; then +- sed -i "s/^REGDOMAIN=.*$/REGDOMAIN=$REGDOMAIN/" /etc/default/crda +- if ! ischroot; then +- iw reg set "$REGDOMAIN" +- fi +- fi + +- IFACE="$(list_wlan_interfaces | head -n 1)" +- if [ "$INIT" = "systemd" ] && [ -n "$IFACE" ] && systemctl -q is-active dhcpcd; then +- wpa_cli -i "$IFACE" set country "$REGDOMAIN" > /dev/null 2>&1 +- wpa_cli -i "$IFACE" save_config > /dev/null 2>&1 ++ if ! wpa_cli -i "$IFACE" status > /dev/null 2>&1; then ++ if [ "$INTERACTIVE" = True ]; then ++ whiptail --msgbox "Could not communicate with wpa_supplicant" 20 60 ++ fi ++ return 1 + fi + +- if [ "$INIT" = "systemd" ] && ! ischroot && systemctl -q is-active NetworkManager; then +- nmcli radio wifi on +- elif hash rfkill 2> /dev/null; then +- rfkill unblock wifi ++ oIFS="$IFS" ++ if [ "$INTERACTIVE" = True ]; then ++ value=$(cat /usr/share/zoneinfo/iso3166.tab | tail -n +26 | tr '\t' '/' | tr '\n' '/') ++ IFS="/" ++ COUNTRY=$(whiptail --menu "Select the country in which the Pi is to be used" 20 60 10 ${value} 3>&1 1>&2 2>&3) ++ else ++ COUNTRY=$1 ++ true + fi +- if is_pi; then +- for filename in /var/lib/systemd/rfkill/*:wlan ; do +- if ! [ -e "$filename" ]; then +- continue ++ if [ $? -eq 0 ];then ++ wpa_cli -i "$IFACE" set country "$COUNTRY" ++ wpa_cli -i "$IFACE" save_config > /dev/null 2>&1 ++ if iw reg set "$COUNTRY" 2> /dev/null; then ++ ASK_TO_REBOOT=1 ++ fi ++ if hash rfkill 2> /dev/null; then ++ rfkill unblock wifi ++ if is_pi ; then ++ for filename in /var/lib/systemd/rfkill/*:wlan ; do ++ echo 0 > $filename ++ done + fi +- echo 0 > "$filename" +- done +- fi +- if [ "$INTERACTIVE" = True ]; then +- whiptail --msgbox "Wireless LAN country set to $REGDOMAIN" 20 60 1 ++ fi ++ if [ "$INTERACTIVE" = True ]; then ++ whiptail --msgbox "Wireless LAN country set to $COUNTRY" 20 60 1 ++ fi + fi ++ IFS=$oIFS + } + + get_hostname() { +@@ -664,7 +697,7 @@ No other symbols, punctuation characters, or blank spaces are permitted.\ + true + fi + if [ "$?" -eq 0 ]; then +- if [ "$INIT" = "systemd" ] && systemctl -q is-active dbus && ! ischroot; then ++ if [ "$INIT" = "systemd" ] && systemctl -q is-active dbus; then + hostnamectl set-hostname "$NEW_HOSTNAME" 2> /dev/null + else + echo "$NEW_HOSTNAME" > /etc/hostname +@@ -826,7 +859,7 @@ clear_overclock () { } get_ssh() { @@ -134,7 +270,7 @@ index 4716caa..8fe1c59 100755 echo 1 else echo 0 -@@ -833,12 +858,12 @@ do_ssh() { +@@ -852,12 +885,12 @@ do_ssh() { fi if [ $RET -eq 0 ]; then ssh-keygen -A && @@ -151,7 +287,7 @@ index 4716caa..8fe1c59 100755 STATUS=disabled else return $RET -@@ -849,7 +874,7 @@ do_ssh() { +@@ -868,7 +901,7 @@ do_ssh() { } get_vnc() { @@ -160,7 +296,7 @@ index 4716caa..8fe1c59 100755 echo 0 else echo 1 -@@ -861,33 +886,39 @@ do_vnc() { +@@ -880,33 +913,39 @@ do_vnc() { if [ $(get_vnc) -eq 0 ]; then DEFAULT= fi @@ -209,7 +345,17 @@ index 4716caa..8fe1c59 100755 fi } -@@ -1389,6 +1420,9 @@ do_boot_behaviour() { +@@ -1095,8 +1134,7 @@ disable_raspi_config_at_boot() { + } + + get_boot_cli() { +- if [ "$(basename $(readlink -f /etc/systemd/system/default.target))" = graphical.target ] \ +- && systemctl is-enabled lightdm > /dev/null 2>&1; then ++ if [ "$(systemctl get-default)" = graphical.target ] && systemctl is-enabled lightdm > /dev/null 2>&1; then + echo 1 + else + echo 0 +@@ -1409,6 +1447,9 @@ do_boot_behaviour() { ;; B2*) systemctl --quiet set-default multi-user.target @@ -219,7 +365,7 @@ index 4716caa..8fe1c59 100755 cat > /etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF [Service] ExecStart= -@@ -1396,19 +1430,22 @@ ExecStart=-/sbin/agetty --autologin $USER --noclear %I \$TERM +@@ -1416,19 +1457,22 @@ ExecStart=-/sbin/agetty --autologin $USER --noclear %I \$TERM EOF ;; B3*) @@ -245,7 +391,7 @@ index 4716caa..8fe1c59 100755 cat > /etc/systemd/system/getty@tty1.service.d/autologin.conf << EOF [Service] ExecStart= -@@ -1417,7 +1454,7 @@ EOF +@@ -1437,7 +1481,7 @@ EOF sed /etc/lightdm/lightdm.conf -i -e "s/^\(#\|\)autologin-user=.*/autologin-user=$USER/" disable_raspi_config_at_boot else @@ -254,7 +400,7 @@ index 4716caa..8fe1c59 100755 return 1 fi ;; -@@ -1716,7 +1753,7 @@ EOF +@@ -1738,7 +1782,7 @@ EOF } get_camera() { @@ -263,7 +409,7 @@ index 4716caa..8fe1c59 100755 CAM=$(get_config_var start_x $CONFIG) if [ $CAM -eq 1 ]; then echo 0 -@@ -1738,7 +1775,7 @@ get_camera() { +@@ -1760,7 +1804,7 @@ get_camera() { } do_camera() { @@ -272,7 +418,7 @@ index 4716caa..8fe1c59 100755 whiptail --msgbox "Your firmware appears to be out of date (no start_x.elf). Please update" 20 60 2 return 1 fi -@@ -1761,7 +1798,7 @@ do_camera() { +@@ -1783,7 +1827,7 @@ do_camera() { ASK_TO_REBOOT=1 fi if [ $RET -eq 0 ]; then @@ -281,7 +427,7 @@ index 4716caa..8fe1c59 100755 set_config_var start_x 1 $CONFIG CUR_GPU_MEM=$(get_config_var gpu_mem $CONFIG) if [ -z "$CUR_GPU_MEM" ] || [ "$CUR_GPU_MEM" -lt 128 ]; then -@@ -1772,7 +1809,7 @@ do_camera() { +@@ -1794,7 +1838,7 @@ do_camera() { fi STATUS=enabled elif [ $RET -eq 1 ]; then @@ -290,7 +436,7 @@ index 4716caa..8fe1c59 100755 set_config_var start_x 0 $CONFIG sed $CONFIG -i -e "s/^start_file/#start_file/" else -@@ -1890,19 +1927,19 @@ do_legacy() { +@@ -1912,19 +1956,19 @@ do_legacy() { } do_gldriver() { @@ -323,7 +469,7 @@ index 4716caa..8fe1c59 100755 GLOPT=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "GL Driver" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT \ "G1 Legacy" "Original non-GL desktop driver" \ "G2 GL (Full KMS)" "OpenGL desktop driver with full KMS" \ -@@ -2044,6 +2081,7 @@ do_net_names () { +@@ -2153,6 +2197,7 @@ do_net_names () { rm -f /etc/systemd/network/73-usb-net-by-mac.link STATUS=enabled elif [ $RET -eq 1 ]; then @@ -331,7 +477,7 @@ index 4716caa..8fe1c59 100755 ln -sf /dev/null /etc/systemd/network/99-default.link ln -sf /dev/null /etc/systemd/network/73-usb-net-by-mac.link STATUS=disabled -@@ -2056,8 +2094,8 @@ do_net_names () { +@@ -2165,8 +2210,8 @@ do_net_names () { } do_update() { @@ -342,13 +488,34 @@ index 4716caa..8fe1c59 100755 printf "Sleeping 5 seconds before reloading raspi-config\n" && sleep 5 && exec raspi-config -@@ -2270,6 +2308,63 @@ list_wlan_interfaces() { - done - } - +@@ -2211,7 +2256,7 @@ do_audio() { + if [ "$INTERACTIVE" = True ]; then + n=0 + array="" +- while [ $n -le 9 ]] ++ while [ $n -le 9 ] + do + CARD=$(LC_ALL=C aplay -l | grep "card $n" | cut -d [ -f 2 | cut -d ] -f 1) + if [ -z "$CARD" ] ; then +@@ -2377,12 +2422,69 @@ EOF + list_wlan_interfaces() { + for dir in /sys/class/net/*/wireless; do + if [ -d "$dir" ]; then +- IFACE="$(basename "$(dirname "$dir")")" +- if wpa_cli -i "$IFACE" status > /dev/null 2>&1; then +- echo "$IFACE" +- fi ++ basename "$(dirname "$dir")" ++ # IFACE="$(basename "$(dirname "$dir")")" ++ # if wpa_cli -i "$IFACE" status > /dev/null 2>&1; then ++ # echo "$IFACE" ++ # fi ++ fi ++ done ++} ++ +do_wifi_ssid_passphrase_nmcli() { -+ IFACE_LIST="$(list_wlan_interfaces)" -+ IFACE="$(echo "$IFACE_LIST" | head -n 1)" ++ IFACE="$(list_wlan_interfaces | head -n 1)" + + if [ -z "$IFACE" ]; then + if [ "$INTERACTIVE" = True ]; then @@ -374,8 +541,8 @@ index 4716caa..8fe1c59 100755 + return 0 + else + break -+ fi -+ done + fi + done + + # Escape special characters for embedding in regex below + local ssid="$(echo "$SSID" \ @@ -401,12 +568,10 @@ index 4716caa..8fe1c59 100755 + whiptail --msgbox "Connect to $SSID failed, try nmtui." 20 60 + fi + return $RET -+} -+ + } + do_wifi_ssid_passphrase() { - RET=0 - IFACE_LIST="$(list_wlan_interfaces)" -@@ -2747,8 +2842,8 @@ do_proxy() { +@@ -2883,8 +2985,8 @@ do_proxy() { sed -i "/^export ${SCHEME}_/Id" /etc/profile.d/proxy.sh fi if [ "${SCHEME#*http}" != "$SCHEME" ]; then @@ -417,7 +582,7 @@ index 4716caa..8fe1c59 100755 fi fi if [ -z "$ADDRESS" ]; then -@@ -2762,7 +2857,7 @@ do_proxy() { +@@ -2898,7 +3000,7 @@ do_proxy() { echo "export ${SCHEME}_proxy=\"$ADDRESS\"" >> /etc/profile.d/proxy.sh fi if [ "${SCHEME#*http}" != "$SCHEME" ]; then @@ -426,7 +591,7 @@ index 4716caa..8fe1c59 100755 fi done if [ "$INTERACTIVE" = True ]; then -@@ -2793,7 +2888,9 @@ do +@@ -2929,7 +3031,9 @@ do --expand-rootfs) INTERACTIVE=False do_expand_rootfs @@ -437,7 +602,7 @@ index 4716caa..8fe1c59 100755 exit 0 ;; --apply-os-config) -@@ -2839,8 +2936,8 @@ do_system_menu() { +@@ -2975,8 +3079,8 @@ do_system_menu() { "S3 Password" "Change password for the '$USER' user" \ "S4 Hostname" "Set name for this computer on a network" \ "S5 Boot / Auto Login" "Select boot into desktop or to command line" \ @@ -448,7 +613,7 @@ index 4716caa..8fe1c59 100755 "S8 Power LED" "Set behaviour of power LED" \ 3>&1 1>&2 2>&3) elif is_live ; then -@@ -2849,7 +2946,7 @@ do_system_menu() { +@@ -2985,7 +3089,7 @@ do_system_menu() { "S3 Password" "Change password for the '$USER' user" \ "S4 Hostname" "Set name for this computer on a network" \ "S5 Boot / Auto Login" "Select boot into desktop or to command line" \ @@ -457,7 +622,7 @@ index 4716caa..8fe1c59 100755 3>&1 1>&2 2>&3) else FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "System Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ -@@ -2857,8 +2954,8 @@ do_system_menu() { +@@ -2993,8 +3097,8 @@ do_system_menu() { "S3 Password" "Change password for the '$USER' user" \ "S4 Hostname" "Set name for this computer on a network" \ "S5 Boot / Auto Login" "Select boot into desktop or to command line" \ @@ -468,7 +633,7 @@ index 4716caa..8fe1c59 100755 3>&1 1>&2 2>&3) fi RET=$? -@@ -2866,7 +2963,7 @@ do_system_menu() { +@@ -3002,7 +3106,7 @@ do_system_menu() { return 0 elif [ $RET -eq 0 ]; then case "$FUN" in @@ -477,7 +642,7 @@ index 4716caa..8fe1c59 100755 S2\ *) do_audio ;; S3\ *) do_change_pass ;; S4\ *) do_hostname ;; -@@ -2935,7 +3032,7 @@ do_interface_menu() { +@@ -3071,7 +3175,7 @@ do_interface_menu() { FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Interfacing Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ "I1 Legacy Camera" "Enable/disable legacy camera support" \ "I2 SSH" "Enable/disable remote command line access using SSH" \ @@ -486,7 +651,7 @@ index 4716caa..8fe1c59 100755 "I4 SPI" "Enable/disable automatic loading of SPI kernel module" \ "I5 I2C" "Enable/disable automatic loading of I2C kernel module" \ "I6 Serial Port" "Enable/disable shell messages on the serial connection" \ -@@ -2969,7 +3066,7 @@ do_performance_menu() { +@@ -3105,7 +3209,7 @@ do_performance_menu() { FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Performance Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ "P1 Overclock" "Configure CPU overclocking" \ "P2 GPU Memory" "Change the amount of memory made available to the GPU" \ @@ -495,7 +660,7 @@ index 4716caa..8fe1c59 100755 "P4 Fan" "Set behaviour of GPIO fan" \ 3>&1 1>&2 2>&3) RET=$? -@@ -3011,7 +3108,7 @@ do_advanced_menu() { +@@ -3147,41 +3251,41 @@ do_advanced_menu() { if is_pifour ; then FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Advanced Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ "A1 Expand Filesystem" "Ensures that all of the SD card is available" \ @@ -504,7 +669,13 @@ index 4716caa..8fe1c59 100755 "A4 Network Interface Names" "Enable/disable predictable network i/f names" \ "A5 Network Proxy Settings" "Configure network proxy settings" \ "A6 Boot Order" "Choose network or USB device boot" \ -@@ -3021,19 +3118,19 @@ do_advanced_menu() { + "A7 Bootloader Version" "Select latest or default boot ROM software" \ +- "A9 Wayland" "Enable experimental Wayland backend" \ +- "AA Network Config" "Set network configuration tool" \ ++ `# "A9 Wayland" "Enable experimental Wayland backend"` \ ++ `# "AA Network Config" "Set network configuration tool"` \ + 3>&1 1>&2 2>&3) + elif is_pi ; then if is_kms; then FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Advanced Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ "A1 Expand Filesystem" "Ensures that all of the SD card is available" \ @@ -515,7 +686,11 @@ index 4716caa..8fe1c59 100755 "A4 Network Interface Names" "Enable/disable predictable network i/f names" \ "A5 Network Proxy Settings" "Configure network proxy settings" \ - "A8 Glamor" "Enable/disable glamor graphics acceleration" \ +- "A9 Wayland" "Enable experimental Wayland backend" \ +- "AA Network Config" "Set network configuration tool" \ + `# "A8 Glamor" "Enable/disable glamor graphics acceleration"` \ ++ `# "A9 Wayland" "Enable experimental Wayland backend"` \ ++ `# "AA Network Config" "Set network configuration tool"` \ 3>&1 1>&2 2>&3) else FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Advanced Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ @@ -525,20 +700,30 @@ index 4716caa..8fe1c59 100755 "A4 Network Interface Names" "Enable/disable predictable network i/f names" \ "A5 Network Proxy Settings" "Configure network proxy settings" \ - "A8 Glamor" "Enable/disable glamor graphics acceleration" \ +- "AA Network Config" "Set network configuration tool" \ + `# "A8 Glamor" "Enable/disable glamor graphics acceleration"` \ ++ `# "AA Network Config" "Set network configuration tool"` \ 3>&1 1>&2 2>&3) fi else -@@ -3056,7 +3153,7 @@ do_advanced_menu() { - A7\ *) do_boot_rom ;; - A8\ *) do_glamor ;; + FUN=$(whiptail --title "Raspberry Pi Software Configuration Tool (raspi-config)" --menu "Advanced Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT --cancel-button Back --ok-button Select \ + "A4 Network Interface Names" "Enable/disable predictable network i/f names" \ + "A5 Network Proxy Settings" "Configure network proxy settings" \ +- "AA Network Config" "Set network configuration tool" \ ++ `# "AA Network Config" "Set network configuration tool"` \ + 3>&1 1>&2 2>&3) + fi + RET=$? +@@ -3200,7 +3304,7 @@ do_advanced_menu() { + A9\ *) do_wayland ;; + AA\ *) do_netconf ;; *) whiptail --msgbox "Programmer error: unrecognized option" 20 60 1 ;; - esac || whiptail --msgbox "There was an error running option $FUN" 20 60 1 + esac || [ $? -eq 2 ] || whiptail --msgbox "There was an error running option $FUN" 20 60 1 fi } -@@ -3093,17 +3190,17 @@ if [ "$INTERACTIVE" = True ]; then +@@ -3237,17 +3341,17 @@ if [ "$INTERACTIVE" = True ]; then calc_wt_size while [ "$USER" = "root" ] || [ -z "$USER" ]; do if ! USER=$(whiptail --inputbox "raspi-config could not determine the default user.\\n\\nWhat user should these settings apply to?" 20 60 pi 3>&1 1>&2 2>&3); then @@ -559,7 +744,7 @@ index 4716caa..8fe1c59 100755 "6 Advanced Options" "Configure advanced settings" \ "8 Update" "Update this tool to the latest version" \ "9 About raspi-config" "Information about this configuration tool" \ -@@ -3113,7 +3210,7 @@ if [ "$INTERACTIVE" = True ]; then +@@ -3257,7 +3361,7 @@ if [ "$INTERACTIVE" = True ]; then "1 System Options" "Configure system settings" \ "2 Display Options" "Configure display settings" \ "3 Interface Options" "Configure connections to peripherals" \ diff --git a/raspi-config-408bde537671de6df2d9b91564e67132f98ffa71.tar.gz b/raspi-config-408bde537671de6df2d9b91564e67132f98ffa71.tar.gz new file mode 100644 index 0000000..c532c61 Binary files /dev/null and b/raspi-config-408bde537671de6df2d9b91564e67132f98ffa71.tar.gz differ diff --git a/raspi-config-d3fe4e7058dfaa616aa8a4bb053c31c8d59c0135.tar.gz b/raspi-config-d3fe4e7058dfaa616aa8a4bb053c31c8d59c0135.tar.gz deleted file mode 100644 index 09232ec..0000000 Binary files a/raspi-config-d3fe4e7058dfaa616aa8a4bb053c31c8d59c0135.tar.gz and /dev/null differ diff --git a/raspi-config.spec b/raspi-config.spec index 7e2dd6d..81907ba 100644 --- a/raspi-config.spec +++ b/raspi-config.spec @@ -4,12 +4,12 @@ %global _share_path /usr/share/raspi-config %global _service_path /etc/init.d %global _proxy_path /etc/sudoers.d -%global _systemd_path /etc/systemd/system -%global commitid d3fe4e7058dfaa616aa8a4bb053c31c8d59c0135 +%global _etc_path /etc/default +%global commitid 408bde537671de6df2d9b91564e67132f98ffa71 %global debug_package %{nil} Name: raspi-config -Version: 20220323 +Version: 20230320 Release: 1 Summary: Raspberry Pi configuration tool License: MIT @@ -41,16 +41,16 @@ mkdir -p %{buildroot}%{_doc_path} mkdir -p %{buildroot}%{_share_path} mkdir -p %{buildroot}%{_service_path} mkdir -p %{buildroot}%{_proxy_path} -mkdir -p %{buildroot}%{_systemd_path} +mkdir -p %{buildroot}%{_etc_path} cd %{name}-%{commitid} +install -p -m 644 etc/default/cpu_governor %{buildroot}%{_etc_path}/ install -p -m 755 usr/lib/raspi-config/cmstart.sh %{buildroot}%{_lib_path}/ install -p -m 755 raspi-config %{buildroot}%{_bin_path}/ install -p -m 755 debian/raspi-config.init %{buildroot}%{_service_path}/raspi-config install -p -m 644 debian/changelog %{buildroot}%{_doc_path}/ install -p -m 644 usr/share/raspi-config/10-blanking.conf %{buildroot}%{_share_path}/ install -p -m 440 etc/sudoers.d/010_proxy %{buildroot}%{_proxy_path}/ -install -p -m 644 autologin@.service %{buildroot}%{_systemd_path}/ cd - @@ -61,9 +61,15 @@ cd - %{_bin_path}/* %{_service_path}/* %{_proxy_path}/* -%{_systemd_path}/* +%{_etc_path}/* %changelog +* Mon Mar 20 2023 Yafen Fang - 20230320-1 +- update to upstream's last commit (408bde537671de6df2d9b91564e67132f98ffa71): do_wifi_ssid_passphrase: set scan_ssid on hidden network in dhcpcd case +- adjust for openEuler +- disable A9 Wayland and AA Network Config +- remove legacy autologin cruft + * Wed Mar 23 2022 Yafen Fang - 20220323-1 - update to upstream's last commit (d3fe4e7058dfaa616aa8a4bb053c31c8d59c0135): Fix incorrect detection of read-only boot partition - adjust for openEuler