FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 06-30-2010, 02:53 AM
Grant
 
Default Patch via perl script in an ebuild?

I need to install the google-api-adwords-perl library, and it requires
that SOAP-WSDL is patched with the soap_wsdl_patches.pl perl script.
Can I have SOAP-WSDL patched via the perl script in an ebuild?

- Grant
 
Old 06-30-2010, 06:49 PM
Grant
 
Default Patch via perl script in an ebuild?

> I need to install the google-api-adwords-perl library, and it requires
> that SOAP-WSDL is patched with the soap_wsdl_patches.pl perl script.
> Can I have SOAP-WSDL patched via the perl script in an ebuild?
>
> - Grant

Here is the perl script:

http://pastebin.com/YM3G5sKn

Can anyone with perl and ebuild knowledge determine if the script
could be incorporated into an ebuild? David Abbott and I are working
on getting google-api-adwords-perl into portage and this is a
dependency.

- Grant
 
Old 07-01-2010, 12:12 AM
"Arttu V."
 
Default Patch via perl script in an ebuild?

Grant wrote:Grant wrote:
>> I need to install the google-api-adwords-perl library, and it requires
>> that SOAP-WSDL is patched with the soap_wsdl_patches.pl perl script.
>> Can I have SOAP-WSDL patched via the perl script in an ebuild?
>>
>> - Grant
>>
> Here is the perl script:
>
> http://pastebin.com/YM3G5sKn
>
> Can anyone with perl and ebuild knowledge determine if the script
> could be incorporated into an ebuild? David Abbott and I are working
> on getting google-api-adwords-perl into portage and this is a
> dependency.

(Some preliminary setup work, like cpan -i Text::Patch SOAP::WSDL.)

Running the patch after fixing its paths ... will result invariably in:
Trying to patch
/usr/lib64/perl5/site_perl/5.10.1/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm...Hunk
#1 failed at line 13.


I'm no authority on perl, but AFAICT that patch does not match against
either SOAP::WSDL latest stable sources nor latest SOAP::WSDL dev
release code from CPAN. Actually, I couldn't find tarballs from CPAN
which would match with the failing lines of that patch. There might've
been some earlier 2.00-series releases, but they're ... long gone?


Any idea of the version of SOAP::WSDL they are using for this at Google?

--
Arttu V. -- Running Gentoo is like running with scissors
 
Old 07-01-2010, 03:36 PM
Grant
 
Default Patch via perl script in an ebuild?

>>> I need to install the google-api-adwords-perl library, and it requires
>>> that SOAP-WSDL is patched with the soap_wsdl_patches.pl perl script.
>>> Can I have SOAP-WSDL patched via the perl script in an ebuild?
>>>
>>> - Grant
>>>
>> Here is the perl script:
>>
>> http://pastebin.com/YM3G5sKn
>>
>> Can anyone with perl and ebuild knowledge determine if the script
>> could be incorporated into an ebuild? *David Abbott and I are working
>> on getting google-api-adwords-perl into portage and this is a
>> dependency.
>
> (Some preliminary setup work, like cpan -i Text::Patch SOAP::WSDL.)
>
> Running the patch after fixing its paths ... will result invariably in:
> Trying to patch
> /usr/lib64/perl5/site_perl/5.10.1/SOAP/WSDL/XSD/Typelib/Builtin/anySimpleType.pm...Hunk
> #1 failed at line 13.
>
> I'm no authority on perl, but AFAICT that patch does not match against
> either SOAP::WSDL latest stable sources nor latest SOAP::WSDL dev release
> code from CPAN. Actually, I couldn't find tarballs from CPAN which would
> match with the failing lines of that patch. There might've been some earlier
> 2.00-series releases, but they're ... long gone?
>
> Any idea of the version of SOAP::WSDL they are using for this at Google?

Thank you Arttu. Here is the link to the SOAP::WSDL:

http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz?view=tar&pathrev=846

from the README:

http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/README

- Grant
 
Old 07-01-2010, 06:40 PM
"Arttu V."
 
