rev 19973 - in kde-extras/partitionmanager/trunk/debian: . patches

Pino Toscano pino at moszumanska.debian.org
Thu Sep 11 15:50:38 UTC 2014


Author: pino
Date: 2014-09-11 15:50:38 +0000 (Thu, 11 Sep 2014)
New Revision: 19973

Added:
   kde-extras/partitionmanager/trunk/debian/patches/
   kde-extras/partitionmanager/trunk/debian/patches/check-function-exists.patch
   kde-extras/partitionmanager/trunk/debian/patches/libparted-3.1.patch
   kde-extras/partitionmanager/trunk/debian/patches/series
Modified:
   kde-extras/partitionmanager/trunk/debian/changelog
Log:
import NMU 1.0.3-2.1


Modified: kde-extras/partitionmanager/trunk/debian/changelog
===================================================================
--- kde-extras/partitionmanager/trunk/debian/changelog	2014-09-11 06:59:41 UTC (rev 19972)
+++ kde-extras/partitionmanager/trunk/debian/changelog	2014-09-11 15:50:38 UTC (rev 19973)
@@ -1,3 +1,11 @@
+partitionmanager (1.0.3-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Backport support for libparted 3.1 from upstream (closes: #754580).
+  * Include cmake module needed for CHECK_FUNCTION_EXISTS.
+
+ -- Colin Watson <cjwatson at debian.org>  Sat, 19 Jul 2014 23:05:50 +0100
+
 partitionmanager (1.0.3-2) unstable; urgency=low
 
   * Upload to unstable

Added: kde-extras/partitionmanager/trunk/debian/patches/check-function-exists.patch
===================================================================
--- kde-extras/partitionmanager/trunk/debian/patches/check-function-exists.patch	                        (rev 0)
+++ kde-extras/partitionmanager/trunk/debian/patches/check-function-exists.patch	2014-09-11 15:50:38 UTC (rev 19973)
@@ -0,0 +1,17 @@
+Description: Include cmake module needed for CHECK_FUNCTION_EXISTS
+Author: Colin Watson <cjwatson at debian.org>
+Forwarded: no
+Last-Update: 2014-07-19
+
+Index: b/cmake/modules/FindLIBPARTED.cmake
+===================================================================
+--- a/cmake/modules/FindLIBPARTED.cmake
++++ b/cmake/modules/FindLIBPARTED.cmake
+@@ -16,6 +16,7 @@
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ 
+ INCLUDE(CheckCSourceCompiles)
++INCLUDE(CheckFunctionExists)
+ 
+ if (LIBPARTED_INCLUDE_DIR AND LIBPARTED_LIBRARY)
+   # Already in cache, be silent

Added: kde-extras/partitionmanager/trunk/debian/patches/libparted-3.1.patch
===================================================================
--- kde-extras/partitionmanager/trunk/debian/patches/libparted-3.1.patch	                        (rev 0)
+++ kde-extras/partitionmanager/trunk/debian/patches/libparted-3.1.patch	2014-09-11 15:50:38 UTC (rev 19973)
@@ -0,0 +1,259 @@
+Description: Port to libparted 3.1
+ I (Colin Watson) backported this from the new upstream release 1.1.0.
+ There are a number of other extensive rearrangements of code in that
+ release, so this required substantial changes.  This patch can be discarded
+ when upgrading to 1.1.0.
+Origin: backport, https://projects.kde.org/projects/extragear/sysadmin/partitionmanager/repository/revisions/6a2b4c5c09eb3ac74b4d89a981d53f3ea125a94e/diff
+Origin: backport, https://projects.kde.org/projects/extragear/sysadmin/partitionmanager/repository/revisions/0fe0fb40e725a2d1daecbe88a3ef8ed27c2ec669/diff
+Origin: backport, https://projects.kde.org/projects/extragear/sysadmin/partitionmanager/repository/revisions/85801458109a62ce115a4c4ba365b009cb6e50dd/diff
+Origin: backport, https://projects.kde.org/projects/extragear/sysadmin/partitionmanager/repository/revisions/06914e2eab1a9e3b2beda3962f2e8aa83a9ad919/diff
+Bug-Debian: http://bugs.debian.org/754580
+Forwarded: not-needed
+Last-Update: 2014-07-19
+
+Index: b/CMakeLists.txt
+===================================================================
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -40,6 +40,14 @@
+ pkg_check_modules(BLKID REQUIRED blkid)
+ find_package(LIBPARTED REQUIRED)
+ 
++if (LIBPARTED_FILESYSTEM_SUPPORT)
++	add_definitions(-DLIBPARTED_FILESYSTEM_SUPPORT)
++endif (LIBPARTED_FILESYSTEM_SUPPORT)
++
++if (LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT)
++	add_definitions(-DLIBPARTED_FS_RESIZE_LIBRARY_SUPPORT)
++endif (LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT)
++
+ add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
+ add_definitions(${KDE4_ENABLE_EXCEPTIONS})
+ 
+Index: b/cmake/modules/FindLIBPARTED.cmake
+===================================================================
+--- a/cmake/modules/FindLIBPARTED.cmake
++++ b/cmake/modules/FindLIBPARTED.cmake
+@@ -1,4 +1,4 @@
+-# Copyright (C) 2008 by Volker Lanz <vl at fidra.de>
++# Copyright (C) 2008,2010,2011 by Volker Lanz <vl at fidra.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
+@@ -15,6 +15,8 @@
+ # Free Software Foundation, Inc.,
+ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ 
++INCLUDE(CheckCSourceCompiles)
++
+ if (LIBPARTED_INCLUDE_DIR AND LIBPARTED_LIBRARY)
+   # Already in cache, be silent
+   set(LIBPARTED_FIND_QUIETLY TRUE)
+@@ -24,10 +26,25 @@
+ FIND_PATH(LIBPARTED_INCLUDE_DIR parted.h PATH_SUFFIXES parted )
+ 
+ FIND_LIBRARY(LIBPARTED_LIBRARY NAMES parted)
++FIND_LIBRARY(LIBPARTED_FS_RESIZE_LIBRARY NAMES parted-fs-resize)
+ 
+ INCLUDE(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBPARTED DEFAULT_MSG LIBPARTED_LIBRARY LIBPARTED_INCLUDE_DIR)
+ 
+-SET(LIBPARTED_LIBS ${LIBPARTED_LIBRARY})
++if (LIBPARTED_FS_RESIZE_LIBRARY)
++  set(LIBPARTED_LIBS ${LIBPARTED_LIBRARY} ${LIBPARTED_FS_RESIZE_LIBRARY})
++else (LIBPARTED_FS_RESIZE_LIBRARY)
++  set(LIBPARTED_LIBS ${LIBPARTED_LIBRARY})
++endif (LIBPARTED_FS_RESIZE_LIBRARY)
++
++# KDE adds -ansi to the C make flags, parted headers use GNU extensions, so
++# undo that
++unset(CMAKE_C_FLAGS)
++
++set(CMAKE_REQUIRED_INCLUDES ${LIBPARTED_INCLUDE_DIR})
++set(CMAKE_REQUIRED_LIBRARIES ${LIBPARTED_LIBS})
++
++CHECK_FUNCTION_EXISTS("ped_file_system_clobber" LIBPARTED_FILESYSTEM_SUPPORT) # parted < 3.0
++CHECK_FUNCTION_EXISTS("ped_file_system_resize" LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT) # parted != 3.0
+ 
+-MARK_AS_ADVANCED(LIBPARTED_LIBRARY LIBPARTED_INCLUDE_DIR)
++MARK_AS_ADVANCED(LIBPARTED_LIBRARY LIBPARTED_INCLUDE_DIR LIBPARTED_FILESYSTEM_SUPPORT LIBPARTED_FS_RESIZE_LIBRARY LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT)
+Index: b/src/core/libparted.cpp
+===================================================================
+--- a/src/core/libparted.cpp
++++ b/src/core/libparted.cpp
+@@ -1,5 +1,5 @@
+ /***************************************************************************
+- *   Copyright (C) 2008,2009 by Volker Lanz <vl at fidra.de>                  *
++ *   Copyright (C) 2008,2009,2010,2011 by Volker Lanz <vl at fidra.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  *
+@@ -118,6 +118,7 @@
+ 	@param p the Partition the FileSystem is on
+ 	@return the number of sectors used
+ */
++#if defined LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT
+ static qint64 readSectorsUsedLibParted(PedDisk* pedDisk, const Partition& p)
+ {
+ 	Q_ASSERT(pedDisk);
+@@ -144,6 +145,7 @@
+ 
+ 	return rval;
+ }
++#endif
+ 
+ /** Reads the sectors used in a FileSystem and stores the result in the Partition's FileSystem object.
+ 	@param pedDisk pointer to pedDisk  where the Partition and its FileSystem are
+@@ -160,8 +162,12 @@
+ 		p.fileSystem().setSectorsUsed((sfs.f_blocks - sfs.f_bfree) * sfs.f_bsize / p.sectorSize());
+ 	else if (p.fileSystem().supportGetUsed() == FileSystem::SupportExternal)
+ 		p.fileSystem().setSectorsUsed(p.fileSystem().readUsedCapacity(p.deviceNode()) / p.sectorSize());
++#if defined LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT
+ 	else if (p.fileSystem().supportGetUsed() == FileSystem::SupportLibParted)
+ 		p.fileSystem().setSectorsUsed(readSectorsUsedLibParted(pedDisk, p));
++#else
++	Q_UNUSED(pedDisk);
++#endif
+ }
+ 
+ /** Scans a Device for Partitions.
+Index: b/src/fs/fat16.cpp
+===================================================================
+--- a/src/fs/fat16.cpp
++++ b/src/fs/fat16.cpp
+@@ -59,8 +59,10 @@
+ 		m_Create = findExternal("mkfs.msdos") ? SupportExternal : SupportNone;
+ 		m_GetUsed = m_Check = findExternal("fsck.msdos", QStringList(), 2) ? SupportExternal : SupportNone;
+ 		m_GetLabel = findIdUtil() ? SupportExternal : SupportNone;
++#if defined LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT
+ 		m_Grow = SupportLibParted;
+ 		m_Shrink = SupportLibParted;
++#endif
+ 		m_Move = SupportInternal;
+ 		m_Copy = SupportInternal;
+ 		m_Backup = SupportInternal;
+Index: b/src/fs/hfs.cpp
+===================================================================
+--- a/src/fs/hfs.cpp
++++ b/src/fs/hfs.cpp
+@@ -46,8 +46,10 @@
+ 		m_Create = findExternal("hformat") ? SupportExternal : SupportNone;
+ 		m_Check = m_GetLabel = findExternal("hfsck") ? SupportExternal : SupportNone;
+ 
++#if defined LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT
+ 		m_GetUsed = SupportLibParted;
+ 		m_Shrink = SupportLibParted;
++#endif
+ 
+ 		m_Move = m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone;
+ 		m_Backup = SupportInternal;
+Index: b/src/fs/hfsplus.cpp
+===================================================================
+--- a/src/fs/hfsplus.cpp
++++ b/src/fs/hfsplus.cpp
+@@ -42,8 +42,10 @@
+ 	{
+ 		m_Check = findExternal("hpfsck") ? SupportExternal : SupportNone;
+ 
++#if defined LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT
+ 		m_GetUsed = SupportLibParted;
+ 		m_Shrink = SupportLibParted;
++#endif
+ 		m_Copy = (m_Check != SupportNone) ? SupportInternal : SupportNone;
+ 		m_Move = (m_Check != SupportNone) ? SupportInternal : SupportNone;
+ 		m_Backup = SupportInternal;
+Index: b/src/jobs/deletefilesystemjob.cpp
+===================================================================
+--- a/src/jobs/deletefilesystemjob.cpp
++++ b/src/jobs/deletefilesystemjob.cpp
+@@ -60,26 +60,21 @@
+ 	{
+ 		if (PedPartition* pedPartition = ped_disk_get_partition_by_sector(pedDisk(), partition().firstSector()))
+ 		{
+-			if (ped_file_system_clobber(&pedPartition->geom))
++			if (pedPartition->type == PED_PARTITION_NORMAL || pedPartition->type == PED_PARTITION_LOGICAL)
+ 			{
+-				if (pedPartition->type == PED_PARTITION_NORMAL || pedPartition->type == PED_PARTITION_LOGICAL)
++				if (ped_device_open(pedDevice()))
+ 				{
+-					if (ped_device_open(pedDevice()))
+-					{
+-						// libparted doesn't deal with reiser4, so we overwrite it ourselves here
+-						rval = ped_geometry_write(&pedPartition->geom, "0000000", 128, 1);
++					//reiser4 stores "ReIsEr4" at sector 128 with a sector size of 512 bytes
++					rval = ped_geometry_write(&pedPartition->geom, "0000000", 65536 / pedDevice()->sector_size, 1);
+ 
+-						if (!rval)
+-							report->line() << i18nc("@info/plain", "Failed to erase reiser4 signature on partition <filename>%1</filename>.", partition().deviceNode());
++					if (!rval)
++						report->line() << i18nc("@info/plain", "Failed to erase reiser4 signature on partition <filename>%1</filename>.", partition().deviceNode());
+ 
+-						ped_device_close(pedDevice());
+-					}
++					ped_device_close(pedDevice());
+ 				}
+-				else
+-					rval = true;
+ 			}
+ 			else
+-				report->line() << i18nc("@info/plain", "Failed to clobber file system on partition <filename>%1</filename>.", partition().deviceNode());
++				rval = true;
+ 		}
+ 		else
+ 			report->line() << i18nc("@info/plain", "Could not delete file system on partition <filename>%1</filename>: Failed to get partition.", partition().deviceNode());
+Index: b/src/jobs/job.cpp
+===================================================================
+--- a/src/jobs/job.cpp
++++ b/src/jobs/job.cpp
+@@ -370,6 +370,7 @@
+ 	 emit progress(i);
+ }
+ 
++#if defined LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT
+ void Job::pedTimerHandler(PedTimer* pedTimer, void* ctx)
+ {
+ 	if (ctx)
+@@ -380,6 +381,7 @@
+ 			job->emitProgress(pedTimer->frac * 100);
+ 	}
+ }
++#endif
+ 
+ Report* Job::jobStarted(Report& parent)
+ {
+Index: b/src/jobs/job.h
+===================================================================
+--- a/src/jobs/job.h
++++ b/src/jobs/job.h
+@@ -104,7 +104,9 @@
+ 		PedDisk* pedDisk() { return m_PedDisk; }
+ 
+ 		static PedFileSystemType* getPedFileSystemType(FileSystem::Type t);
++#if defined LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT
+ 		static void pedTimerHandler(PedTimer* pedTimer, void* ctx);
++#endif
+ 
+ 	private:
+ 		PedDevice* m_PedDevice;
+Index: b/src/jobs/resizefilesystemjob.cpp
+===================================================================
+--- a/src/jobs/resizefilesystemjob.cpp
++++ b/src/jobs/resizefilesystemjob.cpp
+@@ -119,6 +119,7 @@
+ 		return false;
+ 	}
+ 
++#if defined LIBPARTED_FS_RESIZE_LIBRARY_SUPPORT
+ 	if (PedGeometry* originalGeometry = ped_geometry_new(pedDevice(), partition().fileSystem().firstSector(), partition().fileSystem().length()))
+ 	{
+ 		if (PedFileSystem* pedFileSystem = ped_file_system_open(originalGeometry))
+@@ -144,6 +145,9 @@
+ 	}
+ 	else
+ 		report.line() << i18nc("@info/plain", "Could not read geometry for partition <filename>%1</filename> while trying to resize the file system.", partition().deviceNode());
++#else
++	Q_UNUSED(report);
++#endif
+ 	
+ 	closePed();
+ 	

Added: kde-extras/partitionmanager/trunk/debian/patches/series
===================================================================
--- kde-extras/partitionmanager/trunk/debian/patches/series	                        (rev 0)
+++ kde-extras/partitionmanager/trunk/debian/patches/series	2014-09-11 15:50:38 UTC (rev 19973)
@@ -0,0 +1,2 @@
+libparted-3.1.patch
+check-function-exists.patch




More information about the pkg-kde-commits mailing list