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

package manager updates #47

Merged
merged 11 commits into from
Sep 2, 2018

Conversation

mcrauwel
Copy link
Member

@mcrauwel mcrauwel commented Mar 28, 2018

Pull Request (PR) description

  • point package managers to official proxysql repo
  • make repo management more generic
  • use upstream defaults

@mcrauwel mcrauwel added the WIP label Mar 28, 2018
@mcrauwel
Copy link
Member Author

mcrauwel commented Mar 28, 2018

it still need to update the docs and tests...

'Debian': {
ensure_packages('wget')

exec { 'wget-proxysql-package-source':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of this pattern. First of all, the puppet file type can already download files if needed. Other than that you do create a security risk. Any user can write to /tmp so if they can get their .de in there before puppet runs, they can get root. Essentially this is a local root vulnerability.

The way I always look at manage_repo => false is that I have manage my own repository. This modules appears to take a slightly different route.

Copy link
Member Author

@mcrauwel mcrauwel Apr 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have suggestions to fix this... unfortunately dpkg does not allow remote paths for installing packages... would writing to /root be better so only root can change the file?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be better, but I'm not sure I like downloading a package this way to begin with. Personally I'm a big fan of just using repositories rather than reinventing them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with that, the $::proxysql::manage_repo variable does default to true (see this line) so this part is only called when you explicitly don't want to use upstream repo's, which I personally also not encourage...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed - let's not encourage it. Another use case for this code is that someone has an internal mirror (because they gate releases or the host has no internet access), but your generic $repo variable should give sufficient flexibility for that.

Personally I'd remove the whole wget code, but I might need to take a closer look.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with downloading the files. We should just not write them to a public readable directory and we should not use an exec resource. I'm not sure how good the file resource handles remote links, my suggestions is https://github.com/voxpupuli/puppet-archive

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for that idea @bastelfreak

we can even add the md5 checksum to validate the downloaded file. I will implement this ASAP.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know for sure that at least sha1 is supported as well, can we stick with that instead of md5?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream maintainers currently only post md5 sums on the releases page. I can put in a request to also post sha1 there but as long as they don't md5 is what we are stuck with...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bastelfreak is this the proper way how it's done now?

manifests/repo.pp Outdated Show resolved Hide resolved
@mcrauwel
Copy link
Member Author

@tullis I will try to finish work on this ASAP, although I'm preparing for a conference next week I'm doubtful if it will happen this or the next week.

On the other hand you could try using the branch an test it... ;)

@bastelfreak
Copy link
Member

mhm, the git history looks a bit strange here. Did you try to rebase against our latest master branch?

@mcrauwel
Copy link
Member Author

mcrauwel commented Sep 2, 2018

yes I did... what looks strange?

make repo management more generic
use upstream defaults
updated docs
started working on rspec tests
install depenedencies when not using the repo
store downloaded file in a privileged folder
@mcrauwel mcrauwel force-pushed the proxysql-repo-official branch from 7c5c2af to c89c0a6 Compare September 2, 2018 17:23
@mcrauwel
Copy link
Member Author

mcrauwel commented Sep 2, 2018

@bastelfreak fixed the history issue...

manifests/init.pp Outdated Show resolved Hide resolved
manifests/install.pp Outdated Show resolved Hide resolved
manifests/params.pp Outdated Show resolved Hide resolved
@bastelfreak bastelfreak merged commit fc7daf1 into voxpupuli:master Sep 2, 2018
@mcrauwel mcrauwel deleted the proxysql-repo-official branch September 10, 2018 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants