diff --git a/macros.ssuks b/macros.ssuks new file mode 100644 index 0000000..2ec4703 --- /dev/null +++ b/macros.ssuks @@ -0,0 +1,17 @@ +# copy all the relevant files for kickstart generation both from system and +# newly installed into sandbox for ssuks; then create rnd and release kickstarts +# for all devices listed. +%define gen_ks() \ + mkdir -p /tmp/sandbox/%{_datadir} \ + [ -d %{_datadir}/ssu ] && cp -Rf %{_datadir}/ssu /tmp/sandbox/%{_datadir}/ \ + rm -f /tmp/sandbox/%{_datadir}/ssu/board-mappings.ini \ + cp -R %{buildroot}/%{_datadir}/ssu /tmp/sandbox/%{_datadir}/ \ + rm -f %{buildroot}/%{_datadir}/ssu/board-mappings.ini \ + mkdir -p %{buildroot}/%{_datadir}/kickstarts \ + sleep 1 \ + for M in %{?*}; do \ + for B in true false; do \ + ssuks model=$M sandbox=/tmp/sandbox outputdir=%{buildroot}/%{_datadir}/kickstarts/ rnd=$B version=%{version} \ + done \ + done \ +%{nil} diff --git a/rpm/ssu.spec b/rpm/ssu.spec index 6f6eadd..8166369 100644 --- a/rpm/ssu.spec +++ b/rpm/ssu.spec @@ -49,12 +49,15 @@ Group: System/Base %package ks Summary: Kickstart generator using %{name} data Group: System/Base +# required for QA to pick up new macros +Provides: rpm-macros %description ks %{summary}. With ponies! %files ks %defattr(-,root,root,-) +%config %{_sysconfdir}/rpm/macros.ssuks %{_bindir}/ssuks diff --git a/ssu.pro b/ssu.pro index 46523be..f3e05f6 100644 --- a/ssu.pro +++ b/ssu.pro @@ -24,7 +24,10 @@ config.path = /etc/ssu oneshot.files = ssu-update-repos oneshot.path = /usr/lib/oneshot.d +macros.files = macros.ssuks +macros.path = /etc/rpm/ + static_config.files = repos.ini ssu-defaults.ini board-mappings.ini static_config.path = /usr/share/ssu -INSTALLS += config static_config oneshot +INSTALLS += config static_config oneshot macros