Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Altering a package to pull from GIT
@ 2018-11-07 16:17 Tim Harvey
  2018-11-07 16:38 ` Thomas Petazzoni
  2018-11-07 16:38 ` Brad Love
  0 siblings, 2 replies; 6+ messages in thread
From: Tim Harvey @ 2018-11-07 16:17 UTC (permalink / raw)
  To: buildroot

Greetings,

I'm trying to alter the openocd package to pull code from a specific git
sha. Looking over the manual and searching a bit it seems like the
following is the thing to do:

diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk
index 548d8b8..76594fe 100644
--- a/package/openocd/openocd.mk
+++ b/package/openocd/openocd.mk
@@ -4,9 +4,10 @@
 #
 ################################################################################

-OPENOCD_VERSION = 0.10.0
+OPENOCD_VERSION = da4b2d5beb
 OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2
-OPENOCD_SITE =
http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION)
+OPENOCD_SITE = git://git.code.sf.net/p/openocd/code
+OPENCOD_SITE_METHOD = git
 OPENOCD_LICENSE = GPL-2.0+
 OPENOCD_LICENSE_FILES = COPYING
 # 0002-configure-enable-build-on-uclinux.patch patches configure.ac


In other words _SITE needs to be the git:// URL and _VERSION should be the
branch/tag/sha. However when I build I get:

>>> openocd da4b2d5beb Extracting
bzcat /usr/src/ventana/buildroot/dl/openocd/openocd-da4b2d5beb.tar.bz2 |
tar --s
trip-components=1 -C
/usr/src/ventana/buildroot/output/build/openocd-da4b2d5beb
  -xf -
bzcat: /usr/src/ventana/buildroot/dl/openocd/openocd-da4b2d5beb.tar.bz2 is
not a
 bzip2 file.
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
package/pkg-generic.mk:160: recipe for target
'/usr/src/ventana/buildroot/output
/build/openocd-da4b2d5beb/.stamp_extracted' failed
make[1]: ***
[/usr/src/ventana/buildroot/output/build/openocd-da4b2d5beb/.stamp_
extracted] Error 2
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2

I thought it was the fact there was an openocd.hash but removing it still
fails. Any ideas?

Best regards,

Tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20181107/183304b7/attachment.html>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] Altering a package to pull from GIT
  2018-11-07 16:17 [Buildroot] Altering a package to pull from GIT Tim Harvey
@ 2018-11-07 16:38 ` Thomas Petazzoni
  2018-11-07 20:08   ` Arnout Vandecappelle
  2018-11-07 16:38 ` Brad Love
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2018-11-07 16:38 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 7 Nov 2018 08:17:47 -0800, Tim Harvey wrote:

> -OPENOCD_VERSION = 0.10.0
> +OPENOCD_VERSION = da4b2d5beb
>  OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2
> -OPENOCD_SITE =
> http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION)
> +OPENOCD_SITE = git://git.code.sf.net/p/openocd/code

> +OPENCOD_SITE_METHOD = git

       ^^^^ Typo here :-)

Also, the OPENOCD_SOURCE variable is no longer needed, but really the
issue comes from the typo.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Altering a package to pull from GIT
  2018-11-07 16:17 [Buildroot] Altering a package to pull from GIT Tim Harvey
  2018-11-07 16:38 ` Thomas Petazzoni
@ 2018-11-07 16:38 ` Brad Love
  2018-11-07 17:40   ` Tim Harvey
  1 sibling, 1 reply; 6+ messages in thread
From: Brad Love @ 2018-11-07 16:38 UTC (permalink / raw)
  To: buildroot

Hi Tim,


On 07/11/2018 10.17, Tim Harvey wrote:
> Greetings,
>
> I'm trying to alter the openocd package to pull code from a specific
> git sha. Looking over the manual and searching a bit it seems like the
> following is the thing to do:
>
> diff --git a/package/openocd/openocd.mk <http://openocd.mk>
> b/package/openocd/openocd.mk <http://openocd.mk>
> index 548d8b8..76594fe 100644
> --- a/package/openocd/openocd.mk <http://openocd.mk>
> +++ b/package/openocd/openocd.mk <http://openocd.mk>
> @@ -4,9 +4,10 @@
> ?#
> ?################################################################################
> ?
> -OPENOCD_VERSION = 0.10.0
> +OPENOCD_VERSION = da4b2d5beb
> ?OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2
> -OPENOCD_SITE =
> http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION)
> +OPENOCD_SITE = git://git.code.sf.net/p/openocd/code
> <http://git.code.sf.net/p/openocd/code>
> +OPENCOD_SITE_METHOD = git


Note your spelling error:

OPENCOD_SITE_METHOD


Cheers,

Brad



