I'm trying to figure out the best way to handle the situation where a project decides to use submodules in Git. The archive generated doesn't incorporate the submodule files.
I've done some searching on this, and haven't really come up with much. I've reviewed: Packaging:Github https://fedoraproject.org/wiki/Packaging:SourceURL?rd=Packaging/SourceURL#Github
; but that really doesn't address the submodule issue.
I looked through some packages that are currently in the Fedora repository and found where a few folks have rebuilt the tarball and referenced that version as the Source in the spec file; then they put in a comment stating:
The source of this package was pulled from upstreams' vcs. Use the following commands to generate the tarball: ... - git clone ... - git submodule init - git submodule update ...
This approach is the best that I've found. Any other suggestions?
Thanks much!
On 13.06.2015 04:33, Gerald B. Cox wrote:
I'm trying to figure out the best way to handle the situation where a project decides to use submodules in Git. The archive generated doesn't incorporate the submodule files.
I've done some searching on this, and haven't really come up with much. I've reviewed: Packaging:Github https://fedoraproject.org/wiki/Packaging:SourceURL?rd=Packaging/SourceURL#Github
; but that really doesn't address the submodule issue.
I looked through some packages that are currently in the Fedora repository and found where a few folks have rebuilt the tarball and referenced that version as the Source in the spec file; then they put in a comment stating:
The source of this package was pulled from upstreams' vcs. Use the following commands to generate the tarball: ...
- git clone
...
- git submodule init
- git submodule update
...
This approach is the best that I've found. Any other suggestions?
Thanks much!
Hi.
I think the approach used in the existing packages ~ to rebuild the source tarball is a valid solution.
You may want to file a FPC ticket [1] describing the situation, so that FPC may potentially change the Packaging guidelines to include some note on git submodules. If you have some proposed draft of the change (e.g. describing the current approach used in other packages) I think it is a good idea to include it.
[1] https://fedorahosted.org/fpc/
Regards, Tomas
On Wed, 2015-06-17 at 09:24 +0200, Tomas Hozza wrote:
I'm trying to figure out the best way to handle the situation where
a
project decides to use submodules in Git. The archive generated
doesn't
incorporate the submodule files.
Maybe this is a GitHub-specific problem. If the submodule files are not present in the archive, then archive cannot be intended to be used -- it's just a consequence of pushing a tag to GitHub that a tarball of the repo contents gets automatically generated.
Projects that host real tarball releases (anything you get from GNOME, for example) will include the submodule in the archive.
On Wed, Jun 17, 2015 at 9:16 AM, Michael Catanzaro mcatanzaro@gnome.org wrote:
Maybe this is a GitHub-specific problem. If the submodule files are not present in the archive, then archive cannot be intended to be used
I searched and found many people were complaining about it a few years ago... and I read a few references about Github considering to fix it, but AFAIK no real action has been taken. I believe probably because it isn't a very popular feature; they just don't care to deal with it.
I haven't seen any posts that really sing it's praises; and more than a few that detest it.
Personally, I think it's more trouble than it's worth, but if upstream decides to use it for what ever the reason, it's their project and I'll deal with it.
On Fri, Jun 12, 2015, at 10:33 PM, Gerald B. Cox wrote:
I'm trying to figure out the best way to handle the situation where a project decides to use submodules in Git. The archive generated doesn't incorporate the submodule files.
My projects copy around some code to recursively archive.
https://github.com/cgwalters/rpm-ostree/blob/master/packaging/make-git-snaps...
Which I use in Fedora: http://pkgs.fedoraproject.org/cgit/rpm-ostree.git/tree/rpm-ostree.spec#n6
I also have a higher level system which supports recursive mirroring of git repositories with submodules, building multiple RPMs using mockchain:
https://github.com/cgwalters/rpmdistro-gitoverlay%5B1]
Links:
1. https://github.com/cgwalters/rpmdistro-gitoverlay/blob/master/rdgo/git.py
Hi,
On Qua, 2015-06-17 at 12:43 -0400, Colin Walters wrote:
On Fri, Jun 12, 2015, at 10:33 PM, Gerald B. Cox wrote:
I'm trying to figure out the best way to handle the situation where a project decides to use submodules in Git. The archive generated doesn't incorporate the submodule files.
My projects copy around some code to recursively archive.
https://github.com/cgwalters/rpm-ostree/blob/master/packaging/make-git-snaps...
It is better than my: http://stackoverflow.com/a/27350882/778517
IMHO should be documented on wiki
Which I use in Fedora:
http://pkgs.fedoraproject.org/cgit/rpm-ostree.git/tree/rpm-ostree.spec#n6
I also have a higher level system which supports recursive mirroring
of git repositories with submodules, building multiple RPMs using mockchain:
https://github.com/cgwalters/rpmdistro-gitoverlay
-- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
On Wed, Jun 17, 2015 at 9:43 AM, Colin Walters walters@verbum.org wrote:
My projects copy around some code to recursively archive.
Thanks Colin, I'll take a look. I plan on documenting all the various working methods that come up in this thread and submitting them to FPC for their consideration.
I'll also post here first for comment before I spin their wheels.
On Wed, Jun 17, 2015 at 10:03 AM, Gerald B. Cox gbcox@bzb.us wrote:
I'll also post here first for comment before I spin their wheels.
Here is the URL for my changes to the SourceURL guideline. I'm interested in comments before I submit to FPC.
Thanks!
https://fedoraproject.org/wiki/User:Gbcox/PackagingDrafts/SourceURL
Gerald B. Cox wrote:
I'm trying to figure out the best way to handle the situation where a project decides to use submodules in Git. The archive generated doesn't incorporate the submodule files.
I just generated a separate package for the submodule and added it as a Source1 (which is unpacked separately in %prep): http://pkgs.fedoraproject.org/cgit/calamares.git/tree/calamares.spec?id=8c7e...
Kevin Kofler
Thanks Kevin,
I'm working on a draft to add submodule examples to the guidelines. That was helpful. I appreciate you taking the time to post.
On Sun, Jun 28, 2015 at 3:48 PM, Kevin Kofler kevin.kofler@chello.at wrote:
Gerald B. Cox wrote:
I'm trying to figure out the best way to handle the situation where a project decides to use submodules in Git. The archive generated doesn't incorporate the submodule files.
I just generated a separate package for the submodule and added it as a Source1 (which is unpacked separately in %prep):
http://pkgs.fedoraproject.org/cgit/calamares.git/tree/calamares.spec?id=8c7e...
Kevin Kofler
-- devel mailing list devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Hello, I found out this old thread while searching for Fedora packaging guidelines for Git submodules. Are there any news about guidelines on how to deal with them? I could not find any information on docs.fedoraproject.org I am currently dealing with this submodule https://github.com/web-eid/web-eid-app/tree/main/lib I think I should just treat it as a bundled library and trying to unbundle it by creating a separate package
On Tue, Nov 12, 2024 at 09:29:02AM -0000, Germano Massullo wrote:
Hello, I found out this old thread while searching for Fedora packaging guidelines for Git submodules. Are there any news about guidelines on how to deal with them? I could not find any information on docs.fedoraproject.org I am currently dealing with this submodule https://github.com/web-eid/web-eid-app/tree/main/lib I think I should just treat it as a bundled library and trying to unbundle it by creating a separate package
Whether upstream has used a git submodule, vs deep copying the 3rd party code into their repo, is largely irrelevant to Fedora, as we're not working directly with upstream git repositories, we're using tarballs in the RPM build.
IOW, if the 3rd party code ends up in the source tarball that Fedora is building from, then the "bundled library" packaging guidelines apply. Even if the git submodule code ends up in separate source tarballs, to be used alongside the main source tarball, the "bundled library" guidelines should still apply.
With regards, Daniel