From 35bb5b2e7d6b012689f66a9f2fad4966522d5faf Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Thu, 30 Jul 2020 15:06:40 -0400 Subject: [PATCH 1/2] Run update_ood_portal before running service --- packaging/ondemand-dex.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packaging/ondemand-dex.spec b/packaging/ondemand-dex.spec index 461f00f..7fd38aa 100644 --- a/packaging/ondemand-dex.spec +++ b/packaging/ondemand-dex.spec @@ -68,6 +68,10 @@ touch %{buildroot}%{confdir}/dex.db ExecStart= ExecStart=%{_sbindir}/%{name}-session serve %{confdir}/config.yaml EOF +%__cat >> %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/update_ood_portal.conf << EOF +[Service] +ExecStartPre=-/opt/ood/ood-portal-generator/sbin/update_ood_portal --rpm +EOF %__mkdir_p %{buildroot}%{_unitdir} %__cat >> %{buildroot}%{_unitdir}/%{name}.service << EOF [Unit] @@ -113,4 +117,5 @@ getent passwd %{name} > /dev/null || useradd -r -d /var/lib/%{name} -g %{name} - %dir %{_sysconfdir}/systemd/system/%{name}.service.d %ghost %{_sysconfdir}/systemd/system/%{name}.service.d/session.conf %{_sysconfdir}/systemd/system/%{name}.service.d/session.conf.example +%{_sysconfdir}/systemd/system/%{name}.service.d/update_ood_portal.conf %{_unitdir}/%{name}.service From da3634bf86672c0927ccab03462e7555c74bb74d Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Fri, 31 Jul 2020 10:16:13 -0400 Subject: [PATCH 2/2] Link to original session commit --- packaging/ondemand-dex.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/ondemand-dex.spec b/packaging/ondemand-dex.spec index 7fd38aa..a666138 100644 --- a/packaging/ondemand-dex.spec +++ b/packaging/ondemand-dex.spec @@ -20,6 +20,7 @@ Source0: https://github.com/dexidp/dex/archive/v%{version}.tar.gz Source1: https://dl.google.com/go/go%{go_version}.linux-amd64.tar.gz Source2: web.tar.gz # Adds session support +# Original commit: https://github.com/juliantaylor/dex/commit/b3fc3e6c2295c0af166803bdde0977ed170d1d40 Source5: https://github.com/OSC/dex/commit/b3fc3e6c2295c0af166803bdde0977ed170d1d40.patch BuildRequires: ondemand-scldevel