Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
164f2803
Commit
164f2803
authored
Mar 02, 2022
by
Francesc Guasch
Browse files
fix: updated old Debian ISOS
Also improved web crawling
parent
b225727c
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Ravada.pm
View file @
164f2803
...
...
@@ -540,7 +540,7 @@ sub _update_isos {
,
debian_jessie_32
=>
{
name
=>
'
Debian Jessie 32 bits
'
,
description
=>
'
Debian 8 Jessie 32 bits
'
,
url
=>
'
http://cdimage.debian.org/cdimage/archive/^8\.
.*
/i386/iso-cd/
'
,
url
=>
'
http://cdimage.debian.org/cdimage/archive/^8\.
1\d+\.\d$
/i386/iso-cd/
'
,
file_re
=>
'
debian-8.[\d\.]+-i386-xfce-CD-1.iso
'
,
md5_url
=>
'
$url/MD5SUMS
'
,
xml
=>
'
jessie-i386.xml
'
...
...
@@ -551,7 +551,7 @@ sub _update_isos {
,
debian_jessie_64
=>
{
name
=>
'
Debian Jessie 64 bits
'
,
description
=>
'
Debian 8 Jessie 64 bits
'
,
url
=>
'
http://cdimage.debian.org/cdimage/archive/^8\.
.*
/amd64/iso-cd/
'
,
url
=>
'
http://cdimage.debian.org/cdimage/archive/^8\.
1\d+.*\d$
/amd64/iso-cd/
'
,
file_re
=>
'
debian-8.[\d\.]+-amd64-xfce-CD-1.iso
'
,
md5_url
=>
'
$url/MD5SUMS
'
,
xml
=>
'
jessie-amd64.xml
'
...
...
@@ -562,7 +562,7 @@ sub _update_isos {
,
debian_stretch_32
=>
{
name
=>
'
Debian Stretch 32 bits
'
,
description
=>
'
Debian 9 Stretch 32 bits (XFCE desktop)
'
,
url
=>
'
https://cdimage.debian.org/cdimage/archive/^9\..*\d$/i386/iso-cd/
'
,
url
=>
'
https://cdimage.debian.org/cdimage/archive/^9\.
1\d
.*\d$/i386/iso-cd/
'
,
file_re
=>
'
debian-9.[\d\.]+-i386-xfce-CD-1.iso
'
,
md5_url
=>
'
$url/MD5SUMS
'
,
xml
=>
'
jessie-i386.xml
'
...
...
@@ -573,7 +573,7 @@ sub _update_isos {
,
debian_stretch_64
=>
{
name
=>
'
Debian Stretch 64 bits
'
,
description
=>
'
Debian 9 Stretch 64 bits (XFCE desktop)
'
,
url
=>
'
https://cdimage.debian.org/cdimage/archive/^9\..*/amd64/iso-cd/
'
,
url
=>
'
https://cdimage.debian.org/cdimage/archive/^9\.
1\d
.*/amd64/iso-cd/
'
,
file_re
=>
'
debian-9.[\d\.]+-amd64-xfce-CD-1.iso
'
,
md5_url
=>
'
$url/MD5SUMS
'
,
xml
=>
'
jessie-amd64.xml
'
...
...
@@ -584,7 +584,7 @@ sub _update_isos {
,
debian_buster_64
=>
{
name
=>
'
Debian Buster 64 bits
'
,
description
=>
'
Debian 10 Buster 64 bits (XFCE desktop)
'
,
url
=>
'
https://cdimage.debian.org/cdimage/archive/^10\..*\d$/amd64/iso-cd/
'
,
url
=>
'
https://cdimage.debian.org/cdimage/archive/^10\.
1\d+
.*\d$/amd64/iso-cd/
'
,
file_re
=>
'
debian-10.[\d\.]+-amd64-xfce-CD-1.iso
'
,
md5_url
=>
'
$url/MD5SUMS
'
,
xml
=>
'
jessie-amd64.xml
'
...
...
@@ -595,7 +595,7 @@ sub _update_isos {
,
debian_buster_32
=>
{
name
=>
'
Debian Buster 32 bits
'
,
description
=>
'
Debian 10 Buster 32 bits (XFCE desktop)
'
,
url
=>
'
https://cdimage.debian.org/cdimage/archive/^10\..*\d$/i386/iso-cd/
'
,
url
=>
'
https://cdimage.debian.org/cdimage/archive/^10\.
1\d+
.*\d$/i386/iso-cd/
'
,
file_re
=>
'
debian-10.[\d\.]+-i386-(netinst|xfce-CD-1).iso
'
,
md5_url
=>
'
$url/MD5SUMS
'
,
xml
=>
'
jessie-i386.xml
'
...
...
lib/Ravada/VM/KVM.pm
View file @
164f2803
...
...
@@ -1418,8 +1418,7 @@ sub _ua_get($self, $url) {
sleep
1
+
$try
;
}
confess
"
Error getting '
$url
'
"
if
!
$res
;
confess
"
ERROR
"
.
$res
->
code
.
"
"
.
$res
->
message
.
"
:
$url
"
unless
$res
->
code
==
200
||
$res
->
code
==
301
;
return
unless
$res
->
code
==
200
||
$res
->
code
==
301
;
$self
->
_cache_store
(
$url
,
$res
->
body
);
return
$res
->
dom
;
...
...
@@ -1520,13 +1519,16 @@ sub _search_url_file($self, $url_re, $file_re=undef) {
(
$url_re
,
$file_re
)
=
$old_url_re
=~
m{(.*)/(.*)}
;
confess
"
ERROR: Missing file part in
$old_url_re
"
if
!
$file_re
;
if
(
$url_re
=~
/\.\.$/
)
{
$url_re
=~
s{(.*)/.*/\.\.$}{$1}
;
}
}
$file_re
.=
'
$
'
if
$file_re
!~
m{\$$}
;
my
@found
;
for
my
$url
(
$self
->
_match_url
(
$url_re
))
{
push
@found
,
$self
->
_match_file
(
$url
,
$
file
_re
)
;
my
@file
=
$self
->
_match_file
(
$url
,
$file_re
);
push
@found
,
@
file
if
scalar
@file
;
}
return
(
sort
@found
);
}
...
...
@@ -1545,6 +1547,7 @@ sub _match_file($self, $url, $file_re) {
$url
.=
'
/
'
if
$url
!~
m{/$}
;
my
$dom
=
$self
->
_ua_get
(
$url
);
return
if
!
$dom
;
my
@found
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment