%define liveuser_uid 999 %define lpadmin_uid 65032 %define lpadmin_gid 65032 Name: livecd-tools Version: 2.9.94 Release: 1mamba Summary: Live cd environment and utilities Group: System/Tools Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://gitlab.mambasoft.it/openmamba/livecd-tools Source0: http://gitlab.mambasoft.it/openmamba/livecd-tools.git/v%{version}/%{name}-%{version}.tar.bz2 #Source1: qiuser-home.tar.bz2 Source2: %{name}-Autostart-setkeyboard License: GPL ## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-END Requires(pre): rpm Requires(pre): udev Requires(post):sudo Requires(post):system-base-openmamba Requires(post):desktop-base-openmamba Requires(pre): postplug Requires: calamares Requires: calamares-config-openmamba %ifarch %{ix86} x86_64 Requires: grub Requires: grub-efi-x86_64 %endif Requires: live-user-environment BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %description Live cd utilities: - configurare a default user ('liveuser') for live environment - installer: openmamba installation tool - eject_cd.sh: forces CD eject for livecd shutdown %package -n live-user-environment Summary: Configure a default user ('liveuser') for live environment Group: System/Configuration Requires(post):sudo Requires(post):system-base-openmamba Requires(post):desktop-base-openmamba Requires: systemd %description -n live-user-environment Configure a default user ('liveuser') for live environment. %package -n calamares-config-openmamba Summary: Calamares installer configuration for the openmamba distribution Group: System/Configuration Requires: calamares %description -n calamares-config-openmamba Calamares installer configuration for the openmamba distribution. %prep %setup -q %build %make %install %makeinstall \ libdir=%{_libdir} %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %pre -n live-user-environment if [ $1 -eq 1 ]; then # add lpadmin user if cups is not installed before /usr/sbin/groupadd lpadmin -g %{lpadmin_gid} &>/dev/null /usr/sbin/useradd lpadmin -c "Cups printing daemon" -d /dev/null \ -s /bin/false -u %{lpadmin_uid} -g %{lpadmin_gid} &>/dev/null # add default liveuser user useradd liveuser \ -c "Live User" \ -G audio,filesharing,sysadmin,lpadmin,video,nopermfs,packager \ -u %{liveuser_uid} [ -e /home/liveuser ] || cp -a /etc/skel /home/liveuser fi : %post -n live-user-environment if [ $1 -eq 1 ]; then chmod 711 /home/liveuser mkdir /home/liveuser/Desktop/ ## configure for cd eject at halt/reboot # sed -i -e '/halt .*/i \ # /sbin/eject_cd.sh 2>&1 >/dev/null' /etc/init.d/halt # sed -i -e '/reboot .*/i \ # /sbin/eject_cd.sh 2>&1 >/dev/null' /etc/init.d/reboot chown -R liveuser.users /home/liveuser fi : %postun -n live-user-environment if [ $1 -eq 0 ]; then userdel -r -f liveuser # Unconfigure KDM for autologin if [ -e /opt/kde/share/config/kdm/kdmrc -a \ "`grep AutoLoginUser=liveuser /opt/kde/share/config/kdm/kdmrc`" ]; then sed -i 's|^AutoLoginUser=liveuser|#AutoLoginUser=|' \ /opt/kde/share/config/kdm/kdmrc sed -i 's|^AutoLoginEnable=true|#AutoLoginEnable=true|' \ /opt/kde/share/config/kdm/kdmrc fi # Unconfigure LXDM for autologin [ -e /etc/lxdm/lxdm.conf ] && sed -i "s|^autologin=liveuser|# autologin=|" \ /etc/lxdm/lxdm.conf # Unconfigure GDM for autologin if [ -e /etc/gdm/custom.conf -a -e /etc/gdm/custom.conf.livesave ]; then mv /etc/gdm/custom.conf.livesave /etc/gdm/custom.conf fi fi #%if "%{stage1}" != "1" # sed -i /eject_cd.sh/d $MOUNTPOINT/etc/init.d/halt # sed -i /eject_cd.sh/d $MOUNTPOINT/etc/init.d/reboot #%endif : %posttrans -n live-user-environment gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null if [ $1 -eq 1 ]; then # Configure KDM for autologin if [ -e /opt/kde/share/config/kdm/kdmrc ]; then sed -i 's|[#]*AutoLoginEnable=.*|AutoLoginEnable=true|' \ /opt/kde/share/config/kdm/kdmrc sed -i 's|[#]*AutoReLogin=.*|AutoReLogin=true|' \ /opt/kde/share/config/kdm/kdmrc sed -i 's|[#]*AutoLoginUser=.*|AutoLoginUser=liveuser|' \ /opt/kde/share/config/kdm/kdmrc fi # Configure LXDM for autologin [ -e /etc/lxdm/lxdm.conf ] && sed -i "s|# autologin.*|autologin=liveuser|" \ /etc/lxdm/lxdm.conf # Configure GDM for autologin if [ -e /etc/gdm/custom.conf ]; then mv /etc/gdm/custom.conf /etc/gdm/custom.conf.livesave cat > /etc/gdm/custom.conf << _EOF [daemon] AutomaticLoginEnable=true AutomaticLogin=liveuser _EOF fi fi : %files %defattr(-,root,root) %{_datadir}/applications/openmamba-installer.desktop %{_datadir}/icons/hicolor/*/apps/installer.png %files -n calamares-config-openmamba %defattr(-,root,root) %dir %{_sysconfdir}/calamares %{_sysconfdir}/calamares/settings.conf %dir %{_sysconfdir}/calamares/branding %dir %{_sysconfdir}/calamares/branding/openmamba %{_sysconfdir}/calamares/branding/openmamba/* %dir %{_sysconfdir}/calamares/modules %{_sysconfdir}/calamares/modules/*.conf %dir %{_libdir}/calamares/modules/openmamba-postinstall %{_libdir}/calamares/modules/openmamba-postinstall/main.py %{_libdir}/calamares/modules/openmamba-postinstall/module.desc %files -n live-user-environment %defattr(-,root,root) %{_sysconfdir}/systemd/system/autovt@.service %attr(0440,root,root) %{_sysconfdir}/sudoers.d/liveuser %attr(-,liveuser,users) %dir /home/liveuser/.kde4 %attr(-,liveuser,users) %dir /home/liveuser/.kde4/share %attr(-,liveuser,users) %dir /home/liveuser/.kde4/share/config %attr(-,liveuser,users) /home/liveuser/.kde4/share/config/* %changelog * Sun Aug 16 2015 Silvan Calarco 2.9.94-1mamba - update to 2.9.94 * Sun Aug 16 2015 Silvan Calarco 2.9.93-2mamba - added calamares-config-openmamba subpackage * Thu Apr 30 2015 Silvan Calarco 2.9.93-1mamba - update to 2.9.93 * Thu Apr 09 2015 Silvan Calarco 2.9.92-2mamba - live-user-environment: don't create openmamba-installer link on desktop * Sat Mar 14 2015 Silvan Calarco 2.9.92-1mamba - update to 2.9.92 - move liveuser environment apart to live-user-environment subpackage * Sun Feb 22 2015 Silvan Calarco 2.9.91-1mamba - update to 2.9.91 * Sun Feb 22 2015 Silvan Calarco 2.9.90-1mamba - update to 2.9.90 * Fri Feb 20 2015 Silvan Calarco 2.9.0-2mamba - configure and unconfigure liveuser for autologin in posttran script * Thu Feb 19 2015 Silvan Calarco 2.9.0-1mamba - update to 2.9.0 * Sun Feb 15 2015 Silvan Calarco 2.8.2-1mamba - update to 2.8.2 * Sat Feb 07 2015 Silvan Calarco 2.8.1-1mamba - update to 2.8.1 - require calamares * Sun Jan 25 2015 Silvan Calarco 2.8.0-1mamba - update to 2.8.0 * Sat Jan 17 2015 Silvan Calarco 2.7.9-1mamba - update to 2.7.9 * Fri Sep 12 2014 Silvan Calarco 2.7.8-2mamba - fix previous tarball release error * Sat Aug 30 2014 Silvan Calarco 2.7.8-1mamba - update to 2.7.8 * Fri Aug 08 2014 Silvan Calarco 2.7.7-1mamba - update to 2.7.7 * Wed Jun 25 2014 Silvan Calarco 2.7.6-1mamba - update to 2.7.6 * Thu Jun 12 2014 Silvan Calarco 2.7.5-1mamba - update to 2.7.5 * Sat Apr 05 2014 Silvan Calarco 2.7.4-1mamba - update to 2.7.4 * Wed Apr 02 2014 Silvan Calarco 2.7.3-1mamba - update to 2.7.3 * Sun Jun 30 2013 Silvan Calarco 2.7.2-2mamba - %post, %postun: remove pre-systemd edit of halt and reboot to enable cd eject; eject needs to be reimplemented with systemd * Fri Jun 28 2013 Silvan Calarco 2.7.2-1mamba - update to 2.7.2 * Wed Jun 12 2013 Silvan Calarco 2.7.1-1mamba - update to 2.7.1 * Wed Jun 12 2013 Silvan Calarco 2.7.0-1mamba - update to 2.7.0 * Sat May 25 2013 Silvan Calarco 2.6.2-1mamba - update to 2.6.2 * Sun Apr 14 2013 Silvan Calarco 2.6.1-1mamba - update to 2.6.1 * Wed Apr 03 2013 Silvan Calarco 2.6.0-2mamba - pre-require udev for groups configuration before creating liveuser * Wed Feb 06 2013 Silvan Calarco 2.6.0-1mamba - update to 2.6.0 * Mon Nov 05 2012 Silvan Calarco 2.5.4-1mamba - update to 2.5.4 * Sat Mar 31 2012 Silvan Calarco 2.5.3-1mamba - update to 2.5.3 - call gtk-update-icon-cache to fix icons missing in some set-ups (seen in milestone2-livecd-light) * Sun Feb 19 2012 Silvan Calarco 2.5.2-3mamba - pre-require rpm in %pre script for packager group * Mon Feb 06 2012 Silvan Calarco 2.5.2-2mamba - liveuser: add packager group to allow netsrpms installation * Thu Jan 26 2012 Silvan Calarco 2.5.2-1mamba - update to 2.5.2 * Fri Jan 13 2012 Silvan Calarco 2.5.1-1mamba - update to 2.5.1 * Thu Jan 05 2012 Silvan Calarco 2.5.0-1mamba - update to 2.5.0 * Tue Dec 06 2011 Silvan Calarco 2.4.99-1mamba - update to 2.4.99 * Sun Oct 30 2011 Silvan Calarco 2.4.98-1mamba - update to 2.4.98 - added requirement for /usr/bin/cdrecord (used to eject cd at shutdown) - configure halt and reboot initscripts for eject * Thu Oct 20 2011 Silvan Calarco 2.4.97-1mamba - update to 2.4.97 * Thu Oct 20 2011 Silvan Calarco 2.4.96-4mamba - move creation of /home/liveuser from /etc/skel from %post to %pre - require(post) desktop-base-openmamba for bootrecover desktop icon * Wed Oct 19 2011 Silvan Calarco 2.4.96-3mamba - removed requirement for cdrtools * Mon Oct 10 2011 Silvan Calarco 2.4.96-2mamba - fix copy command of /etc/skel to avoid copying the entire /etc directory * Thu Oct 06 2011 Silvan Calarco 2.4.96-1mamba - update to 2.4.96 * Thu Oct 06 2011 Silvan Calarco 2.4.95-1mamba - update to 2.4.95 - added code to create liveuser user and home * Mon Oct 03 2011 Silvan Calarco 2.4.1-1mamba - update to 2.4.1 * Sun Sep 04 2011 Silvan Calarco 2.4.0-1mamba - update to 2.4.0 - removed requirement for hal - added requirement for udisks * Thu Aug 25 2011 Silvan Calarco 2.3.12-1mamba - update to 2.3.12 * Sat Jun 11 2011 Silvan Calarco 2.3.11-1mamba - update to 2.3.11 * Sat Apr 02 2011 Silvan Calarco 2.3.10-1mamba - update to 2.3.10 * Thu Mar 10 2011 Silvan Calarco 2.3.9-1mamba - update to 2.3.9 * Sun Sep 19 2010 Silvan Calarco 2.3.8-1mamba - update to 2.3.8 * Thu Sep 16 2010 Silvan Calarco 2.3.7-1mamba - update to 2.3.7 * Sat Sep 04 2010 Silvan Calarco 2.3.3-1mamba - update to 2.3.3 * Sun Jun 27 2010 Silvan Calarco 2.3.2-1mamba - update to 2.3.2 * Mon Jun 07 2010 Silvan Calarco 2.3.1-1mamba - update to 2.3.1 * Wed Jun 02 2010 Silvan Calarco 2.3-1mamba - update to 2.3 * Fri May 28 2010 Silvan Calarco 2.2.31-1mamba - update to 2.2.31 * Fri Jan 29 2010 Silvan Calarco 2.2.30-1mamba - update to 2.2.30 * Thu Dec 03 2009 Silvan Calarco 2.2.29-1mamba - update to 2.2.29 * Sat Nov 21 2009 Silvan Calarco 2.2.28-1mamba - update to 2.2.28 * Tue Nov 03 2009 Silvan Calarco 2.2.27-1mamba - update to 2.2.27 * Mon Oct 26 2009 Silvan Calarco 2.2.26-1mamba - update to 2.2.26 * Wed Oct 21 2009 Silvan Calarco 2.2.25-1mamba - update to 2.2.25 * Sun Aug 09 2009 Silvan Calarco 2.2.24-1mamba - update to 2.2.24 * Fri Jul 24 2009 Silvan Calarco 2.2.23-1mamba - update to 2.2.23 * Fri Jul 17 2009 Silvan Calarco 2.2.22-1mamba - update to 2.2.22 * Thu May 21 2009 Silvan Calarco 2.2.21-1mamba - update to 2.2.21 * Wed May 20 2009 Silvan Calarco 2.2.20-1mamba - update to 2.2.20 * Tue Mar 31 2009 Silvan Calarco 2.2.19-1mamba - update to 2.2.19 * Sun Mar 08 2009 Silvan Calarco 2.2.18-1mamba - update to 2.2.18 * Wed Mar 04 2009 Silvan Calarco 2.2.17-1mamba - update to 2.2.17 - added requirement for hal >= 0.5.11 * Wed Feb 18 2009 Silvan Calarco 2.2.16-1mamba - update to 2.2.16 * Tue Feb 10 2009 Silvan Calarco 2.2.15-1mamba - update to 2.2.15 * Sat Feb 07 2009 Silvan Calarco 2.2.14-1mamba - update to 2.2.14 * Tue Oct 28 2008 Silvan Calarco 2.2.13-1mamba - update to 2.2.13 * Mon Oct 20 2008 Silvan Calarco 2.2.12-1mamba - update to 2.2.12 * Fri Sep 19 2008 Silvan Calarco 2.2.11-1mamba - update to 2.2.11 * Fri May 30 2008 Silvan Calarco 2.2.10-1mamba - update to 2.2.10 * Thu May 29 2008 Silvan Calarco 2.2.9-1mamba - update to 2.2.9 * Thu May 08 2008 Silvan Calarco 2.2.8-1mamba - update to 2.2.8 * Wed Apr 30 2008 Silvan Calarco 2.2.7-1mamba - update to 2.2.7 * Tue Apr 15 2008 Silvan Calarco 2.2.6-1mamba - update to 2.2.6 * Fri Apr 11 2008 Silvan Calarco 2.2.5-1mamba - update to 2.2.5 * Wed Apr 09 2008 Silvan Calarco 2.2.4-1mamba - update to 2.2.4 * Wed Mar 26 2008 Silvan Calarco 2.2.3-1mamba - update to 2.2.3 * Tue Mar 11 2008 Silvan Calarco 2.2.2-1mamba - update to 2.2.2 * Mon Mar 10 2008 Silvan Calarco 2.2.1-1mamba - update to 2.2.1 * Sat Mar 08 2008 Silvan Calarco 2.2.0-1mamba - update to 2.2.0 * Sat Feb 23 2008 Silvan Calarco 2.1.5-1mamba - update to 2.1.5 * Tue Feb 19 2008 Silvan Calarco 2.1.4-1mamba - update to 2.1.4 * Mon Feb 18 2008 Silvan Calarco 2.1.3-1mamba - update to 2.1.3 * Sun Feb 17 2008 Silvan Calarco 2.1.2-1mamba - update to 2.1.2 * Sat Feb 16 2008 Silvan Calarco 2.1.1-1mamba - update to 2.1.1 * Fri Feb 15 2008 Silvan Calarco 2.1.0-1mamba - update to 2.1.0 * Mon Feb 11 2008 Silvan Calarco 2.0.8-1mamba - update to 2.0.8 * Mon Feb 11 2008 Silvan Calarco 2.0.7-1mamba - update to 2.0.7 * Mon Feb 04 2008 Silvan Calarco 2.0.6-1mamba - update to 2.0.6 * Mon Feb 04 2008 Silvan Calarco 2.0.5-1mamba - update to 2.0.5 * Thu Jan 31 2008 Silvan Calarco 2.0.4-1mamba - update to 2.0.4 * Wed Jan 16 2008 Silvan Calarco 2.0.3-1mamba - update to 2.0.3 * Fri Dec 28 2007 Silvan Calarco 2.0.2-1mamba - update to 2.0.2 * Thu Dec 27 2007 Silvan Calarco 2.0.1-1mamba - update to 2.0.1 * Wed Dec 26 2007 Silvan Calarco 2.0-1mamba - update to 2.0 * Wed Dec 19 2007 Silvan Calarco 1.2.24-1mamba - update to 1.2.24 * Mon Dec 17 2007 Silvan Calarco 1.2.23-1mamba - update to 1.2.23 * Sat Nov 17 2007 Silvan Calarco 1.2.22-1mamba - update to 1.2.22 * Wed Nov 14 2007 Silvan Calarco 1.2.21-1mamba - update to 1.2.21 * Sat Nov 10 2007 Silvan Calarco 1.2.20-1mamba - update to 1.2.20 * Tue Oct 30 2007 Silvan Calarco 1.2.19-1mamba - update to 1.2.19 * Mon Oct 29 2007 Silvan Calarco 1.2.18-1mamba - update to 1.2.18 * Thu Oct 25 2007 Silvan Calarco 1.2.17-1mamba - update to 1.2.17 * Sun Oct 21 2007 Silvan Calarco 1.2.16-1mamba - update to 1.2.16 * Wed Oct 17 2007 Silvan Calarco 1.2.15-1mamba - update to 1.2.15 * Mon Oct 15 2007 Silvan Calarco 1.2.14-1mamba - update to 1.2.14 * Wed Oct 10 2007 Silvan Calarco 1.2.13-1mamba - update to 1.2.13 * Sat Oct 06 2007 Silvan Calarco 1.2.12-1mamba - update to 1.2.12 * Sat Sep 29 2007 Silvan Calarco 1.2.11-1mamba - update to 1.2.11 * Tue Sep 25 2007 Silvan Calarco 1.2.10-1mamba - update to 1.2.10 * Thu Sep 20 2007 Silvan Calarco 1.2.9-1mamba - update to 1.2.9 - added requirement for parted and gparted * Sat Sep 15 2007 Silvan Calarco 1.2.8-1mamba - update to 1.2.8 * Mon Sep 03 2007 Silvan Calarco 1.2.7-1mamba - update to 1.2.7 - removed instation of /etc/localtime * Sun Sep 02 2007 Silvan Calarco 1.2.6-1mamba - update to 1.2.6 * Sat Sep 01 2007 Silvan Calarco 1.2.5-1mamba - update to 1.2.5 * Fri Aug 31 2007 Silvan Calarco 1.2.4-1mamba - update to 1.2.4 - added requirement for kommander * Wed Aug 15 2007 Silvan Calarco 1.2.3-1mamba - update to 1.2.3 * Mon Aug 13 2007 Silvan Calarco 1.2.2-1mamba - update to 1.2.2 * Sat Aug 11 2007 Silvan Calarco 1.2.1-1mamba - update to 1.2.1 * Fri Aug 03 2007 Silvan Calarco 1.2-1qilnx - package renamed and obsoleting qilinux-livecd - change arch to noarch - added requirement for cdrtools * Tue Sep 27 2005 Silvan Calarco 1.1-9qilnx - removed qiuser home installation * Wed Dec 15 2004 Silvan Calarco 1.1-8qilnx - remove OpenOffice lock file * Wed Dec 15 2004 Silvan Calarco 1.1-7qilnx - moved klivecd-save to /usr/bin instead of /usr/sbin * Wed Dec 15 2004 Davide Madrisan 1.1-6qilnx - added `qilinux-live-klivecd_save' * Tue Dec 14 2004 Davide Madrisan 1.1-5qilnx - removed `06loadconf' and `91livecd' scripts (moved to postplug-qilive) - removed some kde temporary file in the qiuser home directory * Tue Dec 14 2004 Davide Madrisan 1.1-4qilnx - fixed the postplug plugin `06loadconf' * Mon Dec 13 2004 Davide Madrisan 1.1-3qilnx - added scripts: `livecd-save', `livecd-restore', and `06loadconf' * Fri Dec 10 2004 Silvan Calarco 1.1-2qilnx - fix for eject_cd.sh: read /etc/mtab instead of /proc/mounts * Fri Dec 10 2004 Silvan Calarco 1.1-1qilnx - update for livecd 1.1 * Mon Nov 15 2004 Silvan Calarco 1.0-11qilnx - delete recently executed applications history * Fri Nov 12 2004 Silvan Calarco 1.0-10qilnx - set hostname in postplug script - other fixes in postplug script * Fri Nov 12 2004 Silvan Calarco 1.0-9qilnx - added livecd postplug configuration for hostname and kuser language modifications - added setkeyboard Autostart script for keyboard selection * Thu Nov 11 2004 Silvan Calarco 1.0-8qilnx - enabled desktop option to show mounted filesystems * Wed Nov 10 2004 Silvan Calarco 1.0-7qilnx - added preconfigured OpenOffice and mime types * Wed Nov 10 2004 Silvan Calarco 1.0-6qilnx - recreated QiUser default desktop for KDE 3.3 with more customizations * Mon Nov 08 2004 Silvan Calarco 1.0-5qilnx - recreated QiUser default desktop for KDE 3.3 * Mon Nov 08 2004 Silvan Calarco 1.0-4qilnx - add link /etc/localtime to /usr/share/zoneinfo/UTC - eject_cd.sh moved to /usr/sbin * Mon Aug 23 2004 Silvan Calarco 1.0-3qilnx - add eject_cd.sh script to /static for CD autoeject on shutdown * Fri Aug 19 2004 Silvan Calarco 1.0-2qilnx - add default qiuser homedir - add wallpaper QiLinux-live * Thu Aug 19 2004 Silvan Calarco 1.0-1qilnx - first build