Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian based version fix, won't actually works #26

Open
rbucchi opened this issue Jun 23, 2016 · 3 comments
Open

Debian based version fix, won't actually works #26

rbucchi opened this issue Jun 23, 2016 · 3 comments

Comments

@rbucchi
Copy link

rbucchi commented Jun 23, 2016

I'm trying to fix a specific erlang version through the 'version' parameter, but that's the result:

root@ocp-puppet1:/etc/puppet/environments/ocp# puppet apply --environment ocp -e "class {'erlang': version => '1:16.b.3-dfsg-1ubuntu2.1'}"

Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults
Notice: Compiled catalog for ocp-puppet1.openstacklocal in environment ocp in 0.58 seconds
Warning: /Apt_key[Add key: D208507CA14F4FCA from Apt::Source erlang]: The id should be a full fingerprint (40 characters), see README.
Notice: /Stage[main]/Erlang/Package[erlang-nox]/ensure: ensure changed 'purged' to '1:16.b.3-dfsg-1ubuntu2.1'
Notice: Finished catalog run in 23.29 seconds


root@ocp-puppet1:/etc/puppet/environments/ocp# dpkg -l | grep erlang

ii  erlang-asn1                      1:19.0-1                         amd64        Erlang/OTP modules for ASN.1 support
ii  erlang-base                      1:19.0-1                         amd64        Erlang/OTP virtual machine and base applications
ii  erlang-corba                     1:19.0-1                         amd64        Erlang/OTP applications for CORBA support
ii  erlang-crypto                    1:19.0-1                         amd64        Erlang/OTP cryptographic modules
ii  erlang-diameter                  1:19.0-1                         amd64        Erlang/OTP implementation of RFC 3588 protocol
ii  erlang-edoc                      1:19.0-1                         amd64        Erlang/OTP module for generating documentation
ii  erlang-eldap                     1:19.0-1                         amd64        Erlang/OTP LDAP library
ii  erlang-erl-docgen                1:19.0-1                         amd64        Erlang/OTP documentation stylesheets
ii  erlang-eunit                     1:19.0-1                         amd64        Erlang/OTP module for unit testing
ii  erlang-ic                        1:19.0-1                         amd64        Erlang/OTP IDL compiler
ii  erlang-inets                     1:19.0-1                         amd64        Erlang/OTP Internet clients and servers
ii  erlang-mnesia                    1:19.0-1                         amd64        Erlang/OTP distributed relational/object hybrid database
ii  erlang-nox                       1:16.b.3-dfsg-1ubuntu2.1         all          Erlang/OTP applications that don't require X Window System
ii  erlang-odbc                      1:19.0-1                         amd64        Erlang/OTP interface to SQL databases
ii  erlang-os-mon                    1:19.0-1                         amd64        Erlang/OTP operating system monitor
ii  erlang-parsetools                1:19.0-1                         amd64        Erlang/OTP parsing tools
ii  erlang-percept                   1:19.0-1                         amd64        Erlang/OTP concurrency profiling tool
ii  erlang-public-key                1:19.0-1                         amd64        Erlang/OTP public key infrastructure
ii  erlang-runtime-tools             1:19.0-1                         amd64        Erlang/OTP runtime tracing/debugging tools
ii  erlang-snmp                      1:19.0-1                         amd64        Erlang/OTP SNMP applications
ii  erlang-ssh                       1:19.0-1                         amd64        Erlang/OTP implementation of SSH protocol
ii  erlang-ssl                       1:19.0-1                         amd64        Erlang/OTP implementation of SSL
ii  erlang-syntax-tools              1:19.0-1                         amd64        Erlang/OTP modules for handling abstract Erlang syntax trees
ii  erlang-tools                     1:19.0-1                         amd64        Erlang/OTP various tools
ii  erlang-webtool                   1:19.0-1                         amd64        Erlang/OTP helper for web-based tools
ii  erlang-xmerl                     1:19.0-1                         amd64        Erlang/OTP XML tools

Just erlang-nox package is version-fixed. Shouldn't be the other versions 1.16... as well?

@Vincent--
Copy link

Hi,

I have the same issue and it's because of the way erlang-nox package is build:

This package is a dummy package which will install all Erlang/OTP
 applications which do not require X Window System to run

It only ensures packages are installed but there is no dependency about the version number:

Depends: erlang-base | erlang-base-hipe, erlang-asn1, erlang-corba, erlang-crypto, erlang-diameter, erlang-edoc, erlang-eldap, erlang-erl-docgen, erlang-eunit, erlang-ic, erlang-inets, erlang-inviso, erlang-mnesia, erlang-odbc, erlang-os-mon, erlang-parsetools, erlang-percept, erlang-public-key, erlang-runtime-tools, erlang-snmp, erlang-ssh, erlang-ssl, erlang-syntax-tools, erlang-tools, erlang-xmerl

So basically, during the first install the dependencies might be ok (not even sure) but after that, if you try to upgrade the package it has not impact on the version of erlang-base, etc. So it's quite useless, in my opinion.

Basically, we have 2 options here:

  • erlang-nox package needs to specify the version for its dependencies
  • this module shouldn't rely on erlang-nox any more for Ubuntu/Debian and specify all the packages manually

@vegardx
Copy link

vegardx commented Jun 22, 2018

I imagine a lot of people are going to come here with similar issue now that erlang-nox 21.0 was released, with breaking changes to rabbitmq-server. Currently the only workaround seems to stop using this module and stick with distro packages, or pinning all the packages manually, like suggested over me.

@mmogylenko
Copy link

Plus, in some cases distro packages are not fully supported by some software: https://www.rabbitmq.com/which-erlang.html

I did a temp workaround:


class profile::erlang (
  $key          = '434975BD900CCBE4F7EE1B1ED208507CA14F4FCA',
  $key_source   = 'http://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc',
  $package_name = 'erlang-base',
  $location     = 'http://packages.erlang-solutions.com/ubuntu',
  $repos        = 'contrib',
  $version      = 'present'
) {

  # This crap because of that https://github.com/garethr/garethr-erlang/issues/26
  # and https://www.rabbitmq.com/which-erlang.html
  # and Erlang Solutions (not able to build deb packages in a right way)

  $pkgs_a = [
    'erlang-ic', 'erlang-odbc', 'erlang-eunit', 'erlang-parsetools',
    'erlang-syntax-tools', 'erlang-mnesia', 'erlang-xmerl', 'erlang-crypto'
  ]

  $pkgs_b = [ 'erlang-asn1', 'erlang-runtime-tools' ]
  $pkgs_c = [ 'erlang-inviso', 'erlang-public-key', 'erlang-snmp' ]
  $pkgs_d = [ 'erlang-ssh', 'erlang-ssl', 'erlang-os-mon' ]
  $pkgs_e = [ 'erlang-diameter', 'erlang-eldap', 'erlang-inets' ]

  $pkgs_f = [
    'erlang-corba',
    'erlang-edoc',
    'erlang-percept',
    'erlang-tools'
  ]

  Package {
    ensure => $version
  }

  package { $pkgs_a:
    require => Package[$package_name]
  } ->

  package { $pkgs_b: } ->
  package { $pkgs_c: } ->
  package { $pkgs_d: } ->
  package { $pkgs_e: } ->
  package { $pkgs_f: } ->

  package { 'erlang-erl-docgen': } ->
  package { 'erlang-nox': } # RMQ Server Depends on this package

  apt::source { 'erlang':
    ensure   => present,
    location => $location,
    release  => $::lsbdistcodename,
    repos    => $repos,
    include  => { 'src'     => false},
    key      => {
      'id'     => $key,
      'server' => 'hkp://keyserver.ubuntu.com:80',
      'source' => $key_source
    }
  }

  apt::pin { 'erlang':
    priority => 600,
    packages => 'erlang-*',
    origin   => 'packages.erlang-solutions.com',
    require  => Apt::Source['erlang'],
  } ->

  package { $package_name: ensure => $version, }

}```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants