Travis sudo is disabled












21















I want to use apt to install some packages for the test, however, it fails due to that the sudo is disabled. I found the following in the test output:



Sudo, the FireFox addon, setuid and setgid have been disabled.


It seems that the output comes from this line in travic-ci, but setting paranoid_mode to false in .travis.yml does not work.



How to enable sudo access?



PS: I am using private repo.



EDIT: The following .travis.yml will fail due to sudo: must be setuid root when running sudo apt-get update -qq



language: python
python:
- "3.4"

before_install:
- sudo apt-get update -qq

script:
- nosetests


Setting sudo: true and/or paranoid_mode: false does not work.










share|improve this question

























  • I figured it could be paranoid, instead of any of the keys you have mentioned (due to a line in the code). But setting that to false explicitly does not help. The line of code I'm talking about, can be found here.

    – Arno Moonen
    Oct 10 '14 at 17:02
















21















I want to use apt to install some packages for the test, however, it fails due to that the sudo is disabled. I found the following in the test output:



Sudo, the FireFox addon, setuid and setgid have been disabled.


It seems that the output comes from this line in travic-ci, but setting paranoid_mode to false in .travis.yml does not work.



How to enable sudo access?



PS: I am using private repo.



EDIT: The following .travis.yml will fail due to sudo: must be setuid root when running sudo apt-get update -qq



language: python
python:
- "3.4"

before_install:
- sudo apt-get update -qq

script:
- nosetests


Setting sudo: true and/or paranoid_mode: false does not work.










share|improve this question

























  • I figured it could be paranoid, instead of any of the keys you have mentioned (due to a line in the code). But setting that to false explicitly does not help. The line of code I'm talking about, can be found here.

    – Arno Moonen
    Oct 10 '14 at 17:02














21












21








21


6






I want to use apt to install some packages for the test, however, it fails due to that the sudo is disabled. I found the following in the test output:



Sudo, the FireFox addon, setuid and setgid have been disabled.


It seems that the output comes from this line in travic-ci, but setting paranoid_mode to false in .travis.yml does not work.



How to enable sudo access?



PS: I am using private repo.



EDIT: The following .travis.yml will fail due to sudo: must be setuid root when running sudo apt-get update -qq



language: python
python:
- "3.4"

before_install:
- sudo apt-get update -qq

script:
- nosetests


Setting sudo: true and/or paranoid_mode: false does not work.










share|improve this question
















I want to use apt to install some packages for the test, however, it fails due to that the sudo is disabled. I found the following in the test output:



Sudo, the FireFox addon, setuid and setgid have been disabled.


It seems that the output comes from this line in travic-ci, but setting paranoid_mode to false in .travis.yml does not work.



How to enable sudo access?



PS: I am using private repo.



EDIT: The following .travis.yml will fail due to sudo: must be setuid root when running sudo apt-get update -qq



language: python
python:
- "3.4"

before_install:
- sudo apt-get update -qq

script:
- nosetests


Setting sudo: true and/or paranoid_mode: false does not work.







travis-ci






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 10 '14 at 15:04







Chunliang Lyu

















asked Oct 10 '14 at 12:34









Chunliang LyuChunliang Lyu

1,4521633




1,4521633













  • I figured it could be paranoid, instead of any of the keys you have mentioned (due to a line in the code). But setting that to false explicitly does not help. The line of code I'm talking about, can be found here.

    – Arno Moonen
    Oct 10 '14 at 17:02



















  • I figured it could be paranoid, instead of any of the keys you have mentioned (due to a line in the code). But setting that to false explicitly does not help. The line of code I'm talking about, can be found here.

    – Arno Moonen
    Oct 10 '14 at 17:02

















I figured it could be paranoid, instead of any of the keys you have mentioned (due to a line in the code). But setting that to false explicitly does not help. The line of code I'm talking about, can be found here.

– Arno Moonen
Oct 10 '14 at 17:02





I figured it could be paranoid, instead of any of the keys you have mentioned (due to a line in the code). But setting that to false explicitly does not help. The line of code I'm talking about, can be found here.

– Arno Moonen
Oct 10 '14 at 17:02












3 Answers
3






active

oldest

votes


















23