Default Patch via perl script in an ebuild?

On 7/1/10, Grant <emailgrant@gmail.com> wrote:
> Thank you Arttu. Here is the link to the SOAP::WSDL:
>
> http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz?view=tar&pathrev=846
>
> from the README:
>
> http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/README

Ok, I see they're shipping the same version which is available from
CPAN as the dev version (2.00.99_3). But the patch is still not made
for its code ... maybe it is for _2 or _1?

The patch keeps failing out of the box:

cpan -i Text::Patch
tar xvzf Typemap.tar.gz
tar xvzf awapi_perl_lib_1.3.2.tar.gz
~/tempski $ awapi_perl_lib_1.3.2/bin/soap_wsdl_patches.pl Typemap
Trying to patch
Typemap/lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Operation.tt...
patch successful.
Trying to patch
Typemap/lib/SOAP/WSDL/Generator/Template/XSD/Server.tt... patch
successful.
Trying to patch
Typemap/lib/SOAP/WSDL/Generator/Template/Plugin/XSD.pm... patch
successful.
Trying to patch
Typemap/lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm... patch
successful.
Trying to patch
Typemap/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm...Hunk #2 failed at
line 425.
~/tempski $

Anyway, only three files' small chunks fail from the patch, and
they're short and mostly just semantically adding some formerly
non-existent subroutines and changing the return values of others.

I think with some manual labour we could turn that patch into a fixed
regular patch, which we could then apply in an ebuild for SOAP::WSDL
via a USE flag. For example, something along these lines for
dev-perl/SOAP-WSDL-2.00.99.3.ebuild (licenses etc might be wrong):

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=2

MODULE_AUTHOR=MKUTTER
MY_P="${P:0:17}_3"
inherit eutils perl-module

DESCRIPTION="SOAP::WSDL module"

LICENSE="Artistic"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="adwords"

src_prepare() {
perl-module_src_prepare
use adwords && epatch "${FILESDIR}/${PV}-adwords.patch"
}


This SOAP-WSDL package could then in turn be made a dependency for
your real google-adwords package (dev-perl/Google-Adwords?):

RDEPENDS="dev-perl/SOAP-WSDL[adwords]"

Am I making any sense?

