Include example blueprints in the rpm
This also sets ownership of /var/lib/lorax/composer/ to root:weldr to allow missing directories to be created at runtime.
This commit is contained in:
parent
7adc5162fb
commit
f38f5cc168
@ -163,6 +163,11 @@ build images, etc. from the command line.
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
|
make DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir} install
|
||||||
|
|
||||||
|
# Install example blueprints from the test suite.
|
||||||
|
# This path MUST match the lorax-composer.service blueprint path.
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/var/lib/lorax/composer/blueprints/
|
||||||
|
cp ./tests/pylorax/blueprints/*toml $RPM_BUILD_ROOT/var/lib/lorax/composer/blueprints/
|
||||||
|
|
||||||
%pre composer
|
%pre composer
|
||||||
getent group weldr >/dev/null 2>&1 || groupadd -r weldr >/dev/null 2>&1 || :
|
getent group weldr >/dev/null 2>&1 || groupadd -r weldr >/dev/null 2>&1 || :
|
||||||
getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin -c "User for lorax-composer" weldr >/dev/null 2>&1 || :
|
getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin -c "User for lorax-composer" weldr >/dev/null 2>&1 || :
|
||||||
@ -213,6 +218,9 @@ getent passwd weldr >/dev/null 2>&1 || useradd -r -g weldr -d / -s /sbin/nologin
|
|||||||
%dir %{_datadir}/lorax/composer
|
%dir %{_datadir}/lorax/composer
|
||||||
%{_datadir}/lorax/composer/*
|
%{_datadir}/lorax/composer/*
|
||||||
%{_tmpfilesdir}/lorax-composer.conf
|
%{_tmpfilesdir}/lorax-composer.conf
|
||||||
|
%dir %attr(0771, root, weldr) %{_sharedstatedir}/lorax/composer/
|
||||||
|
%dir %attr(0771, root, weldr) %{_sharedstatedir}/lorax/composer/blueprints/
|
||||||
|
%attr(0771, weldr, weldr) %{_sharedstatedir}/lorax/composer/blueprints/*
|
||||||
|
|
||||||
%files -n composer-cli
|
%files -n composer-cli
|
||||||
%{_bindir}/composer-cli
|
%{_bindir}/composer-cli
|
||||||
|
@ -7,7 +7,7 @@ Wants=network-online.target
|
|||||||
User=root
|
User=root
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStartPre=/usr/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/lorax-composer.conf
|
ExecStartPre=/usr/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/lorax-composer.conf
|
||||||
ExecStart=/usr/sbin/lorax-composer /var/lib/lorax/composer/recipes/
|
ExecStart=/usr/sbin/lorax-composer /var/lib/lorax/composer/blueprints/
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Loading…
Reference in New Issue
Block a user