Giter Site home page Giter Site logo

sonatype-nexus-community / nexus-repository-apt Goto Github PK

View Code? Open in Web Editor NEW
106.0 17.0 50.0 176 KB

A Nexus Repository 3 plugin that allows usage of apt repositories

License: Eclipse Public License 1.0

Java 90.60% JavaScript 7.23% CSS 0.01% Ruby 0.89% Dockerfile 1.27%
nexus-repository nexus-extension sonatype sonatype-nexus java apt apt-get nexus

nexus-repository-apt's Introduction

Nexus repository APT plugin

Build Status DepShield Badge

Huzzah! APT is now part of Nexus Repository Manager. Version 3.17.0 includes the APT plugin by default. The plugin source code is now in nexus-public in nexus-repository-apt

Filing issues: If using 3.17.0 or later please file any issues at https://issues.sonatype.org/.

Upgrading to 3.17.0: If you are an existing APT user upgrading to 3.17 you will not be able to install the community plugin. No other changes are required and your existing data will remain intact.

There are some differences from the community version of the plugin. First of all, we have added component records for the .deb files which adds support for features such as Search, Cleanup Policies, Tagging (PRO only) and Moving between repositories (PRO only). We've also added support for Restore Metadata Task, API for Repository creation via Groovy and we've written help documentation. The "retain N versions" feature has been removed as this conflicts with Cleanup Policies and future work we are doing in that space.

Compatibility Matrix:

Plugin Version Nexus Repository Version
v1.0.2 <3.9.0
v1.0.5 3.9.0
v1.0.7 3.11.0
v1.0.8 3.13.0
v1.0.9 3.14.0
v1.0.10 3.15.2
In product 3.17.0

Build

  • Clone the project:

    git clone https://github.com/sonatype-nexus-community/nexus-repository-apt

  • Build the plugin:

    cd nexus-repository-apt
    mvn
    

Build with docker and create an image based on nexus repository 3

docker build -t nexus-repository-apt:3.15.2 .

Run a docker container from that image

docker run -d -p 8081:8081 --name nexus-repo nexus-repository-apt:3.15.2

For further information like how to persist volumes check out the GitHub Repo for the official Nexus Repository 3 Docker image.

The application will now be available from your browser at http://localhost:8081

Install

  • Stop Nexus:

    service nexus stop

    or

    cd <nexus_dir>/bin
    ./nexus stop
    
  • Copy the bundle into <nexus_dir>/system/net/staticsnow/nexus-repository-apt/1.0.10/nexus-repository-apt-1.0.10.jar

  • Make the following additions marked with + to <nexus_dir>/system/org/sonatype/nexus/assemblies/nexus-core-feature/3.x.y/nexus-core-feature-3.x.y-features.xml

          <feature version="x.y.z" prerequisite="false" dependency="false">nexus-repository-maven</feature>
    +     <feature version="1.0.10" prerequisite="false" dependency="false">nexus-repository-apt</feature>
      </feature>
    

    And

    + <feature name="nexus-repository-apt" description="net.staticsnow:nexus-repository-apt" version="1.0.10">
    +     <details>net.staticsnow:nexus-repository-apt</details>
    +     <bundle>mvn:net.staticsnow/nexus-repository-apt/1.0.10</bundle>
    +     <bundle>mvn:org.apache.commons/commons-compress/1.18</bundle>
    +     <bundle>mvn:org.tukaani/xz/1.8</bundle>
    + </feature>
     </features>
    

This will cause the plugin to be loaded and started with each startup of Nexus Repository.

Manually upload a package to a new created repo:

curl -u user:pass -X POST -H "Content-Type: multipart/form-data" --data-binary "@package.deb" http://nexus_url:8081/repository/repo_name/

Create a snapshot of the current package lists for the repo that can be pulled from:

curl -u user:pass -X MKCOL http://nexus_url:8081/repository/repo_name/snapshots/$SNAPSHOT_ID

Create gpg key required for signing apt-packages

See https://help.github.com/articles/generating-a-new-gpg-key/

To sign packages use; gpg --export-secret-key --armor <Name or ID> and passphrase in the hosted repository configuration.

The private armored key should look like this:

-----BEGIN PGP PRIVATE KEY BLOCK-----

...Base64 key...
-----END PGP PRIVATE KEY BLOCK-----

The Fine Print

It is worth noting that this is NOT SUPPORTED by Sonatype, and is a contribution of Mike Poindexter's plus us to the open source community (read: you!)

Remember:

  • Use this contribution at the risk tolerance that you have
  • Do NOT file Sonatype support tickets related to APT support
  • DO file issues here on GitHub, so that the community can pitch in

Phew, that was easier than I thought. Last but not least of all:

Have fun building and using this plugin on the Nexus platform, we are glad to have you here!

Getting help

Looking to contribute to our code but need some help? There's a few ways to get information:

nexus-repository-apt's People

Contributors

bhamail avatar darthhater avatar derjohn avatar hermain avatar idsvandermolen avatar j-s-3 avatar jordiclariana avatar martinspielmann avatar mikkelhjuul avatar mpoindexter avatar thomasboettcherholschen avatar zeropain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nexus-repository-apt's Issues

The HTTP server sent an invalid Content-Range header Bad header data

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?

Config a apt proxy for downloads.docker.com.

  • What feature or behavior is this required for?

Add the new source list url into my ubuntu /etc/apt/source.list and success to run apt-get update but fail to download docker with command apt-get install nvidia-docker2:

The HTTP server sent an invalid Content-Range header Bad header data
  • How could we solve this issue? (Not knowing is okay!)

  • Anything else?

I just want to use this nexus as a apt proxy where can i get more information about this? Thanks.

500 Error when Uploading Ubuntu Kernel Packages

Hi,
I try to upload an AMD64 kernel from Ubuntu's Mainline Repo.
I worked until 4.16.5 kernel and stopped with 4.16.6 kernel.

(To reproduce look here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.16.6/ )

I did set the logger to

  • org.eclipse.jetty.server.Server logger to DEBUG
  • org.sonatype.nexus.internal.web.ErrorPageServlet logger to DEBUG

And noticed that I looks like having to do with the xz compression format, which apache commons can't handle. I bet ubuntu changed that internal compression format to something more hipsterish inside the deb, but didn't really dig deeper.

I am on 3.9.0/1.0.5.

Here is the log output:

