Skip to contentSkip to conversation

github and patches updates in the manual (branch yem/manual)

PATCH New Yann E. MORIN 5 participants 13 messages Nov 2, 2014 – Feb 3, 2015

lore
Share & tools
lore
#0 lore raw

cover github and patches updates in the manual (branch yem/manual)

Hello All!

This series, intended to go in before -rc1:

- clarifies the manual about what hashes are meaningful
- clarifies the manual about when to add hashes for GitHub-hosted tarballs
- removes hashes from two packages downloaded from GitHub
- updates the patch naming convention

Regards,
Yann E. MORIN.

The following changes since commit a0b5052e9dec110903e1887e17bca314df228bb4:

sunxi-boards: bump version (2014-11-01 23:28:06 +0100)

are available in the git repository at:

git://git.busybox.net/~ymorin/git/buildroot yem/manual

for you to fetch changes up to 0b36850cf518809b83d4e21b81b0bc974c847199:

docs/manual: document the new patch naming convention (2014-11-02 15:35:47 +0100)

----------------------------------------------------------------
Maxime Hadjinlian (3):
manual: Add notes about GitHub and hashes
opencv: Remove hash file
libevent: Remove hash file

Yann E. MORIN (2):
docs/manual: also document md5 hash docs/manual: document the new patch naming convention

 docs/manual/adding-packages-directory.txt | 40 +++++++++++++++++++++----------
 docs/manual/patch-policy.txt              | 21 ++++++++++------
 package/libevent/libevent.hash            |  2 --
 package/opencv/opencv.hash                |  3 ---
 4 files changed, 42 insertions(+), 24 deletions(-)
 delete mode 100644 package/libevent/libevent.hash
 delete mode 100644 package/opencv/opencv.hash
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.  |
'------------------------------^-------^------------------^--------------------'
#1 lore raw

PATCH 1/5 docs/manual: also document md5 hash

We accept an md5 hash, but only if comming from upstream, and id also accompanied with a stronger hash.

Thanks to Maxime for the interactive review! ;-)

Cc Maxime Hadjinlian <[email protected]>
Cc Samuel Martin <[email protected]>
---
 docs/manual/adding-packages-directory.txt | 33 ++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 12 deletions(-)
docs/manual/adding-packages-directory.txt +21 -12
index c145829..174e567 100644
@@ -376,8 +376,9 @@ The format of this file is one line for each file for which to check the
 hash, each line being space-separated, with these three fields:
 
 * the type of hash, one of:
-** +sha1+, +sha224+, +sha256+, +sha384+, +sha512+
+** +md5+, +sha1+, +sha224+, +sha256+, +sha384+, +sha512+
 * the hash of the file:
+** for +md5+, 32 hexadecimal characters
 ** for +sha1+, 40 hexadecimal characters
 ** for +sha224+, 56 hexadecimal characters
 ** for +sha256+, 64 hexadecimal characters
@@ -391,28 +392,36 @@ lines are ignored.
 There can be more than one hash for a single file, each on its own line. In
 this case, all hashes must match.
 
-Ideally, the hashes stored in this file should match the hashes published by
-upstream, e.g. on their website, in the e-mail announcement... If upstream
-provides more than one type of hash (say, +sha1+ and +sha512+), then it is
-best to add all those hashes in the +.hash+ file. If upstream does not
-provide any hash, then compute at least one yourself, and mention this in a
-comment line above the hashes.
+*Note:* Ideally, the hashes stored in this file should match the hashes
+published by upstream, e.g. on their website, in the e-mail announcement...
+If upstream provides more than one type of hash (e.g. +sha1+ and +sha512+),
+then it is best to add all those hashes in the +.hash+ file. If upstream
+does not provide any hash, or only provides an +md5+ hash, then compute at
+least one strong hash yourself (like +sha1+ or +sha256+, but not +md5+),
+and mention this in a comment line above the hashes.
 
 *Note:* the number of spaces does not matter, so one can use spaces to
 properly align the different fields.
 
