Hello community,
here is the log from the commit of package webyast-base-ui for openSUSE:Factory
checked in at Fri Jan 14 11:57:24 CET 2011.
--------
New Changes file:
--- /dev/null 2010-08-26 16:28:41.000000000 +0200
+++ /mounts/work_src_done/STABLE/webyast-base-ui/webyast-base-ui.changes 2011-01-06 13:54:34.000000000 +0100
@@ -0,0 +1,1058 @@
+-------------------------------------------------------------------
+Thu Jan 6 11:24:29 UTC 2011 - lslezak@suse.cz
+
+- fixed patching passenger_root in nginx.conf file
+- symlink additional nginx files (instead of hard copying)
+- 0.2.22
+
+-------------------------------------------------------------------
+Wed Dec 15 13:56:16 UTC 2010 - schubi@novell.com
+
+- switching to nginx
+ http://lists.opensuse.org/yast-devel/2010-12/msg00000.html
+- 0.2.21
+
+-------------------------------------------------------------------
+Mon Dec 13 10:54:09 UTC 2010 - vgorobets@novell.com
+
+- added reguired images, javascripts and stylesheets for Firewall module
+
+-------------------------------------------------------------------
+Thu Sep 23 08:05:50 UTC 2010 - vgorobets@novell.com
+
+- Webyast doesn't work over IPv6i (bnc#640102)
+- 0.2.20
+
+-------------------------------------------------------------------
+Wed Sep 15 15:19:59 UTC 2010 - schubi@novell.com
+
+- restart service correctly if the package has been renamed (bnc#637779)
+- 0.2.19
+
+-------------------------------------------------------------------
+Mon Sep 13 10:34:19 UTC 2010 - vgorobets@novell.com
+
+- disabled cookies result in ActionController::InvalidAuthenticityToken (bnc#637361)
+- 0.2.18
+
+-------------------------------------------------------------------
+Wed Sep 8 16:54:58 UTC 2010 - lslezak@suse.cz
+
+- fixed translation - use ngettext to properly translate plural
+ form ("1 patch" vs. "2 patches")
+- 0.2.17
+
+-------------------------------------------------------------------
+Tue Sep 7 09:07:32 UTC 2010 - schubi@novell.com
+
+- update translation
+- 0.2.16
+
+-------------------------------------------------------------------
+Mon Aug 30 07:29:46 UTC 2010 - schubi@novell.com
+
+- update translation
+- 0.2.15
+
+-------------------------------------------------------------------
+Fri Aug 27 15:00:15 CEST 2010 - mzugec@suse.cz
+
+- configuration for logrotate (bnc#634404)
+- 0.2.14
+
+-------------------------------------------------------------------
+Tue Aug 24 10:18:57 UTC 2010 - vgorobets@novell.com
+
+- translated text in JavaScript is not escaped (bnc#604224)
+- 0.2.13
+
+-------------------------------------------------------------------
+Mon Aug 23 12:18:15 UTC 2010 - jreidinger@novell.com
+
+- add url to spec file (bnc#625537)
+- move tasks to lib directory (bnc#622957)
+- fix url rewritter so it can change only port without host
+ (bnc#630346)
+- update translation
+- 0.2.12
+
+-------------------------------------------------------------------
+Mon Aug 23 09:00:34 UTC 2010 - vgorobets@novell.com
+
+- Clean up javascripts in webclient (bnc#597750)
+- 0.2.11
+
+-------------------------------------------------------------------
+Tue Aug 17 11:26:32 UTC 2010 - vgorobets@novell.com
+
+- When login webyast using IE8,it will logout after 30 seconds due to session timeout (bnc#631763)
+- 0.2.10
+
+-------------------------------------------------------------------
+Thu Aug 12 12:17:08 UTC 2010 - vgorobets@novell.com
+
+- added new function disableFormOnSubmit() to jqueryDiasableOnSubmit.js, this function will be called directly after form validation
+- 0.2.9
+
+-------------------------------------------------------------------
+Thu Aug 12 06:53:14 UTC 2010 - vgorobets@novell.com
+
+- show warning message 5 minutes before the session expires
+- fix for SLE_11_SP1 i586 broken build (ActionView::TemplateError: undefined method `to_i'), added class check for expiration date
+
+-------------------------------------------------------------------
+Wed Aug 11 07:03:42 UTC 2010 - vgorobets@novell.com
+
+- changed requires and provides package name from webyast-base-ui-branding-default to webyast-branding package
+- 0.2.8
+
+-------------------------------------------------------------------
+Tue Aug 10 13:29:04 UTC 2010 - vgorobets@novell.com
+
+- added jqueryDiasableOnSubmit.js javascript for the bug "Improve the javascript code for disconnection of Submit button after form is submited" (bnc#602374)
+- added jquery.blockUI and jqueryDiasableOnSubmit to js:base rake task
+- 0.2.7
+
+-------------------------------------------------------------------
+Tue Aug 10 07:05:14 UTC 2010 - vgorobets@novell.com
+
+- another fix for bug "Automatically inform user about session time out" (bnc#558026)
+- 0.2.6
+
+-------------------------------------------------------------------
+Fri Aug 6 13:38:28 CEST 2010 - jsuchome@suse.cz
+
+- check vendor subdirectory for config files (bnc#628654)
+- 0.2.5
+
+-------------------------------------------------------------------
+Thu Aug 5 12:51:24 UTC 2010 - vgorobets@novell.com
+
+- Search domains validation (bnc#607103) - accept several domain names separated through whitespace
+- commented out the code for Automatically inform user about session time out bnc#558026
+- removed jquery.idleTimout and jquery.Idletimer from the list of javascripts to be compressed
+- 0.2.4
+-------------------------------------------------------------------
+Thu Aug 5 10:26:56 UTC 2010 - vgorobets@novell.com
+
+- moved inline css from eula module show.html.erb to style.sass
+
+-------------------------------------------------------------------
+Wed Aug 4 14:46:07 UTC 2010 - vgorobets@novell.com
+- canseled webyast-base-ui 0.2.4 release because of missing license in jqueryIdletimout script
+- decrease the webyast-base-ui back to version to 0.2.3
+
+-------------------------------------------------------------------
+Wed Aug 4 13:52:07 UTC 2010 - vgorobets@novell.com
+
+- added rake js:base call to the spec file
+- Split branding files (.css, .png, .ico, ...) from webyast-client to separate webyast-branding-default package (bnc#586630)
+- Control panel should inform about missing modules (bnc#602340)
+- show graphs in a double row instead of single on if number of graphs is more than 1
+(saved vertical space, raises readableness and prevent unnecessary scrolling)
+- added "min" directory task as prerequisites to rake js:base
+- fixed Language selection looks resizable (bnc#605861)
+- fixed Automatically inform user about session time out bnc#558026
+- Fixed Chrome/Chromium version detection.
+It broke the whole rest of base-min.js so quicksearch stopped working. (mzugec)
+- removed all minified javascipt files from git
+- fix generating of minified css (jreidinger)
+- 0.2.4
+
+
+-------------------------------------------------------------------
+Wed Aug 4 10:59:18 CEST 2010 - jsuchome@suse.cz
+
+- check display_status for displaying status
+- make top label configurable ("My Appliance")
+- 0.2.3
+
+-------------------------------------------------------------------
+Fri Jul 30 08:45:06 UTC 2010 - jreidinger@novell.com
+
+- fix generation of minified css
+- 0.2.2
+
+-------------------------------------------------------------------
+Thu Jul 29 13:42:53 UTC 2010 - jreidinger@novell.com
+
+- remove generated file
+- 0.2.1
+
+-------------------------------------------------------------------
+Thu Jul 29 08:54:24 UTC 2010 - jreidinger@novell.com
+
+- css code clean up (vgorobets)
+- several IE8 fixes (vgorobets)
+- fixed "don't put space before argument parentheses" (mvidner)
+- added run validation immediately (onchage)
+- fixed floating/padding issue between input fields (vgorobets)
+- added separately css file for IE fixes (vgorobets)
+- changed text shadow for action links (vgorobets)
+- adaptation to background patch install
+- fixed wrong path to the css compresor script cssmin.rb (vgorobets)
+- exclude ie_fixes.css from the liste of the files to be minified
+ to prevent it from using in other browsers (vgorobets)
+- do not minify the ie_fixes.css because of possible use of IE hacks,
+ which could be broken by css compressing (vgorobets)
++++ 861 more lines (skipped)
++++ between /dev/null
++++ and /mounts/work_src_done/STABLE/webyast-base-ui/webyast-base-ui.changes
calling whatdependson for head-i586
New:
----
control_panel.yml
nginx.conf
webyast-base-ui.changes
webyast-base-ui.spec
webyast-ui
webyast-ui.lr.conf
www.tar.bz2
yastwc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ webyast-base-ui.spec ++++++
#
# spec file for package webyast-base-ui
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: webyast-base-ui
Recommends: WebYaST(org.opensuse.yast.modules.basesystem)
# bnc#634404
Recommends: logrotate
Provides: yast2-webclient = %{version}
Obsoletes: yast2-webclient < %{version}
Requires: ruby-fcgi, sqlite, syslog-ng, check-create-certificate
Requires: webyast-branding
PreReq: rubygem-rake, rubygem-sqlite3
PreReq: rubygem-rails-2_3 >= 2.3.4
PreReq: rubygem-gettext_rails
PreReq: yast2-runlevel
%if 0%{?suse_version} == 0 || %suse_version > 1110
# 11.2 or newer
%if 0%{?suse_version} > 1120
# since 11.3, they are in a separate subpackage
Requires: sysvinit-tools
%else
# Require startproc respecting -p, bnc#559534#c44
Requires: sysvinit > 2.86-215.2
%endif
%else
# 11.1 or SLES11
Requires: sysvinit > 2.86-195.3.1
%endif
Requires: nginx-passenger
License: LGPLv2.1 ; ASLv2.0
Group: Productivity/Networking/Web/Utilities
Url: http://en.opensuse.org/Portal:WebYaST
AutoReqProv: on
Version: 0.2.22
Release: 1
Summary: WebYaST - base UI for system management
Source: www.tar.bz2
Source2: yastwc
Source4: webyast-ui
Source5: control_panel.yml
Source6: webyast-ui.lr.conf
Source7: nginx.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: ruby
BuildRequires: rubygem-sqlite3 sqlite
BuildRequires: rubygem-rails-2_3 >= 2.3.4
BuildRequires: rubygem-gettext_rails rubygem-selenium-client rubygem-yast2-webservice-tasks
BuildRequires: rubygem-haml tidy
BuildArch: noarch
BuildRequires: rubygem-mocha rubygem-test-unit
BuildRequires: nginx-passenger
#
%description
WebYaST - Provides core web client for WebYaST service.
Without plugins has only very limited configuration options.
Authors:
--------
Duncan Mac-Vicar Prett
Bjoern Geuken
Stefan Schubert
Klaus Kaempf
Josef Reidinger
%package testsuite
License: LGPLv2.1 ; ASLv2.0
Group: Productivity/Networking/Web/Utilities
Requires: %{name} = %{version}
Requires: rubygem-mocha rubygem-test-unit tidy
Summary: Testsuite for webyast-base-ui package
%description testsuite
This package contains complete testsuite for webyast-base-ui package.
It is only needed for verifying the functionality of the package
and it is not needed at runtime.
%package branding-default
License: LGPLv2.1 ; ASLv2.0
Group: Productivity/Networking/Web/Utilities
Provides: webyast-branding
Requires: %{name} = %{version}
#Requires: rubygem-mocha rubygem-test-unit tidy
Summary: Branding package for webyast-base-ui package
%description branding-default
This package contains css, icons and images for webyast-base-ui package.
%prep
%setup -q -n www
%build
env LANG=en rake makemo
rake sass:update
rake js:base
rm -r app/sass
%check
# run the testsuite
RAILS_ENV=test rake db:migrate
RAILS_ENV=test rake test
%install
#
# Install all web and frontend parts.
#
mkdir -p $RPM_BUILD_ROOT/%{webyast_ui_dir}/log
mkdir -p $RPM_BUILD_ROOT/%{webyast_ui_dir}/tmp
cp -a * $RPM_BUILD_ROOT/%{webyast_ui_dir}
rm -rf $RPM_BUILD_ROOT/%{webyast_ui_dir}/log/*
rm -rf $RPM_BUILD_ROOT/%{webyast_ui_dir}/po
rm -f $RPM_BUILD_ROOT/%{webyast_ui_dir}/COPYING
#
# init script
#
%{__install} -d -m 0755 \
%{buildroot}%{_sbindir}
%{__install} -D -m 0755 %SOURCE2 \
%{buildroot}%{_sysconfdir}/init.d/%{webyast_ui_service}
%{__ln_s} -f %{_sysconfdir}/init.d/%{webyast_ui_service} %{buildroot}%{_sbindir}/rc%{webyast_ui_service}
#
# configure lighttpd/nginx web service
mkdir -p $RPM_BUILD_ROOT/etc/lighttpd/certs
# configure nginx web service
mkdir -p $RPM_BUILD_ROOT/etc/yastwc/
install -m 0644 %SOURCE7 $RPM_BUILD_ROOT/etc/yastwc/
# create symlinks to nginx config files
ln -s /etc/nginx/fastcgi.conf $RPM_BUILD_ROOT/etc/yastwc
ln -s /etc/nginx/fastcgi_params $RPM_BUILD_ROOT/etc/yastwc
ln -s /etc/nginx/koi-utf $RPM_BUILD_ROOT/etc/yastwc
ln -s /etc/nginx/koi-win $RPM_BUILD_ROOT/etc/yastwc
ln -s /etc/nginx/mime.types $RPM_BUILD_ROOT/etc/yastwc
ln -s /etc/nginx/scgi_params $RPM_BUILD_ROOT/etc/yastwc
ln -s /etc/nginx/uwsgi_params $RPM_BUILD_ROOT/etc/yastwc
ln -s /etc/nginx/win-utf $RPM_BUILD_ROOT/etc/yastwc
# firewall service definition, bnc#545627
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services
install -m 0644 %SOURCE4 $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services
# logrotate configuration bnc#634404
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m 0644 %SOURCE6 $RPM_BUILD_ROOT/etc/logrotate.d
# create empty tmp directory
mkdir -p $RPM_BUILD_ROOT/%{webyast_ui_dir}/tmp
mkdir -p $RPM_BUILD_ROOT/%{webyast_ui_dir}/tmp/cache
mkdir -p $RPM_BUILD_ROOT/%{webyast_ui_dir}/tmp/pids
mkdir -p $RPM_BUILD_ROOT/%{webyast_ui_dir}/tmp/sessions
mkdir -p $RPM_BUILD_ROOT/%{webyast_ui_dir}/tmp/sockets
# install YAML config file
mkdir -p $RPM_BUILD_ROOT/etc/webyast/
cp %SOURCE5 $RPM_BUILD_ROOT/etc/webyast/
#create dummy update-script
mkdir -p %buildroot/var/adm/update-scripts
touch %buildroot/var/adm/update-scripts/%name-%version-%release-1
%clean
rm -rf $RPM_BUILD_ROOT
%pre
# services will not be restarted correctly if
# the package name will changed while the update
# So the service will be restarted by an update-script
# which will be called AFTER the installation
if /bin/rpm -q yast2-webclient > /dev/null ; then
echo "renaming yast2-webclient to webyast-base-ui"
if /sbin/yast runlevel summary service=yastwc 2>&1|grep " 3 "|grep yastwc >/dev/null ; then
echo "yastwc is inserted into the runlevel"
echo "#!/bin/sh" > %name-%version-%release-1
echo "/sbin/yast runlevel add service=yastwc" >> %name-%version-%release-1
echo "/usr/sbin/rcyastwc restart" >> %name-%version-%release-1
else
if /usr/sbin/rcyastwc status > /dev/null ; then
echo "yastwc is running"
echo "#!/bin/sh" > %name-%version-%release-1
echo "/usr/sbin/rcyastwc restart" >> %name-%version-%release-1
fi
fi
if [ -f %name-%version-%release-1 ] ; then
install -D -m 755 %name-%version-%release-1 /var/adm/update-scripts
rm %name-%version-%release-1
echo "Please check the service runlevels and restart WebYaST client with \"rcyastwc restart\" if the update has not been called with zypper,yast or packagekit"
fi
fi
exit 0
%post
%fillup_and_insserv %{webyast_ui_service}
#
# create database
#
cd %{webyast_ui_dir}
RAILS_ENV=production rake db:migrate
chgrp %{webyast_ui_user} db db/*.sqlite* log log/*
chown %{webyast_ui_user} db db/*.sqlite* log log/*
chmod 700 log
chmod 755 db
chmod 600 db/*.sqlite* log/*
%preun
%stop_on_removal %{webyast_ui_service}
%postun
%restart_on_update %{webyast_ui_service}
%{insserv_cleanup}
# restart yastwc on nginx update (bnc#559534)
%triggerin -- nginx
%restart_on_update %{webyast_ui_service}
%files
%defattr(-,root,root)
%dir /etc/yastwc
%dir %{webyast_ui_dir}
%{webyast_ui_dir}/locale
%{webyast_ui_dir}/vendor
%{webyast_ui_dir}/app
%{webyast_ui_dir}/db
%{webyast_ui_dir}/doc
%{webyast_ui_dir}/lib
%{webyast_ui_dir}/public
%{webyast_ui_dir}/Rakefile
%{webyast_ui_dir}/README*
%{webyast_ui_dir}/INSTALL
%{webyast_ui_dir}/script
%{webyast_ui_dir}/config
%config %{webyast_ui_dir}/config/initializers/session_store.rb
%{webyast_ui_dir}/start.sh
%doc README* COPYING
%attr(-,%{webyast_ui_user},%{webyast_ui_user}) %{webyast_ui_dir}/log
%attr(-,%{webyast_ui_user},%{webyast_ui_user}) %{webyast_ui_dir}/tmp
%attr(-,%{webyast_ui_user},root) %{webyast_ui_dir}/public/javascripts
%config /etc/sysconfig/SuSEfirewall2.d/services/webyast-ui
%dir /etc/lighttpd
%dir /etc/lighttpd/certs
%config %{_sysconfdir}/init.d/%{webyast_ui_service}
%{_sbindir}/rc%{webyast_ui_service}
%dir /etc/webyast/
%config /etc/webyast/control_panel.yml
#nginx stuff
%config(noreplace) /etc/yastwc/nginx.conf
%config /etc/yastwc/fastcgi.conf
%config /etc/yastwc/fastcgi_params
%config /etc/yastwc/koi-utf
%config /etc/yastwc/koi-win
%config /etc/yastwc/mime.types
%config /etc/yastwc/scgi_params
%config /etc/yastwc/uwsgi_params
%config /etc/yastwc/win-utf
#logrotate configuration file
%config(noreplace) /etc/logrotate.d/webyast-ui.lr.conf
### exclude css, icons and images
%exclude %{webyast_ui_dir}/public/stylesheets
%exclude %{webyast_ui_dir}/public/icons
%exclude %{webyast_ui_dir}/public/images
%ghost %attr(755,root,root) /var/adm/update-scripts/%name-%version-%release-1
%files testsuite
%defattr(-,root,root)
%{webyast_ui_dir}/test
%files branding-default
%defattr(-,root,root)
### include css, icons and images
%{webyast_ui_dir}/public/stylesheets
%{webyast_ui_dir}/public/icons
%{webyast_ui_dir}/public/images
%changelog
++++++ control_panel.yml ++++++
# This is a config file for WebYaST control center
#
# The file needs to be located under /etc/webyast/ or /etc/webyast/vendor/
# (the 'vendor' directory has higher priority).
---
# timeout before automatic reloading of patches status (in seconds)
# value 0 disables automatic reload
# default: 28800 seconds = 8 hours
patch_status_timeout: 28800
# timeout before automatic reloading of patches status (in seconds)
# value 0 disables automatic reload
# default: 300 seconds = 5 minutes
system_status_timeout: 300
# display patches status in the status header
# default: true
display_patch_status: true
# display system status in the status header
# default: true
display_system_status: true
# label shown at the top of each page
appliance_label: _("My Appliance")
++++++ nginx.conf ++++++
user nobody nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid /var/run/yastwc.pid;
events {
worker_connections 1024;
}
http {
# Note: passenger_root option is automatically updated by
# /etc/init.d/yastwc script at start up
passenger_root /usr/lib64/ruby/gems/1.8/gems/passenger-3.0.1;
passenger_ruby /usr/bin/ruby;
passenger_pool_idle_time 300;
passenger_min_instances 0;
passenger_default_user nobody;
passenger_user nobody;
passenger_max_pool_size 1;
passenger_max_instances_per_app 1;
passenger_spawn_method conservative;
client_body_temp_path /var/lib/nginx/tmp_yastwc 1 2;
fastcgi_temp_path /var/lib//nginx/fastcgi_yastwc 1 2;
proxy_temp_path /var/lib//nginx/proxy_yastwc 1 2;
include mime.types;
default_type application/octet-stream;
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 54984;
server_name 0.0.0.0;
root /srv/www/yast/public;
passenger_enabled on;
rails_framework_spawner_idle_time 300;
rails_app_spawner_idle_time 300;
ssl on;
ssl_certificate /etc/lighttpd/certs/webyast.pem;
ssl_certificate_key /etc/lighttpd/certs/webyast.key;
ssl_session_timeout 5m;
ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
ssl_prefer_server_ciphers on;
}
}
++++++ webyast-ui ++++++
# SuSEfirewall2 service definition
## Name: WebYaST UI
## Description: The front end of WebYaST, http://en.opensuse.org/WebYaST
# space separated list of allowed TCP ports
TCP="54984"
++++++ webyast-ui.lr.conf ++++++
/srv/www/yast/log/production.log /srv/www/yast/log/development.log /srv/www/yast/log/lighttpd.access.log /srv/www/yast/log/lighttpd.error.log {
compress
dateext
maxage 365
rotate 99
size=+4096k
notifempty
missingok
create 600 nobody nobody
postrotate
/etc/init.d/yastwc reload
endscript
}
++++++ yastwc ++++++
#!/bin/sh
#
# Copyright (C) 1995--2007 Marcus Rückert, SUSE / Novell Inc.
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or (at
# your option) any later version.
#
# This library is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
# USA.
#
# /etc/init.d/yastwc
# and its symbolic link
# /(usr/)sbin/rcyastwc
#
#
# LSB compatible service control script; see http://www.linuxbase.org/spec/
#
# Note: This template uses functions rc_XXX defined in /etc/rc.status on
# UnitedLinux/SUSE/Novell based Linux distributions. If you want to base your
# script on this template and ensure that it works on non UL based LSB
# compliant Linux distributions, you either have to provide the rc.status
# functions from UL or change the script to work without them.
# See skeleton.compat for a template that works with other distros as well.
#
### BEGIN INIT INFO
# Provides: yastwc
# Required-Start: $syslog $remote_fs
# Should-Start: $time ypbind sendmail
# Required-Stop: $syslog $remote_fs
# Should-Stop: $time ypbind sendmail
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: yastwc
# Description: Start yastwc
### END INIT INFO
#
# Any extensions to the keywords given above should be preceeded by
# X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB.
#
# Notes on Required-Start/Should-Start:
# * There are two different issues that are solved by Required-Start
# and Should-Start
# (a) Hard dependencies: This is used by the runlevel editor to determine
# which services absolutely need to be started to make the start of
# this service make sense. Example: nfsserver should have
# Required-Start: $portmap
# Also, required services are started before the dependent ones.
# The runlevel editor will warn about such missing hard dependencies
# and suggest enabling. During system startup, you may expect an error,
# if the dependency is not fulfilled.
# (b) Specifying the init script ordering, not real (hard) dependencies.
# This is needed by insserv to determine which service should be
# started first (and at a later stage what services can be started
# in parallel). The tag Should-Start: is used for this.
# It tells, that if a service is available, it should be started
# before. If not, never mind.
# * When specifying hard dependencies or ordering requirements, you can
# use names of services (contents of their Provides: section)
# or pseudo names starting with a $. The following ones are available
# according to LSB (1.1):
# $local_fs all local file systems are mounted
# (most services should need this!)
# $remote_fs all remote file systems are mounted
# (note that /usr may be remote, so
# many services should Require this!)
# $syslog system logging facility up
# $network low level networking (eth card, ...)
# $named hostname resolution available
# $netdaemons all network daemons are running
# The $netdaemons pseudo service has been removed in LSB 1.2.
# For now, we still offer it for backward compatibility.
# These are new (LSB 1.2):
# $time the system time has been set correctly
# $portmap SunRPC portmapping service available
# UnitedLinux extensions:
# $ALL indicates that a script should be inserted
# at the end
# * The services specified in the stop tags
# (Required-Stop/Should-Stop)
# specify which services need to be still running when this service
# is shut down. Often the entries there are just copies or a subset
# from the respective start tag.
# * Should-Start/Stop are now part of LSB as of 2.0,
# formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop.
# insserv does support both variants.
# * X-UnitedLinux-Default-Enabled: yes/no is used at installation time
# (%fillup_and_insserv macro in %post of many RPMs) to specify whether
# a startup script should default to be enabled after installation.
# It's not used by insserv.
#
# Note on runlevels:
# 0 - halt/poweroff 6 - reboot
# 1 - single user 2 - multiuser without network exported
# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
#
# Note on script names:
# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html
# A registry has been set up to manage the init script namespace.
# http://www.lanana.org/
# Please use the names already registered or register one or use a
# vendor prefix.
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
NGINX_BIN=/usr/sbin/nginx
test -x $NGINX_BIN || { echo "$NGINX_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
# Check for existence of needed config file and read it
NGINX_CONFIG=/etc/yastwc/nginx.conf
test -r $NGINX_CONFIG || { echo "$NGINX_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
PID_FILE=/var/run/yastwc.pid
CERTIFICATEFILE=/etc/lighttpd/certs/webyast.pem
CERTKEYFILE=/etc/lighttpd/certs/webyast.key
COMBINEDCERTFILE=/etc/lighttpd/certs/webyast-combined.pem
# Source LSB init functions
# providing start_daemon, killproc, pidofproc,
# log_success_msg, log_failure_msg and log_warning_msg.
# This is currently not used by UnitedLinux based distributions and
# not needed for init scripts for UnitedLinux only. If it is used,
# the functions from rc.status should not be sourced or used.
#. /lib/lsb/init-functions
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v be verbose in local rc status and clear it afterwards
# rc_status -v -r ditto and clear both the local and overall rc status
# rc_status -s display "skipped" and exit with status 3
# rc_status -u display "unused" and exit with status 3
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num>
# rc_reset clear both the local and overall rc status
# rc_exit exit appropriate to overall rc status
# rc_active checks whether a service is activated by symlinks
. /etc/rc.status
# Reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.
case "$1" in
start)
if [ ! -e $COMBINEDCERTFILE ]
then
echo "No certificate found. Creating one now."
if ! /usr/sbin/check-create-certificate -c -C $CERTIFICATEFILE -K $CERTKEYFILE -B $COMBINEDCERTFILE -D webyast -O WebYaST -U WebYaST >/srv/www/yast/log/check-create-certificate.log 2>&1
then
echo -n "Can not create certificate. Please see /srv/www/yast/log/check-create-certificate.log for details."
rc_failed
rc_status -v
rc_exit
fi
chown nobody:nobody $CERTIFICATEFILE $CERTKEYFILE $COMBINEDCERTFILE
fi
echo -n "Starting yastwc "
#generate deployment specific secret key (bnc#591345)
SECRET=`cd /srv/www/yast/ && rake -s secret`
if [ -z $SECRET ]; then
echo -n "Can generate secret for session. Run 'cd /srv/www/yast/ && rake -s secret' for details."
rc_failed
rc_status -v
rc_exit
fi
sed -i 's/f05944f2fa89ced61528d66622c2f5f4dded5912a1276890d2907d012c416f3a32f22dbd22f24614346c1360380dbf71a6fcbbc0e32b2d0cc6812afc623d6c41/'"$SECRET"/ /srv/www/yast/config/initializers/session_store.rb
# patch passenger config root if the current config is different (after updating passenger or on a different arch than the default)
grep -q "^[ \\t]*passenger_root[ \\t][ \\t]*`passenger-config --root`;" $NGINX_CONFIG ||
sed -i.bak "s#^\\([ \\t]*\\)passenger_root[ \\t].*\$#\\1passenger_root `passenger-config --root`;#" $NGINX_CONFIG
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
/sbin/startproc -p $PID_FILE $NGINX_BIN -c $NGINX_CONFIG
# Remember status and be verbose
rc_status -v
# print the URL of the server
# if test "$?" -eq 0; then
# IFC=`LC_ALL=C route | grep "^default" | tr -s " " | cut -d " " -f 8`
# IP=`LC_ALL=C ifconfig $IFC | grep "inet addr" | cut -d ":" -f 2 | cut -d " " -f 1`
# PORT=`LC_ALL=C grep "^server.port" $LIGHTTPD_CONFIG | cut -d " " -f 3`
# if [ -n "$IP" ]; then
# echo -e "\t${done}The WebYaST client service is running at https://$IP:$PORT/${norm}\n"
# else
# echo -e "\t${warn}WebYaST could not determine the IP address for $IFC${norm}\n"
# fi
# fi
;;
stop)
echo -n "Shutting down yastwc "
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.
/sbin/killproc -TERM -p $PID_FILE $NGINX_BIN
# Remember status and be verbose
rc_status -v
;;
try-restart|condrestart)
## Do a restart only if the service was active before.
## Note: try-restart is now part of LSB (as of 1.9).
## RH has a similar command named condrestart.
if test "$1" = "condrestart"; then
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
fi
$0 status
if test $? = 0; then
$0 restart
else
rc_reset # Not running is not a failure.
fi
# Remember status and be quiet
rc_status
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
force-reload)
## Signal the daemon to reload its config. Most daemons
## do this on signal 1 (SIGHUP).
## If it does not support it, restart the service if it
## is running.
echo -n "Reload service yastwc "
## if it supports it:
/sbin/killproc -p $PID_FILE -HUP $NGINX_BIN
rc_status -v
## Otherwise:
#$0 try-restart
#rc_status
;;
reload)
## Like force-reload, but if daemon does not support
## signaling, do nothing (!)
# If it supports signaling:
echo -n "Reload service yastwc "
/sbin/killproc -HUP -p $PID_FILE $NGINX_BIN
#touch /var/run/yastwc.pid
rc_status -v
## Otherwise if it does not support reload:
#rc_failed 3
#rc_status -v
;;
status)
echo -n "Checking for service yastwc "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
# Return value is slightly different for the status command:
# 0 - service up and running
# 1 - service dead, but /var/run/ pid file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running (unused)
# 4 - service status unknown :-(
# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
# NOTE: checkproc returns LSB compliant status values.
/sbin/checkproc -p $PID_FILE $NGINX_BIN
# NOTE: rc_status knows that we called this init script with
# "status" option and adapts its messages accordingly.
rc_status -v
;;
probe)
## Optional: Probe for the necessity of a reload, print out the
## argument to this init script which is required for a reload.
## Note: probe is not (yet) part of LSB (as of 1.9)
test $NGINX_CONFIG /var/run/yastwc.pid && echo reload
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
exit 1
;;
esac
rc_exit
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org