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

expected package source on Ubuntu 16 #309

Closed
wyardley opened this issue Sep 7, 2017 · 6 comments
Closed

expected package source on Ubuntu 16 #309

wyardley opened this issue Sep 7, 2017 · 6 comments
Labels

Comments

@wyardley
Copy link
Contributor

wyardley commented Sep 7, 2017

It seems like Ubuntu 16.04 is configuring the nodesource repo:

https://github.com/voxpupuli/puppet-nodejs/blob/master/manifests/params.pp#L83-L86

However, the installed package actually ends up being from the default repo, presumably because it's a different version? I can work on this in #308, but right now, it will fail, because I built in the expectation that the package should come from nodesource. Let's figure out how this should behave, and then we can figure out whether the right fix is adjusting the test or adjusting the module.

root@ubuntu-server-1604-x64:~# cat /etc/apt/sources.list.d/nodesource.list 
# This file is managed by Puppet. DO NOT EDIT.
# nodesource
deb https://deb.nodesource.com/node_0.10 xenial main
root@ubuntu-server-1604-x64:~# apt-get update
Ign:1 http://apt.puppetlabs.com xenial InRelease
Hit:2 http://apt.puppetlabs.com xenial Release                                          
Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease                              
Hit:5 https://deb.nodesource.com/node_0.10 xenial InRelease                             
Get:6 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]          
Get:8 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Fetched 306 kB in 0s (370 kB/s)                                     
Reading package lists... Done
root@ubuntu-server-1604-x64:~# apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs is already the newest version (4.2.6~dfsg-1ubuntu4.1).
0 upgraded, 0 newly installed, 0 to remove and 187 not upgraded.
root@ubuntu-server-1604-x64:~# dpkg -s nodejs
Package: nodejs
Status: install ok installed
Priority: optional
Section: web
Installed-Size: 12930
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: amd64
Version: 4.2.6~dfsg-1ubuntu4.1
Provides: nodejs-abi-46
Depends: libc6 (>= 2.15), libgcc1 (>= 1:3.4), libicu55 (>= 55.1-1~), libssl1.0.0 (>= 1.0.2~beta3), libstdc++6 (>= 5.2), libuv1 (>= 1.6.1), zlib1g (>= 1:1.1.4)
Description: evented I/O for V8 javascript
 Node.js is a platform built on Chrome's JavaScript runtime for easily
 building fast, scalable network applications. Node.js uses an
 event-driven, non-blocking I/O model that makes it lightweight and
 efficient, perfect for data-intensive real-time applications that run
 across distributed devices.
 .
 Node.js is bundled with several useful libraries to handle server
 tasks:
 .
 System, Events, Standard I/O, Modules, Timers, Child Processes, POSIX,
 HTTP, Multipart Parsing, TCP, DNS, Assert, Path, URL, Query Strings.
Homepage: http://nodejs.org/
Original-Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>
@wyardley
Copy link
Contributor Author

wyardley commented Sep 7, 2017

Also similarly: #258
Not so sure if the module should / can enforce the exact source, though it would be cool if there were just an enum to select the source, and the module would ensure that the package came only from that source.

@juniorsysadmin
Copy link
Member

juniorsysadmin commented Sep 24, 2017

Setting the value of nodejs::repo_pin so that it presumably has a higher priority than base might be what you're after.

@wyardley
Copy link
Contributor Author

wyardley commented Sep 24, 2017

@juniorsysadmin I'm mostly trying to figure out what the desired behavior is [i.e., how the module should behave]... then someone can figure out how it should be implemented.

@juniorsysadmin
Copy link
Member

@wyardley There might be a bit of confusion with regard to package versioning and repository priorities. I don't think it was the intention to have the NodeSource repo URL directly control the version that gets installed rather than nodejs_package_ensure. I have added #322 to make the docs clearer.

@wyardley
Copy link
Contributor Author

wyardley commented Oct 3, 2017

Yeah, the thing I was trying to get clarity about the expected behavior for was having the acceptance test check the package source. However, it seems like we should probably just not have the acceptance test check the package's source if the goal is not to necessarily have a predictable outcome purely based on what repos are enabled.

I can submit a PR to that effect.

@juniorsysadmin
Copy link
Member

Closing due to age, feel free to re-open.

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

No branches or pull requests

2 participants