-The example below defines a +sha1+ and a +sha256+ published by upstream for
-the main +libfoo-1.2.3.tar.bz2+ tarball, plus two locally-computed hashes,
-a +sha256+ for a downloaded patch, and a +sha1+ for a downloaded binary blob:
+The example below defines:
+
+* a +sha1+ and a +sha256+ published by upstream for the main
+  +libfoo-1.2.3.tar.bz2+ tarball,
+* an +md5+ from upstream and a locally-computed +sha256+ for a downloaded
+  binary blob,
+* a +sha256+ from upstream for a downloaded patch.
 
 ----
 # Hashes from: http://www.foosoftware.org/download/libfoo-1.2.3.tar.bz2.{sha1,sha256}:
 sha1   486fb55c3efa71148fe07895fd713ea3a5ae343a                         libfoo-1.2.3.tar.bz2
 sha256 efc8103cc3bcb06bda6a781532d12701eb081ad83e8f90004b39ab81b65d4369 libfoo-1.2.3.tar.bz2
 
-# No upstream hashes for the following:
+# md5 from: http://www.foosoftware.org/download/libfoo-1.2.3.tar.bz2.md5, sha256 locally computed:
+md5    2d608f3c318c6b7557d551a5a09314f03452f1a1                         libfoo-data.bin
+sha256 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b libfoo-data.bin
+
+# Upstream has no hash, so locally computed:
 sha256 ff52101fb90bbfc3fe9475e425688c660f46216d7e751c4bbdb1dc85cdccacb9 libfoo-fix-blabla.patch
-sha1   2d608f3c318c6b7557d551a5a09314f03452f1a1                         libfoo-data.bin
 ----
 
 If the +.hash+ file is present, and it contains one or more hashes for a
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/5 manual: Add notes about GitHub and hashes

In reply to Yann E. MORIN

From: Maxime Hadjinlian <[email protected]>

We can't take hashes from GitHub, unless the tarball has been uploaded by the maintainer, otherwise it is generated and may change over time, which renders hash files, useless.

---
v2-> v3 (YEM):
- move the block down, to be with with the other "note"
- add reference to the GitHub helper
- small gramatical fix s/automated/automatically/

v1 -> v2:
- Add changes as requested by Yann E. Morin
- Reword the comment on released tarball

---
 docs/manual/adding-packages-directory.txt | 7 +++++++
 1 file changed, 7 insertions(+)
docs/manual/adding-packages-directory.txt +7 -0
index 174e567..8d9c3b9 100644
@@ -400,6 +400,13 @@ does not provide any hash, or only provides an +md5+ hash, then compute at
 least one strong hash yourself (like +sha1+ or +sha256+, but not +md5+),
 and mention this in a comment line above the hashes.
 
+*Note:* If +libfoo+ is from GitHub (see xref:github-download-url[] for
+details), we can only accept +.hash+ file if the package is a released
+(e.g. uploaded by the maintainer) tarball. Otherwise, the automatically
+generated tarball may change over time, and thus its hashes may be
+different each time it is downloaded, making the +.hash+ file irrelevant
+for that tarball.
+
 *Note:* the number of spaces does not matter, so one can use spaces to
 properly align the different fields.
 
Signature · 1 line
1.9.1
#3 lore raw

PATCH 3/5 opencv: Remove hash file

In reply to Yann E. MORIN

From: Maxime Hadjinlian <[email protected]>

Since the tarball we download is generated from GitHub, there's no saying that the tarball won't differ in a month from now. So the hash has no value there.

---
YEM:
- remove comment about changes to the manual, done in a previous

    patch;
  - after some testing, it seems tarballs are cached for only about 15
    minutes, which is largely enough to easily trigger a false hash
    mismatch.
---
 package/opencv/opencv.hash | 3 ---
 1 file changed, 3 deletions(-)
 delete mode 100644 package/opencv/opencv.hash
