On Mon, Apr 25, 2022 at 2:46 PM Vitaly Zaitsev via devel <devel@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > > On 25/04/2022 13:42, Fabio Valentini wrote: > > For example, we could use something like: > > # SourceScript: gen_clean_tarball.sh > > Source1: gen_clean_tarball.sh Well, doing that alone wouldn't work. How would the program know if this Source is one that should be executed, or not? So, even if the script is included as a Source file for the SRPM, we'd still need to specify *which* file to actually execute (if any). Which is why I suggested to use a marker comment like "# SourceScript: foo.sh". > > That would make it easy for spectool to parse this information from > > the .spec file, and then execute the program with that name. > > Can be easily parsed even with regular expression. Sure. script_path = if line.startswith("# SourceScript:"): line.split(" \t")[1] That's not a problem. But we still need to specify *which* source file is actually the script to run (if any). Fabio _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure