Hello community,
here is the log from the commit of package yast2-printer
checked in at Wed Oct 8 18:48:20 CEST 2008.
--------
--- yast2-printer/yast2-printer.changes 2008-09-26 12:59:54.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-printer/yast2-printer.changes 2008-10-08 12:19:31.334183000 +0200
@@ -1,0 +2,9 @@
+Wed Oct 8 12:10:46 CEST 2008 - jsmeix@suse.de
+
+- The "Share Printers" dialog should now work
+- Increased MAXIMUM_WAIT to 300 seconds in
+ tools/create_printer_ppd_database
+ (see Novell/Suse Bugzilla bnc#429397).
+- 2.17.18
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-printer-2.17.17.tar.bz2
New:
----
yast2-printer-2.17.18.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.rh8337/_old 2008-10-08 18:46:08.000000000 +0200
+++ /var/tmp/diff_new_pack.rh8337/_new 2008-10-08 18:46:08.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.17.17)
+# spec file for package yast2-printer (Version 2.17.18)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,12 +20,12 @@
Url: http://en.opensuse.org/YaST/Modules/Printer
Name: yast2-printer
-Version: 2.17.17
+Version: 2.17.18
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.17.17.tar.bz2
+Source0: yast2-printer-2.17.18.tar.bz2
Prefix: /usr
BuildRequires: cups-devel update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite
Recommends: netcat
@@ -64,7 +64,7 @@
Michal Zugec
%prep
-%setup -n yast2-printer-2.17.17
+%setup -n yast2-printer-2.17.18
%build
%{prefix}/bin/y2tool y2autoconf
@@ -118,7 +118,14 @@
%doc %{prefix}/share/doc/packages/yast2-printer
%exclude %{prefix}/share/doc/packages/yast2-printer/COPYING
%exclude %{prefix}/share/doc/packages/yast2-printer/README
+
%changelog
+* Wed Oct 08 2008 jsmeix@suse.de
+- The "Share Printers" dialog should now work
+- Increased MAXIMUM_WAIT to 300 seconds in
+ tools/create_printer_ppd_database
+ (see Novell/Suse Bugzilla bnc#429397).
+- 2.17.18
* Fri Sep 26 2008 jsmeix@suse.de
- In the "Share Printers" dialog it is now no longer possible
to "Add" the same network interface several times
++++++ yast2-printer-2.17.17.tar.bz2 -> yast2-printer-2.17.18.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/configure new/yast2-printer-2.17.18/configure
--- old/yast2-printer-2.17.17/configure 2008-09-26 12:55:31.000000000 +0200
+++ new/yast2-printer-2.17.18/configure 2008-10-08 12:15:15.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for yast2-printer 2.17.17.
+# Generated by GNU Autoconf 2.61 for yast2-printer 2.17.18.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -574,8 +574,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-printer'
PACKAGE_TARNAME='yast2-printer'
-PACKAGE_VERSION='2.17.17'
-PACKAGE_STRING='yast2-printer 2.17.17'
+PACKAGE_VERSION='2.17.18'
+PACKAGE_STRING='yast2-printer 2.17.18'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1197,7 +1197,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-printer 2.17.17 to adapt to many kinds of systems.
+\`configure' configures yast2-printer 2.17.18 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1268,7 +1268,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-printer 2.17.17:";;
+ short | recursive ) echo "Configuration of yast2-printer 2.17.18:";;
esac
cat <<\_ACEOF
@@ -1346,7 +1346,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-printer configure 2.17.17
+yast2-printer configure 2.17.18
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1360,7 +1360,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-printer $as_me 2.17.17, which was
+It was created by yast2-printer $as_me 2.17.18, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2181,7 +2181,7 @@
# Define the identity of the package.
PACKAGE='yast2-printer'
- VERSION='2.17.17'
+ VERSION='2.17.18'
cat >>confdefs.h <<_ACEOF
@@ -2409,7 +2409,7 @@
-VERSION="2.17.17"
+VERSION="2.17.18"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
@@ -3304,7 +3304,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-printer $as_me 2.17.17, which was
+This file was extended by yast2-printer $as_me 2.17.18, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3347,7 +3347,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-printer config.status 2.17.17
+yast2-printer config.status 2.17.18
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/configure.in new/yast2-printer-2.17.18/configure.in
--- old/yast2-printer-2.17.17/configure.in 2008-09-26 12:55:27.000000000 +0200
+++ new/yast2-printer-2.17.18/configure.in 2008-10-08 12:15:11.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.16.7 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-printer, 2.17.17, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.17.18, http://bugs.opensuse.org/, yast2-printer)
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.17.17"
+VERSION="2.17.18"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/src/basicadd.ycp new/yast2-printer-2.17.18/src/basicadd.ycp
--- old/yast2-printer-2.17.17/src/basicadd.ycp 2008-09-26 12:28:04.000000000 +0200
+++ new/yast2-printer-2.17.18/src/basicadd.ycp 2008-10-08 06:53:33.000000000 +0200
@@ -76,7 +76,7 @@
// (without clicking additionally a button)
// but the notify and immediate options
// forces UserInput() in this case:
- `opt(`notify, `immediate),
+ `opt(`notify, `immediate, `keepSorting),
// Headers of a Table with a list of printer connections:
`header
( // Header of a Table column with a list of printer connections.
@@ -289,7 +289,7 @@
// (without clicking additionally a button)
// but the notify and immediate options
// forces UserInput() in this case:
- `opt(`notify, `immediate),
+ `opt(`notify, `immediate, `keepSorting),
// Headers of a Table with a list of printer connections:
`header( // Header of a Table column with a list of printer connections.
// Printer model name:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/src/basicmodify.ycp new/yast2-printer-2.17.18/src/basicmodify.ycp
--- old/yast2-printer-2.17.17/src/basicmodify.ycp 2008-09-26 12:27:37.000000000 +0200
+++ new/yast2-printer-2.17.18/src/basicmodify.ycp 2008-10-08 06:53:33.000000000 +0200
@@ -260,7 +260,7 @@
// (without clicking additionally a button)
// but the notify and immediate options
// forces UserInput() in this case:
- `opt(`notify, `immediate),
+ `opt(`notify, `immediate, `keepSorting),
// Headers of a Table with a list of printer connections:
`header
( // Header of a Table column with a list of printer connections.
@@ -575,7 +575,7 @@
// (without clicking additionally a button)
// but the notify and immediate options
// forces UserInput() in this case:
- `opt(`notify, `immediate),
+ `opt(`notify, `immediate, `keepSorting),
// Headers of a Table with a list of printer connections:
`header( // Header of a Table column with a list of printer connections.
// Printer model name:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/src/connectionwizard.ycp new/yast2-printer-2.17.18/src/connectionwizard.ycp
--- old/yast2-printer-2.17.17/src/connectionwizard.ycp 2008-09-25 18:03:31.000000000 +0200
+++ new/yast2-printer-2.17.18/src/connectionwizard.ycp 2008-10-08 06:53:33.000000000 +0200
@@ -24,7 +24,7 @@
// (without clicking additionally a button)
// but the notify and immediate options
// forces UserInput() in this case:
- `opt(`notify, `immediate),
+ `opt(`notify, `immediate, `keepSorting),
// Headers of a Table with a list of printer connections:
`header
( // Header of a Table column with a list of printer connections.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/src/overview.ycp new/yast2-printer-2.17.18/src/overview.ycp
--- old/yast2-printer-2.17.17/src/overview.ycp 2008-09-26 12:09:30.000000000 +0200
+++ new/yast2-printer-2.17.18/src/overview.ycp 2008-10-08 06:53:33.000000000 +0200
@@ -79,7 +79,7 @@
( 2,
`Table
( `id(`overview_table),
- `opt(`notify, `immediate),
+ `opt(`notify, `immediate, `keepSorting),
`header
( // Header of a Table column with a list of print queues.
// Where the queue configuration exists (local or remote):
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/src/Printer.ycp new/yast2-printer-2.17.18/src/Printer.ycp
--- old/yast2-printer-2.17.17/src/Printer.ycp 2008-09-26 12:09:23.000000000 +0200
+++ new/yast2-printer-2.17.18/src/Printer.ycp 2008-10-08 06:53:33.000000000 +0200
@@ -1327,9 +1327,15 @@
// (in openSUSE 10.2 the 13 entries are for the "Kyocera FS-600").
// In openSUSE 10.2 there are only 4 models (HP LaserJet 4, 4100, 9000 and the Kyocera FS-600)
// for which more than 9 entries exist (11 for LaserJet 4100 and 12 for LaserJet 4 and 9000)
- // but there are 23 models with 9 entries (there is no no model with 10 entries)
- // so that a maximum of 10 entries for the special sorting should be o.k.:
- if( size( driver_items ) <= 10 )
+ // but there are 23 models with 9 entries (there is no no model with 10 entries).
+ // Since there is /usr/lib/cups/driver/gutenprint.* the Gutenprint entries are listed twice:
+ // Once for the readymade PPDs in /usr/share/cups/model/gutenprint/
+ // and additionally a second entry from /usr/lib/cups/driver/gutenprint.*
+ // which increases the maximum lenght of the driver_items list for the same model
+ // in openSUSE 11.0 up to 17 for the Kyocera FS-600 and 16 for the HP LaserJet 4
+ // and several other HP LaserJet and Kyocera models with more than 10 entries
+ // so that a maximum of 20 entries for the special sorting should be o.k.:
+ if( size( driver_items ) <= 20 )
{ // Test if all entries in the driver_items list seem to be for the same model.
list< integer > position = [];
string manufacturer_and_model = "";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/src/printingvianetwork.ycp new/yast2-printer-2.17.18/src/printingvianetwork.ycp
--- old/yast2-printer-2.17.17/src/printingvianetwork.ycp 2008-09-25 18:03:31.000000000 +0200
+++ new/yast2-printer-2.17.18/src/printingvianetwork.ycp 2008-10-08 11:04:11.000000000 +0200
@@ -43,7 +43,8 @@
term widgetNetworkPrinting = `VBox
( `VStretch(),
`Frame
- ( _("Use CUPS to Print Via Network"),
+ ( // A caption for a Frame to set up to use CUPS to print via network:
+ _("Use CUPS to Print Via Network"),
`RadioButtonGroup
( `id(`browsing_or_client_only_check_boxes),
`VBox
@@ -51,6 +52,7 @@
( `RadioButton
( `id(`browsing_off_radio_button),
`opt(`notify),
+ // A RadioButton to not receive printer information from remote CUPS servers:
_("&Do not Receive Printer Information from Remote CUPS servers")
)
),
@@ -58,6 +60,7 @@
( `RadioButton
( `id(`browsing_on_radio_button),
`opt(`notify),
+ // A RadioButton to receive printer information from remote CUPS servers:
_("Receive Printer &Information from Remote CUPS servers")
)
),
@@ -67,6 +70,8 @@
( `Left
( `Label
( `id(`browse_allow_label),
+ // A header for a section to set up from which remote CUPS servers
+ // printer information is accepted:
_("Accept Information from the Following Servers")
)
),
@@ -74,6 +79,9 @@
( `ComboBox
( `id(`browse_allow_combo_box),
`opt(`notify),
+ // A header for a ComboBox from which the user can select
+ // a usual general setting from which remote CUPS servers
+ // printer information is accepted:
_("Usual &General Setting"),
[ `item( `id(`browse_allow_all), "all hosts" ),
`item( `id(`browse_allow_local), "hosts in the local network" ),
@@ -84,12 +92,18 @@
`Left
( `TextEntry
( `id(`browse_allow_input),
+ // A header for a TextEntry where the user can optionally
+ // enter specific IP addresses and/or network/netmask
+ // from where remote printer information is accepted:
_("Optional Specific IP Addresses or &Network/Netmask")
)
),
`Left
( `Label
( `id(`browse_allow_input_label),
+ // Label to show the syntax for the TextEntry where the user can
+ // enter specific IP addresses and/or network/netmask
+ // from where remote printer information is accepted:
_("(each nnn.nnn.nnn.nnn or nnn.nnn.nnn.nnn/mmm.mmm.mmm.mmm separated by one space)")
)
)
@@ -100,6 +114,8 @@
( `RadioButton
( `id(`client_only_radio_button),
`opt(`notify),
+ // A RadioButton to do all printing tasks directly
+ // only via one single remote CUPS server:
_("Do All Your Printing Directly via &One Remote CUPS Server")
)
),
@@ -109,6 +125,9 @@
( 2,
`TextEntry
( `id(`client_conf_server_name_input),
+ // A header for a TextEntry where the user can enter
+ // the one single remote CUPS server which is used
+ // to do all his printing tasks:
_("&Hostname / IP Address")
)
),
@@ -116,6 +135,8 @@
( 1,
`PushButton
( `id(`test_client_conf_server),
+ // A PushButton to test whether or not the one single remote CUPS server
+ // which is used to do all printing tasks is accessible:
_("&Test Server")
)
),
@@ -126,11 +147,15 @@
),
`VStretch(),
`Frame
- ( _("Use Another Print Server or Use a Network Printer Directly"),
+ ( // A caption for a Frame to set up to use another (i.e. non-CUPS) print server
+ // or to set up to use a network printer directly:
+ _("Use Another Print Server or Use a Network Printer Directly"),
`Left
( `PushButton
( `id(`connection_wizard),
- _("&Connection Wizard")
+ // Label of a PushButton to go to the "Connection Wizard"
+ // to specify the printer connection individually:
+ _("Connection &Wizard")
)
)
),
@@ -418,9 +443,15 @@
if( `browsing_on_radio_button == initial_radio_button )
{ // It was initially a "Get browsing info" config,
// but now the user may have changed from which hosts browsing info is accepted:
- if( current_browse_allow != initial_browse_allow
- || current_browse_allow_input_value != initial_browse_allow_input_value
- )
+ if( current_browse_allow != initial_browse_allow )
+ { printing_via_network_has_changed = true;
+ }
+ // Check if there are real changes in the values in browse_allow_input.
+ // Do not ignore changes in the case (e.g. from 'host.domain.com' to 'Host.Domain.com')
+ // because the user may like to have it exactly in cupsd.conf (even if actually case may not matter):
+ list< string > initial_browse_allow_input_set = toset( splitstring( initial_browse_allow_input_value, " " ) );
+ list< string > current_browse_allow_input_set = toset( splitstring( current_browse_allow_input_value, " " ) );
+ if( mergestring( current_browse_allow_input_set, "" ) != mergestring( initial_browse_allow_input_set, "" ) )
{ printing_via_network_has_changed = true;
}
}
@@ -694,6 +725,8 @@
),
" "
);
+ // Have a trailing space character so that the user can easily add something:
+ browse_allow_input_value = browse_allow_input_value + " ";
initial_browse_allow_input_value = browse_allow_input_value;
UI::ChangeWidget( `id(`browse_allow_input), `Value, browse_allow_input_value );
UI::ChangeWidget( `id(`browse_allow_input_label), `Enabled, false );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/src/sharing.ycp new/yast2-printer-2.17.18/src/sharing.ycp
--- old/yast2-printer-2.17.17/src/sharing.ycp 2008-09-26 11:53:42.000000000 +0200
+++ new/yast2-printer-2.17.18/src/sharing.ycp 2008-10-08 12:02:54.000000000 +0200
@@ -41,7 +41,6 @@
boolean share_printers_dialog_is_useless = false;
list< term > interface_table_items = [];
-list< term > ip_table_items = [];
list< string > available_interfaces = [];
boolean sharing_has_changed = false;
boolean initial_deny_remote_access = true;
@@ -49,6 +48,8 @@
boolean initial_allow_local_network_access = false;
boolean initial_publish_to_local_network = false;
list< term > initial_interface_table_items = [];
+string initial_allow_input_value = "";
+string initial_browse_address_input_value = "";
term widgetSharing = `VBox
( `VSpacing( 1 ),
@@ -113,6 +114,7 @@
),
`Table
( `id(`interface_table),
+ `opt(`keepSorting),
`header
( // A table column header where the column lists network interfaces:
_("Interface"),
@@ -146,59 +148,52 @@
)
),
`VSpacing( 1 ),
-
- // Have the IP table disabled until its functionality is implemented:
`Frame
- ( "This functionality is not yet implemented:",
- `VBox
- (
-
- `Left
- ( `Label
- ( `id(`ip_table_label),
- // A caption for a table to allow remote access to local print queues
- // for hosts and/or networks specified in the table below:
- _("For hosts / networks specified below")
- )
- ),
- `Table
- ( `id(`ip_table),
- `header
- ( // A table column header where the column lists IP addresses:
- _("IP address"),
- // A table column header where the column shows whether or not
- // local print queues are published by default
- // via the IP address in the other table column:
- _("Publish printers by default for this address")
- ),
- ip_table_items
- ),
- `Left
- ( `HBox
- ( `PushButton
- ( `id(`add_ip),
- // A PushButton label to add an IP address to the table which shows
- // the IP addresses to allow remote access to local print queues:
- _("A&dd")
+ ( `id(`specific_addresses_frame),
+ // A caption to allow remote access to local print queues
+ // for hosts and/or networks specified in two TextEntries below:
+ _("For Experts: Optional Specific IP Addresses or Networks"),
+ `VBox
+ ( `Left
+ ( `TextEntry
+ ( `id(`allow_input),
+ // TextEntry to allow remote access to local print queues
+ // for hosts and/or networks:
+ _("Allow remote access from those IP addresses or &network/netmask")
+ )
),
- `PushButton
- ( `id(`edit_ip),
- // A PushButton label to change an IP address in the table which shows
- // the IP addresses to allow remote access to local print queues:
- _("Ed&it")
+ `Left
+ ( `Label
+ ( `id(`allow_input_label),
+ // Label to show the syntax for the TextEntry to allow remote access
+ // to local print queues from IP addresses and/or networks:
+ _("(each nnn.nnn.nnn.nnn or nnn.nnn.nnn.nnn/mmm.mmm.mmm.mmm separated by one space)")
+ )
),
- `PushButton
- ( `id(`delete_ip),
- // A PushButton label to delete an IP address from the table which shows
- // the IP addresses to allow remote access to local print queues:
- _("De&lete")
+ `Left
+ ( `HBox
+ ( `HSpacing( 2 ),
+ `TextEntry
+ ( `id(`browse_address_input),
+ // TextEntry to publish local print queues
+ // to IP addresses and/or network broadcast addresses:
+ _("Publish to those IP addresses or network &broadcast addresses")
+ )
+ )
+ ),
+ `Left
+ ( `HBox
+ ( `HSpacing( 2 ),
+ `Label
+ ( `id(`browse_address_input_label),
+ // Label to show the syntax for the TextEntry to to publish
+ // local print queues to hosts and/or networks:
+ _("(each nnn.nnn.nnn.nnn or nnn.nnn.nnn.255 separated by one space)")
+ )
+ )
)
)
)
-
- )
- )
-
)
),
`VSpacing( 1 )
@@ -250,37 +245,6 @@
return interface_map;
}
-map showIPPopup(string device, boolean publish){
- map result = $[];
- UI::OpenDialog( `VBox(
- `CheckBox(`id(`publish), _("&Publish printers by default via "), publish),
- // translators: input field label for list of configured IPs
- `InputField( `id(`device), _("Network &Address:"), device ),
- `VSpacing(),
- `HBox(
- `PushButton( `id(`ok), Label::OKButton() ),
- `PushButton( `id(`cancel), Label::CancelButton() )
- )
- ));
- if(device!="") UI::ChangeWidget(`device, `Value, device);
- while(true){
- any ret = UI::UserInput();
- if (ret==`cancel){
- result=nil;
- break;
- }
- if (ret==`ok){
- publish = (boolean)UI::QueryWidget(`publish, `Value);
- device = (string)UI::QueryWidget(`device, `Value);
- result["device"]=device;
- result["publish"]=publish ? "yes" : "no";
- break;
- }
- }
- UI::CloseDialog();
- return result;
-}
-
boolean ApplySharingSettings()
{ sharing_has_changed = false;
// Get the actual settings and values from the dialog.
@@ -301,8 +265,12 @@
y2milestone( "publish_to_local_network_check_box value: '%1'", publish_to_local_network );
interface_table_items = (list<term>)UI::QueryWidget( `interface_table, `Items );
y2milestone( "interface_table_items: %1", interface_table_items );
- string allow_values = "";
- string browse_address_values = "";
+ string current_allow_input_value = (string)UI::QueryWidget( `id(`allow_input), `Value );
+ y2milestone( "current_allow_input_value: %1", current_allow_input_value );
+ string current_browse_address_input_value = (string)UI::QueryWidget( `id(`browse_address_input), `Value );
+ y2milestone( "current_browse_address_input_value: %1", current_browse_address_input_value );
+ string allow_values = current_allow_input_value;
+ string browse_address_values = current_browse_address_input_value;
foreach( term interface_table_item,
interface_table_items,
{ string interface_name = interface_table_item[1]:"";
@@ -336,7 +304,8 @@
// because this is the safe setting (even when allow_values is not empty):
if( deny_remote_access
|| ! allow_remote_access
- || "" == allow_values
+ || "" == filterchars( allow_values, Printer::alnum_chars + "*" )
+ || contains( splitstring( tolower( current_allow_input_value ), " " ), "none" )
)
{ if( initial_deny_remote_access )
{ // Nothing has changed:
@@ -418,6 +387,19 @@
if( mergestring( interface_table_entries, "" ) != mergestring( initial_interface_table_entries, "" ) )
{ sharing_has_changed = true;
}
+ // Check if there are real changes in the values in allow_input and in browse_address_input.
+ // Do not ignore changes in the case (e.g. from 'host.domain.com' to 'Host.Domain.com')
+ // because the user may like to have it exactly in cupsd.conf (even if actually case may not matter):
+ list< string > initial_allow_input_set = toset( splitstring( initial_allow_input_value, " " ) );
+ list< string > current_allow_input_set = toset( splitstring( current_allow_input_value, " " ) );
+ if( mergestring( current_allow_input_set, "" ) != mergestring( initial_allow_input_set, "" ) )
+ { sharing_has_changed = true;
+ }
+ list< string > initial_browse_address_input_set = toset( splitstring( initial_browse_address_input_value, " " ) );
+ list< string > current_browse_address_input_set = toset( splitstring( current_browse_address_input_value, " " ) );
+ if( mergestring( current_browse_address_input_set, "" ) != mergestring( initial_browse_address_input_set, "" ) )
+ { sharing_has_changed = true;
+ }
if( ! sharing_has_changed )
{ // Nothing has changed:
return true;
@@ -556,16 +538,15 @@
UI::ChangeWidget( `add_interface, `Enabled, false );
UI::ChangeWidget( `edit_interface, `Enabled, false );
UI::ChangeWidget( `delete_interface, `Enabled, false );
- UI::ChangeWidget( `ip_table_label, `Enabled, false );
- UI::ChangeWidget( `ip_table, `Enabled, false );
- UI::ChangeWidget( `add_ip, `Enabled, false );
- UI::ChangeWidget( `edit_ip, `Enabled, false );
- UI::ChangeWidget( `delete_ip, `Enabled, false );
+ UI::ChangeWidget( `specific_addresses_frame, `Enabled, false );
+ UI::ChangeWidget( `allow_input, `Enabled, false );
+ UI::ChangeWidget( `allow_input_label, `Enabled, false );
+ UI::ChangeWidget( `browse_address_input, `Enabled, false );
+ UI::ChangeWidget( `browse_address_input_label, `Enabled, false );
}
// Regardless whether or not the "Share Printers" dialog is useless,
// fill in the values of the current settings in the system:
interface_table_items = [];
- ip_table_items = [];
// Determine the 'Listen' values in /etc/cups/cupsd.conf:
// By default there is 'Listen localhost:631' and 'Listen /var/run/cups/cups.sock'.
// 'Listen localhost' is mandatory (i.e. it is a broken config when it is missing).
@@ -648,20 +629,29 @@
initial_publish_to_local_network = false;
UI::ChangeWidget( `publish_to_local_network_check_box, `Value, false );
initial_interface_table_items = [];
+ initial_allow_input_value = "";
+ initial_browse_address_input_value = "";
// Split the allow_values list together with the browse_address_values list
// into the different values for the different widgets in the dialog.
// By default no remote access is allowed (see the defaults in widgetSharing)
// but if there is at least one none-empty allow_value, remote access should be allowed
// except when there is no remote Listen entry:
+ boolean none_empty_allow_values = false;
+ boolean allow_none = false;
foreach( string allow_value,
allow_values,
- { if( "" != allow_value && listen_remote )
- { UI::ChangeWidget( `deny_remote_access_radio_button, `Value, false );
- initial_deny_remote_access = false;
- UI::ChangeWidget( `allow_remote_access_radio_button, `Value, true );
- initial_allow_remote_access = true;
+ { if( "" == filterchars( allow_value, Printer::alnum_chars ) )
+ { // Ignore an effectively empty allow_value:
+ continue;
+ }
+ none_empty_allow_values = true;
+ if( "none" == tolower( allow_value ) )
+ { allow_none = true;
}
- if( "@LOCAL" == allow_value )
+ // To be safe against any unexpected locale mess, I use tolower for both strings so that
+ // equal strings result true regardless of what tolower/toupper results in which locale
+ // instead of an asymmetric comparison like "@LOCAL" == toupper(allow_value):
+ if( tolower( "@LOCAL" ) == tolower( allow_value ) )
{ UI::ChangeWidget( `allow_local_network_access_check_box, `Value, true );
initial_allow_local_network_access = true;
// Check if this value appears also in the browse_address_values:
@@ -669,8 +659,9 @@
{ UI::ChangeWidget( `publish_to_local_network_check_box, `Value, true );
initial_publish_to_local_network = true;
}
+ continue;
}
- if( issubstring( allow_value, "@IF" ) )
+ if( issubstring( tolower( allow_value ), tolower( "@IF" ) ) )
{ // The allow_value has the form '@IF(interface-name)' e.g. '@IF(eth1)'.
// Check if this value appears also in the browse_address_values:
string publish_via_this_interface = "no";
@@ -688,7 +679,46 @@
)
);
}
+ continue;
}
+ // When the allow_value is neither "@LOCAL" nor "@IF(...)"
+ // it is for the allow_input TextEntry (intentionally also if it is "none").
+ // Have a trailing space character so that the user can easily add something:
+ initial_allow_input_value = initial_allow_input_value + allow_value + " ";
+ }
+ );
+ // By default initial_deny_remote_access is true
+ // and initial_allow_remote_access is false (see above)
+ // and this is correct (i.e. it must not be changed)
+ // when the cupsd does not listen on a remote interface
+ // or when the allow_values are effectively empty
+ // or when one of the the allow_values is "none":
+ if( listen_remote && none_empty_allow_values && ! allow_none )
+ { UI::ChangeWidget( `deny_remote_access_radio_button, `Value, false );
+ initial_deny_remote_access = false;
+ UI::ChangeWidget( `allow_remote_access_radio_button, `Value, true );
+ initial_allow_remote_access = true;
+ }
+ foreach( string browse_address_value,
+ browse_address_values,
+ { if( "" == filterchars( browse_address_value, Printer::alnum_chars ) )
+ { // Ignore an effectively empty browse_address_value:
+ continue;
+ }
+ if( tolower( "@LOCAL" ) == tolower( browse_address_value ) )
+ { // Skip when the browse_address_value is "@LOCAL"
+ // because this case is handled in the foreach for allow_values above:
+ continue;
+ }
+ if( issubstring( tolower( browse_address_value ), tolower( "@IF" ) ) )
+ { // Skip when the browse_address_value has the form '@IF(interface-name)'
+ // because this case is handled in the foreach for allow_values above:
+ continue;
+ }
+ // When the browse_address_value is neither "@LOCAL" nor "@IF(...)"
+ // it is for the browse_address_input TextEntry.
+ // Have a trailing space character so that the user can easily add something:
+ initial_browse_address_input_value = initial_browse_address_input_value + browse_address_value + " ";
}
);
y2milestone( "Initial interface_table_items: %1", interface_table_items );
@@ -696,9 +726,12 @@
initial_interface_table_items = interface_table_items;
UI::ChangeWidget( `interface_table, `CurrentItem, -1 );
// Determine the currently available IPv4 (-family inet) network interfaces in the system.
- // Omit loopback interfaces.
+ // Omit all non-eth* interfaces because loopback interfaces do not make sense here
+ // and ppp* interfaces are usually used for DSL and analog modems to access the
+ // untrusted Internet from which no remote access should be allowed by accident
+ // (the user can enter any interface manually if he knows what he does):
available_interfaces = [];
- if( Printerlib::ExecuteBashCommand( "ip -family inet -oneline link show | grep -v -i loopback | cut -s -d ':' -f 2 | tr -s '[:space:]' ' '" ) )
+ if( Printerlib::ExecuteBashCommand( "ip -family inet -oneline link show | grep 'eth[0-9]' | cut -s -d ':' -f 2 | tr -s '[:space:]' ' '" ) )
{ // The command outputs a line where multiple network interfaces are separated by space.
// Remove empty or effectively empty entries (otherwise it would be something like ["", "eth0", "eth1"]):
available_interfaces = filter( string interface_name,
@@ -712,14 +745,10 @@
available_interfaces = [];
}
y2milestone( "available_interfaces: %1", available_interfaces );
-
- // Have the IP table disabled until its functionality is implemented:
- UI::ChangeWidget( `ip_table_label, `Enabled, false );
- UI::ChangeWidget( `ip_table, `Enabled, false );
- UI::ChangeWidget( `add_ip, `Enabled, false );
- UI::ChangeWidget( `edit_ip, `Enabled, false );
- UI::ChangeWidget( `delete_ip, `Enabled, false );
-
+ y2milestone( "Initial initial_allow_input_value: %1", initial_allow_input_value );
+ UI::ChangeWidget( `id(`allow_input), `Value, initial_allow_input_value );
+ y2milestone( "Initial initial_browse_address_input_value: %1", initial_browse_address_input_value );
+ UI::ChangeWidget( `id(`browse_address_input), `Value, initial_browse_address_input_value );
y2milestone( "leaving initSharing" );
}
@@ -852,47 +881,6 @@
{ y2error("Unproper index for current interface table item: %1", current_item);
}
break;
- case `add_ip :
- ret = showIPPopup("", false);
- if (ret!=nil){
- list items = (list)UI::QueryWidget(`ip_table, `Items);
- items=add(items, `item(`id(size(items)), ret["device"]:"", ret["publish"]:""));
- UI::ChangeWidget(`ip_table, `Items, items);
- UI::ChangeWidget(`ip_table, `CurrentItem, current_item);
- }
- break;
-
- case `edit_ip :
- current_item = (integer)UI::QueryWidget(`ip_table, `CurrentItem);
- term this2 = (term)UI::QueryWidget(`ip_table, `Item(current_item));
- ret = showIPPopup((string)this2[1]:"", (this2[2]:"no"=="yes"));
- if (ret!=nil){
- list items = [];
- foreach(term oneItem, (list<term>)UI::QueryWidget(`ip_table, `Items), {
- if (current_item != oneItem[0, 0]:-1){
- items = add(items, `item(`id(size(items)), oneItem[1]:"", oneItem[2]:""));
- } else {
- y2milestone("Changing item %1", oneItem);
- items = add(items, `item(`id(size(items)), ret["device"]:"", ret["publish"]:""));
- }
- });
- UI::ChangeWidget(`ip_table, `Items, items);
- UI::ChangeWidget(`ip_table, `CurrentItem, current_item);
- }
- break;
- case `delete_ip :
- current_item = (integer)UI::QueryWidget(`ip_table, `CurrentItem);
- if (current_item!=nil && current_item>-1){
- list items = [];
- foreach(term oneItem, (list<term>)UI::QueryWidget(`ip_table, `Items), {
- if (current_item != oneItem[0, 0]:-1){
- items = add(items, `item(`id(size(items)), oneItem[1]:"", oneItem[2]:""));
- } else y2milestone("Deleting item %1", oneItem);
-
- });
- UI::ChangeWidget(`ip_table, `Items, items);
- } else y2error("Unproper index for current item: %1", current_item);
- break;
}
}
if( ! share_printers_dialog_is_useless )
@@ -915,30 +903,18 @@
UI::ChangeWidget(`add_interface, `Enabled, remote_access);
UI::ChangeWidget(`edit_interface, `Enabled, remote_access);
UI::ChangeWidget(`delete_interface, `Enabled, remote_access);
- UI::ChangeWidget(`ip_table_label, `Enabled, remote_access);
- UI::ChangeWidget(`ip_table, `Enabled, remote_access);
- UI::ChangeWidget(`add_ip, `Enabled, remote_access);
- UI::ChangeWidget(`edit_ip, `Enabled, remote_access);
- UI::ChangeWidget(`delete_ip, `Enabled, remote_access);
+ UI::ChangeWidget(`specific_addresses_frame, `Enabled, remote_access);
+ UI::ChangeWidget(`allow_input, `Enabled, remote_access);
+ UI::ChangeWidget(`allow_input_label, `Enabled, remote_access);
+ UI::ChangeWidget(`browse_address_input, `Enabled, remote_access);
+ UI::ChangeWidget(`browse_address_input_label, `Enabled, remote_access);
if( remote_access )
{ boolean interface_modify_buttons = true;
if( 0 == size((list)UI::QueryWidget(`interface_table, `Items)) ) interface_modify_buttons = false;
UI::ChangeWidget(`edit_interface, `Enabled, interface_modify_buttons);
UI::ChangeWidget(`delete_interface, `Enabled, interface_modify_buttons);
- boolean ip_modify_buttons = true;
- if( 0 == size((list)UI::QueryWidget(`ip_table, `Items)) ) ip_modify_buttons = false;
- UI::ChangeWidget(`edit_ip, `Enabled, ip_modify_buttons);
- UI::ChangeWidget(`delete_ip, `Enabled, ip_modify_buttons);
}
}
-
- // Have the IP table disabled until its functionality is implemented:
- UI::ChangeWidget( `ip_table_label, `Enabled, false );
- UI::ChangeWidget( `ip_table, `Enabled, false );
- UI::ChangeWidget( `add_ip, `Enabled, false );
- UI::ChangeWidget( `edit_ip, `Enabled, false );
- UI::ChangeWidget( `delete_ip, `Enabled, false );
-
return nil;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/tools/create_printer_ppd_database new/yast2-printer-2.17.18/tools/create_printer_ppd_database
--- old/yast2-printer-2.17.17/tools/create_printer_ppd_database 2008-09-25 18:03:31.000000000 +0200
+++ new/yast2-printer-2.17.18/tools/create_printer_ppd_database 2008-10-08 12:15:06.000000000 +0200
@@ -42,7 +42,11 @@
# Exit after timeout because then no empty YCP map is output
# so that either an existing YCP map could be used or YaST could also exit
# because without a PPD database printer setup makes not much sense.
-MAXIMUM_WAIT="60"
+# The very long timeout is usually only needed on slower machines
+# and there also usually only once after a new system installation
+# when the cupsd reads thousands of PPDs for the very first time
+# (see Novell/Suse Bugzilla bnc#429397):
+MAXIMUM_WAIT="300"
$LPINFO -h localhost -l -m >$TMP_DATA_RAW &
lpinfoPID=$!
for i in $( seq $MAXIMUM_WAIT )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/tools/modify_cupsd_conf new/yast2-printer-2.17.18/tools/modify_cupsd_conf
--- old/yast2-printer-2.17.17/tools/modify_cupsd_conf 2008-09-25 18:03:31.000000000 +0200
+++ new/yast2-printer-2.17.18/tools/modify_cupsd_conf 2008-10-08 11:15:39.000000000 +0200
@@ -34,8 +34,10 @@
echo "BrowseAddress [ @LOCAL | @IF(name) | host-address | broadcast-address ] | BrowseAddress none" 1>&2
echo "e.g.: BrowseAddress '@LOCAL @IF(eth1) 192.168.100.1 192.168.200.255'" 1>&2
echo " BrowseAddress none (to send no browse packets, i.e. no BrowseAddress line)" 1>&2
- echo "There is a strict syntax for keywords and values:" 1>&2
- echo "Case matters." 1>&2
+ echo "For the syntax for keywords and values see 'man cupsd.conf'" 1>&2
+ echo "and http://www.cups.org/documentation.php/ref-cupsd-conf.html" 1>&2
+ echo "In case of ambiguity use the syntax which is described above." 1>&2
+ echo "Usually case matters, in particular for special keywords like On Off @LOCAL @IF none all." 1>&2
echo "Multiple values for a keyword must be separated by space." 1>&2
exit 1
fi
@@ -45,7 +47,10 @@
exit 2
fi
-# Remove duplicates (ignore case) and remove duplicate, leading and trailing spaces:
+# Remove duplicates (ignore case) and remove duplicate, leading and trailing spaces.
+# Case is only ignored if there are duplicates (e.g. 'host.domain.com' and 'Host.Domain.com')
+# but if there is e.g. only 'Host.Domain.com' it is written exactly this way to cupsd.conf
+# because the user may like to have it exactly in cupsd.conf (even if actually case may not matter):
VALUE="$( for V in $2 ; do echo $V ; done | sort -b -f -u | tr -s '[:space:]' ' ' | sed -e 's/ *$//' )"
# Make a backup of /etc/cups/cupsd.conf if it would be changed:
@@ -67,12 +72,7 @@
# Function to deal with 'Browsing [On|Off]'
Browsing()
{ if test -n "$VALUE"
- then # If a value was specified, only 'On' or 'Off' (case sensitive) are allowed:
- if ! test "On" = "$VALUE" -o "Off" = "$VALUE"
- then echo "Only '$KEY [ On | Off ]' is supported." 1>&2
- exit 5
- fi
- # Try to substitute an existing active Browsing line (ignore case).
+ then # Try to substitute an existing active Browsing line (ignore case).
# (If there is more than one active Browsing line it is a broken config file):
sed -i -e "s/^[[:space:]]*$KEY.*/$KEY $VALUE/i" $CUPSDCONF
# There may exist no Browsing line:
@@ -108,20 +108,7 @@
# Function to deal with 'BrowseAllow [ all | @LOCAL | host-address | network-address/netmask ] | BrowseAllow none'
BrowseAllow()
{ if test -n "$VALUE"
- then # If a value was specified, only 'all' or 'none' or '@LOCAL' (case sensitive)
- # or one or more IP-addresses are allowed:
- if ! test "none" = "$VALUE"
- then for V in $VALUE
- do if ! test "all" = "$V" -o "@LOCAL" = "$V"
- then # Test if value matches to IP-address syntax:
- if ! echo "$V" | egrep -q '^([0-9]{1,3}\.){3}[0-9]{1,3}(/([0-9]{1,2})|/(([0-9]{1,3}\.){3}[0-9]{1,3}))?$'
- then echo "Only '$KEY [ all | @LOCAL | host-address | network-address/netmask ]' or '$KEY none' is supported." 1>&2
- exit 5
- fi
- fi
- done
- fi
- # Set 'BrowseOrder allow,deny' to deny browse packets by default
+ then # Set 'BrowseOrder allow,deny' to deny browse packets by default
# and then allow them from certain sources via BrowseAllow entries
# and finally deny from certain sources via BrowseDeny entries.
# All existing active BrowseOrder lines are removed (ignore case).
@@ -178,19 +165,7 @@
# Function to deal with 'Listen [ all | network-address ] | Listen localhost'
Listen()
{ if test -n "$VALUE"
- then # If a value was specified, only 'all' or 'localhost' or one or more network-addresses are allowed:
- if ! test "localhost" = "$VALUE"
- then for V in $VALUE
- do if ! test "all" = "$V"
- then # Test if value matches to IP-address syntax:
- if ! echo "$V" | egrep -q '^([0-9]{1,3}\.){3}[0-9]{1,3}$'
- then echo "Only '$KEY [ all | network-address ]' or '$KEY localhost' is supported." 1>&2
- exit 5
- fi
- fi
- done
- fi
- # Determine if it listens on the domain socket:
+ then # Determine if it listens on the domain socket:
LISTEN_DOMAIN_SOCKET_LINE_CONTENT="$( grep -i '^[[:space:]]*Listen.*/cups.sock' $CUPSDCONF | head -n 1 )"
# All existing active Port lines are deactivated (ignore case).
# Those lines are not removed because YaST does not support Port lines
@@ -256,23 +231,7 @@
# Function to deal with 'Allow [ all | @LOCAL | @IF(name) | host-address | network-address/netmask ] | Allow none'
Allow()
{ if test -n "$VALUE"
- then # If a value was specified, only 'all' or 'none' or '@LOCAL' (case sensitive)
- # or '@IF(name)' or one or more IP-addresses are allowed:
- if ! test "none" = "$VALUE"
- then for V in $VALUE
- do if ! test "all" = "$V" -o "@LOCAL" = "$V"
- then # Test if value matches to @IF(name) syntax:
- if ! echo "$V" | egrep -q '^@IF\([^)]*\)$'
- then # Test if value matches to IP-address syntax:
- if ! echo "$V" | egrep -q '^([0-9]{1,3}\.){3}[0-9]{1,3}(/([0-9]{1,2})|/(([0-9]{1,3}\.){3}[0-9]{1,3}))?$'
- then echo "Only '$KEY [ all | @LOCAL | @IF(name) | host-address | network-address/netmask ]' or '$KEY none' is supported." 1>&2
- exit 5
- fi
- fi
- fi
- done
- fi
- # Determine where the (first) root location starts (ignore case and ignore spaces):
+ then # Determine where the (first) root location starts (ignore case and ignore spaces):
ROOT_LOCATION_LINE_NUMBER="$( sed -n -e '/[[:space:]]*<[[:space:]]*Location[[:space:]]*\/[[:space:]]*>/I=' $CUPSDCONF | head -n 1 )"
# Remove all root locations (ignore case and ignore spaces).
# (If there is more than one root location it is a broken config file).
@@ -324,23 +283,7 @@
# Function to deal with 'BrowseAddress [ @LOCAL | @IF(name) | host-address | broadcast-address ] | BrowseAddress none'
BrowseAddress()
{ if test -n "$VALUE"
- then # If a value was specified, only 'none' (case sensitive)
- # or '@IF(name)' or one or more IP-addresses are allowed:
- if ! test "none" = "$VALUE"
- then for V in $VALUE
- do if ! test "@LOCAL" = "$V"
- then # Test if value matches to @IF(name) syntax:
- if ! echo "$V" | egrep -q '^@IF\([^)]*\)$'
- then # Test if value matches to IP-address syntax:
- if ! echo "$V" | egrep -q '^([0-9]{1,3}\.){3}[0-9]{1,3}$'
- then echo "Only '$KEY [ @LOCAL | @IF(name) | host-address | broadcast-address ]' or '$KEY none' is supported." 1>&2
- exit 5
- fi
- fi
- fi
- done
- fi
- # All existing active BrowseAddress lines are removed (ignore case).
+ then # All existing active BrowseAddress lines are removed (ignore case).
# Those lines can be removed because YaST supports BrowseAddress lines
# (YaST shows BrowseAddress entries in the "share printers" dialog):
sed -i -e '/^[[:space:]]*BrowseAddress.*/Id' $CUPSDCONF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.17/VERSION new/yast2-printer-2.17.18/VERSION
--- old/yast2-printer-2.17.17/VERSION 2008-09-26 12:33:51.000000000 +0200
+++ new/yast2-printer-2.17.18/VERSION 2008-10-08 12:10:36.000000000 +0200
@@ -1 +1 @@
-2.17.17
+2.17.18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org