Mailinglist Archive: opensuse-commit (1500 mails)

< Previous Next >
commit yast2-http-server
  • From: root@xxxxxxx (h_root)
  • Date: Mon, 20 Nov 2006 10:18:32 +0100 (CET)
  • Message-id: <20061120091832.C3AD119AB18@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package yast2-http-server
checked in at Mon Nov 20 10:18:32 CET 2006.

--------
--- yast2-http-server/yast2-http-server.changes 2006-11-06 14:30:39.000000000 +0100
+++ /mounts/work_src_done/NOARCH/yast2-http-server/yast2-http-server.changes 2006-11-20 10:05:22.000000000 +0100
@@ -1,0 +2,6 @@
+Mon Nov 20 09:57:12 CET 2006 - mzugec@xxxxxxx
+
+- #220756 - yast2 http-server does not accept any servername
+- 2.14.4
+
+-------------------------------------------------------------------

Old:
----
yast2-http-server-2.14.3.tar.bz2

New:
----
yast2-http-server-2.14.4.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-http-server.spec ++++++
--- /var/tmp/diff_new_pack.na1shH/_old 2006-11-20 10:18:26.000000000 +0100
+++ /var/tmp/diff_new_pack.na1shH/_new 2006-11-20 10:18:26.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-http-server (Version 2.14.3)
+# spec file for package yast2-http-server (Version 2.14.4)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild

Name: yast2-http-server
-Version: 2.14.3
+Version: 2.14.4
Release: 1
-License: GNU General Public License (GPL) - all versions
+License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-http-server-2.14.3.tar.bz2
+Source0: yast2-http-server-2.14.4.tar.bz2
prefix: /usr
BuildRequires: docbook-xsl-stylesheets doxygen libxslt libzio perl-XML-Writer popt-devel sgml-skel update-desktop-files yast2 yast2-devtools yast2-dns-server yast2-network yast2-packagemanager-devel yast2-perl-bindings yast2-testsuite
Requires: yast2 yast2-network yast2-firewall yast2-perl-bindings libzio yast2-dns-server
@@ -34,7 +34,7 @@
Stanislav Visnovsky <visnov@xxxxxxx>

%prep
-%setup -n yast2-http-server-2.14.3
+%setup -n yast2-http-server-2.14.4

%build
%{prefix}/bin/y2tool y2autoconf
@@ -70,6 +70,9 @@
%doc %{prefix}/share/doc/packages/yast2-http-server

%changelog -n yast2-http-server
+* Mon Nov 20 2006 - mzugec@xxxxxxx
+- #220756 - yast2 http-server does not accept any servername
+- 2.14.4
* Mon Nov 06 2006 - mzugec@xxxxxxx
- add yast2-dns-server to requires
- 2.14.3

++++++ yast2-http-server-2.14.3.tar.bz2 -> yast2-http-server-2.14.4.tar.bz2 ++++++
++++ 1752 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-http-server-2.14.3/VERSION new/yast2-http-server-2.14.4/VERSION
--- old/yast2-http-server-2.14.3/VERSION 2006-11-06 14:28:29.000000000 +0100
+++ new/yast2-http-server-2.14.4/VERSION 2006-11-20 09:57:09.000000000 +0100
@@ -1 +1 @@
-2.14.3
+2.14.4
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-http-server-2.14.3/configure.in new/yast2-http-server-2.14.4/configure.in
--- old/yast2-http-server-2.14.3/configure.in 2006-11-06 14:27:25.000000000 +0100
+++ new/yast2-http-server-2.14.4/configure.in 2006-11-20 09:38:39.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.13.21 - DO NOT EDIT! --
dnl (edit configure.in.in instead)

