Giter VIP home page Giter VIP logo

gentoo-binhost's Introduction

gentoo binhost

Providing gentoo binary packages using github infrastructure.

gentoo-logo

This repo provides various gentoo binary packages for a variety of different architectures (checkout branches for details). This branch contains the script that is used for GitHub upload.

Concept

The package upload is realized using a small upload script thats executed via portage hooks. For every package that is being merged via portage the Gentoo Packages manifest file is committed to Git. The binary packages itself are not stored into repository there are uploaded as GitHub release artifacts.

To make everything work the following nomenclature has to apply:

Gentoo idiom GitHub entity
CATEGORY GitHub release
PF GitHub release asset
CHOST Git branch name
CHOST/CATEGORY Git release tag

Usage

Setup a gentoo binhost Github and provide the following.

Dependencies

The upload script uses Python3 and PyGithub module.

emerge dev-python/PyGithub

Configuration

github upload can be easily configured.

make.conf

Enable gentoo binhost by adding the following lines.

# enable binhost
PORTAGE_BINHOST_HEADER_URI="https://github.com/spreequalle/gentoo-binhost/releases/download/${CHOST}"
FEATURES="${FEATURES} buildpkg"
USE="${USE} bindist"
ACCEPT_LICENSE="-* @BINARY-REDISTRIBUTABLE"

Since github releases are used to store the packages PORTAGE_BINHOST_HEADER_URI has to be set here.

bashrc

Add the /etc/portage/bashrc file below, if you use your own file make sure to call the gh-upload.py script during postinst phase.

#!/bin/env bash

if [[ ${EBUILD_PHASE} == 'postinst' ]]; then
  # FIXME come up with a more sophisticated approach to detect if binary package build is actually requested
  # commandline args like -B or --buildpkg-exclude and other conditionals are not supported right now.
  grep -q 'buildpkg' <<< {$PORTAGE_FEATURES}
  if [ $? -eq 0 ]; then
    /etc/portage/binhost/gh-upload.py
  fi
fi

gh-upload.py

Add the /etc/portage/binhost/gh-upload.py script and add your github settings accordingly. You need to create a github access token that is able to access repository and create releases.

gh_repo = 'spreequalle/gentoo-binhost'
gh_token = '<your github access token>'

Disclaimer

Although this software is released under JSON license, the binary packages come with their respective license according to Packages Manifest file. Refer to gentoo license for details.

gentoo-binhost's People

Contributors

coldnew avatar spreequalle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.