Question

I need to make a .deb for our software, that includes a copy of Drupal. I've had to patch Drupal, so I can't use the stock Drupal from the distro. I want the outcome to be a file named drupal6-rs_6.16_all.deb, but because in my control file it's a subpackage, it's "inheriting" the version of my main package, so I end up with a package drupal6-rs_6.0.6_all.deb (6.0.6 is the version of our own codebase).

I would prefer to be able to generate the Drupal package from within the same debian/* description, rather than making a separate debian/* subtree for Drupal alone.

Can this be done? I know that with RPM it is possible to override the version of a subpackage, but if I add Version: 6.16 to the subpackage's debian/control header, it (a) highlights differently in vim to the other header entries, and (b) has no effect.

Was it helpful?

Solution

I should RTFM sometimes. Look at man dh_installchangelogs. There's a reason it's got an s suffixed to it!

Yes, it seems you can override the version of a binary package in a multiple-binary source package.

OTHER TIPS

Since there is only one debian/changelog file per source package, I believe there can be only one version per source package. If you look at the Debian Package Tracking System, it always refers to one version number - that of the source package. The binary package(s) that the source package builds, therefore, have the same version number.

This leaves you with two options -

  1. Do things the right way - patch Drupal (maybe with dpatch, as the Drupal package in Debian already uses it) and leave as a separate source package in itself. Put a version number suffix (e.g. 6.17-1yourcompany1). Then make a package for your own software and have your software depend on the Drupal. Now you can depend on drupal6 (=6.17-1yourcompany1) so you know everyone has actually got the patch. Using a personal repository to distribute your software would be a good idea.

  2. The other alternative you have is to use a hacky method. Since you don't want to use a separate debian/ folder, use one. Whether you make two binaries or one (with everything merged into on big package) from the source package, it is up to you to decide which version number you want to use - Drupal's or your codebase's.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top