Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 455224 - net-libs/farstream-0.2.2 patch
Summary: net-libs/farstream-0.2.2 patch
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: voip herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-03 02:43 UTC by augury
Modified: 2013-02-05 05:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
adds to the sed command in Makefile.in and Makefile.am ... could use cleaning (farstream_makefile.patch,17.12 KB, text/plain)
2013-02-03 02:43 UTC, augury
Details

Note You need to log in before you can comment on or make changes to this bug.
Description augury 2013-02-03 02:43:11 UTC
Created attachment 337740 [details]
adds to the sed command in Makefile.in and Makefile.am ... could use cleaning

I have a patch for /usr/portage/net-libs/farstream/farstream-0.2.2.ebuild



one file and 

"patch -p0 <farstream_makefiles.patch"

to the ebuild.
Comment 1 augury 2013-02-03 02:55:46 UTC
edit 

should be 

"patch -p0 < files/farstream_makefiles.patch"

dunno
Comment 2 augury 2013-02-03 02:58:51 UTC
epatch "${FILESDIR}"/farstream_makefiles.patch
Comment 3 augury 2013-02-03 03:03:15 UTC
I made the patch in the work directory.
Comment 4 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-02-03 03:16:07 UTC
Importance is to be set by the maintainer, this certainly isn't a blocker for everyone.

You forgot to mention what this patch does.

As far as I can deduce, it removes some dollar signs somewhere? Why?
Comment 5 Olivier Crete (RETIRED) gentoo-dev 2013-02-03 12:21:52 UTC
With my upstream hat on.. what is this for?
Comment 6 augury 2013-02-04 17:25:21 UTC
It is to fix the sed command so that the marshal.list file is readable by glib-genmarshal.  The dollar part is because gnu makefiles are really weird about dollar signs and I need one.  dollar :=$$ defines dollar as $.  Then you can $(dolloar) and voila one $ right where you need it.
Comment 7 augury 2013-02-04 17:29:54 UTC
See the sed command leaves , on the end it is very sloppy.  This happens in another package as well.  Only that package actually picks up extra characters.

I just went through 760 some packages so I'm assuming glib-genmarshal accepted the sloppy files at one point.  They are kind of simple like headers and really should have been pre-generated.  The glib-genmarshal of these files generates an actual header type file which is it obvious merit.
Comment 8 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-02-04 17:36:28 UTC
What version of dev-libs/glib are you using? Can you attach the actual error that you saw without the patch?
Comment 9 augury 2013-02-04 17:37:23 UTC
I kind of just chuck the dollar:=$$ patch in there anywhere on all the makefile.am/in because I don't want to go through each one and place it because I don't know what up stream would really want to do with it.  I'm not a sed genius and my makefile organization is a little rusty.
Comment 10 augury 2013-02-04 17:41:38 UTC
I can tell you I got the same error in net-voip/telepathy-gabble-0.16.4

Only this time it left some stuff after a space as well as the comma.

If you don't like patching and could sed the stuff in I would see no problem with that.



*  dev-libs/glib
      Latest version available: 2.34.3
      Latest version installed: 2.34.3
      Size of files: 6,573 kB
      Homepage:      http://www.gtk.org/
      Description:   The GLib library of C routines
      License:       LGPL-2+


It didn't like the trailing comma
Comment 11 augury 2013-02-04 17:45:45 UTC
make -j1 
make  all-recursive
make[1]: Entering directory `/VAR_OLD/tmp/portage/net-libs/farstream-0.2.2/work/farstream-0.2.2'
Making all in farstream
make[2]: Entering directory `/VAR_OLD/tmp/portage/net-libs/farstream-0.2.2/work/farstream-0.2.2/farstream'
( cd . && \
sed -n -e 's/.*_fs_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
fs-candidate.c fs-codec.c fs-participant.c fs-session.c fs-stream.c fs-conference.c fs-transmitter.c fs-stream-transmitter.c fs-plugin.c fs-element-added-notifier.c fs-utils.c fs-rtp.c fs-private.h ) \
| sed -e 's/__/:/' -e 'y/_/,/' | sort -u > fs-marshal.list.tmp
echo "#include \"fs-marshal.h\"" >> fs-marshal.c.tmp && \
glib-genmarshal --body --prefix=_fs_marshal fs-marshal.list >> fs-marshal.c.tmp && \
mv fs-marshal.c.tmp fs-marshal.c
fs-marshal.list:2: error: unexpected character `\12', expected type name
make[2]: *** [fs-marshal.c] Error 1
make[2]: Leaving directory `/VAR_OLD/tmp/portage/net-libs/farstream-0.2.2/work/farstream-0.2.2/farstream'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/VAR_OLD/tmp/portage/net-libs/farstream-0.2.2/work/farstream-0.2.2'
make: *** [all] Error 2
 * ERROR: net-libs/farstream-0.2.2 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=net-libs/farstream-0.2.2'`,
 * the complete build log and the output of `emerge -pqv '=net-libs/farstream-0.2.2'`.
 * The complete build log is located at '/tmp/net-libs:farstream-0.2.2:20130204-174520.log'.
 * For convenience, a symlink to the build log is located at '/VAR_OLD/tmp/portage/net-libs/farstream-0.2.2/temp/build.log'.
 * The ebuild environment file is located at '/VAR_OLD/tmp/portage/net-libs/farstream-0.2.2/temp/environment'.
 * Working directory: '/VAR_OLD/tmp/portage/net-libs/farstream-0.2.2/work/farstream-0.2.2'
 * S: '/VAR_OLD/tmp/portage/net-libs/farstream-0.2.2/work/farstream-0.2.2'

