Use a date for cvs and bump expect
cover Use a date for cvs and bump expect
This patch set bump expect and in order to do that add to the cvs script support for using a date instead of a tag.
v2:
- add acked-by to the first patch
- improve documentation about the date
- use TZ=UCT to set a default time zone
- add a patch to remove the comment at the end of the version string
Fabio Porcedda (4):
support/download/cvs: add support to use a date instead of a tag
manual: cvs: document that a date can be used instead of a tag
expect: bump to version 5.45.3
manual: don't use a comment at the end of the version variable
assignment
docs/manual/adding-packages-generic.txt | 4 +++- docs/manual/adding-packages-tips.txt | 3 ++- package/expect/expect.hash | 2 -- package/expect/expect.mk | 6 +++--- support/download/cvs | 11 ++++++++++- 5 files changed, 18 insertions(+), 8 deletions(-) delete mode 100644 package/expect/expect.hash
Signature · 1 line
2.3.5
PATCH 1/4 support/download/cvs: add support to use a date instead of a tag
This is useful when a tag is not avaiable.
--- support/download/cvs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
support/download/cvs +10 -1
@@ -26,7 +26,16 @@ rev="${3}" rawname="${4}" basename="${5}" +if [[ ${rev} =~ ^[0-9] ]]; then + # Date, because a tag cannot begin with a number + select="-D ${rev}" +else + # Tag + select=-"r :${rev}" +fi + +export TZ=UCT ${CVS} ${verbose} -z3 -d":pserver:anonymous@${repo}" \ - co -d "${basename}" -r ":${rev}" -P "${rawname}" + co -d "${basename}" "${select}" -P "${rawname}" tar czf "${output}" "${basename}"
Signature · 1 line
2.3.5
PATCH 1/4 support/download/cvs: add support to use a date instead of a tag
Quoted 1 line · Fabio Porcedda
This is useful when a tag is not avaiable.
Actually, we currently only support a date. The cvs co -r option has the
following syntax: -r tag[:date] - so we currently always interpret the version as a date, since we put a : in front of it.
The :date extension is only valid when the tag is not a tag but a branch. If
the tag is empty, it refers to the trunk.
AFAICS, the -D option is completely equivalent to -r :date .
I applied just the third patch of this series and could build expect successfully.
That said, I think the current behaviour is ridiculous, so perhaps the : should
be removed from the -r handling. The : can be added explicitly in the version number - but then the directory name of expect will be expect-_2014-05-02 which is also a bit weird...
Quoted 12 lines
Signed-off-by Fabio Porcedda <[email protected]>Acked-by "Yann E. MORIN" <[email protected]>--- support/download/cvs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)support/download/cvs +0
-0
support/download/cvs rev="${3}" · line 34
Quoted 9 lines
support/download/cvs +6
-0@@ -26,7 +26,16 @@ rev="${3}" rawname="${4}" basename="${5}" +if [[ ${rev} =~ ^[0-9] ]]; then + # Date, because a tag cannot begin with a number + select="-D ${rev}" +else + # Tag + select=-"r :${rev}"
Note that this won't work, since the space will be interpreted as a tag name.
It should be
select="-r :\"${rev}\""and remove the quotes from where ${select} is used.
Regards,
Arnout
Quoted 9 lines
support/download/cvs +4
-1+fi + +export TZ=UCT ${CVS} ${verbose} -z3 -d":pserver:anonymous@${repo}" \ - co -d "${basename}" -r ":${rev}" -P "${rawname}" + co -d "${basename}" "${select}" -P "${rawname}" tar czf "${output}" "${basename}"
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/4 support/download/cvs: add support to use a date instead of a tag
Quoted 6 lines · Arnout Vandecappelle
Quoted 1 line · Fabio Porcedda
This is useful when a tag is not avaiable.
Actually, we currently only support a date. The cvs co -r option has the
following syntax: -r tag[:date] - so we currently always interpret the version as a date, since we put a : in front of it.
Where have you found such documentation? I've checked the "man cvs" but I've found only this:
-r tag
Use the revision specified by the tag argument ....
Quoted 6 lines
The :date extension is only valid when the tag is not a tag but a branch. If
the tag is empty, it refers to the trunk.AFAICS, the -D option is completely equivalent to -r :date .
I applied just the third patch of this series and could build expect successfully.
Are you sure about that? I've tried to download the source without using this patch but it fails:
Quoted 1 line
Quoted 1 line
Quoted 1 line
expect 2014-05-02 Downloading
cvs [checkout aborted]: tag `:2014-05-02' must start with a letter --2015-05-04 08:57:58-- http://sources.buildroot.net/expect-2014-05-02.tar.gz
Resolving sources.buildroot.net (sources.buildroot.net)... 176.9.16.109 Connecting to sources.buildroot.net (sources.buildroot.net)|176.9.16.109|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2015-05-04 08:57:58 ERROR 404: Not Found.
Quoted 31 lines
That said, I think the current behaviour is ridiculous, so perhaps the : should
be removed from the -r handling. The : can be added explicitly in the version number - but then the directory name of expect will be expect-_2014-05-02 which is also a bit weird...Quoted 12 lines
Signed-off-by Fabio Porcedda <[email protected]>Acked-by "Yann E. MORIN" <[email protected]>--- support/download/cvs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)support/download/cvs +0
-0support/download/cvs rev="${3}" · line 34
Quoted 9 lines
support/download/cvs +6
-0@@ -26,7 +26,16 @@ rev="${3}" rawname="${4}" basename="${5}" +if [[ ${rev} =~ ^[0-9] ]]; then + # Date, because a tag cannot begin with a number + select="-D ${rev}" +else + # Tag + select=-"r :${rev}"Note that this won't work, since the space will be interpreted as a tag name.
It should be
Quoted 4 lines
select="-r :\"${rev}\""and remove the quotes from where ${select} is used.
It fails on my pc (Fedora 22):
Quoted 1 line
Quoted 1 line
Quoted 1 line
expect
expect_5_45Downloading
rev: expect_5_45
cvs [checkout aborted]: tag `:"expect_5_45"' must start with a letter
e.g. it's works using this:
select=-"r ${rev}"IMHO the simplest solution is:
+if [[ ${rev} =~ ^[0-9] ]]; then
+ # Date, because a tag cannot begin with a number
+ select="-D"
+else
+ # Tag
+ select="-r"
+fi
+
+export TZ=UCT
${CVS} ${verbose} -z3 -d":pserver:anonymous@${repo}" \
- co -d "${basename}" -r ":${rev}" -P "${rawname}"
+ co -d "${basename}" ${select} "${rev}" -P "${rawname}"
Thanks for reviewing
Signature · 1 line
Fabio Porcedda
PATCH 1/4 support/download/cvs: add support to use a date instead of a tag
Quoted 8 lines · Fabio Porcedda
Quoted 6 lines · Arnout Vandecappelle
Quoted 1 line · Fabio Porcedda
This is useful when a tag is not avaiable.
Actually, we currently only support a date. The cvs co -r option has the
following syntax: -r tag[:date] - so we currently always interpret the version as a date, since we put a : in front of it.
Quoted 6 lines
Where have you found such documentation? I've checked the "man cvs" but I've found only this:
-r tag
Use the revision specified by the tag argument ....
I guess my Debian sid has a different cvs version. Mine is
1.12.13-MirDebian-11 - which seems to indicate that there could be some Debian-specific patches in there.
So this means that the current code simply doesn't work at all for you, right?
Quoted 11 lines
Quoted 8 lines
The :date extension is only valid when the tag is not a tag but a branch. If
the tag is empty, it refers to the trunk.AFAICS, the -D option is completely equivalent to -r :date .
I applied just the third patch of this series and could build expect successfully.
Are you sure about that? I've tried to download the source without using this patch but it fails:
Yes I'm sure,
[snip]
Quoted 12 lines
Quoted 12 lines
support/download/cvs rev="${3}" · line 34
Quoted 6 lines
support/download/cvs +6
-0+if [[ ${rev} =~ ^[0-9] ]]; then + # Date, because a tag cannot begin with a number + select="-D ${rev}" +else + # Tag + select=-"r :${rev}"Note that this won't work, since the space will be interpreted as a tag name.
It should beselect="-r :\"${rev}\""
Quoted 7 lines
Quoted 2 lines
and remove the quotes from where ${select} is used.
It fails on my pc (Fedora 22):
Quoted 1 line
Quoted 1 line
Quoted 1 line
expect
expect_5_45Downloadingrev:
expect_5_45
cvs [checkout aborted]: tag `:"expect_5_45"' must start with a letter
Which kind of proves my point - the current situation doesn't work on F22.
Quoted 6 lines
e.g. it's works using this:
select=-"r ${rev}"IMHO the simplest solution is:
support/download/cvs rev="${3}" · line 37
Quoted 9 lines
support/download/cvs +9
-0+if [[ ${rev} =~ ^[0-9] ]]; then + # Date, because a tag cannot begin with a number + select="-D" +else + # Tag + select="-r" +fi + +export TZ=UCT
Small nit: UCT is correct, but I see more people use UTC (which is also what
e.g. LANG=C date -u prints) so let's stick to that.
Review
Quoted 3 lines
${CVS} ${verbose} -z3 -d":pserver:anonymous@${repo}" \
(quoted diff) +1
-1- co -d "${basename}" -r ":${rev}" -P "${rawname}" + co -d "${basename}" ${select} "${rev}" -P "${rawname}"
Looks good to me. Will you cook up a proper patch?
It would be nice if it would be possible to give _both_ a branch and a date,
but that is probably pushing it a little - especially for a VCS that is almost dead...
Regards,
Arnout
Quoted 3 lines
Thanks for reviewing
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/4 support/download/cvs: add support to use a date instead of a tag
Quoted 65 lines · Arnout Vandecappelle
Quoted 8 lines · Fabio Porcedda
Quoted 6 lines · Arnout Vandecappelle
Quoted 1 line · Fabio Porcedda
This is useful when a tag is not avaiable.
Actually, we currently only support a date. The cvs co -r option has the
following syntax: -r tag[:date] - so we currently always interpret the version as a date, since we put a : in front of it.Quoted 6 lines
Where have you found such documentation? I've checked the "man cvs" but I've found only this:
-r tag
Use the revision specified by the tag argument ....
I guess my Debian sid has a different cvs version. Mine is
1.12.13-MirDebian-11 - which seems to indicate that there could be some Debian-specific patches in there.So this means that the current code simply doesn't work at all for you, right?
Quoted 11 lines
Quoted 8 lines
The :date extension is only valid when the tag is not a tag but a branch. If
the tag is empty, it refers to the trunk.AFAICS, the -D option is completely equivalent to -r :date .
I applied just the third patch of this series and could build expect successfully.
Are you sure about that? I've tried to download the source without using this patch but it fails:
Yes I'm sure,
[snip]
Quoted 12 lines
Quoted 12 lines
support/download/cvs rev="${3}" · line 34
Quoted 6 lines
support/download/cvs +6
-0+if [[ ${rev} =~ ^[0-9] ]]; then + # Date, because a tag cannot begin with a number + select="-D ${rev}" +else + # Tag + select=-"r :${rev}"Note that this won't work, since the space will be interpreted as a tag name.
It should beselect="-r :\"${rev}\""Quoted 7 lines
Quoted 2 lines
and remove the quotes from where ${select} is used.
It fails on my pc (Fedora 22):
Quoted 1 line
Quoted 1 line
Quoted 1 line
expect
expect_5_45Downloadingrev:
expect_5_45
cvs [checkout aborted]: tag `:"expect_5_45"' must start with a letterWhich kind of proves my point - the current situation doesn't work on F22.
Quoted 6 lines
e.g. it's works using this:
select=-"r ${rev}"IMHO the simplest solution is:
Quoted 12 lines
support/download/cvs rev="${3}" · line 37
Quoted 9 lines
support/download/cvs +9
-0+if [[ ${rev} =~ ^[0-9] ]]; then + # Date, because a tag cannot begin with a number + select="-D" +else + # Tag + select="-r" +fi + +export TZ=UCTSmall nit: UCT is correct, but I see more people use UTC (which is also what
e.g. LANG=C date -u prints) so let's stick to that.
OK
Quoted 5 lines
Review
Quoted 3 lines
${CVS} ${verbose} -z3 -d":pserver:anonymous@${repo}" \
(quoted diff) +1
-1- co -d "${basename}" -r ":${rev}" -P "${rawname}" + co -d "${basename}" ${select} "${rev}" -P "${rawname}"Looks good to me. Will you cook up a proper patch?
Sure
Quoted 3 lines
It would be nice if it would be possible to give _both_ a branch and a date,
but that is probably pushing it a little - especially for a VCS that is almost dead...
Using a branch just works because the "-r" option accept a tag or a branch, maybe i update the documentation.
BR
Signature · 1 line
Fabio Porcedda
PATCH 2/4 manual: cvs: document that a date can be used instead of a tag
In reply to Fabio PorceddaAlso instead of using the generic word "timestamp" use the word "tag".
--- docs/manual/adding-packages-generic.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
docs/manual/adding-packages-generic.txt +3 -1
@@ -280,7 +280,9 @@ information is (assuming the package name is +libfoo+) : Only anonymous pserver mode is supported. +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 timestamp. + +LIBFOO_VERSION+ is 'mandatory' and 'must' be a tag or a date + (e.g. "2014-10-20", "2014-10-20 13:45", "2014-10-20 13:45+01:00" + see "man cvs" for further details). ** +git+ for retrieving source code from a Git repository. Used by default when +LIBFOO_SITE+ begins with +git://+. The downloaded source code is cached as with the +svn+
Signature · 1 line
2.3.5
PATCH 3/4 expect: bump to version 5.45.3
In reply to Fabio PorceddaDownload it from the cvs repository because it is not avaialbe as a downloadable file.
Also because a tag isn't avaiable use the date.
--- package/expect/expect.hash | 2 -- package/expect/expect.mk | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 package/expect/expect.hash
package/expect/expect.hash deleted +0 -2
@@ -1,2 +0,0 @@ -# Locally computed: -sha256 b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040 expect5.45.tar.gz
package/expect/expect.mk +3 -3
@@ -4,9 +4,9 @@ # ################################################################################ -EXPECT_VERSION = 5.45 -EXPECT_SOURCE = expect$(EXPECT_VERSION).tar.gz -EXPECT_SITE = http://downloads.sourceforge.net/project/expect/Expect/$(EXPECT_VERSION) +# Version 5.45.3 +EXPECT_VERSION = 2014-05-02 +EXPECT_SITE = cvs://expect.cvs.sourceforge.net:/cvsroot/expect EXPECT_LICENSE = Public domain EXPECT_LICENSE_FILES = README
Signature · 1 line
2.3.5
PATCH 3/4 expect: bump to version 5.45.3
Quoted 1 line · Fabio Porcedda
Download it from the cvs repository because it is not avaialbe as a
available
Quoted 2 lines
downloadable file.
Also because a tag isn't avaiable use the date.
available
Quoted 2 lines
Signed-off-by Fabio Porcedda <[email protected]>
Note that this can be applied without patch 1/3.
Regards,
Arnout
Quoted 32 lines
--- package/expect/expect.hash | 2 -- package/expect/expect.mk | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) delete mode 100644 package/expect/expect.hashpackage/expect/expect.hash deleted +0
-2@@ -1,2 +0,0 @@ -# Locally computed: -sha256 b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040 expect5.45.tar.gzpackage/expect/expect.mk +3
-3@@ -4,9 +4,9 @@ # ################################################################################ -EXPECT_VERSION = 5.45 -EXPECT_SOURCE = expect$(EXPECT_VERSION).tar.gz -EXPECT_SITE = http://downloads.sourceforge.net/project/expect/Expect/$(EXPECT_VERSION) +# Version 5.45.3 +EXPECT_VERSION = 2014-05-02 +EXPECT_SITE = cvs://expect.cvs.sourceforge.net:/cvsroot/expect EXPECT_LICENSE = Public domain EXPECT_LICENSE_FILES = README
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 4/4 manual: don't use a comment at the end of the version variable assignment
In reply to Fabio PorceddaThe comment at the end of the version string assigment could lead to a download failure so don't use it as a example.
--- docs/manual/adding-packages-tips.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
docs/manual/adding-packages-tips.txt +2 -1
@@ -42,7 +42,8 @@ on GitHub. As GitHub is known to have changed download mechanisms in the past, the 'github' helper function should be used as shown below. ------------------------ -FOO_VERSION = v1.0 # tag or full commit ID +# Use a tag or a full commit ID +FOO_VERSION = v1.0 FOO_SITE = $(call github,<user>,<package>,$(FOO_VERSION)) ------------------------
Signature · 1 line
2.3.5
Thomas Petazzoni
AppliedPATCH 4/4 manual: don't use a comment at the end of the version variable assignment
Dear Fabio Porcedda,
Quoted 8 lines · Fabio Porcedda
The comment at the end of the version string assigment could lead to a download failure so don't use it as a example.
Signed-off-by Fabio Porcedda <[email protected]>Reported-by Yann E. MORIN <[email protected]>--- docs/manual/adding-packages-tips.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com