Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

It is not possible to specify MySQL client bindings as part of the MySQL setup #40

Open
wildtangent opened this issue Jun 14, 2016 · 0 comments

Comments

@wildtangent
Copy link

wildtangent commented Jun 14, 2016

Part of my configuration requires libmysqlclient-dev to be installed (required for Ruby MySQL2 gem). I'm sure other people's config will also require some binding to MySQL for other reasons.

It would be great if this option was part of the PuPHPet config.

If you just add the dependency to server / packages in the config.yaml then installation fails because the repo.mysql.com-apt repository requires an additional key to be added to allow the packages to be authenticated, e.g.

 apt::source { 'repo.mysql.com-apt':
            location          => "http://repo.mysql.com/apt/${os}",
            release           => $::lsbdistcodename,
            repos             => 'mysql-5.6',
            required_packages => 'debian-keyring debian-archive-keyring',
            include           => { 'src' => true },
            require           => Apt::Pin['repo.mysql.com-apt'],
            key               => {
              'id'   => '8C718D3B5072E1F5',
              'server'  => 'hkp://keyserver.ubuntu.com:80',
            },
          }

Similarly this also happens if you amend puppet/manifests/Mysql.pp with

class { 'mysql::client':
    package_name => $client_package,
    require      => Class['puphpet::mysql::repo'],
    bindings_enable => true, # TODO: Move into hiera config
}

Without key key added, the same error occurs for all MySQL bindings packages (not just this one - snipped for brevity)

/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install php5-mysql' returned 100: Reading package lists...
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install php5-mysql' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Yhe following extra packages will be installed:
libmysqlclient18 libphp5.5-embed php5-common php5-json php5.5-cli
php5.5-common php5.5-json php5.5-opcache php5.5-readline
Suggested packages:
php5-user-cache
The following NEW packages will be installed:
libmysqlclient18 libphp5.5-embed php5-common php5-json php5-mysql php5.5-cli
php5.5-common php5.5-json php5.5-opcache php5.5-readline
0 upgraded, 10 newly installed, 0 to remove and 101 not upgraded.
Need to get 4435 kB of archives.
After this operation, 19.0 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
libmysqlclient18
E: There are problems and -y was used without --force-yes

Once the key is added to the repo.pp then all is good.

Will do a little more testing then open a PR for this...

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

No branches or pull requests

1 participant