Hello community,
here is the log from the commit of package yast2-squid
checked in at Fri Aug 17 18:47:30 CEST 2007.
--------
--- yast2-squid/yast2-squid.changes 2007-08-15 14:11:40.000000000 +0200
+++ /mounts/work_src_done/NOARCH/yast2-squid/yast2-squid.changes 2007-08-17 16:20:14.987263000 +0200
@@ -1,0 +2,8 @@
+Fri Aug 17 15:39:44 CEST 2007 - dfiser@suse.cz
+
+- Layout improvement.
+- Changed SquidErrorMessages module to use .target.dir agent +
+ FileUtils module.
+- v2.15.1
+
+-------------------------------------------------------------------
Old:
----
yast2-squid-2.15.0.tar.bz2
New:
----
yast2-squid-2.15.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-squid.spec ++++++
--- /var/tmp/diff_new_pack.d31005/_old 2007-08-17 18:47:26.000000000 +0200
+++ /var/tmp/diff_new_pack.d31005/_new 2007-08-17 18:47:26.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-squid (Version 2.15.0)
+# spec file for package yast2-squid (Version 2.15.1)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-squid
-Version: 2.15.0
+Version: 2.15.1
Release: 1
-License: GPL v2 or later
+License: GPL v2 only
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-squid-2.15.0.tar.bz2
+Source0: yast2-squid-2.15.1.tar.bz2
prefix: /usr
Requires: yast2
BuildRequires: perl-XML-Writer update-desktop-files yast2 yast2-devtools yast2-testsuite
@@ -33,7 +33,7 @@
Daniel Fiser
%prep
-%setup -n yast2-squid-2.15.0
+%setup -n yast2-squid-2.15.1
%build
%{prefix}/bin/y2tool y2autoconf
@@ -70,6 +70,11 @@
%doc %{prefix}/share/doc/packages/yast2-squid
%changelog
+* Fri Aug 17 2007 - dfiser@suse.cz
+- Layout improvement.
+- Changed SquidErrorMessages module to use .target.dir agent +
+ FileUtils module.
+- v2.15.1
* Wed Aug 15 2007 - dfiser@suse.cz
- initial version
- v2.15.0
++++++ yast2-squid-2.15.0.tar.bz2 -> yast2-squid-2.15.1.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/configure new/yast2-squid-2.15.1/configure
--- old/yast2-squid-2.15.0/configure 2007-08-15 14:06:27.000000000 +0200
+++ new/yast2-squid-2.15.1/configure 2007-08-17 16:18:53.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.60 for yast2-squid 2.15.0.
+# Generated by GNU Autoconf 2.60 for yast2-squid 2.15.1.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -559,8 +559,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-squid'
PACKAGE_TARNAME='yast2-squid'
-PACKAGE_VERSION='2.15.0'
-PACKAGE_STRING='yast2-squid 2.15.0'
+PACKAGE_VERSION='2.15.1'
+PACKAGE_STRING='yast2-squid 2.15.1'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1181,7 +1181,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-squid 2.15.0 to adapt to many kinds of systems.
+\`configure' configures yast2-squid 2.15.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1252,7 +1252,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-squid 2.15.0:";;
+ short | recursive ) echo "Configuration of yast2-squid 2.15.1:";;
esac
cat <<\_ACEOF
@@ -1330,7 +1330,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-squid configure 2.15.0
+yast2-squid configure 2.15.1
generated by GNU Autoconf 2.60
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1344,7 +1344,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-squid $as_me 2.15.0, which was
+It was created by yast2-squid $as_me 2.15.1, which was
generated by GNU Autoconf 2.60. Invocation command line was
$ $0 $@
@@ -2145,7 +2145,7 @@
# Define the identity of the package.
PACKAGE='yast2-squid'
- VERSION='2.15.0'
+ VERSION='2.15.1'
cat >>confdefs.h <<_ACEOF
@@ -2372,7 +2372,7 @@
-VERSION="2.15.0"
+VERSION="2.15.1"
RPMNAME="yast2-squid"
MAINTAINER="Daniel Fiser "
@@ -3258,7 +3258,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-squid $as_me 2.15.0, which was
+This file was extended by yast2-squid $as_me 2.15.1, which was
generated by GNU Autoconf 2.60. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3301,7 +3301,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-squid config.status 2.15.0
+yast2-squid config.status 2.15.1
configured by $0, generated by GNU Autoconf 2.60,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/configure.in new/yast2-squid-2.15.1/configure.in
--- old/yast2-squid-2.15.0/configure.in 2007-08-15 14:06:24.000000000 +0200
+++ new/yast2-squid-2.15.1/configure.in 2007-08-17 16:18:50.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.14.0 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-squid, 2.15.0, http://bugs.opensuse.org/, yast2-squid)
+AC_INIT(yast2-squid, 2.15.1, http://bugs.opensuse.org/, yast2-squid)
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.15.0"
+VERSION="2.15.1"
RPMNAME="yast2-squid"
MAINTAINER="Daniel Fiser "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/src/dialogs.ycp new/yast2-squid-2.15.1/src/dialogs.ycp
--- old/yast2-squid-2.15.0/src/dialogs.ycp 2007-08-15 09:47:31.000000000 +0200
+++ new/yast2-squid-2.15.1/src/dialogs.ycp 2007-08-17 15:28:36.000000000 +0200
@@ -79,7 +79,7 @@
term dialog_contents =
`VBox(
`Left(`Label( _("HTTP Ports"))),
- `Table(`id("http_port"), `header(_("Host"), _("Port"), _("Options"))),
+ `Table(`id("http_port"), `opt(`notify), `header(_("Host"), _("Port"), _("Options"))),
`HBox(
`PushButton(`id(`add), Label::AddButton()),
`PushButton(`id(`del), Label::DeleteButton()),
@@ -106,7 +106,7 @@
}else if (ret == `add){
if (AddEditHttpPortDialog(nil))
InitHttpPortsTable();
- }else if (ret == `edit){
+ }else if (ret == `edit || ret == "http_port"){
id_item = (integer)UI::QueryWidget(`id("http_port"), `CurrentItem);
if (AddEditHttpPortDialog(id_item)){
InitHttpPortsTable();
@@ -131,7 +131,7 @@
`VBox(
`Left(`Label( _("Refresh Patterns"))),
`HBox(
- `Table(`id("refresh_patterns"), `opt(`keepSorting),
+ `Table(`id("refresh_patterns"), `opt(`keepSorting, `notify),
`header(_("Regular Expression"), _("Min"), _("Precent"), _("Max")/*, _("Options")*/)),
`VBox(
`PushButton(`id(`up), Label::UpButton()),
@@ -163,7 +163,7 @@
}else if (ret == `add){
if (AddEditRefreshPatternDialog(nil))
InitRefreshPatternsTable();
- }else if (ret == `edit){
+ }else if (ret == `edit || ret == "refresh_patterns"){
id_item = (integer)UI::QueryWidget(`id("refresh_patterns"), `CurrentItem);
if (AddEditRefreshPatternDialog(id_item)){
InitRefreshPatternsTable();
@@ -195,52 +195,73 @@
any Cache2Dialog(){
any ret = nil;
string cache_dir = "";
+
term dialog_contents =
- `VBox(
- `Top(`Left(
- `VBox(
+ `VCenter( `HBox(
+ `HSpacing(3),
+ `VBox(
+ `VWeight(1, `Frame(_("Cache Setting"),
`HBox(
- `HSquash(`IntField(`id("cache_mem"), _("Cache Memory"), 1, 99999, 10)),
- sizeUnitWidget("cache_mem_units"),
- `HStretch()
- ),
- `VSpacing(),
- `HBox(
- `HSquash(`IntField(`id("cache_max_object_size"), _("Max Object Size"), 0, 99999, 0)),
- sizeUnitWidget("cache_max_object_size_units"),
- `HSpacing(3),
- `HSquash(`IntField(`id("cache_min_object_size"), _("Min Object Size"), 0, 99999, 0)),
- sizeUnitWidget("cache_min_object_size_units"),
- `HStretch()
- ),
- `VSpacing(),
- `VSquash(`HBox(
- `HSquash(`IntField(`id("cache_swap_low"), _("Swap Low-Water Mark"), 0, 100, 0)),
- `Bottom(`Label("%")),
- `HSpacing(3),
- `HSquash(`IntField(`id("cache_swap_high"), _("Swap High-Water Mark"), 0, 100, 0)),
- `Bottom(`Label("%")),
- `HStretch()
- )),
- `VSpacing(),
- `Left(`HBox(
- `ComboBox(`id("cache_replacement_policy"),
- _("Cache Replacement Policy"),
- [`item("lru"), `item("heap GDSF"), `item("heap LFUDA"), `item("heap LRU")]),
+ `HWeight(1,`VBox(
+ `VWeight(1, `HBox(
+ `IntField(`id("cache_mem"), _("Cache Memory"), 1, 99999, 10),
+ sizeUnitWidget("cache_mem_units")
+ )),
+ `VSpacing(0.4),
+ `VWeight(1, `HBox(
+ `IntField(`id("cache_max_object_size"), _("Max Object Size"), 0, 99999, 0),
+ sizeUnitWidget("cache_max_object_size_units")
+ )),
+ `VSpacing(0.4),
+ `VWeight(1, `HBox(
+ `IntField(`id("cache_swap_low"), _("Swap Low-Water Mark (in percents)"), 0, 100, 0)
+ )),
+ `VSpacing(0.4),
+ `Left(`VWeight(1, `HBox(
+ `ComboBox(`id("cache_replacement_policy"),
+ _("Cache Replacement Policy"),
+ [`item("lru"), `item("heap GDSF"), `item("heap LFUDA"), `item("heap LRU")])
+ )))
+ )),
`HSpacing(3),
- `ComboBox(`id("memory_replacement_policy"),
- _("Memory Replacement Policy"),
- [`item("lru"), `item("heap GDSF"), `item("heap LFUDA"), `item("heap LRU")])
- )),
- `VSpacing(),
- `VSquash(`HBox(
- `TextEntry(`id("cache_dir"), _("Cache Directory"), ""),
- `Bottom(`PushButton(`id(`browse_cache_dir), Label::BrowseButton())),
- `Bottom(`PushButton(`id(`cache_dir), "Advanced Setting"))
- ))
- )
- ))
- );
+ `HWeight(1,`VBox(
+ `VWeight(1, `HBox(`Empty())),
+ `VSpacing(0.4),
+ `VWeight(1, `HBox(
+ `IntField(`id("cache_min_object_size"), _("Min Object Size"), 0, 99999, 0),
+ sizeUnitWidget("cache_min_object_size_units")
+ )),
+ `VSpacing(0.4),
+ `VWeight(1, `HBox(
+ `IntField(`id("cache_swap_high"), _("Swap High-Water Mark (in percents)"), 0, 100, 0)
+ )),
+ `VSpacing(0.4),
+ `Left(`VWeight(1, `HBox(
+ `ComboBox(`id("memory_replacement_policy"),
+ _("Memory Replacement Policy"),
+ [`item("lru"), `item("heap GDSF"), `item("heap LFUDA"), `item("heap LRU")])
+ )))
+ ))
+ )
+ )),
+ `VSpacing(),
+ `VWeight(1, `Frame(_("Cache Directory"),
+ `VBox(
+ `VSquash(`HBox(
+ `TextEntry(`id("cache_dir"), _("Cache Directory"), ""),
+ `Bottom(`PushButton(`id(`browse_cache_dir), Label::BrowseButton()))
+ )),
+ `VSpacing(0.4),
+ `IntField(`id("mbytes"), _("Size (in MB)"), 0, 99999, 0),
+ `VSpacing(0.4),
+ `IntField(`id("l1dirs"), _("Level 1 Directories"), 0, 99999, 0),
+ `VSpacing(0.4),
+ `IntField(`id("l2dirs"), _("Level 2 Directories"), 0, 99999, 0)
+ )
+ ))
+ ),
+ `HSpacing(3)
+ ));
Wizard::SetContentsButtons("Squid - Cache Setting 2", dialog_contents, HELPS["cache2"]:"",
Label::BackButton(), Label::NextButton());
@@ -258,8 +279,6 @@
}else if (ret == `abort || ret == `cancel){
if (reallyAbort()) break;
continue;
- }else if (ret == `cache_dir){
- CacheDirAdvancedSettingDialog();
}else if (ret == `browse_cache_dir){
cache_dir = UI::AskForExistingDirectory((string)UI::QueryWidget(`id("cache_dir"), `Value), "Cache Directory");
if (cache_dir != nil){
@@ -279,7 +298,7 @@
term dialog_contents =
`VBox(
`Left(`Label(_("ACL Groups"))),
- `Table(`id("acl"), `header(_("Name"), _("Type"), _("Description"))),
+ `Table(`id("acl"), `opt(`notify), `header(_("Name"), _("Type"), _("Description"))),
`HBox(
`PushButton(`id(`add_acl), Label::AddButton()),
`PushButton(`id(`del_acl), Label::DeleteButton()),
@@ -291,7 +310,7 @@
`Left(`Label(_("Access Control"))),
`HBox(
- `Table(`id("http_access"), `opt(`keepSorting), `header(_("Allow/Deny"), _("ACL Groups"))),
+ `Table(`id("http_access"), `opt(`keepSorting, `notify), `header(_("Allow/Deny"), _("ACL Groups"))),
`HSquash(`VBox(
`HWeight(1, `PushButton(`id(`up_http_access), Label::UpButton())),
`HWeight(1, `PushButton(`id(`down_http_access), Label::DownButton()))
@@ -324,7 +343,7 @@
if (AddEditACLDialog(nil)){
InitACLGroupsTable();
}
- }else if (ret == `edit_acl){
+ }else if (ret == `edit_acl || ret == "acl"){
id_item = (integer)UI::QueryWidget(`id("acl"), `CurrentItem);
if (AddEditACLDialog(id_item)){
InitACLGroupsTable();
@@ -339,7 +358,7 @@
if (AddEditHttpAccessDialog(nil)){
InitHttpAccessTable();
}
- }else if (ret == `edit_http_access){
+ }else if (ret == `edit_http_access || ret == "http_access"){
id_item = (integer)UI::QueryWidget(`id("http_access"), `CurrentItem);
if (AddEditHttpAccessDialog(id_item)){
InitHttpAccessTable();
@@ -374,8 +393,8 @@
any ret = nil;
string tmp = nil;
term dialog_contents =
- `Top(`VBox(
- `Left(`Frame(_("Logging"),
+ `HBox(`HSpacing(3), `VBox(
+ `Frame(_("Logging"),
`VBox(
`VSquash(`HBox(
`TextEntry(`id("access_log"), _("Access Log") , ""),
@@ -391,11 +410,11 @@
)),
`Left(`CheckBox(`id("emulate_httpd_log"), _("Emulate Httpd Log?")))
)
- )),
+ ),
`VSpacing(),
- `Left(`Frame(_("Timeouts"),
+ `Frame(_("Timeouts"),
`VBox(
`HBox(
`IntField(`id("connect_timeout"), _("Connection timeout"), 0, 99999, 0),
@@ -406,10 +425,10 @@
timeUnitWidget("client_lifetime_units")
)
)
- ))
- ));
+ )
+ ), `HSpacing(3));
- Wizard::SetContentsButtons("Squid - Logging + Timeouts Setting", dialog_contents, HELPS["logging_timeouts"]:"",
+ Wizard::SetContentsButtons("Squid - Logging and Timeouts Setting", dialog_contents, HELPS["logging_timeouts"]:"",
Label::BackButton(), Label::NextButton());
InitLoggingFrame();
@@ -449,15 +468,15 @@
{
any ret = nil;
term dialog_contents =
- `Top(`VBox(
- `Left(`ComboBox(`id("error_language"),
+ `HVCenter(`Frame(_("Miscellaneous Setting"), `VBox(
+ `ComboBox(`id("error_language"),
_("Language of error messages"),
- [])),
+ []),
`VSpacing(),
- `Left(`TextEntry(`id("cache_mgr"), _("Administrator's e-mail"), "")),
+ `TextEntry(`id("cache_mgr"), _("Administrator's e-mail"), ""),
`VSpacing(),
- `Left(`CheckBox(`id("ftp_passive"), _("Use Ftp Pasive Mode")))
- ));
+ `CheckBox(`id("ftp_passive"), _("Use Ftp Pasive Mode"))
+ )));
Wizard::SetContentsButtons("Squid - Miscellaneous Setting", dialog_contents, HELPS["miscellaneous"]:"",
Label::BackButton(), Label::FinishButton());
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/src/inits.ycp new/yast2-squid-2.15.1/src/inits.ycp
--- old/yast2-squid-2.15.0/src/inits.ycp 2007-08-15 09:47:31.000000000 +0200
+++ new/yast2-squid-2.15.1/src/inits.ycp 2007-08-17 15:32:04.000000000 +0200
@@ -156,14 +156,7 @@
"cache_swap_high" : tointeger((set["cache_swap_high"]:[])[0]:""),
"cache_replacement_policy" : (set["cache_replacement_policy"]:[])[0]:"",
"memory_replacement_policy" : (set["memory_replacement_policy"]:[])[0]:"",
- "cache_dir" : (set["cache_dir"]:[])[1]:""
- ]);
-}
-void InitCacheDirAdvancedSettingDialog()
-{
- map set = (map)Squid::GetSettings();
- simpleInit($[
- //"type" : (set["cache_dir"]:[])[0]:"",
+ "cache_dir" : (set["cache_dir"]:[])[1]:"",
"mbytes" : tointeger((set["cache_dir"]:[])[2]:""),
"l1dirs" : tointeger((set["cache_dir"]:[])[3]:""),
"l2dirs" : tointeger((set["cache_dir"]:[])[4]:"")
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/src/popup_dialogs.ycp new/yast2-squid-2.15.1/src/popup_dialogs.ycp
--- old/yast2-squid-2.15.0/src/popup_dialogs.ycp 2007-08-15 09:47:31.000000000 +0200
+++ new/yast2-squid-2.15.1/src/popup_dialogs.ycp 2007-08-17 15:30:52.000000000 +0200
@@ -53,9 +53,7 @@
`TextEntry(`id("host"), _("Host"), ""),
`TextEntry(`id("port"), _("Port"), ""),
`Frame(_("Options"),
- `VBox(
`CheckBox(`id("transparent"), "Transparent", false)
- )
),
`VSpacing(),
`VStretch(),
@@ -140,52 +138,6 @@
UI::CloseDialog();
return ret;
}
-
-
-boolean CacheDirAdvancedSettingDialog(){
- boolean ret = false;
- any ui = nil;
- term contents =
- `VBox(
- `Label( _("Cache Directory Advanced Setting")),
- `VSpacing(0.5),
-
- //`ComboBox(`id("type"), _("Type"), []),
- `IntField(`id("mbytes"), _("Size (in MB)"), 1, 99999, 10),
- `IntField(`id("l1dirs"), _("Level 1 Directories"), 1, 99999, 20),
- `IntField(`id("l2dirs"), _("Level 2 Directories"), 1, 99999, 20),
-
- `VSpacing(),
-
- `HBox(
- `PushButton(`id(`cancel), Label::CancelButton()),
- `PushButton(`id(`ok), Label::OKButton())
- )
- );
-
- UI::OpenDialog(contents);
-
-
- InitCacheDirAdvancedSettingDialog();
-
- while (true){
- ui = UI::UserInput();
-
- if (ui == `cancel || ui == `abort){
- ret = false;
- break;
- }else if (ui == `ok){
- if (StoreDataFromCacheDirAdvancedSettingDialog()){
- ret = true;
- break;
- }
- }
- }
-
-
- UI::CloseDialog();
- return ret;
-}
/***************** CACHE END ********************/
@@ -245,7 +197,7 @@
//`VSpacing(),
`MinSize(25, 7,
- `Table(`id("acls"), `header(" ", _("ACL")), [])
+ `Table(`id("acls"), `opt(`notify), `header(" ", _("ACL")), [])
),
`Left(`HBox(
`PushButton(`id(`del), Label::DeleteButton()),
@@ -296,7 +248,7 @@
id_acl = delItemFromAddEditHttpAccessDialog((integer)UI::QueryWidget(`id("acls"), `CurrentItem));
InitAddEditHttpAccessDialog(nil);
UI::ChangeWidget(`id("acls"), `CurrentItem, id_acl);
- }else if (ui == `opposite){
+ }else if (ui == `opposite || ui == "acls"){
id_acl = (integer)UI::QueryWidget(`id("acls"), `CurrentItem);
tmp_term = (term)UI::QueryWidget(`id("acls"), `Item(id_acl));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/src/SquidACL_local_functions.ycp new/yast2-squid-2.15.1/src/SquidACL_local_functions.ycp
--- old/yast2-squid-2.15.0/src/SquidACL_local_functions.ycp 2007-08-15 09:47:31.000000000 +0200
+++ new/yast2-squid-2.15.1/src/SquidACL_local_functions.ycp 2007-08-16 14:42:40.000000000 +0200
@@ -226,7 +226,7 @@
return `Frame( frame_title,
`VBox(
`TextEntry(`id("acl_regexp"), _("Regular Expression"), ""),
- `CheckBox(`id("acl_regexp_case_insensitive"), _("Case Insensitive"), false)
+ `Left(`CheckBox(`id("acl_regexp_case_insensitive"), _("Case Insensitive"), false))
)
);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/src/SquidACL.ycp new/yast2-squid-2.15.1/src/SquidACL.ycp
--- old/yast2-squid-2.15.0/src/SquidACL.ycp 2007-08-15 09:47:31.000000000 +0200
+++ new/yast2-squid-2.15.1/src/SquidACL.ycp 2007-08-16 14:44:19.000000000 +0200
@@ -225,7 +225,7 @@
`VBox(
`TextEntry(`id("acl_header_name"), _("Header Name"), ""),
`TextEntry(`id("acl_regexp"), _("Regular Expression(s)"), ""),
- `CheckBox(`id("acl_regexp_case_insensitive"), _("Case Insensitive"), false)
+ `Left(`CheckBox(`id("acl_regexp_case_insensitive"), _("Case Insensitive"), false))
)
),
"widget_init" : headerWidgetInit,
@@ -238,7 +238,7 @@
`VBox(
`TextEntry(`id("acl_header_name"), _("Header Name"), ""),
`TextEntry(`id("acl_regexp"), _("Regular Expression(s)"), ""),
- `CheckBox(`id("acl_regexp_case_insensitive"), _("Case Insensitive"), false)
+ `Left(`CheckBox(`id("acl_regexp_case_insensitive"), _("Case Insensitive"), false))
)
),
"widget_init" : headerWidgetInit,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/src/SquidErrorMessages.ycp new/yast2-squid-2.15.1/src/SquidErrorMessages.ycp
--- old/yast2-squid-2.15.0/src/SquidErrorMessages.ycp 2007-08-15 09:47:31.000000000 +0200
+++ new/yast2-squid-2.15.1/src/SquidErrorMessages.ycp 2007-08-17 12:35:51.000000000 +0200
@@ -34,6 +34,9 @@
module "SquidErrorMessages";
textdomain "squid";
+import "FileUtils";
+
+
/**
* format:
* $[ "language" : "path_to_directory",
@@ -42,21 +45,26 @@
*/
map err = $[];
+/**
+ * Directory where is located directories with messages in various languages.
+ */
string err_msg_dir = "/usr/share/squid/errors";
void read()
{
- //if err uninitialized
+ //if err uninitialized else do nothing
if (size(err) == 0){
- map bash_output = (map)SCR::Execute(.target.bash_output, "cd " + err_msg_dir + "; ls -d */");
err = $[];
- foreach (string dir, splitstring(bash_output["stdout"]:"","\n"),
+ string dir = "";
+ foreach (string value, (list<string>)SCR::Read(.target.dir, err_msg_dir),
{
- dir = deletechars(dir, "/");
- dir = mergestring(splitstring(dir, "_"), " ");
- if (size(dir)>0)
- err[dir] = err_msg_dir + "/" + dir;
+ if (FileUtils::IsDirectory(err_msg_dir + "/" + value)){
+ dir = mergestring(splitstring(value, "_"), " ");
+ if (size(dir) > 0){
+ err[dir] = err_msg_dir + "/" + value;
+ }
+ }
});
y2debug("SquidErrorMessages::read() - err: %1", err);
@@ -99,6 +107,8 @@
*/
global string GetPath(string language)
{
+ read();
+
return err[language]:"";
}
@@ -108,6 +118,8 @@
*/
global string GetLanguageFromPath(string pth)
{
+ read();
+
string ret = nil;
foreach (string key, string value, err,
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/src/Squid.ycp new/yast2-squid-2.15.1/src/Squid.ycp
--- old/yast2-squid-2.15.0/src/Squid.ycp 2007-08-15 09:47:31.000000000 +0200
+++ new/yast2-squid-2.15.1/src/Squid.ycp 2007-08-17 15:34:28.000000000 +0200
@@ -41,6 +41,7 @@
import "Message";
import "Service";
import "Summary";
+import "FileUtils";
/**
* Defines path used in SCR::Read/Write functions
@@ -209,6 +210,28 @@
return ret;
}
+
+
+/**
+ * Function which sets permissions 'chmod 750' and 'chown squid:root'
+ * to directory dir if exists.
+ * If dir does not exist, function returns true;
+ */
+boolean setWritePremissionsToCacheDir(string dir)
+{
+ if (!FileUtils::IsDirectory(dir)){
+ y2debug("Squid::checkWritePremissionsCacheDir() - '%1' is not directory", dir);
+ return true;
+ }
+
+ if ((integer)SCR::Execute(.target.bash, "chown squid:root " + dir) != 0 ||
+ (integer)SCR::Execute(.target.bash, "chmod 750 " + dir) != 0){
+ return false;
+ //return (Popup::ContinueCancel(sformat(_("Unable to set correct permissions to directory %1."), dir)));
+ }
+
+ return true;
+}
/***************** HELP FUNCTIONS END ***********/
@@ -1113,13 +1136,26 @@
return ok;
}
+boolean writePermissions()
+{
+ string cache_dir = (settings["cache_dir"]:[])[1]:"";
+ boolean ok = true;
+
+ if (!setWritePremissionsToCacheDir(cache_dir))
+ ok = false;
+ return ok;
+}
+
boolean writeAllSettings()
{
+ boolean ok = true;
+
+ if (!writePermissions()) ok = false;
+
if (!GetModified()){
y2debug("Squid::Write - no setting to write, because nothing's changed");
- return true;
+ return ok;
}
- boolean ok = true;
y2milestone("Squid::writeAllSettings started");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/src/store_del.ycp new/yast2-squid-2.15.1/src/store_del.ycp
--- old/yast2-squid-2.15.0/src/store_del.ycp 2007-08-15 09:47:31.000000000 +0200
+++ new/yast2-squid-2.15.1/src/store_del.ycp 2007-08-17 15:31:01.000000000 +0200
@@ -35,6 +35,7 @@
import "Report";
import "FileUtils";
import "Popup";
+import "FileUtils";
import "Squid";
import "SquidACL";
@@ -43,6 +44,18 @@
include "squid/helps.ycp";
+/****** help functions **********/
+boolean isCorrectPathnameOfLogFile(string str)
+{
+ boolean ok = regexpmatch(str, "^/([^/]+/)*[^/]+$");
+ if (ok){
+ list<string> dir = regexptokenize(str, "^(.+)/[^/]+$");
+ if (!FileUtils::IsDirectory(dir[0]:"/"))
+ ok = false;
+ }
+ return ok;
+}
+/****** help functions END ******/
/***************** HTTP_PORT ********************/
boolean StoreDataFromAddEditHttpPortDialog(integer id_item)
@@ -142,38 +155,6 @@
/************** CACHE DIALOG ********************/
-boolean StoreDataFromCacheDirAdvancedSettingDialog()
-{
- list set = Squid::GetSetting("cache_dir");
- Squid::SetSetting("cache_dir",
- [set[0]:"",
- set[1]:"",
- tostring(UI::QueryWidget(`id("mbytes"), `Value)),
- tostring(UI::QueryWidget(`id("l1dirs"), `Value)),
- tostring(UI::QueryWidget(`id("l2dirs"), `Value))]);
- return true;
-}
-
-/**
- * Function which sets permissions 'chmod 750' and 'chown squid:root'
- * to directory dir if exists.
- * If dir does not exist, function returns true;
- */
-boolean setWritePremissionsToCacheDir(string dir)
-{
- if (!FileUtils::IsDirectory(dir)){
- y2debug("store_del::checkWritePremissionsCacheDir() - '%1' is not directory", dir);
- return true;
- }
-
- if ((integer)SCR::Execute(.target.bash, "chown squid:root " + dir) != 0 ||
- (integer)SCR::Execute(.target.bash, "chmod 750 " + dir) != 0){
- return (Popup::ContinueCancel(sformat(_("Unable to set correct permissions to directory %1."), dir)));
- }
-
- return true;
-}
-
boolean StoreDataFromCache2Dialog()
{
boolean ok = true;
@@ -187,13 +168,13 @@
ok = false;
}
- if (ok && !setWritePremissionsToCacheDir(cache_dir)){
- ok = false;
- }
-
if (ok){
- Squid::SetSetting("cache_dir", [squid_cache_dir[0]:"", cache_dir, squid_cache_dir[2]:"",
- squid_cache_dir[3]:"", squid_cache_dir[4]:""]);
+ Squid::SetSetting("cache_dir",
+ [squid_cache_dir[0]:"",
+ cache_dir,
+ tostring(UI::QueryWidget(`id("mbytes"), `Value)),
+ tostring(UI::QueryWidget(`id("l1dirs"), `Value)),
+ tostring(UI::QueryWidget(`id("l2dirs"), `Value))]);
Squid::SetSetting("cache_mem", [tostring(UI::QueryWidget(`id("cache_mem"), `Value)),
UI::QueryWidget(`id("cache_mem_units"), `Value)]);
Squid::SetSetting("maximum_object_size", [tostring(UI::QueryWidget(`id("cache_max_object_size"), `Value)),
@@ -420,6 +401,18 @@
ok = false;
message = message + (size(message)>0 ? "\n" : "") + _("Cache Log must not be empty.");
}
+ if (size(access_log) > 0 && !isCorrectPathnameOfLogFile(access_log)){
+ ok = false;
+ message = message + (size(message)>0 ? "\n" : "") + _("Incorrect pathname in Access Log field.");
+ }
+ if (size(cache_log) > 0 && !isCorrectPathnameOfLogFile(cache_log)){
+ ok = false;
+ message = message + (size(message)>0 ? "\n" : "") + _("Incorrect pathname in Cache Log field.");
+ }
+ if (size(cache_store_log) > 0 && !isCorrectPathnameOfLogFile(cache_store_log)){
+ ok = false;
+ message = message + (size(message)>0 ? "\n" : "") + _("Incorrect pathname in Cache Store Log field.");
+ }
/*
if (size(cache_store_log) == 0){
ok = false;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/testsuite/tests/SquidErrorMessages.out new/yast2-squid-2.15.1/testsuite/tests/SquidErrorMessages.out
--- old/yast2-squid-2.15.0/testsuite/tests/SquidErrorMessages.out 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-squid-2.15.1/testsuite/tests/SquidErrorMessages.out 2007-08-17 13:48:34.000000000 +0200
@@ -0,0 +1,16 @@
+Dump GetLanguages()
+Read .target.dir "/usr/share/squid/errors" ["Russian-1251", "a_file", "English", "b_file", "Simplify_Chinese", "c_file"]
+Return ["English", "Russian-1251", "Simplify Chinese"]
+Dump
+Dump GetLanguagesToComboBox()
+Return [`item (`id ("English"), "English"), `item (`id ("Russian-1251"), "Russian-1251"), `item (`id ("Simplify Chinese"), "Simplify Chinese")]
+Dump
+Dump GetPath("English")
+Return /usr/share/squid/errors/English
+Dump GetPath("Simplify Chinese")
+Return /usr/share/squid/errors/Simplify_Chinese
+Dump
+Dump GetLanguageFromPath(/usr/share/squid/errors/English)
+Return English
+Dump GetLanguageFromPath(/usr/share/squid/errors/Simplify_Chinese)
+Return Simplify Chinese
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/testsuite/tests/SquidErrorMessages.ycp new/yast2-squid-2.15.1/testsuite/tests/SquidErrorMessages.ycp
--- old/yast2-squid-2.15.0/testsuite/tests/SquidErrorMessages.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-squid-2.15.1/testsuite/tests/SquidErrorMessages.ycp 2007-08-17 13:47:33.000000000 +0200
@@ -0,0 +1,52 @@
+{
+
+// testedfiles: SquidErrorMessages.ycp
+
+any READ = [
+ $[ "target" : $[
+ "dir" : [ "Russian-1251",
+ "a_file",
+ "English",
+ "b_file",
+ "Simplify_Chinese",
+ "c_file"]
+ ]],
+
+ $[ "target" : $[ "stat" : $[ "isdir" : true]]],
+ $[ "target" : $[ "stat" : $[ "isdir" : false]]],
+ $[ "target" : $[ "stat" : $[ "isdir" : true]]],
+ $[ "target" : $[ "stat" : $[ "isdir" : false]]],
+ $[ "target" : $[ "stat" : $[ "isdir" : true]]],
+ $[ "target" : $[ "stat" : $[ "isdir" : false]]],
+];
+
+map WRITE = $[];
+map EXECUTE = $[];
+
+include "testsuite.ycp";
+
+import "SquidErrorMessages";
+import "FileUtils";
+
+
+DUMP("GetLanguages()");
+TEST(``(SquidErrorMessages::GetLanguages()),[READ,WRITE,EXECUTE], nil);
+
+DUMP("");
+DUMP("GetLanguagesToComboBox()");
+TEST(``(SquidErrorMessages::GetLanguagesToComboBox()),[READ,WRITE,EXECUTE], nil);
+
+DUMP("");
+DUMP("GetPath(\"English\")");
+TEST(``(SquidErrorMessages::GetPath("English")),[READ,WRITE,EXECUTE], nil);
+DUMP("GetPath(\"Simplify Chinese\")");
+TEST(``(SquidErrorMessages::GetPath("Simplify Chinese")),[READ,WRITE,EXECUTE], nil);
+
+DUMP("");
+DUMP("GetLanguageFromPath(" + SquidErrorMessages::err_msg_dir + "/English" + ")");
+TEST(``(SquidErrorMessages::GetLanguageFromPath(SquidErrorMessages::err_msg_dir + "/English")),[READ,WRITE,EXECUTE], nil);
+DUMP("GetLanguageFromPath(" + SquidErrorMessages::err_msg_dir + "/Simplify_Chinese" + ")");
+TEST(``(SquidErrorMessages::GetLanguageFromPath(SquidErrorMessages::err_msg_dir + "/Simplify_Chinese")),[READ,WRITE,EXECUTE], nil);
+
+}
+/* vim: set sw=4 ts=4 et ft=ycp : */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-squid-2.15.0/VERSION new/yast2-squid-2.15.1/VERSION
--- old/yast2-squid-2.15.0/VERSION 2007-08-15 13:56:31.000000000 +0200
+++ new/yast2-squid-2.15.1/VERSION 2007-08-17 15:46:50.000000000 +0200
@@ -1 +1 @@
-2.15.0
+2.15.1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org