-AC_INIT(yast2-http-server, 2.14.2, http://bugs.opensuse.org/, yast2-http-server)
+AC_INIT(yast2-http-server, 2.14.3, http://bugs.opensuse.org/, yast2-http-server)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])

@@ -17,7 +17,7 @@
AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs

dnl Important YaST2 variables
-VERSION="2.14.2"
+VERSION="2.14.3"
RPMNAME="yast2-http-server"
MAINTAINER="Michal Zugec <mzugec@xxxxxxx>"

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-http-server-2.14.3/src/HttpServerWidgets.ycp new/yast2-http-server-2.14.4/src/HttpServerWidgets.ycp
--- old/yast2-http-server-2.14.3/src/HttpServerWidgets.ycp 2006-10-31 14:20:55.000000000 +0100
+++ new/yast2-http-server-2.14.4/src/HttpServerWidgets.ycp 2006-11-20 09:27:22.000000000 +0100
@@ -5,7 +5,7 @@
* Authors: Jiri Srain <jsrain@xxxxxxx>
* Stanislav Visnovsky <visnov@xxxxxxx>
*
- * $Id: HttpServerWidgets.ycp 33935 2006-10-31 13:20:53Z mzugec $
+ * $Id: HttpServerWidgets.ycp 34454 2006-11-20 08:25:35Z mzugec $
*/

{
@@ -33,6 +33,8 @@
import "Package";
import "DnsServerAPI";
import "FileUtils";
+ import "Hostname";
+ import "DNS";

include "http-server/helps.ycp";

@@ -110,11 +112,9 @@
* @param event map
* @return boolean valid servername
*/
-global boolean validate_servername (any id, string key, map event)
+global boolean validate_servername (string value)
{
- import "Hostname";
- import "Punycode";
- string value = Punycode::EncodeDomainName( (string)UI::QueryWidget (`servername, `Value) );
+// string value = Punycode::EncodeDomainName( (string)UI::QueryWidget (`id(key), `Value) );
if (!Hostname::CheckFQ (value))
{
//translators: popup error message when validate servername
@@ -377,15 +377,12 @@
{
if (size (servername) == 0)
{
- import "DNS";
- import "Hostname";
// suggest reasonable value
servername = Hostname::MergeFQ (DNS::hostname, DNS::domain);
// maybe we should check, if there is such host already
}

list ips = maplist( string ip, string dev, HttpServer::ip2device, ``( ip ) ) ;
-
UI::OpenDialog (
`VBox(
// translators: popup description on changing the default host
@@ -403,14 +400,14 @@
the default host.
")),
// translators: textentry to set the host name
- `TextEntry (`servername, _("Server &Name:"), servername),
+ `TextEntry (`id(`servername), _("Server &Name:"), servername),
// translators: textentry to set the host IP address
`Left( `ComboBox( `id("ip"), `opt(`editable), _("Server &IP Address:"), ips ) ),
`VSpacing(0.5),
`HBox( `PushButton (`id(`ok), `opt(`default), Label::ContinueButton ()),
`PushButton (`id(`cancel), Label::CancelButton ()) )
));
-
+y2internal("I am here");
UI::SetFocus (`servername);
UI::ChangeWidget (`id("ip"), `Value, ip);

@@ -421,10 +418,10 @@
ret = (symbol)UI::UserInput ();
if (ret == `cancel) break;

+servername = Punycode::EncodeDomainName((string)UI::QueryWidget (`servername, `Value));
// it must be `ok
- if (! validate_servername("servername","", nil)) continue;
+ if (! validate_servername(servername)) continue;

- servername = (string)UI::QueryWidget (`servername, `Value);

if (! validate_serverip("ip",nil,nil)) continue;
ip = (string)UI::QueryWidget (`id("ip"), `Value);
@@ -447,6 +444,11 @@
return filter(string row, YaST::HTTPDData::GetHostsList (), { return (row !="main"); });
}

+void changeDelDefault(boolean stat){
+ UI::ChangeWidget(`set_default, `Enabled, stat);
+ UI::ChangeWidget(`_tp_delete, `Enabled, stat);
+}
+
/**
* Widget for delete host
* @param opt_id any
@@ -454,6 +456,7 @@
* @return boolean delete success
*/
global boolean HostsDelete (any opt_id, string opt_key) {
+
if (opt_id == "default")
{
// translators: popup error message - default host cannot be deleted
@@ -465,7 +468,10 @@
return false;

HttpServer::modified = true;
- return YaST::HTTPDData::DeleteHost ((string)opt_id);
+ boolean ret = YaST::HTTPDData::DeleteHost ((string)opt_id);
+ if (size( HostsContents($[]) )==0) changeDelDefault(false);
+ else changeDelDefault(true);
+ return ret;
}

/**
@@ -531,6 +537,10 @@
*/
global symbol HostsHandle (string table, map event)
{
+ if (size((list)UI::QueryWidget(`_tp_table, `Items))==0)
+ changeDelDefault(false);
+ else changeDelDefault(true);
+
if ( event["ID"]:nil == `_tp_add )
{
return `add;
@@ -554,9 +564,10 @@

y2milestone ("Changing default host to '%1'", host);

- list< map<string,any> > defhost_options = YaST::HTTPDData::GetHost("default");
+ list< map<string,any> > defhost_options = YaST::HTTPDData::GetHost("main");
string servername = (string) get_host_value( "ServerName", defhost_options, "");
string ip = (string) get_host_value( "HostIP", defhost_options, "");
+y2internal("%1", ip);
if (ip == "" || servername != "")
{
// we must set a new server name and ip for the old default host
@@ -575,7 +586,7 @@
// move the old default host elsewhere
YaST::HTTPDData::CreateHost ( ip+"/"+servername, defhost_options );
// replace the values of the default host by the new one
- YaST::HTTPDData::ModifyHost ("default", YaST::HTTPDData::GetHost(host) );
+ YaST::HTTPDData::ModifyHost ("main", YaST::HTTPDData::GetHost(host) );
// remove the old non-default host
YaST::HTTPDData::DeleteHost (host);

@@ -587,7 +598,6 @@
{
return TablePopup::TableHandle(hosts_widget, table, event);
}
-
return nil;
}

@@ -599,6 +609,10 @@
{
init_tab = "hosts";
TablePopup::TableInit(hosts_widget, widget);
+
+ // menu button label
+ UI::ReplaceWidget( `id(`_tp_table_repl), `PushButton( `id( `set_default ), _("Set as De&fault") ) );
+
}
/******************************************************************************************/

@@ -662,8 +676,8 @@
// table cell description
"label" : _("Server Name"),
"widget" : `textentry,
- "validate_type" : `function,
- "validate_function" : validate_servername,
+// "validate_type" : `function,
+// "validate_function" : validate_servername,
],
],
"DocumentRoot" : $[
@@ -983,7 +997,7 @@
string admin = (string) UI::QueryWidget( `admin, `Value );
boolean virtualbyname = (boolean) UI::QueryWidget( `name_based, `Value );

- if (! validate_servername("", "servername", nil)) return false;
+ if (! validate_servername(servername)) return false;

// if (! validate_serverip("", "ipaddress", nil)) return false;

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-http-server-2.14.3/src/YaPI/HTTPD.pm new/yast2-http-server-2.14.4/src/YaPI/HTTPD.pm
--- old/yast2-http-server-2.14.3/src/YaPI/HTTPD.pm 2006-10-31 12:44:15.000000000 +0100
+++ new/yast2-http-server-2.14.4/src/YaPI/HTTPD.pm 2006-11-20 09:27:22.000000000 +0100
@@ -822,10 +822,10 @@
}

if( $self->isVirtualByName($vhost, $vhost_files) and !$VirtualByName) {
- return $self->SetError( summary => __('ip based host on virtual by name interface'), code => "CHECK_PARAM_FAILED");
+ return $self->SetError( summary => 'ip based host on virtual by name interface', code => "CHECK_PARAM_FAILED");
}
if( ! $self->isVirtualByName($vhost, $vhost_files) and $VirtualByName) {
- return $self->SetError( summary => __('name based host on none name based interface'), code => "CHECK_PARAM_FAILED");
+ return $self->SetError( summary => 'name based host on none name based interface', code => "CHECK_PARAM_FAILED");
}

if( ref($vhost_files->{'yast2_vhosts.conf'}) eq 'ARRAY' ) {
@@ -888,7 +888,9 @@

sub writeHosts (){
my $self = shift;
- my @vhosts = @{$vhost_files->{'ip-based'}};
+ my @vhosts = ();
+
+ my @vhosts = @{$vhost_files->{'ip-based'}} if (defined $vhost_files->{'ip-based'});

foreach my $key ( keys(%{$vhost_files}) ) {
switch($key)
@@ -906,8 +908,9 @@
}
}

- my %data = ( 'default-server.conf' =>$vhost_files->{'main'},
- 'yast2_vhosts.conf'=>\@vhosts );
+ my %data = ( 'default-server.conf' =>$vhost_files->{'main'});
+ my $vh_size = @vhosts;
+ $data{'yast2_vhosts.conf'} = \@vhosts if ($vh_size>0);
SCR->Write(".http_server.vhosts", \%data);
}

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-http-server-2.14.3/src/YaST/HTTPDData.pm new/yast2-http-server-2.14.4/src/YaST/HTTPDData.pm
--- old/yast2-http-server-2.14.3/src/YaST/HTTPDData.pm 2006-10-31 12:44:31.000000000 +0100
+++ new/yast2-http-server-2.14.4/src/YaST/HTTPDData.pm 2006-11-20 09:27:22.000000000 +0100
@@ -271,7 +271,6 @@
if( ! $self->checkHostmap( $hostdata ) ) {
return undef;
}
-#use Data::Dumper;
# foreach my $h ( @$hostdata ) {
# if( $h->{KEY} eq 'DocumentRoot' ) {
# $dir=$self->addDir($h->{VALUE});
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-http-server-2.14.3/src/dialogs.ycp new/yast2-http-server-2.14.4/src/dialogs.ycp
--- old/yast2-http-server-2.14.3/src/dialogs.ycp 2006-10-31 12:44:56.000000000 +0100
+++ new/yast2-http-server-2.14.4/src/dialogs.ycp 2006-11-20 09:27:22.000000000 +0100
@@ -5,7 +5,7 @@
* Authors: Jiri Srain <jsrain@xxxxxxx>
* Stanislav Visnovsky <visnov@xxxxxxx>
*
- * $Id: dialogs.ycp 32697 2006-09-04 16:24:22Z mzugec $
+ * $Id: dialogs.ycp 34454 2006-11-20 08:25:35Z mzugec $
*/

{
@@ -97,7 +97,8 @@
"header" : _("Hosts"),
"contents" : `HBox (`HSpacing (1), `VBox (
`VSpacing (1),
- "HOSTS", `PushButton( `id( `set_default ), _("Set as De&fault") ),
+ "HOSTS",
+//`PushButton( `id( `set_default ), _("Set as De&fault") ),
`VSpacing (1)
//, `PushButton( `id( `set_default ), _("Set as De&fault") )
), `HSpacing (1)),
@@ -188,10 +189,6 @@
Wizard::SetContentsButtons (caption, contents, help,
Label::BackButton (), Label::OKButton ());

- UI::ReplaceWidget( `id(`_tp_table_repl),
- // menu button label
- `PushButton( `id( `set_default ), _("Set as De&fault") ) );
-
return CWM::Run (w, $[`abort : Abort]);
}

diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/yast2-http-server-2.14.3/src/wizard-dialog.ycp new/yast2-http-server-2.14.4/src/wizard-dialog.ycp
--- old/yast2-http-server-2.14.3/src/wizard-dialog.ycp 2006-05-15 11:28:19.000000000 +0200
+++ new/yast2-http-server-2.14.4/src/wizard-dialog.ycp 2006-11-20 09:27:22.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Dialogs for wizard
* Authors: Michal Zugec <mzugec@xxxxxxx>
*
- * $Id: wizard-dialog.ycp 30910 2006-05-15 09:27:55Z mzugec $
+ * $Id: wizard-dialog.ycp 34454 2006-11-20 08:25:35Z mzugec $
*/
{

@@ -152,7 +152,7 @@
*/
symbol WizardSequence3(){
string caption=_("HTTP Server Wizard (3/5)--Default Host");
- list< map<string,any> > w = CWM::CreateWidgets (["host"], HttpServerWidgets::widgets);
+ list< map<string,any> > w = CWM::CreateWidgets (["MAIN_HOST"], HttpServerWidgets::widgets);
term contents = `HBox (`HSpacing (1), `VBox (
`VSpacing (1),
w[0, "widget"]:`VSpacing (0),
@@ -165,18 +165,18 @@
Wizard::SetContentsButtons (caption, contents, help, Label::BackButton (), Label::NextButton ());
Wizard::SetAbortButton ( `abort, Label::CancelButton() );

- string servername = (string) HttpServerWidgets::get_host_value("ServerName", YaST::HTTPDData::GetHost("default"), "");
+ string servername = (string) HttpServerWidgets::get_host_value("ServerName", YaST::HTTPDData::GetHost("main"), "");

- string serveradmin = (string) HttpServerWidgets::get_host_value("ServerAdmin", YaST::HTTPDData::GetHost("default"), "");
+ string serveradmin = (string) HttpServerWidgets::get_host_value("ServerAdmin", YaST::HTTPDData::GetHost("main"), "");

map hostname = (map) SCR::Execute(.target.bash_output, "/bin/hostname");
y2milestone("Hostname : %1", hostname["stdout"]:"");
// if no ServerName or ServerAdmin readed from configuration file, the values based on machine hostname are used
if (size(servername) ==0)
- YaST::HTTPDData::ModifyHost ("default", HttpServerWidgets::set_host_value("ServerName", YaST::HTTPDData::GetHost("default"),
+ YaST::HTTPDData::ModifyHost ("main", HttpServerWidgets::set_host_value("ServerName", YaST::HTTPDData::GetHost("main"),
hostname["stdout"]:""));
if (size(serveradmin) ==0)
- YaST::HTTPDData::ModifyHost ("default", HttpServerWidgets::set_host_value("ServerAdmin", YaST::HTTPDData::GetHost("default"),
+ YaST::HTTPDData::ModifyHost ("main", HttpServerWidgets::set_host_value("ServerAdmin", YaST::HTTPDData::GetHost("main"),
"root@"+hostname["stdout"]:""));

return CWM::Run (w, $[`abort : Abort]);
@@ -205,10 +205,6 @@
Label::BackButton (), Label::NextButton ());
Wizard::SetAbortButton ( `abort, Label::CancelButton() );

- UI::ReplaceWidget( `id(`_tp_table_repl),
- // menu button label
- `PushButton( `id( `set_default ), _("Set as De&fault") ) );
-
return CWM::Run (w, $[`abort : Abort]);
}



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread