[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#685722: marked as done (unblock (pre-approval): kamera/4:4.8.4-2)



Your message dated Fri, 31 Aug 2012 22:01:51 +0100
with message-id <1346446911.7606.34.camel@jacala.jungle.funky-badger.org>
and subject line Re: Bug#685722: unblock (pre-approval): kamera/4:4.8.4-2
has caused the Debian Bug report #685722,
regarding unblock (pre-approval): kamera/4:4.8.4-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
685722: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685722
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please consider pre-approving the unblock package kamera

There is a bug which causes that cameras that have a '/' in their names
make the program crash (#685676). This upload just adds this patch to solve
this problem.

I'm attaching the debdiff, which is the patch + the new changelog entry.

Kinds regards, Lisandro.

unblock kamera/4:4.8.4-2

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: mips
i386

Kernel: Linux 3.2.21+edid (SMP w/2 CPU cores)
Locale: LANG=es_AR.UTF-8, LC_CTYPE=es_AR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff -Nru kamera-4.8.4/debian/changelog kamera-4.8.4/debian/changelog
--- kamera-4.8.4/debian/changelog	2012-06-16 19:01:37.000000000 -0300
+++ kamera-4.8.4/debian/changelog	2012-08-23 19:07:41.000000000 -0300
@@ -1,3 +1,11 @@
+kamera (4:4.8.4-2) UNRELEASED; urgency=low
+
+  * Team upload.
+  * Add a patch to avoid crashes in kameras which contain '/' in their names
+    (Closes: #685676).
+
+ -- Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>  Thu, 23 Aug 2012 19:00:57 -0300
+
 kamera (4:4.8.4-1) unstable; urgency=low
 
   * Team upload.
diff -Nru kamera-4.8.4/debian/patches/quote_unquote_path_components.patch kamera-4.8.4/debian/patches/quote_unquote_path_components.patch
--- kamera-4.8.4/debian/patches/quote_unquote_path_components.patch	1969-12-31 21:00:00.000000000 -0300
+++ kamera-4.8.4/debian/patches/quote_unquote_path_components.patch	2012-08-23 19:05:39.000000000 -0300
@@ -0,0 +1,124 @@
+Author: Marcus Meissner <marcus@jet.franken.de>
+Description: quote/unquote path components
+ This helps with cameras with / in their names, avoiding segfaults.
+Author: Marcus Meissner <marcus@jet.franken.de>
+Forwarded: not-needed
+Origin: http://bugsfiles.kde.org/attachment.cgi?id=72002
+
+---
+ kioslave/kamera.cpp |   34 +++++++++++++++++++++-------------
+ 1 files changed, 21 insertions(+), 13 deletions(-)
+
+diff --git a/kioslave/kamera.cpp b/kioslave/kamera.cpp
+index 9596b16..3f9e6e1 100644
+--- a/kioslave/kamera.cpp
++++ b/kioslave/kamera.cpp
+@@ -3,6 +3,7 @@
+     Copyright (C) 2001 The Kompany
+ 		  2001-2003	Ilya Konstantinov <kde-devel@future.shiny.co.il>
+ 		  2001-2008	Marcus Meissner <marcus@jet.franken.de>
++		  2012		Marcus Meissner <marcus@jet.franken.de>
+ 
+     This program is free software; you can redistribute it and/or modify
+     it under the terms of the GNU General Public License as published by
+@@ -86,6 +87,9 @@ int kdemain(int argc, char **argv)
+ 	return 0;
+ }
+ 
++static QString path_quote(QString path)   { return path.replace("/","%2F").replace(" ","%20"); }
++static QString path_unquote(QString path) { return path.replace("%2F","/").replace("%20"," "); }
++
+ KameraProtocol::KameraProtocol(const QByteArray &pool, const QByteArray &app)
+ : SlaveBase("camera", pool, app),
+ m_camera(NULL)
+@@ -405,19 +409,19 @@ void KameraProtocol::split_url2camerapath(QString url,
+ 	components	= url.split('/', QString::SkipEmptyParts);
+ 	if (components.size() == 0)
+ 		return;
+-	cam		= components.takeFirst();
++	cam		= path_unquote(components.takeFirst());
+ 	if (!cam.isEmpty()) {
+ 		camarr		= cam.split('@');
+-		camera		= camarr.takeFirst();
+-		port		= camarr.takeLast();
++		camera		= path_unquote(camarr.takeFirst());
++		port		= path_unquote(camarr.takeLast());
+ 		setCamera (camera, port);
+ 	}
+ 	if (components.size() == 0)  {
+ 		directory = "/";
+ 		return;
+ 	}
+-	file		= components.takeLast();
+-	directory 	= "/"+components.join("/");
++	file		= path_unquote(components.takeLast());
++	directory 	= path_unquote("/"+components.join("/"));
+ }
+ 
+ // Implements a regular stat() of a file / directory, returning all we know about it
+@@ -440,10 +444,10 @@ void KameraProtocol::statRegular(const KUrl &xurl)
+ 		KIO::UDSEntry entry;
+ 
+ 		QString xname = current_camera + "@" + current_port;
+-		entry.insert( KIO::UDSEntry::UDS_NAME, xname);
++		entry.insert( KIO::UDSEntry::UDS_NAME, path_quote(xname));
+ 		entry.insert( KIO::UDSEntry::UDS_DISPLAY_NAME, current_camera);
+-		entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,S_IFDIR);
+-		entry.insert(KIO::UDSEntry::UDS_ACCESS,(S_IRUSR | S_IRGRP | S_IROTH));
++		entry.insert( KIO::UDSEntry::UDS_FILE_TYPE,S_IFDIR);
++		entry.insert( KIO::UDSEntry::UDS_ACCESS,(S_IRUSR | S_IRGRP | S_IROTH));
+ 		statEntry(entry);
+ 		finished();
+ 		return;
+@@ -645,7 +649,7 @@ void KameraProtocol::listDir(const KUrl &yurl)
+ 			} else {
+ 				xname = (*it)+"@"+m_cfgPath;
+ 			}
+-			entry.insert(KIO::UDSEntry::UDS_NAME,xname);
++			entry.insert(KIO::UDSEntry::UDS_NAME,path_quote(xname));
+ 			// do not confuse regular users with the @usb... 
+ 			entry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME,*it);
+ 			listEntry(entry, false);
+@@ -658,7 +662,7 @@ void KameraProtocol::listDir(const KUrl &yurl)
+ 			entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,S_IFDIR);
+ 			// do not confuse regular users with the @usb... 
+ 			entry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME,portsit.value());
+-			entry.insert(KIO::UDSEntry::UDS_NAME, portsit.value()+"@"+portsit.key());
++			entry.insert(KIO::UDSEntry::UDS_NAME, path_quote(portsit.value()+"@"+portsit.key()));
+ 
+ 			entry.insert(KIO::UDSEntry::UDS_ACCESS,(S_IRUSR | S_IRGRP | S_IROTH |S_IWUSR | S_IWGRP | S_IWOTH));
+ 			listEntry(entry, false);
+@@ -864,7 +868,9 @@ void KameraProtocol::translateTextToUDS(KIO::UDSEntry &udsEntry, const QString &
+ 
+ 	udsEntry.insert(KIO::UDSEntry::UDS_FILE_TYPE,S_IFREG);
+ 
+-	udsEntry.insert(KIO::UDSEntry::UDS_NAME,fn);
++	udsEntry.insert(KIO::UDSEntry::UDS_NAME,path_quote(fn));
++
++	udsEntry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME,fn);
+ 
+ 	udsEntry.insert(KIO::UDSEntry::UDS_SIZE,strlen(text));
+ 
+@@ -878,7 +884,8 @@ void KameraProtocol::translateFileToUDS(KIO::UDSEntry &udsEntry, const CameraFil
+ 	udsEntry.clear();
+ 
+ 	udsEntry.insert(KIO::UDSEntry::UDS_FILE_TYPE,S_IFREG);
+-	udsEntry.insert(KIO::UDSEntry::UDS_NAME,name);
++	udsEntry.insert(KIO::UDSEntry::UDS_NAME,path_quote(name));
++	udsEntry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME,name);
+ 
+ 	if (info.file.fields & GP_FILE_INFO_SIZE) {
+ 		udsEntry.insert(KIO::UDSEntry::UDS_SIZE,info.file.size);
+@@ -909,7 +916,8 @@ void KameraProtocol::translateDirectoryToUDS(KIO::UDSEntry &udsEntry, const QStr
+ 	udsEntry.clear();
+ 
+ 	udsEntry.insert(KIO::UDSEntry::UDS_FILE_TYPE,S_IFDIR);
+-	udsEntry.insert(KIO::UDSEntry::UDS_NAME,dirname);
++	udsEntry.insert(KIO::UDSEntry::UDS_NAME,path_quote(dirname));
++	udsEntry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME, dirname);
+ 	udsEntry.insert(KIO::UDSEntry::UDS_ACCESS,S_IRUSR | S_IRGRP | S_IROTH |S_IWUSR | S_IWGRP | S_IWOTH | S_IXUSR | S_IXOTH | S_IXGRP);
+         udsEntry.insert(KIO::UDSEntry::UDS_MIME_TYPE, QString("inode/directory"));
+ }
+-- 
+1.7.3.4
+
diff -Nru kamera-4.8.4/debian/patches/series kamera-4.8.4/debian/patches/series
--- kamera-4.8.4/debian/patches/series	1969-12-31 21:00:00.000000000 -0300
+++ kamera-4.8.4/debian/patches/series	2012-08-23 18:59:44.000000000 -0300
@@ -0,0 +1 @@
+quote_unquote_path_components.patch

--- End Message ---
--- Begin Message ---
On Wed, 2012-08-29 at 09:40 -0300, Lisandro Damián Nicanor Pérez Meyer
wrote:
> On Sat 25 Aug 2012 23:13:10 Cyril Brulebois escribió:
> > Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org> (23/08/2012):
> > > There is a bug which causes that cameras that have a '/' in their names
> > > make the program crash (#685676). This upload just adds this patch to
> > > solve this problem.
> > > 
> > > I'm attaching the debdiff, which is the patch + the new changelog entry.
> > 
> > while I've only glanced over the debdiff, that looks like a
> > reasonably-sized patch for wheezy, so please upload to unstable and ping
> > us after it has spent a few days in unstable.
> 
> I'm so pinging you for this package :-)

Unblocked; thanks.

Regards,

Adam

--- End Message ---

Reply to: