Hello community,
here is the log from the commit of package yast2-printer
checked in at Wed Nov 5 18:22:44 CET 2008.
--------
--- yast2-printer/yast2-printer.changes 2008-11-04 13:52:57.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-printer/yast2-printer.changes 2008-11-05 14:01:28.415596000 +0100
@@ -1,0 +2,17 @@
+Wed Nov 5 11:30:40 CET 2008 - jsmeix@suse.de
+
+- Fixed bugs in the Share Printers dialog:
+ Apply settings when the user only changed
+ "deny remote access" to "allow remote access"
+ if there is at least one real allow value.
+ Having only "Listen *:631" in cupsd.conf is sufficient
+ that the initSharing function sets listen_local to true.
+ The modify_cupsd_conf tool works with 'Allow 127.0.0.2'
+ and it logs its changes as comments in cupsd.conf.
+ (See Novell/Suse Bugzilla bnc#441370)
+- Fixed dialog layout of the Share Printers dialog
+ and of the Printing via Network dialog
+ that both dialogs work also o.k. in ncurses mode.
+- 2.17.32
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-printer-2.17.31.tar.bz2
New:
----
yast2-printer-2.17.32.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.o13525/_old 2008-11-05 18:22:37.000000000 +0100
+++ /var/tmp/diff_new_pack.o13525/_new 2008-11-05 18:22:37.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.17.31)
+# spec file for package yast2-printer (Version 2.17.32)
#
# 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.31
+Version: 2.17.32
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.17.31.tar.bz2
+Source0: yast2-printer-2.17.32.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.31
+%setup -n yast2-printer-2.17.32
%build
%{prefix}/bin/y2tool y2autoconf
@@ -118,6 +118,20 @@
%exclude %{prefix}/share/doc/packages/yast2-printer/COPYING
%exclude %{prefix}/share/doc/packages/yast2-printer/README
%changelog
+* Wed Nov 05 2008 jsmeix@suse.de
+- Fixed bugs in the Share Printers dialog:
+ Apply settings when the user only changed
+ "deny remote access" to "allow remote access"
+ if there is at least one real allow value.
+ Having only "Listen *:631" in cupsd.conf is sufficient
+ that the initSharing function sets listen_local to true.
+ The modify_cupsd_conf tool works with 'Allow 127.0.0.2'
+ and it logs its changes as comments in cupsd.conf.
+ (See Novell/Suse Bugzilla bnc#441370)
+- Fixed dialog layout of the Share Printers dialog
+ and of the Printing via Network dialog
+ that both dialogs work also o.k. in ncurses mode.
+- 2.17.32
* Tue Nov 04 2008 jsmeix@suse.de
- Dialog layout fixes for the Share Printers dialog
(see Novell/Suse Bugzilla bnc#438225).
@@ -305,7 +319,7 @@
* Thu May 22 2008 mzugec@suse.cz
- install and use hplip instead of hpijs-standalone (bnc#388149)
- 2.16.31
-* Wed May 21 2008 mzugec@suse.cz
+* Tue May 20 2008 mzugec@suse.cz
- improved add/edit usb queues
- 2.16.30
* Tue May 20 2008 mzugec@suse.cz
@@ -325,10 +339,10 @@
* Wed May 14 2008 mzugec@suse.cz
- fixed broken workflow in "Change Connection" (bnc#388575)
- 2.16.26
-* Sun May 11 2008 mzugec@suse.de
+* Sat May 10 2008 mzugec@suse.de
- too small text boxes at "Global Settings" (bnc#387234)
- 2.16.25
-* Sun May 11 2008 mzugec@suse.de
+* Sat May 10 2008 mzugec@suse.de
- disable "Test Printer Connection" when no connection (bnc#386592)
- 2.16.24
* Wed May 07 2008 mzugec@suse.de
@@ -1011,7 +1025,7 @@
* Fri Sep 19 2003 nashif@suse.de
- fixed testsuite again
- 2.8.22
-* Fri Sep 19 2003 nashif@suse.de
+* Thu Sep 18 2003 nashif@suse.de
- fixed testsuite
- 2.8.21
* Thu Sep 18 2003 jsrain@suse.de
@@ -2029,7 +2043,7 @@
- Bugfixes in dependent options and comparison of IEEE1284 strings.
* Mon Jun 19 2000 kendy@suse.cz
- Use of the comments in the database.
-* Fri Jun 09 2000 kendy@suse.cz
+* Thu Jun 08 2000 kendy@suse.cz
- Samba & Novell printers
* Thu Jun 08 2000 kendy@suse.cz
- The structure of the database changed.
++++++ yast2-printer-2.17.31.tar.bz2 -> yast2-printer-2.17.32.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.31/configure new/yast2-printer-2.17.32/configure
--- old/yast2-printer-2.17.31/configure 2008-11-04 13:37:10.000000000 +0100
+++ new/yast2-printer-2.17.32/configure 2008-11-05 13:56:13.000000000 +0100
@@ -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.31.
+# Generated by GNU Autoconf 2.61 for yast2-printer 2.17.32.
#
# 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.31'
-PACKAGE_STRING='yast2-printer 2.17.31'
+PACKAGE_VERSION='2.17.32'
+PACKAGE_STRING='yast2-printer 2.17.32'
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.31 to adapt to many kinds of systems.
+\`configure' configures yast2-printer 2.17.32 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.31:";;
+ short | recursive ) echo "Configuration of yast2-printer 2.17.32:";;
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.31
+yast2-printer configure 2.17.32
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.31, which was
+It was created by yast2-printer $as_me 2.17.32, 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.31'
+ VERSION='2.17.32'
cat >>confdefs.h <<_ACEOF
@@ -2409,7 +2409,7 @@
-VERSION="2.17.31"
+VERSION="2.17.32"
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.31, which was
+This file was extended by yast2-printer $as_me 2.17.32, 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.31
+yast2-printer config.status 2.17.32
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.31/configure.in new/yast2-printer-2.17.32/configure.in
--- old/yast2-printer-2.17.31/configure.in 2008-11-04 13:37:06.000000000 +0100
+++ new/yast2-printer-2.17.32/configure.in 2008-11-05 13:56:08.000000000 +0100
@@ -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.31, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.17.32, 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.31"
+VERSION="2.17.32"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.31/src/overview.ycp new/yast2-printer-2.17.32/src/overview.ycp
--- old/yast2-printer-2.17.31/src/overview.ycp 2008-10-31 15:00:15.000000000 +0100
+++ new/yast2-printer-2.17.32/src/overview.ycp 2008-11-05 09:26:41.000000000 +0100
@@ -200,13 +200,13 @@
// on the official IPP port, a single error popup when the Overview dialog
// is launched is sufficient.
// The YaST printer modue does not support when the cupsd listens
- // on a non-official port e.g. via "Listen *:9999" and/or "Port 9999"
- // and/or "BrowsePort 9999" settings in /etc/cups/cupsd.conf.
+ // on a non-official port e.g. via "Listen *:1234" and/or "Port 1234"
+ // and/or "BrowsePort 1234" settings in /etc/cups/cupsd.conf.
// Skip this test (and hope for the best) when netcat is not available
- // because in yast2-printer.spec there can be only "Recommends: netcat"
- // because there have been narrow-minded user complaints who insist
- // not to have netcat installed because "netcat is a hacker intrusion tool"
- // (explanations of the difference between netcat and e.g. nmap did not help).
+ // because in yast2-printer.spec there can be only "Recommends: netcat".
+ // There have been user complaints who insist not to have netcat installed
+ // because they insist that "netcat is a hacker intrusion tool" and thorough
+ // explanations of the difference between netcat and e.g. nmap did not help.
if( Printerlib::ExecuteBashCommand( "ps -C cupsd" )
&& Printerlib::ExecuteBashCommand( "type -P netcat" )
)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.31/src/printingvianetwork.ycp new/yast2-printer-2.17.32/src/printingvianetwork.ycp
--- old/yast2-printer-2.17.31/src/printingvianetwork.ycp 2008-11-04 13:36:29.000000000 +0100
+++ new/yast2-printer-2.17.32/src/printingvianetwork.ycp 2008-11-05 11:03:18.000000000 +0100
@@ -84,7 +84,7 @@
)
),
`HBox
- ( `HSpacing( 3 ),
+ ( `HSpacing( 4 ),
`VBox
( `Left
( `Label
@@ -114,16 +114,7 @@
// 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)")
+ _("Optional Specific IP Addresses or &Network/Netmask (separated by space)")
)
),
`Left
@@ -158,7 +149,6 @@
)
)
),
- `VSpacing( 1 ),
`Left
( `RadioButton
( `id(`client_only_radio_button),
@@ -169,7 +159,7 @@
)
),
`HBox
- ( `HSpacing( 3 ),
+ ( `HSpacing( 4 ),
`HWeight
( 2,
`TextEntry
@@ -796,7 +786,6 @@
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 );
UI::ChangeWidget( `id(`client_only_radio_button), `Value, false );
UI::ChangeWidget( `id(`client_conf_server_name_input), `Enabled, false );
initial_server_name_input_value = Printerlib::client_conf_server_name;
@@ -829,7 +818,6 @@
// it is useless to additionally accept it from specific IPs or networks:
if( ! contains( Printerlib::cupsd_conf_browse_allow, "all" ) )
{ UI::ChangeWidget( `id(`browse_allow_input), `Enabled, true );
- UI::ChangeWidget( `id(`browse_allow_input_label), `Enabled, true );
}
}
else
@@ -941,7 +929,6 @@
{ UI::ChangeWidget( `id(`browse_allow_label), `Enabled, false );
UI::ChangeWidget( `id(`browse_allow_combo_box), `Enabled, false );
UI::ChangeWidget( `id(`browse_allow_input), `Enabled, false );
- UI::ChangeWidget( `id(`browse_allow_input_label), `Enabled, false );
UI::ChangeWidget( `id(`client_conf_server_name_input), `Enabled, false );
UI::ChangeWidget( `id(`test_client_conf_server), `Enabled, false );
UI::ChangeWidget( `id(`connection_wizard), `Enabled, true );
@@ -950,7 +937,6 @@
{ UI::ChangeWidget( `id(`browse_allow_label), `Enabled, true );
UI::ChangeWidget( `id(`browse_allow_combo_box), `Enabled, true );
UI::ChangeWidget( `id(`browse_allow_input), `Enabled, true );
- UI::ChangeWidget( `id(`browse_allow_input_label), `Enabled, true );
UI::ChangeWidget( `id(`client_conf_server_name_input), `Enabled, false );
UI::ChangeWidget( `id(`test_client_conf_server), `Enabled, false );
UI::ChangeWidget( `id(`connection_wizard), `Enabled, true );
@@ -960,18 +946,15 @@
{ // If browsing info is accepted from all hosts,
// it is useless to additionally accept it from specific IPs or networks:
UI::ChangeWidget( `id(`browse_allow_input), `Enabled, false );
- UI::ChangeWidget( `id(`browse_allow_input_label), `Enabled, false );
}
else
{ UI::ChangeWidget( `id(`browse_allow_input), `Enabled, true );
- UI::ChangeWidget( `id(`browse_allow_input_label), `Enabled, true );
}
}
if( `client_only_radio_button == event["ID"]:nil )
{ UI::ChangeWidget( `id(`browse_allow_label), `Enabled, false );
UI::ChangeWidget( `id(`browse_allow_combo_box), `Enabled, false );
UI::ChangeWidget( `id(`browse_allow_input), `Enabled, false );
- UI::ChangeWidget( `id(`browse_allow_input_label), `Enabled, false );
UI::ChangeWidget( `id(`client_conf_server_name_input), `Enabled, true );
UI::ChangeWidget( `id(`test_client_conf_server), `Enabled, true );
UI::ChangeWidget( `id(`connection_wizard), `Enabled, false );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.31/src/sharing.ycp new/yast2-printer-2.17.32/src/sharing.ycp
--- old/yast2-printer-2.17.31/src/sharing.ycp 2008-11-04 13:37:00.000000000 +0100
+++ new/yast2-printer-2.17.32/src/sharing.ycp 2008-11-05 11:30:30.000000000 +0100
@@ -24,7 +24,7 @@
* Summary: Print queue sharing and publishing dialog definition
* Authors: Johannes Meixner
*
- * $Id: dialogs.ycp 27914 2006-02-13 14:32:08Z locilka $
+ * $Id: sharing.ycp 27914 2006-02-13 14:32:08Z locilka $
*/
{
@@ -77,7 +77,7 @@
)
),
`HBox
- ( `HSpacing( 3 ),
+ ( `HSpacing( 4 ),
`VBox
( `Left
( `CheckBox
@@ -106,24 +106,29 @@
( `id(`interface_table_label),
// A caption for a table to allow remote access to local print queues
// via network interfaces specified in the table below:
- _("Via network interfaces specified below")
+ _("Optionally via network interfaces specified below")
)
),
- `Table
- ( `id(`interface_table),
- `opt(`keepSorting),
- `header
- ( // A table column header where the column lists network interfaces:
- _("Interface"),
- // A table column header where the column shows whether or not
- // local print queues are published by default
- // via the network interface in the other table column:
- _("Publish printers by default via this interface")
+ `HBox
+ ( `VSquash
+ ( `MinHeight
+ ( 5,
+ `Table
+ ( `id(`interface_table),
+ `opt(`keepSorting),
+ `header
+ ( // A table column header where the column lists network interfaces:
+ _("Interface"),
+ // A table column header where the column shows whether or not
+ // local print queues are published by default
+ // via the network interface in the other table column:
+ _("Publish printers by default via this interface")
+ ),
+ initial_interface_table_items
+ )
+ )
),
- initial_interface_table_items
- ),
- `Left
- ( `HBox
+ `VBox
( `PushButton
( `id(`add_interface),
// A PushButton label to add a network interface to the table which shows
@@ -389,6 +394,16 @@
}
// Any kind of allow_remote_access:
// Check if there are real changes:
+ if( allow_remote_access && initial_deny_remote_access )
+ { // When it is initially "deny remote access"
+ // and the user changed it to "allow remote access"
+ // but nothing else changed, then sharing_has_changed is true
+ // if there is at least one real allow value set.
+ // The last condition is true here because when allow_values is empty,
+ // it is a deny_remote_access case, see above.
+ sharing_has_changed = true;
+ }
+ // Check if there are real changes regarding the "@LOCAL" settings:
if( allow_local_network_access != initial_allow_local_network_access
|| publish_to_local_network != initial_publish_to_local_network
)
@@ -433,6 +448,8 @@
if( mergestring( current_browse_address_input_set, "" ) != mergestring( initial_browse_address_input_set, "" ) )
{ sharing_has_changed = true;
}
+ // Exit if no real change was detected above to avoid useless changes of cupsd.conf
+ // and subsequent useless restarts of the cupsd:
if( ! sharing_has_changed )
{ // Nothing has changed:
return true;
@@ -604,7 +621,12 @@
foreach( string listen_value,
listen_values,
{ if( "" != listen_value )
- { if( "localhost" == listen_value )
+ { if( "all" == listen_value )
+ { listen_local = true;
+ listen_remote = true;
+ break;
+ }
+ if( "localhost" == listen_value )
{ listen_local = true;
}
else
@@ -614,7 +636,12 @@
}
);
if( ! listen_local )
- { // 'Listen localhost' is mandatory (i.e. it is a broken config when it is missing).
+ { // A local running cupsd must mandatoty listen on the localhost interface
+ // (e.g. listen only on /var/run/cups/cups.sock is a broken config)
+ // but this does not mean that there must be a line "Listen localhost:631"
+ // in cupsd.conf because listening on all interfaces via "Listen *:631"
+ // lets it also listen on the localhost interface
+ // (see above how listen_local is set to true).
// Try to do a simple fix for the broken config but ignore possible failures.
// Set only 'Listen localhost:631' in /etc/cups/cupsd.conf which means
// that all possibly existing non-'localhost' Listen entries are removed.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.31/tools/modify_cupsd_conf new/yast2-printer-2.17.32/tools/modify_cupsd_conf
--- old/yast2-printer-2.17.31/tools/modify_cupsd_conf 2008-10-31 15:00:15.000000000 +0100
+++ new/yast2-printer-2.17.32/tools/modify_cupsd_conf 2008-11-05 13:56:04.000000000 +0100
@@ -73,6 +73,8 @@
exit 3
fi
fi
+ # Log the current change:
+ echo "# $(date '+%F,%T') $MY_NAME $KEY $VALUE" >>$CUPSDCONF
fi
# Function to deal with 'Browsing [ On | Off ]'
@@ -83,10 +85,10 @@
sed -i -e "s/^[[:space:]]*$KEY.*/$KEY $VALUE/i" $CUPSDCONF
# There may exist no Browsing line:
if ! grep -q "^$KEY $VALUE$" $CUPSDCONF
- then # Append a Browsing line below the last 'Brows' line (ignore case)
+ then # Append a Browsing line below the last active 'Brows' line (ignore case)
# to have the new Browsing line at the matching place
# but if no 'Brows' line exists, append at the end of the file:
- LAST_BROWSE_LINE_NUMBER="$( sed -n -e '/Brows/I=' $CUPSDCONF | tail -n 1 )"
+ LAST_BROWSE_LINE_NUMBER="$( sed -n -e '/^[^#]*Brows/I=' $CUPSDCONF | tail -n 1 )"
if test -n "$LAST_BROWSE_LINE_NUMBER"
then sed -i -e "${LAST_BROWSE_LINE_NUMBER}a$KEY $VALUE" $CUPSDCONF
else echo -en "\n$KEY $VALUE\n\n" >>$CUPSDCONF
@@ -119,10 +121,10 @@
# and finally deny from certain sources via BrowseDeny entries.
# All existing active BrowseOrder lines are removed (ignore case).
sed -i -e '/^[[:space:]]*BrowseOrder.*/Id' $CUPSDCONF
- # Append the new BrowseOrder line below the last 'Brows' line (ignore case)
+ # Append the new BrowseOrder line below the last active 'Brows' line (ignore case)
# to have the new BrowseOrder line at the matching place
# but if no 'Brows' line exists, append at the end of the file:
- LAST_BROWSE_LINE_NUMBER="$( sed -n -e '/Brows/I=' $CUPSDCONF | tail -n 1 )"
+ LAST_BROWSE_LINE_NUMBER="$( sed -n -e '/^[^#]*Brows/I=' $CUPSDCONF | tail -n 1 )"
if test -n "$LAST_BROWSE_LINE_NUMBER"
then sed -i -e "${LAST_BROWSE_LINE_NUMBER}aBrowseOrder allow,deny" $CUPSDCONF
else echo -en "\nBrowseOrder allow,deny\n\n" >>$CUPSDCONF
@@ -143,7 +145,7 @@
# and in the ordering of the values (needed for the test below):
if ! test "none" = "$VALUE"
then for V in $VALUE
- do sed -i -e "/^BrowseOrder /i$KEY $V" $CUPSDCONF
+ do test -n "$V" && sed -i -e "/^BrowseOrder /i$KEY $V" $CUPSDCONF
done
else # The 'BrowseOrder allow,deny' line denies browse packets by default
# to be 100% on the safe side have explicite 'BrowseAllow none' and 'BrowseDeny all' lines too:
@@ -177,19 +179,18 @@
# Those lines are not removed because YaST does not support Port lines
# so that a remove would silently delete Port information:
sed -i -e 's/^[[:space:]]*\(Port.*\)$/#\1/i' $CUPSDCONF
- # Determine the first 'Listen' line (ignore case):
- FIRST_LISTEN_LINE_NUMBER="$( sed -n -e '/Listen/I=' $CUPSDCONF | head -n 1 )"
+ # Determine the first active 'Listen' line (ignore case):
+ FIRST_LISTEN_LINE_NUMBER="$( sed -n -e '/^[[:space:]]*Listen/I=' $CUPSDCONF | head -n 1 )"
# All existing active Listen lines are removed (ignore case).
# Those lines can be removed because YaST supports Listen lines
# (YaST shows the Listen entries in the "share printers" dialog):
sed -i -e '/^[[:space:]]*Listen.*/Id' $CUPSDCONF
- # Append the mandatory 'Listen localhost' line (see http://www.cups.org/str.php?L2834
+ # Insert the mandatory 'Listen localhost' line (see http://www.cups.org/str.php?L2834
# "What is *not* supported is a configuration where only a domain socket is enabled")
- # below the first 'Listen' line (ignore case)
- # to have the new Listen line at the matching place
+ # to have the new Listen line where the first active Listen line was
# but if no 'Listen' line exists, append at the end of the file:
if test -n "$FIRST_LISTEN_LINE_NUMBER"
- then sed -i -e "${FIRST_LISTEN_LINE_NUMBER}aListen localhost:631" $CUPSDCONF
+ then sed -i -e "${FIRST_LISTEN_LINE_NUMBER}iListen localhost:631" $CUPSDCONF
else echo -en "\nListen localhost:631\n\n" >>$CUPSDCONF
fi
# Append a Listen line for the domain socket (if such a line was there):
@@ -204,7 +205,7 @@
then V="*"
fi
if ! test "localhost" = "$V"
- then sed -i -e "/^Listen localhost/i$KEY $V:631" $CUPSDCONF
+ then test -n "$V" && sed -i -e "/^Listen localhost/i$KEY $V:631" $CUPSDCONF
fi
done
fi
@@ -215,7 +216,9 @@
# Remove trailing spaces (needed for the test below).
# Remove '/var/run/cups/cups.sock' because it is only
# an optional default (i.e. not really of interest).
- RESULT="$( grep -i "^[[:space:]]*$KEY[[:space:]]" $CUPSDCONF | sed -e 's/[^ ]*\/cups\.sock//' -e 's/:631//' -e 's/\*/all/' | tr -s '[:blank:]' ' ' | sed -e 's/^ *//' | cut -s -d ' ' -f2 | tr -s '\n' ' ' | sed -e 's/ *$//' )"
+ # Unify a localhost (ignore case) or 127.0.0.1 value to "localhost".
+ # Replace the actual value '*' by the more meaningful word "all".
+ RESULT="$( grep -i "^[[:space:]]*$KEY[[:space:]]" $CUPSDCONF | sed -e 's/localhost/localhost/i' -e 's/127\.0*0\.0*0\.0*1/localhost/' -e 's/[^ ]*\/cups\.sock//' -e 's/:631//' -e 's/\*/all/' | tr -s '[:blank:]' ' ' | sed -e 's/^ *//' | cut -s -d ' ' -f2 | tr -s '\n' ' ' | sed -e 's/ *$//' )"
echo -n "$RESULT"
# For a nicer output on a terminal where stdout and stderr is mixed up,
# output a '\n' on stderr to get subsequent stuff (e.g. the shell prompt
@@ -237,7 +240,10 @@
# Function to deal with 'Allow [ all | @LOCAL | @IF(name) | host-address | network-address/netmask ] | Allow none'
Allow()
{ if test -n "$VALUE"
- then # Determine where the (first) root location starts (ignore case and ignore spaces):
+ then # Remove '127.0.0.2' from the value because it is set by default in any case
+ # and it is therefore also removed from the output of the resulting setting.
+ VALUE="$( echo $VALUE | sed -e 's/127\.00*\.00*\.0*2//g' | tr -s '[:space:]' ' ' | sed -e 's/^ *//' -e 's/ *$//' )"
+ # 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).
@@ -261,7 +267,7 @@
# in the original ordering of the values (needed for the test below):
if ! test "none" = "$VALUE"
then for V in $( echo "$VALUE" | tac -s ' ' )
- do sed -i -e "${ROOT_LOCATION_LINE_NUMBER}a$KEY $V" $CUPSDCONF
+ do test -n "$V" && sed -i -e "${ROOT_LOCATION_LINE_NUMBER}a$KEY $V" $CUPSDCONF
done
else # The 'Order allow,deny' line denies packets by default
# to be 100% on the safe side have explicite 'Allow none' and 'Deny all' lines too:
@@ -294,16 +300,16 @@
# (YaST shows BrowseAddress entries in the "share printers" dialog):
sed -i -e '/^[[:space:]]*BrowseAddress.*/Id' $CUPSDCONF
if ! test "none" = "$VALUE"
- then # Append the new BrowseAddress lines below the last 'Brows' line (ignore case)
+ then # Append the new BrowseAddress lines below the last active 'Brows' line (ignore case)
# to have the new BrowseAddress lines at the matching place
# but if no 'Brows' line exists, append at the end of the file.
# Invert the ordering of the values to get the lines
# in the original ordering of the values (needed for the test below):
- LAST_BROWSE_LINE_NUMBER="$( sed -n -e '/Brows/I=' $CUPSDCONF | tail -n 1 )"
+ LAST_BROWSE_LINE_NUMBER="$( sed -n -e '/^[^#]*Brows/I=' $CUPSDCONF | tail -n 1 )"
for V in $( echo "$VALUE" | tac -s ' ' )
do if test -n "$LAST_BROWSE_LINE_NUMBER"
- then sed -i -e "${LAST_BROWSE_LINE_NUMBER}a$KEY $V" $CUPSDCONF
- else echo -en "\n$KEY $V\n" >>$CUPSDCONF
+ then test -n "$V" && sed -i -e "${LAST_BROWSE_LINE_NUMBER}a$KEY $V" $CUPSDCONF
+ else test -n "$V" && echo -en "\n$KEY $V\n" >>$CUPSDCONF
fi
done
fi
@@ -352,11 +358,11 @@
sed -i -e "s/^[[:space:]]*$KEY.*/$KEY $VALUE/i" $CUPSDCONF
# There may exist no DefaultPolicy line:
if ! grep -q "^$KEY $VALUE$" $CUPSDCONF
- then # Append a DefaultPolicy line below the last 'Policy' line
- # which is usually a '</Policy>' a 'ErrorPolicy' line (ignore case)
+ then # Append a DefaultPolicy line below the last active 'Policy' line
+ # which is usually a '</Policy>' or a 'ErrorPolicy' line (ignore case)
# to have the new DefaultPolicy line at the matching place
# but if no 'Policy' line exists, append at the end of the file:
- LAST_POLICY_LINE_NUMBER="$( sed -n -e '/Policy/I=' $CUPSDCONF | tail -n 1 )"
+ LAST_POLICY_LINE_NUMBER="$( sed -n -e '/^[^#]*Policy/I=' $CUPSDCONF | tail -n 1 )"
if test -n "$LAST_POLICY_LINE_NUMBER"
then sed -i -e "${LAST_POLICY_LINE_NUMBER}a$KEY $VALUE" $CUPSDCONF
else echo -en "\n$KEY $VALUE\n\n" >>$CUPSDCONF
@@ -389,11 +395,11 @@
sed -i -e "s/^[[:space:]]*$KEY.*/$KEY $VALUE/i" $CUPSDCONF
# There may exist no ErrorPolicy line:
if ! grep -q "^$KEY $VALUE$" $CUPSDCONF
- then # Append a ErrorPolicy line below the last 'Policy' line
+ then # Append a ErrorPolicy line below the last active 'Policy' line
# which is usually a '</Policy>' or a 'DefaultPolicy' line (ignore case)
# to have the new ErrorPolicy line at the matching place
# but if no 'Policy' line exists, append at the end of the file:
- LAST_POLICY_LINE_NUMBER="$( sed -n -e '/Policy/I=' $CUPSDCONF | tail -n 1 )"
+ LAST_POLICY_LINE_NUMBER="$( sed -n -e '/^[^#]*Policy/I=' $CUPSDCONF | tail -n 1 )"
if test -n "$LAST_POLICY_LINE_NUMBER"
then sed -i -e "${LAST_POLICY_LINE_NUMBER}a$KEY $VALUE" $CUPSDCONF
else echo -en "\n$KEY $VALUE\n\n" >>$CUPSDCONF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.31/VERSION new/yast2-printer-2.17.32/VERSION
--- old/yast2-printer-2.17.31/VERSION 2008-11-04 13:30:56.000000000 +0100
+++ new/yast2-printer-2.17.32/VERSION 2008-11-05 11:30:37.000000000 +0100
@@ -1 +1 @@
-2.17.31
+2.17.32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org