Hello community, here is the log from the commit of package hawk for openSUSE:Factory checked in at Sat Nov 20 12:35:42 CET 2010. -------- --- hawk/hawk.changes 2010-06-25 05:26:13.000000000 +0200 +++ /mounts/work_src_done/STABLE/hawk/hawk.changes 2010-09-09 08:44:39.000000000 +0200 @@ -2 +2,13 @@ -Fri Jun 25 03:20:25 UTC 2010 - tserong@novell.com +Thu Sep 9 06:25:53 UTC 2010 - tserong@novell.com + +- Require rack version (1.1.0), to build on systems with rack 1.2 installed + (see https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5146) + +------------------------------------------------------------------- +Tue Aug 10 04:50:19 UTC 2010 - tserong@novell.com + +- GUI: Refresh status display automatically on cluster state change (bnc#593013) +- Upstream version cs:443ba6917308 + +------------------------------------------------------------------- +Wed Jun 30 04:26:05 UTC 2010 - tserong@novell.com calling whatdependson for head-i586 Old: ---- allow-default-rack-version.patch New: ---- hawk_monitor-as-needed.patch require-rack-1.1.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ hawk.spec ++++++ --- /var/tmp/diff_new_pack.JlRc4v/_old 2010-11-20 12:35:32.000000000 +0100 +++ /var/tmp/diff_new_pack.JlRc4v/_new 2010-11-20 12:35:32.000000000 +0100 @@ -27,14 +27,15 @@ Name: hawk Summary: HA Web Konsole Version: 0.3.5 -Release: 1 +Release: 2 License: GPLv2 Group: Productivity/Clustering/HA Source: %{name}-%{version}.tar.bz2 Source1: filter-requires.sh Patch1: string-unpack-s390x.patch Patch2: use-unix2_chkpwd.patch -Patch3: allow-default-rack-version.patch +Patch3: require-rack-1.1.patch +Patch4: hawk_monitor-as-needed.patch %define _use_internal_dependency_generator 0 %define __find_requires /bin/sh %{SOURCE1} BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -49,6 +50,7 @@ BuildRequires: ruby-fcgi BuildRequires: rubygem-rails-2_3 BuildRequires: fdupes +BuildRequires: glib2-devel libpacemaker-devel libxml2-devel # Require startproc respecting -p, bnc#559534#c44 %if 0%{?suse_version} > 1110 # 11.2 or newer; @@ -71,6 +73,7 @@ %patch1 -p0 %patch2 -p0 %patch3 -p0 +%patch4 -p0 %build make WWW_BASE=%{www_base} INIT_STYLE=%{init_style} @@ -137,6 +140,7 @@ %files -f %{name}.lang %defattr(-,root,root) +%{_sbindir}/hawk_monitor %dir %{www_base}/hawk %{www_base}/hawk/app %{www_base}/hawk/config ++++++ hawk-0.3.5.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-0.3.5/.hg_archival.txt new/hawk-0.3.5/.hg_archival.txt --- old/hawk-0.3.5/.hg_archival.txt 2010-05-10 07:06:34.000000000 +0200 +++ new/hawk-0.3.5/.hg_archival.txt 2010-08-10 06:45:10.000000000 +0200 @@ -1,2 +1,2 @@ repo: 53225c8fc9056b3c31743a53a67c6a0e19c4dfd2 -node: 2a79e0d9cb43b5aff06f02d2a5ef2a66436225d3 +node: 443ba6917308a094a65787518efa004f48aa79db diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-0.3.5/.hgignore new/hawk-0.3.5/.hgignore --- old/hawk-0.3.5/.hgignore 2010-05-10 07:06:34.000000000 +0200 +++ new/hawk-0.3.5/.hgignore 2010-08-10 06:45:10.000000000 +0200 @@ -16,3 +16,4 @@ hawk*.tar.bz2 *.src.rpm tools/hawk_chkpwd +tools/hawk_monitor diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-0.3.5/Makefile new/hawk-0.3.5/Makefile --- old/hawk-0.3.5/Makefile 2010-05-10 07:06:34.000000000 +0200 +++ new/hawk-0.3.5/Makefile 2010-08-10 06:45:10.000000000 +0200 @@ -54,7 +54,7 @@ # Override this to get a different init script (e.g. "redhat") INIT_STYLE = suse -all: scripts/hawk.$(INIT_STYLE) hawk/config/lighttpd.conf tools/hawk_chkpwd +all: scripts/hawk.$(INIT_STYLE) hawk/config/lighttpd.conf tools/hawk_chkpwd tools/hawk_monitor (cd hawk; rake makemo; rake freeze:rails; rake freeze:gems) %: %.in @@ -63,6 +63,11 @@ tools/hawk_chkpwd: tools/hawk_chkpwd.c gcc -o $@ $< -lpam +tools/hawk_monitor: tools/hawk_monitor.c + gcc $(shell pkg-config --cflags glib-2.0) $(shell pkg-config --libs glib-2.0) \ + -I/usr/include/pacemaker -I/usr/include/heartbeat \ + -lcib -lcrmcommon -Wall \ + -o $@ $< clean: rm -rf hawk/locale @@ -71,6 +76,8 @@ rm -rf hawk/log rm -f hawk/config/lighttpd.conf rm -f scripts/hawk.{suse,redhat} + rm -f tools/hawk_chkpwd + rm -f tools/hawk_monitor install: mkdir -p $(DESTDIR)$(WWW_BASE)/hawk/log @@ -89,6 +96,8 @@ install -D -m 0755 scripts/hawk.$(INIT_STYLE) $(DESTDIR)/etc/init.d/hawk install -D -m 4750 tools/hawk_chkpwd $(DESTDIR)/usr/sbin/hawk_chkpwd -chown root.haclient $(DESTDIR)/usr/sbin/hawk_chkpwd + install -D -m 0755 tools/hawk_monitor $(DESTDIR)/usr/sbin/hawk_monitor + ln -s /usr/sbin/hawk_monitor $(DESTDIR)$(WWW_BASE)/hawk/public/monitor # Make a tar.bz2 named for the most recent human-readable tag archive: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-0.3.5/hawk/app/controllers/main_controller.rb new/hawk-0.3.5/hawk/app/controllers/main_controller.rb --- old/hawk-0.3.5/hawk/app/controllers/main_controller.rb 2010-05-10 07:06:34.000000000 +0200 +++ new/hawk-0.3.5/hawk/app/controllers/main_controller.rb 2010-08-10 06:45:10.000000000 +0200 @@ -143,7 +143,7 @@ # everything empty. Status display can key off non-empty @summary return unless @cib.root - @cib_up = true + @cib_epoch = "#{get_xml_attr(@cib.root, 'admin_epoch')}:#{get_xml_attr(@cib.root, 'epoch')}:#{get_xml_attr(@cib.root, 'num_updates')}" @summary[:stack] = get_property('cluster-infrastructure') || _('Unknown') @summary[:version] = get_property('dc-version') || _('Unknown') @@ -492,7 +492,7 @@ @cib = nil # Everything we're showing status of - @cib_up = false + @cib_epoch = "" @errors = [] @summary = {} @nodes = [] @@ -556,7 +556,7 @@ format.html # status.html.erb format.json { render :json => { - :cib_up => @cib_up, + :cib_epoch => @cib_epoch, :errors => @errors, :summary => @summary, :nodes => @node_panel, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-0.3.5/hawk/app/views/main/_summary.html.erb new/hawk-0.3.5/hawk/app/views/main/_summary.html.erb --- old/hawk-0.3.5/hawk/app/views/main/_summary.html.erb 2010-05-10 07:06:34.000000000 +0200 +++ new/hawk-0.3.5/hawk/app/views/main/_summary.html.erb 2010-08-10 06:45:10.000000000 +0200 @@ -1,4 +1,4 @@ -<div id="summary"<%= ' style="display: none"' unless @cib_up %>> +<div id="summary"<%= ' style="display: none"' if @cib_epoch.empty? %>> <table> <tr><th><%= _('Cluster Stack:') %></th> <td><span id="summary::stack"><%=h @summary[:stack] %></span></td></tr> <tr><th><%= _('Pacemaker Version:') %></th> <td><span id="summary::version"><%=h @summary[:version] %></span></td></tr> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-0.3.5/hawk/app/views/main/status.html.erb new/hawk-0.3.5/hawk/app/views/main/status.html.erb --- old/hawk-0.3.5/hawk/app/views/main/status.html.erb 2010-05-10 07:06:34.000000000 +0200 +++ new/hawk-0.3.5/hawk/app/views/main/status.html.erb 2010-08-10 06:45:10.000000000 +0200 @@ -11,6 +11,6 @@ <%= render :partial => 'menus' %> <script type="text/javascript"><!-- -Event.observe(window, 'load', function() { init_menus(); do_update(); }); +Event.observe(window, 'load', function() { init_menus(); do_update('<%= @cib_epoch %>'); }); //--></script> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-0.3.5/hawk/config/lighttpd.conf.in new/hawk-0.3.5/hawk/config/lighttpd.conf.in --- old/hawk-0.3.5/hawk/config/lighttpd.conf.in 2010-05-10 07:06:34.000000000 +0200 +++ new/hawk-0.3.5/hawk/config/lighttpd.conf.in 2010-08-10 06:45:10.000000000 +0200 @@ -123,7 +123,7 @@ ## server.pid-file = state_dir + "/hawk.pid" -server.modules = ( "mod_rewrite", "mod_access", "mod_accesslog", "mod_fastcgi", "mod_compress", "mod_expire" ) +server.modules = ( "mod_rewrite", "mod_access", "mod_accesslog", "mod_cgi", "mod_fastcgi", "mod_compress", "mod_expire" ) server.error-handler-404 = "/dispatch.fcgi" server.document-root = "@WWW_BASE@/hawk/public/" @@ -154,6 +154,8 @@ "bin-environment" => ( "RAILS_ENV" => "production" ) ) ) ) +cgi.assign = ( "/monitor" => "" ) + mimetype.assign = ( ".css" => "text/css", ".gif" => "image/gif", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-0.3.5/hawk/public/javascripts/application.js new/hawk-0.3.5/hawk/public/javascripts/application.js --- old/hawk-0.3.5/hawk/public/javascripts/application.js 2010-05-10 07:06:34.000000000 +0200 +++ new/hawk-0.3.5/hawk/public/javascripts/application.js 2010-08-10 06:45:10.000000000 +0200 @@ -132,40 +132,6 @@ return expand; } -// Um... what's "object" for? -function handle_update(request, object) -{ - // TODO(should): really should be using Ajax.Request onSuccess to - // trigger this callback... - if (request.responseJSON) { - update_errors(request.responseJSON.errors); - - if (request.responseJSON.cib_up) { - $("summary").show(); - update_summary(request.responseJSON.summary); - - $("nodelist").show(); - if (update_panel(request.responseJSON.nodes)) { - if ($("nodelist::children").hasClassName("closed")) { - expand_block("nodelist"); - } - } - - $("reslist").show(); - if (update_panel(request.responseJSON.resources)) { - if ($("reslist::children").hasClassName("closed")) { - expand_block("reslist"); - } - } - } else { - $("summary").hide(); - $("nodelist").hide(); - $("reslist").hide(); - } - } - do_update(); -} - // Like string.split, but breaks on '::' // TODO(could): think about changing our naming conventions so we don't need this. function dc_split(str) @@ -408,8 +374,49 @@ $("dialog").setStyle(style).show(); } -function do_update() +function do_update(cur_epoch) { - setTimeout("new Ajax.Request('/main/status', { parameters: 'format=json', asynchronous: true, onComplete: handle_update });", 15000); + new Ajax.Request('/monitor?' + cur_epoch, { method: 'get', + onSuccess: function(transport) { + var new_epoch = transport.responseJSON ? transport.responseJSON.epoch : ""; + if (new_epoch != cur_epoch) { + new Ajax.Request('/main/status?format=json', { method: 'get', + onSuccess: function(transport) { + var new_epoch = ""; + if (transport.responseJSON) { + update_errors(transport.responseJSON.errors); + + new_epoch = transport.responseJSON.cib_epoch; + if (new_epoch != "") { + $("summary").show(); + update_summary(transport.responseJSON.summary); + + $("nodelist").show(); + if (update_panel(transport.responseJSON.nodes)) { + if ($("nodelist::children").hasClassName("closed")) { + expand_block("nodelist"); + } + } + + $("reslist").show(); + if (update_panel(transport.responseJSON.resources)) { + if ($("reslist::children").hasClassName("closed")) { + expand_block("reslist"); + } + } + } else { + $("summary").hide(); + $("nodelist").hide(); + $("reslist").hide(); + } + } + do_update(new_epoch); + } + }); + } else { + do_update(new_epoch); + } + } + }); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-0.3.5/hawk.spec new/hawk-0.3.5/hawk.spec --- old/hawk-0.3.5/hawk.spec 2010-05-10 07:06:34.000000000 +0200 +++ new/hawk-0.3.5/hawk.spec 2010-08-10 06:45:10.000000000 +0200 @@ -158,6 +158,7 @@ %files -f %{name}.lang %defattr(-,root,root) %attr(4750, root, %{gname})%{_sbindir}/hawk_chkpwd +%{_sbindir}/hawk_monitor %dir %{www_base}/hawk %{www_base}/hawk/app %{www_base}/hawk/config diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/hawk-0.3.5/tools/hawk_monitor.c new/hawk-0.3.5/tools/hawk_monitor.c --- old/hawk-0.3.5/tools/hawk_monitor.c 1970-01-01 01:00:00.000000000 +0100 +++ new/hawk-0.3.5/tools/hawk_monitor.c 2010-08-10 06:45:10.000000000 +0200 @@ -0,0 +1,217 @@ +/* + * Copyright (c) 2010 Novell Inc., Tim Serong <tserong@novell.com> + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Further, this software is distributed without any warranty that it is + * free of the rightful claim of any third person regarding infringement + * or the like. Any license provided herein, whether implied or + * otherwise, applies only to this software file. Patent licenses, if + * any, provided herein do not apply to combinations of this program with + * other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + */ + +/* + * This monitor program is intentionally as dumb as a pile of rocks. + * Its only purpose is to be polled by the user's web browser, to + * indicate whether the state of the cluster has changed since the + * status display was last rendered. If something has changed, the + * browser needs to make another proper request (to the Rails app) + * to update the status display accordingly. + * + * USAGE: + * + * 1) Client invokes with QUERY_STRING == epoch (e.g.: /monitor?0:36:2), + * where epoch is either "admin_epoch:epoch:num_updates" from the CIB, + * or is an empty string (for unknown, or previously disconnected). + * + * 2) Server connects to CIB, and: + * - If client epoch is empty string: + * - If CIB connection succeeds, respond immediately with new epoch. + * - If connection fails, attept to connect for up to 60 seconds. + * - Finally, respond with either epoch = empty string (timeout) or + * real epoch from CIB if connection ultimately succeeded. + * - If client epoch is present: + * - If CIB connection fails, respond immediately with empty string. + * - If CIB connection succeeds, and CIB has a different epoch, + * respond immediately with the new epoch. + * - Otherwise, wait up to 60 seconds for something to change, then + * respond with either the new epoch (if something changed), the + * current epoch (if the timeout expired) or empty string (if the + * connection to CIB fell over). + * + * Note that the response from hawk_monitor will always be in the form: + * + * Content-type: application/json + * + * {"epoch":"n:n:n"} + * + * This means, from the client's perspective, the algorithm is: + * + * 1) Request https://SERVER:7630/monitor?EPOCH + * 2) Wait and see what comes back. If the epoch returned is in any + * way different to what you started with, fire off another request + * to update the display (https://SERVER:7630/main/status?format=json) + * 3) Remember the new epoch, and go back to step 1. + * + * SECURITY/PERFORMANCE CONSIDERATIONS: + * + * - hawk_monitor runs as a regular CGI application, i.e. the web server forks + * a new process for each request. This overhead is deemed acceptable, as + * this is for a low use monitoring app, not a heavy load public web site. + * + * - No authentication is performed, so anyone can get the current epoch from + * the CIB. This data should not however constitute any sort of security + * risk. + * + * - It may be possible to perpetrate a DOS attack by invoking hundreds of + * instances of hawk_monitor in quick succession, because each instance + * potentially hangs around for 60 seconds). Some consideration needs to + * be given to this, to find a balance between DOS risk as rendering the + * system unusable for multiple users, or multiple tabbed browsing sessions. + */ + +#include <stdio.h> +#include <stdlib.h> + +#include <crm/cib.h> +#include <crm/common/util.h> + +#define CONNECT_TIMEOUT 60 +#define MAX_EPOCH_LENGTH 128 /* way longer than necessary */ + +int cib_connect(void); +void mon_cib_connection_destroy(gpointer user_data); +void crm_diff_update(const char *event, xmlNode *msg); +gboolean mon_timer_popped(gpointer data); +void mon_shutdown(int nsig); +void finish(void); +void get_new_epoch(void); + +char new_epoch[MAX_EPOCH_LENGTH] = ""; +cib_t *cib = NULL; +GMainLoop *mainloop = NULL; + +/* + * Based on cib_connect() crm_mon.c, but intentionally ignoring notify + * callback setup errors (it's just not that important, we'll time + * out anyway...) + */ +int cib_connect(void) +{ + int rc = cib_ok; + CRM_CHECK(cib != NULL, return cib_missing); + + if (cib->state == cib_connected_query || cib->state == cib_connected_command) + return cib_ok; + + rc = cib->cmds->signon(cib, crm_system_name, cib_query); + + if (rc != cib_ok) + return rc; + + cib->cmds->set_connection_dnotify(cib, mon_cib_connection_destroy); + cib->cmds->del_notify_callback(cib, T_CIB_DIFF_NOTIFY, crm_diff_update); + cib->cmds->add_notify_callback(cib, T_CIB_DIFF_NOTIFY, crm_diff_update); + + return rc; +} + +void mon_cib_connection_destroy(gpointer user_data) +{ + if (cib) { + cib->cmds->signoff(cib); + g_main_loop_quit(mainloop); + } +} + +void crm_diff_update(const char *event, xmlNode *msg) +{ + g_main_loop_quit(mainloop); +} + +gboolean mon_timer_popped(gpointer data) +{ + g_main_loop_quit(mainloop); + return FALSE; +} + +void mon_shutdown(int nsig) +{ + finish(); +} + +void finish(void) +{ + if (cib != NULL) { + get_new_epoch(); /* Last chance... */ + cib->cmds->signoff(cib); + cib_delete(cib); + cib = NULL; + } + printf("Content-type: application/json\n\n{\"epoch\":\"%s\"}", new_epoch); + exit(0); +} + +void get_new_epoch(void) +{ + int admin_epoch; + int epoch; + int num_updates; + xmlNode *cib_top = NULL; + cib->cmds->query(cib, "/cib", &cib_top, cib_sync_call|cib_scope_local|cib_xpath|cib_no_children); + if (cib_version_details(cib_top, &admin_epoch, &epoch, &num_updates)) { + snprintf(new_epoch, MAX_EPOCH_LENGTH, "%d:%d:%d", admin_epoch, epoch, num_updates); + } + free_xml(cib_top); +} + +int main(int argc, char **argv) +{ + int rc = cib_ok; + int timeout = 0; + char *client_epoch = getenv("QUERY_STRING"); + if (client_epoch && client_epoch[0] == '\0') + client_epoch = NULL; + + crm_log_init(NULL, LOG_CRIT, FALSE, FALSE, argc, argv); + + cib = cib_new(); + + rc = cib_connect(); + if (rc != cib_ok && client_epoch == NULL) { + /* Client had no epoch, wait to connect */ + do { + sleep(1); + rc = cib_connect(); + } while (rc == cib_connection && ++timeout < CONNECT_TIMEOUT); + } + + if (rc == cib_ok) { + get_new_epoch(); + if (client_epoch != NULL && strcmp(client_epoch, new_epoch) == 0) { + /* Wait a while to see if something changes */ + mainloop = g_main_loop_new(NULL, FALSE); + mainloop_add_signal(SIGTERM, mon_shutdown); + mainloop_add_signal(SIGINT, mon_shutdown); + g_timeout_add(CONNECT_TIMEOUT * 1000, mon_timer_popped, NULL); + g_main_loop_run(mainloop); + g_main_loop_unref(mainloop); + } + } + + finish(); + return 0; /* never reached */ +} + ++++++ hawk_monitor-as-needed.patch ++++++ Index: Makefile =================================================================== --- Makefile.orig +++ Makefile @@ -63,8 +63,8 @@ all: scripts/hawk.$(INIT_STYLE) hawk/con tools/hawk_monitor: tools/hawk_monitor.c gcc $(shell pkg-config --cflags glib-2.0) $(shell pkg-config --libs glib-2.0) \ -I/usr/include/pacemaker -I/usr/include/heartbeat \ - -lcib -lcrmcommon -Wall \ - -o $@ $< + -o $@ $< \ + -lcib -lcrmcommon -Wall clean: rm -rf hawk/locale ++++++ require-rack-1.1.patch ++++++ Index: hawk/config/environment.rb =================================================================== --- hawk/config/environment.rb.orig +++ hawk/config/environment.rb @@ -24,11 +24,13 @@ Rails::Initializer.run do |config| config.gem "locale_rails" config.gem "gettext" config.gem "gettext_rails" - # Explicitly require any rack version in the 1.0 series. This is necessary because - # ActionPack 2.3.5 explicitly specifies this as well, so if we run on a system with - # rack 1.1, it all breaks horribly if we don't force it back to 1.0 here. Some further - # discussion is at https://rails.lighthouseapp.com/projects/8994/tickets/3685-actionpack-235-ge... - config.gem "rack", :version => '~> 1.0.0' + # Explicitly require any rack version in the 1.1 series. This is necessary because + # ActionPack 2.3.8 explicitly specifies this as well, so if we run on a system with + # rack 1.2, it all breaks horribly if we don't force it back to 1.1 here. Some further + # discussion is at: + # https://rails.lighthouseapp.com/projects/8994/tickets/3685-actionpack-235-ge... + # https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5146 + config.gem "rack", :version => '~> 1.1.0' # Only load the plugins named here, in the order given (default is alphabetical). # :all can be used as a placeholder for all plugins not explicitly named ++++++ use-unix2_chkpwd.patch ++++++ --- /var/tmp/diff_new_pack.JlRc4v/_old 2010-11-20 12:35:32.000000000 +0100 +++ /var/tmp/diff_new_pack.JlRc4v/_new 2010-11-20 12:35:32.000000000 +0100 @@ -2,12 +2,12 @@ =================================================================== --- Makefile.orig +++ Makefile -@@ -54,16 +54,12 @@ WWW_BASE = /srv/www +@@ -54,15 +54,12 @@ WWW_BASE = /srv/www # Override this to get a different init script (e.g. "redhat") INIT_STYLE = suse --all: scripts/hawk.$(INIT_STYLE) hawk/config/lighttpd.conf tools/hawk_chkpwd -+all: scripts/hawk.$(INIT_STYLE) hawk/config/lighttpd.conf +-all: scripts/hawk.$(INIT_STYLE) hawk/config/lighttpd.conf tools/hawk_chkpwd tools/hawk_monitor ++all: scripts/hawk.$(INIT_STYLE) hawk/config/lighttpd.conf tools/hawk_monitor (cd hawk; rake makemo; rake freeze:rails; rake freeze:gems) %: %.in @@ -16,19 +16,18 @@ -tools/hawk_chkpwd: tools/hawk_chkpwd.c - gcc -o $@ $< -lpam - -- - clean: - rm -rf hawk/locale - rm -rf hawk/vendor -@@ -87,8 +83,6 @@ install: + tools/hawk_monitor: tools/hawk_monitor.c + gcc $(shell pkg-config --cflags glib-2.0) $(shell pkg-config --libs glib-2.0) \ + -I/usr/include/pacemaker -I/usr/include/heartbeat \ +@@ -94,8 +91,6 @@ install: rm $(DESTDIR)$(WWW_BASE)/hawk/config/lighttpd.conf.in -chown -R hacluster.haclient $(DESTDIR)$(WWW_BASE)/hawk install -D -m 0755 scripts/hawk.$(INIT_STYLE) $(DESTDIR)/etc/init.d/hawk - install -D -m 4750 tools/hawk_chkpwd $(DESTDIR)/usr/sbin/hawk_chkpwd - -chown root.haclient $(DESTDIR)/usr/sbin/hawk_chkpwd + install -D -m 0755 tools/hawk_monitor $(DESTDIR)/usr/sbin/hawk_monitor + ln -s /usr/sbin/hawk_monitor $(DESTDIR)$(WWW_BASE)/hawk/public/monitor - # Make a tar.bz2 named for the most recent human-readable tag - archive: Index: hawk/app/controllers/sessions_controller.rb =================================================================== --- hawk/app/controllers/sessions_controller.rb.orig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org