> ?OPENOCD_LICENSE = GPL-2.0+
> ?OPENOCD_LICENSE_FILES = COPYING
> ?# 0002-configure-enable-build-on-uclinux.patch patches configure.ac
> <http://configure.ac>
>
>
> In other words _SITE needs to be the git:// URL and _VERSION should be
> the branch/tag/sha. However when I build I get:
>
> >>> openocd da4b2d5beb Extracting
> bzcat /usr/src/ventana/buildroot/dl/openocd/openocd-da4b2d5beb.tar.bz2
> | tar --s
> trip-components=1 -C
> /usr/src/ventana/buildroot/output/build/openocd-da4b2d5beb?
> ? -xf -
> bzcat:
> /usr/src/ventana/buildroot/dl/openocd/openocd-da4b2d5beb.tar.bz2 is not a
> ?bzip2 file.
> tar: This does not look like a tar archive??
> tar: Exiting with failure status due to previous errors
> package/pkg-generic.mk:160 <http://pkg-generic.mk:160>: recipe for
> target '/usr/src/ventana/buildroot/output
> /build/openocd-da4b2d5beb/.stamp_extracted' failed
> make[1]: ***
> [/usr/src/ventana/buildroot/output/build/openocd-da4b2d5beb/.stamp_
> extracted] Error 2
> Makefile:84: recipe for target '_all' failed
> make: *** [_all] Error 2
>
> I thought it was the fact there was an openocd.hash but removing it
> still fails. Any ideas?
>
> Best regards,
>
> Tim
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20181107/0c90c317/attachment.html>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Altering a package to pull from GIT
  2018-11-07 16:38 ` Brad Love
@ 2018-11-07 17:40   ` Tim Harvey
  0 siblings, 0 replies; 6+ messages in thread
From: Tim Harvey @ 2018-11-07 17:40 UTC (permalink / raw)
  To: buildroot

On Wed, Nov 7, 2018 at 8:38 AM Brad Love <brad@nextdimension.cc> wrote:
>
> Hi Tim,
>
>
> On 07/11/2018 10.17, Tim Harvey wrote:
>
> Greetings,
>
> I'm trying to alter the openocd package to pull code from a specific git sha. Looking over the manual and searching a bit it seems like the following is the thing to do:
>
> diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk
> index 548d8b8..76594fe 100644
> --- a/package/openocd/openocd.mk
> +++ b/package/openocd/openocd.mk
> @@ -4,9 +4,10 @@
>  #
>  ################################################################################
>
> -OPENOCD_VERSION = 0.10.0
> +OPENOCD_VERSION = da4b2d5beb
>  OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2
> -OPENOCD_SITE = http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION)
> +OPENOCD_SITE = git://git.code.sf.net/p/openocd/code
> +OPENCOD_SITE_METHOD = git
>
>
> Note your spelling error:
>
> OPENCOD_SITE_METHOD
>

Brad,

I'm glad I posted the diff or we would have never caught that! However
it still fails in the same way. I'm pretty sure SITE_METHOD is
inferred by the SITE starting with git:// so it probably isn't an
issue (but nice catch!)

>>> openocd da4b2d5beb Downloading
Initialized empty Git repository in
/usr/src/ventana/buildroot/dl/openocd/git/.git/
Fetching all references
remote: Enumerating objects: 59134, done.
remote: Counting objects: 100% (59134/59134), done.
remote: Compressing objects: 100% (23277/23277), done.
remote: Total 59134 (delta 48544), reused 43321 (delta 35697)
Receiving objects: 100% (59134/59134), 13.43 MiB | 3.93 MiB/s, done.
Resolving deltas: 100% (48544/48544), done.
From git://git.code.sf.net/p/openocd/code
 * [new branch]      master     -> origin/master
 * [new branch]      v0.6.1     -> origin/v0.6.1
 * [new tag]         v0.6.1     -> v0.6.1
 * [new tag]         v0.1.0     -> v0.1.0
 * [new tag]         v0.10.0    -> v0.10.0
 * [new tag]         v0.10.0-rc1 -> v0.10.0-rc1
 * [new tag]         v0.10.0-rc2 -> v0.10.0-rc2
 * [new tag]         v0.2.0     -> v0.2.0
 * [new tag]         v0.3.0     -> v0.3.0
 * [new tag]         v0.3.0-rc0 -> v0.3.0-rc0
 * [new tag]         v0.4.0     -> v0.4.0
 * [new tag]         v0.4.0-rc1 -> v0.4.0-rc1
 * [new tag]         v0.4.0-rc2 -> v0.4.0-rc2
 * [new tag]         v0.5.0     -> v0.5.0
 * [new tag]         v0.5.0-rc1 -> v0.5.0-rc1
 * [new tag]         v0.5.0-rc2 -> v0.5.0-rc2
 * [new tag]         v0.6.0     -> v0.6.0
 * [new tag]         v0.6.0-rc1 -> v0.6.0-rc1
 * [new tag]         v0.6.0-rc2 -> v0.6.0-rc2
 * [new tag]         v0.7.0     -> v0.7.0
 * [new tag]         v0.7.0-rc1 -> v0.7.0-rc1
 * [new tag]         v0.7.0-rc2 -> v0.7.0-rc2
 * [new tag]         v0.8.0     -> v0.8.0
 * [new tag]         v0.8.0-rc1 -> v0.8.0-rc1
 * [new tag]         v0.8.0-rc2 -> v0.8.0-rc2
 * [new tag]         v0.9.0     -> v0.9.0
 * [new tag]         v0.9.0-rc1 -> v0.9.0-rc1
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 12 (delta 8), reused 6 (delta 2)
Unpacking objects: 100% (12/12), done.
From git://git.code.sf.net/p/openocd/code
 * [new tag]         v0.3.1     -> v0.3.1
