{"id":27300893,"url":"https://github.com/spreequalle/gentoo-binhost","last_synced_at":"2025-04-12T01:27:22.094Z","repository":{"id":37334421,"uuid":"215338853","full_name":"spreequalle/gentoo-binhost","owner":"spreequalle","description":"Provide Gentoo binhosts using github infrastructure","archived":false,"fork":false,"pushed_at":"2024-03-23T04:23:26.000Z","size":2010155,"stargazers_count":26,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-24T00:15:26.704Z","etag":null,"topics":["aarch64","armv4","armv5","armv6","armv7","binhost","gentoo","gentoo-binhost","mips32","musl-libc","packages","portage","powerpc","ppc","x86-64"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/spreequalle.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}},"created_at":"2019-10-15T15:55:48.000Z","updated_at":"2024-03-21T16:40:37.000Z","dependencies_parsed_at":"2023-10-30T08:35:39.941Z","dependency_job_id":"b7038771-2169-4900-a52f-d17b701750d4","html_url":"https://github.com/spreequalle/gentoo-binhost","commit_stats":null,"previous_names":[],"tags_count":436,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spreequalle%2Fgentoo-binhost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spreequalle%2Fgentoo-binhost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spreequalle%2Fgentoo-binhost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spreequalle%2Fgentoo-binhost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spreequalle","download_url":"https://codeload.github.com/spreequalle/gentoo-binhost/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248503402,"owners_count":21114990,"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","armv4","armv5","armv6","armv7","binhost","gentoo","gentoo-binhost","mips32","musl-libc","packages","portage","powerpc","ppc","x86-64"],"created_at":"2025-04-12T01:27:21.485Z","updated_at":"2025-04-12T01:27:22.083Z","avatar_url":"https://github.com/spreequalle.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/spreequalle/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 = 'spreequalle/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%2Fspreequalle%2Fgentoo-binhost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspreequalle%2Fgentoo-binhost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspreequalle%2Fgentoo-binhost/lists"}