Bug 537640 - Review Request: pdfmod - A simple application for modifying PDF documents
Summary: Review Request: pdfmod - A simple application for modifying PDF documents
Keywords:
Status: CLOSED DUPLICATE of bug 834552
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 530910 537639 607405
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-15 11:50 UTC by Sebastian Dziallas
Modified: 2012-06-22 11:25 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-22 11:25:58 UTC
Type: ---
Embargoed:
ismael: fedora-review?


Attachments (Terms of Use)

Description Sebastian Dziallas 2009-11-15 11:50:11 UTC
Spec URL: http://sdz.fedorapeople.org/rpmbuild/pdfmod.spec
SRPM URL: http://sdz.fedorapeople.org/rpmbuild/pdfmod-0.8-1.fc12.src.rpm

Description: This package requires Hyena to build.

Comment 1 Michael Monreal 2010-02-06 23:19:15 UTC
pdfmod really is a great little tool and I would love to see it in Fedora...

AFAIK it is based on pdfsharp, is this library bundled?

Comment 2 Sebastian Dziallas 2010-02-06 23:30:27 UTC
Ouch, scratch that. I should have looked deeper. Yup, it is. Looks like a good time to go for system-libs of pdfsharp and poppler-sharp, heh. ;)

Comment 3 Phil Mayers 2010-02-17 13:03:34 UTC
This doesn't build under a clean F12 buildroot (mock) for me, because the makefile tries to:

