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

Ubuntu 20.04 #225

Merged
merged 7 commits into from
Nov 17, 2020
Merged

Ubuntu 20.04 #225

merged 7 commits into from
Nov 17, 2020

Conversation

amateo
Copy link
Contributor

@amateo amateo commented Jun 24, 2020

This is a continuation of #221 to add support for Ubuntu 20.04 (I don't know if I should do this in other way).

I have fixed some issues with that PR:

  • I have added puppet5 to acceptance tests
  • I have adjust lower bound dependency for stdlib to 4.25 as you asked for
  • I have add Ubuntu 20.04 to README.md
  • I have fix an errata in the error message for Ubuntu to reflects that now it supports 20.04

@amateo
Copy link
Contributor Author

amateo commented Jun 24, 2020

I don't know why it is failing in all platform checks with things related with bundles and gems I didn't touch. For example, this is the error for the new Ubuntu 20.04:

Worker information

0.13s0.01s0.00s0.01s
system_info

Build system information

0.01s0.01s0.39s0.17s0.05s0.00s0.04s0.00s0.01s0.01s0.01s0.01s0.01s0.00s0.00s0.02s0.00s0.01s0.22s0.00s0.00s0.00s0.01s0.00s0.10s0.00s0.73s0.00s0.00s6.03s0.00s2.36s0.00s2.21s
docker_mtu
resolvconf
services

3.01s$ sudo systemctl start docker
git.checkout

0.65s$ git clone --depth=50 https://github.com/ghoneycutt/puppet-module-pam.git ghoneycutt/puppet-module-pam

0.01s

Setting environment variables from .travis.yml

$ export BEAKER_set="ubuntu-2004"

$ export BEAKER_PUPPET_COLLECTION=puppet5

rvm

13.42s$ rvm use 2.4.4 --install --binary --fuzzy

$ export BUNDLE_GEMFILE=$PWD/Gemfile
cache.1

Setting up build cache

cache.bundler

0.00s0.85sadding /home/travis/build/ghoneycutt/puppet-module-pam/vendor/bundle to cache
ruby.versions

$ ruby --version

before_install.1

0.11s$ bundle -v
before_install.2

0.00s$ rm Gemfile.lock || true
before_install.3

3.36s$ gem update --system
before_install.4

2.48s$ gem update bundler
before_install.5

0.11s$ gem --version
before_install.6

0.12s$ bundle -v
install.bundler

15.13s$ bundle install --without system_tests development --path=${BUNDLE_PATH:-vendor/bundle}

1.42s$ bundle exec rake beaker

TEST_TIERS env variable not defined. Defaulting to run all tests.

/home/travis/.rvm/rubies/ruby-2.4.4/bin/ruby -I/home/travis/build/ghoneycutt/puppet-module-pam/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.9.2/lib:/home/travis/build/ghoneycutt/puppet-module-pam/vendor/bundle/ruby/2.4.0/gems/rspec-support-3.9.3/lib /home/travis/build/ghoneycutt/puppet-module-pam/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.9.2/exe/rspec spec/acceptance

An error occurred while loading ./spec/acceptance/00_pam_spec.rb.

Hint: Install the `did_you_mean` gem in order to provide suggestions for similarly named files.

Failure/Error: require 'beaker-rspec'

LoadError:

  cannot load such file -- beaker-rspec

# ./spec/spec_helper_acceptance.rb:1:in `require'

# ./spec/spec_helper_acceptance.rb:1:in `<top (required)>'

# ./spec/acceptance/00_pam_spec.rb:1:in `require'

# ./spec/acceptance/00_pam_spec.rb:1:in `<top (required)>'

No examples found.

Finished in 0.00003 seconds (files took 0.05526 seconds to load)

0 examples, 0 failures, 1 error occurred outside of examples

/home/travis/.rvm/rubies/ruby-2.4.4/bin/ruby -I/home/travis/build/ghoneycutt/puppet-module-pam/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.9.2/lib:/home/travis/build/ghoneycutt/puppet-module-pam/vendor/bundle/ruby/2.4.0/gems/rspec-support-3.9.3/lib /home/travis/build/ghoneycutt/puppet-module-pam/vendor/bundle/ruby/2.4.0/gems/rspec-core-3.9.2/exe/rspec spec/acceptance failed

The command "bundle exec rake beaker" exited with 1.
cache.2