package/opencv/opencv.hash deleted +0 -3
deleted file mode 100644
index fc3b750..0000000
@@ -1,3 +0,0 @@
-# From https://github.com/itseez/opencv/archive/2.4.10/
-md5	3346a59310d788d3845f4fd6043a108a	opencv-2.4.10.tar.gz
-sha1	a0c2d5944364fc4f26b6160b33c03082b1fa08c1	opencv-2.4.10.tar.gz
Signature · 1 line
1.9.1
#4 lore raw

PATCH 3/5 opencv: Remove hash file

Dear Yann E. MORIN,

Quoted 9 lines · Yann E. MORIN

From: Maxime Hadjinlian <[email protected]>

Since the tarball we download is generated from GitHub, there's no saying that the tarball won't differ in a month from now. So the hash has no value there.

Applied, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 4/5 libevent: Remove hash file

In reply to Yann E. MORIN

From: Maxime Hadjinlian <[email protected]>

Since the tarball we download is generated from GitHub, there's no saying that the tarball won't differ in a month from now. So the hash has no value there.

---
YEM:
- remove comment about changes to the manual, done in a previous

    patch;
  - after some testing, it seems tarballs are cached for only about 15
    minutes, which is largely enough to easily trigger a false hash
    mismatch.
---
 package/libevent/libevent.hash | 2 --
 1 file changed, 2 deletions(-)
 delete mode 100644 package/libevent/libevent.hash
package/libevent/libevent.hash deleted +0 -2
deleted file mode 100644
index efa0dc5..0000000
@@ -1,2 +0,0 @@
-# Locally calculated after checking pgp signature
-sha256	22a530a8a5ba1cb9c080cba033206b17dacd21437762155c6d30ee6469f574f5	libevent-2.0.21-stable.tar.gz
Signature · 1 line
1.9.1
#6 lore raw

PATCH 4/5 libevent: Remove hash file

Dear Yann E. MORIN,

Quoted 9 lines · Yann E. MORIN

From: Maxime Hadjinlian <[email protected]>

Since the tarball we download is generated from GitHub, there's no saying that the tarball won't differ in a month from now. So the hash has no value there.

This patch was marked as Rejected because we've switched back to using a tarball from sourceforge for libevent instead of github.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH 5/5 docs/manual: document the new patch naming convention

In reply to Yann E. MORIN

To ease generating patches, we now use a naming convention that is in line with what git-format-patch does, that is:
- do not prefix patches with the package name
- prefix patches with a 4-digit mber
- start numbering at 0001

Cc Peter Korsgaard <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Thomas De Schampheleire <[email protected]>
Cc Arnout Vandecappelle <[email protected]>
Cc Samuel Martin <[email protected]>

---
Changes v1 -> v2:
- reword slightly (Thomas DS)

---
 docs/manual/patch-policy.txt | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
docs/manual/patch-policy.txt +14 -7
index 745f58d..6e27e71 100644
@@ -31,16 +31,23 @@ Most patches are provided within Buildroot, in the package
 directory; these typically aim to fix cross-compilation, libc support,
 or other such issues.
 
-These patch files should be named +<packagename>-<number>-<description>.patch+.
-
-A +series+ file, as used by +quilt+, may also be added in the
-package directory. In that case, the +series+ file defines the patch
-application order.
+These patch files should be named +<number>-<description>.patch+.
 
 .Notes
 - The patch files coming with Buildroot should not contain any package version
-reference in their filename.
-- The field +<number>+ in the patch file name refers to the 'apply order'.
+  reference in their filename.
+- The field +<number>+ in the patch file name refers to the 'apply order',
+  and shall start at 1; It is preferred to pad the number with zeros up to 4
+  digits, like 'git-format-patch' does. E.g.: +0001-foobar-the-buz.patch+
+- Previously, it was mandatory for patches to be prefixed with the name of
+  the package, like +<package>-<number>-<description>.patch+, but that is
+  no longer the case. Existing packages will be fixed as time passes. 'Do
+  not prefix patches with the package name.'
+- Previously, a +series+ file, as used by +quilt+, could also be added in
+  the package directory. In that case, the +series+ file defines the patch
+  application order. This is deprecated, and will be removed in the future.
+  'Do not use a series file.'
+
 
 ==== Global patch directory
 