Theoretically (if you insist), you could still use the perl's
Text::Patch route as well, but (if I'm not entirely wrong, see the
excerpted attempted patch run above) the patch would still need to be
touched up to match properly with the _3 dev release code. And it
would add a dependency to Text::Patch, and make an odd call to perl in
the middle of the ebuild. (I assume it must be made explicitly as I
don't know if perl-module.eclass has any automation for this. Probably
not since AFAICT Text::Patch isn't even installed by default).

HTH

--
Arttu V. -- Running Gentoo is like running with scissors
 
Old 07-01-2010, 07:29 PM
David Abbott
 
Default Patch via perl script in an ebuild?

On Thu, Jul 1, 2010 at 2:40 PM, Arttu V. <arttuv69@gmail.com> wrote:
> On 7/1/10, Grant <emailgrant@gmail.com> wrote:
>> Thank you Arttu. *Here is the link to the SOAP::WSDL:
>>
>> http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz?view=tar&pathrev=846
>>
>> from the README:
>>
>> http://code.google.com/p/google-api-adwords-perl/source/browse/trunk/README
>
> Ok, I see they're shipping the same version which is available from
> CPAN as the dev version (2.00.99_3). But the patch is still not made
> for its code ... maybe it is for _2 or _1?
>
> The patch keeps failing out of the box:
>
> cpan -i Text::Patch
> tar xvzf Typemap.tar.gz
> tar xvzf awapi_perl_lib_1.3.2.tar.gz
> ~/tempski $ awapi_perl_lib_1.3.2/bin/soap_wsdl_patches.pl Typemap
> Trying to patch
> Typemap/lib/SOAP/WSDL/Generator/Template/XSD/Interface/POD/Operation.tt...
> patch successful.
> Trying to patch
> Typemap/lib/SOAP/WSDL/Generator/Template/XSD/Server.tt... patch
> successful.
> Trying to patch
> Typemap/lib/SOAP/WSDL/Generator/Template/Plugin/XSD.pm... patch
> successful.
> Trying to patch
> Typemap/lib/SOAP/WSDL/XSD/Typelib/Builtin/anyType.pm... patch
> successful.
> Trying to patch
> Typemap/lib/SOAP/WSDL/XSD/Typelib/ComplexType.pm...Hunk #2 failed at
> line 425.
> ~/tempski $
>
> Anyway, only three files' small chunks fail from the patch, and
> they're short and mostly just semantically adding some formerly
> non-existent subroutines and changing the return values of others.
>
> I think with some manual labour we could turn that patch into a fixed
> regular patch, which we could then apply in an ebuild for SOAP::WSDL
> via a USE flag. For example, something along these lines for
> dev-perl/SOAP-WSDL-2.00.99.3.ebuild (licenses etc might be wrong):
>
> # Copyright 1999-2010 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: $
>
> EAPI=2
>
> MODULE_AUTHOR=MKUTTER
> MY_P="${P:0:17}_3"
> inherit eutils perl-module
>
> DESCRIPTION="SOAP::WSDL module"
>
> LICENSE="Artistic"
> SLOT="0"
> KEYWORDS="amd64 x86"
> IUSE="adwords"
>
> src_prepare() {
> * * * *perl-module_src_prepare
> * * * *use adwords && epatch "${FILESDIR}/${PV}-adwords.patch"
> }
>
>
> This SOAP-WSDL package could then in turn be made a dependency for
> your real google-adwords package (dev-perl/Google-Adwords?):
>
> RDEPENDS="dev-perl/SOAP-WSDL[adwords]"
>
> Am I making any sense?
>
> Theoretically (if you insist), you could still use the perl's
> Text::Patch route as well, but (if I'm not entirely wrong, see the
> excerpted attempted patch run above) the patch would still need to be
> touched up to match properly with the _3 dev release code. And it
> would add a dependency to Text::Patch, and make an odd call to perl in
> the middle of the ebuild. (I assume it must be made explicitly as I
> don't know if perl-module.eclass has any automation for this. Probably
> not since AFAICT Text::Patch isn't even installed by default).
>
> HTH
>
> --
> Arttu V. -- Running Gentoo is like running with scissors
>
>
I was thinking along the same lines, my use was "google"
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="3"

inherit perl-module

DESCRIPTION="SOAP-WSDL provides a SOAP client with WSDL support."
HOMEPAGE="http://soap-wsdl.svn.sourceforge.net"
SRC_URI="http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz
-> ${P}.tar.gz"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="google"

DEPEND="${RDEPEND}
virtual/perl-Module-Build"
RDEPEND="dev-perl/SOAP-Lite
dev-perl/Class-Std-Fast"

src_prepare() {
if use google ; then
epatch "${FILESDIR}/${PN}.patch" | die "google patch failed"
fi
}


--
David Abbott (dabbott)
 
Old 07-02-2010, 03:43 AM
Grant
 
Default Patch via perl script in an ebuild?

[snip]

> Am I making any sense?

I think all of that is right on. I need to find out why the patch
isn't working though.

> Theoretically (if you insist), you could still use the perl's
> Text::Patch route as well, but (if I'm not entirely wrong, see the
> excerpted attempted patch run above) the patch would still need to be
> touched up to match properly with the _3 dev release code. And it
> would add a dependency to Text::Patch, and make an odd call to perl in
> the middle of the ebuild. (I assume it must be made explicitly as I
> don't know if perl-module.eclass has any automation for this. Probably
> not since AFAICT Text::Patch isn't even installed by default).

Do you think it would be better to create a real patch than to use the
perl patch (after we figure out why it isn't working)? I would think
it would be easier to use the perl patch in case a different version
is released so we don't have to re-create the patch each time. A
Text::Patch dep wouldn't be so bad. What do you think?

- Grant
 
Old 07-02-2010, 03:45 AM
Grant
 
Default Patch via perl script in an ebuild?

[snip]

> # Copyright 1999-2010 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: $
>
> EAPI="3"
>
> inherit perl-module
>
> DESCRIPTION="SOAP-WSDL provides a SOAP client with WSDL support."
> HOMEPAGE="http://soap-wsdl.svn.sourceforge.net"
> SRC_URI="http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz
> -> ${P}.tar.gz"
> LICENSE="Apache-2.0"
> SLOT="0"
> KEYWORDS="~amd64 ~x86"
> IUSE="google"
>
> DEPEND="${RDEPEND}
> * * * *virtual/perl-Module-Build"
> RDEPEND="dev-perl/SOAP-Lite
> * * * *dev-perl/Class-Std-Fast"
>
> src_prepare() {
> * * * *if use google ; then
> * * * * * * * *epatch "${FILESDIR}/${PN}.patch" | die "google patch failed"
> * * * *fi
> }

David, you mentioned in the bug that you couldn't get the patch to
work clean. I thought you got it working before when you posted the
patched Typemap for me to download. Did it work then but not now?

http://bugs.gentoo.org/show_bug.cgi?id=305621

- Grant
 
Old 07-02-2010, 09:04 AM
David Abbott
 
Default Patch via perl script in an ebuild?

On Thu, Jul 1, 2010 at 11:45 PM, Grant <emailgrant@gmail.com> wrote:
> [snip]
>
>> # Copyright 1999-2010 Gentoo Foundation
>> # Distributed under the terms of the GNU General Public License v2
>> # $Header: $
>>
>> EAPI="3"
>>
>> inherit perl-module
>>
>> DESCRIPTION="SOAP-WSDL provides a SOAP client with WSDL support."
>> HOMEPAGE="http://soap-wsdl.svn.sourceforge.net"
>> SRC_URI="http://soap-wsdl.svn.sourceforge.net/viewvc/soap-wsdl/SOAP-WSDL/branches/Typemap.tar.gz
>> -> ${P}.tar.gz"
>> LICENSE="Apache-2.0"
>> SLOT="0"
>> KEYWORDS="~amd64 ~x86"
>> IUSE="google"
>>
>> DEPEND="${RDEPEND}
>> * * * *virtual/perl-Module-Build"
>> RDEPEND="dev-perl/SOAP-Lite
>> * * * *dev-perl/Class-Std-Fast"
>>
>> src_prepare() {
>> * * * *if use google ; then
>> * * * * * * * *epatch "${FILESDIR}/${PN}.patch" | die "google patch failed"
>> * * * *fi
>> }
>
> David, you mentioned in the bug that you couldn't get the patch to
> work clean. *I thought you got it working before when you posted the
> patched Typemap for me to download. *Did it work then but not now?
>
> http://bugs.gentoo.org/show_bug.cgi?id=305621
>
> - GrantSOAP-WSDL
>
>
The patched Typemap created by hand works fine, but when you attempt
to use a downloaded SOAP-WSDL and patch it failed for me, may need to
manually create a patch for SOAP-WSDL.

--
David Abbott (dabbott)
 
Old 07-02-2010, 12:15 PM
"Arttu V."
 
Default Patch via perl script in an ebuild?

On 7/2/10, Grant <emailgrant@gmail.com> wrote:
> David, you mentioned in the bug that you couldn't get the patch to
> work clean. I thought you got it working before when you posted the
> patched Typemap for me to download. Did it work then but not now?
>
> http://bugs.gentoo.org/show_bug.cgi?id=305621

Ah, I didn't know you had this already mostly figured out in a bug.
Full disclosure requested -- from the very beginning!

After taking a quick peek: do those ebuilds succeed in installing
something? Since they don't follow CPAN conventions (esp. wrt naming)
I'm not sure what perl-module.eclass actually does for their
src_compile, src_install and other steps. Also, the "->" used in SRC
might have interesting side-effects to paths, as the tarball name no
longer matches its content directory's name.

--
Arttu V. -- Running Gentoo is like running with scissors
 

Thread Tools




All times are GMT. The time now is 02:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org