Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Jul 2008 18:27:36 GMT
From:      Fabian Keil <fk@fabiankeil.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/125579: [PATCH] sysutils/vobcopy should not fail if /etc/mtab does not exist
Message-ID:  <200807131827.m6DIRaDO023893@www.freebsd.org>
Resent-Message-ID: <200807131830.m6DIU9CA090414@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         125579
>Category:       ports
>Synopsis:       [PATCH] sysutils/vobcopy should not fail if /etc/mtab does not exist
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 13 18:30:09 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Fabian Keil
>Release:        CURRENT
>Organization:
>Environment:
FreeBSD TP51.local 8.0-CURRENT FreeBSD 8.0-CURRENT #25: Fri Jun 27 17:43:17 CEST 2008     fk@TP51.local:/usr/obj/usr/src/sys/THINKPAD  i386
>Description:
On my system vobcopy fails to work if /etc/mtab doesn't exist.
"touch /etc/mtab" works around the problem but is hardly an
acceptable solution.

The real problem seems to be that the FreeBSD-specific code in
dvd.c's get_device() isn't active. It's wrapped in:
#if ( defined( USE_STATFS_FOR_DEV ) || defined( USE_STATVFS_FOR_DEV ) ) 
which is false.

The attached patch makes it true by defining USE_STATFS_FOR_DEV.


I'm wondering if the port's modifications have been send
upstream as suggested in: 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dads-freedback.html

I get the impression that this is a regression that might
have been prevented if upstream was aware of the port's needs.
>How-To-Repeat:
fk@TP51 /tank/test $vobcopy -m -i /cdrom/
[Hint] You use -i. Normally this is not necessary, vobcopy finds the input dir by itself. This option is only there if vobcopy makes trouble.
[Hint] If vobcopy makes trouble, please mail me so that I can fix this (robos@muon.de). Thanks
Vobcopy 1.1.0 - GPL Copyright (c) 2001 - 2007 robos@muon.de
[Hint] All lines starting with "libdvdread:" are not from vobcopy but from the libdvdread-library
[Error] Could not read /etc/mtab!
[Error] error: No such file or directory
[Error] Could not get the device which belongs to the given path!

>Fix:


Patch attached with submission follows:

diff -u -ruN .zfs/snapshot/2008-07-03/sysutils/vobcopy/Makefile sysutils/vobcopy/Makefile
--- .zfs/snapshot/2008-07-03/sysutils/vobcopy/Makefile	2008-05-18 16:43:33.503534326 +0200
+++ sysutils/vobcopy/Makefile	2008-07-03 19:12:34.314115371 +0200
@@ -7,6 +7,7 @@
 
 PORTNAME=	vobcopy
 PORTVERSION=	1.1.1
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	http://vobcopy.org/download/ \
 		CRITICAL
diff -u -ruN .zfs/snapshot/2008-07-03/sysutils/vobcopy/files/patch-vobcopy.h sysutils/vobcopy/files/patch-vobcopy.h
--- .zfs/snapshot/2008-07-03/sysutils/vobcopy/files/patch-vobcopy.h	2008-05-06 10:49:02.431135422 +0200
+++ sysutils/vobcopy/files/patch-vobcopy.h	2008-07-03 19:17:22.669983450 +0200
@@ -1,5 +1,5 @@
--- vobcopy.h.orig       2008-04-13 14:01:03.000000000 +0000
-+++ vobcopy.h   2008-04-13 14:08:18.000000000 +0000
+--- vobcopy.h.orig	2008-02-19 06:27:04.000000000 +0100
++++ vobcopy.h	2008-07-03 17:04:11.890928512 +0200
 @@ -58,7 +58,7 @@
  /* //////////  *BSD //////////  */
  #if ( defined( BSD ) && ( BSD >= 199306 ) )
@@ -9,7 +9,7 @@
         ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) )
  #include <sys/mount.h>
  #define USE_STATFS 1
-@@ -87,12 +87,13 @@
+@@ -87,12 +87,14 @@
  #define GETMNTINFO_USES_STATVFS
 
  #    endif
@@ -18,6 +18,7 @@
 -#  else
 -
 +#if defined(__FreeBSD__)
++#define USE_STATFS_FOR_DEV
 +#include <sys/statvfs.h>
 +#else
  #include <sys/vfs.h>


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807131827.m6DIRaDO023893>