rpi-update icon indicating copy to clipboard operation
rpi-update copied to clipboard

check kernel version and issue warning if necessary

Open shrx opened this issue 10 years ago • 24 comments

Fixes #178 for real this time

shrx avatar Jun 23 '15 12:06 shrx

The problem is the NOTICE.md mechanism is a general purpose scheme for warning about any change that may cause issues - not just for the 4.0 kernel.

The correct solution is for WARNING.md to include a git hash for the first update that requires the warning. E.g. a line like `HASH: abcdef0123456789abcdef`` Call this hash W. The last rpi-update hash in in /boot/.firmware_revision. Call this U. The latest hash you are updating to is L.

Then, if U < W && L >= W you display the warning.

popcornmix avatar Jun 23 '15 12:06 popcornmix

How to achieve this when hashes are not incremental?

shrx avatar Jun 23 '15 12:06 shrx

This repo is committed to linearly (without rebases/merges) so the date of the hashes should be in order. If you run with JUST_CHECK=1 it prints a list of commits since you last updated. Grepping that for the HASH listed in NOTICE.md should say if you are including the WARNING commit.

popcornmix avatar Jun 23 '15 13:06 popcornmix

I have updated the script so it can compare commit hashes. Also added HASH to NOTICE.md in rpi-firmware repo.

shrx avatar Jun 24 '15 07:06 shrx

Looks promising. Can you handle the case where HASH is not present in NOTICE.md (I think you should get the warning unconditionally) Can you handle the case where /boot/.firmware_revision is not present (treat LOCAL_HASH date as very old).

popcornmix avatar Jun 24 '15 15:06 popcornmix

@shrx any chance you would update this to @popcornmix spec so it can be merged?

Ruffio avatar Apr 30 '16 06:04 Ruffio

@shrx it would be cool if you had the time to make the small changes so this PR could be merged.

Ruffio avatar May 18 '16 10:05 Ruffio

Sorry, I completely forgot about this. Will have a look at what needs to be done.

shrx avatar May 18 '16 15:05 shrx

@Ruffio @popcornmix I think everything is in order now, it should handle the case where HASH is not present in NOTICE.md and where /boot/.firmware_revision is not present.

shrx avatar May 19 '16 07:05 shrx

Currently we have a dependency on curl but not wget, and this PR adds a dependency on wget. Is is possible to switch to using curl for get_hash_date?

popcornmix avatar May 19 '16 13:05 popcornmix

@popcornmix can you check now? I removed the offending spaces (hopefully all) and switched to curl.

shrx avatar May 19 '16 16:05 shrx

Should the curl include -L? I think we needed to add that to all other uses as github sometimes redirects responses.

popcornmix avatar May 19 '16 16:05 popcornmix

It can't hurt, I guess.

shrx avatar May 19 '16 17:05 shrx

@popcornmix is this good to go? I guess that the "add -L to curl in all other places" should be performed in another PR?

Ruffio avatar May 20 '16 06:05 Ruffio

With the current NOTICE.md file, we discard the first line of the message. I suspect we want to use NOTICE when NOTICE_HASH_EXISTS=true and FULL_NOTICE when NOTICE_HASH_EXISTS=false.

popcornmix avatar May 25 '16 16:05 popcornmix

@popcornmix merge?

Ruffio avatar Jun 29 '16 20:06 Ruffio

@shrx any chance you would do the last changes so we can get this PR merged? It would be awsome to get it in place. Think about it

Ruffio avatar Jul 26 '16 06:07 Ruffio

@lurch @popcornmix ready to merge?

Ruffio avatar Jul 27 '16 12:07 Ruffio

@popcornmix ready to merge?

Ruffio avatar Aug 01 '16 13:08 Ruffio

@popcornmix ready to merge?

Ruffio avatar Aug 17 '16 20:08 Ruffio

@shrx any chance you would update this PR?

Ruffio avatar Jan 13 '17 12:01 Ruffio

@Ruffio what needs updating?

shrx avatar Jan 24 '17 11:01 shrx

@shrx Have you read @lurch comments and observations? It also looks like there is a conflict to be resolved.

Ruffio avatar Jan 24 '17 11:01 Ruffio

@shrx is this still relevant?

Ruffio avatar Dec 25 '20 09:12 Ruffio