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

Support for multiple packages in control file #219

Open
Eymux opened this issue Oct 2, 2015 · 16 comments
Open

Support for multiple packages in control file #219

Eymux opened this issue Oct 2, 2015 · 16 comments
Milestone

Comments

@Eymux
Copy link

Eymux commented Oct 2, 2015

I have a control file with four separate packages. Each package is separated by an empty line (as per specification).
The parser of the Maven plugin fails with an exception.

Caused by: java.text.ParseException: Empty line
       at org.vafer.jdeb.debian.ControlFile.parse(ControlFile.java:63)
        at org.vafer.jdeb.debian.ControlFile.parse(ControlFile.java:43)
        at org.vafer.jdeb.debian.BinaryPackageControlFile.<init>(BinaryPackageControlFile.java:60)
        at org.vafer.jdeb.ControlBuilder.createPackageControlFile(ControlBuilder.java:177)
        at org.vafer.jdeb.DebMaker.createSignedDeb(DebMaker.java:440)

The control file works fine with the Debian packaging tools. So I think, this is a problem of the jdeb parser.

@ebourg
Copy link
Collaborator

ebourg commented Oct 2, 2015

The control file as used by jdeb is more like the control file of a binary package, it doesn't support multiple paragraphs as used in the control file of a source package.

@Eymux
Copy link
Author

Eymux commented Oct 6, 2015

If the bahviour is on purpose, then there should be a better error message. And it should be documented.

@ebourg
Copy link
Collaborator

ebourg commented Oct 6, 2015

It's documented here with an example. How would you improve the documentation to make this clearer?

@Eymux
Copy link
Author

Eymux commented Oct 8, 2015

The documentation should state clearly, that jdeb only supports a subset of the control file specification. Especially that is doesn't support multiple packages. I can't find that in the current documentation.

@tcurdt
Copy link
Owner

tcurdt commented Oct 8, 2015

@Eymux the spec allows multiple binary packages from one control file?
Can you point me to that part of the spec?

@Eymux
Copy link
Author

Eymux commented Oct 9, 2015

http://people.canonical.com/~cjwatson/ubuntu-policy/policy.html/ch-controlfields.html

A control file consists of one or more paragraphs of fields[33]. The paragraphs are separated by blank
lines. Some control files allow only one paragraph; others allow several, in which case each paragraph
usually refers to a different package. (For example, in source packages, the first paragraph refers to
the source package, and later paragraphs refer to binary packages generated from the source.) 

@tcurdt
Copy link
Owner

tcurdt commented Oct 9, 2015

"Some control files allow only one paragraph; others allow several" sounds we are not really outside of the spec but we should provide better docs and a better error message. Given that jdeb isn't really about source packages I think that's fair.

May I ask why you wanted to create multiple packages with one jdeb control file, @Eymux ?

@Eymux
Copy link
Author

Eymux commented Oct 9, 2015

We're creating several packages from the same sources for different scenarios, that can be installed individually. I already have a control file, that is used with Ant. After switching to Maven, I wanted to get rid of Ant as much as possible. And jdeb is the only Maven plugin for creating Debian packages, I'm aware of. It would have been nice, if jdeb supported source packages.
May I ask, what jdeb is about?

@tcurdt
Copy link
Owner

tcurdt commented Oct 9, 2015

Well, the use case of jdeb has always been binary packages.
I am not really aware of multiple binary packages from one control file.

You are creating source packages or binary packages?

While it would need quite some work I am not opposed to adding support for multi package support.
It certainly could be a feature request for 2.0.

@ebourg
Copy link
Collaborator

ebourg commented Oct 9, 2015

For your migration to Maven, you can consider using the maven-antrun-plugin to build several .deb from the same module.

@Eymux
Copy link
Author

Eymux commented Oct 9, 2015

@tcurdt: As far as I understand it, we're creating a source package and multiple binary packages. The control file is here: https://raw.githubusercontent.com/WollMux/WollMux/master/lhmdeb/control

@ebourg: I'm aware of that. But then I would have to change my control file to work with Maven. That's not trivial.

@tcurdt
Copy link
Owner

tcurdt commented Oct 9, 2015

Well, I only see a few options here:

  • you change your setup
  • you provide a patch
  • you provide funds to implement this

I am a little concerned on how a retrofit into the 1.x branch could look like.
Maven itself isn't particularly great at multiple assets per build in itself IIRC.

This certainly could be added in 2.x but since I currently don't have a customer sponsoring the development that's mostly just plans and vaporware at this stage.

@tcurdt tcurdt added this to the 2.0 milestone Oct 9, 2015
@Eymux
Copy link
Author

Eymux commented Oct 9, 2015

We're already working on a different solution.

I wish I could give you the money to work on this. Maven could use a comprehensive plugin for making Debian packages.

@tcurdt
Copy link
Owner

tcurdt commented Oct 9, 2015

Well, so far most people have been quite happy with jdeb as is :)
I guess it's just that the multi package requirement isn't that common.

@Eymux
Copy link
Author

Eymux commented Oct 9, 2015

It wasn't meant as critisism. jdeb just isn't what I need right now.

@tcurdt
Copy link
Owner

tcurdt commented Oct 9, 2015

@Eymux no worries - all good :)

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

3 participants