diff --git a/yast2-installation.spec b/yast2-installation.spec index 4e440b9..c349f66 100644 --- a/yast2-installation.spec +++ b/yast2-installation.spec @@ -1,21 +1,30 @@ # -# spec file for package yast2-installation (Version 2.21.14) +# spec file for package yast2-installation (Version 2.21.15) # # norootforbuild Name: yast2-installation -Version: 2.21.14 +Version: 2.21.15 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-installation-2.21.14.tar.bz2 +Source0: yast2-installation-2.21.15.tar.bz2 prefix: /usr Group: System/YaST License: GPL v2 or later + +Source1: YaST2-Second-Stage.service +Source2: YaST2-Firstboot.service + +%if 0%{?suse_version} >= 1210 +BuildRequires: systemd-devel +%{systemd_requires} +%endif + BuildRequires: docbook-xsl-stylesheets doxygen libxslt perl-XML-Writer sgml-skel update-desktop-files yast2-core-devel yast2-devtools yast2-testsuite # FileSystems::possible_root_fs @@ -125,7 +134,7 @@ System installation code as present on installation media. System installation code as present on installation media. %prep -%setup -n yast2-installation-2.21.14 +%setup -n yast2-installation-2.21.15 %build %{prefix}/bin/y2tool y2autoconf @@ -153,12 +162,30 @@ for f in `find %{buildroot}%{_datadir}/autoinstall/modules -name "*.desktop"`; d %suse_update_desktop_file $f done +mkdir -p $RPM_BUILD_ROOT/%{_unitdir} +install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir} +install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/%{_unitdir} + %clean rm -rf "$RPM_BUILD_ROOT" %post %{fillup_only -ns security checksig} +%service_add YaST2-Second-Stage.service YaST2-Firstboot.service + +/bin/systemctl enable YaST2-Second-Stage.service > /dev/null 2>&1 || : +/bin/systemctl enable YaST2-Firstboot.service > /dev/null 2>&1 || : + +%preun +if [ $1 -eq 0 ]; then + /bin/systemctl disable YaST2-Second-Stage.service YaST2-Firstboot.service > /dev/null 2>&1 || : +fi +%service_del_preun YaST2-Second-Stage.service YaST2-Firstboot.service + +%postun +%service_del_postun YaST2-Second-Stage.service YaST2-Firstboot.service + %files %defattr(-,root,root) %dir /usr/share/YaST2/control @@ -167,6 +194,10 @@ rm -rf "$RPM_BUILD_ROOT" /usr/share/YaST2/control/*.rng /usr/share/YaST2/control/*.rnc +# systemd service files +%_unitdir/YaST2-Second-Stage.service +%_unitdir/YaST2-Firstboot.service + /usr/share/YaST2/clients/*.ycp /usr/share/YaST2/modules/*.ycp /usr/share/YaST2/modules/*.ybc