Signature · 1 line
1.9.1
#8 lore raw

PATCH 1/1 lttng-tools: Update hash file after silent update

In reply to Yann E. MORIN

The tarballs for 2.5.1 have been silently updated by upstream at '2014-10-31 15:35'.

This fixes:
http://autobuild.buildroot.net/results/a2a/a2ab3c526a3f67371524e1b076512cf1f8058c72/build-end.log

Signed-off-by Maxime Hadjinlian <[email protected]>
Cc: Romain Naour <[email protected]>
---
Thanks to Romain Naour for pointing this out on IRC.

---
 package/lttng-tools/lttng-tools.hash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/lttng-tools/lttng-tools.hash +1 -1
index c0c4bc1..92a4401 100644
@@ -1,2 +1,2 @@
 # Locally generated
-sha256  3c6511e6ceef975cfe36b5644ab9bfaa6780c71b1d2551718279823924429739  lttng-tools-2.5.1.tar.bz2
+sha256  1084ce1fac0030cb5e0e3e117002444ceb9f94d6a15a6cce6607c480eca9b21b  lttng-tools-2.5.1.tar.bz2
Signature · 1 line
2.1.1
#9 lore raw

PATCH 1/1 lttng-tools: Update hash file after silent update

Hi Maxime,

Le 02/11/2014 17:24, Maxime Hadjinlian a ?crit :

Quoted 20 lines

The tarballs for 2.5.1 have been silently updated by upstream at '2014-10-31 15:35'.

This fixes:
http://autobuild.buildroot.net/results/a2a/a2ab3c526a3f67371524e1b076512cf1f8058c72/build-end.log

Signed-off-by Maxime Hadjinlian <[email protected]>
Cc: Romain Naour <[email protected]>
---
Thanks to Romain Naour for pointing this out on IRC.

---
 package/lttng-tools/lttng-tools.hash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/lttng-tools/lttng-tools.hash +0 -0
index c0c4bc1..92a4401 100644

package/lttng-tools/lttng-tools.hash line 2

Quoted 3 lines
package/lttng-tools/lttng-tools.hash +1 -1
@@ -1,2 +1,2 @@
 # Locally generated
-sha256  3c6511e6ceef975cfe36b5644ab9bfaa6780c71b1d2551718279823924429739  lttng-tools-2.5.1.tar.bz2
+sha256  1084ce1fac0030cb5e0e3e117002444ceb9f94d6a15a6cce6607c480eca9b21b  lttng-tools-2.5.1.tar.bz2

Manually downloaded tarball, and manually checked the hash.

Best regards,
Romain Naour

#10 lore raw

PATCH 1/1 lttng-tools: Update hash file after silent update

In reply to Maxime Hadjinlian

Maxime, All,

On 2014-11-02 17:24 +0100, Maxime Hadjinlian spake thusly:

Quoted 2 lines

The tarballs for 2.5.1 have been silently updated by upstream at '2014-10-31 15:35'.

