Skip to content

necrose99/gentoo-binhost

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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/necrose99/gentoo-binhost/releases/download/${CHOST}"
Our local fork.

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

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>'

Overides gh_branch = 'master' aarch64-coretexa53-linux-gnu or aarch64-coretexa53-linux-gnu_systemd since i havent an optimized compiler yet made.. 

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.


Active Branches
aarch64-coretexa53-linux-gnu
generic arm64 but generally optomized for
Necrose99
Suited to RPI/Rockpro64/pine-book-Pro gihub.com/pentoo
unofficial aarch64
respins of
https://github.com/sakaki-/gentoo-on-rpi-64bi
else upstream I may add more my own. latter.
https://github.com/spreequalle/gentoo-binhost












SIDE notes.

"bin-host- url-1 +2 " can also be done , on amd64 i offten have sabayon's devs , or Redcore and @Pentoo on binhosts, to get base packages before spec'ing them to my like , tens too be easiey just just add a few features

binhost.conf and sourcing it as an arry into make.conf, has come to mind.
can have multiple urls in "Quotes"

PORTAGE_BINHOST="${BINHOST}"
BINHOST"${BINHOST}" +N
BINHOST2="https://isshoni.org/pi64pie/"
# RPI64 Gentoo https://github.com/sakaki-/gentoo-on-rpi-64bit binhost , i may add or adlib to upstream on my branch ie add pentesting or more features, or binpkg-multi-instance to have more of the same package , but with differing flags.
i had before on the SATA HDD or "dropbox binhost of sneaker-net.." however the xpack feature has pro;s cons, namely it sometimes portage wont see remotely .
however if networkmanger is rebuilt for openrc/then systemd package manager will offer the systemd one to systemd users.. that's be the pro , or differing use flags based on users tastes.

3= etc helps with many many ...
ie nested arrays. old Sabayon make.conf used these to keep uses in make.conf easy to find and edit.


About

Provide Gentoo binhosts using github infrastructure

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 90.7%
  • Shell 9.3%