openSUSE Commits
Threads by month
- ----- 2025 -----
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
February 2009
- 1 participants
- 1117 discussions
Hello community,
here is the log from the commit of package installation-images for openSUSE:Factory
checked in at Fri Feb 27 16:54:18 CET 2009.
--------
--- installation-images/installation-images.changes 2009-02-27 13:58:41.000000000 +0100
+++ /mounts/work_src_done/STABLE/installation-images/installation-images.changes 2009-02-22 23:23:35.000000000 +0100
@@ -2,10 +1,0 @@
-Fri Feb 27 13:58:32 CET 2009 - ro(a)suse.de
-
-- disable virtualbox completely
-
--------------------------------------------------------------------
-Fri Feb 27 12:46:34 CET 2009 - ro(a)suse.de
-
-- disable virtualbox kmp for the moment
-
--------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ installation-images.spec ++++++
--- /var/tmp/diff_new_pack.BC2809/_old 2009-02-27 16:54:03.000000000 +0100
+++ /var/tmp/diff_new_pack.BC2809/_new 2009-02-27 16:54:03.000000000 +0100
@@ -52,8 +52,7 @@
BuildRequires: kernel-ppc64-extra powerpc-utils
%endif
%ifarch %ix86 x86_64
-BuildRequires: dhcp-client elilo firmwarekit grub libsmbios2 libunwind lilo memtest86+ pmtools syslinux yast2-vm
-#BuildRequires: virtualbox-ose-kmp-default xorg-x11-driver-virtualbox-ose
+BuildRequires: dhcp-client elilo firmwarekit grub libsmbios2 libunwind lilo memtest86+ pmtools syslinux virtualbox-ose-kmp-default xorg-x11-driver-virtualbox-ose yast2-vm
%endif
%ifarch %ix86
BuildRequires: dos2unix ftp ncpfs tftp
@@ -100,7 +99,7 @@
AutoReqProv: off
Summary: Installation Image Files
Version: 12.2
-Release: 6
+Release: 7
Source: installation-images-12.2.tar.bz2
Patch1: installation-images-12.2-s390x-tapeipl-rename.diff
Patch2: installation-images-12.2.dif
@@ -120,7 +119,7 @@
AutoReqProv: off
Summary: Create initrd for Installation
Version: 1.0
-Release: 529
+Release: 530
PreReq: /bin/ln
%description -n install-initrd
@@ -268,10 +267,6 @@
%ghost /usr/lib/install-initrd/branding
%changelog
-* Fri Feb 27 2009 ro(a)suse.de
-- disable virtualbox completely
-* Fri Feb 27 2009 ro(a)suse.de
-- disable virtualbox kmp for the moment
* Sun Feb 22 2009 ro(a)suse.de
- change libboost_signals1_36_0 to libboost_signals1_38_0
- disable xen ofed enic fnic for the moment
++++++ installation-images-12.2.dif ++++++
--- /var/tmp/diff_new_pack.BC2809/_old 2009-02-27 16:54:03.000000000 +0100
+++ /var/tmp/diff_new_pack.BC2809/_new 2009-02-27 16:54:03.000000000 +0100
@@ -1,24 +1,5 @@
---- data/root/machbunt.file_list
-+++ data/root/machbunt.file_list 2009/02/27 12:58:27
-@@ -59,11 +59,11 @@
- /usr/lib*/xorg/modules/*.uc
- endif
-
-- if arch eq 'i386' || arch eq 'x86_64'
-- xorg-x11-driver-virtualbox-ose:
-- /usr/lib*/xorg/modules/input/vboxmouse_drv.so
-- /usr/lib*/xorg/modules/drivers/vboxvideo_drv.so
-- endif
-+# if arch eq 'i386' || arch eq 'x86_64'
-+# xorg-x11-driver-virtualbox-ose:
-+# /usr/lib*/xorg/modules/input/vboxmouse_drv.so
-+# /usr/lib*/xorg/modules/drivers/vboxvideo_drv.so
-+# endif
-
- xterm:
- /usr/share/X11/app-defaults/XTerm
--- data/root/root.file_list
-+++ data/root/root.file_list 2009/02/27 12:57:37
++++ data/root/root.file_list 2009/02/22 21:33:15
@@ -938,7 +938,7 @@
/usr/share/zypp/schema
/usr/share/locale
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package virtualbox-ose for openSUSE:Factory
checked in at Fri Feb 27 16:53:27 CET 2009.
--------
--- virtualbox-ose/virtualbox-ose.changes 2009-02-27 15:05:09.000000000 +0100
+++ /mounts/work_src_done/STABLE/virtualbox-ose/virtualbox-ose.changes 2009-02-27 16:15:00.305149698 +0100
@@ -1,0 +2,5 @@
+Fri Feb 27 16:14:55 CET 2009 - dmueller(a)suse.de
+
+- merge into Factory
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ virtualbox-ose.spec ++++++
--- /var/tmp/diff_new_pack.z32599/_old 2009-02-27 16:53:16.000000000 +0100
+++ /var/tmp/diff_new_pack.z32599/_new 2009-02-27 16:53:16.000000000 +0100
@@ -59,7 +59,7 @@
#
ExclusiveArch: %ix86 x86_64
Version: 2.1.4
-Release: 2
+Release: 3
Summary: VirtualBox OSE is an Emulator
License: GPL v2 or later
Group: System/Emulators/PC
@@ -531,6 +531,8 @@
%{_datadir}/virtualbox/x11restore.pl
%changelog
+* Fri Feb 27 2009 dmueller(a)suse.de
+- merge into Factory
* Fri Feb 27 2009 suse-tux(a)gmx.de
- added Patch18 (vbox-swab_2.6.29_header.diff) which disables vbox's swab.h file
and uses the one which is shipped with the recent linux-kernel-headers package
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package yast2-users for openSUSE:Factory
checked in at Fri Feb 27 16:51:32 CET 2009.
--------
--- yast2-users/yast2-users.changes 2009-02-09 14:41:04.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-users/yast2-users.changes 2009-02-27 14:08:02.438698000 +0100
@@ -1,0 +2,12 @@
+Fri Feb 27 13:41:16 CET 2009 - jsuchome(a)suse.cz
+
+- transliteration of UTF-8 accented characters to ASCII during
+ name generation (bnc#442225)
+- 2.18.3
+
+-------------------------------------------------------------------
+Wed Feb 18 16:01:03 CET 2009 - jsuchome(a)suse.cz
+
+- ask for disabling autologin only when adding 2nd user(bnc#332729)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-users-2.18.2.tar.bz2
New:
----
yast2-users-2.18.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-users.spec ++++++
--- /var/tmp/diff_new_pack.X27632/_old 2009-02-27 16:51:12.000000000 +0100
+++ /var/tmp/diff_new_pack.X27632/_new 2009-02-27 16:51:12.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-users (Version 2.18.2)
+# spec file for package yast2-users (Version 2.18.3)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-users
-Version: 2.18.2
+Version: 2.18.3
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-users-2.18.2.tar.bz2
+Source0: yast2-users-2.18.3.tar.bz2
Prefix: /usr
BuildRequires: cracklib-devel doxygen gcc-c++ perl-Digest-SHA1 perl-XML-Writer update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-ldap-client yast2-perl-bindings yast2-security yast2-testsuite
Requires: yast2-country yast2-pam yast2-security cracklib perl-Digest-SHA1 perl-X500-DN perl-gettext
@@ -54,7 +54,7 @@
Jiri Suchomel <jsuchome(a)suse.cz>
%prep
-%setup -n yast2-users-2.18.2
+%setup -n yast2-users-2.18.3
%build
%{prefix}/bin/y2tool y2autoconf
@@ -97,6 +97,12 @@
%{_libdir}/YaST2/plugin/libpy2ag_crack.la
%doc %{prefix}/share/doc/packages/yast2-users
%changelog
+* Fri Feb 27 2009 jsuchome(a)suse.cz
+- transliteration of UTF-8 accented characters to ASCII during
+ name generation (bnc#442225)
+- 2.18.3
+* Wed Feb 18 2009 jsuchome(a)suse.cz
+- ask for disabling autologin only when adding 2nd user(bnc#332729)
* Mon Feb 09 2009 jsuchome(a)suse.cz
- added new logging functions which should produce human readable
log file (fate#100386)
++++++ yast2-users-2.18.2.tar.bz2 -> yast2-users-2.18.3.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.18.2/src/dialogs.ycp new/yast2-users-2.18.3/src/dialogs.ycp
--- old/yast2-users-2.18.2/src/dialogs.ycp 2008-11-14 15:21:59.000000000 +0100
+++ new/yast2-users-2.18.3/src/dialogs.ycp 2009-02-27 13:40:58.000000000 +0100
@@ -5,7 +5,7 @@
* Authors: Johannes Buchhold <jbuch(a)suse.de>,
* Jiri Suchomel <jsuchome(a)suse.cz>
*
- * $Id: dialogs.ycp 53307 2008-11-14 09:56:35Z jsuchome $
+ * $Id: dialogs.ycp 55594 2009-02-18 15:01:32Z jsuchome $
*/
{
@@ -966,6 +966,7 @@
{
string full = (string)UI::QueryWidget (`id (ret), `Value);
full = splitstring (full, " ")[0]:"";
+ full = UsersSimple::Transliterate (full);
UI::ChangeWidget (`id (`username), `Value, tolower (
filterchars (full, UsersSimple::ValidLognameChars ()))
);
@@ -1762,7 +1763,9 @@
continue;
}
// check if autologin is not set for some user
- if (what == "add_user" && !complex_layout)
+ if (what == "add_user" && !complex_layout &&
+ // ask only when there is still one user (bnc#332729)
+ size (UsersCache::GetUsernames ("local")) == 1)
{
Autologin::AskForDisabling (
// popup text
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.18.2/src/groups.ycp new/yast2-users-2.18.3/src/groups.ycp
--- old/yast2-users-2.18.2/src/groups.ycp 2009-02-05 09:39:18.000000000 +0100
+++ new/yast2-users-2.18.3/src/groups.ycp 2009-02-09 14:41:15.000000000 +0100
@@ -10,7 +10,7 @@
* Authors:
* Jiri Suchomel <jsuchome(a)suse.cz>
*
- * $Id: groups.ycp 52149 2008-10-13 14:56:39Z jsuchome $
+ * $Id: groups.ycp 55355 2009-02-09 13:41:14Z jsuchome $
*
* Just a shortcut to invoke groups management
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.18.2/src/inst_auth.ycp new/yast2-users-2.18.3/src/inst_auth.ycp
--- old/yast2-users-2.18.2/src/inst_auth.ycp 2008-10-29 14:42:26.000000000 +0100
+++ new/yast2-users-2.18.3/src/inst_auth.ycp 2009-02-27 14:06:52.000000000 +0100
@@ -5,7 +5,7 @@
* Authors: Arvin Schnell <arvin(a)suse.de>
* Michal Svec <msvec(a)suse.cz>
*
- * $Id: inst_auth.ycp 51319 2008-09-19 12:45:13Z jsuchome $
+ * $Id: inst_auth.ycp 55812 2009-02-27 13:06:52Z jsuchome $
*/
{
@@ -189,7 +189,7 @@
"samba" : "yast2-samba-client", "edir_ldap" : "yast2-linux-user-mgmt" ], {
if (available == nil)
return;
- available = Package::Available (package);
+ available = Package::Installed (package) || Package::Available (package);
if (available == true)
available_clients = add (available_clients, client);
});
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.18.2/src/inst_user_first.ycp new/yast2-users-2.18.3/src/inst_user_first.ycp
--- old/yast2-users-2.18.2/src/inst_user_first.ycp 2008-12-18 11:29:38.000000000 +0100
+++ new/yast2-users-2.18.3/src/inst_user_first.ycp 2009-02-27 13:41:05.000000000 +0100
@@ -612,6 +612,7 @@
{
string full = (string)UI::QueryWidget (`id (`cn), `Value);
full = splitstring (full, " ")[0]:"";
+ full = UsersSimple::Transliterate (full);
UI::ChangeWidget (`id (`username), `Value, tolower (
filterchars (full, UsersSimple::ValidLognameChars ()))
);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.18.2/src/Users.pm new/yast2-users-2.18.3/src/Users.pm
--- old/yast2-users-2.18.2/src/Users.pm 2009-02-09 12:19:14.000000000 +0100
+++ new/yast2-users-2.18.3/src/Users.pm 2009-02-09 14:41:15.000000000 +0100
@@ -4,7 +4,7 @@
# Package: Configuration of users and groups
# Summary: I/O routines + main data structures
#
-# $Id: Users.pm 52801 2008-10-31 14:22:48Z jsuchome $
+# $Id: Users.pm 55355 2009-02-09 13:41:14Z jsuchome $
#
package Users;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.18.2/src/UsersSimple.pm new/yast2-users-2.18.3/src/UsersSimple.pm
--- old/yast2-users-2.18.2/src/UsersSimple.pm 2008-12-18 11:29:38.000000000 +0100
+++ new/yast2-users-2.18.3/src/UsersSimple.pm 2009-02-27 14:04:24.000000000 +0100
@@ -115,6 +115,7 @@
YaST::YCP::Import ("FileUtils");
YaST::YCP::Import ("Hostname");
YaST::YCP::Import ("InstExtensionImage");
+YaST::YCP::Import ("Language");
YaST::YCP::Import ("Mode");
YaST::YCP::Import ("NetworkService");
YaST::YCP::Import ("ProductControl");
@@ -1373,5 +1374,22 @@
sformat (__("Releasing %1 extension..."), "cracklib-dict-full.rpm"));
}
+##------------------------------------
+# use iconv transliteration feature to convert special characters to similar
+# ASCII ones (bnc#442225)
+BEGIN { $TYPEINFO{Transliterate} = ["function", "string", "string"]; }
+sub Transliterate {
+
+ my ($self, $text) = @_;
+
+ return "" if ! $text;
+ my $language = Language->language ();
+ my $out = SCR->Execute (".target.bash_output",
+ "echo '$text' | iconv -f utf-8 -t ascii//translit",
+ { "LANG" => $language });
+ my $stdout = $out->{"stdout"} || "";
+ return $stdout;
+}
+
42
# EOF
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.18.2/src/users.ycp new/yast2-users-2.18.3/src/users.ycp
--- old/yast2-users-2.18.2/src/users.ycp 2009-02-05 09:36:17.000000000 +0100
+++ new/yast2-users-2.18.3/src/users.ycp 2009-02-09 14:41:15.000000000 +0100
@@ -4,7 +4,7 @@
* Summary: Main file
* Authors: Jiri Suchomel <jsuchome(a)suse.cz>
*
- * $Id: users.ycp 52149 2008-10-13 14:56:39Z jsuchome $
+ * $Id: users.ycp 55355 2009-02-09 13:41:14Z jsuchome $
*
* Main file for users and groups configuration. Uses all other files.
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-users-2.18.2/VERSION new/yast2-users-2.18.3/VERSION
--- old/yast2-users-2.18.2/VERSION 2009-02-09 12:47:35.000000000 +0100
+++ new/yast2-users-2.18.3/VERSION 2009-02-27 13:41:32.000000000 +0100
@@ -1 +1 @@
-2.18.2
+2.18.3
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package yast2-sudo for openSUSE:Factory
checked in at Fri Feb 27 16:51:02 CET 2009.
--------
--- yast2-sudo/yast2-sudo.changes 2009-01-14 17:53:13.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-sudo/yast2-sudo.changes 2009-02-27 16:04:05.311550000 +0100
@@ -1,0 +2,9 @@
+Fri Feb 27 15:03:57 CET 2009 - kmachalkova(a)suse.cz
+
+- Do not add extra space to command parameters (bnc#473683)
+- Move user selection into pop-up dialog in user/run-as alias config
+ (bnc#421053)
+- Some compatibility fixes (ButtonBoxes, InputFields usage)
+- 2.18.1
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-sudo-2.18.0.tar.bz2
New:
----
yast2-sudo-2.18.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-sudo.spec ++++++
--- /var/tmp/diff_new_pack.a26959/_old 2009-02-27 16:50:51.000000000 +0100
+++ /var/tmp/diff_new_pack.a26959/_new 2009-02-27 16:50:51.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-sudo (Version 2.18.0)
+# spec file for package yast2-sudo (Version 2.18.1)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,12 +19,12 @@
Name: yast2-sudo
-Version: 2.18.0
+Version: 2.18.1
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-sudo-2.18.0.tar.bz2
+Source0: yast2-sudo-2.18.1.tar.bz2
Prefix: /usr
Requires: yast2 yast2-users
#ycp::PathComponents
@@ -46,7 +46,7 @@
Katarina Machalkova <kmachalkova(a)suse.cz>
%prep
-%setup -n yast2-sudo-2.18.0
+%setup -n yast2-sudo-2.18.1
%build
%{prefix}/bin/y2tool y2autoconf
@@ -80,6 +80,12 @@
/usr/lib/YaST2/servers_non_y2/ag_etc_sudoers
%doc %{prefix}/share/doc/packages/yast2-sudo
%changelog
+* Fri Feb 27 2009 kmachalkova(a)suse.cz
+- Do not add extra space to command parameters (bnc#473683)
+- Move user selection into pop-up dialog in user/run-as alias config
+ (bnc#421053)
+- Some compatibility fixes (ButtonBoxes, InputFields usage)
+- 2.18.1
* Wed Jan 14 2009 kmachalkova(a)suse.cz
- Show "Really abort?" message only if there is something to save
(bnc#458328)
++++++ yast2-sudo-2.18.0.tar.bz2 -> yast2-sudo-2.18.1.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/complex.ycp new/yast2-sudo-2.18.1/src/complex.ycp
--- old/yast2-sudo-2.18.0/src/complex.ycp 2009-01-14 16:35:32.000000000 +0100
+++ new/yast2-sudo-2.18.1/src/complex.ycp 2009-02-27 15:03:46.000000000 +0100
@@ -83,17 +83,13 @@
UI::OpenDialog(`opt(`decorated), `VBox(
`Frame(
_("Add New Host to the Alias"),
- `VBox(
- `HSpacing(40),
- `VSpacing(0.5),
- `TextEntry(`id("host_name"),_("Hostname or Network"), new_host),
- `VSpacing(0.5)
+ `MarginBox(1,1,
+ `InputField(`id("host_name"),_("Hostname or Network"), new_host)
)
),
- `HBox(
- `PushButton(`id(`ok), Label::OKButton()),
- `HSpacing(1),
- `PushButton(`id(`cancel), Label::CancelButton())
+ `ButtonBox(
+ `PushButton(`id(`ok), `opt(`default, `okButton), Label::OKButton()),
+ `PushButton(`id(`cancel), `opt(`cancelButton), Label::CancelButton())
)
));
@@ -116,6 +112,36 @@
return (new_host) ;
}
+string AddUserDialog( list <string> users ) {
+ string new_user ="";
+
+ UI::OpenDialog(`opt(`decorated), `VBox(
+ `Frame(
+ _("Add New User to the Alias"),
+ `MarginBox(1,1,
+ `ComboBox(`id("user_name"),_("Local and System Users (Groups)"), users)
+ )
+ ),
+ `ButtonBox(
+ `PushButton(`id(`ok), `opt(`default, `okButton), Label::OKButton()),
+ `PushButton(`id(`cancel), `opt(`cancelButton), Label::CancelButton())
+ )
+ ));
+
+ any ret = nil;
+ while (true) {
+ ret = UI::UserInput();
+ if (ret == `ok) {
+ new_user = (string) UI::QueryWidget(`id("user_name"), `Value);
+ break;
+ } else if (ret == `cancel) {
+ break;
+ }
+ }
+ UI::CloseDialog();
+ return (new_user) ;
+}
+
boolean ValidateCommand(string cmd){
if(FileUtils::Exists(cmd) || contains(Sudo::GetAliasNames("command"), cmd) || cmd == "ALL" )
return true;
@@ -126,7 +152,7 @@
}
string AddCommandDialog(string c, string p) {
- string new_command = c + p;
+ string new_command = "";
list <string> items = Sudo::GetAliasNames("command");
@@ -151,10 +177,9 @@
)
),
`VSpacing(0.5),
- `HBox(
- `PushButton(`id(`ok), Label::OKButton()),
- `HSpacing(1),
- `PushButton(`id(`cancel), Label::CancelButton())
+ `ButtonBox(
+ `PushButton(`id(`ok), `opt(`default, `okButton), Label::OKButton()),
+ `PushButton(`id(`cancel), `opt(`cancelButton), Label::CancelButton())
)
));
@@ -199,7 +224,7 @@
if(pos != nil) {
cmd = substring(it,0, pos);
- param = substring(it,pos);
+ param = substring(it,pos+1);
}
else {
cmd = it;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/dialog-cmnd.ycp new/yast2-sudo-2.18.1/src/dialog-cmnd.ycp
--- old/yast2-sudo-2.18.0/src/dialog-cmnd.ycp 2008-11-27 17:15:25.000000000 +0100
+++ new/yast2-sudo-2.18.1/src/dialog-cmnd.ycp 2009-02-27 15:03:46.000000000 +0100
@@ -39,7 +39,7 @@
}
term contents = `VBox (
- `TextEntry(`id("cmnd_alias_name"),_("Alias Name (in CAPITALS)")),
+ `Left(`InputField(`id("cmnd_alias_name"),_("Alias Name (in CAPITALS)"))),
`Left(`Label(_("Command Names or Directories in the Alias"))),
`Table(`id("cmnd_alias_members"),`header(
_("Command"),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/dialog-host.ycp new/yast2-sudo-2.18.1/src/dialog-host.ycp
--- old/yast2-sudo-2.18.0/src/dialog-host.ycp 2008-12-16 17:33:19.000000000 +0100
+++ new/yast2-sudo-2.18.1/src/dialog-host.ycp 2009-02-27 15:03:46.000000000 +0100
@@ -43,7 +43,7 @@
}
term contents = `VBox (
- `TextEntry(`id("host_alias_name"),_("Alias Name (in CAPITALS)")),
+ `Left( `InputField(`id("host_alias_name"),_("Alias Name (in CAPITALS)"))),
`Left(`Label(_("Hostnames or Networks in the Alias"))),
`Table(`id("host_alias_members"),`header(_("Host Names/Networks")),[]),
`Left(`HBox(
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/dialog-runas.ycp new/yast2-sudo-2.18.1/src/dialog-runas.ycp
--- old/yast2-sudo-2.18.0/src/dialog-runas.ycp 2008-12-16 17:33:19.000000000 +0100
+++ new/yast2-sudo-2.18.1/src/dialog-runas.ycp 2009-02-27 15:03:46.000000000 +0100
@@ -9,13 +9,9 @@
include "sudo/complex.ycp";
include "sudo/helps.ycp";
-any RedrawRunAsAlias(string name, list <string> members, list <string> users) {
+void RedrawRunAsAlias( list <string> members ) {
list <term> items = [];
- if (name != "") {
- UI::ChangeWidget(`id("runas_alias_name"), `Value, name);
- }
-
foreach(string it, members, {
items = add(items, `item(`id(it),it));
});
@@ -23,9 +19,6 @@
UI::ChangeWidget(`id("runas_alias_members"),`Items, items);
UI::ChangeWidget(`id("remove_member"), `Enabled, (items != []));
- UI::ReplaceWidget(`id("all_run_as_replace"),
- `ComboBox(`id("all_run_as"),_("Local and System Users"),sort(string s, string t, users, ``( s < t))));
-
}
any AddEditRunAsAliasDialog (string what) {
@@ -50,33 +43,25 @@
}
term contents = `VBox (
- `TextEntry(`id("runas_alias_name"),_("Alias Name (in CAPITALS)")),
+ `Left(`InputField(`id("runas_alias_name"),_("Alias Name (in CAPITALS)"))),
`VSpacing(1),
- `HBox(
- `VBox(
- `opt(`hstretch),
- `Left(`ReplacePoint(`id("all_run_as_replace"),
- `ComboBox(`id("all_run_as"),_("Local and System Users"), [])
- )),
- `Table(`id("runas_alias_members"), `opt(`hstretch,`vstretch), `header(_("Alias Members")),[])
- ),
- `HSquash(
- `VBox (
- `VSpacing(1.1),
- `PushButton ( `id ( "add_member" ), `opt ( `hstretch, `key_F3), " " + Label::AddButton() + " "),
- `PushButton ( `id ( "remove_member" ), `opt ( `hstretch , `key_F5), " " + Label::DeleteButton() + " "),
- `Empty(`opt(`vstretch))
+ `VBox(
+ `Table(`id("runas_alias_members"), `opt(`hstretch,`vstretch), `header(_("Alias Members")),[]),
+ `HBox(
+ `PushButton ( `id ( "add_member" ), `opt ( `key_F3), " " + Label::AddButton() + " "),
+ `PushButton ( `id ( "remove_member" ), `opt ( `key_F5), " " + Label::DeleteButton() + " "),
+ `HStretch()
)
- )
+ )
- )
- );
+ );
Wizard::SetContentsButtons(caption, contents,HELPS["runas_alias"]:"",Label::CancelButton(), Label::OKButton());
Wizard::HideAbortButton();
UI::ChangeWidget (`id("runas_alias_name"), `ValidChars, "_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
+ UI::ChangeWidget (`id("runas_alias_name"), `Value, name);
- RedrawRunAsAlias(name, alias_members,users);
+ RedrawRunAsAlias(alias_members);
any ret = nil;
while(true) {
@@ -109,23 +94,24 @@
Sudo::SetModified();
break;
/* back */
- }else if(ret == `back) {
+ }else if(ret == `back) {
break;
/* add users*/
- }else if(ret == "add_member"){
- string new_member = (string) UI::QueryWidget(`id("all_run_as"),`Value);
+ } else if(ret == "add_member"){
+ string new_member = AddUserDialog( users );
- alias_members = add(alias_members, new_member);
- users = filter(string s, users, ``(s != new_member));
- RedrawRunAsAlias("",alias_members, users);
+ if (new_member != "")
+ {
+ alias_members = add(alias_members, new_member);
+ users = filter(string s, users, ``(s != new_member));
+ RedrawRunAsAlias(alias_members);
+ }
/* delete users */
- }else if (ret == "remove_member"){
- string current_item = (string) UI::QueryWidget(`id("runas_alias_members"), `CurrentItem);
- alias_members = filter(string s, alias_members, ``(s != current_item));
- users = add(users, current_item);
- UI::ReplaceWidget(`id("all_run_as_replace"),
- `ComboBox(`id("all_run_as"),_("Local and System Users"),users));
- RedrawRunAsAlias("",alias_members, users);
+ } else if (ret == "remove_member"){
+ string current_item = (string) UI::QueryWidget(`id("runas_alias_members"), `CurrentItem);
+ alias_members = filter(string s, alias_members, ``(s != current_item));
+ users = add(users, current_item);
+ RedrawRunAsAlias(alias_members);
/* unknown */
} else {
y2error("unexpected retcode: %1", ret);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/dialog-spec.ycp new/yast2-sudo-2.18.1/src/dialog-spec.ycp
--- old/yast2-sudo-2.18.0/src/dialog-spec.ycp 2008-12-16 17:33:19.000000000 +0100
+++ new/yast2-sudo-2.18.1/src/dialog-spec.ycp 2009-02-27 15:03:46.000000000 +0100
@@ -11,12 +11,10 @@
include "sudo/complex.ycp";
void RedrawCmndTable (list <string> commands) {
- if (commands != []) {
- list <term> items = UpdateCmdList(commands);
+ list <term> items = UpdateCmdList(commands);
- UI::ChangeWidget(`id("commands"),`Items, items);
- EnableDisableButtons("command_edit", "command_remove", items);
- }
+ UI::ChangeWidget(`id("commands"),`Items, items);
+ EnableDisableButtons("command_edit", "command_remove", items);
}
@@ -128,6 +126,7 @@
string new_command = AddCommandDialog("","");
if(new_command != "" && !contains(commands, new_command)) {
+ y2milestone("%1", new_command);
commands = add(commands, new_command);
RedrawCmndTable(commands);
}
@@ -137,8 +136,11 @@
term it = (term) UI::QueryWidget(`id("commands"), `Item(current_item));
string new_command = AddCommandDialog(it[1]:"", it[2]:"");
- commands[current_item] = new_command;
- RedrawCmndTable(commands);
+ if( new_command !="")
+ {
+ commands[current_item] = new_command;
+ RedrawCmndTable(commands);
+ }
/* remove command */
} else if (ret == "command_remove") {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/src/dialog-user.ycp new/yast2-sudo-2.18.1/src/dialog-user.ycp
--- old/yast2-sudo-2.18.0/src/dialog-user.ycp 2008-12-16 17:33:19.000000000 +0100
+++ new/yast2-sudo-2.18.1/src/dialog-user.ycp 2009-02-27 15:03:46.000000000 +0100
@@ -9,22 +9,15 @@
include "sudo/complex.ycp";
include "sudo/helps.ycp";
-any RedrawUserAlias(string name, list <string> members, list <string> users) {
+void RedrawUserAlias( list <string> members ) {
list <term> items = [];
- if (name != "") {
- UI::ChangeWidget(`id("user_alias_name"), `Value, name);
- }
-
foreach(string it, members, {
items = add(items, `item(`id(it),it));
});
+
UI::ChangeWidget(`id("user_alias_members"),`Items, items);
UI::ChangeWidget(`id("remove_member"), `Enabled, (items != []));
-
- UI::ReplaceWidget(`id("all_users_replace"),
- `ComboBox(`id("all_users"),_("Local and System Users"), sort(string s, string t, users, ``( s < t))));
-
}
any AddEditUserAliasDialog (string what) {
@@ -47,35 +40,25 @@
name = (string) it["name"]:"";
caption = _("Existing User Alias");
}
+ users = (list <string>) sort( string s1, string s2, users, ``( s1 < s2 ) );
term contents = `VBox (
- `TextEntry(`id("user_alias_name"),_("Alias Name (in CAPITALS)")),
+ `Left( `InputField(`id("user_alias_name"),_("Alias Name (in CAPITALS)"))),
`VSpacing(1),
- `HBox(
- `VBox(
- `opt(`hstretch),
- `Left(`ReplacePoint(`id("all_users_replace"),
- `ComboBox(`id("all_users"),_("Local and System Users"), [])
- )),
- `Table(`id("user_alias_members"), `opt(`hstretch,`vstretch), `header(_("Alias Members")),[])
- ),
- `HSquash(
- `VBox (
- `VSpacing(1.1),
- `PushButton ( `id ( "add_member" ), `opt ( `hstretch, `key_F3 ), " " + Label::AddButton() + " "),
- `PushButton ( `id ( "remove_member" ), `opt ( `hstretch, `key_F5 ), " " + Label::DeleteButton() + " "),
- `Empty(`opt(`vstretch))
- )
- )
-
- )
+ `Table(`id("user_alias_members"), `opt(`hstretch,`vstretch), `header(_("Alias Members")),[]),
+ `HBox (
+ `PushButton ( `id ( "add_member" ), `opt ( `key_F3 ), " " + Label::AddButton() + " "),
+ `PushButton ( `id ( "remove_member" ), `opt ( `key_F5 ), " " + Label::DeleteButton() + " "),
+ `HStretch()
+ )
);
Wizard::SetContentsButtons(caption, contents,HELPS["user_alias"]:"",Label::CancelButton(), Label::OKButton());
Wizard::HideAbortButton();
UI::ChangeWidget (`id("user_alias_name"), `ValidChars, "_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
+ UI::ChangeWidget(`id("user_alias_name"), `Value, name);
- RedrawUserAlias(name, alias_members,users);
+ RedrawUserAlias( alias_members );
any ret = nil;
while(true) {
@@ -112,23 +95,24 @@
break;
/* add users*/
}else if(ret == "add_member"){
- string new_member = (string) UI::QueryWidget(`id("all_users"),`Value);
+ string new_member = AddUserDialog( users );
- alias_members = add(alias_members, new_member);
- users = filter(string s, users, ``(s != new_member));
- RedrawUserAlias("",alias_members, users);
+ if (new_member != "")
+ {
+ alias_members = add(alias_members, new_member);
+ users = filter(string s, users, ``(s != new_member));
+ RedrawUserAlias( alias_members );
+ }
/* delete users */
- }else if (ret == "remove_member"){
+ }else if (ret == "remove_member"){
string current_item = (string) UI::QueryWidget(`id("user_alias_members"), `CurrentItem);
alias_members = filter(string s, alias_members, ``(s != current_item));
users = add(users, current_item);
- UI::ReplaceWidget(`id("all_users_replace"),
- `ComboBox(`id("all_users"),_("Local and System Users"),users));
- RedrawUserAlias("",alias_members, users);
+ RedrawUserAlias(alias_members);
/* unknown */
} else {
y2error("unexpected retcode: %1", ret);
- continue;
+ continue;
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-sudo-2.18.0/VERSION new/yast2-sudo-2.18.1/VERSION
--- old/yast2-sudo-2.18.0/VERSION 2009-01-14 16:39:05.000000000 +0100
+++ new/yast2-sudo-2.18.1/VERSION 2009-02-27 15:59:47.000000000 +0100
@@ -1 +1 @@
-2.18.0
+2.18.1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package yast2-printer for openSUSE:Factory
checked in at Fri Feb 27 16:50:43 CET 2009.
--------
--- yast2-printer/yast2-printer.changes 2009-02-26 15:28:38.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-printer/yast2-printer.changes 2009-02-27 15:46:09.301957000 +0100
@@ -1,0 +2,8 @@
+Fri Feb 27 15:35:16 CET 2009 - jsmeix(a)suse.de
+
+- Added the functionality to basicadd.ycp and basicmodify.ycp to
+ set the default paper size directly when a driver is assigned
+ or when the currently used driver is replaced by another one.
+- 2.18.8
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-printer-2.18.7.tar.bz2
New:
----
yast2-printer-2.18.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.S24644/_old 2009-02-27 16:49:32.000000000 +0100
+++ /var/tmp/diff_new_pack.S24644/_new 2009-02-27 16:49:32.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.18.7)
+# spec file for package yast2-printer (Version 2.18.8)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,12 +20,12 @@
Url: http://en.opensuse.org/YaST/Modules/Printer
Name: yast2-printer
-Version: 2.18.7
+Version: 2.18.8
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.18.7.tar.bz2
+Source0: yast2-printer-2.18.8.tar.bz2
Prefix: /usr
BuildRequires: cups-devel update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite
Recommends: netcat
@@ -65,7 +65,7 @@
Michal Zugec <mzugec(a)suse.cz>
%prep
-%setup -n yast2-printer-2.18.7
+%setup -n yast2-printer-2.18.8
%build
%{prefix}/bin/y2tool y2autoconf
@@ -127,6 +127,11 @@
%exclude %{prefix}/share/doc/packages/yast2-printer/COPYING
%exclude %{prefix}/share/doc/packages/yast2-printer/README
%changelog
+* Fri Feb 27 2009 jsmeix(a)suse.de
+- Added the functionality to basicadd.ycp and basicmodify.ycp to
+ set the default paper size directly when a driver is assigned
+ or when the currently used driver is replaced by another one.
+- 2.18.8
* Thu Feb 26 2009 jsmeix(a)suse.de
- Fixed the "More Drivers" functionality in basicmodify.ycp
to show the current driver topmost in any case.
++++++ yast2-printer-2.18.7.tar.bz2 -> yast2-printer-2.18.8.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.7/configure new/yast2-printer-2.18.8/configure
--- old/yast2-printer-2.18.7/configure 2009-02-26 15:22:24.000000000 +0100
+++ new/yast2-printer-2.18.8/configure 2009-02-27 15:38:44.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-printer 2.18.7.
+# Generated by GNU Autoconf 2.63 for yast2-printer 2.18.8.
#
# Report bugs to <http://bugs.opensuse.org/>.
#
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-printer'
PACKAGE_TARNAME='yast2-printer'
-PACKAGE_VERSION='2.18.7'
-PACKAGE_STRING='yast2-printer 2.18.7'
+PACKAGE_VERSION='2.18.8'
+PACKAGE_STRING='yast2-printer 2.18.8'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1274,7 +1274,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-printer 2.18.7 to adapt to many kinds of systems.
+\`configure' configures yast2-printer 2.18.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1345,7 +1345,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-printer 2.18.7:";;
+ short | recursive ) echo "Configuration of yast2-printer 2.18.8:";;
esac
cat <<\_ACEOF
@@ -1425,7 +1425,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-printer configure 2.18.7
+yast2-printer configure 2.18.8
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1439,7 +1439,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.18.7, which was
+It was created by yast2-printer $as_me 2.18.8, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2286,7 +2286,7 @@
# Define the identity of the package.
PACKAGE='yast2-printer'
- VERSION='2.18.7'
+ VERSION='2.18.8'
cat >>confdefs.h <<_ACEOF
@@ -2510,7 +2510,7 @@
-VERSION="2.18.7"
+VERSION="2.18.8"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec <mzugec(a)novell.com>"
@@ -3451,7 +3451,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.18.7, which was
+This file was extended by yast2-printer $as_me 2.18.8, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3501,7 +3501,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-printer config.status 2.18.7
+yast2-printer config.status 2.18.8
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.7/configure.in new/yast2-printer-2.18.8/configure.in
--- old/yast2-printer-2.18.7/configure.in 2009-02-26 15:22:19.000000000 +0100
+++ new/yast2-printer-2.18.8/configure.in 2009-02-27 15:38:40.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-printer, 2.18.7, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.18.8, 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.18.7"
+VERSION="2.18.8"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec <mzugec(a)novell.com>"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.7/src/basicmodify.ycp new/yast2-printer-2.18.8/src/basicmodify.ycp
--- old/yast2-printer-2.18.7/src/basicmodify.ycp 2009-02-26 14:11:07.000000000 +0100
+++ new/yast2-printer-2.18.8/src/basicmodify.ycp 2009-02-27 15:27:37.000000000 +0100
@@ -218,6 +218,29 @@
}
}
}
+ // If the currently used driver is replaced by another driver,
+ // show the same content as in the BasicAddDialog to set the default paper size:
+ term new_driver_paper_choice_content = `RadioButtonGroup
+ ( `id(`paper_size_radio_buttons),
+ `HBox
+ ( `Label
+ ( // Label of a RadioButtonGroup to specify the default paper size:
+ _("Default paper size (if printer and driver supports it)")
+ ),
+ // Have none of the RadioButtons preselected which means that
+ // by default the CUPS default is used for the default paper size.
+ // For the CUPS 1.3 default see http://www.cups.org/str.php?L2846
+ // For CUPS 1.4 the default depends on the "DefaultPaperSize"
+ // setting in cupsd.conf
+ // see https://bugzilla.novell.com/show_bug.cgi?id=395760
+ // and http://www.cups.org/str.php?L2848
+ `HSpacing( 2 ),
+ `RadioButton( `id(`a4), "A&4" ),
+ `HSpacing( 1 ),
+ `RadioButton( `id(`letter), "Le&tter" ),
+ `HStretch()
+ )
+ );
// Usually the id in the connection items is the matching index number in the connections list.
// Here the id of the current connection is set to -1 because the uri of the current connection
// is derived from the queues list and this uri may be not present in the connections list
@@ -437,6 +460,7 @@
if( ret == `next )
{ commandline = "/usr/sbin/lpadmin -h localhost -p '" + name + "'";
boolean something_has_changed = false;
+ boolean set_paper_size_later = false;
integer selected_connection_index = (integer)UI::QueryWidget( `id(`connection_selection), `CurrentItem );
if( selected_connection_index >= 0 )
{ uri = Printer::connections[selected_connection_index,"uri"]:"";
@@ -451,10 +475,13 @@
if( "" != ppd )
{ commandline = commandline + " -m '" + ppd + "'";
something_has_changed = true;
+ // The paper size for a new driver will be only set
+ // after the new driver was actually successfully set:
+ set_paper_size_later = true;
}
}
- if( -1 == selected_ppd_index )
- { // The default paper size can be only set for the currently used driver.
+ else
+ { // The default paper size is only set in the same command for the currently used driver.
// Depending on the currently used driver no paper size selection might exists
// in particular not for a 'raw' queue or when a 'System V style interface script' is used:
if( UI::WidgetExists( `id(`paper_size_radio_buttons) ) )
@@ -540,6 +567,44 @@
Printerlib::result["stderr"]:""
);
}
+ else
+ { // Set the default paper size for a new driver only
+ // after a new driver was actually successfully set.
+ if( set_paper_size_later )
+ { // Depending on the previously used driver no paper size selection might exists
+ // in particular not for a 'raw' queue or when a 'System V style interface script' is used.
+ // When a driver is set for a 'raw' queue or for a queue with a 'System V style interface script',
+ // it is therefore not possible to set the default paper size for the new driver now
+ // so that the user would have to run the modify dialog again to do this.
+ if( UI::WidgetExists( `id(`paper_size_radio_buttons) ) )
+ { default_paper_size = "";
+ any paper_size = UI::QueryWidget( `id(`paper_size_radio_buttons), `CurrentButton );
+ if( `a4 == paper_size )
+ { default_paper_size = "A4";
+ }
+ if( `letter == paper_size )
+ { default_paper_size = "Letter";
+ }
+ // Try to set the requested default_paper_size if it is an available choice for this queue.
+ // If no default_paper_size is requested, the CUPS default is used.
+ // For the CUPS 1.3 default see http://www.cups.org/str.php?L2846
+ // For CUPS 1.4 the default depends on the "DefaultPaperSize" setting in cupsd.conf
+ // see https://bugzilla.novell.com/show_bug.cgi?id=395760
+ // and http://www.cups.org/str.php?L2848
+ if( "" != default_paper_size )
+ { // '\>' is used to find an available choice also when it is the last value on the line.
+ // Note the YCP quoting: \\< becomes \< and \\> becomes \> in the commandline.
+ commandline = "lpoptions -h localhost -p '" + name + "' -l | grep '^PageSize.*\\<" + default_paper_size + "\\>'";
+ if( Printerlib::ExecuteBashCommand( commandline ) )
+ { commandline = "/usr/sbin/lpadmin -h localhost -p '" + name + "' -o 'PageSize=" + default_paper_size + "'";
+ // Do not care if it fails to set the default_paper_size (i.e. show no error message to the user)
+ // because the default_paper_size setting is nice to have but not mandatoty for a working queue:
+ Printerlib::ExecuteBashCommand( commandline );
+ }
+ }
+ }
+ }
+ }
Wizard::EnableBackButton();
Wizard::EnableNextButton();
}
@@ -791,7 +856,10 @@
{ // When the currently used driver is to be exchanged,
// the widgets to change options for the currently used driver are removed and
// the description_input field is overwritten with the NickName of the new selected driver:
- UI::ReplaceWidget( `id(`paper_choice_and_driver_options_replace_point), `Empty() );
+ //UI::ReplaceWidget( `id(`paper_choice_and_driver_options_replace_point), `Empty() );
+ UI::ReplaceWidget( `id(`paper_choice_and_driver_options_replace_point),
+ `Left( new_driver_paper_choice_content )
+ );
string new_description = Printer::ppds[selected_ppd_index,"nickname"]:"";
if( "" != model
&& "unknown" != tolower( model )
@@ -851,23 +919,23 @@
{ driver_filter_string = "";
boolean valid_driver_found = false;
list driver_items = [];
- // Use the existing value of model because for each subsequent run of this more_drivers section
- // the existing value of model is shortened at the end (the last word is removed) to get
- // more and mor derivers for each subsequent run of this more_drivers section.
- y2milestone( "More drivers for '%1'", model );
- if( "" != model
- && "unknown" != tolower( model )
+ // Use the existing value of driver_filter_input_text
+ // which is usually set to nick_name and to model as fallback.
+ driver_filter_input_text = (string)UI::QueryWidget( `id(`driver_filter_input), `Value );
+ y2milestone( "More drivers for '%1'", driver_filter_input_text );
+ if( "" != driver_filter_input_text
+ && "unknown" != tolower( driver_filter_input_text )
)
- { // If the model string does not contain a space,
- // model_words is a singleton list which contains only model.
- list <string> model_words = splitstring( model, " " );
- if( size( model_words ) >= 2 )
+ { // If the driver_filter_input_text string does not contain a space,
+ // words is a singleton list which contains only one word.
+ list <string> words = splitstring( driver_filter_input_text, " " );
+ if( size( words ) >= 2 )
{ // If there are less than two words the following does not make sense.
// Try to find the word which contains a model number.
// This is usually the first word which contains a number.
string model_number_word = "";
foreach( string word,
- model_words,
+ words,
{ if( "" != filterchars( word, Printer::number_chars ) )
{ model_number_word = word;
break;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.7/VERSION new/yast2-printer-2.18.8/VERSION
--- old/yast2-printer-2.18.7/VERSION 2009-02-26 14:49:01.000000000 +0100
+++ new/yast2-printer-2.18.8/VERSION 2009-02-27 15:35:14.000000000 +0100
@@ -1 +1 @@
-2.18.7
+2.18.8
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package xorg-x11-driver-input for openSUSE:Factory
checked in at Fri Feb 27 16:49:17 CET 2009.
--------
--- xorg-x11-driver-input/xorg-x11-driver-input.changes 2009-02-26 16:39:34.000000000 +0100
+++ /mounts/work_src_done/STABLE/xorg-x11-driver-input/xorg-x11-driver-input.changes 2009-02-27 12:44:20.287919529 +0100
@@ -1,0 +2,5 @@
+Fri Feb 27 12:38:27 CET 2009 - sndirsch(a)suse.de
+
+- xf86-input-hyperpen 1.3.0
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
xf86-input-hyperpen-1.2.0.tar.bz2
New:
----
xf86-input-hyperpen-1.3.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xorg-x11-driver-input.spec ++++++
--- /var/tmp/diff_new_pack.z10034/_old 2009-02-27 16:24:32.000000000 +0100
+++ /var/tmp/diff_new_pack.z10034/_new 2009-02-27 16:24:32.000000000 +0100
@@ -23,7 +23,7 @@
BuildRequires: Mesa-devel pkgconfig xorg-x11-proto-devel xorg-x11-server-sdk
Url: http://xorg.freedesktop.org/
Version: 7.4
-Release: 17
+Release: 18
License: X11/MIT
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/X11/Servers/XF86_4
@@ -42,7 +42,7 @@
Source8: xf86-input-elographics-1.2.3.tar.bz2
Source9: xf86-input-evdev-1.1.5.tar.bz2
Source10: xf86-input-fpit-1.3.0.tar.bz2
-Source11: xf86-input-hyperpen-1.2.0.tar.bz2
+Source11: xf86-input-hyperpen-1.3.0.tar.bz2
Source12: xf86-input-jamstudio-1.2.0.tar.bz2
Source13: xf86-input-joystick-1.4.0.tar.bz2
Source14: xf86-input-keyboard-1.3.2.tar.bz2
@@ -164,6 +164,8 @@
%endif
%changelog
+* Fri Feb 27 2009 sndirsch(a)suse.de
+- xf86-input-hyperpen 1.3.0
* Thu Feb 26 2009 sndirsch(a)suse.de
- xf86-input-mouse 1.4.0
- adjusted p_mouse_misc.diff
++++++ xf86-input-hyperpen-1.2.0.tar.bz2 -> xf86-input-hyperpen-1.3.0.tar.bz2 ++++++
++++ 12576 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-hyperpen-1.2.0/configure.ac new/xf86-input-hyperpen-1.3.0/configure.ac
--- old/xf86-input-hyperpen-1.2.0/configure.ac 2008-03-20 20:50:12.000000000 +0100
+++ new/xf86-input-hyperpen-1.3.0/configure.ac 2009-02-26 23:32:21.000000000 +0100
@@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-input-hyperpen],
- 1.2.0,
+ 1.3.0,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]
xf86-input-hyperpen)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-hyperpen-1.2.0/README new/xf86-input-hyperpen-1.3.0/README
--- old/xf86-input-hyperpen-1.2.0/README 1970-01-01 01:00:00.000000000 +0100
+++ new/xf86-input-hyperpen-1.3.0/README 2009-02-26 23:31:24.000000000 +0100
@@ -0,0 +1,20 @@
+xf86-input-hyperpen - Aiptek HyperPen 6000 input driver for the Xorg X server
+
+Please submit bugs & patches to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/driver/xf86-input-hyperpen
+
+ http://cgit.freedesktop.org/xorg/driver/xf86-input-hyperpen
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-input-hyperpen-1.2.0/src/xf86HyperPen.c new/xf86-input-hyperpen-1.3.0/src/xf86HyperPen.c
--- old/xf86-input-hyperpen-1.2.0/src/xf86HyperPen.c 2008-03-20 19:55:09.000000000 +0100
+++ new/xf86-input-hyperpen-1.3.0/src/xf86HyperPen.c 2009-02-26 23:31:24.000000000 +0100
@@ -41,14 +41,7 @@
#include "config.h"
#endif
-#include <xf86Version.h>
-
-#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(3,9,0,0,0)
-#define XFREE86_V4 1
-#endif
-
-#ifdef XFREE86_V4
-/* post 3.9 headers */
+#include <xorgVersion.h>
#include <unistd.h>
#include <errno.h>
@@ -104,56 +97,6 @@
static InputDriverPtr hypDrv;
-#else /* pre 3.9 headers */
-
-#include <X11/Xos.h>
-#include <signal.h>
-#include <stdio.h>
-
-#define NEED_EVENTS
-#include <X11/X.h>
-#include <X11/Xproto.h>
-#include "misc.h"
-#include "inputstr.h"
-#include "scrnintstr.h"
-#include <X11/extensions/XI.h>
-#include <X11/extensions/XIproto.h>
-
-#if defined(sun) && !defined(i386)
-#define POSIX_TTY
-#include <errno.h>
-#include <termio.h>
-#include <fcntl.h>
-#include <ctype.h>
-
-#include "extio.h"
-#else
-#include "compiler.h"
-
-#ifdef XFree86LOADER
-#include "xf86_libc.h"
-#endif
-#include "xf86.h"
-#include "xf86Procs.h"
-#include "xf86_OSlib.h"
-#include "xf86_Config.h"
-#include "xf86Xinput.h"
-#include "atKeynames.h"
-#include "xf86Version.h"
-#endif
-
-#if !defined(sun) || defined(i386)
-#include "osdep.h"
-#include "exevents.h"
-
-#include "extnsionst.h"
-#include "extinit.h"
-#endif
-
-#if defined(__QNX__) || defined(__QNXNTO__)
-#define POSIX_TTY
-#endif
-#endif /* pre 3.9 headers */
/*
** Debugging macros
@@ -237,65 +180,6 @@
*/
#define HYPERPEN_SECTION_NAME "HyperPen"
-#ifndef XFREE86_V4
-
-#define PORT 1
-#define DEVICENAME 2
-#define THE_MODE 3
-#define CURSOR 4
-#define BORDER 5
-#define DEBUG_LEVEL 6
-#define HISTORY_SIZE 7
-#define ALWAYS_CORE 8
-#define ACTIVE_AREA 9
-#define ACTIVE_OFFSET 10
-#define INVX 11
-#define INVY 12
-#define BAUD_RATE 13
-#define PMIN 14
-#define PMAX 15
-
-#if !defined(sun) || defined(i386)
-static SymTabRec HypTab[] = {
- {ENDSUBSECTION, "endsubsection"},
- {PORT, "port"},
- {DEVICENAME, "devicename"},
- {THE_MODE, "mode"},
- {CURSOR, "cursor"},
- {BORDER, "border"},
- {DEBUG_LEVEL, "debuglevel"},
- {HISTORY_SIZE, "historysize"},
- {ALWAYS_CORE, "alwayscore"},
- {ACTIVE_AREA, "activearea"},
- {ACTIVE_OFFSET, "activeoffset"},
- {INVX, "invx"},
- {INVY, "invy"},
- {BAUD_RATE, "baudrate"},
- {PMIN, "pmin"},
- {PMAX, "pmax"},
- {-1, ""}
-};
-
-#define RELATIVE 1
-#define ABSOLUTE 2
-
-static SymTabRec HypModeTabRec[] = {
- {RELATIVE, "relative"},
- {ABSOLUTE, "absolute"},
- {-1, ""}
-};
-
-#define PUCK 1
-#define STYLUS 2
-
-static SymTabRec HypPointTabRec[] = {
- {PUCK, "puck"},
- {STYLUS, "stylus"},
- {-1, ""}
-};
-
-#endif
-#endif /* Pre 3.9 headers */
/*
** Contants and macro
@@ -339,286 +223,6 @@
** External declarations
*/
-#ifndef XFREE86_V4
-
-#if defined(sun) && !defined(i386)
-#define ENQUEUE suneqEnqueue
-#else
-#define ENQUEUE xf86eqEnqueue
-
-extern void xf86eqEnqueue(
- xEventPtr /*e */
- );
-#endif
-
-extern void miPointerDeltaCursor(
- int /*dx */ ,
- int /*dy */ ,
- unsigned long /*time */
- );
-
-
-#ifndef XFREE86_V4
-/*
- ***************************************************************************
- *
- * set_serial_speed --
- *
- * Set speed of the serial port.
- *
- ***************************************************************************
- */
-static int
-set_serial_speed(int fd, int speed_code)
-{
- struct termios termios_tty;
- int err;
-#ifdef POSIX_TTY
- SYSCALL(err = tcgetattr(fd, &termios_tty));
- if (err == -1) {
- ErrorF("HyperPen tcgetattr error : %s\n", strerror(errno));
- return !Success;
- }
- termios_tty.c_iflag = IXOFF;
- termios_tty.c_oflag = 0;
- termios_tty.c_cflag = speed_code|CS8|CREAD|CLOCAL|HUPCL|PARENB|PARODD;
- termios_tty.c_lflag = 0;
- termios_tty.c_cc[VINTR] = 0;
- termios_tty.c_cc[VQUIT] = 0;
- termios_tty.c_cc[VERASE] = 0;
- termios_tty.c_cc[VEOF] = 0;
-#ifdef VWERASE
- termios_tty.c_cc[VWERASE] = 0;
-#endif
-#ifdef VREPRINT
- termios_tty.c_cc[VREPRINT] = 0;
-#endif
- termios_tty.c_cc[VKILL] = 0;
- termios_tty.c_cc[VEOF] = 0;
- termios_tty.c_cc[VEOL] = 0;
-#ifdef VEOL2
- termios_tty.c_cc[VEOL2] = 0;
-#endif
- termios_tty.c_cc[VSUSP] = 0;
-#ifdef VDSUSP
- termios_tty.c_cc[VDSUSP] = 0;
-#endif
-#ifdef VDISCARD
- termios_tty.c_cc[VDISCARD] = 0;
-#endif
-#ifdef VLNEXT
- termios_tty.c_cc[VLNEXT] = 0;
-#endif
- /* minimum 1 character in one read call and timeout to 100 ms */
- termios_tty.c_cc[VMIN] = 1;
- termios_tty.c_cc[VTIME] = 10;
- SYSCALL(err = tcsetattr(fd, TCSANOW, &termios_tty));
- if (err == -1) {
- ErrorF("HyperPen tcsetattr TCSANOW error : %s\n", strerror(errno));
- return !Success;
- }
-#else
- Code for OSs without POSIX tty functions
-#endif
- return Success;
-}
-#endif /* Pre 3.9 stuff */
-
-#if !defined(sun) || defined(i386)
-/*
-** xf86HypConfig
-** Reads the HyperPen section from the XF86Config file
-*/
-static Bool
-xf86HypConfig(LocalDevicePtr *array, int inx, int max, LexPtr val)
-{
- LocalDevicePtr dev = array[inx];
- HyperPenDevicePtr priv = (HyperPenDevicePtr)(dev->private);
- int token;
- int mtoken;
-
- DBG(1, ErrorF("xf86HypConfig\n"));
-
- priv->AutoPT=1;
- priv->PMax=1000;
-
- while ((token = xf86GetToken(HypTab)) != ENDSUBSECTION) {
- switch(token) {
- case DEVICENAME:
- if (xf86GetToken(NULL) != STRING)
- xf86ConfigError("Option string expected");
- else {
- dev->name = strdup(val->str);
- if (xf86Verbose)
- ErrorF("%s HyperPen X device name is %s\n", XCONFIG_GIVEN,
- dev->name);
- }
- break;
-
- case PORT:
- if (xf86GetToken(NULL) != STRING)
- xf86ConfigError("Option string expected");
- else {
- priv->hypDevice = strdup(val->str);
- if (xf86Verbose)
- ErrorF("%s HyperPen port is %s\n", XCONFIG_GIVEN,
- priv->hypDevice);
- }
- break;
-
- case THE_MODE:
- mtoken = xf86GetToken(HypModeTabRec);
- if ((mtoken == EOF) || (mtoken == STRING) || (mtoken == NUMBER))
- xf86ConfigError("Mode type token expected");
- else {
- switch (mtoken) {
- case ABSOLUTE:
- priv->flags |= ABSOLUTE_FLAG;
- break;
- case RELATIVE:
- priv->flags &= ~ABSOLUTE_FLAG;
- break;
- default:
- xf86ConfigError("Illegal Mode type");
- break;
- }
- }
- break;
-
- case CURSOR:
- mtoken = xf86GetToken(HypPointTabRec);
- if ((mtoken == EOF) || (mtoken == STRING) || (mtoken == NUMBER))
- xf86ConfigError("Cursor token expected");
- else {
- switch (mtoken) {
- case STYLUS:
- priv->flags |= STYLUS_FLAG;
- break;
- case PUCK:
- priv->flags &= ~STYLUS_FLAG;
- break;
- default:
- xf86ConfigError("Illegal cursor type");
- break;
- }
- }
- break;
-
- case DEBUG_LEVEL:
- if (xf86GetToken(NULL) != NUMBER)
- xf86ConfigError("Option number expected");
- debug_level = val->num;
- if (xf86Verbose) {
-#if DEBUG
- ErrorF("%s HyperPen debug level set to %d\n", XCONFIG_GIVEN,
- debug_level);
-#else
- ErrorF("%s HyperPen debug level not set to %d because"
- " debugging is not compiled with the xf86HyperPen driver\n", XCONFIG_GIVEN,
- debug_level);
-#endif
- }
- break;
-
- case HISTORY_SIZE:
- if (xf86GetToken(NULL) != NUMBER)
- xf86ConfigError("Option number expected");
- dev->history_size = val->num;
- if (xf86Verbose)
- ErrorF("%s HyperPen Motion history size is %d\n", XCONFIG_GIVEN,
- dev->history_size);
- break;
-
- case ALWAYS_CORE:
- xf86AlwaysCore(dev, TRUE);
- if (xf86Verbose)
- ErrorF("%s HyperPen device always stays core pointer\n",
- XCONFIG_GIVEN);
- break;
-
- case ACTIVE_AREA:
- if (xf86GetToken(NULL) != NUMBER)
- xf86ConfigError("Option number expected");
- priv->hypXSize = val->realnum * 100;
- if (xf86GetToken(NULL) != NUMBER)
- xf86ConfigError("Option number expected");
- priv->hypYSize = val->realnum * 100;
- if (xf86Verbose)
- ErrorF("%s HyperPen active area: %d.%02dx%d.%02d"
- " inches\n", XCONFIG_GIVEN, priv->hypXSize / 100,
- priv->hypXSize % 100, priv->hypYSize / 100,
- priv->hypYSize % 100);
- break;
-
- case ACTIVE_OFFSET:
- if (xf86GetToken(NULL) != NUMBER)
- xf86ConfigError("Option number expected");
- priv->hypXOffset = val->realnum * 100;
- if (xf86GetToken(NULL) != NUMBER)
- xf86ConfigError("Option number expected");
- priv->hypYOffset = val->realnum * 100;
- if (xf86Verbose)
- ErrorF("%s HyperPen active area offsets: %d.%02d %d.%02d"
- " inches\n", XCONFIG_GIVEN, priv->hypXOffset / 100,
- priv->hypXOffset % 100, priv->hypYOffset / 100,
- priv->hypYOffset % 100);
- break;
- case INVX:
- priv->flags |= INVX_FLAG;
- break;
- case INVY:
- priv->flags |= INVY_FLAG;
- break;
- case BAUD_RATE:
- if (xf86GetToken(NULL) != NUMBER)
- xf86ConfigError("Option number expected");
- switch (val->num) {
- case 19200:
- priv->flags |= BAUD_19200_FLAG;
- break;
- case 9600:
- priv->flags &= ~BAUD_19200_FLAG;
- break;
- default:
- xf86ConfigError("Illegal speed value");
- break;
- }
- break;
- case PMIN:
- if (xf86GetToken(NULL) != NUMBER)
- xf86ConfigError("Option number expected");
- if (val->num < 2)
- xf86ConfigError("Illegal minimum pressure");
- else
- {
- priv->AutoPT = 0; /* desactivate auto threshold adjustment*/
- priv->PT = val->num;
- };
- break;
- case PMAX:
- if (xf86GetToken(NULL) != NUMBER)
- xf86ConfigError("Option number expected");
- if (val->num < 3)
- xf86ConfigError("Illegal maximum pressure");
- else
- priv->PMax = val->num;
- break;
- case EOF:
- FatalError("Unexpected EOF (missing EndSubSection)");
- break;
-
- default:
- xf86ConfigError("HyperPen subsection keyword expected");
- break;
- }
- }
-
- DBG(1, ErrorF("xf86HypConfig name=%s\n", priv->hypDevice));
-
- return Success;
-}
-#endif
-#endif /* pre 3.9 headers */
/*
** xf86HypConvert
@@ -876,10 +480,6 @@
xf86HypWriteAndRead(int fd, char *data, char *buffer, int len, int cr_term)
{
int err, numread = 0;
-#ifndef XFREE86_V4
- fd_set readfds;
- struct timeval timeout;
-#endif
SYSCALL(err = write(fd, data, strlen(data)));
if (err == -1) {
@@ -887,19 +487,8 @@
return NULL;
}
-#ifndef XFREE86_V4
- FD_ZERO(&readfds);
- FD_SET(fd, &readfds);
-#endif
while (numread < len) {
-#ifndef XFREE86_V4
- timeout.tv_sec = 0;
- timeout.tv_usec = 100000;
-
- SYSCALL(err = select(FD_SETSIZE, &readfds, NULL, NULL, &timeout));
-#else
err = xf86WaitForInput(fd, 100000);
-#endif
if (err == -1) {
Error("HyperPen select");
return NULL;
@@ -932,31 +521,16 @@
** Open and initialize the tablet, as well as probe for any needed data.
*/
-#ifdef XFREE86_V4
#define WAIT(t) \
err = xf86WaitForInput(-1, ((t) * 1000)); \
if (err == -1) { \
ErrorF("HyperPen select error : %s\n", strerror(errno)); \
return !Success; \
}
-#else
-#define WAIT(t) \
- timeout.tv_sec = 0; \
- timeout.tv_usec = (t) * 1000; \
- SYSCALL(err = select(0, NULL, NULL, NULL, &timeout)); \
- if (err == -1) { \
- ErrorF("HyperPen select error : %s\n", strerror(errno)); \
- return !Success; \
- }
-#endif
static Bool
xf86HypOpen(LocalDevicePtr local)
{
-#ifndef XFREE86_V4
- struct termios termios_tty;
- struct timeval timeout;
-#endif
char buffer[256];
int err, idx;
int i, n;
@@ -966,24 +540,15 @@
DBG(1, ErrorF("opening %s\n", priv->hypDevice));
-#ifdef XFREE86_V4
local->fd = xf86OpenSerial(local->options);
-#else
- SYSCALL(local->fd = open(priv->hypDevice, O_RDWR | O_NDELAY, 0));
-#endif
if (local->fd == -1) {
Error(priv->hypDevice);
return !Success;
}
DBG(2, ErrorF("%s opened as fd %d\n", priv->hypDevice, local->fd));
-#ifdef XFREE86_V4
if (xf86SetSerialSpeed(local->fd, 9600) < 0)
return !Success;
-#else
- if (set_serial_speed(local->fd, B9600) == !Success)
- return !Success;
-#endif
DBG(1, ErrorF("initializing HyperPen tablet\n"));
@@ -1113,14 +678,9 @@
WAIT(10);
/* Set the speed of the serial link to 19200 */
-#ifdef XFREE86_V4
if (xf86SetSerialSpeed(local->fd, 19200) < 0) {
return !Success;
}
-#else
- if (set_serial_speed(local->fd, B19200) == !Success)
- return !Success;
-#endif
DBG(6, ErrorF("set serial speed to 19200\n"));
}
@@ -1242,7 +802,9 @@
if (InitValuatorClassDeviceStruct(pHyp,
nbaxes,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
xf86GetMotionEvents,
+#endif
local->history_size,
(priv->flags & ABSOLUTE_FLAG)? Absolute: Relative)
== FALSE) {
@@ -1251,9 +813,6 @@
}
/* allocate the motion history buffer if needed */
xf86MotionHistoryAllocate(local);
-#ifndef XFREE86_V4
- AssignTypeAndName(pHyp, local->atom, local->name);
-#endif
/* open the device to gather informations */
xf86HypOpenDevice(pHyp);
break;
@@ -1264,11 +823,7 @@
if ((local->fd < 0) && (!xf86HypOpenDevice(pHyp))) {
return !Success;
}
-#ifdef XFREE86_V4
xf86AddEnabledDevice(local);
-#else
- AddEnabledDevice(local->fd);
-#endif
pHyp->public.on = TRUE;
break;
@@ -1276,11 +831,7 @@
DBG(1, ErrorF("xf86HypProc pHyp=%p what=%s\n", (void *)pHyp,
(what == DEVICE_CLOSE) ? "CLOSE" : "OFF"));
if (local->fd >= 0)
-#ifdef XFREE86_V4
xf86RemoveEnabledDevice(local);
-#else
- RemoveEnabledDevice(local->fd);
-#endif
pHyp->public.on = FALSE;
break;
@@ -1373,11 +924,7 @@
static LocalDevicePtr
xf86HypAllocate(void)
{
-#ifdef XFREE86_V4
LocalDevicePtr local = xf86AllocateInput(hypDrv, 0);
-#else
- LocalDevicePtr local = (LocalDevicePtr)xalloc(sizeof(LocalDeviceRec));
-#endif
HyperPenDevicePtr priv = (HyperPenDevicePtr)xalloc(sizeof(HyperPenDeviceRec));
#if defined (sun) && !defined(i386)
char *dev_name = getenv("HYPERPEN_DEV");
@@ -1386,11 +933,6 @@
local->name = XI_NAME;
local->type_name = "HyperPen Tablet";
local->flags = 0; /*XI86_NO_OPEN_ON_INIT;*/
-#ifndef XFREE86_V4
-#if !defined(sun) || defined(i386)
- local->device_config = xf86HypConfig;
-#endif
-#endif
local->device_control = xf86HypProc;
local->read_input = xf86HypReadInput;
local->control_proc = xf86HypChangeControl;
@@ -1434,85 +976,6 @@
return local;
}
-#ifndef XFREE86_V4
-
-/*
-** HyperPen device association
-** Device section name and allocation function.
-*/
-DeviceAssocRec hypmasketch_assoc =
-{
- HYPERPEN_SECTION_NAME, /* config_section_name */
- xf86HypAllocate /* device_allocate */
-};
-
-#ifdef DYNAMIC_MODULE
-/*
-** init_module
-** Entry point for dynamic module.
-*/
-int
-#ifndef DLSYM_BUG
-init_module(unsigned long server_version)
-#else
-init_xf86HyperPen(unsigned long server_version)
-#endif
-{
- xf86AddDeviceAssoc(&hypmasketch_assoc);
-
- if (server_version != XF86_VERSION_CURRENT) {
- ErrorF("Warning: HyperPen module compiled for version %s\n",
- XF86_VERSION);
- return 0;
- } else {
- return 1;
- }
-}
-#endif
-
-#ifdef XFree86LOADER
-/*
- * Entry point for the loader code
- */
-XF86ModuleVersionInfo xf86HyperPenVersion = {
- "hyperpen",
- MODULEVENDORSTRING,
- MODINFOSTRING1,
- MODINFOSTRING2,
- XORG_VERSION_CURRENT,
- 0x00010000,
- {0,0,0,0}
-};
-
-void
-xf86HyperPenModuleInit(data, magic)
- pointer *data;
- INT32 *magic;
-{
- static int cnt = 0;
-
- switch (cnt) {
- case 0:
- *magic = MAGIC_VERSION;
- *data = &xf86HyperPenVersion;
- cnt++;
- break;
-
- case 1:
- *magic = MAGIC_ADD_XINPUT_DEVICE;
- *data = &hypmasketch_assoc;
- cnt++;
- break;
-
- default:
- *magic = MAGIC_DONE;
- *data = NULL;
- break;
- }
-}
-#endif
-
-#else
/*
* xf86HypUninit --
@@ -1776,6 +1239,5 @@
};
#endif /* XFree86LOADER */
-#endif /* XFREE86_V4 */
/* end of xf86HyperPen.c */
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package virtualbox-ose for openSUSE:Factory
checked in at Fri Feb 27 16:24:23 CET 2009.
--------
--- virtualbox-ose/virtualbox-ose.changes 2009-02-24 16:47:33.000000000 +0100
+++ /mounts/work_src_done/STABLE/virtualbox-ose/virtualbox-ose.changes 2009-02-27 15:05:09.000000000 +0100
@@ -1,0 +2,13 @@
+Fri Feb 27 15:05:37 CET 2009 - suse-tux(a)gmx.de
+
+- added Patch18 (vbox-swab_2.6.29_header.diff) which disables vbox's swab.h file
+ and uses the one which is shipped with the recent linux-kernel-headers package
+ (former versions of this file weren't c++ compatible). Fixed factory build.
+
+-------------------------------------------------------------------
+Wed Feb 25 13:48:04 CET 2009 - suse-tux(a)gmx.de
+
+- removed the networking part from the README.SUSE file. There's no need
+ to create a bridge anymore.
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
vbox-swab_2.6.29_header.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ virtualbox-ose.spec ++++++
--- /var/tmp/diff_new_pack.DF4283/_old 2009-02-27 16:21:17.000000000 +0100
+++ /var/tmp/diff_new_pack.DF4283/_new 2009-02-27 16:21:17.000000000 +0100
@@ -59,7 +59,7 @@
#
ExclusiveArch: %ix86 x86_64
Version: 2.1.4
-Release: 1
+Release: 2
Summary: VirtualBox OSE is an Emulator
License: GPL v2 or later
Group: System/Emulators/PC
@@ -93,6 +93,7 @@
Patch14: vbox-kbuild_unit_paths.diff
Patch16: virtualbox-ose-disable-updates.diff
Patch17: virtualbox-ose-sudo-tmpdir.diff
+Patch18: vbox-swab_2.6.29_header.diff
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: pwdutils permissions
@@ -186,6 +187,9 @@
%patch14
%patch16
%patch17
+%if %suse_version >= 1110
+%patch18
+%endif
%__cp %{SOURCE7} .
%build
@@ -527,6 +531,13 @@
%{_datadir}/virtualbox/x11restore.pl
%changelog
+* Fri Feb 27 2009 suse-tux(a)gmx.de
+- added Patch18 (vbox-swab_2.6.29_header.diff) which disables vbox's swab.h file
+ and uses the one which is shipped with the recent linux-kernel-headers package
+ (former versions of this file weren't c++ compatible). Fixed factory build.
+* Wed Feb 25 2009 suse-tux(a)gmx.de
+- removed the networking part from the README.SUSE file. There's no need
+ to create a bridge anymore.
* Tue Feb 24 2009 dmueller(a)suse.de
- merge with factory
* Tue Feb 24 2009 suse-tux(a)gmx.de
++++++ README.SUSE ++++++
--- /var/tmp/diff_new_pack.DF4283/_old 2009-02-27 16:21:17.000000000 +0100
+++ /var/tmp/diff_new_pack.DF4283/_new 2009-02-27 16:21:17.000000000 +0100
@@ -34,15 +34,3 @@
The guest additions for Windows are available at:
http://code.google.com/p/virtual-box-windows-guest-additions-installer/
-
-NETWORKING
-
- Virtualbox network init script vboxnet should be loaded automaticaly
- in runlevels 3 and 5
-
- Use yast network device module to create a bridge interface (br0), add
- your real network interface (eth0) into it. Configure eth0
- as 0.0.0.0/255.255.255.0 .
-
- Use: VBoxAddIF vbox0 <username> br0 to create a virtual interface and
- configure your virtual machine to use vbox0 interface.
++++++ vbox-swab_2.6.29_header.diff ++++++
Index: src/VBox/Devices/Storage/swab.h
===================================================================
--- src/VBox/Devices/Storage/swab.h.orig
+++ src/VBox/Devices/Storage/swab.h
@@ -29,6 +29,12 @@
* additional information or have any questions.
*/
+/* the swab.h from the recent linux-kernel-headers package seems to
+ be c++ compatible
+*/
+
+#if 0
+
#ifndef _VBOX_LINUX_SWAB_H
#define _VBOX_LINUX_SWAB_H
@@ -62,3 +68,4 @@ static __inline__ __u64 __swab64p(const
}
#endif /* _VBOX_LINUX_SWAB_H */
+#endif /* 0 */
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package psi for openSUSE:Factory
checked in at Fri Feb 27 16:15:57 CET 2009.
--------
--- psi/psi.changes 2008-11-19 16:50:39.000000000 +0100
+++ /mounts/work_src_done/STABLE/psi/psi.changes 2009-02-27 15:47:09.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Feb 27 15:46:58 CET 2009 - prusnak(a)suse.cz
+
+- updated to 0.12.1
+ * Bugfix for DOS vulnerability in the file transfer code.
+ Thanks to Jesus Olmos (jolmos(a)isecauditors.com)
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
psi-0.12-delete.patch
psi-0.12.tar.bz2
New:
----
psi-0.12.1-delete.patch
psi-0.12.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ psi.spec ++++++
--- /var/tmp/diff_new_pack.l29690/_old 2009-02-27 16:15:49.000000000 +0100
+++ /var/tmp/diff_new_pack.l29690/_new 2009-02-27 16:15:49.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package psi (Version 0.12)
+# spec file for package psi (Version 0.12.1)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,8 +22,8 @@
Url: http://psi-im.org/
License: GPL v2 or later
Group: Productivity/Networking/Talk/Clients
-Version: 0.12
-Release: 28
+Version: 0.12.1
+Release: 1
Summary: PSI Jabber client using Qt
Source: http://downloads.sourceforge.net/psi/%{name}-%{version}.tar.bz2
Source1: http://psi-im.org/download/lang/psi_cs.qm
@@ -127,6 +127,10 @@
# %lang(zh_TW) %{_datadir}/psi/*_zh_TW.qm
%changelog
+* Fri Feb 27 2009 prusnak(a)suse.cz
+- updated to 0.12.1
+ * Bugfix for DOS vulnerability in the file transfer code.
+ Thanks to Jesus Olmos (jolmos(a)isecauditors.com)
* Wed Nov 19 2008 prusnak(a)suse.cz
- fix wrong delete usage (delete.patch) [bnc#445429]
* Tue Oct 07 2008 prusnak(a)suse.cz
++++++ psi-0.12-delete.patch -> psi-0.12.1-delete.patch ++++++
++++++ psi-0.12.tar.bz2 -> psi-0.12.1.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/psi-0.12/cutestuff/network/socks.cpp new/psi-0.12.1/cutestuff/network/socks.cpp
--- old/psi-0.12/cutestuff/network/socks.cpp 2007-05-13 21:35:04.000000000 +0200
+++ new/psi-0.12.1/cutestuff/network/socks.cpp 2008-12-17 18:46:31.000000000 +0100
@@ -261,7 +261,8 @@
return -1;
if(from->size() < 2)
return 0;
- int num = from->at(1);
+ unsigned char mlen = from->at(1);
+ int num = mlen;
if(num > 16) // who the heck has over 16 auth methods??
return -1;
if(from->size() < 2 + num)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/psi-0.12/cutestuff/network/socks.cpp.orig new/psi-0.12.1/cutestuff/network/socks.cpp.orig
--- old/psi-0.12/cutestuff/network/socks.cpp.orig 1970-01-01 01:00:00.000000000 +0100
+++ new/psi-0.12.1/cutestuff/network/socks.cpp.orig 2008-12-17 18:33:45.000000000 +0100
@@ -0,0 +1,1231 @@
+/*
+ * socks.cpp - SOCKS5 TCP proxy client/server
+ * Copyright (C) 2003 Justin Karneges
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include "socks.h"
+
+#include <qhostaddress.h>
+#include <qstringlist.h>
+#include <q3ptrlist.h>
+#include <qtimer.h>
+#include <qpointer.h>
+#include <q3socketdevice.h>
+#include <qsocketnotifier.h>
+//Added by qt3to4:
+#include <Q3CString>
+
+#ifdef Q_OS_UNIX
+#include <sys/types.h>
+#include <netinet/in.h>
+#endif
+
+#ifdef Q_OS_WIN32
+#include <windows.h>
+#endif
+
+#ifdef Q_OS_UNIX
+#include <unistd.h>
+#include <fcntl.h>
+#endif
+
+#include "servsock.h"
+#include "bsocket.h"
+
+#ifdef PROX_DEBUG
+#include <stdio.h>
+#endif
+
+// CS_NAMESPACE_BEGIN
+
+//----------------------------------------------------------------------------
+// SocksUDP
+//----------------------------------------------------------------------------
+static QByteArray sp_create_udp(const QString &host, Q_UINT16 port, const QByteArray &buf)
+{
+ // detect for IP addresses
+ //QHostAddress addr;
+ //if(addr.setAddress(host))
+ // return sp_set_request(addr, port, cmd1);
+
+ Q3CString h = host.utf8();
+ h.truncate(255);
+ h = QString::fromUtf8(h).utf8(); // delete any partial characters?
+ int hlen = h.length();
+
+ int at = 0;
+ QByteArray a(4);
+ a[at++] = 0x00; // reserved
+ a[at++] = 0x00; // reserved
+ a[at++] = 0x00; // frag
+ a[at++] = 0x03; // address type = domain
+
+ // host
+ a.resize(at+hlen+1);
+ a[at++] = hlen;
+ memcpy(a.data() + at, h.data(), hlen);
+ at += hlen;
+
+ // port
+ a.resize(at+2);
+ unsigned short p = htons(port);
+ memcpy(a.data() + at, &p, 2);
+ at += 2;
+
+ a.resize(at+buf.size());
+ memcpy(a.data() + at, buf.data(), buf.size());
+
+ return a;
+}
+
+struct SPS_UDP
+{
+ QString host;
+ Q_UINT16 port;
+ QByteArray data;
+};
+
+static int sp_read_udp(QByteArray *from, SPS_UDP *s)
+{
+ int full_len = 4;
+ if((int)from->size() < full_len)
+ return 0;
+
+ QString host;
+ QHostAddress addr;
+ unsigned char atype = from->at(3);
+
+ if(atype == 0x01) {
+ full_len += 4;
+ if((int)from->size() < full_len)
+ return 0;
+ Q_UINT32 ip4;
+ memcpy(&ip4, from->data() + 4, 4);
+ addr.setAddress(ntohl(ip4));
+ host = addr.toString();
+ }
+ else if(atype == 0x03) {
+ ++full_len;
+ if((int)from->size() < full_len)
+ return 0;
+ unsigned char host_len = from->at(4);
+ full_len += host_len;
+ if((int)from->size() < full_len)
+ return 0;
+ Q3CString cs(host_len+1);
+ memcpy(cs.data(), from->data() + 5, host_len);
+ host = QString::fromLatin1(cs);
+ }
+ else if(atype == 0x04) {
+ full_len += 16;
+ if((int)from->size() < full_len)
+ return 0;
+ Q_UINT8 a6[16];
+ memcpy(a6, from->data() + 4, 16);
+ addr.setAddress(a6);
+ host = addr.toString();
+ }
+
+ full_len += 2;
+ if((int)from->size() < full_len)
+ return 0;
+
+ Q_UINT16 p;
+ memcpy(&p, from->data() + full_len - 2, 2);
+
+ s->host = host;
+ s->port = ntohs(p);
+ s->data.resize(from->size() - full_len);
+ memcpy(s->data.data(), from->data() + full_len, s->data.size());
+
+ return 1;
+}
+
+class SocksUDP::Private
+{
+public:
+ Q3SocketDevice *sd;
+ QSocketNotifier *sn;
+ SocksClient *sc;
+ QHostAddress routeAddr;
+ int routePort;
+ QString host;
+ int port;
+};
+
+SocksUDP::SocksUDP(SocksClient *sc, const QString &host, int port, const QHostAddress &routeAddr, int routePort)
+:QObject(sc)
+{
+ d = new Private;
+ d->sc = sc;
+ d->sd = new Q3SocketDevice(Q3SocketDevice::Datagram);
+ d->sd->setBlocking(false);
+ d->sn = new QSocketNotifier(d->sd->socket(), QSocketNotifier::Read);
+ connect(d->sn, SIGNAL(activated(int)), SLOT(sn_activated(int)));
+ d->host = host;
+ d->port = port;
+ d->routeAddr = routeAddr;
+ d->routePort = routePort;
+}
+
+SocksUDP::~SocksUDP()
+{
+ delete d->sn;
+ delete d->sd;
+ delete d;
+}
+
+void SocksUDP::change(const QString &host, int port)
+{
+ d->host = host;
+ d->port = port;
+}
+
+void SocksUDP::write(const QByteArray &data)
+{
+ QByteArray buf = sp_create_udp(d->host, d->port, data);
+ d->sd->setBlocking(true);
+ d->sd->writeBlock(buf.data(), buf.size(), d->routeAddr, d->routePort);
+ d->sd->setBlocking(false);
+}
+
+void SocksUDP::sn_activated(int)
+{
+ QByteArray buf(8192);
+ int actual = d->sd->readBlock(buf.data(), buf.size());
+ buf.resize(actual);
+ packetReady(buf);
+}
+
+//----------------------------------------------------------------------------
+// SocksClient
+//----------------------------------------------------------------------------
+#define REQ_CONNECT 0x01
+#define REQ_BIND 0x02
+#define REQ_UDPASSOCIATE 0x03
+
+#define RET_SUCCESS 0x00
+#define RET_UNREACHABLE 0x04
+#define RET_CONNREFUSED 0x05
+
+// spc = socks packet client
+// sps = socks packet server
+// SPCS = socks packet client struct
+// SPSS = socks packet server struct
+
+// Version
+static QByteArray spc_set_version()
+{
+ QByteArray ver(4);
+ ver[0] = 0x05; // socks version 5
+ ver[1] = 0x02; // number of methods
+ ver[2] = 0x00; // no-auth
+ ver[3] = 0x02; // username
+ return ver;
+}
+
+static QByteArray sps_set_version(int method)
+{
+ QByteArray ver(2);
+ ver[0] = 0x05;
+ ver[1] = method;
+ return ver;
+}
+
+struct SPCS_VERSION
+{
+ unsigned char version;
+ QByteArray methodList;
+};
+
+static int spc_get_version(QByteArray *from, SPCS_VERSION *s)
+{
+ if(from->size() < 1)
+ return 0;
+ if(from->at(0) != 0x05) // only SOCKS5 supported
+ return -1;
+ if(from->size() < 2)
+ return 0;
+ int num = from->at(1);
+ if(num > 16) // who the heck has over 16 auth methods??
+ return -1;
+ if(from->size() < 2 + num)
+ return 0;
+ QByteArray a = ByteStream::takeArray(from, 2+num);
+ s->version = a[0];
+ s->methodList.resize(num);
+ memcpy(s->methodList.data(), a.data() + 2, num);
+ return 1;
+}
+
+struct SPSS_VERSION
+{
+ unsigned char version;
+ unsigned char method;
+};
+
+static int sps_get_version(QByteArray *from, SPSS_VERSION *s)
+{
+ if(from->size() < 2)
+ return 0;
+ QByteArray a = ByteStream::takeArray(from, 2);
+ s->version = a[0];
+ s->method = a[1];
+ return 1;
+}
+
+// authUsername
+static QByteArray spc_set_authUsername(const Q3CString &user, const Q3CString &pass)
+{
+ int len1 = user.length();
+ int len2 = pass.length();
+ if(len1 > 255)
+ len1 = 255;
+ if(len2 > 255)
+ len2 = 255;
+ QByteArray a(1+1+len1+1+len2);
+ a[0] = 0x01; // username auth version 1
+ a[1] = len1;
+ memcpy(a.data() + 2, user.data(), len1);
+ a[2+len1] = len2;
+ memcpy(a.data() + 3 + len1, pass.data(), len2);
+ return a;
+}
+
+static QByteArray sps_set_authUsername(bool success)
+{
+ QByteArray a(2);
+ a[0] = 0x01;
+ a[1] = success ? 0x00 : 0xff;
+ return a;
+}
+
+struct SPCS_AUTHUSERNAME
+{
+ QString user, pass;
+};
+
+static int spc_get_authUsername(QByteArray *from, SPCS_AUTHUSERNAME *s)
+{
+ if(from->size() < 1)
+ return 0;
+ unsigned char ver = from->at(0);
+ if(ver != 0x01)
+ return -1;
+ if(from->size() < 2)
+ return 0;
+ unsigned char ulen = from->at(1);
+ if((int)from->size() < ulen + 3)
+ return 0;
+ unsigned char plen = from->at(ulen+2);
+ if((int)from->size() < ulen + plen + 3)
+ return 0;
+ QByteArray a = ByteStream::takeArray(from, ulen + plen + 3);
+
+ Q3CString user, pass;
+ user.resize(ulen+1);
+ pass.resize(plen+1);
+ memcpy(user.data(), a.data()+2, ulen);
+ memcpy(pass.data(), a.data()+ulen+3, plen);
+ s->user = QString::fromUtf8(user);
+ s->pass = QString::fromUtf8(pass);
+ return 1;
+}
+
+struct SPSS_AUTHUSERNAME
+{
+ unsigned char version;
+ bool success;
+};
+
+static int sps_get_authUsername(QByteArray *from, SPSS_AUTHUSERNAME *s)
+{
+ if(from->size() < 2)
+ return 0;
+ QByteArray a = ByteStream::takeArray(from, 2);
+ s->version = a[0];
+ s->success = ((char) a[1] == 0 ? true: false);
+ return 1;
+}
+
+// connectRequest
+static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port, unsigned char cmd1)
+{
+ int at = 0;
+ QByteArray a(4);
+ a[at++] = 0x05; // socks version 5
+ a[at++] = cmd1;
+ a[at++] = 0x00; // reserved
+ if(addr.isIp4Addr()) {
+ a[at++] = 0x01; // address type = ipv4
+ Q_UINT32 ip4 = htonl(addr.ip4Addr());
+ a.resize(at+4);
+ memcpy(a.data() + at, &ip4, 4);
+ at += 4;
+ }
+ else {
+ a[at++] = 0x04;
+ Q_UINT8 a6[16];
+ QStringList s6 = QStringList::split(':', addr.toString(), true);
+ int at = 0;
+ Q_UINT16 c;
+ bool ok;
+ for(QStringList::ConstIterator it = s6.begin(); it != s6.end(); ++it) {
+ c = (*it).toInt(&ok, 16);
+ a6[at++] = (c >> 8);
+ a6[at++] = c & 0xff;
+ }
+ a.resize(at+16);
+ memcpy(a.data() + at, a6, 16);
+ at += 16;
+ }
+
+ // port
+ a.resize(at+2);
+ unsigned short p = htons(port);
+ memcpy(a.data() + at, &p, 2);
+
+ return a;
+}
+
+static QByteArray sp_set_request(const QString &host, Q_UINT16 port, unsigned char cmd1)
+{
+ // detect for IP addresses
+ QHostAddress addr;
+ if(addr.setAddress(host))
+ return sp_set_request(addr, port, cmd1);
+
+ Q3CString h = host.utf8();
+ h.truncate(255);
+ h = QString::fromUtf8(h).utf8(); // delete any partial characters?
+ int hlen = h.length();
+
+ int at = 0;
+ QByteArray a(4);
+ a[at++] = 0x05; // socks version 5
+ a[at++] = cmd1;
+ a[at++] = 0x00; // reserved
+ a[at++] = 0x03; // address type = domain
+
+ // host
+ a.resize(at+hlen+1);
+ a[at++] = hlen;
+ memcpy(a.data() + at, h.data(), hlen);
+ at += hlen;
+
+ // port
+ a.resize(at+2);
+ unsigned short p = htons(port);
+ memcpy(a.data() + at, &p, 2);
+
+ return a;
+}
+
+struct SPS_CONNREQ
+{
+ unsigned char version;
+ unsigned char cmd;
+ int address_type;
+ QString host;
+ QHostAddress addr;
+ Q_UINT16 port;
+};
+
+static int sp_get_request(QByteArray *from, SPS_CONNREQ *s)
+{
+ int full_len = 4;
+ if((int)from->size() < full_len)
+ return 0;
+
+ QString host;
+ QHostAddress addr;
+ unsigned char atype = from->at(3);
+
+ if(atype == 0x01) {
+ full_len += 4;
+ if((int)from->size() < full_len)
+ return 0;
+ Q_UINT32 ip4;
+ memcpy(&ip4, from->data() + 4, 4);
+ addr.setAddress(ntohl(ip4));
+ }
+ else if(atype == 0x03) {
+ ++full_len;
+ if((int)from->size() < full_len)
+ return 0;
+ unsigned char host_len = from->at(4);
+ full_len += host_len;
+ if((int)from->size() < full_len)
+ return 0;
+ Q3CString cs(host_len+1);
+ memcpy(cs.data(), from->data() + 5, host_len);
+ host = QString::fromLatin1(cs);
+ }
+ else if(atype == 0x04) {
+ full_len += 16;
+ if((int)from->size() < full_len)
+ return 0;
+ Q_UINT8 a6[16];
+ memcpy(a6, from->data() + 4, 16);
+ addr.setAddress(a6);
+ }
+
+ full_len += 2;
+ if((int)from->size() < full_len)
+ return 0;
+
+ QByteArray a = ByteStream::takeArray(from, full_len);
+
+ Q_UINT16 p;
+ memcpy(&p, a.data() + full_len - 2, 2);
+
+ s->version = a[0];
+ s->cmd = a[1];
+ s->address_type = atype;
+ s->host = host;
+ s->addr = addr;
+ s->port = ntohs(p);
+
+ return 1;
+}
+
+enum { StepVersion, StepAuth, StepRequest };
+
+class SocksClient::Private
+{
+public:
+ Private() {}
+
+ BSocket sock;
+ QString host;
+ int port;
+ QString user, pass;
+ QString real_host;
+ int real_port;
+
+ QByteArray recvBuf;
+ bool active;
+ int step;
+ int authMethod;
+ bool incoming, waiting;
+
+ QString rhost;
+ int rport;
+
+ int pending;
+
+ bool udp;
+ QString udpAddr;
+ int udpPort;
+};
+
+SocksClient::SocksClient(QObject *parent)
+:ByteStream(parent)
+{
+ init();
+
+ d->incoming = false;
+}
+
+SocksClient::SocksClient(int s, QObject *parent)
+:ByteStream(parent)
+{
+ init();
+
+ d->incoming = true;
+ d->waiting = true;
+ d->sock.setSocket(s);
+}
+
+void SocksClient::init()
+{
+ d = new Private;
+ connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected()));
+ connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
+ connect(&d->sock, SIGNAL(delayedCloseFinished()), SLOT(sock_delayedCloseFinished()));
+ connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
+ connect(&d->sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int)));
+ connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int)));
+
+ reset(true);
+}
+
+SocksClient::~SocksClient()
+{
+ reset(true);
+ delete d;
+}
+
+void SocksClient::reset(bool clear)
+{
+ if(d->sock.state() != BSocket::Idle)
+ d->sock.close();
+ if(clear)
+ clearReadBuffer();
+ d->recvBuf.resize(0);
+ d->active = false;
+ d->waiting = false;
+ d->udp = false;
+ d->pending = 0;
+}
+
+bool SocksClient::isIncoming() const
+{
+ return d->incoming;
+}
+
+void SocksClient::setAuth(const QString &user, const QString &pass)
+{
+ d->user = user;
+ d->pass = pass;
+}
+
+void SocksClient::connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port, bool udpMode)
+{
+ reset(true);
+
+ d->host = proxyHost;
+ d->port = proxyPort;
+ d->real_host = host;
+ d->real_port = port;
+ d->udp = udpMode;
+
+#ifdef PROX_DEBUG
+ fprintf(stderr, "SocksClient: Connecting to %s:%d", proxyHost.latin1(), proxyPort);
+ if(d->user.isEmpty())
+ fprintf(stderr, "\n");
+ else
+ fprintf(stderr, ", auth {%s,%s}\n", d->user.latin1(), d->pass.latin1());
+#endif
+ d->sock.connectToHost(d->host, d->port);
+}
+
+bool SocksClient::isOpen() const
+{
+ return d->active;
+}
+
+void SocksClient::close()
+{
+ d->sock.close();
+ if(d->sock.bytesToWrite() == 0)
+ reset();
+}
+
+void SocksClient::writeData(const QByteArray &buf)
+{
+ d->pending += buf.size();
+ d->sock.write(buf);
+}
+
+void SocksClient::write(const QByteArray &buf)
+{
+ if(d->active && !d->udp)
+ d->sock.write(buf);
+}
+
+QByteArray SocksClient::read(int bytes)
+{
+ return ByteStream::read(bytes);
+}
+
+int SocksClient::bytesAvailable() const
+{
+ return ByteStream::bytesAvailable();
+}
+
+int SocksClient::bytesToWrite() const
+{
+ if(d->active)
+ return d->sock.bytesToWrite();
+ else
+ return 0;
+}
+
+void SocksClient::sock_connected()
+{
+#ifdef PROX_DEBUG
+ fprintf(stderr, "SocksClient: Connected\n");
+#endif
+
+ d->step = StepVersion;
+ writeData(spc_set_version());
+}
+
+void SocksClient::sock_connectionClosed()
+{
+ if(d->active) {
+ reset();
+ connectionClosed();
+ }
+ else {
+ error(ErrProxyNeg);
+ }
+}
+
+void SocksClient::sock_delayedCloseFinished()
+{
+ if(d->active) {
+ reset();
+ delayedCloseFinished();
+ }
+}
+
+void SocksClient::sock_readyRead()
+{
+ QByteArray block = d->sock.read();
+
+ if(!d->active) {
+ if(d->incoming)
+ processIncoming(block);
+ else
+ processOutgoing(block);
+ }
+ else {
+ if(!d->udp) {
+ appendRead(block);
+ readyRead();
+ }
+ }
+}
+
+void SocksClient::processOutgoing(const QByteArray &block)
+{
+#ifdef PROX_DEBUG
+ // show hex
+ fprintf(stderr, "SocksClient: client recv { ");
+ for(int n = 0; n < (int)block.size(); ++n)
+ fprintf(stderr, "%02X ", (unsigned char)block[n]);
+ fprintf(stderr, " } \n");
+#endif
+ ByteStream::appendArray(&d->recvBuf, block);
+
+ if(d->step == StepVersion) {
+ SPSS_VERSION s;
+ int r = sps_get_version(&d->recvBuf, &s);
+ if(r == -1) {
+ reset(true);
+ error(ErrProxyNeg);
+ return;
+ }
+ else if(r == 1) {
+ if(s.version != 0x05 || s.method == 0xff) {
+#ifdef PROX_DEBUG
+ fprintf(stderr, "SocksClient: Method selection failed\n");
+#endif
+ reset(true);
+ error(ErrProxyNeg);
+ return;
+ }
+
+ QString str;
+ if(s.method == 0x00) {
+ str = "None";
+ d->authMethod = AuthNone;
+ }
+ else if(s.method == 0x02) {
+ str = "Username/Password";
+ d->authMethod = AuthUsername;
+ }
+ else {
+#ifdef PROX_DEBUG
+ fprintf(stderr, "SocksClient: Server wants to use unknown method '%02x'\n", s.method);
+#endif
+ reset(true);
+ error(ErrProxyNeg);
+ return;
+ }
+
+ if(d->authMethod == AuthNone) {
+ // no auth, go straight to the request
+ do_request();
+ }
+ else if(d->authMethod == AuthUsername) {
+ d->step = StepAuth;
+#ifdef PROX_DEBUG
+ fprintf(stderr, "SocksClient: Authenticating [Username] ...\n");
+#endif
+ writeData(spc_set_authUsername(d->user.latin1(), d->pass.latin1()));
+ }
+ }
+ }
+ if(d->step == StepAuth) {
+ if(d->authMethod == AuthUsername) {
+ SPSS_AUTHUSERNAME s;
+ int r = sps_get_authUsername(&d->recvBuf, &s);
+ if(r == -1) {
+ reset(true);
+ error(ErrProxyNeg);
+ return;
+ }
+ else if(r == 1) {
+ if(s.version != 0x01) {
+ reset(true);
+ error(ErrProxyNeg);
+ return;
+ }
+ if(!s.success) {
+ reset(true);
+ error(ErrProxyAuth);
+ return;
+ }
+
+ do_request();
+ }
+ }
+ }
+ else if(d->step == StepRequest) {
+ SPS_CONNREQ s;
+ int r = sp_get_request(&d->recvBuf, &s);
+ if(r == -1) {
+ reset(true);
+ error(ErrProxyNeg);
+ return;
+ }
+ else if(r == 1) {
+ if(s.cmd != RET_SUCCESS) {
+#ifdef PROX_DEBUG
+ fprintf(stderr, "SocksClient: client << Error >> [%02x]\n", s.cmd);
+#endif
+ reset(true);
+ if(s.cmd == RET_UNREACHABLE)
+ error(ErrHostNotFound);
+ else if(s.cmd == RET_CONNREFUSED)
+ error(ErrConnectionRefused);
+ else
+ error(ErrProxyNeg);
+ return;
+ }
+
+#ifdef PROX_DEBUG
+ fprintf(stderr, "SocksClient: client << Success >>\n");
+#endif
+ if(d->udp) {
+ if(s.address_type == 0x03)
+ d->udpAddr = s.host;
+ else
+ d->udpAddr = s.addr.toString();
+ d->udpPort = s.port;
+ }
+
+ d->active = true;
+
+ QPointer<QObject> self = this;
+ connected();
+ if(!self)
+ return;
+
+ if(!d->recvBuf.isEmpty()) {
+ appendRead(d->recvBuf);
+ d->recvBuf.resize(0);
+ readyRead();
+ }
+ }
+ }
+}
+
+void SocksClient::do_request()
+{
+#ifdef PROX_DEBUG
+ fprintf(stderr, "SocksClient: Requesting ...\n");
+#endif
+ d->step = StepRequest;
+ int cmd = d->udp ? REQ_UDPASSOCIATE : REQ_CONNECT;
+ QByteArray buf;
+ if(!d->real_host.isEmpty())
+ buf = sp_set_request(d->real_host, d->real_port, cmd);
+ else
+ buf = sp_set_request(QHostAddress(), 0, cmd);
+ writeData(buf);
+}
+
+void SocksClient::sock_bytesWritten(int x)
+{
+ int bytes = x;
+ if(d->pending >= bytes) {
+ d->pending -= bytes;
+ bytes = 0;
+ }
+ else {
+ bytes -= d->pending;
+ d->pending = 0;
+ }
+ if(bytes > 0)
+ bytesWritten(bytes);
+}
+
+void SocksClient::sock_error(int x)
+{
+ if(d->active) {
+ reset();
+ error(ErrRead);
+ }
+ else {
+ reset(true);
+ if(x == BSocket::ErrHostNotFound)
+ error(ErrProxyConnect);
+ else if(x == BSocket::ErrConnectionRefused)
+ error(ErrProxyConnect);
+ else if(x == BSocket::ErrRead)
+ error(ErrProxyNeg);
+ }
+}
+
+void SocksClient::serve()
+{
+ d->waiting = false;
+ d->step = StepVersion;
+ continueIncoming();
+}
+
+void SocksClient::processIncoming(const QByteArray &block)
+{
+#ifdef PROX_DEBUG
+ // show hex
+ fprintf(stderr, "SocksClient: server recv { ");
+ for(int n = 0; n < (int)block.size(); ++n)
+ fprintf(stderr, "%02X ", (unsigned char)block[n]);
+ fprintf(stderr, " } \n");
+#endif
+ ByteStream::appendArray(&d->recvBuf, block);
+
+ if(!d->waiting)
+ continueIncoming();
+}
+
+void SocksClient::continueIncoming()
+{
+ if(d->recvBuf.isEmpty())
+ return;
+
+ if(d->step == StepVersion) {
+ SPCS_VERSION s;
+ int r = spc_get_version(&d->recvBuf, &s);
+ if(r == -1) {
+ reset(true);
+ error(ErrProxyNeg);
+ return;
+ }
+ else if(r == 1) {
+ if(s.version != 0x05) {
+ reset(true);
+ error(ErrProxyNeg);
+ return;
+ }
+
+ int methods = 0;
+ for(int n = 0; n < (int)s.methodList.size(); ++n) {
+ unsigned char c = s.methodList[n];
+ if(c == 0x00)
+ methods |= AuthNone;
+ else if(c == 0x02)
+ methods |= AuthUsername;
+ }
+ d->waiting = true;
+ incomingMethods(methods);
+ }
+ }
+ else if(d->step == StepAuth) {
+ SPCS_AUTHUSERNAME s;
+ int r = spc_get_authUsername(&d->recvBuf, &s);
+ if(r == -1) {
+ reset(true);
+ error(ErrProxyNeg);
+ return;
+ }
+ else if(r == 1) {
+ d->waiting = true;
+ incomingAuth(s.user, s.pass);
+ }
+ }
+ else if(d->step == StepRequest) {
+ SPS_CONNREQ s;
+ int r = sp_get_request(&d->recvBuf, &s);
+ if(r == -1) {
+ reset(true);
+ error(ErrProxyNeg);
+ return;
+ }
+ else if(r == 1) {
+ d->waiting = true;
+ if(s.cmd == REQ_CONNECT) {
+ if(!s.host.isEmpty())
+ d->rhost = s.host;
+ else
+ d->rhost = s.addr.toString();
+ d->rport = s.port;
+ incomingConnectRequest(d->rhost, d->rport);
+ }
+ else if(s.cmd == REQ_UDPASSOCIATE) {
+ incomingUDPAssociateRequest();
+ }
+ else {
+ requestDeny();
+ return;
+ }
+ }
+ }
+}
+
+void SocksClient::chooseMethod(int method)
+{
+ if(d->step != StepVersion || !d->waiting)
+ return;
+
+ unsigned char c;
+ if(method == AuthNone) {
+ d->step = StepRequest;
+ c = 0x00;
+ }
+ else {
+ d->step = StepAuth;
+ c = 0x02;
+ }
+
+ // version response
+ d->waiting = false;
+ writeData(sps_set_version(c));
+ continueIncoming();
+}
+
+void SocksClient::authGrant(bool b)
+{
+ if(d->step != StepAuth || !d->waiting)
+ return;
+
+ if(b)
+ d->step = StepRequest;
+
+ // auth response
+ d->waiting = false;
+ writeData(sps_set_authUsername(b));
+ if(!b) {
+ reset(true);
+ return;
+ }
+ continueIncoming();
+}
+
+void SocksClient::requestDeny()
+{
+ if(d->step != StepRequest || !d->waiting)
+ return;
+
+ // response
+ d->waiting = false;
+ writeData(sp_set_request(d->rhost, d->rport, RET_UNREACHABLE));
+ reset(true);
+}
+
+void SocksClient::grantConnect()
+{
+ if(d->step != StepRequest || !d->waiting)
+ return;
+
+ // response
+ d->waiting = false;
+ writeData(sp_set_request(d->rhost, d->rport, RET_SUCCESS));
+ d->active = true;
+#ifdef PROX_DEBUG
+ fprintf(stderr, "SocksClient: server << Success >>\n");
+#endif
+
+ if(!d->recvBuf.isEmpty()) {
+ appendRead(d->recvBuf);
+ d->recvBuf.resize(0);
+ readyRead();
+ }
+}
+
+void SocksClient::grantUDPAssociate(const QString &relayHost, int relayPort)
+{
+ if(d->step != StepRequest || !d->waiting)
+ return;
+
+ // response
+ d->waiting = false;
+ writeData(sp_set_request(relayHost, relayPort, RET_SUCCESS));
+ d->udp = true;
+ d->active = true;
+#ifdef PROX_DEBUG
+ fprintf(stderr, "SocksClient: server << Success >>\n");
+#endif
+
+ if(!d->recvBuf.isEmpty())
+ d->recvBuf.resize(0);
+}
+
+QHostAddress SocksClient::peerAddress() const
+{
+ return d->sock.peerAddress();
+}
+
+Q_UINT16 SocksClient::peerPort() const
+{
+ return d->sock.peerPort();
+}
+
+QString SocksClient::udpAddress() const
+{
+ return d->udpAddr;
+}
+
+Q_UINT16 SocksClient::udpPort() const
+{
+ return d->udpPort;
+}
+
+SocksUDP *SocksClient::createUDP(const QString &host, int port, const QHostAddress &routeAddr, int routePort)
+{
+ return new SocksUDP(this, host, port, routeAddr, routePort);
+}
+
+//----------------------------------------------------------------------------
+// SocksServer
+//----------------------------------------------------------------------------
+class SocksServer::Private
+{
+public:
+ Private() {}
+
+ ServSock serv;
+ Q3PtrList<SocksClient> incomingConns;
+ Q3SocketDevice *sd;
+ QSocketNotifier *sn;
+};
+
+SocksServer::SocksServer(QObject *parent)
+:QObject(parent)
+{
+ d = new Private;
+ d->sd = 0;
+ d->sn = 0;
+ connect(&d->serv, SIGNAL(connectionReady(int)), SLOT(connectionReady(int)));
+}
+
+SocksServer::~SocksServer()
+{
+ stop();
+ d->incomingConns.setAutoDelete(true);
+ d->incomingConns.clear();
+ delete d;
+}
+
+bool SocksServer::isActive() const
+{
+ return d->serv.isActive();
+}
+
+bool SocksServer::listen(Q_UINT16 port, bool udp)
+{
+ stop();
+ if(!d->serv.listen(port))
+ return false;
+ if(udp) {
+ d->sd = new Q3SocketDevice(Q3SocketDevice::Datagram);
+#ifdef Q_OS_UNIX
+ ::fcntl(d->sd->socket(), F_SETFD, FD_CLOEXEC);
+#endif
+ d->sd->setBlocking(false);
+ if(!d->sd->bind(QHostAddress(), port)) {
+ delete d->sd;
+ d->sd = 0;
+ d->serv.stop();
+ return false;
+ }
+ d->sn = new QSocketNotifier(d->sd->socket(), QSocketNotifier::Read);
+ connect(d->sn, SIGNAL(activated(int)), SLOT(sn_activated(int)));
+ }
+ return true;
+}
+
+void SocksServer::stop()
+{
+ delete d->sn;
+ d->sn = 0;
+ delete d->sd;
+ d->sd = 0;
+ d->serv.stop();
+}
+
+int SocksServer::port() const
+{
+ return d->serv.port();
+}
+
+QHostAddress SocksServer::address() const
+{
+ return d->serv.address();
+}
+
+SocksClient *SocksServer::takeIncoming()
+{
+ if(d->incomingConns.isEmpty())
+ return 0;
+
+ SocksClient *c = d->incomingConns.getFirst();
+ d->incomingConns.removeRef(c);
+
+ // we don't care about errors anymore
+ disconnect(c, SIGNAL(error(int)), this, SLOT(connectionError()));
+
+ // don't serve the connection until the event loop, to give the caller a chance to map signals
+ QTimer::singleShot(0, c, SLOT(serve()));
+
+ return c;
+}
+
+void SocksServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &data)
+{
+ if(d->sd) {
+ d->sd->setBlocking(true);
+ d->sd->writeBlock(data.data(), data.size(), addr, port);
+ d->sd->setBlocking(false);
+ }
+}
+
+void SocksServer::connectionReady(int s)
+{
+ SocksClient *c = new SocksClient(s, this);
+ connect(c, SIGNAL(error(int)), this, SLOT(connectionError()));
+ d->incomingConns.append(c);
+ incomingReady();
+}
+
+void SocksServer::connectionError()
+{
+ SocksClient *c = (SocksClient *)sender();
+ d->incomingConns.removeRef(c);
+ c->deleteLater();
+}
+
+void SocksServer::sn_activated(int)
+{
+ QByteArray buf(8192);
+ int actual = d->sd->readBlock(buf.data(), buf.size());
+ buf.resize(actual);
+ QHostAddress pa = d->sd->peerAddress();
+ int pp = d->sd->peerPort();
+ SPS_UDP s;
+ int r = sp_read_udp(&buf, &s);
+ if(r != 1)
+ return;
+ incomingUDP(s.host, s.port, pa, pp, s.data);
+}
+
+// CS_NAMESPACE_END
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/psi-0.12/mac/Info.plist new/psi-0.12.1/mac/Info.plist
--- old/psi-0.12/mac/Info.plist 2008-07-25 23:02:44.000000000 +0200
+++ new/psi-0.12.1/mac/Info.plist 2008-12-17 18:46:32.000000000 +0100
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>psi</string>
<key>CFBundleGetInfoString</key>
- <string>Psi 0.12 by the Psi team. This program is licensed under the GNU GPL.</string>
+ <string>Psi 0.12.1 by the Psi team. This program is licensed under the GNU GPL.</string>
<key>CFBundleIconFile</key>
<string>application.icns</string>
<key>CFBundleIdentifier</key>
@@ -19,11 +19,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>Psi 0.12</string>
+ <string>Psi 0.12.1</string>
<key>CFBundleSignature</key>
<string>psi</string>
<key>CFBundleVersion</key>
- <string>0.12</string>
+ <string>0.12.1</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/psi-0.12/mac/Makefile new/psi-0.12.1/mac/Makefile
--- old/psi-0.12/mac/Makefile 2008-07-25 23:02:44.000000000 +0200
+++ new/psi-0.12.1/mac/Makefile 2008-12-17 18:46:32.000000000 +0100
@@ -26,7 +26,7 @@
NAME=Psi
VOLUME_NAME=$(NAME)
#VERSION=0.12-devel_$(shell date +"%Y%m%d")
-VERSION=0.12
+VERSION=0.12.1
APPFILE_NAME=Psi.app
FILES=$(APPFILE_NAME)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/psi-0.12/README new/psi-0.12.1/README
--- old/psi-0.12/README 2008-07-25 23:02:44.000000000 +0200
+++ new/psi-0.12.1/README 2008-12-17 22:51:55.000000000 +0100
@@ -1,6 +1,6 @@
-Psi 0.12
+Psi 0.12.1
---------
-Date: July 25th, 2008
+Date: December 17th, 2008
Project Lead/Maintainer (2004-current):
Kevin Smith
@@ -52,6 +52,9 @@
Changes
-------
+ New in 0.12.1
+ - Bugfix for DOS vulnerability in the file transfer code.
+ Thanks to Jesus Olmos (jolmos(a)isecauditors.com)
New in 0.12
- Multi-user chat windows now join one on one chat windows and can be opened
in tabbed form, either sharing a window, or seperately.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/psi-0.12/src/applicationinfo.cpp new/psi-0.12.1/src/applicationinfo.cpp
--- old/psi-0.12/src/applicationinfo.cpp 2008-07-25 23:02:44.000000000 +0200
+++ new/psi-0.12.1/src/applicationinfo.cpp 2008-12-17 18:46:32.000000000 +0100
@@ -27,9 +27,9 @@
#define PROG_NAME "Psi"
//#define PROG_VERSION "0.12-dev" " (" __DATE__ ")"; //CVS Builds are dated
-#define PROG_VERSION "0.12";
+#define PROG_VERSION "0.12.1";
#define PROG_CAPS_NODE "http://psi-im.org/caps";
-#define PROG_CAPS_VERSION "0.12";
+#define PROG_CAPS_VERSION "0.12.1";
#define PROG_IPC_NAME "org.psi-im.Psi" // must not contain '\\' character on Windows
#define PROG_OPTIONS_NS "http://psi-im.org/options";
#define PROG_STORAGE_NS "http://psi-im.org/storage";
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package perl-PlRPC for openSUSE:Factory
checked in at Fri Feb 27 16:15:42 CET 2009.
--------
--- perl-PlRPC/perl-PlRPC.changes 2008-01-12 18:48:09.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-PlRPC/perl-PlRPC.changes 2009-02-27 15:56:20.000000000 +0100
@@ -1,0 +2,6 @@
+Fri Feb 27 15:55:52 CET 2009 - anicka(a)suse.cz
+
+- update to 0.2020
+ * remove .svn from the tarball
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
PlRPC-0.2019.tar.bz2
New:
----
PlRPC-0.2020.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-PlRPC.spec ++++++
--- /var/tmp/diff_new_pack.f29029/_old 2009-02-27 16:15:38.000000000 +0100
+++ /var/tmp/diff_new_pack.f29029/_new 2009-02-27 16:15:38.000000000 +0100
@@ -1,19 +1,27 @@
#
-# spec file for package perl-PlRPC (Version 0.2019)
+# spec file for package perl-PlRPC (Version 0.2020)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
+
Name: perl-PlRPC
BuildRequires: perl-Net-Daemon
-Version: 0.2019
-Release: 30
+Version: 0.2020
+Release: 1
Requires: perl = %{perl_version}
Requires: perl-Net-Daemon
AutoReqProv: on
@@ -38,7 +46,7 @@
Jochen Wiedmann <jochen.wiedmann(a)freenet.de>
%prep
-%setup -q -n PlRPC-%{version}
+%setup -q -n PlRPC
%build
perl Makefile.PL
@@ -51,7 +59,6 @@
%install
%perl_make_install
%perl_process_packlist
-find $RPM_BUILD_ROOT/ -iname .svn -print | xargs rm -rf
%clean
rm -rf $RPM_BUILD_ROOT
@@ -66,15 +73,18 @@
/var/adm/perl-modules/%{name}
%changelog
-* Sat Jan 12 2008 - coolo(a)suse.de
+* Fri Feb 27 2009 anicka(a)suse.cz
+- update to 0.2020
+ * remove .svn from the tarball
+* Sat Jan 12 2008 coolo(a)suse.de
- disable testsuite for now
-* Mon Jun 11 2007 - anicka(a)suse.cz
+* Mon Jun 11 2007 anicka(a)suse.cz
- update to 0.2019
* Fixed an @opts name that was causing crypt.t to fail.
Namely, changed 'cipher' to 'usercipher', but only in @opts,
because the tests invoked by crypt.t were looking to match
'usercipher' to get the user key.
-* Wed Jan 25 2006 - mls(a)suse.de
+* Wed Jan 25 2006 mls(a)suse.de
- converted neededforbuild to BuildRequires
-* Tue Jul 26 2005 - anicka(a)suse.cz
+* Tue Jul 26 2005 anicka(a)suse.cz
- initial version 0.2018
++++++ PlRPC-0.2019.tar.bz2 -> PlRPC-0.2020.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/PlRPC-0.2019/ChangeLog new/PlRPC/ChangeLog
--- old/PlRPC-0.2019/ChangeLog 2007-05-22 22:48:05.000000000 +0200
+++ new/PlRPC/ChangeLog 2007-06-17 21:23:14.000000000 +0200
@@ -1,3 +1,6 @@
+2007-06-17 Malcolm Nooning <m.nooning(a)cpan.org> (0.2020)
+ * Got rid of the .svn directories that I errently allowed into
+ the last gz upload.
2007-05-16 Malcolm Nooning <m.nooning(a)cpan.org> (0.2019)
* Fixed an @opts name that was causing crypt.t to fail.
Namely, changed 'cipher' to 'usercipher', but only in @opts,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/PlRPC-0.2019/lib/RPC/PlClient.pm new/PlRPC/lib/RPC/PlClient.pm
--- old/PlRPC-0.2019/lib/RPC/PlClient.pm 2007-05-22 22:48:05.000000000 +0200
+++ new/PlRPC/lib/RPC/PlClient.pm 2007-06-17 21:20:20.000000000 +0200
@@ -25,7 +25,7 @@
package RPC::PlClient;
-$RPC::PlClient::VERSION = '0.2019';
+$RPC::PlClient::VERSION = '0.2020';
@RPC::PlClient::ISA = qw(Net::Daemon::Log);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/PlRPC-0.2019/lib/RPC/PlServer.pm new/PlRPC/lib/RPC/PlServer.pm
--- old/PlRPC-0.2019/lib/RPC/PlServer.pm 2007-05-22 22:48:05.000000000 +0200
+++ new/PlRPC/lib/RPC/PlServer.pm 2007-06-17 21:20:30.000000000 +0200
@@ -24,7 +24,7 @@
package RPC::PlServer;
@RPC::PlServer::ISA = qw(Net::Daemon);
-$RPC::PlServer::VERSION = '0.2019';
+$RPC::PlServer::VERSION = '0.2020';
############################################################################
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package perl-MIME-Lite for openSUSE:Factory
checked in at Fri Feb 27 16:15:32 CET 2009.
--------
--- perl-MIME-Lite/perl-MIME-Lite.changes 2008-03-15 08:26:13.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-MIME-Lite/perl-MIME-Lite.changes 2009-02-27 15:42:15.000000000 +0100
@@ -1,0 +2,9 @@
+Fri Feb 27 15:38:50 CET 2009 - anicka(a)suse.cz
+
+- update to 3.024
+ * Respect crazy people who put multiple Cc or Bcc headers in message
+ * Cope with missing local sendmail
+ * fixes
+- require perl-Email-Date-Format, perl-MailTools, perl-MIME-Types
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
MIME-Lite-3.01.tar.bz2
New:
----
MIME-Lite-3.024.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-MIME-Lite.spec ++++++
--- /var/tmp/diff_new_pack.V28435/_old 2009-02-27 16:15:27.000000000 +0100
+++ /var/tmp/diff_new_pack.V28435/_new 2009-02-27 16:15:27.000000000 +0100
@@ -1,10 +1,17 @@
#
-# spec file for package perl-MIME-Lite (Version 3.01)
+# spec file for package perl-MIME-Lite (Version 3.024)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# This file and all modifications and additions to the pristine
-# package are under the same license as the package itself.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@@ -13,9 +20,10 @@
Url: http://cpan.org/modules/by-module/MIME/
Name: perl-MIME-Lite
-Version: 3.01
-Release: 238
-Requires: perl = %{perl_version}
+Version: 3.024
+Release: 1
+Requires: perl = %{perl_version} perl-Email-Date-Format perl-MailTools perl-MIME-Types
+BuildRequires: dos2unix perl-Email-Date-Format perl-MIME-Types perl-MailTools
AutoReqProv: on
Group: Development/Libraries/Perl
License: Artistic License
@@ -37,15 +45,18 @@
Eryq <eryq(a)zeegee.com>
%prep
-%setup -n MIME-Lite-%{version}
+%setup -n MIME-Lite-%{version} -q
+dos2unix COPYING INSTALLING LICENSE MANIFEST README examples/* contrib/MailTool.pm
+dos2unix contrib/README
%build
perl Makefile.PL
make
+
+%check
make test
%install
-rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install_vendor
%perl_process_packlist
chmod 0644 README MANIFEST changes.pod
@@ -62,6 +73,12 @@
/var/adm/perl-modules/perl-MIME-Lite
%changelog
+* Fri Feb 27 2009 anicka(a)suse.cz
+- update to 3.024
+ * Respect crazy people who put multiple Cc or Bcc headers in message
+ * Cope with missing local sendmail
+ * fixes
+- require perl-Email-Date-Format, perl-MailTools, perl-MIME-Types
* Sat Mar 15 2008 coolo(a)suse.de
- removing executable bits on documentation
* Wed Jan 25 2006 mls(a)suse.de
@@ -76,7 +93,7 @@
- changed to vendor directories, used autobuild macros
* Wed Jun 18 2003 coolo(a)suse.de
- package directories
-* Mon May 26 2003 ro(a)suse.de
+* Sun May 25 2003 ro(a)suse.de
- remove unpackaged files from buildroot
* Mon May 19 2003 freitag(a)suse.de
- update to version 3.01, only small maintenance, no new feature.
++++++ MIME-Lite-3.01.tar.bz2 -> MIME-Lite-3.024.tar.bz2 ++++++
++++ 6834 lines of diff (skipped)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0