From d56ddc8b2288bc9b338ae020ee5aaf2d79e9e334 Mon Sep 17 00:00:00 2001 From: Trey Dockendorf Date: Mon, 6 Jul 2020 18:05:44 -0400 Subject: [PATCH] Fix packaging of ondemand theme for dex --- .gitignore | 2 +- Makefile | 3 +-- packaging/ondemand-dex.spec | 5 +++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 20c792a..c57aa4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ *.tar.gz -/packaging/theme +/packaging/theme.tar.gz /packaging/tmp diff --git a/Makefile b/Makefile index 0a9116c..66a7f31 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,4 @@ .PHONY: packaging packaging: - [ -d packaging/theme ] && rm -rf packaging/theme || : - cp -r theme packaging/theme + tar czvf packaging/theme.tar.gz theme/* diff --git a/packaging/ondemand-dex.spec b/packaging/ondemand-dex.spec index 1885cdc..93c95c6 100644 --- a/packaging/ondemand-dex.spec +++ b/packaging/ondemand-dex.spec @@ -18,7 +18,7 @@ License: Apache-2.0 URL: https://github.com/dexidp/dex 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: theme +Source2: theme.tar.gz BuildRequires: ondemand-scldevel BuildRequires: systemd @@ -53,7 +53,8 @@ cd $GOPATH/src/github.com/dexidp/dex/ touch %{buildroot}%{confdir}/dex.db %__mkdir_p %{buildroot}%{_datadir}/%{name} %__cp -R web %{buildroot}%{_datadir}/%{name}/web -%__cp -R %{SOURCE2} %{buildroot}%{_datadir}/%{name}/web/themes/ondemand +%__mkdir_p %{buildroot}%{_datadir}/%{name}/web/themes/ondemand +%__tar -C %{buildroot}%{_datadir}/%{name}/web/themes/ondemand -xzf %{SOURCE2} %__mkdir_p %{buildroot}%{_unitdir} %__cat >> %{buildroot}%{_unitdir}/%{name}.service << EOF [Unit]