Skip to content

Commit

Permalink
[dist] Conditional for the image_template button
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel committed Feb 14, 2017
1 parent 99fff11 commit 34c5022
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dist/hide-image-templates.patch
@@ -0,0 +1,12 @@
diff --git a/src/api/app/views/webui/main/index.html.erb b/src/api/app/views/webui/main/index.html.erb
index 61d1725f3..bdbdcdc18 100644
--- a/src/api/app/views/webui/main/index.html.erb
+++ b/src/api/app/views/webui/main/index.html.erb
@@ -22,7 +22,6 @@
<% unless @spider_bot -%>
<%= proceed_link 'utilities-system-monitor', 'Status Monitor', :controller => 'monitor', :action => 'index' %>
<% end -%>
- <%= proceed_link 'drive-optical-32', 'New Image', image_templates_path if Feature.active?(:image_templates) %>
</ul>
</div>

7 changes: 7 additions & 0 deletions dist/obs-server.spec
Expand Up @@ -31,6 +31,7 @@
%endif

%define secret_key_file /srv/www/obs/api/config/secret.key
%bcond_without image_templates

%if 0%{?suse_version} >= 1315
%define reload_on_update() %{?nil:
Expand Down Expand Up @@ -125,6 +126,8 @@ Requires: perl-Socket-MsgHdr
Requires: perl-XML-Parser
Requires: perl-XML-Simple

Patch0: hide-image-templates.patch

%description
The Open Build Service (OBS) backend is used to store all sources and binaries. It also
calculates the need for new build jobs and distributes it.
Expand Down Expand Up @@ -308,6 +311,10 @@ This package contains test cases for testing a installed appliances.

#--------------------------------------------------------------------------------
%prep
%if %{without image_templates}
patch0 -p1
%endif

export DESTDIR=$RPM_BUILD_ROOT
%setup -q -n open-build-service-%version
# drop build script, we require the installed one from own package
Expand Down

0 comments on commit 34c5022

Please sign in to comment.