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

travis-ci can't find man pages during tests on ubuntu-rolling and ubuntu-latest #179

Closed
joshrabinowitz opened this issue May 14, 2018 · 8 comments
Milestone

Comments

@joshrabinowitz
Copy link
Collaborator

joshrabinowitz commented May 14, 2018

See
https://travis-ci.org/sobolevn/git-secret/jobs/378803909
and
https://travis-ci.org/sobolevn/git-secret/jobs/378803908

       Use `bundle info [gemname]` to see where a bundled gem is installed.
       Running Serverspec
       ---> RSPEC_CMD variable is: /usr/local/bin/rspec
       
       git-secret::test
         Package "git-secret"
           should be installed
         Command "find /tmp/git-secret/build -name "*.deb""
           stdout
             should match /git-secret.*deb/
         File "/.git-secret_test-passed"
           should exist
         File "/.git-secret_lint-passed"
           should exist
         Command "dpkg-query --status git-secret"
           exit_status
             should eq 0
         Command "man -w "git-secret""
           exit_status
             should eq 0 (FAILED - 1)
         Command "man -w "git-secret-init""
           exit_status
             should eq 0 (FAILED - 2)
       
       Failures:
       
         1) git-secret::test Command "man -w "git-secret"" exit_status should eq 0
            Failure/Error: its(:exit_status) { should eq 0 }
              
              expected: 0
                   got: 16
              
              (compared using ==)
              env PATH="/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin" /bin/sh -c man\ -w\ \"git-secret\"
              
            # ./roles/git-secret/.ci/integration/gnupg1/serverspec/default_spec.rb:46:in `block (3 levels) in <top (required)>'
       
         2) git-secret::test Command "man -w "git-secret-init"" exit_status should eq 0
            Failure/Error: its(:exit_status) { should eq 0 }
              
              expected: 0
                   got: 16
              
              (compared using ==)
              env PATH="/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin" /bin/sh -c man\ -w\ \"git-secret-init\"
              
            # ./roles/git-secret/.ci/integration/gnupg1/serverspec/default_spec.rb:50:in `block (3 levels) in <top (required)>'
       
       Finished in 0.09844 seconds (files took 0.41229 seconds to load)
       7 examples, 2 failures
       
       Failed examples:
       
       rspec ./roles/git-secret/.ci/integration/gnupg1/serverspec/default_spec.rb:46 # git-secret::test Command "man -w "git-secret"" exit_status should eq 0
       rspec ./roles/git-secret/.ci/integration/gnupg1/serverspec/default_spec.rb:50 # git-secret::test Command "man -w "git-secret-init"" exit_status should eq 0
       
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #verify action: [SSH exited (1) for command: [            
            mkdir -p /tmp/kitchen
            cd /tmp/kitchen
            RSPEC_CMD=$(which rspec)
            echo "---> RSPEC_CMD variable is: ${RSPEC_CMD}"
             sudo -E -H  $RSPEC_CMD -c -f documentation --default-path  /tmp/kitchen  -P roles/git-secret/.ci/integration/gnupg1/serverspec/*_spec.rb
            
]] on gnupg1-ubuntu-latest
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
The command "chmod +x ".ci/script.sh" && ".ci/script.sh"" exited with 20.
Done. Your build exited with 1.
This was referenced Jun 7, 2018
@joshrabinowitz
Copy link
Collaborator Author

Note: revert changes in f2214bd

@simbo1905
Copy link
Collaborator

simbo1905 commented Jun 8, 2018

Looking hard into this I cannot spot any difference with the built deb file and teh install commands so I asked on stackexchange: https://unix.stackexchange.com/questions/448659/manual-pages-of-built-deb-install-on-debian-but-not-ubuntu

you might want to upvote it so that more eyes get to look at it!

@simbo1905
Copy link
Collaborator

Somone supplied the fix! Its probably going to a few hours before I can next run the test suite but it looks to be something like adding a check and remove of /etc/dpkg/dpkg.cfg.d/excludes such as:

# Building .deb package:
if [ -f /etc/dpkg/dpkg.cfg.d/excludes ]; then
    rm /etc/dpkg/dpkg.cfg.d/excludes
fi
cd "$SCRIPT_DEST_DIR" && build_package "deb"

@joshrabinowitz
Copy link
Collaborator Author

Are there other paths listed in /etc/dpkg/dpkg.cfg.d/excludes ?

And perhaps we should do something less severe than just deleting that file?

@simbo1905
Copy link
Collaborator

simbo1905 commented Jun 8, 2018

It just blocks /usr/share/man/ and and /usr/share/doc/

kitchen@ceddd8d3564c:~$ grep -r path-exclude /etc/dpkg/dpkg.cfg* /etc/dpkg/dpkg.cfg.d/excludes:path-exclude=/usr/share/man/*
/etc/dpkg/dpkg.cfg.d/excludes:path-exclude=/usr/share/doc/*

If we are testing "do we build a valid deb" then the answer is "yes". If we are testing "do we know how users install into /usr/share/man when that is now blacklisted on ubuntu?" then the answer is "no". I think we should release the code and then figure out that as a separate issue.

Running one ubuntu ci test locally the fix works. About to send a PR.

@simbo1905
Copy link
Collaborator

simbo1905 commented Jun 8, 2018

Just to be clear I don't think my server change is about blatting anyone's machine. The change which I just sent over as a PR is run as root as ci test setup where the .deb is built to test it. So at that point, I remove the blacklist so that the .deb can be tested.

Correction It is better to remove the /etc/dpkg/dpkg.cfg.d/excludes in ansible.

@simbo1905
Copy link
Collaborator

simbo1905 commented Jun 8, 2018

I have moved this into ansible on my latest PR.

@simbo1905
Copy link
Collaborator

fixed in #188

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

2 participants