Giter VIP home page Giter VIP logo

offlinebrew's Introduction

offlinebrew

Offlinebrew is a collection of tools for running Homebrew in offline environments.

Overview

Homebrew requires an active internet connection for most actions. Offlinebrew circumvents this requirement.

Status

The cache_based/ directory contains an initial approach, based on spoofing HOMEBREW_CACHE.

The mirror/ directory will contain a more complete approach, based on URL rewriting (enabling redirection to a local host).

offlinebrew's People

Contributors

woodruffw avatar

Stargazers

 avatar STYLIANOS IORDANIS avatar Cloudflying avatar Fredrik Dahlgren avatar

Watchers

 avatar Fredrik Dahlgren avatar alicia avatar Jay Little avatar hyper avatar James Cloos avatar Alex Groce avatar feliam avatar  avatar Will Song avatar David Pokora avatar Nick Selby avatar Trent Brunson avatar Alex Useche avatar John Dunlap avatar  avatar Kelly Kaoudis avatar Tarun Bansal avatar  avatar Priyanka Bose avatar JP Smith avatar David Coursey avatar Josh Watson avatar Johanna Ratliff avatar Henrich Lauko avatar Broccolirob avatar Greg Otto avatar James Wang avatar Gabrielle Beck avatar Marc Ilunga avatar rmi7 avatar alan avatar Talley Amir avatar Damilola Edwards avatar Jaime Iglesias avatar  avatar

offlinebrew's Issues

`brew-mirror -f` should do dependency resolution

Added -f/--formulae FORMULAE to make the mirroring of individual package/resource trees simpler.

It doesn't do dependency resolution, though, which makes it easy to accidentally only mirror the toplevel package + resources. Just grabbing Formula#deps should be sufficient.

Mirroring approach

  1. Download all stable source packages, resources, and external patches, saving them with unique pathnames (Homebrew gives use the SHA256 of everything, so proto://checksum.ext is probably easiest).
    1. Exclude packages that can't be mirrored over HTTP(S). For the time being, this just means SVN.
  2. Wrap Homebrew so that:
    1. All urls are rewritten to the local mirror
    2. All download strategies are rewritten to CurlDownloadStrategy or GitDownloadStrategy

Handle shallow `git` clones

There are a few different problems associated with "shallow" git clones (i.e., git clone --depth 1):

  1. Dumb HTTP mirrors can't serve them (we circumvent this during mirror fetches by stripping --depth and the trailing depth, see b83e48b)
  2. brew fetches them by default for a few domains:
  SHALLOW_CLONE_WHITELIST = [
    %r{git://},
    %r{https://github\.com},
    %r{http://git\.sv\.gnu\.org},
    %r{http://llvm\.org},
  ].freeze

This then causes us to mirror the shallow clone, which then explodes when we try to fetch it.

Candidate solutions:

  • Add some extra git magic to prep_location! to unshallow our mirrored repos
  • Add/extend the git shim to remove shallow clone functionality during the mirroring process

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.