pdftk

I have come to rely on pdftk, which has disappeared in opensuse 11.2

I tried just cloning the package from 11.1 into factory & 11.2 in OBS, which didn’t work. I tried tracking that down and got bogged down in a maze of dependancies and ultimately some incompatibility with the latest g++ or gcj which I failed to figure out. I see the errors in the build log, I just don’t see what’s wrong with the code, especially since it builds fine on 11.1. It looks like maybe it was always technically incorrect code, but only now gcj or g++ refuses to accept it. But I can’t tell what’s actually wrong with it. And the home site hasn’t been updated in 3 years so no luck there.

Has anyone managed to build pdftk on 11.2 ?
Or, is there some other package that can do what pdftk does ? (non-interactive pdf manipulation)

I see debian and ubuntu still have it in their latest versions. So next I’m going to try just importing a .deb with alien or maybe try porting their patch set over to my OBS package.

Hi
Just use gcc 4.3 as a build requires and export the CC and CXX flags.


%if 0%{?suse_version} == 1120
BuildRequires:	gcc43 gcc43-c++ libstdc++43-devel
%else
BuildRequires:	gcc gcc-c++
%endif

And in the build section at the beginning


%if 0%{?suse_version} == 1120
export CC=/usr/bin/gcc-4.3
export CXX=/usr/bin/g++-4.3
%endif


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.37-0.1-default
up 1 day 20:05, 2 users, load average: 0.44, 0.22, 0.09
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Excellent that worked. Thanks much!

https://build.opensuse.org/package/show?package=pdftk&project=home:aljex

For the record, the exact method I used was a bit different but the idea was the key.


%if 0%{?suse_version} >= 1120
BuildRequires:	gcc43 gcc43-c++ libstdc++43-devel gcc43-java
%else
BuildRequires:	gcc gcc-c++ gcc-java
%endif

Then


%build
%{suse_update_config -fl}
%if 0%{?suse_version} >= 1120
VERSUFF=-4.3
%endif
unset CLASSPATH && cd pdftk && make -f Makefile.RedHat VERSUFF=$VERSUFF && cd -

aljex wrote:

>
> Excellent that worked. Thanks much!
>
> https://build.opensuse.org/package/show?package=pdftk&project=home:aljex
>
> For the record, the exact method I used was a bit different but the
> idea was the key.

I also rely on it. Isn’t there some mechanism for recommending it be
re-included in the repos?

Hi
Ask the packager to put the package into contrib and maintain it :slight_smile:


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.2 (i586) Kernel 2.6.31.5-0.1-desktop
up 1 day 6:20, 1 user, load average: 0.12, 0.15, 0.05
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

Well I wouldn’t mind doing that but I’m not sure I have the time or ability to meet the quality level expected according to the intro docs.

My ability and/or time I have available basically goes as far as “get it to build”, staying up to date with upstream and with opensuse, applying patches others provide.

Things my reading of the Contrib doc implies, which I would mostly not be able to do:
Fix bugs.
Fix security issues.
Audit patches others may supply for quality to decide if they should actually be applied or not, or corrected before applying.
Test or even build for any other platform besides i386 and x86_64. I could let OBS try to build the other platforms but wouldn’t be able to test and probably wouldn’t be able to actually fix any problems.

The closest I could come would be a completely lame parasitic cheat, ie, I could just find someone elses package that has a real maintainer, like maybe debian’s, and just track their package the same as, or instead of, tracking upstream.

But if that’s actually good enough I’d do that no problem.

Otherwise, just deal with getting it from the home:aljex repo.

Hi
Looks like you need to add a requires to your spec file;

  • libgcj43

A user posted a problem about it :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.37-0.1-default
up 13:35, 3 users, load average: 0.29, 0.15, 0.10
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Ahh, yup…
Done.
Thanks for the heads up.


bkw

You can also alternatively use gs:
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf input1.pdf input2.pdf …

Anyway thank for the instruction to compile pdftk. I am trying that right now. I have more confidence in pdftk then gs as it can crash with some characters.:frowning:

Andre.

What I tend to do is grab someone else’s spec file (from 11.1) and see if I can build it under 11.2. ie with something like:

rpmbuild --rebuild  pdftk-1.41-103.1.src.rpm     

I’m rattling that syntax off the top of my head, so I may have it wrong.

One can go here under 11.1, and find many users who package pdftk for 11.1 and then go to their repos directory, find the “src” directory, and drag one of their source files back:
Webpin search for pdftk in openSUSE-11.1

I have not checked, but some of them may have already packaged pdftk for 11.2. Webpin is still not functioning for 11.2, making 11.2 application searches a bit more difficult.

Hi
Here’s a webpin fix for 11.2


wget
http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_11.2/noarch/webpin-1.2.0-2.1.noarch.rpm
sudo rpm -Uhv webpin-1.2.0-2.1.noarch.rpm

The following edit info is on the user mailing list however I modified
the version either manually edit or copy/save and patch it.

The file to edit is /usr/lib/python2.6/site-packages/webpin/const.py
Patch details here: http://pastebin.com/f5727aa03


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.2 (i586) Kernel 2.6.31.5-0.1-desktop
up 1 day 2:17, 1 user, load average: 0.08, 0.05, 0.00
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

Somebody (aljex) did it. The one in this repo work:
Index of /repositories/home:/aljex/openSUSE_11.2

Webpin still does’t work. but you can do:
software.opensuse.org/search.

Many thanks toward aljex.

Somebody (aljex) did it. The one in this repo work:
Index of /repositories/home:/aljex/openSUSE_11.2

Tried this but YaST reports about a missing libgcj43

Used this instead and it worked
Index of /repositories/home:/enzokiel/openSUSE_11.2_Update

For the openSUSE 11.3 version, I have cloned the pdftk project (based on the version from home:aljex) into my own repository:
Index of /repositories/home:/PVince81/openSUSE_11.3