diff --git a/overlay/etc/adduser.conf b/overlay/etc/adduser.conf new file mode 100644 index 0000000..8bca3bf --- /dev/null +++ b/overlay/etc/adduser.conf @@ -0,0 +1,92 @@ +# /etc/adduser.conf: `adduser' configuration. +# See adduser(8) and adduser.conf(5) for full documentation. + +# A commented out setting indicates that this is the default in the +# code. If you need to change those settings, remove the comment and +# make your intended change. + +# The DSHELL variable specifies the default login shell on your +# system. +#DSHELL=/bin/bash + +# The DHOME variable specifies the directory containing users' home +# directories. +#DHOME=/home + +# If GROUPHOMES is "yes", then the home directories will be created as +# /home/groupname/user. +#GROUPHOMES=no + +# If LETTERHOMES is "yes", then the created home directories will have +# an extra directory - the first letter of the user name. For example: +# /home/u/user. +#LETTERHOMES=no + +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +#SKEL=/etc/skel + +# FIRST_SYSTEM_[GU]ID to LAST_SYSTEM_[GU]ID inclusive is the range for UIDs +# for dynamically allocated administrative and system accounts/groups. +# Please note that system software, such as the users allocated by the base-passwd +# package, may assume that UIDs less than 100 are unallocated. +#FIRST_SYSTEM_UID=100 +#LAST_SYSTEM_UID=999 + +#FIRST_SYSTEM_GID=100 +#LAST_SYSTEM_GID=999 + +# FIRST_[GU]ID to LAST_[GU]ID inclusive is the range of UIDs of dynamically +# allocated user accounts/groups. +#FIRST_UID=1000 +#LAST_UID=59999 + +#FIRST_GID=1000 +#LAST_GID=59999 + +# The USERGROUPS variable can be either "yes" or "no". If "yes" each +# created user will be given their own group to use as a default. If +# "no", each created user will be placed in the group whose gid is +# USERS_GID (see below). +#USERGROUPS=yes + +# If USERGROUPS is "no", then USERS_GID should be the GID of the group +# `users' (or the equivalent group) on your system. +#USERS_GID=100 + +# If DIR_MODE is set, directories will be created with the specified +# mode. Otherwise the default mode 0755 will be used. +#DIR_MODE=0750 + +# If SETGID_HOME is "yes" home directories for users with their own +# group the setgid bit will be set. This was the default for +# versions << 3.13 of adduser. Because it has some bad side effects we +# no longer do this per default. If you want it nevertheless you can +# still set it here. +#SETGID_HOME=no + +# If QUOTAUSER is set, a default quota will be set from that user with +# `edquota -p QUOTAUSER newuser' +#QUOTAUSER="" + +# If SKEL_IGNORE_REGEX is set, adduser will ignore files matching this +# regular expression when creating a new home directory +#SKEL_IGNORE_REGEX="(dpkg|ucf)-(old|new|dist|save)" + +# Set this if you want the --add_extra_groups option to adduser to add +# new users to other groups. +# This is the list of groups that new non-system users will be added to +# Default: +EXTRA_GROUPS="dialout cdrom floppy audio video plugdev users" + +# If ADD_EXTRA_GROUPS is set to something non-zero, the EXTRA_GROUPS +# option above will be default behavior for adding new, non-system users +ADD_EXTRA_GROUPS=1 + +# check user and group names also against this regular expression. +#NAME_REGEX="^[a-z][-a-z0-9_]*$" + +# use extrausers by default +#USE_EXTRAUSERS=1 +DIR_MODE=0750 diff --git a/overlay/etc/skel/.navit/navit.xml b/overlay/etc/skel/.navit/navit.xml new file mode 100644 index 0000000..f5c2f41 --- /dev/null +++ b/overlay/etc/skel/.navit/navit.xml @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Main menu + Actions + Show +Map + Settings + Tools + Route + About + Quit + + Actions + Bookmarks + Former +Destinations + + + Town + Coordinates + Stop +Navigation + + Settings + Display + Maps + + Vehicle + + Rules + + Display + + Layout + Fullscreen + Window Mode + 3D + 2D + Auto zoom + Manual zoom + Layers + + Tools + Show Locale + Network info + + Route + Zoom to route + Description + Height Profile + Waypoints + Drop last +Waypoint + Drop next +Waypoint + + Map Point + + + Layout + + + Maps + + + Layers + + + Vehicle + + + + + + Satellite Status + + + NMEA Data + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scripts/configure-user.sh b/scripts/configure-user.sh index 972948b..785551c 100755 --- a/scripts/configure-user.sh +++ b/scripts/configure-user.sh @@ -2,6 +2,7 @@ # # Author : Gaston Gonzalez # Date : 16 March 2024 +# Updated : 1 October 2024 # Purpose : Configure users set -e @@ -9,3 +10,6 @@ et-log "Configuring users" cp -r ../overlay/etc/skel /etc/ [ ! -e /etc/skel/Desktop ] && mkdir /etc/skel/Desktop + +et-log "Add all users to dialout group" +cp -v -r ../overlay/etc/adduser.conf /etc/ diff --git a/scripts/install-gps.sh b/scripts/install-gps.sh new file mode 100755 index 0000000..5c1a7f7 --- /dev/null +++ b/scripts/install-gps.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Author : Gaston Gonzalez +# Date : 1 October 2022 +# Purpose : Configure GPS +set -e + +et-log "Installing GPS packages and dependencies..." +apt install gpsd gpsd-clients at -y + +et-log "Installing gpsd config..." +cp ../overlay/etc/default/gpsd /etc/default/ + +et-log "Updating gpsd systemd script..." +cp ../overlay/lib/systemd/system/gpsd.service /lib/systemd/system/ +systemctl daemon-reload +systemctl enable gpsd diff --git a/scripts/install-navit.sh b/scripts/install-navit.sh new file mode 100755 index 0000000..99fe063 --- /dev/null +++ b/scripts/install-navit.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 1 October 2024 +# Purpose : Navit installer for EmComm Tools +# +# The Navit package is broken in the Ubuntu repository. The following installation is based +# on a fixed reported in https://github.com/navit-gps/navit/issues/1228 + +apt install \ + navit \ + navit-gui-gtk \ + navit-graphics-gtk-drawing-area \ + maptool \ + espeak-ng \ + -y + +missing_layout_files=( + "navit_layout_bike_shipped.xml" + "navit_layout_car_android_shipped.xml" + "navit_layout_car_dark_shipped.xml" + "navit_layout_car_generatedarkxml.sh" + "navit_layout_car_shipped.xml" + "navit_layout_car_simple_shipped.xml" + "navit_layout_th_shipped.xml" +) + +echo "Patching broken Navit apt installation..." +TARGET_DIR=/usr/share/navit +for file in "${missing_layout_files[@]}" +do + curl -s -f -L -O https://raw.githubusercontent.com/navit-gps/navit/trunk/navit/${file} + mv -v ${file} "${TARGET_DIR}/${file}" +done + +# Delete types that have errors +sed -i -e '/item_types="cliff,embankment"/,+7d' ${TARGET_DIR}/navit_layout_car_shipped.xml + +# Copy arizona.bin to ~/.navit/maps diff --git a/scripts/install-udev.sh b/scripts/install-udev.sh new file mode 100755 index 0000000..67834d6 --- /dev/null +++ b/scripts/install-udev.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 1 October 2024 +# Purpose : Install udev rules for CAT, GPS and audio PnP support +set -e + +et-log "Installing udev rules..." +cp -v ../overlay/etc/udev/rules.d/*.rules /etc/udev/rules.d/ +udevadm control --reload + +et-log "Disable brltty.." +systemctl mask brltty-udev.service +systemctl stop brltty-udev.service diff --git a/scripts/install.sh b/scripts/install.sh index 04a1300..765aba2 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -2,7 +2,7 @@ # # Author : Gaston Gonzalez # Date : 16 March 2024 -# Updated : 19 May 2024 +# Updated : 1 October 2024 # Purpose : Main installer for EmComm Tools OS Community . ./env.sh @@ -26,3 +26,7 @@ exitIfNotRoot ./install-hamlib.sh ./install-js8call.sh + +./install-udev.sh +./install-gps.sh +./install-navit.sh