Skip to content

Commit

Permalink
configure: add support for debian sid
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Oct 18, 2024
1 parent fbf6863 commit 3ff755b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ if(!$options->{'nounsafeallow3f'} && !$options->{'unsafeallow3f'}) {
if($os eq 'rhel' && $ver >= 8) {
$options->{'unsafeallow3f'} = 1;
}
if($os eq 'debian' && $ver >= 11) {
if($os eq 'debian' && ($ver eq 'sid' || $ver >= 11)) {
$options->{'unsafeallow3f'} = 1;
}
}
Expand Down Expand Up @@ -218,7 +218,7 @@ sub _get_os {
$version =~ s/\..*$//gmx; # we only need the major number
return("rhel", 0+$version);
} else {
die(sprintf("Unable to detect distribution and version from %s\n%s", $release_file, $release_info));
die(sprintf("Unable to detect distribution and version from %s:\n%s", $release_file, $release_info));
}
} elsif(-e '/etc/os-release') {
my $release_file = '/etc/os-release';
Expand All @@ -234,12 +234,16 @@ sub _get_os {
$version = $1;
$version =~ s/\..*$//gmx; # we only need the major number
}
if($line =~ /^PRETTY_NAME=.*\/sid$/mx) {
$version = "sid";
}
}

if ($os && $version) {
return($os, $version) if $version eq 'sid';
return($os, 0+$version);
} else {
die(sprintf("Unable to detect distribution and version from %s\n%s", $release_file, $release_info));
die(sprintf("Unable to detect distribution and version from %s:\n%s", $release_file, $release_info));
}
}

Expand Down

0 comments on commit 3ff755b

Please sign in to comment.