Great guide and references. Thanks, Michael and Michal.

Iñaki

El mié., 10 ene. 2024 13:41, Michal Schorm <mschorm@redhat.com> escribió:
On Wed, Jan 10, 2024 at 12:14 PM Michael J Gruber <mjg@fedoraproject.org> wrote:
> Alternatively, we (used to?) have several packages which need to clean
> upstream sources before even committing them to the lookaside cache.

I do it for MariaDB for example, deleting part of the sources under
unapproved licenses:
  https://src.fedoraproject.org/rpms/mariadb/blob/rawhide/f/generate-modified-sources.sh

Michal

--

Michal Schorm
Software Engineer
Core Services - Databases Team
Red Hat

--

On Wed, Jan 10, 2024 at 12:14 PM Michael J Gruber <mjg@fedoraproject.org> wrote:
>
> Am Mi., 10. Jan. 2024 um 11:39 Uhr schrieb Iñaki Ucar <iucar@fedoraproject.org>:
> >
> > Hi,
> >
> > A package has its source code embedded as a subdirectory of a larger
> > piece of software. Sometimes they publish this subdirectory as a
> > separate tar as a release artifact, but sometimes they forget.
> >
> > To avoid depending on their memory (and opening an issue each time), I
> > would like to simply download the full repo and produce the tar
> > myself. How should I deal with this in the spec? (Note: building this
> > subdir as a subpackage in the main one is not a good idea in this
> > case, it's not an option).
>
> Hi,
>
> I assume you don't want to distribute the full tar and simply cd into
> it the proper subdir during the build? That would be the easiest
> solution.
>
> Alternatively, we (used to?) have several packages which need to clean
> upstream sources before even committing them to the lookaside cache.
> scribus comes to my mind, some crypto things were like that in the
> past. What you typically do is:
> - Write a simple script which mangles the upstream package.tar and
> repackages it as package-free.tar or such.
> - Add the script to dist-git.
> - comment out the original source line in spec (and the signature if present)
> - specify "source: package-free.tar" instead and comment on the use of
> the script
> - commit only package-free.tar to dist-git
>
> That way, everyone can reproduce the used source code from the
> upstream source code if needed while we only have the actual used
> source in dist-git (lookaside).
>
> Michael
> --
> _______________________________________________
> devel mailing list -- devel@lists.fedoraproject.org
> To unsubscribe send an email to devel-leave@lists.fedoraproject.org
> 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@lists.fedoraproject.org
> Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
--
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-leave@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue