satis icon indicating copy to clipboard operation
satis copied to clipboard

Mirror repository

Open kingcrunch opened this issue 12 years ago • 9 comments

Like the current dist-dump [1] it would be nice to clone whole repositories, so that one can act completely indepedent from any external service even when installing dependencies as "source".

  • Reduce latency and traffic
  • Independency
  • As a sideeffect reading the composer.jsons and dumping the dist-files should be much faster when done from the local clone :smile:
  • Includes: Later updates will be much faster, because only a git fetch --all, or svn update (or similar) is required

[1] http://getcomposer.org/doc/articles/handling-private-packages-with-satis.md#downloads

kingcrunch avatar Jun 11 '13 21:06 kingcrunch

Something like https://github.com/khepin/medusa ?

robocoder avatar Jun 18 '13 16:06 robocoder

@Seldaek Any thoughts on merging Medusa into Satis?

robocoder avatar Jun 26 '13 11:06 robocoder

i would like something like this too.

smurfy avatar Jul 25 '13 12:07 smurfy

I don't think mirror git/hg/svn repository is a good idea, because composer is the front-end for those wants to use some package. It may bring unecessary complexity to Satis. Just my opnion for now.

Anyawy, I have same desire as you. I want to build my satis repository faster and provide packages in a private network in a fast way.

Mirros whole repository

It's possible mirror a whole repository, see doc

{
    "require-all": true
}

Archive packages

It's possible also make a archive of them, see doc

{
    "archive": {
        "directory": "dist"
    }
}

Reduce latency

Once a Satis repository uses archive feature, users can use --prefer-dist when calling install/update.

Later updates faster

Satis build command does not re-download packages already in dist directory. Maybe I didn't get your point here.

I've opened a issue to make build faster, see issue https://github.com/composer/composer/issues/2098 and PR https://github.com/composer/composer/pull/2099 trying to make satis build faster.

renanbr avatar Jul 25 '13 13:07 renanbr

Maybe I didn't get your point here.

@renanbr The point (and that makes your whole comment invalid) is, that you think it is about dist-packages. All you mentioned is only valid for this kind of installation, but the source-packages require a repository. What I can do is to clone every repository myself and let satis build from there, but why, if satis could do it for me?

Initially I expected, that satis is able to mirror the repositories, but it can only mirror the dist-packages. That is not bad at all, but kind of incomplete. Especially it doesn't help me for development, where I prefer source-installations (--prefer-source).

It may bring unecessary complexity to Satis.

The last time I looked into the source satis had no complexity at all :smile:

kingcrunch avatar Jul 25 '13 20:07 kingcrunch

[Composer\Downloader\TransportException]
The "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/v2.3.2" file could not be downloaded (HTTP/1.1 500 Internal Server Error)

this is one of the reasons i would like a mirror function. and as kingCrunch i also prefer the source version.

smurfy avatar Jul 26 '13 07:07 smurfy

@KingCrunch and @smurfy, it makes sense, and https://github.com/khepin/medusa is great. How about the usage? Have you thought something that fits in current satis.json style?

renanbr avatar Jul 26 '13 12:07 renanbr

I like the format medua uses in its medusa.json (sample: https://github.com/instaclick/medusa) Its basically the same as satis even more like a composer.json.

I would suggest adding the "require" element to satis and everything in there will be mirrored. (like medusa is doing it)

Edit: Doh, require already exists in satis, but this is quite interesting: https://github.com/instaclick/medusa/issues/1

smurfy avatar Jul 26 '13 17:07 smurfy

bump

I'll give medua a try, though I still think it can make sense to have this in a single tool :wink: It's about "merging contributors", especially since the khepin-repository doesn't seem to be active anymore, so it may break once satis changes something relevant.

kingcrunch avatar May 23 '14 07:05 kingcrunch