NetBSD Problem Report #46331

From neil@athlon2.akihabara.co.uk  Sat Apr 14 06:03:06 2012
Return-Path: <neil@athlon2.akihabara.co.uk>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id F306863B9FE
	for <gnats-bugs@gnats.netbsd.org>; Sat, 14 Apr 2012 06:03:05 +0000 (UTC)
Message-Id: <201204140501.q3E51TLi066597@athlon2.akihabara.co.uk>
Date: Sat, 14 Apr 2012 14:01:29 +0900 (JST)
From: kyuupichan@gmail.com
Reply-To:
To: gnats-bugs@gnats.netbsd.org
Cc:
Subject: Fix for misc/calibre on DragonflyBSD
X-Send-Pr-Version: 3.113.1
X-GNATS-Notify:

>Number:         46331
>Category:       pkg
>Synopsis:       misc/calibre does not install on Dragonfly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gls
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 14 06:05:00 +0000 2012
>Last-Modified:  Sat Apr 14 14:20:03 +0000 2012
>Originator:     Neil Booth
>Release:        DragonFly 3.1-DEVELOPMENT
>Organization:
None
>Environment:
System: DragonFly athlon2.akihabara.co.uk 3.1-DEVELOPMENT DragonFly v3.1.0.357.g753df-DEVELOPMENT #1: Thu Mar 22 07:59:02 JST 2012 root@athlon2.akihabara.co.uk:/usr/obj/usr/src/sys/X86_64_GENERIC x86_64

>Description:
	Install fails with bad PLIST.  Fixed below.

	Also, if using SUDO I need to install like so because the calibre install process drops priveleges to SUDO_UID, and then fails as it has insufficient file permissions to the install area.  I don't know how to fix this in the package.  It'd be great if this were fixed.

   /usr/pkgsrc/misc/calibre$ sudo SUDO_UID=0 bmake install

>How-To-Repeat:
	install on Dragonfly
>Fix:

diff --git a/misc/calibre/distinfo b/misc/calibre/distinfo
index 0160a18..c63f507 100644
--- a/misc/calibre/distinfo
+++ b/misc/calibre/distinfo
@@ -3,6 +3,7 @@ $NetBSD: distinfo,v 1.9 2012/01/21 17:53:32 gls Exp $
 SHA1 (calibre-0.8.39.tar.xz) = 842baff5f98c579ee4b7b28e4b8240f15e7de5e7
 RMD160 (calibre-0.8.39.tar.xz) = 3d8ed5ae5073329dea7952422cf06691f8ce1803
 Size (calibre-0.8.39.tar.xz) = 23788948 bytes
+SHA1 (patch-src_calibre_constants.py) = 5e8d2bf77f1adece77b34c79388c662d0f31135b
 SHA1 (patch-src_calibre_devices_scanner.py) = 3d4ba3d9075898866cdb499f65258022224e5812
-SHA1 (patch-src_calibre_ebooks_pdf_images.cpp) = 950f0302f3c387fb9b4ee41cd96d7c5103b7ad45
-SHA1 (patch-src_calibre_linux_py) = 0f4b9c09d2a6de22ca0044895e1ab35184ae7d72
+SHA1 (patch-src_calibre_ebooks_pdf_images.cpp) = 67fc9a72b188f24be0c710caafcfe81b1f4d15d7
+SHA1 (patch-src_calibre_linux_py) = 86d501f201ae8e891ccf662684899e44b2f9c006
diff --git a/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp b/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp
index 7efee3f..e77260e 100644
--- a/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp
+++ b/misc/calibre/patches/patch-src_calibre_ebooks_pdf_images.cpp
@@ -1,8 +1,8 @@
 $NetBSD$

---- src/calibre/ebooks/pdf/images.cpp.orig	2011-04-08 17:20:30.000000000 +0000
+--- src/calibre/ebooks/pdf/images.cpp.orig	2012-02-10 04:59:10.000000000 +0000
 +++ src/calibre/ebooks/pdf/images.cpp
-@@ -16,6 +16,7 @@
+@@ -17,6 +17,7 @@

  #include "images.h"
  #include "utils.h"
diff --git a/misc/calibre/patches/patch-src_calibre_linux_py b/misc/calibre/patches/patch-src_calibre_linux_py
index 803bffa..fde56d6 100644
--- a/misc/calibre/patches/patch-src_calibre_linux_py
+++ b/misc/calibre/patches/patch-src_calibre_linux_py
@@ -3,14 +3,23 @@ $NetBSD$
 Lifted from ArchLinux, saves mime and desktop files on disk
 instead of trying to add them directly.

---- src/calibre/linux.py.orig	Sun Jul 17 13:26:34 2011
-+++ src/calibre/linux.py	Sun Jul 17 13:37:59 2011
-@@ -140,19 +140,7 @@ class PostInstall:
+--- src/calibre/linux.py.orig	2012-02-10 04:59:10.000000000 +0000
++++ src/calibre/linux.py
+@@ -7,7 +7,7 @@ import sys, os, cPickle, textwrap, stat,
+ from subprocess import check_call
+ 
+ from calibre import  __appname__, prints, guess_type
+-from calibre.constants import islinux, isnetbsd, isbsd
++from calibre.constants import islinux, isnetbsd, isbsd, ispkgsrc
+ from calibre.customize.ui import all_input_formats
+ from calibre.ptempfile import TemporaryDirectory
+ from calibre import CurrentDir
+@@ -140,18 +140,6 @@ class PostInstall:
          self.install_man_pages()
          if islinux or isbsd:
              self.setup_desktop_integration()
 -        self.create_uninstaller()
- 
+-
 -        from calibre.utils.config import config_dir
 -        if os.path.exists(config_dir):
 -            os.chdir(config_dir)
@@ -21,10 +30,18 @@ instead of trying to add them directly.
 -                        shutil.rmtree(f) if os.path.isdir(f) else os.unlink(f)
 -                if os.stat(config_dir).st_uid == 0:
 -                    os.rmdir(config_dir)
--
+ 
          if warn is None and self.warnings:
              self.info('There were %d warnings'%len(self.warnings))
-             for args, kwargs in self.warnings:
+@@ -195,7 +183,7 @@ class PostInstall:
+             if os.path.exists(bc):
+                 f = os.path.join(bc, 'calibre')
+             else:
+-                if isnetbsd:
++                if isnetbsd or ispkgsrc:
+                     f = os.path.join(self.opts.staging_root, 'share/bash_completion.d/calibre')
+                 else:
+                     f = os.path.join(self.opts.staging_etc, 'bash_completion.d/calibre')
 @@ -321,7 +309,7 @@ class PostInstall:
                  if isbsd:
                      manfile = os.path.join(manpath, prog+'.1')

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->gls
Responsible-Changed-By: gls@NetBSD.org
Responsible-Changed-When: Sat, 14 Apr 2012 06:36:28 +0000
Responsible-Changed-Why:
I'll take it.