#2018-05-01 10:00:31,778+0000 DEBUG [qtp1790585161-43]  *SYSTEM org.sonatype.nexus.internal.web.ErrorPageServlet - Attaching cause
javax.servlet.ServletException: Filtered request failed.
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:384)
	at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.repository.httpbridge.internal.ExhaustRequestFilter.doFilter(ExhaustRequestFilter.java:71)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:108)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:68)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:102)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.java:104)
	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
	at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.java:73)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:175)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:530)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: org/tukaani/xz/XZInputStream
	at net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedFacet.ingestAsset(AptHostedFacet.java:144)
	at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
	at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54)
	at net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedHandler.handle(AptHostedHandler.java:59)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at net.staticsnow.nexus.repository.apt.internal.gpg.AptSigningHandler.handle(AptSigningHandler.java:43)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotHandler.handle(AptSnapshotHandler.java:60)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.ContentHeadersHandler.handle(ContentHeadersHandler.java:44)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.http.PartialFetchHandler.handle(PartialFetchHandler.java:55)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler.handle(ConditionalRequestHandler.java:72)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.ExceptionHandler.handle(ExceptionHandler.java:44)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:52)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:46)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.Context.start(Context.java:114)
	at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:63)
	at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:52)
	at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43)
	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:211)
	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:173)
	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:126)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
	at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
	at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
	at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.java:85)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.sonatype.nexus.repository.httpbridge.internal.ExhaustRequestFilter.doFilter(ExhaustRequestFilter.java:71)
	at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:108)
	at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
	at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:68)
	at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:102)
	at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98)
	... 35 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.tukaani.xz.XZInputStream not found by org.apache.commons.compress [191]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1550)
	at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:79)
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1958)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 99 common frames omitted
2018-05-01 10:00:31,788+0000 DEBUG [qtp179

version 1.0.7 not working on nexus 3.12.x

Using apt plugin 1.0.7 on nexus 3.12.x outside of docker images

2018-06-27 09:24:20,136+0000 INFO  [jetty-main-1]  *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Installing: [nexus-oss-feature/3.12.1.01]
2018-06-27 09:24:20,247+0000 WARN  [pool-17-thread-4]  *SYSTEM org.ops4j.pax.url.mvn.internal.AetherBasedResolver - Error resolving artifact org.apache.commons:commons-compress:jar:1.11: [Could not find artifact org.apache.commons:commons-compress:jar:1.11]
java.io.IOException: Error resolving artifact org.apache.commons:commons-compress:jar:1.11: [Could not find artifact org.apache.commons:commons-compress:jar:1.11]

Solution seems to be already implemented for docker image in #57

Since then commons-compress already released version 1.17 i believe?

Also, in pom.xml there is no version mentioned, so how does it get this specific version when starting nexus?

missing requirement after install

  • What are you trying to do?
    I'm trying to build and install the plugin
  • What did I do
    I did build the plugin on a machine with Java 1.8.0_111 which got his dependencies from our old nexus 2, because it already had the right repos in place (with our nexus 3 I can't even download the dependencies).
    I copied the content of ~/.m2/repository/net/staticsnow/nexus-repository-apt/1.0.4/ to the specified directory in the install process.
    I modified the file according to the documentation
  • Error Message
2018-02-14 15:09:41,450+0100 ERROR [jetty-main-1]  *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Failed to start
java.lang.RuntimeException: org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=nex
us-oss-feature; type=karaf.feature; version="[3.7.1.02,3.7.1.02]"; filter:="(&(osgi.identity=nexus-oss-feature)(type=karaf.feature)(version>=3.7.1.02)(version
<=3.7.1.02))" [caused by: Unable to resolve nexus-oss-feature/3.7.1.02: missing requirement [nexus-oss-feature/3.7.1.02] osgi.identity; osgi.identity=nexus-re
pository-apt; type=karaf.feature [caused by: Unable to resolve nexus-repository-apt/1.0.4: missing requirement [nexus-repository-apt/1.0.4] osgi.identity; osg
i.identity=net.staticsnow.nexus-repository-apt; type=osgi.bundle; version="[1.0.4,1.0.4]"; resolution:=mandatory [caused by: Unable to resolve net.staticsnow.
nexus-repository-apt/1.0.4: missing requirement [net.staticsnow.nexus-repository-apt/1.0.4] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.sonatype.
nexus.blobstore.api)(version>=3.8.0))"]]]
        at org.sonatype.nexus.extender.NexusContextListener.contextInitialized(NexusContextListener.java:176)
        at org.sonatype.nexus.bootstrap.osgi.ListenerTracker.addingService(ListenerTracker.java:47)
        at org.sonatype.nexus.bootstrap.osgi.ListenerTracker.addingService(ListenerTracker.java:1)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
        at org.sonatype.nexus.bootstrap.osgi.BootstrapListener.contextInitialized(BootstrapListener.java:101)
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:843)
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:533)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:816)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:345)
        at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
        at com.codahale.metrics.jetty9.InstrumentedHandler.doStart(InstrumentedHandler.java:92)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:113)
  • Anything else?
    Any ideas what I did wrong?

Posting multiple packages with the same version leads to download problems

First of all thank you for providing this great plugin.

I have allow redeploy as deployment policy, however when I redeploy (different package content with same version) I get the following error when downloading the package:

E: Failed to fetch https://blinded/repository/deb-package-repository/pool/l/mypackage/mypackage_0.3.0-1_amd64.deb Writing more data than expected (134274 > 133814)

This is resolved by removing the package and uploading it again.

Does this plugin not support redeployment? Any idea what the issue could be? Reloading index didn't help

Please tag the 1.0.7 version

Could someone tag the current state with version 1.0.7 as 1.0.7 in this repo. This would allow easier pinning instead of using the hashes of the last commit.

Error after upload new package: failed to read header

I'm getting error after upload new package to the repository. Problem is random and not always appears.
Nexus version: 3.7.1-02
Plugin version: 1.0.3

Curl command:

