Unable to find ack in Ubuntu 17.10 repositories
Ack has a test failure in Ubuntu 17.10 Artful and it has been excluded from Ubuntu until it passes. Perl is upgraded on Artful and the old ack version isn't supported by the new Perl. The new version doesn't pass all its tests. The test failure is caused by problems with the testing framework as run under Ubuntu (even when it works fine in Debian.) A new version that passes will be released soon.
In the meantime, a workaround is to install it through CPAN as suggested on the ack homepage. If you don't already have CPAN installed, you need to install it first:
sudo apt install cpanminus
Then you can use it to install ack:
sudo cpanm install App::Ack
It will build and test it, so it take about 2 minutes, but after it is done it will be in your path at /usr/local/bin/ack
.
I like this installation option because it uses standard apt and cpan repositories. It uses Perl libraries that will get upgraded by automated tools. It can be easily implemented in automated tools such as Ansible.
Sadly ack
is not in 17.10 repositories. A workaround is to install it manually as per the instructions on its website.
Here's what I did:
$ sudo su
# curl https://beyondgrep.com/ack-2.18-single-file > /usr/local/bin/ack && chmod 0755 /usr/local/bin/ack
Packages which fail Ubuntu's automatic as-installed package testing are not included in a release, at least those not from the universe archive (which is imported regularily and automated from Debian Unstable).
Due to a change during the Ubuntu 17.10 Artful Release cycle something broke ack's autopkgtest in Ubuntu and hence stopped ack from being included in Ubuntu releases. You can't even find it in the current development snapshot bionic
, but you can install it if you add a line for bionic-proposed
to your sources.list
.
It is still unclear, what exactly that change was, respectively what the reason (maybe a bug in Ubuntu's autopkgtest infrastructure) and what the trigger is. (Maybe the switch to Perl 5.26 exhibited an issue in Ubuntu's autopkgtest infrastructure.)
What is clear though is that this issue is ubuntu-specific since ack's autopkgtest in Debian passes without any issues. And running autopkgtest locally on a development snapshot of Ubuntu 18.04 Bionic doesn't exhibit these test failures either. (And it seems to build on Ubuntu. And the very same test suite is run at build-time, too, and if it didn't pass, the package wouldn't build which is considered a much more severe issue.)
Another hint that the issue is hidden somewhere in Ubuntu's autopkgtest infrastucture is the fact that most test failures regard their input suddenly as STDIN instead of the expected files.
Any hint on the underlying reasons for these strange ubuntu-autopkgtest-specific test failures is very appreciated in either the according launchpad bug report or in the according upstream bug report.