Bug 833546 - pnmtops fails on multi-page PAM files
pnmtops fails on multi-page PAM files
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: netpbm (Show other bugs)
18
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Petr Hracek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-19 14:20 EDT by Wolfgang Denk
Modified: 2013-06-13 01:58 EDT (History)
2 users (show)

See Also:
Fixed In Version: netpbm-10.61.01-2.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-13 01:58:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
PAM file used as input for pnmtops, output from old (FC16) and from new (FC17) code (78.95 KB, application/x-gzip)
2012-06-19 14:20 EDT, Wolfgang Denk
no flags Details
Log of attempts to install netpbm*-10.61.01-2.fc18.x86_64 RPMs (9.40 KB, text/plain)
2013-05-29 04:39 EDT, Wolfgang Denk
no flags Details

  None (edit)
Description Wolfgang Denk 2012-06-19 14:20:34 EDT
Created attachment 593036 [details]
PAM file used as input for pnmtops, output from old (FC16) and from new (FC17) code

Description of problem:

pnmtops fails on multi-page PAM files - it generates output for the
first page only.

We use a script similar to the following code to generate multi-page
PDF files from fax messages received through a fax modem (uding
mgetty+sendfax for the actual receiving):

for file in $G3_FILES
do
	g32pbm $file  | \
	pamchannel -tupletype GRAYSCALE 0
done | \
pnmtops -noturn -imageheight 11.68 --imagewidth 8.27 | \
ps2pdf - -

This has been working fine al the time, but stopped working when
updating netpbm-progs to the Fedora 17 version; now we always get the
first page only.

Version-Release number of selected component (if applicable):

netpbm-progs-10.57.02-1.fc17.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Start with at least 2 pages of G3 data:

	$ file fffe0bc91S5.0*
	fffe0bc91S5.01: raw G3 data, byte-padded
	fffe0bc91S5.02: raw G3 data, byte-padded

2. Convert these into PAM as follows:

	$ for file in fffe0bc91S5.0* ; do g32pbm $file | \
	  pamchannel -tupletype GRAYSCALE 0; done >pam.out

   Note: an example "pam.out" is attached for further testing:

3. Convert the PAM file to PS:

	$ pnmtops -noturn -imageheight 11.68 --imagewidth 8.27 <pam.out >new.ps

4. Check page count in result:

	$ fgrep '%%Pages' new.ps
	%%Pages: 1
	$ 

5. Compare result against Fedora 16 code base:

	$ sudo chroot /f16 rpm -qf /usr/bin/pnmtops
	netpbm-progs-10.47.31-1.fc16.x86_64
	LD_LIBRARY_PATH=/f16/usr/lib64 /f16/usr/bin/pnmtops -noturn \
		-imageheight 11.68 --imagewidth 8.27 <pam.out >old.ps
	$ fgrep '%%Pages' old.ps
	%%Pages: 1
	%%Pages: 1
	$ 

  
Actual results:

Generated output file contains only a single page of date, and
actually terminated without properly closing the PostScript code:

$ tail -10 new.ps
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

$ 

Expected results:

Proper multi-page output, with correct PostScript code, see for
example:

$ tail -10 old.ps
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
currentdict /inputf undef
currentdict /picstr undef
currentdict /rpicstr undef
currentdict /gpicstr undef
currentdict /bpicstr undef
grestore
showpage
%%Trailer
$ 

Additional info:

see attached pam.out, old.ps, new.ps
Comment 1 Wolfgang Denk 2013-04-20 09:48:51 EDT
Still present in F18.  Of course - nobody fixes bugs in Fedora any more.
Guys, this is *frustrating!*
Comment 2 Petr Hracek 2013-04-23 08:27:29 EDT
Hi Wolfang,

thank for the bug.
I will investigate on the issue.

