Skip to content

Commit

Permalink
[ks] Add hacky %gen_ks macro for easy kickstart packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Wachter committed Apr 19, 2013
1 parent d83168e commit aa0adee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
17 changes: 17 additions & 0 deletions 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}
3 changes: 3 additions & 0 deletions rpm/ssu.spec
Expand Up @@ -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


Expand Down
5 changes: 4 additions & 1 deletion ssu.pro
Expand Up @@ -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

0 comments on commit aa0adee

Please sign in to comment.