Bug 170212

Summary: [PATCH] Update sysutils/dvdbackup from 0.4.1 to 0.4.2
Product: Ports & Packages Reporter: Fabian Keil <fk>
Component: Individual Port(s)Assignee: Emanuel Haupt <ehaupt>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.txt none

Description Fabian Keil 2012-07-27 15:30:06 UTC
The attached patch updates sysutils/dvdbackup from 0.4.1 to 0.4.2.

It also fixes a segfault when mirroring a DVD fails. The fix has already been submitted upstream.

I took the liberty to set DEFAULT_DVD_DEVICE to /dev/cd0, which is probably more common than /dev/acd0 nowadays.

The upstream Changes according to http://dvdbackup.sourceforge.net/:

###########
New Features:

    Added new command line option -p, --progress: Print progress report while copying from the DVD; thanks to flipflip for the patch.
    Added new translations from Launchpad: Danish (da), English (United Kingdom) (en_GB), Estonian (et), Portuguese (pt), Slovak (sk), Turkish (tr)
    New complete translation: English (United Kingdom) (en_GB), French (fr), Italian (it), Slovak (sk)

Changes:

    Convert DVD title to lower case, but let every word in the title start with an upper case letter and replace underscores with spaces.

Bug fixes:

    Print the correct vob file name in which the read error happens. Thanks to Kolja Nowak for the patch. (Closes: #585560, LP: #648752)
    Fix DVD title detection on FreeBSD. Thanks to Emanuel Haupt.
    Fix copying of fragmented chapters. Thanks to Christian Kuehnke for the patch. (LP: #648920)
###########

Fix: Patch attached with submission follows:
How-To-Repeat: One way to reproduce the crash is to try mirroring a DVD while the drive is empty. Trying to mirror a DVD with unreadable IFO files "works" as well.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-07-27 15:30:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ehaupt

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2012-07-28 13:29:46 UTC
Author: ehaupt
Date: Sat Jul 28 12:29:36 2012
New Revision: 301655
URL: http://svn.freebsd.org/changeset/ports/301655

Log:
  - Update to 0.4.2
  - Now that we have svn rename patch with ancient naming schema
  
  PR:		170212
  Submitted by:	Fabian Keil <fk@fabiankeil.de>

Added:
  head/sysutils/dvdbackup/files/patch-src__dvdbackup.c
     - copied, changed from r301650, head/sysutils/dvdbackup/files/patch-src::dvdbackup.c
Deleted:
  head/sysutils/dvdbackup/files/patch-src::dvdbackup.c
Modified:
  head/sysutils/dvdbackup/Makefile
  head/sysutils/dvdbackup/distinfo
  head/sysutils/dvdbackup/pkg-plist

Modified: head/sysutils/dvdbackup/Makefile
==============================================================================
--- head/sysutils/dvdbackup/Makefile	Sat Jul 28 12:27:28 2012	(r301654)
+++ head/sysutils/dvdbackup/Makefile	Sat Jul 28 12:29:36 2012	(r301655)
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	dvdbackup
-PORTVERSION=	0.4.1
-PORTREVISION=	2
+PORTVERSION=	0.4.2
 CATEGORIES=	sysutils multimedia
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 
@@ -16,7 +15,7 @@ COMMENT=	Backup content from DVD to hard
 
 LICENSE=	GPLv3
 
-LIB_DEPENDS=	dvdread.4:${PORTSDIR}/multimedia/libdvdread
+LIB_DEPENDS=	dvdread:${PORTSDIR}/multimedia/libdvdread
 
 GNU_CONFIGURE=	yes
 USE_GMAKE=	yes
@@ -27,7 +26,7 @@ LDFLAGS+=	-L${LOCALBASE}/lib
 MAN1=		dvdbackup.1
 PORTDOCS=	NEWS README
 
-DEFAULT_DVD_DEVICE?=	/dev/acd0
+DEFAULT_DVD_DEVICE?=	/dev/cd0
 
 .if !defined(WITHOUT_NLS)
 USE_GETTEXT=	yes

Modified: head/sysutils/dvdbackup/distinfo
==============================================================================
--- head/sysutils/dvdbackup/distinfo	Sat Jul 28 12:27:28 2012	(r301654)
+++ head/sysutils/dvdbackup/distinfo	Sat Jul 28 12:29:36 2012	(r301655)
@@ -1,2 +1,2 @@
-SHA256 (dvdbackup-0.4.1.tar.gz) = ac9138b3265ef7f113d139e68130663937ce25322ae00922f74bab55aa63347b
-SIZE (dvdbackup-0.4.1.tar.gz) = 232885
+SHA256 (dvdbackup-0.4.2.tar.gz) = 0a37c31cc6f2d3c146ec57064bda8a06cf5f2ec90455366cb250506bab964550
+SIZE (dvdbackup-0.4.2.tar.gz) = 267049

Copied and modified: head/sysutils/dvdbackup/files/patch-src__dvdbackup.c (from r301650, head/sysutils/dvdbackup/files/patch-src::dvdbackup.c)
==============================================================================
--- head/sysutils/dvdbackup/files/patch-src::dvdbackup.c	Sat Jul 28 12:02:12 2012	(r301650, copy source)
+++ head/sysutils/dvdbackup/files/patch-src__dvdbackup.c	Sat Jul 28 12:29:36 2012	(r301655)
@@ -1,42 +1,18 @@
---- src/dvdbackup.c.orig	2010-09-16 22:10:04.307951355 +0200
-+++ src/dvdbackup.c	2010-09-16 22:19:49.112413564 +0200
-@@ -99,7 +99,8 @@
- 
- 
- static int CheckSizeArray(const int size_array[], int reference, int target) {
--	if ( (size_array[reference]/size_array[target] == 1) &&
-+	if ( size_array[target] &&
-+			(size_array[reference]/size_array[target] == 1) &&
- 			((size_array[reference] * 2 - size_array[target])/ size_array[target] == 1) &&
- 			((size_array[reference]%size_array[target] * 3) < size_array[reference]) ) {
- 		/* We have a dual DVD with two feature films - now let's see if they have the same amount of chapters*/
-@@ -1264,7 +1265,7 @@
- 
- 	/* Seek to title of first track, which is at (track_no * 32768) + 40 */
- 
--	if ( 32808 != lseek(filehandle, 32808, SEEK_SET) ) {
-+	if ( 32768 != lseek(filehandle, 32768, SEEK_SET) ) {
- 		close(filehandle);
- 		fprintf(stderr, _("Cannot seek DVD device %s - check your DVD device\n"), device);
+--- ./src/dvdbackup.c.orig	2012-06-24 03:10:29.000000000 +0200
++++ ./src/dvdbackup.c	2012-07-28 13:57:54.000000000 +0200
+@@ -1546,7 +1546,6 @@
+ 
+ 	title_set_info = DVDGetFileSet(_dvd);
+ 	if (!title_set_info) {
+-		DVDClose(_dvd);
  		return(1);
-@@ -1272,10 +1273,16 @@
+ 	}
  
- 	/* Read the DVD-Video title */
+@@ -1573,7 +1572,6 @@
+ 	title_set_info = DVDGetFileSet(_dvd);
  
--	if ( 32 != read(filehandle, title, 32)) {
--		close(filehandle);
--		fprintf(stderr, _("Cannot read title from DVD device %s\n"), device);
--		return(1);
-+#define DVD_SEC_SIZ 2048
-+	{
-+		char tempBuf[ DVD_SEC_SIZ ];
-+
-+		if (DVD_SEC_SIZ != read(filehandle, tempBuf, DVD_SEC_SIZ)) {
-+			close(filehandle);
-+			fprintf(stderr, _("Cannot read title from DVD device %s\n"), device);
-+			return(1);
-+		}
-+      	snprintf( title, 32, "%s", tempBuf + 40 );
+ 	if (!title_set_info) {
+-		DVDClose(_dvd);
+ 		return(1);
  	}
  
- 	/* Terminate the title string */

Modified: head/sysutils/dvdbackup/pkg-plist
==============================================================================
--- head/sysutils/dvdbackup/pkg-plist	Sat Jul 28 12:27:28 2012	(r301654)
+++ head/sysutils/dvdbackup/pkg-plist	Sat Jul 28 12:29:36 2012	(r301655)
@@ -1,14 +1,20 @@
 bin/dvdbackup
+%%NLS%%share/locale/da/LC_MESSAGES/dvdbackup.mo
 %%NLS%%share/locale/de/LC_MESSAGES/dvdbackup.mo
-%%NLS%%share/locale/en@quot/LC_MESSAGES/dvdbackup.mo
-%%NLS%%@dirrmtry share/locale/en@quot/LC_MESSAGES
-%%NLS%%@dirrmtry share/locale/en@quot
 %%NLS%%share/locale/en@boldquot/LC_MESSAGES/dvdbackup.mo
-%%NLS%%@dirrmtry share/locale/en@boldquot/LC_MESSAGES
-%%NLS%%@dirrmtry share/locale/en@boldquot
+%%NLS%%share/locale/en@quot/LC_MESSAGES/dvdbackup.mo
+%%NLS%%share/locale/en_GB/LC_MESSAGES/dvdbackup.mo
 %%NLS%%share/locale/es/LC_MESSAGES/dvdbackup.mo
+%%NLS%%share/locale/et/LC_MESSAGES/dvdbackup.mo
 %%NLS%%share/locale/fr/LC_MESSAGES/dvdbackup.mo
 %%NLS%%share/locale/gl/LC_MESSAGES/dvdbackup.mo
 %%NLS%%share/locale/it/LC_MESSAGES/dvdbackup.mo
 %%NLS%%share/locale/nb/LC_MESSAGES/dvdbackup.mo
+%%NLS%%share/locale/pt/LC_MESSAGES/dvdbackup.mo
 %%NLS%%share/locale/ru/LC_MESSAGES/dvdbackup.mo
+%%NLS%%share/locale/sk/LC_MESSAGES/dvdbackup.mo
+%%NLS%%share/locale/tr/LC_MESSAGES/dvdbackup.mo
+%%NLS%%@dirrmtry share/locale/en@quot/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/en@quot
+%%NLS%%@dirrmtry share/locale/en@boldquot/LC_MESSAGES
+%%NLS%%@dirrmtry share/locale/en@boldquot
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Emanuel Haupt freebsd_committer freebsd_triage 2012-07-28 13:31:22 UTC
State Changed
From-To: open->closed

Committed with minor modifications, thanks!