Package: k3b
Version: 0.12.15-2
Severity: normal
Tags: patch

Please apply this Debian-specific patch to use dpkg-statoverride in
k3bsetup2, instead of chmod, to keep changes accross package upgrades.

A similar patch has been included in the klaptopdaemon package
successfully.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)

Versions of packages k3b depends on:
ii  cdparanoia                3a9.8-13       An audio extraction tool for sampl
ii  cdrecord                  4:2.01+01a03-5 command line CD writing tool
ii  kdebase-bin               4:3.5.2-2      core binaries for the KDE base mod
ii  kdelibs-data              4:3.5.2-2      core shared data for all KDE appli
ii  kdelibs4c2a               4:3.5.2-2+b1   core libraries for all KDE applica
ii  libacl1                   2.2.37-1       Access control list shared library
ii  libart-2.0-2              2.3.17-1       Library of functions for 2D graphi
ii  libattr1                  2.4.32-1       Extended attribute shared library
ii  libaudio2                 1.7-9          The Network Audio System (NAS). (s
ii  libc6                     2.3.6-7        GNU C Library: Shared libraries
ii  libdbus-1-2               0.61-5         simple interprocess messaging syst
ii  libdbus-qt-1-1c2          0.61-5         simple interprocess messaging syst
ii  libexpat1                 1.95.8-3.2     XML parsing C library - runtime li
ii  libfam0                   2.7.0-10       Client library to control the FAM 
ii  libfontconfig1            2.3.2-5.1      generic font configuration library
ii  libfreetype6              2.1.10-3       FreeType 2 font engine, shared lib
ii  libgcc1                   1:4.1.0-2      GCC support library
ii  libhal1                   0.5.7-2        Hardware Abstraction Layer - share
ii  libice6                   1:1.0.0-3      X11 Inter-Client Exchange library
ii  libidn11                  0.5.18-2       GNU libidn library, implementation
ii  libjpeg62                 6b-13          The Independent JPEG Group's JPEG 
ii  libk3b2                   0.12.15-2      The KDE cd burning application lib
ii  libmusicbrainz4c2a        2.1.2-4        Second generation incarnation of t
ii  libpng12-0                1.2.8rel-5.1   PNG library - runtime
ii  libqt3-mt                 3:3.3.6-2      Qt GUI Library (Threaded runtime v
ii  libsm6                    1:1.0.0-4      X11 Session Management library
ii  libstdc++6                4.1.0-2        The GNU Standard C++ Library v3
ii  libx11-6                  2:1.0.0-6      X11 client-side library
ii  libxcursor1               1.1.5.2-5      X cursor management library
ii  libxext6                  1:1.0.0-4      X11 miscellaneous extension librar
ii  libxft2                   2.1.8.2-7      FreeType-based font drawing librar
ii  libxi6                    1:1.0.0-5      X11 Input extension library
ii  libxinerama1              1:1.0.1-4      X11 Xinerama extension library
ii  libxrandr2                2:1.1.0.2-4    X11 RandR extension library
ii  libxrender1               1:0.9.0.2-4    X Rendering Extension client libra
ii  libxt6                    1:1.0.0-4      X11 toolkit intrinsics library
ii  mkisofs                   4:2.01+01a03-5 Creates ISO-9660 CD-ROM filesystem
ii  zlib1g                    1:1.2.3-11     compression library - runtime

Versions of packages k3b recommends:
ii  cdrdao                        1:1.2.1-6  records CDs in Disk-At-Once (DAO) 
ii  dvd+rw-tools                  6.1-2      DVD+-RW/R tools
ii  kcontrol                      4:3.5.2-2  control center for KDE
ii  kdebase-kio-plugins           4:3.5.2-2  core I/O slaves for KDE
ii  vcdimager                     0.7.23-1   A VideoCD (VCD) image mastering an

-- no debconf information
--- old/k3bsetup/k3bsetup2.cpp	2006-05-16 17:35:41.104715576 +0900
+++ new/k3bsetup/k3bsetup2.cpp	2006-05-16 18:06:23.935562704 +0900
@@ -47,6 +47,8 @@
 #include <k3bdefaultexternalprograms.h>
 #include <k3bglobals.h>
 
+#include <kprocess.h>
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -439,30 +441,37 @@
 
       K3bExternalBin* bin = d->listBinMap[checkItem];
 
+      KProcess cleanupProc;
+      cleanupProc << "/usr/sbin/dpkg-statoverride --quiet --remove ";
+      cleanupProc << QFile::encodeName(bin->path);
+      if (!cleanupProc.start(KProcess::Block))
+	success = false;
+
       if( w->m_checkUseBurningGroup->isChecked() ) {
-	if( ::chown( QFile::encodeName(bin->path), (gid_t)0, g->gr_gid ) )
-	  success = false;
+	KProcess proc;
+	proc << "/usr/sbin/dpkg-statoverride --quiet --update --add #0 #";
+        proc << g->gr_gid;
 
-	int perm = 0;
 	if( shouldRunSuidRoot( bin ) )
-	  perm = S_ISUID|S_IRWXU|S_IXGRP;
+	  proc << " 4710 ";
 	else
-	  perm = S_IRWXU|S_IXGRP|S_IRGRP;
+	  proc << " 0750 ";
 
-	if( ::chmod( QFile::encodeName(bin->path), perm ) )
+	proc << QFile::encodeName(bin->path);
+	if (!proc.start(KProcess::Block))
 	  success = false;
       }
       else {
-	if( ::chown( QFile::encodeName(bin->path), 0, 0 ) )
-	  success = false;
+	KProcess proc;
+	proc << "/usr/sbin/dpkg-statoverride --quiet --update --add #0 #0";
 
-	int perm = 0;
 	if( shouldRunSuidRoot( bin ) )
-	  perm = S_ISUID|S_IRWXU|S_IXGRP|S_IXOTH;
+	  proc << " 4711 ";
 	else
-	  perm = S_IRWXU|S_IXGRP|S_IRGRP|S_IXOTH|S_IROTH;
+	  proc << " 0755 ";
 
-	if( ::chmod( QFile::encodeName(bin->path), perm ) )
+	proc << QFile::encodeName(bin->path);
+	if (!proc.start(KProcess::Block))
 	  success = false;
       }
     }

Reply via email to