Petr
Comment 3 Fedora Update System 2013-05-28 05:03:12 EDT
netpbm-10.61.02-3.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/netpbm-10.61.02-3.fc19
Comment 4 Petr Hracek 2013-05-28 06:06:35 EDT
Well corrections is committed in git:
scm (http://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130527/1028164.html)-> MODIFIED

How to test correction:
1) Download on system where is applied patch pam.out files from attachment
2) Run command mentioned in step 3 from reported
3) Check whether two pages are in PostScript file like is mentioned in step 4
Comment 5 Fedora Update System 2013-05-28 06:14:27 EDT
netpbm-10.61.01-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/netpbm-10.61.01-2.fc18
Comment 6 Wolfgang Denk 2013-05-28 07:23:55 EDT
(In reply to Fedora Update System from comment #5)
> netpbm-10.61.01-2.fc18 has been submitted as an update for Fedora 18.
> https://admin.fedoraproject.org/updates/netpbm-10.61.01-2.fc18

Hm... something appears to be wrong with this RPM; I cannot install it on a x86_64 system, because it complains about dependency on a not installed i686 version:

# yum localinstall netpbm-10.61.01-2.fc18.x86_64.rpm
Loaded plugins: fastestmirror, langpacks, presto
Examining netpbm-10.61.01-2.fc18.x86_64.rpm: netpbm-10.61.01-2.fc18.x86_64
Marking netpbm-10.61.01-2.fc18.x86_64.rpm as an update to netpbm-10.61.01-1.fc18.x86_64
Resolving Dependencies
--> Running transaction check
---> Package netpbm.x86_64 0:10.61.01-1.fc18 will be updated
--> Processing Dependency: netpbm = 10.61.01-1.fc18 for package: netpbm-progs-10.61.01-1.fc18.x86_64
Loading mirror speeds from cached hostfile
 * fedora: mirror.proserve.nl
 * rpmfusion-free: mirror.proserve.nl
 * rpmfusion-free-updates: mirror.proserve.nl
 * rpmfusion-nonfree: mirror.proserve.nl
 * rpmfusion-nonfree-updates: mirror.proserve.nl
 * updates: mirror.proserve.nl
--> Processing Dependency: netpbm = 10.61.01-1.fc18 for package: netpbm-devel-10.61.01-1.fc18.x86_64
---> Package netpbm.x86_64 0:10.61.01-2.fc18 will be an update
--> Running transaction check
---> Package netpbm.i686 0:10.61.01-1.fc18 will be installed
--> Finished Dependency Resolution
Error:  Multilib version problems found. This often means that the root
       cause is something else and multilib version checking is just
       pointing out that there is a problem. Eg.:
       
         1. You have an upgrade for netpbm which is missing some
            dependency that another package requires. Yum is trying to
            solve this by installing an older version of netpbm of the
            different architecture. If you exclude the bad architecture
            yum will tell you what the root cause is (which package
            requires what). You can try redoing the upgrade with
            --exclude netpbm.otherarch ... this should give you an error
            message showing the root cause of the problem.
       
         2. You have multiple architectures of netpbm installed, but
            yum can only see an upgrade for one of those arcitectures.
            If you don't want/need both architectures anymore then you
            can remove the one with the missing update and everything
            will work.
       
         3. You have duplicate versions of netpbm installed already.
            You can use "yum check" to get yum show these errors.
       
       ...you can also use --setopt=protected_multilib=false to remove
       this checking, however this is almost never the correct thing to
       do as something else is very likely to go wrong (often causing
       much more problems).
       
       Protected multilib versions: netpbm-10.61.01-2.fc18.x86_64 != netpbm-10.61.01-1.fc18.i686
# rpm -q netpbm-10.61.01-1.fc18.i686 netpbm-10.61.01-1.fc18.x86_64
package netpbm-10.61.01-1.fc18.i686 is not installed
netpbm-10.61.01-1.fc18.x86_64
Comment 7 Fedora Update System 2013-05-28 12:17:59 EDT
Package netpbm-10.61.02-3.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing netpbm-10.61.02-3.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9482/netpbm-10.61.02-3.fc19
then log in and leave karma (feedback).
Comment 8 Wolfgang Denk 2013-05-28 16:30:25 EDT
(In reply to Fedora Update System from comment #7)
> Package netpbm-10.61.02-3.fc19:
> * should fix your issue,
> * was pushed to the Fedora 19 testing repository,

Will there also be fixes for regular F18 users?  I can install these F19 testing RPMs on a test machine, but I'd rather avoid such a version mix on production systems.

Anyway, I can confirm that the 10.61.02-3.fc19.x86_64 RPMs (I installed netpbm, netpbm-progs and netpbm-devel) fix the issue for the test cases I had at hand.  Thanks!
Comment 9 Petr Hracek 2013-05-29 02:48:41 EDT
I have found some useful link

Could you please try that steps mentioned in link
yum check
yum distro-sync
yum localinstall netpbm-10.61.01-2.fc18.x86_64.rpm

If it does not help then:
http://forums.fedoraforum.org/showthread.php?t=290409
yum list netpbm
yum erase netpbm-10.61.01-1.fc18.i686 netpbm-10.61.01-1.fc18.x86_64
yum localinstall netpbm-10.61.01-2.fc18.x86_64.rpm

Of course that fixes will be also for regular users.
Comment 10 Wolfgang Denk 2013-05-29 04:39:06 EDT
Created attachment 754259 [details]
Log of attempts to install netpbm*-10.61.01-2.fc18.x86_64 RPMs
Comment 11 Wolfgang Denk 2013-05-29 04:39:43 EDT
(In reply to Petr Hracek from comment #9)
> I have found some useful link

Thanks.

> Could you please try that steps mentioned in link
> yum check
> yum distro-sync
> yum localinstall netpbm-10.61.01-2.fc18.x86_64.rpm

This does not really help.

> If it does not help then:
> http://forums.fedoraforum.org/showthread.php?t=290409
> yum list netpbm
> yum erase netpbm-10.61.01-1.fc18.i686 netpbm-10.61.01-1.fc18.x86_64
> yum localinstall netpbm-10.61.01-2.fc18.x86_64.rpm
> 
> Of course that fixes will be also for regular users.

This would probably work, but the dependency check would throw out half the system, so this is not a really attractive approach.  So I manually removed the netpbm RPMs using "rpm -e --nodeps"; this helped - see attached log.

However, this is not a working solution for the average user either.
Comment 12 Fedora Update System 2013-06-13 01:58:56 EDT
netpbm-10.61.01-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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