Could not fetch special ref 'da4b2d5beb'; assuming it is not special.
WARNING: no hash file for openocd-da4b2d5beb.tar.bz2
>>> openocd da4b2d5beb Extracting
bzcat /usr/src/ventana/buildroot/dl/openocd/openocd-da4b2d5beb.tar.bz2
| tar --strip-components=1 -C
/usr/src/ventana/buildroot/output/build/openocd-da4b2d5beb   -xf -
bzcat: /usr/src/ventana/buildroot/dl/openocd/openocd-da4b2d5beb.tar.bz2
is not a bzip2 file.
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
package/pkg-generic.mk:160: recipe for target
'/usr/src/ventana/buildroot/output/build/openocd-da4b2d5beb/.stamp_extracted'
failed
make[1]: *** [/usr/src/ventana/buildroot/output/build/openocd-da4b2d5beb/.stamp_extracted]
Error 2
Makefile:84: recipe for target '_all' failed
make: *** [_all] Error 2

Tim

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Altering a package to pull from GIT
  2018-11-07 16:38 ` Thomas Petazzoni
@ 2018-11-07 20:08   ` Arnout Vandecappelle
  2018-11-07 22:30     ` Tim Harvey
  0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2018-11-07 20:08 UTC (permalink / raw)
  To: buildroot



On 07/11/18 17:38, Thomas Petazzoni wrote:
> Hello,
> 
> On Wed, 7 Nov 2018 08:17:47 -0800, Tim Harvey wrote:
> 
>> -OPENOCD_VERSION = 0.10.0
>> +OPENOCD_VERSION = da4b2d5beb
>>  OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2
>> -OPENOCD_SITE =
>> http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION)
>> +OPENOCD_SITE = git://git.code.sf.net/p/openocd/code
> 
>> +OPENCOD_SITE_METHOD = git
> 
>        ^^^^ Typo here :-)
> 
> Also, the OPENOCD_SOURCE variable is no longer needed, but really the
> issue comes from the typo.

 Actually, no. The _SITE_METHOD is not needed at all because the _SITE starts
with git://.

 However, the git download method will create a gzipped tarball and save it as
OPENOCD_SOURCE. But then the tar extraction will try to extract it as if it's a
bzip2. That is the failure.

 Bottom line: remove the _SOURCE definition, or change the .bz2 into .gz.

 Regards,
 Arnout

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] Altering a package to pull from GIT
  2018-11-07 20:08   ` Arnout Vandecappelle
@ 2018-11-07 22:30     ` Tim Harvey
  0 siblings, 0 replies; 6+ messages in thread
From: Tim Harvey @ 2018-11-07 22:30 UTC (permalink / raw)
  To: buildroot

On Wed, Nov 7, 2018 at 12:08 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 07/11/18 17:38, Thomas Petazzoni wrote:
> > Hello,
> >
> > On Wed, 7 Nov 2018 08:17:47 -0800, Tim Harvey wrote:
> >
> >> -OPENOCD_VERSION = 0.10.0
> >> +OPENOCD_VERSION = da4b2d5beb
> >>  OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2
> >> -OPENOCD_SITE =
> >> http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION)
> >> +OPENOCD_SITE = git://git.code.sf.net/p/openocd/code
> >
> >> +OPENCOD_SITE_METHOD = git
> >
> >        ^^^^ Typo here :-)
> >
> > Also, the OPENOCD_SOURCE variable is no longer needed, but really the
> > issue comes from the typo.
>
>  Actually, no. The _SITE_METHOD is not needed at all because the _SITE starts
> with git://.
>
>  However, the git download method will create a gzipped tarball and save it as
> OPENOCD_SOURCE. But then the tar extraction will try to extract it as if it's a
> bzip2. That is the failure.
>
>  Bottom line: remove the _SOURCE definition, or change the .bz2 into .gz.
>

Arnout,

Thanks - that makes complete sense.

I originally tried that but ran into 'ERROR: No hash found for
openocd-da4b2d5beb.tar.gz' but now I understand that I simply need to
remove openocd.hash to get past that one. Adding in an
'OPENOCD_GIT_SUBMODULES = YES' and adding an OPENOCD_CONF_OPTS to
disable a broken driver got me building an up to date openocd
wonderfully.

Thanks for the help!

Tim

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-07 22:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-07 16:17 [Buildroot] Altering a package to pull from GIT Tim Harvey
2018-11-07 16:38 ` Thomas Petazzoni
2018-11-07 20:08   ` Arnout Vandecappelle
2018-11-07 22:30     ` Tim Harvey
2018-11-07 16:38 ` Brad Love
2018-11-07 17:40   ` Tim Harvey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox