* [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file: @ 2018-11-20 15:41 Горелов Валентин Владимирович 2018-11-22 6:20 ` Michael Olbrich 2018-11-23 10:39 ` Roland Hieber 0 siblings, 2 replies; 5+ messages in thread From: Горелов Валентин Владимирович @ 2018-11-20 15:41 UTC (permalink / raw) To: ptxdist [-- Attachment #1: Type: text/plain, Size: 366 bytes --] Hi PTXdist developers. I've been using your system for a long time and I find it very convenient. But unfortunately, it is unable to get sources from local folder-based Git repositories. That would be useful. I've made a patch to add this function. May I expect it (or refurbished version of it) to be included in a future release? Regards, Valentin Gorelov [-- Attachment #2: add_git_local_support.patch --] [-- Type: application/octet-stream, Size: 565 bytes --] diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh index 17c515644..7c00fe149 100644 --- a/scripts/lib/ptxd_make_get.sh +++ b/scripts/lib/ptxd_make_get.sh @@ -394,6 +394,13 @@ ptxd_make_get() { shift case "${url}" in + git://file:*) + echo "local git repository, removing git://file: prefix from URL" + url=${url#git://file:} + + ptxd_make_get_download_permitted && + ptxd_make_get_git && return + ;; git://*|http://*.git|https://*.git|ssh://*.git) ptxd_make_get_download_permitted && ptxd_make_get_git && return [-- Attachment #3: Type: text/plain, Size: 91 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file: 2018-11-20 15:41 [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file: Горелов Валентин Владимирович @ 2018-11-22 6:20 ` Michael Olbrich 2018-11-22 11:20 ` Горелов Валентин Владимирович 2018-11-23 10:39 ` Roland Hieber 1 sibling, 1 reply; 5+ messages in thread From: Michael Olbrich @ 2018-11-22 6:20 UTC (permalink / raw) To: ptxdist Hello, On Tue, Nov 20, 2018 at 03:41:19PM +0000, Горелов Валентин Владимирович wrote: > I've been using your system for a long time and I find it very > convenient. But unfortunately, it is unable to get sources from local > folder-based Git repositories. That would be useful. > I've made a patch to add this function. May I expect it (or refurbished > version of it) to be included in a future release? Please provide a patch with a proper patch header and including a Signed-of-by line. And I prefer patches inline (sent with 'git send-email') but attachments are ok as well. About the patch: > diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh > index 17c515644..7c00fe149 100644 > --- a/scripts/lib/ptxd_make_get.sh > +++ b/scripts/lib/ptxd_make_get.sh > @@ -394,6 +394,13 @@ ptxd_make_get() { > shift > > case "${url}" in > + git://file:*) I think git+file:// is a better syntax for this. > + echo "local git repository, removing git://file: prefix from URL" > + url=${url#git://file:} > + Instead of this: > + ptxd_make_get_download_permitted && > + ptxd_make_get_git && return > + ;; do this: ;& That's the fall-though for bash 'case' statements. Michael > git://*|http://*.git|https://*.git|ssh://*.git) > ptxd_make_get_download_permitted && > ptxd_make_get_git && return -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file: 2018-11-22 6:20 ` Michael Olbrich @ 2018-11-22 11:20 ` Горелов Валентин Владимирович 0 siblings, 0 replies; 5+ messages in thread From: Горелов Валентин Владимирович @ 2018-11-22 11:20 UTC (permalink / raw) To: ptxdist [-- Attachment #1: Type: text/plain, Size: 2239 bytes --] Hello. Sorry, I have not managed to make "git send-email" work with our mail server. So the patch is an attachment. Regards, Valentin Gorelov -----Original Message----- From: ptxdist [mailto:ptxdist-bounces@pengutronix.de] On Behalf Of Michael Olbrich Sent: Thursday, November 22, 2018 9:21 AM To: ptxdist@pengutronix.de Subject: Re: [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file: Hello, On Tue, Nov 20, 2018 at 03:41:19PM +0000, Горелов Валентин Владимирович wrote: > I've been using your system for a long time and I find it very > convenient. But unfortunately, it is unable to get sources from local > folder-based Git repositories. That would be useful. > I've made a patch to add this function. May I expect it (or > refurbished version of it) to be included in a future release? Please provide a patch with a proper patch header and including a Signed-of-by line. And I prefer patches inline (sent with 'git send-email') but attachments are ok as well. About the patch: > diff --git a/scripts/lib/ptxd_make_get.sh > b/scripts/lib/ptxd_make_get.sh index 17c515644..7c00fe149 100644 > --- a/scripts/lib/ptxd_make_get.sh > +++ b/scripts/lib/ptxd_make_get.sh > @@ -394,6 +394,13 @@ ptxd_make_get() { > shift > > case "${url}" in > + git://file:*) I think git+file:// is a better syntax for this. > + echo "local git repository, removing git://file: prefix from URL" > + url=${url#git://file:} > + Instead of this: > + ptxd_make_get_download_permitted && > + ptxd_make_get_git && return > + ;; do this: ;& That's the fall-though for bash 'case' statements. Michael > git://*|http://*.git|https://*.git|ssh://*.git) > ptxd_make_get_download_permitted && > ptxd_make_get_git && return -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de [-- Attachment #2: 0001-ptxd_make_get_git-add-local-Git-repositories-support.patch --] [-- Type: application/octet-stream, Size: 854 bytes --] From c18145f968d2f7a4531723f700599d2688274abf Mon Sep 17 00:00:00 2001 From: Valentin Gorelov <gorelov.v@bpa.ru> Date: Thu, 22 Nov 2018 12:25:20 +0300 Subject: [PATCH] ptxd_make_get_git: add local Git repositories support Signed-off-by: Valentin Gorelov <gorelov.v@bpa.ru> --- scripts/lib/ptxd_make_get.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh index 17c515644..70de52143 100644 --- a/scripts/lib/ptxd_make_get.sh +++ b/scripts/lib/ptxd_make_get.sh @@ -394,6 +394,10 @@ ptxd_make_get() { shift case "${url}" in + git+file://*) + echo "local git repository, removing git+file:// prefix from URL" + url=${url#git+file://} + ;& git://*|http://*.git|https://*.git|ssh://*.git) ptxd_make_get_download_permitted && ptxd_make_get_git && return -- 2.17.1 [-- Attachment #3: Type: text/plain, Size: 91 bytes --] _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file: 2018-11-20 15:41 [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file: Горелов Валентин Владимирович 2018-11-22 6:20 ` Michael Olbrich @ 2018-11-23 10:39 ` Roland Hieber 2018-11-23 14:50 ` Michael Olbrich 1 sibling, 1 reply; 5+ messages in thread From: Roland Hieber @ 2018-11-23 10:39 UTC (permalink / raw) To: Горелов Валентин Владимирович Cc: ptxdist Hi Valentin, How is this URL to be used? When I specify something like MYPACKAGE_URL=git+file:///home/rhi/projects/ptxdist.git/, I only get an error "Only .tar.gz, .tar.bz2, .tar.xz and .zip archives are supported for git downloads.". Could you add the intended use case to the documentation in doc/ref_manual.rst, section "Package Definition"? - Roland On Tue, Nov 20, 2018 at 03:41:19PM +0000, Горелов Валентин Владимирович wrote: > Hi PTXdist developers. > I've been using your system for a long time and I find it very convenient. But unfortunately, it is unable to get sources from local folder-based Git repositories. That would be useful. > I've made a patch to add this function. May I expect it (or refurbished version of it) to be included in a future release? > > Regards, > Valentin Gorelov > _______________________________________________ > ptxdist mailing list > ptxdist@pengutronix.de -- Roland Hieber | r.hieber@pengutronix.de | Pengutronix e.K. | https://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file: 2018-11-23 10:39 ` Roland Hieber @ 2018-11-23 14:50 ` Michael Olbrich 0 siblings, 0 replies; 5+ messages in thread From: Michael Olbrich @ 2018-11-23 14:50 UTC (permalink / raw) To: ptxdist On Fri, Nov 23, 2018 at 11:39:14AM +0100, Roland Hieber wrote: > How is this URL to be used? When I specify something like > MYPACKAGE_URL=git+file:///home/rhi/projects/ptxdist.git/, I only get an > error "Only .tar.gz, .tar.bz2, .tar.xz and .zip archives are supported > for git downloads.". > > Could you add the intended use case to the documentation in > doc/ref_manual.rst, section "Package Definition"? Like any git URLs. You need to define a source with a supported suffix and add a tag to the URL. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-23 14:50 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-11-20 15:41 [ptxdist] [PATCH] ptxd_make_get.sh: handle git://file: Горелов Валентин Владимирович 2018-11-22 6:20 ` Michael Olbrich 2018-11-22 11:20 ` Горелов Валентин Владимирович 2018-11-23 10:39 ` Roland Hieber 2018-11-23 14:50 ` Michael Olbrich
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox