sonatype-nexus-community / nexus-repository-apt

A Nexus Repository 3 plugin that allows usage of apt repositories
Eclipse Public License 1.0
105 stars 50 forks source link

No Release file created on upload of Debian package #85

Closed pgwilliams closed 5 years ago

pgwilliams commented 5 years ago

Issue: When running apt-get update on my application server, the process comes to access my nexus server and I'm told: "The repository 'https:///repositories/Releases ./ Release' does not have a Release file"

What are you trying to do: Install a Debian package - hosted in Nexus 3.14.0-04 on an Ubuntu 18.04 server. I've uploaded a Debian package to Nexus, which was installed from a build of the origin/UpdateToThreeDotFourteen branch.

How could we solve this issue: I'm not seeing anything related to APT in the logs when I upload the package. I'd appreciate some assistance verifying that the plugin is functioning as expected - maybe turn on debugging to prove it is being activated when the Debian package is uploaded. I think I've got the Nexus 3.14 with nexus-repository-apt plugin installed OK because it shows up as Bundle 197 in Nexus Repository Manager System Information and I see the apt plugin come up in the logs on startup without throwing an error.

Anything else? The long story is: I've inherited a working Nexus 2.11 server which serves up Debian packages to apt-get on various application servers, and I'm trying to set up a new one with 3.14.0-04 - which we need because we're moving from Ubuntu 14 to 18 and can't sign packages with SHA1 anymore.

I've successfully uploaded a Debian package there using our Jenkins server, but when I come to apt-get update on my application server, I'm told: "The repository 'https:///repositories/Releases ./ Release' does not have a Release file". And right enough, when I browse our old server I see various files at the root of the repository - Packages, Release, Release.gpg - which are not present in the new one.

I can see /nexus-repository-apt/src/main/java/net/staticsnow/nexus/repository/apt/internal/hosted/AptHostedFacet.java has responsibility for creating these files. My next step will be to install on my Mac and debug locally. Any suggestions for a first port of entry to place a breakpoint?

Thanks!

mpoindexter commented 5 years ago

This doesn't seem like a problem with the plugin, but maybe a misconfigured apt sources file? You should be able to confirm in the package browser that the package has been uploaded.

pgwilliams commented 5 years ago

Hi @mpoindexter, thanks for getting back to me. I now strongly suspect that my alleged issue is due to me having a wrong assumption about how this plugin is supposed to work. In our previous Nexus 2.11 installation, I inherited an APT plugin that allows us to upload both maven artefacts AND Debian packages to a maven repo and generates the appropriate APT files from this.

I think what this plugin does, is just to allow you to upload Debian packages to a specific APT repository. So, horses for courses really and I wonder why we've apparently been misusing a maven repository all this time. I've been able to create an APT repo and upload and recover Debian packages no problem using this plugin.

What would be helpful (and I'll close this issue) is if there was a statement somewhere about what exactly this plugin allows you to do. Basically - is it true to say that maven artefacts go to maven repositories and Debian packages go to APT packages and never the twain shall meet? Writing that down it does seem to make sense. I just assumed that all APT plugins for Nexus worked the same way, and that was obviously misguided. Thanks & Best Wishes, Peter

mpoindexter commented 5 years ago

I'm not sure what any 2.x plugins may have have done, but definitely the way this one is supposed to work (and indeed, all plugins in 3.x that I have seen) is that there's a separate repo for each artifact type. So yes, maven artifacts should go to maven repos and apt artifacts should go to apt repos.

pgwilliams commented 5 years ago

Thanks for the clarification @mpoindexter !