Opened 4 years ago

Closed 3 years ago

Last modified 2 years ago

#8379 closed bug (fixed)

sync-all broken when using the GitHub mirror

Reported by: tibbe Owned by:
Priority: normal Milestone: 8.0.1
Component: Build System Version: 7.7
Keywords: Cc: hvr
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #8667 Differential Rev(s):
Wiki Page:

Description

Making a fresh checkout using the GitHub mirror:

$ git clone git@github.com:tibbe/ghc.git
$ ./sync-all get
== running git config core.ignorecase true
== running git clone git@github.com:tibbe/ghc-tarballs.git ghc-tarballs
Cloning into 'ghc-tarballs'...
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
git failed: 32768 at ./sync-all line 178.
== Checking for old haddock repo
== Checking for old binary repo
== Checking for old mtl repo
== Checking for old Cabal repo
== Checking for old time from tarball
============================
ATTENTION!

You have an old time package in your GHC tree!

Please remove it (e.g. "rm -r libraries/time"), and then run
"./sync-all get" to get the new repository.
============================

Attachments (1)

0001-Explain-how-to-clone-GitHub-forks.-Ticket-8379.patch (2.0 KB) - added by thomie 3 years ago.
Update README.md

Download all attachments as: .zip

Change History (16)

comment:1 Changed 4 years ago by leroux

Oops. This is my fault... Could someone revert 0481e076f3cb4010894324cac71e947c6637805a?

EDIT: Nevermind since this is "sane" and "intended" behavior. Unless otherwise disapprove of it.

Last edited 4 years ago by leroux (previous) (diff)

comment:2 Changed 4 years ago by thoughtpolice

The reason this is happening is because the sync-all script was changed to *properly* clone from GitHub (the original version I wrote was broke.) When you clone from your own fork, it attempts to rewrite submodule URLs to github.com/tibbe/<repo>. You probably don't have these repositories under your account, so it breaks because it can't clone them.

IMO this isn't worth fixing, but perhaps explaining on the wiki - the more 'correct' thing to do (which works) is just always clone/pull from github.com/ghc/ghc and set a remote to point to your forks.

Of course I don't feel very strongly about this and if people want this behavior changed that's fine - but I feel I should point out it sort of didn't work before anyway.

comment:4 Changed 4 years ago by tibbe

Resolution: invalid
Status: newclosed

Makes sense to me.

comment:5 Changed 3 years ago by thomie

Changed 3 years ago by thomie

Update README.md

comment:6 Changed 3 years ago by thomie

Resolution: invalid
Status: closednew

Since more people seem to run into this, someone please update the README. I added a patch.

comment:7 Changed 3 years ago by thomie

Status: newpatch

comment:8 Changed 3 years ago by tibbe

Cc: hvr added

This is now correctly documented at https://ghc.haskell.org/trac/ghc/wiki/Building/GettingTheSources#GettingaGHCrepositoryfromGitHub. Do we also want to keep this info in the README? If so we should fix the docs there too.

comment:9 in reply to:  8 Changed 3 years ago by hvr

Replying to tibbe:

This is now correctly documented at https://ghc.haskell.org/trac/ghc/wiki/Building/GettingTheSources#GettingaGHCrepositoryfromGitHub. Do we also want to keep this info in the README? If so we should fix the docs there too.

I guess so, as one of the major uses of the GitHub mirror is if git.haskell.org is down (in which case the GHC Wiki is probably down too) for some reason. Then you'd want to have some instructions that can be found easy.

comment:10 Changed 3 years ago by Austin Seipp <austin@…>

In 89f5f314e32c3e80c71f4b3dcc8835ae74d7d57f/ghc:

Explain how to clone GitHub forks. Ticket #8379.

This information is mirrored at:
http://ghc.haskell.org/trac/ghc/wiki/Building/GettingTheSources#GettingaGHCrepositoryfromGitHub

Signed-off-by: Austin Seipp <austin@well-typed.com>

comment:11 Changed 3 years ago by thoughtpolice

Milestone: 7.10.1
Resolution: fixed
Status: patchclosed

Merged.

comment:12 Changed 3 years ago by jyrinx

Resolution: fixed
Status: closednew

As far as I can tell, the -r option isn't working:

$ ./sync-all -r git://github.com/ghc get
== running git config core.ignorecase true
== running git submodule init
== running git submodule update
Cloning into 'libffi-tarballs'...
Username for 'https://github.com': lukemaurer
Password for 'https://lukemaurer@github.com': 
remote: Repository not found.
fatal: repository 'https://github.com/lukemaurer/libffi-tarballs.git/' not found
Clone of 'https://github.com/lukemaurer/libffi-tarballs.git' into submodule path 'libffi-tarballs' failed
git failed: 256 at ./sync-all line 112.
== Checking for old haddock repo
== Checking for old binary repo
== Checking for old mtl repo
== Checking for old Cabal repo
== Checking for old time from tarball
== Checking for obsolete Git repository URL

comment:13 Changed 3 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:14 Changed 3 years ago by tibbe

Resolution: fixed
Status: newclosed

sync-all is no longer needed as we're now on an all-git setup with submodules.

comment:15 Changed 2 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

Note: See TracTickets for help on using tickets.