Sudo access is turned off on our Docker based architecture, which will be used in two contexts:




  • repositories opt in using sudo: false in their .travis.yml file (it additionally needs to be turned on on our side)

  • on our educational program (see http://education.travis-ci.com)


Builds running on our Docker based architecture currently cannot be allowed sudo access due to certain security concerns in the LXC/Docker layer. We hope this will be fixed in the near future, but unfortunately the issue is out of our own hands.



We are also working on improving the Firefox addon, which currently uses sudo itself, but shouldn't. We'll post on our blog once this has happened.






share|improve this answer





















  • 9





    That is sad, so we student users have became some kind of beta testers. It would be nice if you can put this note somewhere on the documentation page. It takes quite some time for me to figure out what is wrong.

    – Chunliang Lyu
    Oct 10 '14 at 17:54






  • 9





    That makes Travis CI worthless at this point

    – Jordi Kroon
    Oct 12 '14 at 23:02






  • 1





    Sorry about the confusing message. This restriction is mentioned on the landing page for our educational program. See education.travis-ci.com We'll look at adding this to our documentation pages as well, and communicating this better as part of the build log output.

    – Sven Fuchs
    Oct 16 '14 at 15:44













  • Don't worry, they flip-flopped on this. Now sudo is required. -- blog.travis-ci.com/…

    – William Entriken
    Dec 5 '18 at 1:24



















15














To extend the existing answer, if you put in .travis.yml:



sudo: required


Travis should switch your build to use their "standard infrastructure" (rather than their "container based infrastructure") and then you can use sudo.



References:




  • https://docs.travis-ci.com/user/workers/standard-infrastructure


  • https://docs.travis-ci.com/user/workers/container-based-infrastructure/



Nov 2018 Update



It seems that container-based infrastructure is getting deprecated. From the docs:




Container-based infrastructure is currently being deprecated. Please
use the fully-virtualized infrastrstructure via sudo: required
instead.







share|improve this answer

































    0














    As explained in "Combining The Linux Infrastructures"




    Going forward, we will slowly transition the container-based environment out, in favor of a build environment that is entirely virtual machine-based.



    Folks using container-based infrastructures will be the only ones affected, and this transition will roll out slowly, depending on whether you specify sudo: false in your .travis.yml.




    This is illustrated in Git 2.20 (Q4 2018), with:




    Travis CI will soon deprecate the container-based infrastructure enabled by sudo: false in ce59dff (Git 2.8.0, Jan. 2016).




    See commit 0f0c511 (01 Nov 2018) by SZEDER Gábor (szeder).
    (Merged by Junio C Hamano -- gitster -- in commit 57f06d5, 13 Nov 2018)



    travis-ci: install packages in 'ci/install-dependencies.sh'




    Ever since we started using Travis CI, we specified the list of packages to install in '.travis.yml' via the APT addon.



    While running our builds on Travis CI's container-based infrastructure we didn't have another choice, because that environment didn't support 'sudo', and thus we didn't have permission to install packages ourselves.



    With the switch to the VM-based infrastructure in the previous patch we do get a working 'sudo', so we can install packages by running 'sudo apt-get -y install ...' as well.



    Let's make use of this and install necessary packages in 'ci/install-dependencies.sh', so all the dependencies (i.e. both packages and "non-packages" (P4 and Git-LFS)) are handled in the same file.



    Install gcc-8 only in the 'linux-gcc' build job; so far it has been unnecessarily installed in the 'linux-clang' build job as well.

    Print the versions of P4 and Git-LFS conditionally, i.e. only when they have been installed; with this change even the static analysis and documentation build jobs start using 'ci/install-dependencies.sh'
    to install packages, and neither of these two build jobs depend on and
    thus install those.



    This change will presumably be beneficial for the upcoming Azure Pipelines integration preliminary versions of that patch series run a couple of 'apt-get' commands to install the necessary packages before running 'ci/install-dependencies.sh', but with this patch it will be sufficient to run only 'ci/install-dependencies.sh'.







    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f26299552%2ftravis-sudo-is-disabled%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      23














      Sudo access is turned off on our Docker based architecture, which will be used in two contexts:




      • repositories opt in using sudo: false in their .travis.yml file (it additionally needs to be turned on on our side)

      • on our educational program (see http://education.travis-ci.com)


      Builds running on our Docker based architecture currently cannot be allowed sudo access due to certain security concerns in the LXC/Docker layer. We hope this will be fixed in the near future, but unfortunately the issue is out of our own hands.



      We are also working on improving the Firefox addon, which currently uses sudo itself, but shouldn't. We'll post on our blog once this has happened.






      share|improve this answer





















      • 9





        That is sad, so we student users have became some kind of beta testers. It would be nice if you can put this note somewhere on the documentation page. It takes quite some time for me to figure out what is wrong.

        – Chunliang Lyu
        Oct 10 '14 at 17:54






      • 9





        That makes Travis CI worthless at this point

        – Jordi Kroon
        Oct 12 '14 at 23:02






      • 1





        Sorry about the confusing message. This restriction is mentioned on the landing page for our educational program. See education.travis-ci.com We'll look at adding this to our documentation pages as well, and communicating this better as part of the build log output.

        – Sven Fuchs
        Oct 16 '14 at 15:44













      • Don't worry, they flip-flopped on this. Now sudo is required. -- blog.travis-ci.com/…

        – William Entriken
        Dec 5 '18 at 1:24
















      23














      Sudo access is turned off on our Docker based architecture, which will be used in two contexts:




      • repositories opt in using sudo: false in their .travis.yml file (it additionally needs to be turned on on our side)

      • on our educational program (see http://education.travis-ci.com)


      Builds running on our Docker based architecture currently cannot be allowed sudo access due to certain security concerns in the LXC/Docker layer. We hope this will be fixed in the near future, but unfortunately the issue is out of our own hands.



      We are also working on improving the Firefox addon, which currently uses sudo itself, but shouldn't. We'll post on our blog once this has happened.






      share|improve this answer





















      • 9





        That is sad, so we student users have became some kind of beta testers. It would be nice if you can put this note somewhere on the documentation page. It takes quite some time for me to figure out what is wrong.

        – Chunliang Lyu
        Oct 10 '14 at 17:54






      • 9





        That makes Travis CI worthless at this point

        – Jordi Kroon
        Oct 12 '14 at 23:02






      • 1





        Sorry about the confusing message. This restriction is mentioned on the landing page for our educational program. See education.travis-ci.com We'll look at adding this to our documentation pages as well, and communicating this better as part of the build log output.

        – Sven Fuchs
        Oct 16 '14 at 15:44













      • Don't worry, they flip-flopped on this. Now sudo is required. -- blog.travis-ci.com/…

        – William Entriken
        Dec 5 '18 at 1:24














      23












      23








      23







      Sudo access is turned off on our Docker based architecture, which will be used in two contexts:




      • repositories opt in using sudo: false in their .travis.yml file (it additionally needs to be turned on on our side)

      • on our educational program (see http://education.travis-ci.com)


      Builds running on our Docker based architecture currently cannot be allowed sudo access due to certain security concerns in the LXC/Docker layer. We hope this will be fixed in the near future, but unfortunately the issue is out of our own hands.



      We are also working on improving the Firefox addon, which currently uses sudo itself, but shouldn't. We'll post on our blog once this has happened.






      share|improve this answer















      Sudo access is turned off on our Docker based architecture, which will be used in two contexts:




      • repositories opt in using sudo: false in their .travis.yml file (it additionally needs to be turned on on our side)

      • on our educational program (see http://education.travis-ci.com)


      Builds running on our Docker based architecture currently cannot be allowed sudo access due to certain security concerns in the LXC/Docker layer. We hope this will be fixed in the near future, but unfortunately the issue is out of our own hands.



      We are also working on improving the Firefox addon, which currently uses sudo itself, but shouldn't. We'll post on our blog once this has happened.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Sep 18 '16 at 13:19









      Heinzi

      2,68422554




      2,68422554










      answered Oct 10 '14 at 17:29









      Sven FuchsSven Fuchs

      27622




      27622








      • 9





        That is sad, so we student users have became some kind of beta testers. It would be nice if you can put this note somewhere on the documentation page. It takes quite some time for me to figure out what is wrong.

        – Chunliang Lyu
        Oct 10 '14 at 17:54






      • 9





        That makes Travis CI worthless at this point

        – Jordi Kroon
        Oct 12 '14 at 23:02






      • 1





        Sorry about the confusing message. This restriction is mentioned on the landing page for our educational program. See education.travis-ci.com We'll look at adding this to our documentation pages as well, and communicating this better as part of the build log output.

        – Sven Fuchs
        Oct 16 '14 at 15:44













      • Don't worry, they flip-flopped on this. Now sudo is required. -- blog.travis-ci.com/…

        – William Entriken
        Dec 5 '18 at 1:24














      • 9





        That is sad, so we student users have became some kind of beta testers. It would be nice if you can put this note somewhere on the documentation page. It takes quite some time for me to figure out what is wrong.

        – Chunliang Lyu
        Oct 10 '14 at 17:54






      • 9





        That makes Travis CI worthless at this point

        – Jordi Kroon
        Oct 12 '14 at 23:02






      • 1





        Sorry about the confusing message. This restriction is mentioned on the landing page for our educational program. See education.travis-ci.com We'll look at adding this to our documentation pages as well, and communicating this better as part of the build log output.

        – Sven Fuchs
        Oct 16 '14 at 15:44













      • Don't worry, they flip-flopped on this. Now sudo is required. -- blog.travis-ci.com/…

        – William Entriken
        Dec 5 '18 at 1:24








      9




      9





      That is sad, so we student users have became some kind of beta testers. It would be nice if you can put this note somewhere on the documentation page. It takes quite some time for me to figure out what is wrong.

      – Chunliang Lyu
      Oct 10 '14 at 17:54





      That is sad, so we student users have became some kind of beta testers. It would be nice if you can put this note somewhere on the documentation page. It takes quite some time for me to figure out what is wrong.

      – Chunliang Lyu
      Oct 10 '14 at 17:54




      9




      9





      That makes Travis CI worthless at this point

      – Jordi Kroon
      Oct 12 '14 at 23:02





      That makes Travis CI worthless at this point

      – Jordi Kroon
      Oct 12 '14 at 23:02




      1




      1





      Sorry about the confusing message. This restriction is mentioned on the landing page for our educational program. See education.travis-ci.com We'll look at adding this to our documentation pages as well, and communicating this better as part of the build log output.

      – Sven Fuchs
      Oct 16 '14 at 15:44







      Sorry about the confusing message. This restriction is mentioned on the landing page for our educational program. See education.travis-ci.com We'll look at adding this to our documentation pages as well, and communicating this better as part of the build log output.

      – Sven Fuchs
      Oct 16 '14 at 15:44















      Don't worry, they flip-flopped on this. Now sudo is required. -- blog.travis-ci.com/…

      – William Entriken
      Dec 5 '18 at 1:24





      Don't worry, they flip-flopped on this. Now sudo is required. -- blog.travis-ci.com/…

      – William Entriken
      Dec 5 '18 at 1:24













      15














      To extend the existing answer, if you put in .travis.yml:



      sudo: required


      Travis should switch your build to use their "standard infrastructure" (rather than their "container based infrastructure") and then you can use sudo.



      References:




      • https://docs.travis-ci.com/user/workers/standard-infrastructure


      • https://docs.travis-ci.com/user/workers/container-based-infrastructure/



      Nov 2018 Update



      It seems that container-based infrastructure is getting deprecated. From the docs:




      Container-based infrastructure is currently being deprecated. Please
      use the fully-virtualized infrastrstructure via sudo: required
      instead.







      share|improve this answer






























        15














        To extend the existing answer, if you put in .travis.yml:



        sudo: required


        Travis should switch your build to use their "standard infrastructure" (rather than their "container based infrastructure") and then you can use sudo.



        References:




        • https://docs.travis-ci.com/user/workers/standard-infrastructure


        • https://docs.travis-ci.com/user/workers/container-based-infrastructure/



        Nov 2018 Update



        It seems that container-based infrastructure is getting deprecated. From the docs:




        Container-based infrastructure is currently being deprecated. Please
        use the fully-virtualized infrastrstructure via sudo: required
        instead.







        share|improve this answer




























          15












          15








          15







          To extend the existing answer, if you put in .travis.yml:



          sudo: required


          Travis should switch your build to use their "standard infrastructure" (rather than their "container based infrastructure") and then you can use sudo.



          References:




          • https://docs.travis-ci.com/user/workers/standard-infrastructure


          • https://docs.travis-ci.com/user/workers/container-based-infrastructure/



          Nov 2018 Update



          It seems that container-based infrastructure is getting deprecated. From the docs:




          Container-based infrastructure is currently being deprecated. Please
          use the fully-virtualized infrastrstructure via sudo: required
          instead.







          share|improve this answer















          To extend the existing answer, if you put in .travis.yml:



          sudo: required


          Travis should switch your build to use their "standard infrastructure" (rather than their "container based infrastructure") and then you can use sudo.



          References:




          • https://docs.travis-ci.com/user/workers/standard-infrastructure


          • https://docs.travis-ci.com/user/workers/container-based-infrastructure/



          Nov 2018 Update



          It seems that container-based infrastructure is getting deprecated. From the docs:




          Container-based infrastructure is currently being deprecated. Please
          use the fully-virtualized infrastrstructure via sudo: required
          instead.








          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 13 '18 at 20:08









          Paul Berg

          6271617




          6271617










          answered Jan 27 '16 at 22:16









          Rob BygraveRob Bygrave

          2,8432023




          2,8432023























              0














              As explained in "Combining The Linux Infrastructures"




              Going forward, we will slowly transition the container-based environment out, in favor of a build environment that is entirely virtual machine-based.



              Folks using container-based infrastructures will be the only ones affected, and this transition will roll out slowly, depending on whether you specify sudo: false in your .travis.yml.




              This is illustrated in Git 2.20 (Q4 2018), with:




              Travis CI will soon deprecate the container-based infrastructure enabled by sudo: false in ce59dff (Git 2.8.0, Jan. 2016).




              See commit 0f0c511 (01 Nov 2018) by SZEDER Gábor (szeder).
              (Merged by Junio C Hamano -- gitster -- in commit 57f06d5, 13 Nov 2018)



              travis-ci: install packages in 'ci/install-dependencies.sh'




              Ever since we started using Travis CI, we specified the list of packages to install in '.travis.yml' via the APT addon.



              While running our builds on Travis CI's container-based infrastructure we didn't have another choice, because that environment didn't support 'sudo', and thus we didn't have permission to install packages ourselves.



              With the switch to the VM-based infrastructure in the previous patch we do get a working 'sudo', so we can install packages by running 'sudo apt-get -y install ...' as well.



              Let's make use of this and install necessary packages in 'ci/install-dependencies.sh', so all the dependencies (i.e. both packages and "non-packages" (P4 and Git-LFS)) are handled in the same file.



              Install gcc-8 only in the 'linux-gcc' build job; so far it has been unnecessarily installed in the 'linux-clang' build job as well.

              Print the versions of P4 and Git-LFS conditionally, i.e. only when they have been installed; with this change even the static analysis and documentation build jobs start using 'ci/install-dependencies.sh'
              to install packages, and neither of these two build jobs depend on and
              thus install those.



              This change will presumably be beneficial for the upcoming Azure Pipelines integration preliminary versions of that patch series run a couple of 'apt-get' commands to install the necessary packages before running 'ci/install-dependencies.sh', but with this patch it will be sufficient to run only 'ci/install-dependencies.sh'.







              share|improve this answer




























                0














                As explained in "Combining The Linux Infrastructures"




                Going forward, we will slowly transition the container-based environment out, in favor of a build environment that is entirely virtual machine-based.



                Folks using container-based infrastructures will be the only ones affected, and this transition will roll out slowly, depending on whether you specify sudo: false in your .travis.yml.




                This is illustrated in Git 2.20 (Q4 2018), with:




                Travis CI will soon deprecate the container-based infrastructure enabled by sudo: false in ce59dff (Git 2.8.0, Jan. 2016).




                See commit 0f0c511 (01 Nov 2018) by SZEDER Gábor (szeder).
                (Merged by Junio C Hamano -- gitster -- in commit 57f06d5, 13 Nov 2018)



                travis-ci: install packages in 'ci/install-dependencies.sh'




                Ever since we started using Travis CI, we specified the list of packages to install in '.travis.yml' via the APT addon.



                While running our builds on Travis CI's container-based infrastructure we didn't have another choice, because that environment didn't support 'sudo', and thus we didn't have permission to install packages ourselves.



                With the switch to the VM-based infrastructure in the previous patch we do get a working 'sudo', so we can install packages by running 'sudo apt-get -y install ...' as well.



                Let's make use of this and install necessary packages in 'ci/install-dependencies.sh', so all the dependencies (i.e. both packages and "non-packages" (P4 and Git-LFS)) are handled in the same file.



                Install gcc-8 only in the 'linux-gcc' build job; so far it has been unnecessarily installed in the 'linux-clang' build job as well.

                Print the versions of P4 and Git-LFS conditionally, i.e. only when they have been installed; with this change even the static analysis and documentation build jobs start using 'ci/install-dependencies.sh'
                to install packages, and neither of these two build jobs depend on and
                thus install those.



                This change will presumably be beneficial for the upcoming Azure Pipelines integration preliminary versions of that patch series run a couple of 'apt-get' commands to install the necessary packages before running 'ci/install-dependencies.sh', but with this patch it will be sufficient to run only 'ci/install-dependencies.sh'.







                share|improve this answer


























                  0












                  0








                  0







                  As explained in "Combining The Linux Infrastructures"




                  Going forward, we will slowly transition the container-based environment out, in favor of a build environment that is entirely virtual machine-based.



                  Folks using container-based infrastructures will be the only ones affected, and this transition will roll out slowly, depending on whether you specify sudo: false in your .travis.yml.




                  This is illustrated in Git 2.20 (Q4 2018), with:




                  Travis CI will soon deprecate the container-based infrastructure enabled by sudo: false in ce59dff (Git 2.8.0, Jan. 2016).




                  See commit 0f0c511 (01 Nov 2018) by SZEDER Gábor (szeder).
                  (Merged by Junio C Hamano -- gitster -- in commit 57f06d5, 13 Nov 2018)



                  travis-ci: install packages in 'ci/install-dependencies.sh'




                  Ever since we started using Travis CI, we specified the list of packages to install in '.travis.yml' via the APT addon.



                  While running our builds on Travis CI's container-based infrastructure we didn't have another choice, because that environment didn't support 'sudo', and thus we didn't have permission to install packages ourselves.



                  With the switch to the VM-based infrastructure in the previous patch we do get a working 'sudo', so we can install packages by running 'sudo apt-get -y install ...' as well.



                  Let's make use of this and install necessary packages in 'ci/install-dependencies.sh', so all the dependencies (i.e. both packages and "non-packages" (P4 and Git-LFS)) are handled in the same file.



                  Install gcc-8 only in the 'linux-gcc' build job; so far it has been unnecessarily installed in the 'linux-clang' build job as well.

                  Print the versions of P4 and Git-LFS conditionally, i.e. only when they have been installed; with this change even the static analysis and documentation build jobs start using 'ci/install-dependencies.sh'
                  to install packages, and neither of these two build jobs depend on and
                  thus install those.



                  This change will presumably be beneficial for the upcoming Azure Pipelines integration preliminary versions of that patch series run a couple of 'apt-get' commands to install the necessary packages before running 'ci/install-dependencies.sh', but with this patch it will be sufficient to run only 'ci/install-dependencies.sh'.







                  share|improve this answer













                  As explained in "Combining The Linux Infrastructures"




                  Going forward, we will slowly transition the container-based environment out, in favor of a build environment that is entirely virtual machine-based.



                  Folks using container-based infrastructures will be the only ones affected, and this transition will roll out slowly, depending on whether you specify sudo: false in your .travis.yml.




                  This is illustrated in Git 2.20 (Q4 2018), with:




                  Travis CI will soon deprecate the container-based infrastructure enabled by sudo: false in ce59dff (Git 2.8.0, Jan. 2016).




                  See commit 0f0c511 (01 Nov 2018) by SZEDER Gábor (szeder).
                  (Merged by Junio C Hamano -- gitster -- in commit 57f06d5, 13 Nov 2018)



                  travis-ci: install packages in 'ci/install-dependencies.sh'




                  Ever since we started using Travis CI, we specified the list of packages to install in '.travis.yml' via the APT addon.



                  While running our builds on Travis CI's container-based infrastructure we didn't have another choice, because that environment didn't support 'sudo', and thus we didn't have permission to install packages ourselves.



                  With the switch to the VM-based infrastructure in the previous patch we do get a working 'sudo', so we can install packages by running 'sudo apt-get -y install ...' as well.



                  Let's make use of this and install necessary packages in 'ci/install-dependencies.sh', so all the dependencies (i.e. both packages and "non-packages" (P4 and Git-LFS)) are handled in the same file.



                  Install gcc-8 only in the 'linux-gcc' build job; so far it has been unnecessarily installed in the 'linux-clang' build job as well.

                  Print the versions of P4 and Git-LFS conditionally, i.e. only when they have been installed; with this change even the static analysis and documentation build jobs start using 'ci/install-dependencies.sh'
                  to install packages, and neither of these two build jobs depend on and
                  thus install those.



                  This change will presumably be beneficial for the upcoming Azure Pipelines integration preliminary versions of that patch series run a couple of 'apt-get' commands to install the necessary packages before running 'ci/install-dependencies.sh', but with this patch it will be sufficient to run only 'ci/install-dependencies.sh'.








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 16 '18 at 23:42









                  VonCVonC

                  836k29326353178




                  836k29326353178






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f26299552%2ftravis-sudo-is-disabled%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Xamarin.iOS Cant Deploy on Iphone

                      Glorious Revolution

                      Dulmage-Mendelsohn matrix decomposition in Python