>>> Failed to emerge net-libs/farstream-0.2.2, Log file:

>>>  '/tmp/net-libs:farstream-0.2.2:20130204-174520.log'

 * Messages for package net-libs/farstream-0.2.2:
Comment 12 augury 2013-02-04 17:53:45 UTC
see the output into the file looks like this

OBJECT:UINT,
VOID:BOXED,BOXED,
VOID:ENUM,STRING,
VOID:OBJECT,ENUM,STRING,
VOID:OBJECT,OBJECT,
VOID:UINT,ENUM,
VOID:UINT,POINTER,


it should look like this

OBJECT:UINT
VOID:BOXED,BOXED
VOID:ENUM,STRING
VOID:OBJECT,ENUM,STRING
VOID:OBJECT,OBJECT
VOID:UINT,ENUM
VOID:UINT,POINTER

you can try your glib-genmarshal on both but mine, somewhat understandably, only works with the second version.
Comment 13 augury 2013-02-04 17:56:28 UTC
glib-genmarshal --header 

or 

glib-genmarshal --body

are some of the good functions of glib-genmarshal
Comment 14 augury 2013-02-04 17:57:36 UTC
That is sort of lost in the self-cleaning jungling act of the makefiles.
Comment 15 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-02-04 18:02:33 UTC
Thanks.
Comment 16 augury 2013-02-04 18:06:51 UTC
as for the case of

net-voip/telepathy-gabble-0.16.4

the generated text is a legitimate coding element.  The *sed work* entirely does not account for this coding.  Everything following a " " should be removed.  This is very easy to do.  It might be best for this package to contain that language with the *sed work* now rather than wait for this coding to come up and have a problem again.
Comment 17 augury 2013-02-04 18:09:33 UTC
Note that the dollar line in the makefile must be defined

:=$$

exactly no spaces.
Comment 18 augury 2013-02-04 18:10:14 UTC
echo $$
I get a diffent number everytime.
Comment 19 augury 2013-02-04 18:11:26 UTC
different number in different terminals anyways.  same terminal same number.
Comment 20 augury 2013-02-04 18:12:17 UTC
Which is make the error of $ in a makefile that much easier to track.
Comment 21 augury 2013-02-04 18:32:54 UTC
I personally would leave all coding, including scripts (grep '&&') out of the makefiles.  The interfacing isn't there.  Of course then you have a few scripts lying around or you have a scripts directory.  On my systems I have a separate scripts directory that I can copy and maintain and remove easily.

See the whole thing has nothing to do with Makefile.  Makefile is only to function as a compiling tool.
Comment 22 Olivier Crete (RETIRED) gentoo-dev 2013-02-04 19:40:05 UTC
I'll just make farstream use the generic marshaller and we can eliminate the issue entirely.
Comment 23 augury 2013-02-05 04:16:53 UTC
I have no qualms.  What is the generic marshaller?
Comment 24 augury 2013-02-05 04:54:20 UTC
Looking at the patch I don't know if I got enough space out of the dollar:=$$.  SO it may not work.  Makefiles are so 19847.
Comment 25 augury 2013-02-05 04:57:01 UTC
-	| sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
+	| sed -e 's/__/:/' -e 'y/_/,/' -e 's/,${dollar}//g' | sort -u > $@.tmp

That's the meat and potatoes.
Comment 26 augury 2013-02-05 05:00:42 UTC
I'm not sure if that is semantically correct.  sed isn't operating on a file so the ///g is irrelevant.  what y/// does that s/// didn't do I'm not sure.  I tried \n.  This is not so good.