Commit aa0adee6 authored by Aard's avatar Aard

[ks] Add hacky %gen_ks macro for easy kickstart packaging

parent d83168e9
# 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}
......@@ -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
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment