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

Get tcDebRepository working for recent Ubuntu versions (eg, xenial and after) #14

Open
netwolfuk opened this issue Mar 23, 2017 · 2 comments
Milestone

Comments

@netwolfuk
Copy link
Member

I presume it is the missing Release file which is causing the problem. So in theory, #13 should resolve it, but I am raising this to track the two separately.

==> default: W
==> default: : 
==> default: The repository 'http://teamcity.docker:8111/app/debrepo/TestRepoName01 xenial Release' does not have a Release file.
==> default: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: E
==> default: : 
==> default: Unable to locate package tcDummyDeb
@netwolfuk netwolfuk added this to the 1.1 milestone Mar 23, 2017
@vanDonselaar
Copy link

My workaround was to use this sources.list line:

deb [ allow-insecure=yes ] https://buildserver/app/debrepo/my-project/ jessie main

nb: mind the significant whitespacing.

and install with apt-get --allow-unauthenticated.
Needless to say, don't use this trick for repositories you cannot fully trust!

@netwolfuk
Copy link
Member Author

Thanks for the suggestion. My Jessie Vagrantfile looks like this and it works fine:

   config.vm.provision "shell", inline: <<-SHELL
     echo "Creating tcDebRepository config file in /etc/apt/sources.list.d"
     echo "deb http://teamcity.docker:8111/app/debrepo/TestRepoName01/ jessie main" \
            > /etc/apt/sources.list.d/tcDebRepositoy-TestRepoName01.list
   SHELL

   config.vm.provision "shell", inline: <<-SHELL
     echo "installing required packages"
     apt-get update
     apt-get  --force-yes --assume-yes install tcDummbyDeb
   SHELL

However, I believe new versions of Ubuntu won't continue without a Release file (or InRelease)
My Xenial Vagrantfile does not work (see message at the top of this issue)

   config.vm.provision "shell", inline: <<-SHELL
     echo "Creating tcDebRepository config file in /etc/apt/sources.list.d"
     echo "deb http://teamcity.docker:8111/app/debrepo/TestRepoName01/ xenial main" \
            > /etc/apt/sources.list.d/tcDebRepositoy-TestRepoName01.list
   SHELL

   config.vm.provision "shell", inline: <<-SHELL
     echo "installing required packages"
     apt-get update
     apt-get  --force-yes --assume-yes install tcDummyDeb
   SHELL

On your recommendation, I configured a new Vagrant VM with the following (which is scary insecure), but it gives the same error:

   config.vm.provision "shell", inline: <<-SHELL
     echo "Creating tcDebRepository config file in /etc/apt/sources.list.d"
     echo "deb [ allow-insecure=yes ] http://teamcity.docker:8111/app/debrepo/TestRepoName01/ xenial main" \
            > /etc/apt/sources.list.d/tcDebRepositoy-TestRepoName01.list
   SHELL

   config.vm.provision "shell", inline: <<-SHELL
     echo "installing required packages"
     apt-get update
     apt-get --allow-unauthenticated  --force-yes --assume-yes install tcDummyDeb
   SHELL

So it looks like until I support the Release file, I don't have a workaround for new versions of Ubuntu, I think I read somewhere that new Ubuntu versions (and the next version of Debian) use apt-secure by default. However, I can't find that page in a quick search.

The 1.1 release will use eBean (issue #4) to run an embedded H2 DB. That will make the queries required to build the Release files much more efficient, and I plan to store the actual Release file content in the DB, and only update it when a build publishes new deb files. I have the DB stuff working already, I just need to find some time to build Release file support.

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