[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gsch2pcb problem: caused by guile/Mandriva?



On Mon, 2007-11-12 at 13:38 +0100, Richard Rasker wrote:

> > That might be a bug in the PCB footprint library, or an illegal
> > character somewhere. m4 does not like "-" characters appearing in
> > footprint names - do you happen to have one?
> 
> Uh, actually I had "-" characters in several footprint names. The m4
> problems were fixed after I put underscore characters in their place.

It would be nice to kill this bug once and for all. I can't remember the
exact details, but it might be the case that more recent gsch2pcb
versions do a better job of substituting "newlib" (file backed)
footprints first, so m4 doesn't have to see the "-" it doesn't like.

There is certainly an option to avoid m4 completely in the newer
versions, as PCB now ships a build-time generated set of footprint files
corresponding to the m4 libraries.

[snip]

> I do a bit of dabbling in scripting and programming myself, and if
> there's one thing I absolutely try to get right from line one on, it is
> to do a sanity check on data from external sources (e.g. users); and to
> issue clear, understandable warnings or error messages if things aren't
> quite right.
> 
> Not only does this prevent a lot of user headaches, but it also
> dramatically improves security. The above example with m4 is in fact at
> least a DoS-issue, with the login session eventually becoming unusable
> if the process isn't killed.

I agree, but its not such a clear cut issue. PCB doesn't care about "-"
signs, its just the m4 footprint processing which gsch2pcb uses. It
would be unfair for PCB to limit filenames to avoid "-" signs. Many
people use them, and disable the m4 processing in gsch2pcb.

I did try (at some length) various forms of escaping which could try to
get around the issue, but to no joy. The footprint name gets used as a
macro name in m4, and "-" however you try to force it, can't be used in
those.

It isn't impossible to fix (and as I say, newer gsch2pcb might be
better... I can't recall), as the processing order would put all
footprints as PKG_....() macros, run m4 over it, and then search for
files for the remaining ones the combination of m4 + PCB "oldlib"
library didn't expand into footprint definitions.

I suspect processing any available footprint files before m4 helps,
although it will still break if you've got a "-" in the footprint name,
and the file isn't found. (Unless gsch2pcb is educated to remove those
packages before running m4).

> Anyway, thanks for your excellent help (also referring to your second
> reply)! I'll sure put in a vote for gEDA on the Mandriva wish list;
> there already is a gEDA Mandriva package, but it's almost two years old
> and lacks key elements such as PCB. Also, when time permits, I'll try my
> hand at some easy-to-understand, step-by-step beginner's manuals with
> lots of examples, to get newbies up to speed without them having to go
> through all these little pitfalls along the way I stepped into
> (sometimes even on more than one occasion).

Thanks, all the help we get is very much appreciated. I'm sure Mandriva
ought to be able to package the latest gEDA... it shouldn't be any
harder than rebuilding the latest Fedora or SuSE SRPMs.

If there is an existing Mandriva package, perhaps file a bug report
against that package (one of them anyway least), or email the old
maintainer.

A good example of an electronics collection SRPMS you might mention
(from SuSE), is at:

ftp://ftp-1.gwdg.de/pub/opensuse/repositories/home%
3A/werner2101/openSUSE_10.3/src

I'm fairly sure Fedora have a similar collection, although I don't know
where you'd find it.

Best wishes,

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user