store build cache

Done. Your build exited with 1.

.travis.yml Outdated Show resolved Hide resolved
@amateo
Copy link
Contributor Author

amateo commented Aug 20, 2020

I think I have found the problem with the tests.

Locally running one of the tests in my system, I have found that beaker-rspec is not installed, although it is listed in Gemfile. The problem is that it is listed inside group :system_tests do and in .travis.yml there is the config:

bundler_args: --without system_tests development

so the bundle install does not install gems listed in these groups.

I have manually (and locally) run bundle install --with system_tests development and the my local test has worked fine, without any problem.

I'm not an expert with these tests, but in other modules (for example in your ghoneycutt/puppet-module-rpcbind) gems are not listed inside any group.

Could I remove these groups and list directly all gems?

@amateo
Copy link
Contributor Author

amateo commented Aug 21, 2020

I think I have just resolved all tests problems:

  • I have removed puppet5 acceptance tests because puppet5 is provided for ubuntu 20.04
  • I have update Gemfile so all gems are installed now
  • I have exclude absolute path lint check so includes like include ::nsswitch don't fail.

These two latest changes are not directly related with ubuntu 20.04 support, so @ghoneycutt ask me if you prefer to split them in a different PR

@ashish1099
Copy link

hey guys,

any update on this one, eagerly waiting on this one.

let me know if you guys need any help on this one

.travis.yml Show resolved Hide resolved
data/os/Ubuntu/20.04.yaml Show resolved Hide resolved
metadata.json Outdated Show resolved Hide resolved
.puppet-lint.rc Outdated Show resolved Hide resolved
@ghoneycutt
Copy link
Owner

Thanks everyone! This is almost ready to go after the .puppet-lint.rc gets rebased and Travis is updated. Once tests are passing and you confirm the values are from a default install, this will be good to merge.

@amateo
Copy link
Contributor Author

amateo commented Nov 4, 2020

@ghoneycutt I've made the rebase.

I'm getting errors tests for CentOS8 (which I haven't touch it). The problem in this os is that /etc/pam.d/login does not contain any line matching /^account\s+required\s+pam_access.so$/, but this is because the template does not include the if to include that line (as the other templates)

Another problem in PUPPET_GEM_VERSION="~> 5" and PUPPET_GEM_VERSION="~> 6" runing the rake validate is that in the code:

        it 'should fail' do
            expect {
              should contain_class('pam')
            }.to raise_error(Puppet::Error)
          end

in spec/classes/init_spec.rb (lines 74-78) the raise_error function require two parameters, but it has only one. Again, this code isn't from this PR.

So I don't know if this is ready for merge or not.

@ghoneycutt
Copy link
Owner

I'm looking into the EL8 issues now

@ghoneycutt
Copy link
Owner

Created PR #231 to address EL8. After that's done it will require a rebase and adding these two lines with the correct values to the spec_helper

https://github.com/ghoneycutt/puppet-module-pam/pull/231/files#diff-89eebfcbc0f14b6d989517837ca1e94fce4e2ce9a03233641cd936f2b8d2ed94R438

@ghoneycutt
Copy link
Owner

EL8 was merged which should fix some of the issues that was holding this one up. Could you please rebase and be sure to add a section like this one (https://github.com/ghoneycutt/puppet-module-pam/blob/master/spec/spec_helper.rb#L424-L445) to the spec_helper for Ubuntu 20 with the appropriate values.

@amateo
Copy link
Contributor Author

amateo commented Nov 10, 2020

Done it.

But there is still the same problems with PUPPET_GEM_VERSION="~> 5" and PUPPET_GEM_VERSION="~> 6". The other ones are fixed.

.travis.yml Show resolved Hide resolved
@ghoneycutt
Copy link
Owner

@amateo Its failing are due to this change. It is failing because the data for Ubuntu 20 does not match the spec fixtures.

https://travis-ci.org/github/ghoneycutt/puppet-module-pam/jobs/742639757#L2318

* Use default files in Ubuntu 20.04, not the ones from 18.04
* Creates the related fixture files
@ghoneycutt
Copy link
Owner

Great work!!

@ghoneycutt ghoneycutt merged commit 68921fa into ghoneycutt:master Nov 17, 2020
@amateo amateo deleted the ubuntu-20.04 branch December 22, 2020 08:34
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

Successfully merging this pull request may close these issues.

6 participants