support/download: Aternative access methods to CVS
PATCH 1/1 support/download: Aternative access methods to CVS
Allows to user specify other access methods than
:pserver:anonymous@ on CVS repositories.
This shall be specifically defined along MODULE_SITE string.
--- docs/manual/adding-packages-generic.txt | 3 ++- support/download/cvs | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-)
docs/manual/adding-packages-generic.txt +2 -1
@@ -279,7 +279,8 @@ information is (assuming the package name is +libfoo+) : ** +cvs+ for retrieving source code from a CVS repository. Used by default when +LIBFOO_SITE+ begins with +cvs://+. The downloaded source code is cached as with the +svn+ method. - Only anonymous pserver mode is supported. + Anonymous pserver mode is assumed otherwise explicitly defined + on +LIBFOO_SITE+. +LIBFOO_SITE+ 'must' contain the source URL as well as the remote repository directory. The module is the package name. +LIBFOO_VERSION+ is 'mandatory' and 'must' be a tag, a branch, or
support/download/cvs +7 -1
@@ -40,8 +40,14 @@ else select="-r" fi +# The absence of an initial : on ${repo} means access method undefined +if [[ ${repo} == [^:]* ]]; then + # defaults to anonymous pserver + repo=":pserver:anonymous@${repo}" +fi + export TZ=UTC -_cvs ${verbose} -z3 -d"':pserver:anonymous@${repo}'" \ +_cvs ${verbose} -z3 -d"'${repo}'" \ co -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'" tar czf "${output}" "${basename}"
Signature · 1 line
1.9.1
PATCH 1/1 support/download: Aternative access methods to CVS
Dear Joao Mano,
docs/manual/adding-packages-generic.txt information is (assuming the package name is +libfoo+) : · line 283
Quoted 11 lines · Joao Mano
docs/manual/adding-packages-generic.txt +2
-1@@ -279,7 +279,8 @@ information is (assuming the package name is +libfoo+) : ** +cvs+ for retrieving source code from a CVS repository. Used by default when +LIBFOO_SITE+ begins with +cvs://+. The downloaded source code is cached as with the +svn+ method. - Only anonymous pserver mode is supported. + Anonymous pserver mode is assumed otherwise explicitly defined + on +LIBFOO_SITE+.
I think an example would be good (for both the anonymous pserver mode, and the other mode).
Otherwise, it looks good.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 support/download: Aternative access methods to CVS
Hello Thomas.
Thanks for your analysis, already submitted a new version with better examples.
Rgds,
Joao.
Quoted 22 lines · Thomas Petazzoni
Dear Joao Mano,
docs/manual/adding-packages-generic.txt information is (assuming the package name is +libfoo+) : · line 283
Quoted 11 lines · Joao Mano
docs/manual/adding-packages-generic.txt +2
-1@@ -279,7 +279,8 @@ information is (assuming the package name is +libfoo+) : ** +cvs+ for retrieving source code from a CVS repository. Used by default when +LIBFOO_SITE+ begins with +cvs://+. The downloaded source code is cached as with the +svn+ method. - Only anonymous pserver mode is supported. + Anonymous pserver mode is assumed otherwise explicitly defined + on +LIBFOO_SITE+.I think an example would be good (for both the anonymous pserver mode, and the other mode).
Otherwise, it looks good.
Thomas
PATCH v2 1/1 support/download: Aternative access methods to CVS
In reply to Joao ManoAllows user to specify other access methods than
:pserver:anonymous@ on CVS repositories.
This shall be specifically defined along MODULE_SITE string.
---
Changes v1 -> v2:
- Documentation improved with examples. (Thomas Petazzoni suggestion)
--- docs/manual/adding-packages-generic.txt | 7 ++++++- support/download/cvs | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-)
docs/manual/adding-packages-generic.txt +6 -1
@@ -279,7 +279,12 @@ information is (assuming the package name is +libfoo+) : ** +cvs+ for retrieving source code from a CVS repository. Used by default when +LIBFOO_SITE+ begins with +cvs://+. The downloaded source code is cached as with the +svn+ method. - Only anonymous pserver mode is supported. + Anonymous pserver mode is assumed otherwise explicitly defined + on +LIBFOO_SITE+. Both + +LIBFOO_SITE=cvs://libfoo.net:/cvsroot/libfoo+ and + +LIBFOO_SITE=cvs://:ext:libfoo.net:/cvsroot/libfoo+ + are accepted, on the former anonymous pserver access mode is + assumed. +LIBFOO_SITE+ 'must' contain the source URL as well as the remote repository directory. The module is the package name. +LIBFOO_VERSION+ is 'mandatory' and 'must' be a tag, a branch, or
support/download/cvs +7 -1
@@ -40,8 +40,14 @@ else select="-r" fi +# The absence of an initial : on ${repo} means access method undefined +if [[ ${repo} == [^:]* ]]; then + # defaults to anonymous pserver + repo=":pserver:anonymous@${repo}" +fi + export TZ=UTC -_cvs ${verbose} -z3 -d"':pserver:anonymous@${repo}'" \ +_cvs ${verbose} -z3 -d"'${repo}'" \ co -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'" tar czf "${output}" "${basename}"
Signature · 1 line
1.9.1
PATCH v2 1/1 support/download: Aternative access methods to CVS
Joao, All,
On 2016-01-15 18:13 -0200, Joao Mano spake thusly:
Quoted 40 lines
Allows user to specify other access methods than
:pserver:anonymous@ on CVS repositories.This shall be specifically defined along
MODULE_SITEstring.Signed-off-by Joao Mano <[email protected]>---
Changes v1 -> v2:
- Documentation improved with examples. (Thomas Petazzoni suggestion)Signed-off-by Joao Mano <[email protected]>--- docs/manual/adding-packages-generic.txt | 7 ++++++- support/download/cvs | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-)docs/manual/adding-packages-generic.txt +6
-1@@ -279,7 +279,12 @@ information is (assuming the package name is +libfoo+) : ** +cvs+ for retrieving source code from a CVS repository. Used by default when +LIBFOO_SITE+ begins with +cvs://+. The downloaded source code is cached as with the +svn+ method. - Only anonymous pserver mode is supported. + Anonymous pserver mode is assumed otherwise explicitly defined + on +LIBFOO_SITE+. Both + +LIBFOO_SITE=cvs://libfoo.net:/cvsroot/libfoo+ and + +LIBFOO_SITE=cvs://:ext:libfoo.net:/cvsroot/libfoo+ + are accepted, on the former anonymous pserver access mode is + assumed. +LIBFOO_SITE+ 'must' contain the source URL as well as the remote repository directory. The module is the package name. +LIBFOO_VERSION+ is 'mandatory' and 'must' be a tag, a branch, orsupport/download/cvs +0
-0
support/download/cvs else · line 44
Quoted 5 lines
support/download/cvs +2
-0@@ -40,8 +40,14 @@ else select="-r" fi +# The absence of an initial : on ${repo} means access method undefined +if [[ ${repo} == [^:]* ]]; then
- quote variable expansions, to protect against empty variables.
- I think a regexp would be better to match against
if [[ ! "${repo}" =~ ^: ]]; then(yes I know, the other condition is not quoting the variable. My bad, I forgot to state so in my review of that patch, back then. Still, that's not an exscue for not doing it properly here. Maybe you can also fix it when you resubmit, please? ;-) )
support/download/cvs else · line 50
Quoted 7 lines
support/download/cvs +5
-1+ # defaults to anonymous pserver + repo=":pserver:anonymous@${repo}" +fi + export TZ=UTC -_cvs ${verbose} -z3 -d"':pserver:anonymous@${repo}'" \ +_cvs ${verbose} -z3 -d"'${repo}'" \
Otherwise, I'm fine with it.
Regards,
Yann E. MORIN.
Quoted 10 lines
support/download/cvs +0
-0co -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'" tar czf "${output}" "${basename}"Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH v2 1/1 support/download: Aternative access methods to CVS
In reply to Joao ManoDear Joao Mano,
Quoted 10 lines · Joao Mano
Allows user to specify other access methods than
:pserver:anonymous@ on CVS repositories.This shall be specifically defined along
MODULE_SITEstring.Signed-off-by Joao Mano <[email protected]>---
Changes v1 -> v2:
- Documentation improved with examples. (Thomas Petazzoni suggestion)
Thanks, applied after doing some changes (mainly suggested by Yann) :
[Thomas:
- as suggested by Yann, quote the variable expansion
- as suggested by Yann, use a regexp match
- tweak commit log]
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com