Last active
April 5, 2018 13:13
-
-
Save RJ/2284940 to your computer and use it in GitHub Desktop.
Use ESL erlang deb, provide fake erlang-nox package so deps behave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install fake erlang packages, then the ESL package | |
# Afterwards, installing packages that depend on erlang, like rabbitmq, | |
# will use the ESL packaged erlang without installing the older disto ones | |
# | |
apt-get install equivs | |
# Create fake erlang packages, since we are using esl-erlang instead | |
cd /tmp | |
apt-get install -y equivs | |
function make_dummy_package { | |
echo "Section: misc | |
Priority: optional | |
Standards-Version: 3.6.2 | |
Package: $1 | |
Version: 1:99 | |
Maintainer: RJ <[email protected]> | |
Provides: erlang-nox | |
Description: fake erlang package | |
pretends $1 is installed" > $1 | |
equivs-build $1 | |
} | |
erlpkgs="erlang-abi-13.a erlang-appmon erlang-asn1 erlang-base erlang-base-hipe erlang-common-test erlang-corba erlang-crypto erlang-debugger erlang-dev erlang-dialyzer erlang-doc erlang-doc-html erlang-docbuilder erlang-edoc erlang-erl-docgen erlang-esdl erlang-esdl-dev erlang-esdl-doc erlang-et erlang-eunit erlang-examples erlang-gs erlang-ic erlang-ic-java erlang-inets erlang-inviso erlang-jinterface erlang-manpages erlang-megaco erlang-mnesia erlang-nox erlang-observer erlang-odbc erlang-os-mon erlang-parsetools erlang-percept erlang-pman erlang-public-key erlang-reltool erlang-runtime-tools erlang-snmp erlang-src erlang-ssh erlang-ssl erlang-syntax-tools erlang-test-server erlang-toolbar erlang-tools erlang-tv erlang-typer erlang-webtool erlang-wx erlang-x11 erlang-xmerl erlang-yaws" | |
## Argh, can't just make them all, esl-erlang Conflicts: with them. | |
for fucking_stupid_debian_package in erlang-nox | |
do | |
make_dummy_package $fucking_stupid_debian_package | |
done | |
dpkg -i ./*.deb | |
# ESL Erlang | |
echo "deb http://binaries.erlang-solutions.com/debian `lsb_release -cs` contrib" | tee /etc/apt/sources.list.d/erlang-esl.list | |
wget -O - http://binaries.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add - | |
apt-get update | |
# The public key they provide doesn't match (at time of writing..), hence the unauth flag: | |
apt-get install -y --allow-unauthenticated esl-erlang | |
# Now stuff like this works without pulling in distro-erlang: | |
echo "deb http://www.rabbitmq.com/debian/ testing main" | tee /etc/apt/sources.list.d/rabbitmq-server.list | |
wget -O - http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add - | |
apt-get update | |
echo "rabbitmq-server rabbitmq-server/upgrade_previous note" | debconf-set-selections | |
apt-get install rabbitmq-server |
Hi, I tried running this and it seemed to install rabbitmq-server correctly with my esl-erlang. When I tried 'sudo apt-get install yaws' after running your script apt still wanted to remove esl-erlang and install the system erlang.
Maybe something I am doing wrong? Any ideas?
Even if you don't have any ideas about the yaws thing, thanks for the nice script!
There should be "apt-get update" after a new sources are added. Both above line 39 and line 45.. Please update this.
Added the apt-get update commands to the example script. I think ESL are offering split packages (ala debian) for erlang17+ nowadays, so this might become obsolete soon.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is hugely helpful. I may repackage erlang-esl in a ppa to "provide" all of these as well, may be simpler.