curl -u xxx:xxx -X POST -H "Content-Type: multipart/form-data" --data-binary "@name.0.0.1-1+abc.deb" https://nexus/repository/apt/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 16.6M    0     0  100 16.6M      0  11.7M  0:00:01  0:00:01 --:--:-- 11.8M
100 16.6M    0     0  100 16.6M      0   9.8M  0:00:01  0:00:01 --:--:--  9.8M
100 16.6M    0     0  100 16.6M      0   9.8M  0:00:01  0:00:01 --:--:--  9.8M```

The problem is that I'm not getting any error message about failed upload from nexus server.

Error in nexus.log:

2018-04-11 08:56:46,794+0200 WARN  [qtp1448346002-48130]  user org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: POST /repository/apt/
java.io.IOException: failed to read header. Occured at byte: 0
        at org.apache.commons.compress.archivers.ar.ArArchiveInputStream.getNextArEntry(ArArchiveInputStream.java:94)
        at org.apache.commons.compress.archivers.ar.ArArchiveInputStream.getNextEntry(ArArchiveInputStream.java:221)
        at net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedFacet.ingestAsset(AptHostedFacet.java:138)
        at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
        at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54)
        at net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedHandler.handle(AptHostedHandler.java:63)
        at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
        at net.staticsnow.nexus.repository.apt.internal.gpg.AptSigningHandler.handle(AptSigningHandler.java:47)
        at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
        at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotHandler.handle(AptSnapshotHandler.java:64)
        at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
        at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)
        at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
        at org.sonatype.nexus.repository.view.handlers.ContentHeadersHandler.handle(ContentHeadersHandler.java:44)
        at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
        at org.sonatype.nexus.repository.http.PartialFetchHandler.handle(PartialFetchHandler.java:55)
        at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
        at org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler.handle(ConditionalRequestHandler.java:72)
        at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
        at org.sonatype.nexus.repository.view.handlers.ExceptionHandler.handle(ExceptionHandler.java:44)
        at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
        at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:52)
        at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
        at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:46)
        at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
        at org.sonatype.nexus.repository.view.Context.start(Context.java:114)
        at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:63)
        at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:52)
        at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43)
        at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:200)
        at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:162)
        at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
        at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
        at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
        at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
        at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
        at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
        at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.java:85)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at org.sonatype.nexus.repository.httpbridge.internal.ExhaustRequestFilter.doFilter(ExhaustRequestFilter.java:71)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:108)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:68)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:102)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.java:104)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
        at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.java:73)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
        at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:175)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
        at org.eclipse.jetty.server.Server.handle(Server.java:534)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
        at java.lang.Thread.run(Thread.java:748)

Unable to build x2 missing dependencies

Hi,

This plugin sounds really good! I'd love to try it out.

Upon trying to build, it fails with the below.

[WARNING] The POM for bitwalker:UserAgentUtils:jar:1.12 is missing, no dependency information available
[WARNING] The POM for com.softwarementors.extjs:directjngine:jar:2.2 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

There seems to be a newer verison of UserAgentUtils which is fine. The directjengine.jar seems to have vanished.

I don't know how critical these are to the plugin but would you mind taking a look?

Thanks

Ryan

Metadata mismatch between `Release` and `Packages.bz`

Thanks for writing and sharing the apt repository plugin.

  • What are you trying to do?
    Provide a persistent proxy of upstream apt repositories for ubuntu which doesn't delete old packages. Today we ran into an issue with a proxy repository for http://dl.google.com/linux/chrome/deb/. The file metadata/dists/stable/main/Release was stale. It was "last verified" on 2018-03-21. It contained an invalid hash sum for metadata/dists/stable/main/binary-amd64/Packages.bz2. That file was "last verified" on 2018-03-23.

Workstations configured with the nexus server in /etc/apt/sources.list were failing to apt-get update with:

Err:26 https://nexus.redacted.com/repository/apt-dl.google.com-chrome-stable stable/main amd64 Packages
Hash Sum mismatch

I manually deleted the Release file through the nexus UI and after doing an apt-get update from a workstation this file was pulled into nexus at the correct (newer) version.

  • What feature or behavior is this required for?
    Reproducible system image building

  • How could we solve this issue? (Not knowing is okay!)
    I'm not sure exactly but it seems that possibly metadata files are cached with a policy that ignores the relationship between them. Without knowing the full mechanisms of the debian repository format, my suggestion would be to consider the file Release and all of the Packages.bz-like files it points to as a single "unit". Update them all together, or none at all.

  • Anything else?
    I don't know exactly how the plugin manages the metadata cache and I don't understand the meaning of the "maximum metadata age" parameter. Does the plugin just exactly proxy the file contents from the upstream server? Or does it parse the upstream file and build a local database?

If it just proxies the upstream server files, is it not possible to install old packages that are currently cached in nexus but have been removed from the upstream?

Unable to start plugin with Nexus 3.2.0

Hi,

I'm getting this error after start bundle:

karaf@root()> bundle:start 14
2017-01-12 13:34:09,913+0100 INFO  [Karaf local console user karaf] *SYSTEM org.sonatype.nexus.extender.NexusBundleTracker - ACTIVATING net.staticsnow.nexus-repository-apt [14]
2017-01-12 13:34:10,676+0100 WARN  [Karaf local console user karaf] *SYSTEM org.sonatype.nexus.extender.NexusBundleTracker - BROKEN net.staticsnow.nexus-repository-apt [14]
ERROR: Bundle org.sonatype.nexus.extender [132] EventDispatcher: Error during dispatch. (com.google.inject.CreationException: Unable to create injector, see the following errors:

1) No implementation for net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedFacet annotated with interface org.eclipse.sisu.inject.TypeArguments$Implicit was bound.
  at org.eclipse.sisu.wire.LocatorWiring

1 error)
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) No implementation for net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedFacet annotated with interface org.eclipse.sisu.inject.TypeArguments$Implicit was bound.
  at org.eclipse.sisu.wire.LocatorWiring

1 error
        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)
        at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
        at com.google.inject.Guice.createInjector(Guice.java:99)
        at com.google.inject.Guice.createInjector(Guice.java:73)
        at com.google.inject.Guice.createInjector(Guice.java:62)
        at org.eclipse.sisu.launch.SisuBundlePlan.inject(SisuBundlePlan.java:78)
        at org.eclipse.sisu.launch.SisuBundlePlan.prepare(SisuBundlePlan.java:50)
        at org.eclipse.sisu.launch.SisuTracker.prepare(SisuTracker.java:186)
        at org.sonatype.nexus.extender.NexusBundleTracker.prepare(NexusBundleTracker.java:68)
        at org.eclipse.sisu.launch.SisuTracker.addingBundle(SisuTracker.java:129)
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415)
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
        at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
        at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:2216)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
        at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38)
        at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:64)
        at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:54)
        at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)
        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)
        at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)
        at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)
        at java.lang.Thread.run(Thread.java:745)
karaf@root()> 2017-01-12 13:34:10,747+0100 ERROR [FelixDispatchQueue] *SYSTEM org.sonatype.nexus.extender - FrameworkEvent ERROR - org.sonatype.nexus.extender
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) No implementation for net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedFacet annotated with interface org.eclipse.sisu.inject.TypeArguments$Implicit was bound.
  at org.eclipse.sisu.wire.LocatorWiring

1 error
        at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470) [na:na]
        at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155) [na:na]
        at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107) [na:na]
        at com.google.inject.Guice.createInjector(Guice.java:99) [na:na]
        at com.google.inject.Guice.createInjector(Guice.java:73) [na:na]
        at com.google.inject.Guice.createInjector(Guice.java:62) [na:na]
        at org.eclipse.sisu.launch.SisuBundlePlan.inject(SisuBundlePlan.java:78) [na:na]
        at org.eclipse.sisu.launch.SisuBundlePlan.prepare(SisuBundlePlan.java:50) [na:na]
        at org.eclipse.sisu.launch.SisuTracker.prepare(SisuTracker.java:186) [na:na]
        at org.sonatype.nexus.extender.NexusBundleTracker.prepare(NexusBundleTracker.java:68) [na:na]
        at org.eclipse.sisu.launch.SisuTracker.addingBundle(SisuTracker.java:129) [na:na]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469) [org.osgi.core-6.0.0.jar:na]
        at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:415) [org.osgi.core-6.0.0.jar:na]
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [org.osgi.core-6.0.0.jar:na]
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [org.osgi.core-6.0.0.jar:na]
        at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [org.osgi.core-6.0.0.jar:na]
        at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916) [na:na]
        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835) [na:na]
        at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517) [na:na]
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541) [na:na]
        at org.apache.felix.framework.Felix.activateBundle(Felix.java:2216) [na:na]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2144) [na:na]
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) [na:na]
        at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38) [na:na]
        at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:64) [na:na]
        at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:54) [na:na]
        at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83) [na:na]
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67) [na:na]
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87) [na:na]
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480) [na:na]
        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406) [na:na]
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) [na:na]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182) [na:na]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119) [na:na]
        at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94) [na:na]
        at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270) [na:na]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]

not compatible with new nexus-3.9.0-01

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

Compiling of plugin with nexus-3.9.0-01 is failing.

[INFO] Changes detected - recompiling the module!
[INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /nexus-repository-apt-master/src/main/java/net/staticsnow/nexus/repository/apt/internal/hosted/AptHostedComponentMaintenanceFacet.java:[39,16] 1. ERROR in /nexus-repository-apt-master/src/main/java/net/staticsnow/nexus/repository/apt/internal/hosted/AptHostedComponentMaintenanceFacet.java (at line 39)
	protected void deleteAssetTx(EntityId assetId) {
	               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The method deleteAssetTx(EntityId) of type AptHostedComponentMaintenanceFacet must override or implement a supertype method

[ERROR] /nexus-repository-apt-master/src/main/java/net/staticsnow/nexus/repository/apt/internal/hosted/AptHostedComponentMaintenanceFacet.java:[46,7] 2. ERROR in /nexus-repository-apt-master/src/main/java/net/staticsnow/nexus/repository/apt/internal/hosted/AptHostedComponentMaintenanceFacet.java (at line 46)
	super.deleteAssetTx(assetId);
	      ^^^^^^^^^^^^^
The method deleteAssetTx(EntityId, boolean) in the type DefaultComponentMaintenanceImpl is not applicable for the arguments (EntityId)

[ERROR] Found 2 errors and 0 warnings.

Asset history limit 0

Nexus 3.13
nexus-repository-apt: 1.07

uploading a new/different package to my repository via UI or curl

When i upload a new .deb the metadata Package file only shows the last uploaded debian package.
Every older upload vanished from the list.
The repository was newly created.
After i changed the number of historic packages the repository was populated as expected.
So it seems that there is a issue with initialization of history limit in a new repository

Create the jar file

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?
    I am not familiar with maven and java. Each time I try to build the jar file, i get an error:
    [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-environment) @ nexus-repository-apt --- [INFO] [INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-dependencies) @ nexus-repository-apt --- [WARNING] Rule 0: org.apache.maven.plugins.enforcer.BannedDependencies failed with message: Found Banned Dependency: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 Use 'mvn dependency:tree' to locate the source of the banned dependencies. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 21.556 s [INFO] Finished at: 2018-11-02T12:49:18+01:00 [INFO] Final Memory: 33M/186M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-dependencies) on project nexus-repository-apt: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

  • What feature or behavior is this required for?

  • How could we solve this issue? (Not knowing is okay!)
    1_ update this git to the latest nexus release 3.14.0-04.
    2_ Help us to correct the pom.xml file in order to be able to build the jar file, or find a solution to provide the jar file?

  • Anything else?
    I am under debian9 using the default maven:
    Apache Maven 3.3.9 Maven home: /usr/share/maven Java version: 1.8.0_181, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
    redards
    vandman

Need better error message when trying to snapshot a repo without a Release or InRelease file

Currently just throw an exception, we need a useful message:

java.lang.NullPointerException: null
at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotFacetSupport.collectSnapshotItems(AptSnapshotFacetSupport.java:126)
at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotFacetSupport.createSnapshot(AptSnapshotFacetSupport.java:65)
at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54)
at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotHandler.handleSnapshotAdminRequest(AptSnapshotHandler.java:81)
at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotHandler.handle(AptSnapshotHandler.java:67)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
at org.sonatype.nexus.repository.view.handlers.ContentHeadersHandler.handle(ContentHeadersHandler.java:44)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
at org.sonatype.nexus.repository.http.PartialFetchHandler.handle(PartialFetchHandler.java:55)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
at org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler.handle(ConditionalRequestHandler.java:72)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
at org.sonatype.nexus.repository.cache.NegativeCacheHandler.handle(NegativeCacheHandler.java:42)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
at org.sonatype.nexus.repository.view.handlers.ExceptionHandler.handle(ExceptionHandler.java:44)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:52)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:46)
at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
at org.sonatype.nexus.repository.view.Context.start(Context.java:114)
at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:63)
at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:52)
at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43)
at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:211)
at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:173)
at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.java:85)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
at org.sonatype.nexus.repository.httpbridge.internal.ExhaustRequestFilter.doFilter(ExhaustRequestFilter.java:71)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:108)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:68)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:102)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98)
at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.java:104)
at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.java:73)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:175)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:530)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
at java.lang.Thread.run(Thread.java:748)

Unable to install packages which are already cached

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?

Install the packages which have already been cached by proxy repository, but no longer available in remote one.

For example, here is a library libgcrypt20_1.6.5-2ubuntu0.4_amd64.deb in the repository
image

Trying to install exact version of this package leads to the following error
image

apt-cache policy shows that there is newer version available and it is not the same as the cached one
image

So it seems that plugin just downloads new metadata from the remote repository and then it's hardly possible to install the previously cached packages.

  • What feature or behavior is this required for?

To be able to install any package that has already been cached from the remote repository, because these ones just replace old package versions with the newer ones.

  • How could we solve this issue? (Not knowing is okay!)

Merging the new metadata of the remove repository with the already cached one.

"Can't find signing key in key ring" - need more details to troubleshoot

Hi,
I'm running Nexus 3.5.0-02 OSS on Windows.
I installed nexus-repository-apt in the "(most) Permanent Install" mode (can not run it through the karaf console since console crash everytime - it's a known issue on Windows).
I did create an apt-hosted repo, but now I'm stick into the "PGP signing key pair" configuration.
When trying to upload a .deb package with curl, Nexus always returns: Error 500 - "Can't find signing key in key ring"

Here are the steps I did:
Generate a RSA 2048 keypair with openssl with a pass like this:
openssl genrsa -passout pass:test -out privkey.pem

Then paste the output of the RSA PRIVATE KEY section generated by:
openssl rsa -text -in privkey.pem
as the PGP signing key pair and set the passphrase to "test".

On the client side, I call curl using the .pem file thru the cacert parameter:
curl -u <user>:<pass> -X POST -H "Content-Type: multipart/form-data" --data-binary "@htop_2.0.2-1_amd64.deb" --cacert privkey.pem https://<server>/nexus/repository/<repo>/
I assume my PGP signing pair is incorrect ? I looked into source code, but did not find more information from AptSigningFacet.java

Can you please give an example on how to generate a valid content for "PGP signing key pair" and how to use it with curl ?

Thank you.

Nexus 3.6.0

Is this plugin supposed to run on 3.6.0?

I tried the "most permanent" instructions and failed (sorry I don't remember the error message shown in UI / logs). Now that I didn't find an alternative I would be happy if you could confirm that it is supposed to work with newer nexus repository versions to justify trying once again to install it.

commons-compress:jar:1.11 is missing in 3.11 / master

When doing a docker build I get the following error on startup:

nexus_1  | 2018-05-12 08:04:01,340+0000 WARN  [pool-17-thread-6] *SYSTEM org.ops4j.pax.url.mvn.internal.AetherBasedResolver - Error resolving artifact org.apache.commons:commons-compress:jar:1.11: [Could not find artifact org.apache.commons:commons-compress:jar:1.11]
nexus_1  | java.io.IOException: Error resolving artifact org.apache.commons:commons-compress:jar:1.11: [Could not find artifact org.apache.commons:commons-compress:jar:1.11]
nexus_1  |      at org.ops

The ops4j.pax thingy wants commons-compress v 1.1, what we ship inside is v 1.16 (in file ./system/org/apache/commons/commons-compress/1.16.1/commons-compress-1.16.1.jar)

Edit: yes, I use nexus-public,

Expand Unit Testing of Versions

  • What are you trying to do?

I am trying to expand test coverage on this project so it might be a bit easier for others to contribute!

In the VersionTest.java class, I've started testing some of the Debian version permutations, but there likely exist many more. I believe @mpoindexter can point out some cases, but really anyone can :)

  • What feature or behavior is this required for?

Not required per se, good coding practices, and make it more obvious when you've broken something in the future.

  • How could we solve this issue? (Not knowing is okay!)

Figure out a list of Versions to test, and then come up with cases for them. The class currently uses JUnit, as that's fairly standard for the @sonatype formats team, but if you got a better way of testing feel free to contribute!

  • Anything else?

Have fun!

Current master (1.0.5) version on 3.9.0 causes web-UI to #fail

Hello,
the new master (1.0.5) version on 3.9.0 causes web-UI to #fail. Is it only lust in my machine?!

In the logs there is:

2018-03-07 07:43:03,409+0000 WARN  [qtp682520909-47]  admin org.sonatype.nexus.rapture.internal.state.StateComponent - Failed to get state from com.google.inject.internal.InjectorImpl$2 (ignored)
com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) null returned by binding at org.eclipse.sisu.wire.LocatorWiring
 but the 1st parameter of org.sonatype.nexus.rapture.internal.state.FileDescriptorCheckValueContributor.<init>(FileDescriptorCheckValueContributor.groovy:33) is not @Nullable
  while locating org.sonatype.nexus.common.system.FileDescriptorService
    for the 1st parameter of org.sonatype.nexus.rapture.internal.state.FileDescriptorCheckValueContributor.<init>(FileDescriptorCheckValueContributor.groovy:33)
  at / (via modules: org.sonatype.nexus.extender.modules.NexusBundleModule -> org.eclipse.sisu.space.SpaceModule)
  while locating org.sonatype.nexus.rapture.internal.state.FileDescriptorCheckValueContributor
  while locating java.lang.Object annotated with *

1 error
        at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1028)
        at org.sonatype.nexus.rapture.internal.state.StateComponent.getState(StateComponent.java:87)
        at org.sonatype.nexus.rapture.internal.state.StateComponent$$EnhancerByGuice$$c680be9.CGLIB$getState$0(<generated>)
        at org.sonatype.nexus.rapture.internal.state.StateComponent$$EnhancerByGuice$$c680be9$$FastClassByGuice$$f5589e80.invoke(<generated>)
        at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:76)
        at com.palominolabs.metrics.guice.ExceptionMeteredInterceptor.invoke(ExceptionMeteredInterceptor.java:49)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)
        at com.palominolabs.metrics.guice.TimedInterceptor.invoke(TimedInterceptor.java:47)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)
        at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)
        at org.sonatype.nexus.rapture.internal.state.StateComponent$$EnhancerByGuice$$c680be9.getState(<generated>)
        at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.invokeJavaMethod(DispatcherBase.java:142)
        at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.invokeMethod(DispatcherBase.java:133)
        at org.sonatype.nexus.extdirect.internal.ExtDirectServlet$3.invokeMethod(ExtDirectServlet.java:233)
        at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.dispatch(DispatcherBase.java:63)
        at com.softwarementors.extjs.djn.router.processor.poll.PollRequestProcessor.process(PollRequestProcessor.java:145)
        at org.sonatype.nexus.extdirect.internal.ExtDirectServlet$4.processPollRequest(ExtDirectServlet.java:337)
        at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.processRequest(DirectJNgineServlet.java:621)
        at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.doPost(DirectJNgineServlet.java:580)
        at org.sonatype.nexus.extdirect.internal.ExtDirectServlet.doPost(ExtDirectServlet.java:138)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
        at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
        at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
        at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
        at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
        at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
        at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.java:85)
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
        at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101)
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:68)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:102)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
        at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.java:104)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
        at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.java:73)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:175)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.Server.handle(Server.java:530)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
        at java.lang.Thread.run(Thread.java:748)

When running under IIS, error message "Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)" appears

I've setup Nexus on an IIS and I installed nexus repository apt plugin.

I've successfully uploaded a couple of packages in it, but when I try doing apt-get update from a client, I get the following error:

Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

After some research, it seems that the problem is that IIS (being on Windows) sends the InRelease file with CRLF instead of LF. If I manually (I'm using Fiddler as a proxy-in-the-middle) remove the CR characters from the output, apt-get update works perfectly (I've managed to install a couple of packages).

I'm not entirely sure if this is nexus-repository-apt related, or it's a problem from nexus itself. I've found a reference to BytesPayload in AptHostedFacet. I also found that AptSigningFacet signs the file after stripping the CR characters. I hope those help.

Add license

Could you add a license so that we know what we can do with the code?

apt-transport-* support for proxies

Don't know whether or not this is already supported, so I file it as a feature request here.

Some external package repositories use https (or even tor) via apt-transport-https or apt-transport-tor to serve their packages. Do proxy repositories have support for getting packages from such external repositories, i.o.w. could I setup a proxy repository that caches packages from tor+http://vwakviie2ienjx6t.onion/debian instead of http://ftp.de.debian.org/debian?

If not, could this be added, please?

Feature Request: Support apt (group) repos

It would be nice to have group repos with apt.

  • What are you trying to do?
    Specify a single apt group repository.

  • What feature or behavior is this required for?
    Virtual/Group APT repository

  • How could we solve this issue? (Not knowing is okay!)
    Implement group apt repositories

  • Anything else?

Deployed Packages not found...

Not sure if anyone else is having this problem, hopeful. :)

I've deployed .deb packages and it looks like the indexes are updated (can see the reference in Packages.gz). But after apt update, which does pull the latest index, I still can't see the package in the repo. I believe this used to work. I've delete and recreated the repo in Nexus but still no worky. Any pointers/tips would be much appreciated.

bundle wont stick on reboot and disappears

Hi.. just trying this out and having some trouble and wondering if you have any pointers.

more of a question than a bug.

I've installed the bundle under the console.. and the bundle appears... all is good. Loads in UI and I can see the bundle and the repository.

I reboot nexus and the bundle disappears. I do not see any particular error messages that appear to point at anything.

I have nexus running as a service under the nexus user.

any pointers before I post to the nexus forums.

Error when using S3 blobstore: java.io.IOException: failed to read entry trailer. Occured at byte: 46324

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?
    Upload a deb file to an apt hosted repo.

  • What feature or behavior is this required for?
    Upload a deb

  • How could we solve this issue? (Not knowing is okay!)
    Im currently getting the following error:

2018-03-13 02:03:46,868+0000 INFO  [qtp520303092-386]  admin org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl - Updating repository: myrepo -> Configuration{repositoryName='myrepo', recipeName='apt-hosted', attributes={apt={distribution=bionic}, aptHosted={assetHistoryLimit=null}, aptSigning={keypair=-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: GnuPG v1

redacted
-----END PGP PRIVATE KEY BLOCK-----
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

redacted
-----END PGP PUBLIC KEY BLOCK-----, passphrase=redacted}, storage={blobStoreName=my-s3, strictContentTypeValidation=true, writePolicy=ALLOW}}}
2018-03-13 02:04:00,852+0000 WARN  [qtp520303092-474]  me org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: POST /repository/myrepo/
java.io.IOException: failed to read entry trailer. Occured at byte: 46324
	at org.apache.commons.compress.archivers.ar.ArArchiveInputStream.getNextArEntry(ArArchiveInputStream.java:125)
	at org.apache.commons.compress.archivers.ar.ArArchiveInputStream.getNextEntry(ArArchiveInputStream.java:221)
	at net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedFacet.ingestAsset(AptHostedFacet.java:134)
	at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
	at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54)
	at net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedHandler.handle(AptHostedHandler.java:59)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at net.staticsnow.nexus.repository.apt.internal.gpg.AptSigningHandler.handle(AptSigningHandler.java:43)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotHandler.handle(AptSnapshotHandler.java:60)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.ContentHeadersHandler.handle(ContentHeadersHandler.java:44)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.http.PartialFetchHandler.handle(PartialFetchHandler.java:55)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler.handle(ConditionalRequestHandler.java:72)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.ExceptionHandler.handle(ExceptionHandler.java:44)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:52)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:46)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.Context.start(Context.java:114)
	at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:63)
	at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:52)
	at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43)
	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:211)
	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:173)
	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:126)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
	at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
	at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
	at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.java:85)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.repository.httpbridge.internal.ExhaustRequestFilter.doFilter(ExhaustRequestFilter.java:71)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:108)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:68)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:102)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.java:104)
	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
	at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.java:73)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:175)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:530)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
	at java.lang.Thread.run(Thread.java:748)

I dont understand from the error if this is a misconfiguration on my part or a bug. It would really help if the documentation at least gave a hint as to what is wanted by the PGP signing key pair box despite what was said in #20 , I cant be sure im providing what it wants otherwise (e.g. if the above is actually what it wants have the documentation at least state that you should export your GPG armored public/private keys into that box or something).

I gave it a RSA 4096 signing key. I get the same result even if I only provide the private key.

  • Anything else?

Fix transaction pattern in AptUploadHandler

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

Ideally ensurePermitted would occur before a Transaction is opened, and likely right after the TempBlob is created (as it looks like that's how you get your path)

  • Anything else?
    Let me know if you have any questions!

500 error when uploading deb packages via curl

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?
    Upload a package to our nexus repository manager using the recommended curl command

  • What feature or behavior is this required for?
    Maintaining our nexus repository with proprietary packages

  • How could we solve this issue? (Not knowing is okay!)
    Being able to correctly upload the packages

  • Anything else?

Upload command (showing the template command here):
curl -u user:pass -X POST -H "Content-Type: multipart/form-data" --data-binary "@package.deb" http://nexus_url:8081/repository/repo_name/

Log Viewer output:

2018-05-08 21:01:41,903+0000 WARN [qtp2003082976-9952] ross org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: POST /repository/apt-nvidia-devblobs/ org.bouncycastle.openpgp.PGPException: checksum mismatch at 0 of 20 at org.bouncycastle.openpgp.PGPSecretKey.extractKeyData(Unknown Source) at org.bouncycastle.openpgp.PGPSecretKey.extractPrivateKey(Unknown Source) at net.staticsnow.nexus.repository.apt.internal.gpg.AptSigningFacet.signInline(AptSigningFacet.java:108) at net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedFacet.rebuildIndexesInTransaction(AptHostedFacet.java:231) at net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedFacet.ingestAsset(AptHostedFacet.java:188) at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56) at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54) at net.staticsnow.nexus.repository.apt.internal.hosted.AptHostedHandler.handle(AptHostedHandler.java:59) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) at net.staticsnow.nexus.repository.apt.internal.gpg.AptSigningHandler.handle(AptSigningHandler.java:43) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotHandler.handle(AptSnapshotHandler.java:60) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) at org.sonatype.nexus.repository.view.handlers.ContentHeadersHandler.handle(ContentHeadersHandler.java:44) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) at org.sonatype.nexus.repository.http.PartialFetchHandler.handle(PartialFetchHandler.java:55) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) at org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler.handle(ConditionalRequestHandler.java:72) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) at org.sonatype.nexus.repository.view.handlers.ExceptionHandler.handle(ExceptionHandler.java:44) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:52) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:46) at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80) at org.sonatype.nexus.repository.view.Context.start(Context.java:114) at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:63) at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:52) at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43) at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:211) at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:173) at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:126) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181) at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66) at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.java:85) at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101) at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at org.sonatype.nexus.repository.httpbridge.internal.ExhaustRequestFilter.doFilter(ExhaustRequestFilter.java:71) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:108) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:68) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:102) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.java:104) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135) at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.java:73) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:175) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:530) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626) at java.lang.Thread.run(Thread.java:748)

Do I need to somehow sign these packages with the key seen in the APT Settings of the repository before uploading? If so, how should I go about doing that?

java.io.IOException: unknown object in stream: 35

Hi!
While trying to send a deb package to nexus with
curl -u username:password -X POST -H "Content-Type: multipart/form-data" --data-binary "@my_deb.deb" http://<hostname>:8085/repository/<name>/ -v
I'm getting this error:
`

