Bug 107583

Summary: [PATCH] print/foomatic-db: cp: Argument too long - Makefile.in should use xargs
Product: Ports & Packages Reporter: Ian Tegebo <yontege>
Component: Individual Port(s)Assignee: Jose Alonso Cardenas Marquez <acm>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Ian Tegebo 2007-01-05 19:40:13 UTC
The number of xml files in db/source/printer is too many for my version of cp:

yontege@granite foomatic-db-20061214 $ ls db/source/printer/|wc -l
    2055

It looks like the newest version of foomatic-db, foomatic-db-20070105, might have the same issue.  When trying to install I get the following error:

===>  Installing for foomatic-db-20061214
===>   foomatic-db-20061214 depends on file: /usr/local/bin/perl5.8.8 - found
===>   foomatic-db-20061214 depends on shared library: xml2.5 - found
===>   foomatic-db-20061214 depends on shared library: curl.4 - found
===>   Generating temporary packing list
install -d //usr/local/share/foomatic
install -d //usr/local/share/foomatic/db/source/printer
install -d //usr/local/share/foomatic/db/source/driver
install -d //usr/local/share/foomatic/db/source/opt
install -d //usr/local/share/foomatic/db/source/PPD
cp db/oldprinterids //usr/local/share/foomatic/db
cp db/source/printer/*.xml //usr/local/share/foomatic/db/source/printer
cp: Argument list too long
gmake: *** [install-db] Error 2
*** Error code 2

Stop in /usr/ports/print/foomatic-db.
*** Error code 1

Fix: I wasn't able to attach my patch without error using the web form.  What follows is a simple patch that uses find and xargs to work around this problem; I created /usr/ports/print/foomatic-db/files and dropped my patch inside.
How-To-Repeat: I'm using the following port version, 20061214, with Makefile CVS tag:
# $FreeBSD: ports/print/foomatic-db/Makefile,v 1.23 2006/12/16 15:54:52 acm Exp

cd /usr/ports/print/foomatic-db
make install
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2007-01-05 23:56:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->acm

Over to maintainer.
Comment 2 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2007-01-07 18:50:25 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I can't reproduce the problem, you can see the build log at:

http://people.freebsd.org/~acm/ports/logs/

Maybe it could be a problem with cp command in your old version of
FreeBSD, you should try updating your FreeBSD box. (i used FreeBSD-5.5
in my test)

Greetings
- ----
Jose Alonso Cardenas Marquez	|	http://www.FreeBSD.org
acm@FreeBSD.org			|	http://www.BSD.org.pe
GnuPG Key: http://www.FreeBSD.org/~acm/pgp/pubkey.asc


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFFoUDxGV/UqJshvBkRAoGIAJ4koUnEeQV1Wkd1OkoLujfzx44C/ACcDMGr
WAB0cqDGeU5ZnMb538IZfkg=
=MrxK
-----END PGP SIGNATURE-----
Comment 3 mina 2007-01-09 14:48:17 UTC
I too have ran into this on a FreeBSD 4.11 system.

While the suggestion to upgrade to the 5.x tree is a valid one, it seems
overkill to fix such a simple problem with the proposed patch earlier. 
Without it this port is un-installable on a 4.x installation.
Comment 4 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2007-01-09 16:34:53 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 9 Jan 2007 15:30:27 GMT
"Mina Naguib" <mina@naguib.ca> wrote:

> The following reply was made to PR ports/107583; it has been noted by GNATS.
> 
> From: "Mina Naguib" <mina@naguib.ca>
> To: bug-followup@FreeBSD.org
> Cc:  
> Subject: Re: ports/107583: [PATCH] print/foomatic-db: cp: Argument too long 
>      - Makefile.in should use xargs
> Date: Tue, 9 Jan 2007 09:48:17 -0500 (EST)
> 
>  I too have ran into this on a FreeBSD 4.11 system.
>  
>  While the suggestion to upgrade to the 5.x tree is a valid one, it seems
>  overkill to fix such a simple problem with the proposed patch earlier. 
>  Without it this port is un-installable on a 4.x installation.
>  

Hi Mina :)

My tinderbox 4-STABLE builds without problems the print/foomatic-db
port. See the log at:

http://people.freebsd.org/~acm/ports/logs/4-foomatic-db-20061214.log

I can't apply the patch if it works perfeclty on current
supported version of FreeBSD. You could check the pointyhat cluster
(pointyhat.freebsd.org) and you will not find any error logs for this
port.

You could try to use pkg_add if you still have the problem. The
package version of fommatic-db is the same version of its port.

ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-4-stable/print/foomatic-db-20061214.tgz
ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-5-stable/print/foomatic-db-20061214.tgz

Greetings
- ----
Jose Alonso Cardenas Marquez	|	http://www.FreeBSD.org
acm@FreeBSD.org			|	http://www.BSD.org.pe
GnuPG Key: http://www.FreeBSD.org/~acm/pgp/pubkey.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFFo8QtGV/UqJshvBkRAtgFAJ4o/ZV6TGo11Nv4z6Fszmp2lKg87QCfdmW5
fcJ2UyyI8jqk8rPv7pWzr4g=
=5BYT
-----END PGP SIGNATURE-----
Comment 5 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2007-01-17 17:07:24 UTC
State Changed
From-To: open->closed

It compiles without problems on 4.x, 5.x and 6.x, if you have some another  
problems, feel free to contact me :)