From: Kyuupi <kyuupichan@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/46331 (misc/calibre does not install on Dragonfly)
Date: Sat, 14 Apr 2012 23:19:19 +0900

 --20cf305b097e60eb3e04bda44620
 Content-Type: multipart/alternative; boundary=20cf305b097e60eb3904bda4461e

 --20cf305b097e60eb3904bda4461e
 Content-Type: text/plain; charset=UTF-8

 Hi, I realised my diff was incomplete as I'd not done git add for the new
 file.  Apologies for the confusion.  I've attached what I think is a proper
 diff.

 Any issues let me know.  Thanks.

 Neil.

 On 14 April 2012 15:36, <gls@netbsd.org> wrote:

 > Synopsis: misc/calibre does not install on Dragonfly
 >
 > Responsible-Changed-From-To: pkg-manager->gls
 > Responsible-Changed-By: gls@NetBSD.org
 > Responsible-Changed-When: Sat, 14 Apr 2012 06:36:28 +0000
 > Responsible-Changed-Why:
 > I'll take it.
 >
 >
 >
 >

 --20cf305b097e60eb3904bda4461e
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable

 Hi, I realised my diff was incomplete as I&#39;d not done git add for the n=
 ew file.=C2=A0 Apologies for the confusion.=C2=A0 I&#39;ve attached what I =
 think is a proper diff.<br><br>Any issues let me know.=C2=A0 Thanks.<br><br=
 >Neil.<br><br>
 <div class=3D"gmail_quote">On 14 April 2012 15:36,  <span dir=3D"ltr">&lt;<=
 a href=3D"mailto:gls@netbsd.org">gls@netbsd.org</a>&gt;</span> wrote:<br><b=
 lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px =
 #ccc solid;padding-left:1ex">
 Synopsis: misc/calibre does not install on Dragonfly<br>
 <br>
 Responsible-Changed-From-To: pkg-manager-&gt;gls<br>
 Responsible-Changed-By: gls@NetBSD.org<br>
 Responsible-Changed-When: Sat, 14 Apr 2012 06:36:28 +0000<br>
 Responsible-Changed-Why:<br>
 I&#39;ll take it.<br>
 <br>
 <br>
 <br>
 </blockquote></div><br>

 --20cf305b097e60eb3904bda4461e--
 --20cf305b097e60eb3e04bda44620
 Content-Type: application/octet-stream; name="cal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mlnX2Rpcikuc3RfdWlk
 ID09IDA6CiAtICAgICAgICAgICAgICAgICAgICBvcy5ybWRpcihjb25maWdfZGlyKQotLQorIAog
 ICAgICAgICAgaWYgd2FybiBpcyBOb25lIGFuZCBzZWxmLndhcm5pbmdzOgogICAgICAgICAgICAg
 IHNlbGYuaW5mbygnVGhlcmUgd2VyZSAlZCB3YXJuaW5ncyclbGVuKHNlbGYud2FybmluZ3MpKQot
 ICAgICAgICAgICAgIGZvciBhcmdzLCBrd2FyZ3MgaW4gc2VsZi53YXJuaW5nczoKK0BAIC0xOTUs
 NyArMTgzLDcgQEAgY2xhc3MgUG9zdEluc3RhbGw6CisgICAgICAgICAgICAgaWYgb3MucGF0aC5l
 eGlzdHMoYmMpOgorICAgICAgICAgICAgICAgICBmID0gb3MucGF0aC5qb2luKGJjLCAnY2FsaWJy
 ZScpCisgICAgICAgICAgICAgZWxzZToKKy0gICAgICAgICAgICAgICAgaWYgaXNuZXRic2Q6Cisr
 ICAgICAgICAgICAgICAgIGlmIGlzbmV0YnNkIG9yIGlzcGtnc3JjOgorICAgICAgICAgICAgICAg
 ICAgICAgZiA9IG9zLnBhdGguam9pbihzZWxmLm9wdHMuc3RhZ2luZ19yb290LCAnc2hhcmUvYmFz
 aF9jb21wbGV0aW9uLmQvY2FsaWJyZScpCisgICAgICAgICAgICAgICAgIGVsc2U6CisgICAgICAg
 ICAgICAgICAgICAgICBmID0gb3MucGF0aC5qb2luKHNlbGYub3B0cy5zdGFnaW5nX2V0YywgJ2Jh
 c2hfY29tcGxldGlvbi5kL2NhbGlicmUnKQogQEAgLTMyMSw3ICszMDksNyBAQCBjbGFzcyBQb3N0
 SW5zdGFsbDoKICAgICAgICAgICAgICAgICAgaWYgaXNic2Q6CiAgICAgICAgICAgICAgICAgICAg
 ICBtYW5maWxlID0gb3MucGF0aC5qb2luKG1hbnBhdGgsIHByb2crJy4xJykK
 --20cf305b097e60eb3e04bda44620--

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.