#547 SourceURL addition/clarification - Git Hosting Services
Closed: Fixed None Opened 8 years ago by gbcox.

I'd like to propose the following modifications:

  1. Change GitHub section to reflect Git Hosting Services, so as not to tie the guideline to a specific service
  2. Include information on how to handle Git Submodules
  3. Clarify when hash commit vs. Git Tag should be used

There appears to be a bit of confusion regarding hash commit vs.
Git Tag which I've tried to clarify by going to what I believe
is the root cause of the issue: upstream ignorance

I reached my conclusion based upon reviewing:
https://fedorahosted.org/fpc/ticket/233;
upon the discussion on re-tagging
here: https://git-scm.com/docs/git-tag and
input from some very useful comments from the packaging list.

Here is the link to my Draft document:
https://fedoraproject.org/wiki/User:Gbcox/PackagingDrafts/SourceURL

If I've posted this in the wrong place, let me know and I'll move it.

This probably shouldn't be discussed until the meeting of 2-July at the earliest, to give people time to read and consider it. Thank you.


I've been reading this too much... it's commit hash, not hash commit. Apparently, I'm a bit dyslexic. ;-) The document uses the correct phrase.

When I first opened this ticket, I had forgot to delete this statement that is in the current guideline: "Keep in mind that Git tarballs are generated on-demand, so their modification dates will vary and cause checksum tests to fail. Reviewers will need to use diff -r to verify the tarballs."

I have discovered that this does not apply to commit hash or Git Tag generated archives. Since those are the methods we discuss in the guideline it is misleading to keep this statement. I also tested it myself using fedora-review. The checksum does indeed match. You can read about it here: http://git-scm.com/docs/git-archive

While I'm in the weeds a bit discussing the Draft, I thought it might be helpful to highlight at a high level the other changes from the version now in effect that weren't
clear from the initial post:

  1. Cleanup of link appearance to be consistent throughout the document
  2. Change in method to obtain commit hash without needing to know the specific tag. Provided an approach that can be used regardless of the Git Hosting Service being used
  3. Clarified the numeric identifier used in the Source macro should match back to what is used with shortcommit and commit

Here is a link which gives a diff of the draft to the original version:
https://fedoraproject.org/w/index.php?title=User%3AGbcox%2FPackagingDrafts%2FSourceURL&diff=416463&oldid=416169

If this isn't what you were looking for, let me know and I'll try to provide what you need.

Thanks again.

I've made some changes to the draft based upon comments. Here is the new diff:
https://fedoraproject.org/w/index.php?title=User%3AGbcox%2FPackagingDrafts%2FSourceURL&diff=416905&oldid=416169

  1. I've removed all references to re-tagging. Based on the comments, IMO it was adding unnecessary complexity and controversy by discussing something that due to Git improvements isn't worth the effort and/or would be effectively "too small to care".
  2. Added GitLab examples
  3. Clarified submodule methods

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2015-07-02/fpc.2015-07-02-16.00.txt):

Announcement text:

The guidelines for referencing upstream source were overhauled to include more information about git hosting services.

The complicated part with submodule initialization is not explicitly needed with help from the --recursive parameter.

Please change:

{{{

git clone http://HOSTING-SERVICE/OWNER/%{name}.git

cd %{name}

git submodule init

git submodule update

cd ..

}}}

to:

{{{

git clone --recursive http://HOSTING-SERVICE/OWNER/%{name}.git

}}}

Tested with github/psi-im/psi that has two submodules iris and src/libpsi in those folders.

{{{

env LC_ALL=C git clone --recursive https://github.com/psi-im/psi.git
Cloning into 'psi'...
remote: Counting objects: 18359, done.
remote: Total 18359 (delta 0), reused 0 (delta 0), pack-reused 18359
Receiving objects: 100% (18359/18359), 12.90 MiB | 4.84 MiB/s, done.
Resolving deltas: 100% (12812/12812), done.
Checking connectivity... done.
Submodule 'iris' (git://github.com/psi-im/iris.git) registered for path 'iris'
Submodule 'src/libpsi' (git://github.com/psi-im/libpsi.git) registered for path 'src/libpsi'
Cloning into 'iris'...
remote: Counting objects: 4536, done.
remote: Total 4536 (delta 0), reused 0 (delta 0), pack-reused 4536
Receiving objects: 100% (4536/4536), 2.01 MiB | 1.25 MiB/s, done.
Resolving deltas: 100% (2481/2481), done.
Checking connectivity... done.
Submodule path 'iris': checked out '3519b74f33a143682e4f0335dd0d416519699554'
Cloning into 'src/libpsi'...
remote: Counting objects: 515, done.
remote: Total 515 (delta 0), reused 0 (delta 0), pack-reused 515
Receiving objects: 100% (515/515), 206.60 KiB | 0 bytes/s, done.
Resolving deltas: 100% (274/274), done.
Checking connectivity... done.
Submodule path 'src/libpsi': checked out '842eb89961ca950e03d44470f897cddf0c5e87df'
}}}

Replying to [comment:10 raphgro]:

Tested with github/psi-im/psi that has two submodules iris and src/libpsi in those folders.

I believe this would be a good idea. The only thing I would ask before it be made is that testing be done also with bitbucket and gitlab; since the doc has been written to be vendor neutral. I can't imagine why it wouldn't work, but would be a good idea to test prior to making the change.

This would have been much better as a new ticket.

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2015-12-17/fpc.2015-12-17-17.00.txt):

  • 547 SourceURL addition/clarification - Submodules (geppetto,


    17:04:36)
  • LINK: https://fedorahosted.org/fpc/ticket/547 (geppetto, 17:04:47)
  • ACTION: SourceURL addition/clarification - Submodules (+1:7, 0:0,
    -1:0) (geppetto, 17:20:31)

Announcement text:

The submodules section of the SourceURL guideline page was simplified to use git --recursive.
https://fedoraproject.org/wiki/Packaging:SourceURL#Git_Submodules
https://fedorahosted.org/fpc/ticket/547

Metadata Update from @gbcox:
- Issue assigned to tibbs

7 years ago

Login to comment on this ticket.

Metadata