Message ID | CAJ+vNU2bzK3AD8BV6u_F-eXGdyKjGrrmGkyGT-e2kyRNxEE+zg@mail.gmail.com |
---|---|
State | Not Applicable |
Headers | show |
Series | Altering a package to pull from GIT | expand |
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
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@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body text="#000000" bgcolor="#FFFFFF"> <p>Hi Tim,</p> <p><br> </p> <div class="moz-cite-prefix">On 07/11/2018 10.17, Tim Harvey wrote:<br> </div> <blockquote type="cite" cite="mid:CAJ+vNU2bzK3AD8BV6u_F-eXGdyKjGrrmGkyGT-e2kyRNxEE+zg@mail.gmail.com"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <div dir="ltr"> <div dir="ltr"> <div dir="ltr">Greetings, <div><br> </div> <div>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:</div> <div><br> </div> <div> <div>diff --git a/package/openocd/<a href="http://openocd.mk" moz-do-not-send="true">openocd.mk</a> b/package/openocd/<a href="http://openocd.mk" moz-do-not-send="true">openocd.mk</a></div> <div>index 548d8b8..76594fe 100644</div> <div>--- a/package/openocd/<a href="http://openocd.mk" moz-do-not-send="true">openocd.mk</a></div> <div>+++ b/package/openocd/<a href="http://openocd.mk" moz-do-not-send="true">openocd.mk</a></div> <div>@@ -4,9 +4,10 @@</div> <div> #</div> <div> ################################################################################</div> <div> </div> <div>-OPENOCD_VERSION = 0.10.0</div> <div>+OPENOCD_VERSION = da4b2d5beb</div> <div> OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2</div> <div>-OPENOCD_SITE = <a href="http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION)" moz-do-not-send="true">http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION)</a></div> <div>+OPENOCD_SITE = git://<a href="http://git.code.sf.net/p/openocd/code" moz-do-not-send="true">git.code.sf.net/p/openocd/code</a></div> <div>+OPENCOD_SITE_METHOD = git</div> </div> </div> </div> </div> </blockquote> <p><br> </p> <p> </p> <p>Note your spelling error:</p> <p>OPENCOD_SITE_METHOD</p> <p><br> </p> <p>Cheers,</p> <p>Brad<br> </p> <p><br> </p> <p><br> </p> <blockquote type="cite" cite="mid:CAJ+vNU2bzK3AD8BV6u_F-eXGdyKjGrrmGkyGT-e2kyRNxEE+zg@mail.gmail.com"> <div dir="ltr"> <div dir="ltr"> <div dir="ltr"> <div> <div> OPENOCD_LICENSE = GPL-2.0+</div> <div> OPENOCD_LICENSE_FILES = COPYING</div> <div> # 0002-configure-enable-build-on-uclinux.patch patches <a href="http://configure.ac" moz-do-not-send="true">configure.ac</a></div> <div><br> </div> <div><br> </div> <div>In other words _SITE needs to be the git:// URL and _VERSION should be the branch/tag/sha. However when I build I get:</div> <div><br> </div> <div> <div>>>> openocd da4b2d5beb Extracting</div> <div>bzcat /usr/src/ventana/buildroot/dl/openocd/openocd-da4b2d5beb.tar.bz2 | tar --s</div> <div>trip-components=1 -C /usr/src/ventana/buildroot/output/build/openocd-da4b2d5beb </div> <div> -xf -</div> <div>bzcat: /usr/src/ventana/buildroot/dl/openocd/openocd-da4b2d5beb.tar.bz2 is not a</div> <div> bzip2 file.</div> <div>tar: This does not look like a tar archive </div> <div>tar: Exiting with failure status due to previous errors</div> <div>package/<a href="http://pkg-generic.mk:160" moz-do-not-send="true">pkg-generic.mk:160</a>: recipe for target '/usr/src/ventana/buildroot/output</div> <div>/build/openocd-da4b2d5beb/.stamp_extracted' failed</div> <div>make[1]: *** [/usr/src/ventana/buildroot/output/build/openocd-da4b2d5beb/.stamp_</div> <div>extracted] Error 2</div> <div>Makefile:84: recipe for target '_all' failed</div> <div>make: *** [_all] Error 2</div> </div> <div><br> </div> <div>I thought it was the fact there was an openocd.hash but removing it still fails. Any ideas?</div> <div><br> </div> <div>Best regards,</div> <div><br> </div> <div>Tim</div> </div> </div> </div> </div> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <pre class="moz-quote-pre" wrap="">_______________________________________________ buildroot mailing list <a class="moz-txt-link-abbreviated" href="mailto:buildroot@busybox.net">buildroot@busybox.net</a> <a class="moz-txt-link-freetext" href="http://lists.busybox.net/mailman/listinfo/buildroot">http://lists.busybox.net/mailman/listinfo/buildroot</a> </pre> </blockquote> </body> </html>
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
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
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
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
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: # 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