Commit graph

16 commits

Author SHA1 Message Date
Jürgen Buchmüller
c1fd6c389e hooks/do-fetch/00-distfiles.sh: contents checksum
Add support for contents checksums. This is meant to be used for tarballs
like the ones coming from https://*.googlesource.com/ which on every download
change their outer checksum due to being packaged with different date/time
stamps or similar.

If such a distfile still contains the same files as the author of a template
found, then the checksum of its contents can be specified by prepending a
commercial at (@) to the corresponding checksum="..." line.

Depending on the format of the distfile its entire contents will then be
piped into sha256sum and the resulting digest is verified against what
follows after the @.
2018-03-02 23:28:36 +01:00
Jürgen Buchmüller
d7b1a31cf0 00-distfiles.sh: avoid unnecessary second loop
We're already done after the first loop, if all distfiles
were found and their checksums verified ok.
2015-11-05 22:05:25 +01:00
Jürgen Buchmüller
d8eca52226 00-distfiles.sh: add code to purge wrong checksum
If a distfile changed its checksum (SHA256) without at the same time
also changing its version, the distfile cache needs to be purged.

This is done by verifying only for already existing distfiles that the
specified checksum matches. If it does not, the file and its entry in
/host/sourcers/by_sha256 are purged using the inode number of the file.

The second loop then as usual fetches the distfiles and verifies their
checksum against the list entry.

+ drbd-utils fix checksum and also build + cross build
2015-11-03 19:27:07 +01:00
Juan RP
bcdacb66a0 xbps-src: replace basename(1) with ${var##*/}.
Reduce number of fork+exec due to using a subshell to execute basename(1).
2015-09-11 07:55:40 +02:00
Jürgen Buchmüller
00c18e3e88 distfiles mirror: try $curfile first (renamed) 2015-09-04 17:13:31 +02:00
Jürgen Buchmüller
793a156a0f Implement XBPS_DISTFILES_MIRROR (second try)
The idea is to remove some burden from the original download
locations for distfiles by specifying one or more mirror locations.

+ Works with http:// or ftp:// mirrors for all $XBPS_CHROOT_CMD variants
+ Works with file:// mirrors together with uchroot and proot
2015-08-31 15:48:22 +02:00
jbu
d6fb3784dd 00-distfiles: fix hard link existence test 2015-07-06 21:34:52 +02:00
jbu
b30cbd9870 xbps-src: implement a by_sha256 hash cache 2015-07-04 11:18:46 +02:00
Juan RP
3d24cee58a hooks/do-fetch/distfiles: do not strip '>*' in url, pass it as is. 2014-03-12 15:47:49 +01:00
Juan RP
cd02e84329 hooks/do-fetch/distfiles: simplify the code considerably. 2014-03-12 15:23:08 +01:00
Enno Boland
b2afcc35be common/hooks/do-fetch: support 'xbps-uhelper fetch's new '>'-destfile syntax. 2014-03-12 13:47:57 +01:00
Juan RP
ca2eeec0c0 hooks/do-fetch/00-distfiles: fix previous again. 2014-03-07 11:22:51 +01:00
Juan RP
b9e30d45dc hooks/do-fetch/00-distfiles: improve previous to handle all cases. 2014-03-07 11:20:56 +01:00
Juan RP
ede40cdc41 hooks/do-fetch/00-distfiles: error out if distfiles aren't verified (found by Gottox). 2014-03-07 11:12:52 +01:00
Juan RP
b5c0ac90cc common/hooks/do-fetch: 00-distfiles: disable trap on ERR to fix autobuild issues. 2014-03-05 13:58:46 +01:00
Juan RP
aa83852d7b common/hooks: add support for do-<phase> hooks as suggested by Gottox.
- New hooks for do-fetch and do-extract moved from xbps-src.
- Renamed some hooks to have XX as prefix.
2014-03-05 11:02:37 +01:00