commit yast2-http-server for openSUSE:Factory
Hello community, here is the log from the commit of package yast2-http-server for openSUSE:Factory checked in at Wed Mar 25 19:42:53 CET 2009. -------- --- yast2-http-server/yast2-http-server.changes 2009-03-20 17:24:34.000000000 +0100 +++ yast2-http-server/yast2-http-server.changes 2009-03-25 09:31:06.000000000 +0100 @@ -1,0 +2,12 @@ +Wed Mar 25 09:24:13 CET 2009 - mzugec@suse.de + +- for name-based vhosts split configuration files (bnc#427427) +- 2.17.7 + +------------------------------------------------------------------- +Fri Mar 20 19:24:06 CET 2009 - mzugec@suse.de + +- improved IP addr. validation for ip-based vhosts (bnc#486476) +- 2.18.6 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-http-server-2.18.5.tar.bz2 New: ---- yast2-http-server-2.18.7.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-http-server.spec ++++++ --- /var/tmp/diff_new_pack.y30835/_old 2009-03-25 19:42:05.000000000 +0100 +++ /var/tmp/diff_new_pack.y30835/_new 2009-03-25 19:42:05.000000000 +0100 @@ -1,5 +1,5 @@ # -# spec file for package yast2-http-server (Version 2.18.5) +# spec file for package yast2-http-server (Version 2.18.7) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,12 +19,12 @@ Name: yast2-http-server -Version: 2.18.5 +Version: 2.18.7 Release: 1 License: GPL v2 or later Group: System/YaST BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-http-server-2.18.5.tar.bz2 +Source0: yast2-http-server-2.18.7.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-network yast2-packagemanager-devel yast2-perl-bindings yast2-testsuite Requires: yast2-network yast2-perl-bindings libzio @@ -44,7 +44,7 @@ Stanislav Visnovsky <visnov@suse.cz> %prep -%setup -n yast2-http-server-2.18.5 +%setup -n yast2-http-server-2.18.7 %build %{prefix}/bin/y2tool y2autoconf @@ -80,6 +80,12 @@ /usr/lib/YaST2/servers_non_y2/* %doc %{prefix}/share/doc/packages/yast2-http-server %changelog +* Wed Mar 25 2009 mzugec@suse.de +- for name-based vhosts split configuration files (bnc#427427) +- 2.17.7 +* Fri Mar 20 2009 mzugec@suse.de +- improved IP addr. validation for ip-based vhosts (bnc#486476) +- 2.18.6 * Fri Mar 20 2009 mzugec@suse.de - correctly recognize virtual host type (IP/name) (bnc#486475) - 2.18.5 ++++++ yast2-http-server-2.18.5.tar.bz2 -> yast2-http-server-2.18.7.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-http-server-2.18.5/agents/ag_http_server new/yast2-http-server-2.18.7/agents/ag_http_server --- old/yast2-http-server-2.18.5/agents/ag_http_server 2009-03-20 17:08:21.000000000 +0100 +++ new/yast2-http-server-2.18.7/agents/ag_http_server 2009-03-25 00:35:19.000000000 +0100 @@ -121,15 +121,16 @@ foreach my $vhost ( @$conf ) { if ($file eq 'default-server.conf'){ $hash_table{'main'} = $vhost; -# foreach my $data ( @{$vhost->{'DATA'}} ) -# { if ($data->{'KEY'} eq 'NameVirtualHost'){ $hash_table{ $data->{'VALUE'} } = []; } -# } } else { - my $based='ip-based'; - $based='name-based' if (defined($vhost->{'VirtualByName'}) && $vhost->{'VirtualByName'} == 1); + my $key='ip-based'; + if (defined($vhost->{'VirtualByName'}) && $vhost->{'VirtualByName'} eq '1'){ + foreach my $row ( @{$vhost->{'DATA'}} ){ + $key=$row->{'VALUE'} if($row->{'KEY'} eq 'ServerName'); + } + } if (exists $vhost->{'HostIP'}){ - if ( exists $hash_table{ $vhost->{'HostIP'}} ){ push(@{$hash_table{ $vhost->{'HostIP'}}}, $vhost); } - else { push(@{$hash_table{$based}}, $vhost); } + if ( defined $hash_table{ $key} ){ push(@{$hash_table{ $key }}, $vhost); } + else { push(@{$hash_table{$key}}, $vhost); } } } } @@ -156,41 +157,6 @@ } } -#sub parse_module_selection() { -# my $class = shift; -# my $dir = Directory::vardir(); -# my $dir = "/var/lib/YaST2/"; # FIXME: calling Directory::vardir later -# my @ret = (); - -# if( open(FILE, "< $dir/httpd_active_module_selections.conf") ) { -# @ret = <FILE>; -# chomp(@ret); -# close(FILE); -# } ELse { -# return $class->SetError( summary => sprintf(_("unable to open file %s/httpd_active_module_selections.conf for reading: %s"),$dir,$!), -# code => "OPEN_FAILED" -# ); -# } - -# return \@ret; -#} - -sub write_module_selection { - my $class = shift; - my $newSelection = shift; - my $dir = "/var/lib/YaST2/"; # FIXME: calling Directory::vardir later - - if( open(FILE, "> $dir/httpd_active_module_selections.conf") ) { - print FILE join("\n",@$newSelection); - close(FILE); - } else { - return $class->SetError( summary => sprintf(_("unable to open file %s/httpd_active_module_selections.conf for writing: %s"),$dir,$!), - code => "OPEN_FAILED" - ); - } - return 1; -} - # generic apache2 configfile format parser sub sectionParser { my $keys = []; @@ -248,6 +214,11 @@ my $class = shift; my $data = shift; + # remove old files first + for my $remove ( </etc/apache2/vhosts.d/*.conf> ) { + unlink $remove; + } + foreach my $file ( keys(%{$data}) ) { next if( $file eq 'default-server.conf' ); # skip the default server here open( FILE, "> /etc/apache2/vhosts.d/$file" ) or do { @@ -413,10 +384,6 @@ } return $class->write_listen_conf(); } - } elsif( $path eq '.moduleselection' ) { - if( ref($args[0]) eq 'ARRAY' ) { - return $class->write_module_selection( $args[0] ); - } } else { # not implemented } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-http-server-2.18.5/configure new/yast2-http-server-2.18.7/configure --- old/yast2-http-server-2.18.5/configure 2009-03-20 17:10:41.000000000 +0100 +++ new/yast2-http-server-2.18.7/configure 2009-03-25 09:23:07.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for yast2-http-server 2.18.4. +# Generated by GNU Autoconf 2.63 for yast2-http-server 2.18.6. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -596,8 +596,8 @@ # Identity of this package. PACKAGE_NAME='yast2-http-server' PACKAGE_TARNAME='yast2-http-server' -PACKAGE_VERSION='2.18.4' -PACKAGE_STRING='yast2-http-server 2.18.4' +PACKAGE_VERSION='2.18.6' +PACKAGE_STRING='yast2-http-server 2.18.6' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' ac_unique_file="RPMNAME" @@ -1274,7 +1274,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 2.18.4 to adapt to many kinds of systems. +\`configure' configures yast2-http-server 2.18.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1346,7 +1346,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-http-server 2.18.4:";; + short | recursive ) echo "Configuration of yast2-http-server 2.18.6:";; esac cat <<\_ACEOF @@ -1426,7 +1426,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-http-server configure 2.18.4 +yast2-http-server configure 2.18.6 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1440,7 +1440,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 2.18.4, which was +It was created by yast2-http-server $as_me 2.18.6, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2287,7 +2287,7 @@ # Define the identity of the package. PACKAGE='yast2-http-server' - VERSION='2.18.4' + VERSION='2.18.6' cat >>confdefs.h <<_ACEOF @@ -2511,7 +2511,7 @@ -VERSION="2.18.4" +VERSION="2.18.6" RPMNAME="yast2-http-server" MAINTAINER="Michal Zugec <mzugec@suse.cz>" @@ -3452,7 +3452,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 2.18.4, which was +This file was extended by yast2-http-server $as_me 2.18.6, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3502,7 +3502,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -yast2-http-server config.status 2.18.4 +yast2-http-server config.status 2.18.6 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-http-server-2.18.5/configure.in new/yast2-http-server-2.18.7/configure.in --- old/yast2-http-server-2.18.5/configure.in 2009-03-20 17:10:36.000000000 +0100 +++ new/yast2-http-server-2.18.7/configure.in 2009-03-25 09:23:01.000000000 +0100 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-http-server, 2.18.4, http://bugs.opensuse.org/, yast2-http-server) +AC_INIT(yast2-http-server, 2.18.6, 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="2.18.4" +VERSION="2.18.6" RPMNAME="yast2-http-server" MAINTAINER="Michal Zugec <mzugec@suse.cz>" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-http-server-2.18.5/src/HttpServerWidgets.ycp new/yast2-http-server-2.18.7/src/HttpServerWidgets.ycp --- old/yast2-http-server-2.18.5/src/HttpServerWidgets.ycp 2009-03-20 12:52:24.000000000 +0100 +++ new/yast2-http-server-2.18.7/src/HttpServerWidgets.ycp 2009-03-24 21:58:21.000000000 +0100 @@ -6,7 +6,7 @@ * Stanislav Visnovsky <visnov@suse.cz> * Internal * - * $Id: HttpServerWidgets.ycp 56052 2009-03-10 14:21:18Z mzugec $ + * $Id: HttpServerWidgets.ycp 56262 2009-03-20 18:24:02Z mzugec $ */ { @@ -222,15 +222,14 @@ } map<string, any> vhost = YaST::HTTPDData::GetVhostType(host); - if (! FileUtils::CheckAndCreatePath( documentroot )){ res = false; break; } if (vhost["id"]:"" == ip) { - // this is valid only if both of them are name-based, not ip-based - if ( YaST::HTTPDData::GetVhostType(host)["type"]:""=="name-based" && namebased ) + // this is valid only if both of them are name-based, not ip-based (bnc#486476) + if ( !(YaST::HTTPDData::GetVhostType(host)["type"]:""=="name-based" && namebased) ) { // error message - the entered ip address is already // configured for another virtual host diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-http-server-2.18.5/src/YaPI/HTTPD.pm new/yast2-http-server-2.18.7/src/YaPI/HTTPD.pm --- old/yast2-http-server-2.18.5/src/YaPI/HTTPD.pm 2009-03-20 17:08:32.000000000 +0100 +++ new/yast2-http-server-2.18.7/src/YaPI/HTTPD.pm 2009-03-25 01:10:39.000000000 +0100 @@ -526,7 +526,7 @@ if ($byname eq 0){ push(@{$vhost_files->{'ip-based'}}, {HOSTID => "$ip/$servername", HostIP => $ip, DATA => \@newdata}); } else { - $vhost_files->{$ip} = [{HOSTID => "$ip/$servername", HostIP => $ip, DATA => \@newdata}]; + $vhost_files->{$servername} = [{HOSTID => "$ip/$servername", HostIP => $ip, DATA => \@newdata}]; } } @@ -546,12 +546,11 @@ } } case "main" { delete $vhost_files->{'main'} if ($hostid eq 'main'); } - else { - foreach my $hostList ( $vhost_files->{$key} ) { - foreach my $hostentryHash ( @$hostList ) { delete ($vhost_files->{$key}) if ($hostentryHash->{HOSTID} eq $hostid); } - } - } - } + else { + my $vhost = $vhost_files->{$key}->[0]->{'HOSTID'}; + delete $vhost_files->{$key} if ($vhost eq $hostid); + } + } } } @@ -867,28 +866,21 @@ sub writeHosts (){ my $self = shift; - my @vhosts = (); - @vhosts = @{$vhost_files->{'ip-based'}} if (defined $vhost_files->{'ip-based'}); + # default server + my %data = ( 'default-server.conf' =>$vhost_files->{'main'}); - foreach my $key ( keys(%{$vhost_files}) ) { - switch($key) - { - case "ip-based" { - } - case "main" {} - else { - foreach my $hostList ( $vhost_files->{$key} ) { - foreach my $hostentryHash ( @$hostList ) { - push( @vhosts, $hostentryHash ) ; - } - } - } - } - } - - my %data = ( 'default-server.conf' =>$vhost_files->{'main'}); - $data{'yast2_vhosts.conf'} = \@vhosts ; + #ip based vhost + my @ip_vhosts = @{$vhost_files->{'ip-based'}} if (defined $vhost_files->{'ip-based'}); + my $size = @ip_vhosts; + $data{'ip-based_vhosts.conf'} = \@ip_vhosts if ($size>0); + + #name based vhost + foreach my $vhost ( keys(%{$vhost_files}) ) { + next if ($vhost eq 'main' || $vhost eq 'ip-based'); + my @name_vhost = @{$vhost_files->{$vhost}}; + $data{"$vhost.conf"} = \@name_vhost; + } SCR->Write(".http_server.vhosts", \%data); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-http-server-2.18.5/VERSION new/yast2-http-server-2.18.7/VERSION --- old/yast2-http-server-2.18.5/VERSION 2009-03-20 17:16:53.000000000 +0100 +++ new/yast2-http-server-2.18.7/VERSION 2009-03-25 09:24:09.000000000 +0100 @@ -1 +1 @@ -2.18.5 +2.18.7 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de