HylaFAX The world's most advanced open source fax server |
Paul Eggert <eggert@twinsun.com> wrote to the hylafax-users list: > I ran into a problem when porting hylafax-v4.0pl2 to Solaris 8 sparc, > using /opt/sfw/bin/gcc (the version of GCC 2.95.2 that is distributed > with Sun's Bonus CD). The same problem occurs in hylafax-4.1beta2. > [snip] > The culprit is the following command in port/mkdepend.in: > > -e :loop -e 's:[^\./][^\./]*/\.\./::g' -e tloop \ > Hi, Paul, This bug has been found by James Lee, whose email with his patch to solve the problem is added to the bottom of this mail. Due to the fact that the number of HylaFAX users who use Solaris and are sed experts are very few (and based on the response James has had to his patch I would guess that number is 1, James himself) there has been no testing or confirmation that the patch is good; consequently it has not been committed to the source yet. Could I ask you to have a look at James' patch, and agree with him the best way to sort this? Then it can be added to 4.1beta3. Thanks, Phil Watkinson. > [snip] > Here's a patch. > > 2000-06-23 Paul Eggert <eggert@twinsun.com> > > * port/mkdepend.in: Don't try to optimize "a/b/../d" into > "a/d". This is incorrect if b is a symbolic link. Also, the > code was broken anyway: it transformed "/2.95.2/../" > into "/2.95.../". > > =================================================================== > RCS file: port/mkdepend.in,v > retrieving revision 1.1 > retrieving revision 1.2 > diff -pu -r1.1 -r1.2 > --- port/mkdepend.in 1998/10/12 20:47:50 1.1 > +++ port/mkdepend.in 2000/06/24 00:57:32 1.2 > @@ -249,7 +249,6 @@ fi > depgenxx=`echo $depgen|sed -e s/\'//g -e 's/(/\\(/g' -e 's/)/\\)/g'` > $depgenxx $* | > eval "sed \ > - -e :loop -e 's:[^\./][^\./]*/\.\./::g' -e tloop \ > -e 's:\([/ ]\)\./:\1:g' \ > $sedprog" | > $AWK "$awkprog" >> $newdepfile > --------------------previous mail by James Lee--------------------------- Re sed script to simplify: `/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.1/../../../../sparc-sun-so laris2.7/include/assert.h' [snip] So please allow me to offer this: old line 252 and 253 in ``port/mkdepend.in'': -e :loop -e 's:[^\./][^\./]*/\.\./::g' -e tloop \ -e 's:\([/ ]\)\./:\1:g' \ new: -e s:///*:/:g -e 's:^: :' -e 's: \([^/ ]\): ./\1:g' \ -e :a -e 's:/\./:/:' -e 's:/\.\./://:' -e ta \ -e :b -e 's:/[^/ ][^/ ]*//:/:' -e tb \ -e :c -e s://:/../: -e tc \ -e 's: \./\([^ ]\): \1:g' -e 's:^ ::' \ The prevoius was flawed IF the file name contained '^' in the directory before the ``..'' or the first directory begins with '^' and the second is ``..'' and then ONLY because no reduction took place. [Yes me over here, that's my hand in the air, my fault ...] James Lee jameswlee@lineone.net PS has anyone a more interesting problem? ____________________ HylaFAX(tm) Users Mailing List _______________________ To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null