ports/179611: running sysutils/pdumpfs fails with ruby19

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ports/179611: running sysutils/pdumpfs fails with ruby19

Tsurutani Naoki

>Number:         179611
>Category:       ports
>Synopsis:       running sysutils/pdumpfs fails with ruby19
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:      
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 16 09:40:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Tsurutani Naoki
>Release:        FreeBSD 8.4-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD h120.65.226.10.32118.vlan.kuins.net 8.4-PRERELEASE FreeBSD 8.4-PRERELEASE #26 r249149: Fri Apr 5 22:13:25 JST 2013 [hidden email]:/usr/local/work/usr/obj/usr/src/sys/POLYMER i386


       
>Description:
        sysutils/pdumpfs can be installed with ruby-1.9x, but it cannot run
        with ruby-1.9x.
       
>How-To-Repeat:
        % pdumpfs /home/turutani /backup/turutani
        /usr/local/lib/ruby/1.9/rubygems/custom_require.rb:36:in `require': cannot load such file -- ftools (LoadError)
                from /usr/local/lib/ruby/1.9/rubygems/custom_require.rb:36:in `require'
                from /usr/local/sbin/pdumpfs:51:in `<main>'
        /usr/local/sbin/pdumpfs exit with status 1.

       
>Fix:
        here is a patch, which should be stored as files/patch-pdumpfs.in:

--- pdumpfs.in.orig 2004-12-21 11:43:12.000000000 +0900
+++ pdumpfs.in 2013-06-16 18:25:25.000000000 +0900
@@ -1,4 +1,4 @@
-#! /usr/bin/env ruby
+#!/usr/local/bin/ruby19
 #
 #  pdumpfs - a daily backup system similar to Plan9's dumpfs.
 #
@@ -48,21 +48,21 @@
 #
 
 require 'find'
-require 'ftools'
+require 'fileutils'
 require 'getoptlong'
 require 'date'
 
 class File
   def self.real_file? (path)
-    File.file?(path) and not File.symlink?(path)
+    FileTest.file?(path) and not FileTest.symlink?(path)
   end
 
   def self.anything_exist? (path)
-    File.exist?(path) or File.symlink?(path)
+    FileTest.exist?(path) or FileTest.symlink?(path)
   end
 
   def self.real_directory? (path)
-    File.directory?(path) and not File.symlink?(path)
+    FileTest.directory?(path) and not FileTest.symlink?(path)
   end
 
   def self.force_symlink (src, dest)
@@ -79,7 +79,7 @@
   end
 
   def self.readable_file? (path)
-    File.file?(path) and File.readable?(path)
+    FileTest.file?(path) and FileTest.readable?(path)
   end
 
   def self.split_all (path)
@@ -129,7 +129,7 @@
   GetVolumeInformation = Win32API.new("kernel32", "GetVolumeInformation",
                                       "PPLPPPPL", "I")
   def get_filesystem_type (path)
-    return nil unless(File.exist?(path))
+    return nil unless(FileTest.exist?(path))
 
     drive = File.expand_path(path)[0..2]
     buff = "\0" * 1024
@@ -868,7 +868,7 @@
       today  = File.join(dest, datedir(start_time), base)
 
       File.umask(0077)
-      File.mkpath(today) unless @dry_run
+      FileUtils.mkpath(today) unless @dry_run
       if latest
         update_snapshot(src, latest, today)
       else
@@ -1018,7 +1018,7 @@
 
       case type
       when "directory"
-        File.mkpath(today)
+        FileUtils.mkpath(today)
       when "unchanged"
         File.force_link(latest, today)
       when "updated"
@@ -1052,7 +1052,7 @@
 
       Find.find(src) do |s|      # path of the source file
         if @matcher.exclude?(s)
-          if File.lstat(s).directory? then Find.prune() else next end
+          if FileTest.directory(s)? then Find.prune() else next end
         end
         r = make_relative_path(s, src)
         l = File.join(latest, r)  # path of the latest  snapshot
@@ -1089,7 +1089,7 @@
 
           case type
           when "directory"
-            File.mkpath(t)
+            FileUtils.mkpath(t)
           when "new_file"
             copy(s, t)
           when "symlink"
       


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ports/179611: running sysutils/pdumpfs fails with ruby19

Tsurutani Naoki
The following reply was made to PR ports/179611; it has been noted by GNATS.

From: Tsurutani Naoki <[hidden email]>
To: [hidden email], [hidden email]
Cc:  
Subject: Re: ports/179611: running sysutils/pdumpfs fails with ruby19
Date: Sat, 22 Jun 2013 21:36:19 +0900

 This is multipart message.
 
 ----------------------2168296956100492
 Content-Type: text/plain; charset=us-ascii
 
 Sorry, previous patch was not correct.
 
 Here is a new patch to ports tree.
 
 
 ----------------------2168296956100492
 Content-Type: application/octet-stream;
  name="pdumpfs.diff"
 Content-Transfer-Encoding: base64
 Content-Disposition: attachment;
  filename="pdumpfs.diff"
 
 LS0tIE1ha2VmaWxlLm9yaWcJMjAxMy0wNS0yOCAwNDo0Njo1MC4wMDAwMDAwMDAgKzA5MDAK
 KysrIE1ha2VmaWxlCTIwMTMtMDYtMjIgMjE6Mjk6MzEuMDAwMDAwMDAwICswOTAwCkBAIC0y
 NSw2ICsyNSwxMSBAQAogT1BUSU9OU19ERUZJTkU9CURPQ1MKIAogLmluY2x1ZGUgPGJzZC5w
 b3J0Lm9wdGlvbnMubWs+CisuaW5jbHVkZSA8YnNkLnBvcnQucHJlLm1rPgorCisuaWYgJHtS
 VUJZX1ZFUn0gPj0gMS45CitFWFRSQV9QQVRDSEVTPSR7UEFUQ0hESVJ9L2V4dHJhcGF0Y2gt
 cGR1bXBmcy5pbgorLmVuZGlmCiAKIGRvLWluc3RhbGw6CiAJJHtJTlNUQUxMX1NDUklQVH0g
 JHtXUktTUkN9L3BkdW1wZnMgJHtQUkVGSVh9L3NiaW4vCkBAIC0zNiw0ICs0MSw0IEBACiAJ
 JHtDUH0gLVIgJHtXUktTUkN9L2RvYyAke0RPQ1NESVJ9LwogLmVuZGlmCiAKLS5pbmNsdWRl
 IDxic2QucG9ydC5taz4KKy5pbmNsdWRlIDxic2QucG9ydC5wb3N0Lm1rPgotLS0gL2Rldi9u
 dWxsCTIwMTMtMDYtMjIgMjE6MzM6MDAuMDAwMDAwMDAwICswOTAwCisrKyBmaWxlcy9leHRy
 YXBhdGNoLXBkdW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oKSBlbHNlIG5leHQg
 ZW5kCisrICAgICAgICAgIGlmIEZpbGVUZXN0LmRpcmVjdG9yeT8ocykgdGhlbiBGaW5kLnBy
 dW5lKCkgZWxzZSBuZXh0IGVuZAorICAgICAgICAgZW5kCisgICAgICAgICByID0gbWFrZV9y
 ZWxhdGl2ZV9wYXRoKHMsIHNyYykKKyAgICAgICAgIHQgPSBGaWxlLmpvaW4oZGVzdCwgcikK
 K0BAIC0xMDg5LDcgKzEwODksNyBAQAorIAorICAgICAgICAgICBjYXNlIHR5cGUKKyAgICAg
 ICAgICAgd2hlbiAiZGlyZWN0b3J5IgorLSAgICAgICAgICAgIEZpbGUubWtwYXRoKHQpCisr
 ICAgICAgICAgICAgRmlsZVV0aWxzLm1rcGF0aCh0KQorICAgICAgICAgICB3aGVuICJuZXdf
 ZmlsZSIKKyAgICAgICAgICAgICBjb3B5KHMsIHQpCisgICAgICAgICAgIHdoZW4gInN5bWxp
 bmsiCg==
 
 ----------------------2168296956100492--
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"