Grr... :-(

However, the other LTTng archives still have the same hashes... :-(

Quoted 5 lines

This fixes:
http://autobuild.buildroot.net/results/a2a/a2ab3c526a3f67371524e1b076512cf1f8058c72/build-end.log

Signed-off-by Maxime Hadjinlian <[email protected]>
Cc: Romain Naour <[email protected]>

Manualy downloaded, and manually checked the hash.

However, I NAK this change, because the archive has changed a *lot*:

    http://code.bulix.org/z2c8r0-87331?raw

Also, notice this file:

    lttng-tools-2.5.1/tests/regression/tools/save-load/ /tmp/tmp.eAJ1f0oCZE/test-42/save-42.lttng

Yes, that's a single filename with a space in it (but the new archives removes it, although it still is in the repository).

So, Maxime and Romain, please talk to upstream about this issue.

In the meantime, I prefer we do *not* update the hash until we have a sensible answer from the LTTng folks, or at least until later in the release cycle.

Regards,
Yann E. MORIN.

Quoted 21 lines

---
Thanks to Romain Naour for pointing this out on IRC.

---
 package/lttng-tools/lttng-tools.hash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/lttng-tools/lttng-tools.hash +1 -1
index c0c4bc1..92a4401 100644
@@ -1,2 +1,2 @@
 # Locally generated
-sha256  3c6511e6ceef975cfe36b5644ab9bfaa6780c71b1d2551718279823924429739  lttng-tools-2.5.1.tar.bz2
+sha256  1084ce1fac0030cb5e0e3e117002444ceb9f94d6a15a6cce6607c480eca9b21b  lttng-tools-2.5.1.tar.bz2
Signature · 6 lines
2.1.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.  |
'------------------------------^-------^------------------^--------------------'
#11 lore raw

PATCH 1/1 lttng-tools: Update hash file after silent update

Hi Yann, Romain, all

Quoted 24 lines · Yann E. MORIN

Maxime, All,

On 2014-11-02 17:24 +0100, Maxime Hadjinlian spake thusly:

Quoted 2 lines

The tarballs for 2.5.1 have been silently updated by upstream at '2014-10-31 15:35'.

Grr... :-(

However, the other LTTng archives still have the same hashes... :-(

Quoted 5 lines

This fixes:
http://autobuild.buildroot.net/results/a2a/a2ab3c526a3f67371524e1b076512cf1f8058c72/build-end.log

Signed-off-by Maxime Hadjinlian <[email protected]>
Cc: Romain Naour <[email protected]>

Manualy downloaded, and manually checked the hash.

However, I NAK this change, because the archive has changed a *lot*:

    http://code.bulix.org/z2c8r0-87331?raw

Also, notice this file:

    lttng-tools-2.5.1/tests/regression/tools/save-load/ /tmp/tmp.eAJ1f0oCZE/test-42/save-42.lttng
Quoted 8 lines

Yes, that's a single filename with a space in it (but the new archives removes it, although it still is in the repository).

So, Maxime and Romain, please talk to upstream about this issue.

In the meantime, I prefer we do *not* update the hash until we have a sensible answer from the LTTng folks, or at least until later in the release cycle.

Indeed do not apply this patch, it seems the lttng folks have messed up their releases, I'll report a bug.
Thanks Yann for finding this.

Quoted 33 lines

Regards,
Yann E. MORIN.

Quoted 17 lines

---
Thanks to Romain Naour for pointing this out on IRC.

---
 package/lttng-tools/lttng-tools.hash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/lttng-tools/lttng-tools.hash +1 -2
index c0c4bc1..92a4401 100644
@@ -1,2 +1,2 @@
 # Locally generated
-sha256  3c6511e6ceef975cfe36b5644ab9bfaa6780c71b1d2551718279823924429739  lttng-tools-2.5.1.tar.bz2
+sha256  1084ce1fac0030cb5e0e3e117002444ceb9f94d6a15a6cce6607c480eca9b21b  lttng-tools-2.5.1.tar.bz2
--

2.1.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

|  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.  |

'------------------------------^-------^------------------^--------------------'

#12 lore raw

PATCH 1/1 lttng-tools: Update hash file after silent update

In reply to Maxime Hadjinlian
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Maxime" == Maxime Hadjinlian <[email protected]> writes:

The tarballs for 2.5.1 have been silently updated by upstream at '2014-10-31 15:35'.

This fixes:
http://autobuild.buildroot.net/results/a2a/a2ab3c526a3f67371524e1b076512cf1f8058c72/build-end.log

Signed-off-by Maxime Hadjinlian <[email protected]>
Cc: Romain Naour <[email protected]>

Sorry, for some reason I missed this patch and did the modification myself.

Signature · 1 line
Bye, Peter Korsgaard