cp /usr/lib64/hyena/Hyena.dll /usr/lib64/hyena/Hyena.Gui.dll ../bin
cp: cannot stat `/usr/lib64/hyena/Hyena.dll': No such file or directory
cp: cannot stat `/usr/lib64/hyena/Hyena.Gui.dll': No such file or directory
make[1]: *** [../bin/PdfMod.exe] Error 1
make[1]: Leaving directory `/builddir/build/BUILD/pdfmod-0.8/src'

...and pdfmod.spec only:

Requires: hyena-devel

...which just contains the .pc files, not the .dll files. Whether hyena-devel should depend on hyena or pdfmod should BuildRequires: both of them I don't pretend to know.

Also, pdfmod needs:

BuildRequires: gnome-doc-utils desktop-file-utils

With these changes, the package looks good.

Comment 4 Sebastian Dziallas 2010-02-17 17:00:29 UTC
Oh, yup. Good point! In fact, hyena-devel should have a requires tag on hyena. I'm going to add the other build requirements here in a second.

I'm not so sure about the libraries, though. Apparently, pdfmod bundles pdfsharp and poppler-sharp. Neither of these is apparently packaged in a distribution (I just checked openSUSE for fun). The author of pdfmod claims that he put the source for the one pdfsharp library that pdfmod needs in for exactly that reason.

Is this a blocker here? If so, I'd need to have somebody taking on pdfsharp, since I've no idea how to get from a .sln file to an .rpm.

Comment 5 Sebastian Dziallas 2010-04-02 09:59:53 UTC
I'm sorry for the extremely long delay here. I thought I had uploaded the fixed stuff already but apparently didn't. Here's an update to the latest version of pdfmod, together with the fixed build requirements. Any takers?

Spec URL: http://sdz.fedorapeople.org/rpmbuild/pdfmod.spec
SRPM URL: http://sdz.fedorapeople.org/rpmbuild/pdfmod-0.8.1-1.fc13.src.rpm

Comment 6 Claudio Rodrigo Pereyra DIaz 2010-06-11 12:24:53 UTC
This is my first attempt to start becoming a packager.
Any comment is welcome to learn
I make changes to the file spec to work well, please check

Spec URL: http://elsupergomez.fedorapeople.org/SPECS/pdfmod.spec
SRPM URL: http://elsupergomez.fedorapeople.org/SRPMS/pdfmod-0.8.3-1.fc13.src.rpm

RPM for test: http://elsupergomez.fedorapeople.org/repo/pdfmod-0.8.3-1.fc13.noarch.rpm

Comment 7 Bastien Nocera 2010-06-16 12:34:27 UTC
This is wrong:
%{_datadir}/icons/hicolor/

You don't own that directory, you should have the files themselves listed. And your package doesn't run gtk-update-icon-cache in the scriptlets, so when installing from the RPM on a clean system, PDFMod doesn't have an application icon.

Comment 8 Sebastian Dziallas 2010-06-22 10:35:14 UTC
Yup, you're right.

Since both pdfsharp and poppler-sharp would probably have to be packaged first (pdfmod bundles these) and especially the former one lacks a build system I'm used to, I don't think I'll be able to pursue this much further.

Claudio, are you willing to take this over? Otherwise I'm going to close this.

Comment 9 Claudio Rodrigo Pereyra DIaz 2010-06-22 11:58:18 UTC
Yes I will try go to finish, and correct the fails, and split the dependencies.
I will update this request soon with necesary changes.

Comment 10 Sebastian Dziallas 2010-06-22 12:33:16 UTC
That's awesome, thank you! :)

Comment 11 Claudio Rodrigo Pereyra DIaz 2010-06-24 02:47:26 UTC
I opened new request https://bugzilla.redhat.com/show_bug.cgi?id=607405 for
packaging poppler-sharp required for pdfmod. Later I will modify pdfmod.spec
for ask this dependency.
For pdfsharp is most complicated because no have makefile and I need compiling
from scratch.
Please review the poppler-sharp.

Thanks!

Comment 12 Luke Hutchison 2010-10-03 05:22:40 UTC
Claudio -- I just tried installing your packages from http://elsupergomez.fedorapeople.org/repo/ on F14, and I get the following error on opening the file chooser:


Marshaling activate signal
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Argument cannot be null.
Parameter name: path2
  at System.IO.Path.Combine (System.String path1, System.String path2) [0x00000] in <filename unknown>:0 
  at Hyena.XdgBaseDirectorySpec.GetXdgDirectoryUnderHome (System.String key, System.String fallback) [0x00000] in <filename unknown>:0 
  at PdfMod.Gui.Client.<CreateChooser>m__A (System.String s) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[System.String,System.String].MoveNext () [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[System.String].MoveNext () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[System.String].AddEnumerable (IEnumerable`1 enumerable) [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.List`1[System.String]..ctor (IEnumerable`1 collection) [0x00000] in <filename unknown>:0 
  at System.Linq.Enumerable.ToArray[String] (IEnumerable`1 source) [0x00000] in <filename unknown>:0 
  at PdfMod.Gui.Client.CreateChooser (System.String title, FileChooserAction action) [0x00000] in <filename unknown>:0 
  at PdfMod.Gui.Actions.OnOpen (System.Object o, System.EventArgs args) [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 
  at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0 
  at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0 
  at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0 
  at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
  at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0 
  at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at PdfMod.Gui.Client..ctor(Boolean loadFiles)
   at PdfMod.PdfMod.Main(System.String[] args)

Comment 13 Luke Hutchison 2010-10-03 05:23:03 UTC
+ If I try to launch pdfmod with a PDF filename on the commandline, I get the following (F14 has bumped up the .so version to 5):


Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.DllNotFoundException: libpoppler-glib.so.4
  at (wrapper managed-to-native) Poppler.Document:poppler_document_new_from_file (intptr,intptr,intptr&)
  at Poppler.Document.NewFromFile (System.String uri, System.String password) [0x00000] in <filename unknown>:0 
  at PdfMod.Pdf.Document.get_PopplerDoc () [0x00000] in <filename unknown>:0

Comment 14 Claudio Rodrigo Pereyra DIaz 2010-10-04 19:44:07 UTC
Update the .spec and .srpm files for the latest upstream version

Spec URL: http://elsupergomez.fedorapeople.org/SPECS/pdfmod.spec
SRPM URL:
http://elsupergomez.fedorapeople.org/SRPMS/pdfmod-0.9-1.fc13.src.rpm

Luke Hutchison, please try the last version, you can find compiled rpm in http://elsupergomez.fedorapeople.org/repo/ for x86_64 or try compile for your arch using srpm

Comment 15 Luke Hutchison 2010-10-05 03:20:52 UTC
Claudio Rordrigo -- with your latest RPMs I get the following (also the RPMs are built with "fc13" in the name, they should probably be built for fc14 if you are proposing the module for inclusion?):

$ pdfmod test.pdf 
[Debug 23:21:50.303] Starting PdfMod
[Debug 23:21:50.331] Initializing i18n catalog from /usr/share/locale/

** (PdfMod:13933): WARNING **: AT-SPI: Accessibility bus not found - Using session bus.


(PdfMod:13933): Bonobo-WARNING **: Bonobo must be initialized before use
[Debug 23:21:50.566] Loaded custom AccelMap from /home/luke/.config/pdfmod/gtk_accel_map
[Debug 23:21:50.717] Cache directory set to /home/luke/.cache/pdfmod

** (PdfMod:13933): WARNING **: The following assembly referenced from /usr/lib64/pdfmod/PdfMod.exe could not be loaded:
     Assembly:   poppler-sharp    (assemblyref_index=13)
     Version:    0.0.0.0
     Public Key: (none)
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/usr/lib64/pdfmod/).


** (PdfMod:13933): WARNING **: Could not load file or assembly 'poppler-sharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

Unhandled Exception: System.TypeLoadException: A type load exception has occurred.
  at PdfMod.Gui.Actions..ctor (PdfMod.Gui.Client app, Hyena.Gui.ActionManager action_manager) [0x00000] in <filename unknown>:0 
  at PdfMod.Gui.Client..ctor (Boolean loadFiles) [0x00000] in <filename unknown>:0 
  at PdfMod.PdfMod.Main (System.String[] args) [0x00000] in <filename unknown>:0

Comment 16 Aidan Delaney 2010-10-08 11:01:19 UTC
I get the same poppler-sharp gac error on F14.

Comment 17 Aidan Delaney 2010-10-08 11:04:33 UTC
I have to use
MONO_PATH=/usr/lib64/poppler-sharp pdfmod
to launch.

Are you registering poppler-sharp with the GAC correctly?

Comment 18 Aidan Delaney 2010-10-08 11:06:37 UTC
And I get a poppler-glib error after trying to add a PDF to edit.

 MONO_PATH=/usr/lib64/poppler-sharp pdfmod
[Debug 12:03:43.884] Starting PdfMod
[Debug 12:03:43.892] Initializing i18n catalog from /usr/share/locale/
[Debug 12:03:44.031] Cache directory set to /home/aidan/.cache/pdfmod
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.DllNotFoundException: poppler-glib
  at (wrapper managed-to-native) Poppler.Document:poppler_document_new_from_file (intptr,intptr,intptr&)
  at Poppler.Document.NewFromFile (System.String uri, System.String password) [0x00000] in <filename unknown>:0 
  at PdfMod.Pdf.Document.get_PopplerDoc () [0x00000] in <filename unknown>:0 
  at PdfMod.Pdf.Document.GetSurface (PdfMod.Pdf.Page page, Int32 w, Int32 h, Int32 min_width) [0x00000] in <filename unknown>:0 
  at PdfMod.Gui.PageCell.Render (Cairo.Context cr, Double width, Double height, CellRendererState state) [0x00000] in <filename unknown>:0 
  at PdfMod.Gui.CairoCell.Render (Gdk.Drawable window, Gtk.Widget widget, Rectangle background_area, Rectangle cell_area, Rectangle expose_area, CellRendererState state) [0x00000] in <filename unknown>:0 
  at Gtk.CellRenderer.Render_cb (IntPtr item, IntPtr window, IntPtr widget, Gdk.Rectangle& background_area, Gdk.Rectangle& cell_area, Gdk.Rectangle& expose_area, CellRendererState flags) [0x00000] in <filename unknown>:0 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at Gtk.CellRenderer.Render_cb(IntPtr item, IntPtr window, IntPtr widget, Rectangle ByRef background_area, Rectangle ByRef cell_area, Rectangle ByRef expose_area, CellRendererState flags)
   at Gtk.Application.gtk_main()
   at Gtk.Application.Run()
   at PdfMod.Gui.Client..ctor(Boolean loadFiles)
   at PdfMod.PdfMod.Main(System.String[] args)
Cairo.Context: called from finalization thread, programmer is missing a call to Dispose

Comment 19 Aidan Delaney 2010-10-08 11:09:45 UTC
The poppler-glib issue seems to be because there is no /usr/lib64/libpoppler-glib.so only  /usr/lib64/libpoppler-glib.so.5 and  /usr/lib64/libpoppler-glib.so.5.0.0

Apologies for this stream-of-conciousness stuff.  I'll stop for a while :)

Comment 20 Claudio Rodrigo Pereyra DIaz 2011-03-22 15:33:31 UTC
Update the .spec and .srpm files for the latest upstream version

Spec URL: http://elsupergomez.fedorapeople.org/SPECS/pdfmod.spec
SRPM URL:
http://elsupergomez.fedorapeople.org/SRPMS/pdfmod-0.9.1-1.fc14.src.rpm

Comment 21 Luke Hutchison 2011-08-04 18:51:43 UTC
Any updates on this? It doesn't work on Fedora 15:

$ pdfmod
[Debug 14:39:48.324] Starting PdfMod
[Debug 14:39:48.351] Initializing i18n catalog from /usr/share/locale/
[Debug 14:39:48.527] Cache directory set to /home/luke/.cache/pdfmod

Unhandled Exception: System.TypeLoadException: A type load exception has occurred.
  at PdfMod.Gui.Actions..ctor (PdfMod.Gui.Client app, Hyena.Gui.ActionManager action_manager) [0x00000] in <filename unknown>:0 
  at PdfMod.Gui.Client..ctor (Boolean loadFiles) [0x00000] in <filename unknown>:0 
  at PdfMod.PdfMod.Main (System.String[] args) [0x00000] in <filename unknown>:0

Comment 22 Ismael Olea 2011-08-22 19:01:14 UTC
I assume pdfmod can not be approved without hyena (#530910), am I right?

Comment 23 Claudio Rodrigo Pereyra DIaz 2011-08-22 23:28:45 UTC
(In reply to comment #22)
> I assume pdfmod can not be approved without hyena (#530910), am I right?

You rught hyena is necesary for PdfMod

Comment 24 Ismael Olea 2011-08-22 23:39:00 UTC
So, are you or Sebastian interested in maintaning both?

Comment 25 Claudio Rodrigo Pereyra DIaz 2011-08-29 15:51:02 UTC
Update the .spec and .srpm files fix libpoppler-glib missing
Uses bundle poppler-sharp

Spec URL: http://elsupergomez.fedorapeople.org/SPECS/pdfmod.spec
SRPM URL:
http://elsupergomez.fedorapeople.org/SRPMS/pdfmod-0.9.1-2.fc14.src.rpm

Aditional:
Spec URL: http://elsupergomez.fedorapeople.org/SPECS/pdfmod-external-poppler-sharp.spec
SRPM URL:
http://elsupergomez.fedorapeople.org/SRPMS/pdfmod-0.9.1-1.fc14-external-poppler-sharp.src.rpm

I am interested in maintaining both.

Comment 26 Ismael Olea 2011-11-10 22:01:17 UTC
I'm  reviewing your pdfmod-external-poppler-sharp.spec

I'm using the interin revisions of poppler-sharp and hyena from their respective bugs entries.

First thing I notice is it's not compiling in Fedora 15: http://pastebin.com/8Him1kqf

I made some modifications from SuSE pdfmod and it builds, which are available at http://olea.org/tmp/pdfmod-0.9.1-2.fc15.src.rpm. It still needs some rpmlint love.

Remember to check:
http://fedoraproject.org/wiki/Package_Review_Process http://fedoraproject.org/wiki/Packaging/Guidelines
http://fedoraproject.org/wiki/Packaging:ReviewGuidelines 

to build using mock and rpmlinting as guidelines suggests.

Feel free to reach me for any question if needed.

Comment 27 Ismael Olea 2012-06-22 11:25:58 UTC
As I don't see any advance here I'm submiting the package as me.

*** This bug has been marked as a duplicate of bug 834552 ***


Note You need to log in before you can comment on or make changes to this bug.