The man page isn't clear on that.

How would I use a signing hook? Especially using the parameter without the config file. What is the meaning of foo in the documentation? For example in --signing-hook-foo? Do I replace foo with my bash script? The would seem very odd and against all conventions that I know.

For example, would this be the way you are supposed to use it?

echo "#!/usr/bin/env bash" > /signing-hook-script.sh
echo "(pwd; ls -la; tree /) > /output.txt" >> /signing-hook-script.sh
chmod +x /signing-hook-script.sh

debuild -i -S --signing-hook-/signing-hook-script.sh

Well spotted, the manpage is incorrect. debuild --help shows the appropriate syntax:

                        These hooks run at the various stages of the
                        dpkg-buildpackage run.  For details, see the
                        debuild manpage.  They default to nothing, and
                        can be reset to nothing with --foo-hook=''

So your example would be

debuild --signing-hook=/signing-hook-script.sh -i -S

(debuild options must be specified before dpkg-buildpackage options).

  • How would one go about correcting the issue with the manpage? – kemotep Nov 21 '18 at 13:21
  • Clone the repository (debcheckout devscripts), edit scripts/debuild.1, and submit the resulting patch using reportbug. (If any of that isn’t clear, ask and I’ll expand my answer.) – Stephen Kitt Nov 21 '18 at 13:35
  • Hm, I get dpkg-buildpackage: error: unknown option or argument --signing-hook=/signing-hook-script.sh when running debuild -i -S --signing-hook=/signing-hook-script.sh. – Forivin Nov 21 '18 at 13:39
  • 1
    Ah yes, see my update. – Stephen Kitt Nov 21 '18 at 13:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.