aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Hiebel <leuhmanu@mageia.org>2020-06-27 07:48:18 +0200
committerManuel Hiebel <leuhmanu@mageia.org>2020-06-27 07:48:18 +0200
commitd87b114571fe5c2aaa43b4e314745092d264a6fb (patch)
treefdb46cb43ea58680f449682092b0cef9ff044934
parent53d489c9cc866d7ebd65e2eaa57242a86861db4b (diff)
downloadfidd-d87b114571fe5c2aaa43b4e314745092d264a6fb.tar
fidd-d87b114571fe5c2aaa43b4e314745092d264a6fb.tar.gz
fidd-d87b114571fe5c2aaa43b4e314745092d264a6fb.tar.bz2
fidd-d87b114571fe5c2aaa43b4e314745092d264a6fb.tar.xz
fidd-d87b114571fe5c2aaa43b4e314745092d264a6fb.zip
Use prefix for the new directory added for cauldron iso, adapt to sha3 checksum, add a torrent tracker
-rw-r--r--fidd.php5
-rw-r--r--lib/FIDD.php14
2 files changed, 10 insertions, 9 deletions
diff --git a/fidd.php b/fidd.php
index b8b0b7b..3a5f741 100644
--- a/fidd.php
+++ b/fidd.php
@@ -13,8 +13,9 @@
// params
-$prefix = 'cauldron';
-$bcd_path = 'cauldron';
+$prefix = '/mageia8-alpha1';
+$bcd_path = 'cauldron/mageia8-alpha1';
+
#$bcd_url = 'rsync://isoqa@bcd.mageia.org/isos/%s/';
$bcd_url = 'rsync://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia/iso/%s/';
diff --git a/lib/FIDD.php b/lib/FIDD.php
index b61132d..f26f604 100644
--- a/lib/FIDD.php
+++ b/lib/FIDD.php
@@ -154,11 +154,11 @@ class FIDD
$md5gpg = str_replace('.iso.md5', '.md5.gpg', basename($f));
$data['md5.gpg'] = $md5gpg;
break;
- case 'sha1':
- $data['sha1'] = self::get_checksum_value($f);
+ case 'sha3':
+ $data['sha3'] = self::get_checksum_value($f);
$sha1gpg = str_replace('.iso.sha1', '.sha1.gpg', basename($f));
- $data['sha1.gpg'] = $sha1gpg;
- break;
+ $data['sha3.gpg'] = $sha1gpg;
+ break;
case 'sha512':
$data['sha512'] = self::get_checksum_value($f);
$sha512gpg = str_replace('.iso.sha512', '.sha512.gpg', basename($f));
@@ -175,19 +175,19 @@ class FIDD
// skip the first one
} else if (null !== ($ret = self::is_correct_name($data['file']))) {
$data['path'] = sprintf('%s/%s',
- $ret['release'] == '' ? sprintf('iso/%s', $ret['version']) : 'iso/cauldron',
+ $ret['release'] == '' ? sprintf('iso/%s', $ret['version']) : sprintf('iso/cauldron%s', $prefix),
str_replace('.iso', '', $data['file'])
);
$torrentfile = str_replace('.iso', '.torrent', $data['file']);
$data['torrent'] = sprintf('%s/%s',
- $ret['release'] == '' ? sprintf('iso/%s/torrents', $ret['version']) : 'iso/cauldron/torrents',
+ $ret['release'] == '' ? sprintf('iso/%s/torrents', $ret['version']) : sprintf('iso/cauldron%s/torrents', $prefix),
$torrentfile
);
$torrentfile = "var/tmp/torrents/".$torrentfile;
$data['magnet'] = sprintf('%s&dn=%s&tr=%s',
magnet($torrentfile),
str_replace('.iso', '', $data['file']),
- 'udp%3A%2F%2Ftracker.torrent.eu.org%3A451');
+ 'udp%3A%2F%2Ftracker.torrent.eu.org%3A451&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337');
$data['name'] = str_replace(array('-', '.iso', 'i586', 'x86_64'), array(' ', '', '32bit', '64bit'), $data['file']);
$data['size'] = $filesizes[$data['file']];