Netdot
Netdot copied to clipboard
Install fails on Debian 10 because of unsigned repository and missing dep Net::DNS::ZoneFile::Fast
I just tried to install netdot on a newly installed Debian 10 system. I encountered a few issues along the way which most likely need some attention. This is what I did to workaround the issues while trying to do a make apt-install
...
Installing required APT packages
/usr/bin/perl bin/perldeps.pl apt-install
Which RDBMS do you plan to use as backend: [mysql|Pg]? Pg
We need to add a temporary repository of Netdot dependencies until all packages are in Debian/Ubuntu official repositories.
Would you like to continue? [y/n] y
Use of uninitialized value $debian_version in pattern match (m//) at bin/perldeps.pl line 171, <STDIN> line 2.
Updating package indexes from sources
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian buster-updates InRelease
Hit:3 http://security.debian.org/debian-security buster/updates InRelease
Ign:4 https://netdot.apt.nsrc.org unstable/ InRelease
Get:5 https://netdot.apt.nsrc.org unstable/ Release [1,578 B]
Ign:6 https://netdot.apt.nsrc.org unstable/ Release.gpg
Ign:6 http://netdot.apt.nsrc.org unstable/ Release.gpg
Reading package lists... Done
E: The repository 'http://netdot.apt.nsrc.org unstable/ Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
There was a problem running apt-get update
make: *** [Makefile:82: apt-install] Error 25
This was fixed by adding this patch below. I thought maybe it was because my Debian version (buster) wasn't catered for in the list, but looks like there actually isn't a dependancy list for it at http://netdot.apt.nsrc.org buster/ Release
. So just went with unstable
...
index 475386d3..9597279f 100755
--- a/bin/perldeps.pl
+++ b/bin/perldeps.pl
@@ -152,6 +151,8 @@ if ( $action eq 'test' ){
if ( $distro =~ /(debian)/io ){
if ( $distro =~ /(squeeze)/io ){
$debian_version = lc($1);
+ } elsif ( $distro =~ /(buster)/io ){
+ $debian_version = lc($1);
}
$distro = 'debian';
}elsif ( $distro =~ /(ubuntu)/io ){
@@ -166,13 +167,13 @@ if ( $action eq 'test' ){
open(FILE, ">$file")
or die "Cannot open $file for writing";
my $str = "\n## Added by Netdot install\n".
- "deb http://netdot.apt.nsrc.org/ unstable/\n".
- "deb-src http://netdot.apt.nsrc.org/ unstable/\n\n";
+ "deb [trusted=yes] http://netdot.apt.nsrc.org/ unstable/\n".
+ "deb-src [trusted=yes] http://netdot.apt.nsrc.org/ unstable/\n\n";
if ( $debian_version =~ /(wheezy|squeeze)/ ){
my $target = $1;
$str .= "\n".
- "deb http://netdot.apt.nsrc.org/ $target/\n".
- "deb-src http://netdot.apt.nsrc.org/ $target/\n\n";
+ "deb [trusted=yes] http://netdot.apt.nsrc.org/ $target/\n".
+ "deb-src [trusted=yes] http://netdot.apt.nsrc.org/ $target/\n\n";
}
print FILE $str;
close(FILE);
Then I got a failed dependency on Net::DNS::ZoneFile::Fast:
# make apt-install
...
W: --force-yes is deprecated, use one of the options starting with --allow instead.
E: Unable to locate package dnssec-tools
I tried to install this using CPAN:
cpan[1]> i /Net::DNS::ZoneFile::Fast/
Reading '/root/.cpan/Metadata'
Database was generated on Mon, 22 Feb 2021 07:55:58 GMT
No objects found of any type for argument /Net::DNS::ZoneFile::Fast/
That didn't work, so I actually ended up downloading it from CPAN and installing it manually. Once I did this and removed the dependency from the file:
--- a/bin/perldeps.pl
+++ b/bin/perldeps.pl
@@ -63,7 +63,6 @@ my @DEPS = (
{cpan=>'Carp::Assert', apt=>'libcarp-assert-perl', rpm=>'perl-Carp-Assert'},
{cpan=>'Digest::SHA', apt=> 'libdigest-sha-perl', rpm=>'perl-Digest-SHA1'},
{apt=> 'libssl-dev', rpm=>'openssl-devel'}, # needed by Net::DNS::ZoneFile::Fast
- {cpan=>'Net::DNS::ZoneFile::Fast', apt=> 'dnssec-tools', rpm=>''},
{cpan=>'Socket6', apt=> 'libsocket6-perl', rpm=>'perl-Socket6'},
{cpan=>'XML::Simple', apt=>'libxml-simple-perl', rpm=>'perl-XML-Simple'},
{apt=>'snmp'},
and then I ran make apt-install
and it completed successfully.
Obviously this is not a solution, just a workaround. Not really sure how this can be solved long term, esp. the Net::DNS::ZoneFile::Fast dependancy. Not sure if anyone else had encountered similar issues with Debian 10?
Can you try the fix from my branch?
I've replaced Net::DNS::ZoneFile::Fast
with Net::DNS::ZoneFile
.
According to https://metacpan.org/pod/release/HARDAKER/Net-DNS-ZoneFile-Fast-1.27/Fast.pm Net::DNS::ZoneFile::Fast
is deprecated.
I'm quite sure vink78's solution is better, but just for the record what I did when faced with that problem was installing the .deb from debian jessie and seems to be working so far (in a dev machine not in production). https://packages.debian.org/jessie/all/libnet-dns-zonefile-fast-perl/download
Yes, I'm using Ubuntu 22.04 LTS and I've got error about Net::DNS::ZoneFile::Fast First of all I've install Net::DNS::ZoneFile I've replaced according @vink78 in the Netdot/bin/perldeps.pl After that the command "make testdeps" was fine.