Hello community,
here is the log from the commit of package yast2-http-server for openSUSE:Factory checked in at 2013-08-12 11:05:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-http-server (Old)
and /work/SRC/openSUSE:Factory/.yast2-http-server.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-http-server"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-http-server/yast2-http-server.changes 2013-08-01 11:08:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-http-server.new/yast2-http-server.changes 2013-08-12 11:05:08.000000000 +0200
@@ -1,0 +2,7 @@
+Fri Aug 9 12:55:36 UTC 2013 - dmajda@suse.cz
+
+- fixed empty include files produced because of a YCP Killer bug
+ (gh#yast/ycp-killer#619)
+- 3.0.1
+
+-------------------------------------------------------------------
Old:
----
yast2-http-server-3.0.0.tar.bz2
New:
----
yast2-http-server-3.0.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-http-server.spec ++++++
--- /var/tmp/diff_new_pack.U8lAE7/_old 2013-08-12 11:05:09.000000000 +0200
+++ /var/tmp/diff_new_pack.U8lAE7/_new 2013-08-12 11:05:09.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-http-server
-Version: 3.0.0
+Version: 3.0.1
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-http-server-3.0.0.tar.bz2 -> yast2-http-server-3.0.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-http-server-3.0.0/Makefile.am.common new/yast2-http-server-3.0.1/Makefile.am.common
--- old/yast2-http-server-3.0.0/Makefile.am.common 2013-07-31 11:25:13.000000000 +0200
+++ new/yast2-http-server-3.0.1/Makefile.am.common 2013-08-09 15:22:02.000000000 +0200
@@ -30,10 +30,10 @@
dist-hook: check-syntax
CHECK_SYNTAX = true
-check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles)
- @if test "$(filter %.ycp,client_DATA)"; then \
+check-syntax: $(client_DATA) $(module_DATA) $(ynclude_DATA) $(ydata_DATA) $(ycpchook) $(ybcfiles)
+ @if test "$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; then \
if $(CHECK_SYNTAX); then \
- TO_CHECK="$(filter %.ycp,$^)"; \
+ TO_CHECK="$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; \
echo "Checking syntax of $${TO_CHECK}"; \
if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
@@ -42,6 +42,20 @@
else \
echo "Syntax check disabled"; \
fi; \
+ fi
+ @if test "$(filter %.rb, $^)"; then \
+ if $(CHECK_SYNTAX); then \
+ TO_CHECK="$(filter %.rb, $^)"; \
+ echo "Checking syntax of $${TO_CHECK}"; \
+ for f in $${TO_CHECK}; do \
+ if ! ruby -c $$f > /dev/null; then \
+ echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
+ exit 1; \
+ fi; \
+ done; \
+ else \
+ echo "Syntax check disabled"; \
+ fi; \
fi
-include .dep
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-http-server-3.0.0/VERSION new/yast2-http-server-3.0.1/VERSION
--- old/yast2-http-server-3.0.0/VERSION 2013-07-31 11:25:06.000000000 +0200
+++ new/yast2-http-server-3.0.1/VERSION 2013-08-09 15:21:49.000000000 +0200
@@ -1 +1 @@
-3.0.0
+3.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-http-server-3.0.0/configure new/yast2-http-server-3.0.1/configure
--- old/yast2-http-server-3.0.0/configure 2013-07-31 11:25:16.000000000 +0200
+++ new/yast2-http-server-3.0.1/configure 2013-08-09 15:22:06.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for yast2-http-server 3.0.0.
+# Generated by GNU Autoconf 2.69 for yast2-http-server 3.0.1.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -579,8 +579,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-http-server'
PACKAGE_TARNAME='yast2-http-server'
-PACKAGE_VERSION='3.0.0'
-PACKAGE_STRING='yast2-http-server 3.0.0'
+PACKAGE_VERSION='3.0.1'
+PACKAGE_STRING='yast2-http-server 3.0.1'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
PACKAGE_URL=''
@@ -1247,7 +1247,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-http-server 3.0.0 to adapt to many kinds of systems.
+\`configure' configures yast2-http-server 3.0.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1319,7 +1319,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-http-server 3.0.0:";;
+ short | recursive ) echo "Configuration of yast2-http-server 3.0.1:";;
esac
cat <<\_ACEOF
@@ -1399,7 +1399,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-http-server configure 3.0.0
+yast2-http-server configure 3.0.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1416,7 +1416,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-http-server $as_me 3.0.0, which was
+It was created by yast2-http-server $as_me 3.0.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2355,7 +2355,7 @@
# Define the identity of the package.
PACKAGE='yast2-http-server'
- VERSION='3.0.0'
+ VERSION='3.0.1'
cat >>confdefs.h <<_ACEOF
@@ -2478,7 +2478,7 @@
-VERSION="3.0.0"
+VERSION="3.0.1"
RPMNAME="yast2-http-server"
MAINTAINER="YaST2 Maintainers "
@@ -3404,7 +3404,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-http-server $as_me 3.0.0, which was
+This file was extended by yast2-http-server $as_me 3.0.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3457,7 +3457,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-yast2-http-server config.status 3.0.0
+yast2-http-server config.status 3.0.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-http-server-3.0.0/configure.ac new/yast2-http-server-3.0.1/configure.ac
--- old/yast2-http-server-3.0.0/configure.ac 2013-07-31 11:25:13.000000000 +0200
+++ new/yast2-http-server-3.0.1/configure.ac 2013-08-09 15:22:02.000000000 +0200
@@ -1,9 +1,9 @@
dnl configure.ac for yast2-http-server
dnl
-dnl -- This file is generated by y2autoconf 2.24.7 - DO NOT EDIT! --
+dnl -- This file is generated by y2autoconf 3.0.2 - DO NOT EDIT! --
dnl (edit configure.ac.in or configure.in.in instead)
-AC_INIT(yast2-http-server, 3.0.0, http://bugs.opensuse.org/, yast2-http-server)
+AC_INIT(yast2-http-server, 3.0.1, http://bugs.opensuse.org/, yast2-http-server)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="3.0.0"
+VERSION="3.0.1"
RPMNAME="yast2-http-server"
MAINTAINER="YaST2 Maintainers "
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-http-server-3.0.0/src/Makefile.in new/yast2-http-server-3.0.1/src/Makefile.in
--- old/yast2-http-server-3.0.0/src/Makefile.in 2013-07-31 11:25:17.000000000 +0200
+++ new/yast2-http-server-3.0.1/src/Makefile.in 2013-08-09 15:22:07.000000000 +0200
@@ -729,10 +729,10 @@
rm ${NEWDEP}
dist-hook: check-syntax
-check-syntax: $(client_DATA) $(ycpchook) $(ybcfiles)
- @if test "$(filter %.ycp,client_DATA)"; then \
+check-syntax: $(client_DATA) $(module_DATA) $(ynclude_DATA) $(ydata_DATA) $(ycpchook) $(ybcfiles)
+ @if test "$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; then \
if $(CHECK_SYNTAX); then \
- TO_CHECK="$(filter %.ycp,$^)"; \
+ TO_CHECK="$(filter %.ycp, $(client_DATA) $(ydata_DATA))"; \
echo "Checking syntax of $${TO_CHECK}"; \
if ! $(YCPC) -qE -M. -I. $(YCPCFLAGS) $${TO_CHECK}; then \
echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
@@ -741,6 +741,20 @@
else \
echo "Syntax check disabled"; \
fi; \
+ fi
+ @if test "$(filter %.rb, $^)"; then \
+ if $(CHECK_SYNTAX); then \
+ TO_CHECK="$(filter %.rb, $^)"; \
+ echo "Checking syntax of $${TO_CHECK}"; \
+ for f in $${TO_CHECK}; do \
+ if ! ruby -c $$f > /dev/null; then \
+ echo "Failed. Disable by 'make ... CHECK_SYNTAX=false' at your own risk"; \
+ exit 1; \
+ fi; \
+ done; \
+ else \
+ echo "Syntax check disabled"; \
+ fi; \
fi
-include .dep
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-http-server-3.0.0/src/include/http-server/dialogs.rb new/yast2-http-server-3.0.1/src/include/http-server/dialogs.rb
--- old/yast2-http-server-3.0.0/src/include/http-server/dialogs.rb 2013-07-30 13:05:30.000000000 +0200
+++ new/yast2-http-server-3.0.1/src/include/http-server/dialogs.rb 2013-08-09 15:21:49.000000000 +0200
@@ -1,13 +1,378 @@
# encoding: utf-8
-# File: include/http-server/complex.ycp
+# File: include/http-server/wizards.ycp
# Package: Configuration of http-server
-# Summary: Dialogs definitions
+# Summary: Wizards definitions
# Authors: Stanislav Visnovsky
#
# $Id$
module Yast
module HttpServerDialogsInclude
+ def initialize_http_server_dialogs(include_target)
+ textdomain "http-server"
+ Yast.import "YaST::HTTPDData"
+ Yast.import "HttpServer"
+ Yast.import "HttpServerWidgets"
+
+ Yast.import "Mode"
+ Yast.import "Popup"
+ Yast.import "ProductFeatures"
+ Yast.import "Label"
+ Yast.import "CWM"
+ Yast.import "CWMTab"
+ Yast.import "Wizard"
+ Yast.import "Service"
+ Yast.import "TablePopup"
+ Yast.import "Package"
+
+
+ @tabs_descr = {
+ "listen" => {
+ "header" => _("Listen Ports and Addresses"),
+ "contents" => HBox(
+ HStretch(),
+ HSpacing(1),
+ VBox(
+ "server_enable", #,
+ # `VSpacing(1)
+ # `VSpacing (1),
+ "LISTEN",
+ # `VSpacing (1),
+ "firewall_adapt",
+ # `VSpacing (1),
+ "logs"
+ ),
+ # `HSpacing (1),
+ HStretch()
+ ),
+ "widget_names" => [
+ "server_enable",
+ "LISTEN",
+ "firewall_adapt",
+ "logs"
+ ]
+ },
+ "modules" => {
+ "header" => _("Server Modules"),
+ "contents" => HBox(
+ HSpacing(1),
+ VBox(VSpacing(1), "MODULES", VSpacing(1)),
+ HSpacing(1)
+ ),
+ "widget_names" => ["MODULES"]
+ },
+ "main_host" => {
+ "header" => _("Main Host"),
+ "contents" => HBox(
+ HSpacing(1),
+ VBox(VSpacing(1), "MAIN_HOST", VSpacing(1)),
+ HSpacing(1)
+ ),
+ "widget_names" => ["MAIN_HOST"]
+ },
+ "hosts" => {
+ "header" => _("Hosts"),
+ "contents" => HBox(
+ HSpacing(1),
+ VBox(
+ VSpacing(1), #, `PushButton( `id( `set_default ), _("Set as De&fault") )
+ "HOSTS",
+ #`PushButton( `id( `set_default ), _("Set as De&fault") ),
+ VSpacing(1)
+ ),
+ HSpacing(1)
+ ),
+ "widget_names" => ["HOSTS"]
+ }
+ }
+
+ @descr = []
+ end
+
+ # Ask for confirmation (always)
+ # @return true if abort is confirmed
+ def ReallyAbortAlways
+ Popup.ReallyAbort(true)
+ end
+
+ # Abort dialog
+ # @return [Boolean] do abort
+ def Abort
+ !HttpServer.modified || Popup.ReallyAbort(true)
+ end
+
+ # Run server overview dialog
+ # @return [Symbol] for wizard sequencer
+ def OverviewDialog
+ caption = _("HTTP Server Configuration")
+ # if (HttpServer::firewall_first) tabs_descr["listen", "widget_names"]= [ "server_enable", "LISTEN", "logs" ];
+ widget_descr = {
+ "tab" => CWMTab.CreateWidget(
+ {
+ "tab_order" => ["listen", "modules", "main_host", "hosts"],
+ "tabs" => @tabs_descr,
+ "widget_descr" => HttpServerWidgets.widgets,
+ "initial_tab" => HttpServerWidgets.init_tab,
+ "tab_help" => ""
+ }
+ )
+ }
+ contents = VBox("tab")
+
+ w = CWM.CreateWidgets(
+ ["tab"],
+ Convert.convert(
+ widget_descr,
+ :from => "map",
+ :to => "map >"
+ )
+ )
+ help = CWM.MergeHelps(w)
+ contents = CWM.PrepareDialog(contents, w)
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.FinishButton
+ )
+ Wizard.RestoreAbortButton
+ Wizard.DisableBackButton
+
+ ret = CWM.Run(
+ w,
+ { :abort => fun_ref(method(:ReallyAbort), "boolean ()") }
+ )
+
+ ret
+ end
+
+
+ # Run single host configuration dialog
+ # @return [Symbol] for wizard sequencer
+ def HostDialog
+ w = CWM.CreateWidgets(["host", "vhost_res"], HttpServerWidgets.widgets)
+ contents = HBox(
+ HSpacing(1),
+ VBox(
+ VSpacing(1),
+ Ops.get_term(w, [0, "widget"]) { VSpacing(1) },
+ Ops.get_term(w, [1, "widget"]) { VSpacing(1) }
+ ),
+ HSpacing(1)
+ )
+
+ # translators: dialog caption
+ caption = Builtins.sformat(
+ _("Host '%1' Configuration"),
+ # translators: human-readable "default host"
+ HttpServerWidgets.currenthost == "main" ?
+ _("Main Host") :
+ HttpServerWidgets.get_host_value(
+ "ServerName",
+ YaST::HTTPDData.GetHost(HttpServerWidgets.currenthost),
+ HttpServerWidgets.currenthost
+ )
+ )
+
+ help = CWM.MergeHelps(w)
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.OKButton
+ )
+
+ ret = CWM.Run(
+ w,
+ { :abort => fun_ref(method(:ReallyAbort), "boolean ()") }
+ )
+ HttpServerWidgets.setHostOptions(nil) if ret == :back
+ ret
+ end
+
+
+ # Run virtual host list dialog
+ # @return [Symbol] for wizard sequencer
+ def HostsDialog
+ w = CWM.CreateWidgets(["hosts"], HttpServerWidgets.widgets)
+ contents = HBox(
+ HSpacing(1),
+ VBox(VSpacing(1), Ops.get_term(w, [0, "widget"]) { VSpacing(0) }, VSpacing(
+ 1
+ )),
+ HSpacing(1)
+ )
+
+ # dialog caption
+ caption = _("Configured Hosts")
+ help = CWM.MergeHelps(w)
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.OKButton
+ )
+
+ CWM.Run(w, { :abort => fun_ref(method(:Abort), "boolean ()") })
+ end
+ # Return wizard for adding new virtual host
+ # @return [Symbol] (`browse, `abort, `cancel, `next)
+ def AddHost
+ w = CWM.CreateWidgets(
+ ["vhost_id", "vhost_res"],
+ HttpServerWidgets.widgets
+ )
+ contents = HBox(
+ HSpacing(0.5),
+ VBox(
+ Ops.get_term(w, [0, "widget"]) { VSpacing(0) },
+ VSpacing(1),
+ Ops.get_term(w, [1, "widget"]) { VSpacing(0) },
+ HSpacing(0.5)
+ )
+ )
+
+ # translators: dialog caption
+ caption = _("New Host Information")
+
+ help = Ops.get_string(@HELPS, "add_host_general", "")
+
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.NextButton
+ )
+
+ CWM.Run(w, { :abort => fun_ref(method(:Abort), "boolean ()") })
+ end
+
+ # Set virtual host options
+ # @return [Symbol] from host widget
+ def SetVHostOptions
+ w = CWM.CreateWidgets(["vhost_details"], HttpServerWidgets.widgets)
+ contents = HBox(
+ HSpacing(0.5),
+ VBox(Ops.get_term(w, [0, "widget"]) { VSpacing(0) }, HSpacing(0.5))
+ )
+
+ # translators: dialog caption
+ caption = _("Virtual Host Details")
+
+ help = Ops.get_string(@HELPS, "set_vhost", "")
+
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.NextButton
+ )
+
+ CWM.Run(w, { :abort => fun_ref(method(:Abort), "boolean ()") })
+ end
+
+ # Run host SSL dialog
+ # @return [Symbol] for wizard sequencer
+ def SSLDialog
+ w = CWM.CreateWidgets(["ssl"], HttpServerWidgets.widgets)
+ contents = HBox(
+ HSpacing(1),
+ VBox(VSpacing(1), Ops.get_term(w, [0, "widget"]) { VSpacing(0) }, VSpacing(
+ 1
+ )),
+ HSpacing(1)
+ )
+
+ # translators: dialog caption, %1 is the host name
+ caption = Builtins.sformat(
+ _("SSL Configuration for '%1'"),
+ # translators: human-readable "default host"
+ HttpServerWidgets.currenthost == "main" ?
+ _("Default Host") :
+ HttpServerWidgets.get_host_value(
+ "ServerName",
+ YaST::HTTPDData.GetHost(HttpServerWidgets.currenthost),
+ HttpServerWidgets.currenthost
+ )
+ )
+
+ help = CWM.MergeHelps(w)
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.OKButton
+ )
+ if ProductFeatures.GetFeature("globals", "ui_mode") != "simple"
+ UI.ReplaceWidget(
+ Id(:_tp_table_repl),
+ #translators: pop up menu
+ MenuButton(
+ _("Certificates"),
+ [
+ #translators: Certificates pop-up menu item
+ Item(Id(:import_certificate), _("&Import Server Certificate...")),
+ #translators: Certificates pop-up menu item
+ Item(Id(:common_certificate), _("&Use Common Server Certificate"))
+ ]
+ )
+ )
+ end
+
+ CWM.Run(w, { :abort => fun_ref(method(:Abort), "boolean ()") })
+ end
+
+ # Directory dialog
+ # @return [Symbol] from directory widget
+ def DirDialog
+ w = CWM.CreateWidgets(["dir_name", "dir"], HttpServerWidgets.widgets)
+ contents = HBox(
+ HSpacing(0.5),
+ VBox(
+ Ops.get_term(w, [0, "widget"]) { VSpacing(0) },
+ VSpacing(1),
+ Ops.get_term(w, [1, "widget"]) { VSpacing(0) },
+ HSpacing(0.5)
+ )
+ )
+
+ # translators: dialog caption, %1 is the host name
+ caption = Builtins.sformat(
+ _("Dir Configuration for '%1'"),
+ # translators: human-readable "default host"
+ HttpServerWidgets.currenthost == "defaulthost" ?
+ _("Default Host") :
+ HttpServerWidgets.get_host_value(
+ "ServerName",
+ YaST::HTTPDData.GetHost(HttpServerWidgets.currenthost),
+ HttpServerWidgets.currenthost
+ )
+ )
+
+ help = CWM.MergeHelps(w)
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.OKButton
+ )
+
+ CWM.Run(w, { :abort => fun_ref(method(:Abort), "boolean ()") })
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-http-server-3.0.0/src/include/http-server/wizard-dialog.rb new/yast2-http-server-3.0.1/src/include/http-server/wizard-dialog.rb
--- old/yast2-http-server-3.0.0/src/include/http-server/wizard-dialog.rb 2013-07-30 13:05:30.000000000 +0200
+++ new/yast2-http-server-3.0.1/src/include/http-server/wizard-dialog.rb 2013-08-09 15:21:49.000000000 +0200
@@ -1,13 +1,314 @@
# encoding: utf-8
-# File: include/http-server/complex.ycp
+# File: include/http-server/wizards.ycp
# Package: Configuration of http-server
-# Summary: Dialogs definitions
+# Summary: Wizards definitions
# Authors: Stanislav Visnovsky
#
# $Id$
module Yast
module HttpServerWizardDialogInclude
+ def initialize_http_server_wizard_dialog(include_target)
+ textdomain "http-server"
+ Yast.import "HttpServerWidgets"
+ Yast.import "Wizard"
+ Yast.import "CWM"
+ Yast.import "Label"
+ Yast.import "HttpServer"
+ end
+ # Sequention used for determining on which ip adresses and port apache2 will listen and if firewall is enebled
+ # whether to open firewall on this port.
+ # @return [Symbol] (`back, `abort, `next)
+ def WizardSequence1
+ caption = _("HTTP Server Wizard (1/5)--Network Device Selection")
+ contents = HBox(
+ HStretch(),
+ VBox(
+ VSpacing(0.5),
+ "open_port",
+ VSpacing(0.5),
+ "listen_interfaces",
+ VSpacing(0.5),
+ "firewall_adapt",
+ VSpacing(8)
+ ),
+ HStretch()
+ )
+ widget_names = ["open_port", "listen_interfaces", "firewall_adapt"]
+ w = CWM.CreateWidgets(widget_names, HttpServerWidgets.widgets)
+ help = Ops.add(
+ "<h3>" + _("Network Device Selection") + "</h3>",
+ CWM.MergeHelps(w)
+ )
+ contents = CWM.PrepareDialog(contents, w)
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.NextButton
+ )
+ Wizard.DisableBackButton
+ Wizard.SetAbortButton(:abort, Label.CancelButton)
+
+ event = {}
+ ret = CWM.Run(
+ w,
+ { :abort => fun_ref(method(:ReallyAbort), "boolean ()") }
+ )
+
+ if ret == :next
+ #* Save entred parameters to map
+ if_all = Builtins.maplist(HttpServer.ip2device) { |ip, dev| ip }
+ if_sel = Convert.convert(
+ UI.QueryWidget(Id("multi_sel_box"), :SelectedItems),
+ :from => "any",
+ :to => "list <string>"
+ )
+ Builtins.y2milestone("All interfaces : %1", if_all)
+ Builtins.y2milestone(
+ "going next %1",
+ UI.QueryWidget(Id("open_port"), :Value)
+ )
+ Builtins.y2milestone("network interfaces : %1", if_sel)
+ all = true
+ finded = false
+ Builtins.foreach(if_all) do |interface|
+ finded = false
+ Builtins.foreach(if_sel) do |selected|
+ finded = true if selected == interface
+ end
+ all = false if !finded
+ end
+ Builtins.y2milestone("All: %1", all)
+ # save port information
+ Builtins.foreach(YaST::HTTPDData.GetCurrentListen) do |listens|
+ YaST::HTTPDData.DeleteListen(
+ Builtins.tointeger(Ops.get_string(listens, "PORT", "80")),
+ Builtins.tointeger(Ops.get_string(listens, "PORT", "80")),
+ Ops.get_string(listens, "ADDRESS", "")
+ )
+ end
+ # save interface information
+ if all == true
+ YaST::HTTPDData.CreateListen(
+ Builtins.tointeger(UI.QueryWidget(Id("open_port"), :Value)),
+ Builtins.tointeger(UI.QueryWidget(Id("open_port"), :Value)),
+ ""
+ )
+ else
+ # save firewall open port information
+ Builtins.foreach(if_sel) do |ip|
+ YaST::HTTPDData.CreateListen(
+ Builtins.tointeger(UI.QueryWidget(Id("open_port"), :Value)),
+ Builtins.tointeger(UI.QueryWidget(Id("open_port"), :Value)),
+ ip
+ )
+ Builtins.y2milestone("Listen on : %1", ip)
+ end
+ HttpServer.modified = true
+ end
+ end
+ Builtins.y2milestone(
+ "Listen string : %1",
+ YaST::HTTPDData.GetCurrentListen
+ )
+ Convert.to_symbol(ret)
+ end
+
+
+ # Sequence to choose some script language modules
+ # @return [Symbol] (`back, `abort, `next)
+ def WizardSequence2
+ caption = _("HTTP Server Wizard (2/5)--Modules")
+ contents = Top("script_modules")
+
+ widget_names = ["script_modules"]
+ w = CWM.CreateWidgets(widget_names, HttpServerWidgets.widgets)
+ help = Ops.add("<h3>" + _("Modules") + "</h3>", CWM.MergeHelps(w))
+ contents = CWM.PrepareDialog(contents, w)
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.NextButton
+ )
+ Wizard.SetAbortButton(:abort, Label.CancelButton)
+
+ event = {}
+ ret = CWM.Run(
+ w,
+ { :abort => fun_ref(method(:ReallyAbort), "boolean ()") }
+ )
+ if ret == :next
+ enable_php5 = Convert.to_boolean(
+ UI.QueryWidget(Id(:scr_mod_php5), :Value)
+ )
+ enable_perl = Convert.to_boolean(
+ UI.QueryWidget(Id(:scr_mod_perl), :Value)
+ )
+ enable_python = Convert.to_boolean(
+ UI.QueryWidget(Id(:scr_mod_python), :Value)
+ )
+ # boolean enable_ruby=(boolean) UI::QueryWidget( `id(`scr_mod_ruby), `Value );
+
+ Builtins.y2milestone("Saving script modules")
+ Builtins.y2milestone("PHP5 support %1", enable_php5)
+ Builtins.y2milestone("Perl support %1", enable_perl)
+ Builtins.y2milestone("Python support %1", enable_python)
+ # y2milestone("Ruby support %1", enable_ruby);
+ # create list of all standard modules
+ existing = Builtins.maplist(YaST::HTTPDData.GetKnownModules) do |mod|
+ YaST::HTTPDData.ModifyModuleList(
+ [Ops.get_locale(mod, "name", _("unknown"))],
+ Ops.get_locale(mod, "default", _("0")) == "1"
+ )
+ end
+ # add selected modules to that list
+ YaST::HTTPDData.ModifyModuleList(["php5"], enable_php5)
+ YaST::HTTPDData.ModifyModuleList(["perl"], enable_perl)
+ YaST::HTTPDData.ModifyModuleList(["python"], enable_python)
+ # YaST::HTTPDData::ModifyModuleList ([ "ruby" ], enable_ruby);
+
+ HttpServer.modified = true
+ end
+ Convert.to_symbol(ret)
+ end
+
+
+ # Sequence to configure default host parameters
+ # @return [Symbol] (`back, `abort, `next)
+ def WizardSequence3
+ caption = _("HTTP Server Wizard (3/5)--Default Host")
+ w = CWM.CreateWidgets(["MAIN_HOST"], HttpServerWidgets.widgets)
+ contents = HBox(
+ HSpacing(1),
+ VBox(VSpacing(1), Ops.get_term(w, [0, "widget"]) { VSpacing(0) }, VSpacing(
+ 1
+ )),
+ HSpacing(1)
+ )
+
+ # dialog caption
+ help = CWM.MergeHelps(w)
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.NextButton
+ )
+ Wizard.SetAbortButton(:abort, Label.CancelButton)
+
+ servername = Convert.to_string(
+ HttpServerWidgets.get_host_value(
+ "ServerName",
+ YaST::HTTPDData.GetHost("main"),
+ ""
+ )
+ )
+
+ serveradmin = Convert.to_string(
+ HttpServerWidgets.get_host_value(
+ "ServerAdmin",
+ YaST::HTTPDData.GetHost("main"),
+ ""
+ )
+ )
+
+ hostname = Convert.to_map(
+ SCR.Execute(path(".target.bash_output"), "/bin/hostname")
+ )
+ Builtins.y2milestone(
+ "Hostname : %1",
+ Ops.get_string(hostname, "stdout", "")
+ )
+ # if no ServerName or ServerAdmin readed from configuration file, the values based on machine hostname are used
+ if Builtins.size(servername) == 0
+ YaST::HTTPDData.ModifyHost(
+ "main",
+ HttpServerWidgets.set_host_value(
+ "ServerName",
+ YaST::HTTPDData.GetHost("main"),
+ Ops.get_string(hostname, "stdout", "")
+ )
+ )
+ end
+ if Builtins.size(serveradmin) == 0
+ YaST::HTTPDData.ModifyHost(
+ "main",
+ HttpServerWidgets.set_host_value(
+ "ServerAdmin",
+ YaST::HTTPDData.GetHost("main"),
+ Ops.add("root@", Ops.get_string(hostname, "stdout", ""))
+ )
+ )
+ end
+
+ CWM.Run(w, { :abort => fun_ref(method(:Abort), "boolean ()") })
+ end
+
+
+ # Sequence to cunfigure virtual hosts (add, remove, edit) and to change default host status
+ # @return [Symbol] (`back, `abort, `next)
+ def WizardSequence4
+ caption = _("HTTP Server Wizard (4/5)--Virtual Hosts")
+
+ w = CWM.CreateWidgets(["hosts"], HttpServerWidgets.widgets)
+ contents = HBox(
+ HSpacing(1),
+ VBox(VSpacing(1), Ops.get_term(w, [0, "widget"]) { VSpacing(0) }, VSpacing(
+ 1
+ )),
+ HSpacing(1)
+ )
+
+ # dialog caption
+ help = CWM.MergeHelps(w)
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.NextButton
+ )
+ Wizard.SetAbortButton(:abort, Label.CancelButton)
+
+ CWM.Run(w, { :abort => fun_ref(method(:Abort), "boolean ()") })
+ end
+
+
+ # Sequence to configure whether apache2 starts on boot or not (manually). Here is possible
+ # save all settings and exit or start expert configuration.
+ # @return [Symbol] (`back, `abort, `next)
+ def WizardSequence5
+ caption = _("HTTP Server Wizard (5/5)--Summary")
+
+ contents = VBox("booting", "summary_text", "expert_conf")
+ widget_names = ["booting", "summary_text", "expert_conf"]
+ w = CWM.CreateWidgets(widget_names, HttpServerWidgets.widgets)
+ help = CWM.MergeHelps(w)
+ contents = CWM.PrepareDialog(contents, w)
+
+ Wizard.SetContentsButtons(
+ caption,
+ contents,
+ help,
+ Label.BackButton,
+ Label.FinishButton
+ )
+ Wizard.SetAbortButton(:abort, Label.CancelButton)
+
+ event = {}
+ ret = CWM.Run(w, { :abort => fun_ref(method(:Abort), "boolean ()") })
+ Builtins.y2milestone("Return value from 5.th dialog : %1", ret)
+ Convert.to_symbol(ret)
+ end
end
end
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org