- use wrapper for running daemon and alter service file to use it

- if there is new daemon available - use it
  - if there is not, use the one from this package

OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/guix?expand=0&rev=8
This commit is contained in:
Tomas Cech
2018-02-20 22:24:37 +00:00
committed by Git OBS Bridge
parent 50631d1d51
commit 033fd96253
3 changed files with 20 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Feb 20 22:23:32 UTC 2018 - sleep_walker@opensuse.org
- use wrapper for running daemon and alter service file to use it
- if there is new daemon available - use it
- if there is not, use the one from this package
-------------------------------------------------------------------
Thu Feb 15 17:38:59 UTC 2018 - sleep_walker@opensuse.org

View File

@@ -44,6 +44,7 @@ Source11: armhf-linux-guile-2.0.11.tar.xz.sig
# http://alpha.gnu.org/gnu/guix/bootstrap/aarch64-linux/20170217/guile-2.0.14.tar.xz
Source12: aarch64-linux-guile-2.0.14.tar.xz
Source13: aarch64-linux-guile-2.0.14.tar.xz.sig
Source20: run_guix_daemon.sh
BuildRequires: gcc-c++
BuildRequires: gnutls-guile
BuildRequires: guile-charting
@@ -103,6 +104,8 @@ rm -rvf %{buildroot}%{_unitdir}
rm -rvf %{buildroot}%{_libdir}/upstart
%endif
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcguix-daemon
install -m 0755 -t %{buildroot}%{_bindir}/%{SOURCE20}
sed -i 's@^ExecStart=.*@ExecStart=/usr/bin/run_guix_daemon.sh@' %{buildroot}%{_unitdir}/guix-daemon.service
%pre
%{_sbindir}/groupadd -r %{guix_builder_group} >/dev/null 2>/dev/null || :
@@ -139,7 +142,7 @@ done
%{_datadir}/guile
%{_datadir}/guix
%{_datadir}/zsh
%{_bindir}/guix*
%{_bindir}/*>guix*
%{_sbindir}/*guix*
%{_libexecdir}/guix
%{_libexecdir}/guix-authenticate

9
run_guix_daemon.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/sh
# if there is newer Guix daemon compiled by `guix pull`, use it
if [ -x /var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon ]; then
BINARY=/var/guix/profiles/per-user/root/guix-profile/bin/guix-daemon
else
# otherwise use the one installed with our package
BINARY=/usr/bin/guix-daemon
exec "$BINARY" --build-users-group=guixbuild