Running a command before source package build

Asked by Mihai Moldovan on 2021-05-04

I'd like to build a package off a git repository without a control file, or more specifically, generate the control file before the source package is generated.

In sbuild terms, I'd like to run a script such as `cd %b; debian/rules control` via --chroot-setup-commands for the source package (only). Running the command in the chroot is important for the environment (and the only sane thing to do anyway, for security reasons.) The actual building the generated source package won't need any special hooks.

Is something like this supported at all?

Alternatives exist, but I'm not keen on using those. Essentially, I could manually make sure that the control file is always up-to-date on a different branch and use that for building on Launchpad, but that means a lot of additional overhead (since every push to a build branch would need a merge to the launchpad build branch as well).

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Tom Wardill (twom) said :
#1

Hi,
I'm afraid this currently isn't possible as we don't support the `run` command in build-recipe. The merging approach is what has been used in the past, but we're aware it's not ideal.

Sorry about that.
Tom

Can you help with this problem?

Provide an answer of your own, or ask Mihai Moldovan for more information if necessary.

To post a message you must log in.