Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpmVendor not honored #764

Closed
darkfrog26 opened this issue Apr 1, 2016 · 6 comments
Closed

rpmVendor not honored #764

darkfrog26 opened this issue Apr 1, 2016 · 6 comments

Comments

@darkfrog26
Copy link

I am using 1.1.0-RC2 and setting rpmVendor := "outr", but when I try to build the RPM I get the following output:

[info] Using default package resource [menu icon] (add package/linux/appmanager-app.png to the class path to customize) [info] Using default package resource [Menu shortcut descriptor] (add package/linux/appmanager-app.desktop to the class path to customize) [info] Using default package resource [RPM spec file] (add package/linux/appmanager-app.spec to the class path to customize) [info] error: line 6: Empty tag: Vendor: java.io.IOException: Exec failed with code 1 command [[rpmbuild, -bb, /tmp/fxbundler7159953050073389373/images/linux-rpm.image/appmanager-app.spec, --define, %_sourcedir /tmp/fxbundler7159953050073389373/images/linux-rpm.image, --define, %_rpmdir /home/mhicks/projects/open-source/app-manager/app/target/jdkpackager/bundles, --define, %_topdir /tmp/fxbundler7159953050073389373/rmpbuildroot] in /tmp/fxbundler7159953050073389373/images/linux-rpm.image

I checked the file and Vendor is indeed blank.

@muuki88
Copy link
Contributor

muuki88 commented Apr 3, 2016

Thanks for you bug report. Your report is missing some important details, e.g. what command do you use to produce the package and a small build.sbt to reproduce this.

From your description I guess that you are using jdkpackager:packageBin and not rpm:packageBin. The rpmVendor setting is part of the RpmPlugin, which is another packaging plugin. jdkPackager uses it's own settings and has different configurations.

@darkfrog26
Copy link
Author

You are correct, but I can find no documentation to state where vendor should be specified in the jdkpacker.

@darkfrog26
Copy link
Author

Apparently maintainer is what is used to determine Vendor in jdkpackager. I think this should be considered a bug as required keys should fail the build if not provided before calling off to jdkpackager.

@muuki88
Copy link
Contributor

muuki88 commented Apr 4, 2016

For other format plugins, this would be correct. JdkPackager is only a wrapper for the java8 packaging tool. The validation should be done on this side.

Unfortunately there wasn't any contribution or time to add a generic validatePackageConfiguration task for all plugins. The DebianPlugin has some validation, but I think this is the only format.

@muuki88 muuki88 closed this as completed Apr 4, 2016
@darkfrog26
Copy link
Author

I have to disagree with you there. If you're going to take the time to wrap and expose keys in SBT to configure it, then it should provide the validation to make sure that required keys are properly input.

@muuki88
Copy link
Contributor

muuki88 commented Apr 4, 2016

The rpmVendor setting is defined by the RpmPlugin. The JdkPackagerPlugin will never use this key, as both plugins wrap two completely different build tools.

Validation is a maintenance effort, we were not sure we have the resources for. You have to answer the following question for all packging formats

  • What has to be validated?
  • What are the constraints?
  • Differ these constraints from version to version?
  • Are my constraints up-to-date?

Native-packager acts more as an orchestrator for your build. It takes your build, puts everything in the correct space, creates the necessary configuration for the package format you choose and then invokes the specific build tool (javapackage, docker, rpmbuild, dpkg-build, etc. ). We delegate everything to the build tool we invoke.

Some build tools provide better error messages than others. IMHO if there is some configuration missing, the build tool that gets invoke should validate its settings and report it. Native-packager can only lift this reporting one level up. However this will always be uncomplete, outdated or maybe wrong.

We try to make generating your packages as easy as possible, but we cannot take the burden of understanding your package format and the system you want to deploy on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants