{"id":20405913,"url":"https://github.com/coldnew/gentoo-binhost","last_synced_at":"2025-04-12T15:05:49.653Z","repository":{"id":38247394,"uuid":"342572195","full_name":"coldnew/gentoo-binhost","owner":"coldnew","description":"Provide Gentoo binhosts using github infrastructure ","archived":false,"fork":false,"pushed_at":"2025-03-24T02:16:39.000Z","size":2199213,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T15:05:25.928Z","etag":null,"topics":["aarch64","binhost","gentoo","gentoo-binhost","x86","x86-64","xpak"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coldnew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-02-26T12:41:05.000Z","updated_at":"2025-02-11T23:13:59.000Z","dependencies_parsed_at":"2023-02-12T13:47:44.860Z","dependency_job_id":"b973b8b8-64cf-4dcf-9ab1-f27b7187aa04","html_url":"https://github.com/coldnew/gentoo-binhost","commit_stats":null,"previous_names":[],"tags_count":4168,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Fgentoo-binhost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Fgentoo-binhost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Fgentoo-binhost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coldnew%2Fgentoo-binhost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coldnew","download_url":"https://codeload.github.com/coldnew/gentoo-binhost/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586235,"owners_count":21128997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aarch64","binhost","gentoo","gentoo-binhost","x86","x86-64","xpak"],"created_at":"2024-11-15T05:13:51.023Z","updated_at":"2025-04-12T15:05:49.616Z","avatar_url":"https://github.com/coldnew.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gentoo binhost\n\nProviding [gentoo](https://gentoo.org/) binary packages using [github](https://github.com/) infrastructure.\n\n\u003cdiv style=\"display: inline\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/wiki/spreequalle/gentoo-binhost/images/gentoo-logo.png\" alt=\"gentoo-logo\" width=\"160\" /\u003e\u003c/div\u003e\n\nThis repo provides various gentoo [binary packages](https://wiki.gentoo.org/wiki/Binary_package_guide) for a variety of different architectures (checkout branches for details). This branch contains the script that is used for GitHub upload.\n\n## Concept\n\nThe package upload is realized using a small upload script thats executed via portage [hooks](https://wiki.gentoo.org/wiki//etc/portage/bashrc). 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](https://developer.github.com/v3/repos/releases) artifacts.\n\nTo make everything work the following nomenclature has to apply:\n\nGentoo idiom|GitHub entity\n------------|-------------\n[CATEGORY](https://wiki.gentoo.org/wiki//etc/portage/categories)|GitHub release\n[PF](https://devmanual.gentoo.org/ebuild-writing/variables/)|GitHub release asset\n[CHOST](https://wiki.gentoo.org/wiki/CHOST)|Git branch name\n[CHOST](https://wiki.gentoo.org/wiki/CHOST)/[CATEGORY](https://wiki.gentoo.org/wiki//etc/portage/categories)|Git release tag\n\n## Usage\n\nSetup a gentoo binhost Github and provide the following.\n\n### Dependencies\n\nThe upload script uses Python3 and [PyGithub](https://github.com/PyGithub/PyGithub) module.\n\n```shell\nemerge dev-python/PyGithub\n```\n\n### Configuration\n\ngithub upload can be easily configured.\n\n#### make.conf\n\nEnable gentoo binhost by adding the following lines.\n```python\n# enable binhost\nPORTAGE_BINHOST_HEADER_URI=\"https://github.com/coldnew/gentoo-binhost/releases/download/${CHOST}\"\nFEATURES=\"${FEATURES} buildpkg\"\nUSE=\"${USE} bindist\"\nACCEPT_LICENSE=\"-* @BINARY-REDISTRIBUTABLE\"\n```\n\nSince github releases are used to store the packages *PORTAGE_BINHOST_HEADER_URI* has to be set here.\n\n#### bashrc\n\nAdd the [/etc/portage/bashrc ](https://wiki.gentoo.org/wiki//etc/portage/bashrc) file below, if you use your own file make sure to call the **gh-upload.py** script during **postinst** phase.\n\n```bash\n#!/bin/env bash\n\nif [[ ${EBUILD_PHASE} == 'postinst' ]]; then\n  # FIXME come up with a more sophisticated approach to detect if binary package build is actually requested\n  # commandline args like -B or --buildpkg-exclude and other conditionals are not supported right now.\n  grep -q 'buildpkg' \u003c\u003c\u003c {$PORTAGE_FEATURES}\n  if [ $? -eq 0 ]; then\n    /etc/portage/binhost/gh-upload.py\n  fi\nfi\n```\n\n#### gh-upload.py\n\nAdd the [/etc/portage/binhost/gh-upload.py](/etc/portage/binhost/gh-upload.py) script and add your github settings accordingly.\nYou need to create a [github access token](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) that is able to access repository and create releases.\n\n```python\ngh_repo = 'coldnew/gentoo-binhost'\ngh_token = '\u003cyour github access token\u003e'\n```\n\n## Disclaimer\n\nAlthough this software is released under [JSON](/LICENSE) license, the binary packages come with their respective license according to *Packages* Manifest file. Refer to [gentoo license](https://devmanual.gentoo.org/general-concepts/licenses/index.html) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldnew%2Fgentoo-binhost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoldnew%2Fgentoo-binhost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoldnew%2Fgentoo-binhost/lists"}