[yast-commit] r57888 - in /branches/SuSE-SLE-10-SP3-Branch/http-server: VERSION package/yast2-http-server.changes src/HttpServerWidgets.ycp src/YaPI/HTTPD.pm src/YaPI/HTTPDModules.pm
![](https://seccdn.libravatar.org/avatar/4b1b602021abbfa5a5994ab0ad90e8b7.jpg?s=120&d=mm&r=g)
Author: mzugec Date: Tue Jul 7 13:23:34 2009 New Revision: 57888 URL: http://svn.opensuse.org/viewcvs/yast?rev=57888&view=rev Log: - modules ordering problem (bnc#518816) - validation of modules dependency Modified: branches/SuSE-SLE-10-SP3-Branch/http-server/VERSION branches/SuSE-SLE-10-SP3-Branch/http-server/package/yast2-http-server.changes branches/SuSE-SLE-10-SP3-Branch/http-server/src/HttpServerWidgets.ycp branches/SuSE-SLE-10-SP3-Branch/http-server/src/YaPI/HTTPD.pm branches/SuSE-SLE-10-SP3-Branch/http-server/src/YaPI/HTTPDModules.pm Modified: branches/SuSE-SLE-10-SP3-Branch/http-server/VERSION URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/http-server/VERSION?rev=57888&r1=57887&r2=57888&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/http-server/VERSION (original) +++ branches/SuSE-SLE-10-SP3-Branch/http-server/VERSION Tue Jul 7 13:23:34 2009 @@ -1 +1 @@ -2.13.34 +2.13.35 Modified: branches/SuSE-SLE-10-SP3-Branch/http-server/package/yast2-http-server.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/http-server/package/yast2-http-server.changes?rev=57888&r1=57887&r2=57888&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/http-server/package/yast2-http-server.changes (original) +++ branches/SuSE-SLE-10-SP3-Branch/http-server/package/yast2-http-server.changes Tue Jul 7 13:23:34 2009 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Jul 7 13:19:02 CEST 2009 - mzugec@suse.de + +- modules ordering problem (bnc#518816) +- validation of modules dependency +- 2.13.35 + +------------------------------------------------------------------- Fri Mar 20 19:25:33 CET 2009 - mzugec@suse.de - improved IP addr.validation for ip-based vhosts (bnc#486476) Modified: branches/SuSE-SLE-10-SP3-Branch/http-server/src/HttpServerWidgets.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/http-server/src/HttpServerWidgets.ycp?rev=57888&r1=57887&r2=57888&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/http-server/src/HttpServerWidgets.ycp (original) +++ branches/SuSE-SLE-10-SP3-Branch/http-server/src/HttpServerWidgets.ycp Tue Jul 7 13:23:34 2009 @@ -630,6 +630,7 @@ global void initModules (string key); global symbol handleModules (string key, map event); +global boolean validateModules (string key, map event); global void initListenSettings (string key); global symbol handleListenSettings (string key, map event); global void initServiceStatus (string key); @@ -1450,6 +1451,8 @@ ), "init" : initModules, "handle" : handleModules, + "validate_type" : `function, + "validate_function" : validateModules, "help" : HELPS["modules"]:"", ], @@ -2422,7 +2425,7 @@ integer index = -1; // create temporary list of maps from modules list< map<string, any > > listmodules = maplist(string name , modules,{ - return( mapmap(string k,any v, $["default":"1", "name":name, "summary":_("unknown"), "required":"0", "suggested":"0"], + return( mapmap(string k,any v, $["default":"1", "name":name, "summary":_("unknown"), "requires":""], {return ($[k:v]); })); }); @@ -2451,6 +2454,30 @@ UI::SetFocus (`id (`modules)); } + global boolean validateModules(string id, map key){ + boolean valid=true; + list<string> selected = []; + foreach(term i, (list<term>)UI::QueryWidget(`modules, `Items), { + if (i[2]:""==_("Enabled")) selected=add(selected, i[1]:""); + }); + map<string, any> all_modules =$[]; + foreach(map row, YaST::HTTPDData::GetKnownModules(), { + all_modules[row["name"]:""] = remove(row, "name"); + }); + foreach(string mod, selected, { + string require = all_modules[mod, "requires"]:""; + if (size(require)>0){ + if (!contains(selected, require)){ + string message = sformat("%1:\n %2 %3 %4\n%5", _("Modules dependency problem"), mod, _("requires"), require, _("Enable required module or disable first one.")); + Popup::Error(message); + y2warning("Error message: %1", message); + valid=false; + } + } + }); + return valid; + } + /** * Handle function of a widget * @param key any widget key of widget that is processed Modified: branches/SuSE-SLE-10-SP3-Branch/http-server/src/YaPI/HTTPD.pm URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/http-server/src/YaPI/HTTPD.pm?rev=57888&r1=57887&r2=57888&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/http-server/src/YaPI/HTTPD.pm (original) +++ branches/SuSE-SLE-10-SP3-Branch/http-server/src/YaPI/HTTPD.pm Tue Jul 7 13:23:34 2009 @@ -954,7 +954,9 @@ BEGIN { $TYPEINFO{GetModuleList} = ["function", [ "list", "string" ] ]; } sub GetModuleList { my $self = shift; - my $data = SCR->Read('.sysconfig.apache2.APACHE_MODULES'); # FIXME: Error handling +# my $data = SCR->Read('.sysconfig.apache2.APACHE_MODULES'); # FIXME: Error handling + my $data = SCR->Execute('.target.bash_output', 'a2enmod -l')->{'stdout'}; # FIXME: Error handling + $data =~ s/mod_//g; return [ split(/\s+/, $data) ]; @@ -1069,8 +1071,12 @@ } @newList = (@known, @unknown); - SCR->Write('.sysconfig.apache2.APACHE_MODULES', join(' ',@newList)); - SCR->Write('.sysconfig.apache2', undef); + SCR->Execute('.target.bash', 'for module in $(a2enmod -l);do a2enmod -d $module; done'); + foreach my $module (@newList){ + SCR->Execute('.target.bash', "a2enmod $module"); + } +# SCR->Write('.sysconfig.apache2.APACHE_MODULES', join(' ',@newList)); +# SCR->Write('.sysconfig.apache2', undef); return 1; } Modified: branches/SuSE-SLE-10-SP3-Branch/http-server/src/YaPI/HTTPDModules.pm URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-SLE-10-SP3-Branch/http-server/src/YaPI/HTTPDModules.pm?rev=57888&r1=57887&r2=57888&view=diff ============================================================================== --- branches/SuSE-SLE-10-SP3-Branch/http-server/src/YaPI/HTTPDModules.pm (original) +++ branches/SuSE-SLE-10-SP3-Branch/http-server/src/YaPI/HTTPDModules.pm Tue Jul 7 13:23:34 2009 @@ -18,8 +18,6 @@ summary => __("Executing CGI scripts based on media type or request method"), packages => [], default => 1, - required => 0, - suggested => 0, position => 20, directives=> [ { option => "Action", "context" => [ "Directory", "Server", "Virtual" ] }, { option => "Script", "context" => [ "Directory", "Server", "Virtual" ] } @@ -29,8 +27,6 @@ summary => __("Mapping different parts of the host file system in the document tree and for URL redirection"), packages => [], default => 1, - required => 0, - suggested => 0, position => 30, directives=> [ { option => "Alias", "context" => [ "Server", "Virtual" ] }, { option => "AliasMatch", "context" => [ "Server", "Virtual" ] }, @@ -46,8 +42,6 @@ summary => __("Basic authentication"), packages => [], default => 1, - required => 0, - suggested => 0, position => 40, directives=> [ { option => "AuthBasicAuthoritative", "context" => [ "Directory" ] , "values" => [ "On", "Off" ] }, { option => "AuthBasicProvider", "context" => [ "Directory" ] } @@ -57,8 +51,6 @@ summary => __("User authentication using text files"), packages => [], default => 1, - required => 0, - suggested => 0, position => 40, directives=> [ { option => "AuthUserFile", "context" => [ "Directory" ] } ] @@ -67,8 +59,6 @@ summary => __("User Authorization"), packages => [], default => 1, - required => 0, - suggested => 0, position => 40, directives=> [ { option => "AuthzUserAuthoritative", "context" => [ "Directory" ], "values" => [ "On", "Off" ] } ] @@ -77,8 +67,6 @@ summary => __("Group authorization using plaintext files"), packages => [], default => 1, - required => 0, - suggested => 0, position => 40, directives=> [ { option => "AuthGroupFile", "context" => [ "Directory" ] }, { option => "AuthzGroupFileAuthoritative", "context" => [ "Directory" ], "values" => [ "On", "Off" ] } @@ -88,8 +76,6 @@ summary => __("User authentication using DBM files"), packages => [], default => 0, - required => 0, - suggested => 0, position => 50, module => { # AuthDBMAuthoritative => 'mod_auth_dbm', @@ -109,8 +95,6 @@ summary => __("Generates directory indices, automatically, similar to the Unix ls command"), packages => [], default => 1, - required => 0, - suggested => 0, position => 60, directives=> [ { option => "AddAlt", "context" => [ "Directory", "Server", "Virtual" ] }, { option => "AddAltByEncoding", "context" => [ "Directory", "Server", "Virtual" ] }, @@ -132,8 +116,6 @@ summary => __("Execution of CGI scripts"), packages => [], default => 1, - required => 0, - suggested => 0, position => 70, directives=> [ { option => "ScriptLog", "context" => [ "Server", "Virtual" ] }, { option => "ScriptLogBuffer", "context" => [ "Server", "Virtual" ] }, @@ -144,8 +126,6 @@ summary => __("Provides for trailing slash redirects and serving directory index files"), packages => [], default => 1, - required => 0, - suggested => 0, position => 80, directives=> [ { option => "DirectoryIndex", "context" => [ "Directory", "Server", "Virtual" ] }, { option => "DirectorySlash", "context" => [ "Directory", "Server", "Virtual" ] , "values" => [ "On", "Off" ] } @@ -155,8 +135,6 @@ summary => __("Modifies the environment passed to CGI scripts and SSI pages"), packages => [], default => 0, - required => 0, - suggested => 0, position => 90, directives=> [ { option => "PassEnv", "context" => [ "Directory", "Server", "Virtual" ] }, { option => "SetEnv", "context" => [ "Directory", "Server", "Virtual" ] }, @@ -167,8 +145,6 @@ summary => __("Generation of Expires HTTP headers according to user-specified criteria"), packages => [], default => 0, - required => 0, - suggested => 0, position => 100, module => { ExpiresActive => 'mod_expires', @@ -184,8 +160,6 @@ summary => __("Server-parsed HTML documents (Server Side Includes)"), packages => [], default => 1, - required => 0, - suggested => 0, position => 110, directives=> [ { option => "SSIEndTag", "context" => [ "Server", "Virtual" ] }, { option => "SSIErrorMsg", "context" => [ "Directory", "Server", "Virtual" ] }, @@ -200,8 +174,6 @@ summary => __("Logging of the requests made to the server"), packages => [], default => 1, - required => 0, - suggested => 0, position => 120, directives=> [ { option => "BufferedLogs", "context" => [ "Server" ] , "values" => [ "On", "Off" ] }, { option => "CookieLog", "context" => [ "Server", "Virtual" ] }, @@ -214,8 +186,6 @@ summary => __("Associates the requested file name\'s extensions with the file\'s behavior and content"), packages => [], default => 1, - required => 0, - suggested => 0, position => 130, directives=> [ { option => "AddCharset", "context" => [ "Directory", "Server", "Virtual" ] }, { option => "AddEncoding", "context" => [ "Directory", "Server", "Virtual" ] }, @@ -241,8 +211,6 @@ summary => __("Provides for content negotiation"), packages => [], default => 1, - required => 0, - suggested => 0, position => 140, directives=> [ { option => "CacheNegotiatedDocs", "context" => [ "Server", "Virtual" ], "values" => [ "On", "Off" ] }, { option => "ForceLanguagePriority", "context" => [ "Directory", "Server", "Virtual" ] }, @@ -253,8 +221,6 @@ summary => __("Allows the setting of environment variables based on characteristics of the request"), packages => [], default => 1, - required => 0, - suggested => 0, position => 150, directives=> [ { option => "BrowserMatch", "context" => [ "Directory", "Server", "Virtual" ] }, { option => "BrowserMatchNoCase", "context" => [ "Directory", "Server", "Virtual" ] }, @@ -266,8 +232,6 @@ summary => __("Provides information about server activity and performance"), packages => [], default => 1, - required => 0, - suggested => 0, position => 160, directives=> [ { option => "ExtendedStatus", "context" => [ "Server" ], "values" => [ "On", "Off" ] } ] @@ -276,8 +240,6 @@ summary => __("Allows CGI scripts to run as a specified user and group"), packages => [], default => 0, - required => 0, - suggested => 0, position => 0, module => { SuexecUserGroup => 'mod_suexec', @@ -289,8 +251,6 @@ summary => __("User-specific directories"), packages => [], default => 1, - required => 0, - suggested => 0, position => 180, directives=> [ { option =>"UserDir", "context" => [ "Server", "Virtual" ] } ] @@ -299,16 +259,12 @@ summary => __("Sends files that contain their own HTTP headers"), packages => [], default => 1, - required => 0, - suggested => 0, position => 190 }, 'authn_anon' => { summary => __("Allows \"anonymous\" user access to authenticated areas"), packages => [], default => 0, - required => 0, - suggested => 0, position => 200, module => { Anonymous => 'mod_auth_anon', @@ -330,8 +286,6 @@ summary => __("User authentication using MD5 Digest Authentication"), packages => [], default => 0, - required => 0, - suggested => 0, position => 210, directives=> [ { option =>"AuthDigestAlgorithm", "context" => [ "Directory" ], "values" => [ "MD5", "MD5-sess" ] }, { option =>"AuthDigestDomain", "context" => [ "Directory" ] }, @@ -347,8 +301,6 @@ summary => __("Allows an LDAP directory to be used to store the database for HTTP Basic authentication"), packages => [], default => 0, - required => 0, - suggested => 0, position => 355, directives=> [ { option =>"AuthLDAPBindDN", "context" => [ "Directory" ] }, { option =>"AuthLDAPBindPassword", "context" => [ "Directory" ] }, @@ -367,8 +319,6 @@ summary => __("Content cache keyed to URIs"), packages => [], default => 0, - required => 0, - suggested => 0, position => 230, directives=> [ { option =>"CacheDefaultExpire", "context" => [ "Server", "Virtual" ] }, { option =>"CacheDisable", "context" => [ "Server", "Virtual" ] }, @@ -386,8 +336,6 @@ summary => __("Specify character set translation or recoding"), packages => [], default => 0, - required => 0, - suggested => 0, position => 240, directives=> [ { option =>"CharsetDefault", "context" => [ "Directory", "Server", "Virtual" ] }, { option =>"CharsetOptions", "context" => [ "Directory", "Server", "Virtual" ] }, @@ -398,8 +346,6 @@ summary => __("Distributed Authoring and Versioning (WebDAV) functionality"), packages => [], default => 0, - required => 0, - suggested => 0, position => 250, module => { Dav => 'mod_dav', @@ -415,8 +361,6 @@ summary => __("File system provider for mod_dav"), packages => [], default => 0, - required => 0, - suggested => 0, position => 260, module => { DavLockDB => 'mod_dav_fs' @@ -428,8 +372,6 @@ summary => __("Compress content before it is delivered to the client"), packages => [], default => 0, - required => 0, - suggested => 0, position => 270, module => { DeflateBufferSize => 'mod_deflate', @@ -444,14 +386,11 @@ { option =>"DeflateMemLevel", "context" => [ "Server", "Virtual" ] }, { option =>"DeflateWindowSize", "context" => [ "Server", "Virtual" ] } ] - }, 'disk_cache' => { summary => __("Content cache storage manager keyed to URIs"), packages => [], default => 0, - required => 0, - suggested => 0, position => 280, directives=> [ { option =>"CacheDirLength", "context" => [ "Server", "Virtual" ] }, { option =>"CacheDirLevels", "context" => [ "Server", "Virtual" ] }, @@ -464,8 +403,6 @@ summary => __("A simple echo server to illustrate protocol modules"), packages => [], default => 0, - required => 0, - suggested => 0, position => 290, directives=> [ { option =>"ProtocolEcho", "context" => [ "Server", "Virtual" ], "values" => [ "On", "Off" ] } ] @@ -474,8 +411,6 @@ summary => __("Pass the response body through an external program before delivery to the client"), packages => [], default => 0, - required => 0, - suggested => 0, position => 300, module => { ExtFilterDefine => 'mod_ext_filter', @@ -484,26 +419,20 @@ directives=> [ { option =>"ExtFilterDefine", "context" => [ "Server" ] }, { option =>"ExtFilterOptions", "context" => [ "Directory" ] } ] - }, 'file_cache' => { summary => __("Caches a static list of files in memory"), packages => [], default => 0, - required => 0, - suggested => 0, position => 310, directives=> [ { option =>"CacheFile", "context" => [ "Server" ] }, { option =>"MMapFile", "context" => [ "Server" ] } ] - }, 'headers' => { summary => __("Customization of HTTP request and response headers"), packages => [], default => 0, - required => 0, - suggested => 0, position => 320, module => { Header => 'mod_headers', @@ -512,28 +441,22 @@ directives=> [ { option =>"Header", "context" => [ "Server", "Virtual", "Directory" ] }, { option =>"RequestHeader", "context" => [ "Server", "Virtual", "Directory" ] } ] - }, 'imagemap' => { summary => __("Server-side image map processing"), packages => [], default => 1, - required => 0, - suggested => 0, position => 330, directives=> [ { option =>"ImapBase", "context" => [ "Server", "Virtual", "Directory" ] }, { option =>"ImapDefault", "context" => [ "Server", "Virtual", "Directory" ] }, { option =>"ImapMenu", "context" => [ "Server", "Virtual", "Directory" ], "values" => [ "none", "formatted", "semiformatted", "unformatted" ] } ] - }, 'info' => { summary => __("Provides a comprehensive overview of the server configuration"), packages => [], default => 0, - required => 0, - suggested => 0, position => 340, module => { AddModuleInfo => 'mod_info' }, directives=> [ { option =>"AddModuleInfo", "context" => [ "Server", "Virtual" ] }, @@ -543,8 +466,6 @@ summary => __("LDAP connection pooling and result caching services for use by other LDAP modules"), packages => [], default => 0, - required => 0, - suggested => 0, position => 350, directives=> [ { option =>"LDAPCacheEntries", "context" => [ "Server" ] }, { option =>"LDAPCacheTTL", "context" => [ "Server" ] }, @@ -565,16 +486,12 @@ summary => __("Logging of input and output bytes per request"), packages => [], default => 0, - required => 0, - suggested => 0, position => 360 }, 'mem_cache' => { summary => __("Content cache keyed to URIs"), packages => [], default => 0, - required => 0, - suggested => 0, position => 370, directives=> [ { option =>"MCacheMaxObjectCount", "context" => [ "Server" ] }, { option =>"MCacheMaxObjectSize", "context" => [ "Server" ] }, @@ -588,20 +505,15 @@ summary => __("Determines the MIME type of a file by looking at a few bytes of its contents"), packages => [], default => 0, - required => 0, - suggested => 0, position => 380, module => { MimeMagicFile => 'mod_mime_magic' }, directives=> [ { option =>"MimeMagicFile", "context" => [ "Server", "Virtual" ] }, ] - }, 'proxy' => { summary => __("HTTP/1.1 proxy/gateway server"), packages => [], default => 0, - required => 0, - suggested => 0, position => 390, module => { NoProxy => 'mod_proxy', @@ -645,14 +557,18 @@ { option =>"ProxyVia", "context" => [ "Server", "Virtual" ], "values" => [ "On", "Off", "Full", "Block" ] } ] - + }, + 'proxy_ajp' => { + summary => __("AJP support module for mod_proxy"), + packages => [], + default => 0, + requires => "proxy", + position => 395, }, 'proxy_connect' => { summary => __("mod_proxy extension for CONNECT request handling"), packages => [], default => 0, - required => 0, - suggested => 0, position => 400, module => { AllowCONNECT => 'mod_proxy_connect' } }, @@ -660,24 +576,18 @@ summary => __("FTP support module for mod_proxy"), packages => [], default => 0, - required => 0, - suggested => 0, position => 410 }, 'proxy_http' => { summary => __("HTTP support module for mod_proxy"), packages => [], default => 0, - required => 0, - suggested => 0, position => 420 }, 'rewrite' => { summary => __("Provides a rule-based rewriting engine to rewrite requested URLs on the fly"), packages => [], default => 0, - required => 0, - suggested => 0, position => 430, module => { RewriteBase => 'mod_rewrite', @@ -700,26 +610,20 @@ { option =>"RewriteOptions", "context" => [ "Server", "Virtual", "Directory" ] }, { option =>"RewriteRule", "context" => [ "Server", "Virtual", "Directory" ] } ] - }, 'speling' => { summary => __("Attempts to correct mistaken URLs that users might have entered"), packages => [], default => 0, - required => 0, - suggested => 0, position => 440, module => { CheckSpelling => 'mod_speling' }, directives=> [ { option =>"CheckSpelling", "context" => [ "Server", "Virtual", "Directory" ], "values" => [ "On", "Off" ] }, ] - }, 'ssl' => { summary => __("Strong cryptography using the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols"), packages => [], default => 0, - required => 0, - suggested => 0, position => 450, directives=> [ { option =>"SSLCACertificateFile", "context" => [ "SSL", "Server", "Virtual" ] }, { option =>"SSLCACertificatePath", "context" => [ "SSL", "Server", "Virtual" ] }, @@ -760,16 +664,12 @@ summary => __("Provides an environment variable with a unique identifier for each request"), packages => [], default => 0, - required => 0, - suggested => 0, position => 460 }, 'usertrack' => { summary => __("Clickstream logging of user activity on a site"), packages => [], default => 0, - required => 0, - suggested => 0, position => 470, module => { CookieDomain => 'mod_usertrack', @@ -790,8 +690,6 @@ summary => __("Provides support for dynamically configured mass virtual hosting"), packages => [], default => 0, - required => 0, - suggested => 0, position => 480, module => { VirtualDocumentRoot => 'mod_vhost_alias', @@ -868,4 +766,3 @@ default => 0 } ); - -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
mzugec@svn.opensuse.org