- Introduce aeon-mig-firstboot to help tuneup home directories

after migration

OBS-URL: https://build.opensuse.org/package/show/devel:microos:aeon/gnome-branding-Aeon?expand=0&rev=18
This commit is contained in:
Richard Brown 2024-05-23 16:06:24 +00:00 committed by Git OBS Bridge
parent ec0a06224c
commit 403910266d
3 changed files with 65 additions and 0 deletions

55
aeon-mig-firstboot Normal file
View File

@ -0,0 +1,55 @@
#!/bin/bash
firstMSG() {
#Insert Welcome message here
zenity --info --icon=distributor-logo-Aeon-symbolic --no-wrap --title 'Welcome to openSUSE Aeon' \
--text 'Almost done, there is one last step\n\nWe need perform some checks to make\nsure your migration has gone smoothly\n\nPlease click <b>OK</b> to Continue' \
--width 300 --height 300
}
show_progress() {
(
sleep 1
echo "# Waiting for Internet connection"
until /usr/bin/curl -s --max-time 5 https://flathub.org > /dev/null; do sleep 1; done
while /usr/bin/pgrep -f '/usr/bin/flatpak|/usr/sbin/transactional-update|/usr/bin/pkexec' >/dev/null; do
echo "# Tuning Installation"
sleep 1
done
)| zenity --progress --title="Final Setup" --width=300 --pulsate --auto-close --no-cancel
}
installFlatpakRepo(){
until /usr/bin/curl -s --max-time 5 https://flathub.org > /dev/null; do sleep 1; done
/usr/bin/flatpak remote-add --user --if-not-exists flathub /usr/share/aeon/flathub.flatpakrepo
if [ "$?" != 0 ] ; then
zenity --error \
--text="Adding Flathub Repo Failed"
exit 1
fi
}
install_locale() {
pkexec sh -c "/usr/sbin/transactional-update -n run zypper -n aloc ${LANG} && /usr/sbin/transactional-update -n apply"
if [ "$?" != 0 ] ; then
zenity --error \
--text="Installing Locales Failed"
exit 1
fi
}
lastMSG() {
#Insert Welcome message here
zenity --info --icon=distributor-logo-Aeon-symbolic --no-wrap --title 'Welcome to openSUSE Aeon' \
--text 'Congratulations!\n\nYour system is ready to be used\n\nWe hope you enjoy using <b>openSUSE Aeon</b>' \
--width 300 --height 300
rm ~/.config/autostart/aeon-mig-firstboot.desktop
}
firstMSG
installFlatpakRepo &
if [[ ! "${LANG}" =~ ^en_ ]]; then
install_locale &
fi
show_progress
lastMSG

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 23 16:05:53 UTC 2024 - Richard Brown <rbrown@suse.com>
- Introduce aeon-mig-firstboot to help tuneup home directories
after migration
-------------------------------------------------------------------
Thu May 23 15:00:50 UTC 2024 - Richard Brown <rbrown@suse.com>

View File

@ -34,6 +34,7 @@ Source8: distrobox-upgrade-all.timer
Source9: 50-aeon
Source10: wallpaper-branding-Aeon.xml
Source11: 49-aeon.rules
Source12: aeon-mig-firstboot
BuildArch: noarch
BuildRequires: flatpak
BuildRequires: gio-branding-openSUSE
@ -71,6 +72,7 @@ cp -a %{SOURCE8} distrobox-upgrade-all.timer
cp -a %{SOURCE9} 50-aeon
cp -a %{SOURCE10} wallpaper-branding-Aeon.xml
cp -a %{SOURCE11} 49-aeon.rules
cp -a %{SOURCE12} aeon-mig-firstboot
%build
@ -83,6 +85,7 @@ install -d %{buildroot}%{_sysconfdir}/skel/.config/autostart
install -m0644 aeon-firstboot.desktop %{buildroot}%{_sysconfdir}/skel/.config/autostart/aeon-firstboot.desktop
install -d %{buildroot}%{_bindir}
install -m0755 aeon-firstboot %{buildroot}%{_bindir}/aeon-firstboot
install -m0755 aeon-mig-firstboot %{buildroot}%{_bindir}/aeon-mig-firstboot
install -d %{buildroot}%{_prefix}%{_sysconfdir}/transactional-update.conf.d
install -m644 50-desktop.conf %{buildroot}%{_prefix}%{_sysconfdir}/transactional-update.conf.d/50-desktop.conf
install -d %{buildroot}%{_datadir}/wallpapers
@ -120,6 +123,7 @@ install -m0444 49-aeon.rules %{buildroot}%{_datadir}/polkit-1/rules.d/49-aeon.ru
%dir %{_sysconfdir}/skel/.config/autostart
%config(noreplace) %{_sysconfdir}/skel/.config/autostart/aeon-firstboot.desktop
%{_bindir}/aeon-firstboot
%{_bindir}/aeon-mig-firstboot
%dir %{_prefix}%{_sysconfdir}/transactional-update.conf.d
%{_prefix}%{_sysconfdir}/transactional-update.conf.d/50-desktop.conf
%dir %{_datadir}/wallpapers