Trying ...
TCP_NODELAY set
Connected to () port 8085 (#0)
Server auth using Basic with user ''
POST /repository/ubuntu/ HTTP/1.1
Host: :8085
Authorization: Basic b2RlcGxveW06OSEqcWFfdzUpRW4n
User-Agent: curl/7.52.1
Accept: /
Content-Type: multipart/form-data
Content-Length: 26185188
Expect: 100-continue
< HTTP/1.1 100 Continue
We are completely uploaded and fine
HTTP/1.1 500 java.io.IOException: unknown object in stream: 35
Date: Thu, 17 Aug 2017 13:14:02 GMT
Server: Nexus/3.4.0-02 (OSS)
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
Pragma: no-cache
Cache-Control: post-check=0, pre-check=0
Expires: 0
Content-Type: text/html
Content-Length: 2075
`

What can be the cause of this error?

Group support

Before I start, just want to say this is a great plugin and has been really helpful!

I was just wondering whether there were any plans for adding support for repository groups? I'm using both local and proxy repositories and would love to be able to combine them so I only have to add a single line to my sources.list files.

Integrate to Nexus 3.14

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?

Install the plugin .jar on Nexus 3.14.

  • What feature or behavior is this required for?

Sonatype just announced multiple CVEs for Nexus 3.13. Upgrading may not be feasible as i haven't
been able to get the compiled .jar to function with Nexus 3.14.

Date: Oct 19 2018
Affected Versions: All previous Nexus Repository Manager OSS/Pro 3.x versions up to and including 3.13
Fixed in Version: Nexus Repository Manager OSS/Pro version 3.14.0
Addressed vulnerabilities: CVE-2018-16619, CVE-2018-16620, CVE-2018-16621

  • How could we solve this issue? (Not knowing is okay!)

All I can ask is that the software is endorsed for Nexus 3.14. Thank you.

  • Anything else?

I may be in error. I ran a single experiment yesterday where I modified the provided
Dockerfile to use Nexus 3.14, and Nexus simply refused to run with the .jar file installed.
If I'm wrong about all this - awesome! All we need is an updated Dockerfile so people
can move on from 3.13, which is now insecure.

Create version matrix

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?
    The current version list on the README is good, but I think it would likely be visually easier for people if we create a version matrix

  • What feature or behavior is this required for?
    Mainly just so people can visually scan a little bit better on what version works with what, etc...

Perhaps we can link to release tags, as well.

  • How could we solve this issue? (Not knowing is okay!)
    Have fun! Write some markdown! Trace down what versions of the apt plugin work with what version of Nexus Repo, etc...

  • Anything else?

Nexus 3.9.0-01 with 1.0.5 Failed Transition state causes Nexus to fail to restart

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?
    I installed 1.0.5 on Nexus 3.9.0-01 which went fine and Nexus started OK. I configured a bunch of repositories including four apt hosted repos (all repos were empty and had no artifacts, although my S3 bucket has two property files: metrics and metadata). For the GPG key, I concatted the output of the public/secret amored GPG output for the RSA signing key (no idea if thats correct or if it only wants the private key only since its not documented anywhere).

Upon restarting the Nexus service in order to expose some additional ports on the Docker container, I get the following error:

2018-03-09 21:24:11,088+0000 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl - Failed transition: NEW -> STARTED
java.lang.IllegalStateException: Missing recipe: apt-hosted
	at com.google.common.base.Preconditions.checkState(Preconditions.java:518)
	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.recipe(RepositoryManagerImpl.java:138)
	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.newRepository(RepositoryManagerImpl.java:156)
	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.restoreRepositories(RepositoryManagerImpl.java:246)
	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.doStart(RepositoryManagerImpl.java:228)
	at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
	at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
	at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:191)
	at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
	at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:155)
	at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:95)
	at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:189)
	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1429)
	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
	at java.lang.Thread.run(Thread.java:748)
2018-03-09 21:24:11,098+0000 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Failed to start nexus
java.lang.IllegalStateException: Missing recipe: apt-hosted
	at com.google.common.base.Preconditions.checkState(Preconditions.java:518)
	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.recipe(RepositoryManagerImpl.java:138)
	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.newRepository(RepositoryManagerImpl.java:156)
	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.restoreRepositories(RepositoryManagerImpl.java:246)
	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.doStart(RepositoryManagerImpl.java:228)
	at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
	at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
	at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:191)
	at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
	at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:155)
	at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:95)
	at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:189)
	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1429)
	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
	at java.lang.Thread.run(Thread.java:748)

Note that im also doing all of this with the S3 backend plugin.

  • What feature or behavior is this required for?
    hosted apt repo

  • How could we solve this issue? (Not knowing is okay!)
    Identify if the above bug is with apt or s3 backend plugin or the combination of both (I dont think it is S3 though, im not getting permissions errors and theres already metadata files on the bucket).

  • Anything else?

Unable to point apt sources to Nexus 3.9 with APT plugin

Hi. I feel like there's some inside information I'm missing regarding getting Nexus and your great APT plugin working. I've successfully followed the project instructions for building and installing it into my fresh Nexus OSS 3.9.0 install. When I create a new APT proxy repo I specify the name (Ubuntu-16.04), distribution (16.04), and remote location (http://releases.ubuntu.com/). Then in my test Ubuntu 16.04 VM I add "deb http://192.168.51.101:8081/Ubuntu-16.04 xenial main" to /etc/apt/sources.lst. When I "apt-get update" I end up with errors like:

The repository 'http://192.168.51.101:8081/Ubuntu-16.04/dists/xenial/main/binary-amd64/Packages 404 Not Found"
Data from such as repository can't be authenticated and is therefore potentially dangerous to use.
etc...

So I'm clearly messing up my APT plugin repo URL/path, and possibly my test client config. This git project is missing this last mile in setup and use. I realize that end user use is subjective, but can you include a basic/simple example? Or some tip? Thanks!!!

Building 1.0.5 release produces jar files named 1.0.4

  • I downloaded the latest release from the "Releases" for this repo
  • I ran mvn (after commenting out tests -- I don't have vagrant installed and the tests appeared to fail because it couldn't create a VM) and it produced jar files named nexus-repository-apt-1.0.4.jar
  • I am now confused because the instructions (and release version) indicate that the files should be named nexus-repository-apt-1.0.5.jar

The instructions themselves are a little confusing to me:

  • Why do we have to build the JAR ourselves? Why is this not distributed as the "Release"?
  • After building the JAR file, why do we need to run a docker container?
  • Are both the JAR file and docker container necessary?
  • What is the purpose of the docker container?

Unable to resolve, missing requirement osgi.wiring.package

Just trying to install this bundle into Nexus 3.2.0-01

Following the temporary instructions to try out the plugin, I get to bundle:start and get the following error:

238 | Installed | 200 | 1.0.2                      | net.staticsnow:nexus-repository-apt
karaf@root()> bundle:start 238
2017-04-13 18:10:41,828+0100 ERROR [Karaf local console user karaf] *SYSTEM org.apache.karaf.shell.support.ShellUtil - Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error executing command on bundles:
        Error starting bundle 238: Unable to resolve net.staticsnow.nexus-repository-apt [238](R 238.0): missing requirement [net.staticsnow.nexus-repository-apt [238](R 238.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=21.0.0)) Unresolved requirements: [[net.staticsnow.nexus-repository-apt [238](R 238.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=21.0.0))]
        at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61) [na:na]
        at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:69) [na:na]
        at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:54) [na:na]
        at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83) [na:na]
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67) [na:na]
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87) [na:na]
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480) [na:na]
        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406) [na:na]
        at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108) [na:na]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182) [na:na]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119) [na:na]
        at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94) [na:na]
        at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270) [na:na]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_71]
        Suppressed: java.lang.Exception: Error starting bundle 238: Unable to resolve net.staticsnow.nexus-repository-apt [238](R 238.0): missing requirement [net.staticsnow.nexus-repository-apt [238](R 238.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=21.0.0)) Unresolved requirements: [[net.staticsnow.nexus-repository-apt [238](R 238.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=21.0.0))]
                at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:66) [na:na]
                ... 12 common frames omitted
        Caused by: org.osgi.framework.BundleException: Unable to resolve net.staticsnow.nexus-repository-apt [238](R 238.0): missing requirement [net.staticsnow.nexus-repository-apt [238](R 238.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=21.0.0)) Unresolved requirements: [[net.staticsnow.nexus-repository-apt [238](R 238.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=21.0.0))]
                at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
                at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
                at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
                at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38)
                at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:64)
                ... 12 common frames omitted

Error executing command: Error executing command on bundles:
        Error starting bundle 238: Unable to resolve net.staticsnow.nexus-repository-apt [238](R 238.0): missing requirement [net.staticsnow.nexus-repository-apt [238](R 238.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=21.0.0)) Unresolved requirements: [[net.staticsnow.nexus-repository-apt [238](R 238.0)] osgi.wiring.package; (&(osgi.wiring.package=com.google.common.base)(version>=21.0.0))]

This is after building from a clean checkout and following the readme.

Create components for packages rather than just assets

Thanks for creating an issue! Please fill out this form so we can be
sure to have all the information we need, and to minimize back and forth.

  • What are you trying to do?
    Currently I believe the apt plugin creates all new packages that are either proxied or uploaded as assets. In order to better leverage Nexus Repository features, anything that is basically an apt package should be created as a component, with an asset attached to it.

  • What feature or behavior is this required for?
    This will allow features such as Search, Tree View, etc... to function better for the apt plugin

  • How could we solve this issue? (Not knowing is okay!)
    There are a number of ways by which to approach this, what I would suggest is taking a look at how we do this in the R, Conan, etc... plugins, likely in the ProxyFacetImpl classes, etc... and adapting apt to do something similar

  • Anything else?
    This is likely a big undertaking, so buckle in :)

Invalid Line in ControlFileParser when taking snapshot of repository

Hi there!

I've created three apt proxy repositories in Nexus needed by the package nvidia-docker2 (https://github.com/NVIDIA/nvidia-docker)
The original sources list looks like this:

roshan@roshan-desktop:~$ curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list
deb https://nvidia.github.io/libnvidia-container/ubuntu16.04/$(ARCH) /
deb https://nvidia.github.io/nvidia-container-runtime/ubuntu16.04/$(ARCH) /
deb https://nvidia.github.io/nvidia-docker/ubuntu16.04/$(ARCH) /

The repositories each contain an InRelease file at their root and are flat (there is no dists/ directory).
Here are all the files exposed by the libnvidia-container repo: https://github.com/NVIDIA/libnvidia-container/tree/gh-pages/ubuntu16.04/amd64 in their source and the actual InRelease file served: http://nvidia.github.io/libnvidia-container/ubuntu16.04/amd64/InRelease

I've configured the repositories and am able to use them as apt sources in the regular configuration:
image

deb [arch=amd64] https://<internal_hostname>/repository/apt-nvidia.github.io-xenial-libnvidia-container /
deb [arch=amd64] https://<internal_hostname>/repository/apt-nvidia.github.io-xenial-nvidia-container-runtime /
deb [arch=amd64] https://<internal_hostname>/repository/apt-nvidia.github.io-xenial-nvidia-docker /

image

Since that works I'm guessing that the InRelease file is parsed correctly by this plugin, however when trying to take a snapshot of the repository I run into issues parsing and get an Invalid Line error:

roshan@roshan-desktop:~$ curl -v -u roshan:<redacted> -X MKCOL https://<internal_hostname>/repository/apt-nvidia.github.io-xenial-libnvidia-container/snapshots/20180516/
*   Trying <redacted>...
* Connected to <internal_hostname> (<redacted>) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 597 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_AES_256_GCM_SHA384
* 	 server certificate verification OK
* 	 server certificate status verification SKIPPED
* 	 common name: <internal_hostname> (matched)
* 	 server certificate expiration date OK
* 	 server certificate activation date OK
* 	 certificate public key: RSA
* 	 certificate version: #3
* 	 subject: CN=<internal_hostname>
* 	 start date: Mon, 23 Apr 2018 23:24:20 GMT
* 	 expire date: Sun, 22 Jul 2018 23:24:20 GMT
* 	 issuer: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
* 	 compression: NULL
* ALPN, server accepted to use http/1.1
* Server auth using Basic with user 'roshan'
> MKCOL /repository/apt-nvidia.github.io-xenial-libnvidia-container/snapshots/20180516/ HTTP/1.1
> Host: <internal_hostname>
> Authorization: Basic <redacted>
> User-Agent: curl/7.47.0
> Accept: */*
> 
< HTTP/1.1 500 Server Error
< Server: nginx/1.10.3 (Ubuntu)
< Date: Wed, 16 May 2018 18:49:39 GMT
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation
< X-Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation
< 
* Connection #0 to host <internal_hostname> left intact
2018-05-17 20:28:36,377+0000 WARN  [qtp2003082976-14175]  roshan org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: MKCOL /repository/apt-nvidia.github.io-xenial-libnvidia-container/snapshots/20180516/
java.io.IOException: Invalid line: -������
	at net.staticsnow.nexus.repository.apt.internal.debian.ControlFileParser.beginField(ControlFileParser.java:94)
	at net.staticsnow.nexus.repository.apt.internal.debian.ControlFileParser.parseControlFile(ControlFileParser.java:64)
	at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotFacetSupport.collectSnapshotItems(AptSnapshotFacetSupport.java:154)
	at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotFacetSupport.createSnapshot(AptSnapshotFacetSupport.java:65)
	at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
	at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54)
	at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotHandler.handleSnapshotAdminRequest(AptSnapshotHandler.java:81)
	at net.staticsnow.nexus.repository.apt.internal.snapshot.AptSnapshotHandler.handle(AptSnapshotHandler.java:67)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.ContentHeadersHandler.handle(ContentHeadersHandler.java:44)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.http.PartialFetchHandler.handle(PartialFetchHandler.java:55)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler.handle(ConditionalRequestHandler.java:72)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.cache.NegativeCacheHandler.handle(NegativeCacheHandler.java:42)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.ExceptionHandler.handle(ExceptionHandler.java:44)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:52)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:46)
	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
	at org.sonatype.nexus.repository.view.Context.start(Context.java:114)
	at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:63)
	at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:52)
	at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43)
	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:211)
	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:173)
	at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:126)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
	at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
	at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
	at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.java:85)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.repository.httpbridge.internal.ExhaustRequestFilter.doFilter(ExhaustRequestFilter.java:71)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:108)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:68)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:102)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98)
	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
	at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.java:104)
	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
	at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.java:73)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:175)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:530)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)
	at java.lang.Thread.run(Thread.java:748)

It's unclear which line in InRelease is tripping up the parsing. For a moment I thought it might be an issue since it's a flat repository but I tried creating a similar apt proxy for the sublime text repo which is also flat and was able to take a snapshot of that successfully. However that repo contains both a Release and an InRelease file: https://download.sublimetext.com/apt/stable/InRelease https://download.sublimetext.com/apt/stable/Release

Any idea what could be the issue here? Thanks in advance!

Roshan

Nexus fails with "Resource mvn:net.staticsnow/nexus-repository-apt/1.0.7 does not contain a manifest"

  • What are you trying to do?
    Use nexus-repository-apt with Nexus OSS version 3.12.0-01

  • What feature or behavior is this required for?
    Not a feature; I followed the instructions on getting the jar into Nexus. However, on startup,
    Nexus throws an error, that states:

    "Resource mvn:net.staticsnow/nexus-repository-apt/1.0.7 does not contain a manifest"

  • How could we solve this issue? (Not knowing is okay!)
    Not sure, but I can post any information you need.

  • Anything else?
    Attached the related section of log here.
    errorlog.txt

Is it possible to have deb-src files in the registry?

  • What are you trying to do?
    I had build the package using something like this: dpkg-buildpackage -rfakeroot -us -uc. As the result I have the next:
drwxrwxr-x 22 dpkgbuilder dpkgbuilder     4096 Aug 15 03:33 cmpossl-1.1.1-pre9-dev
-rw-rw-r--  1 dpkgbuilder dpkgbuilder     1628 Aug 15 03:33 cmpossl_1.1.1-pre9-dev_amd64.changes
-rw-r--r--  1 dpkgbuilder dpkgbuilder  9894188 Aug 15 03:33 cmpossl_1.1.1-pre9-dev_amd64.deb
-rw-rw-r--  1 dpkgbuilder dpkgbuilder     5848 Aug 15 03:22 cmpossl_1.1.1-pre9-dev.debian.tar.xz
-rw-rw-r--  1 dpkgbuilder dpkgbuilder      860 Aug 15 03:22 cmpossl_1.1.1-pre9-dev.dsc
-rw-rw-r--  1 dpkgbuilder dpkgbuilder 59439926 Aug 14 01:19 cmpossl-1.1.1-pre9-dev.tar.bz2
lrwxrwxrwx  1 dpkgbuilder dpkgbuilder       30 Aug 14 02:00 cmpossl_1.1.1-pre9.orig.tar.bz2 -> cmpossl-1.1.1-pre9-dev.tar.bz2

I would like to have deb-src registry with my sources as well. I wonder if I can do that?
Saying, dupload wants only the .changes file in order to proceed (but it loads all these .dsc, .tar.xz and tar.bz, but APT plugin for Nexus 3 as I understood from the manual wants only the .deb).

  • What feature or behavior is this required for?
    I would like to have the sources with the .debs as well.

Programmatically creating a repo via the script API

Hi!

We're trying to create an APT repo via curl (ultimately from jenkins). In https://github.com/sonatype/nexus-public/blob/master/plugins/nexus-script-plugin/src/main/java/org/sonatype/nexus/script/plugin/RepositoryApi.java we can see a number of built-in methods for creating different types of repos. Does the APT plugin add a new method for this? We tried the following:

# create script
curl -u user:pass -X POST -H "Content-Type: application/json" --data '{"name":"foo","type":"groovy","content":"repository.createAptHosted('\''test'\'','\''myblob'\'')"}' http://myhost:8081/service/rest/v1/script
# run it
curl -u user:pass -X POST -H 'Content-Type: text/plain' -H 'Accept: application/json' 'http://myhost:8081/service/rest/v1/script/foo/run'
{
  "name" : "foo",
  "result" : "javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: org.sonatype.nexus.script.plugin.internal.provisioning.RepositoryApiImpl.createAptHosted() is applicable for argument types: (java.lang.String, java.lang.String) values: [test, deb_packages]\nPossible solutions: createNpmHosted(java.lang.String, java.lang.String), createHosted(java.lang.String, java.lang.String), createNpmHosted(java.lang.String), createNpmHosted(java.lang.String, java.lang.String, boolean), createRawHosted(java.lang.String, java.lang.String), createYumHosted(java.lang.String, java.lang.String)"
}

The error suggests some alternatives but "createAptHosted" is not among them, which makes me think that this is a dead end. Or are we missing something?

We're using Nexus Repository Manager OSS 3.11.0-01 and nexus-repository-apt 1.0.7.

Thank you,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.