Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] package download verification
Date: Wed, 07 May 2014 13:00:33
Message-Id: 536A2E42.6000909@gmail.com
In Reply to: [gentoo-user] package download verification by James
1 On 07/05/2014 07:23, James wrote:
2 > So,
3 >
4 > Since (forever) I have manually checked the .Digest and such using
5 > openssl or gpg, not unlike what is in the gentoo handbook.
6 >
7 > This is retarded, and I'm too old to do that now, so I went shopping
8 > for some script/tool/code to do it for me. I sure that a sinlple
9 > script with diff would be sufficient to compare the download hash
10 > against the one openssl generates... In fact, I do not know
11 > why the integrity check is not fully integrated into ftp. rsync.
12 > or whatever the download tool is?
13 >
14 > If futher suspicion warrants, I can always perform a manual spot check,
15 > but some integrated integrity should be part of the download process?
16 >
17 >
18 >
19 > But why not just use a simple script:
20 >
21 > <scriptname> package.just.downloaded package.just.downloaded.DIGESTS
22 >
23 > and have it return:
24 >
25 > <ok or match or corrupted>
26 >
27 > After all this is intuitively obviously, when I burn a cd/dvd
28 > and is an integrated option.
29 >
30 > ???
31 >
32 > So I found this python script "verify.py"
33 >
34 > https://bbs.archlinux.org/viewtopic.php?id=83839
35 >
36 >
37 > Sure there is a slicker, newer, better scheme?
38 > Pardon my (lazy) ignorance here.....
39 >
40 >
41 > James
42 >
43 >
44 >
45 >
46
47
48 Perhaps I'm just old and retarded myself, but portage already does what
49 you want. I edited the hashes in the Manifest file for something in my
50 local overlay and tried to emerge it. Here's what I got:
51
52 # emerge -1 mysql-refman
53 Calculating dependencies... done!
54
55 >>> Verifying ebuild manifests
56
57 >>> Emerging (1 of 1) app-doc/mysql-refman-5.5::alan
58 !!! Previously fetched file:
59 '/var/distfiles/refman-5.5-en.html-chapter.tar.gz'
60 !!! Reason: Failed on SHA256 verification
61 !!! Got:
62 2eb9f21b4bc88b89a05e28b8a25ec221d36677ee13f2733c1dd1d0d28e81ad0d
63 !!! Expected:
64 2eb9f21b4bc88b89a05e28b8a25ec221d36677ee13f2733c1dd1d0d28e81ad0e
65 Refetching... File renamed to
66 '/var/distfiles/refman-5.5-en.html-chapter.tar.gz._checksum_failure_.1s4y_D'
67
68
69 In this case I had the download files already in distfiles, portage
70 however applies the same check if it has to download things first.
71
72
73 --
74 Alan McKinnon
75 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] package download verification Michael Orlitzky <mjo@g.o>
[gentoo-user] Re: package download verification James <wireless@×××××××××××.com>