Giter Site home page Giter Site logo

gentoo-binhost's Introduction

gentoo-binhost

Some notes about how to set up a Gentoo binhost (see [1]) with the help of Gitlab CI.

An instance of this setup is hosted by the author and can be found at https://gentoo.notset.fr/repo/standard/.

Installation

Gitlab Runner

Add gitlab overlay:

$ emerge app-eselect/eselect-repository
$ eselect repository enable gitlab
$ emerge --sync

Emerge gitlab-runner-bin:

$ echo 'dev-util/gitlab-runner-bin ~amd64' > /etc/portage/package.accept_keywords/gitlab-runner
$ emerge dev-util/gitlab-runner-bin

Register runner:

$ /usr/libexec/gitlab-runner/gitlab-runner register
(...)

Allow gitlab-runner user to emerge:

$ echo 'gitlab-runner ALL = NOPASSWD: /usr/bin/emerge' > /etc/sudoers.d/gitlab-runner

Add gitlab-runner to portage group to allow gitlab-runner to copy /var/log/portage:

$ usermod -aG portage gitlab-runner

FIXME: is there a better solution?

Enable and start gitlab-runner:

$ systemctl enable gitlab-runner
$ systemctl start gitlab-runner

Configuration

Profile and packages list can be adapted. Here we use what is provided for Qubes OS Gentoo templates.

Profile and packages list

Flavor Profile Packages list USE flags KEYWORDS
GNOME default/linux/amd64/17.1/desktop/gnome/systemd gnome gnome gnome
XFCE default/linux/amd64/17.1/desktop/gnome/systemd xfce xfce xfce
MINIMAL default/linux/amd64/17.1/systemd minimal minimal minimal

Portage

Add to /etc/portage/make.conf:

FEATURES="buildpkg binpkg-logs clean-logs split-log"
PORTAGE_LOGDIR="/var/log/portage"
PORTAGE_LOGDIR_CLEAN="find \"\${PORTAGE_LOGDIR}\" -type f ! -name \"summary.log*\" -mtime +7 -delete"

Remote host

A remote host is assumed to be configured to allow incoming SSH connections and to serve a web server. Each job will rsync /var/cache/binpkgs to the corresponding remote location per flavor.

Usage

Build updates

From [2], the following command:

$ emerge -uDN @world --quiet-build --buildpkg

is scheduled in order to publish binpkg for every updates.

Full rebuild

On a fully operational Gentoo system (physical of virtual), it may be needed to run the first time, a full rebuild of all packages. In order to do that, we recommend pretending the full rebuild to see if something goes wrong:

$ emerge -pe @world --quiet-build --buildpkg

If no error is noticed:

$ emerge -e @world --quiet-build --buildpkg

NOTSET

On the hosted instance by the author, each Qubes OS gentoo template is used to create three independent binhost as virtual machines. They are registered as Gitlab runners. Artifacts and logs of builds can be found at fepitre-bot/gentoo-binhost.

References

  1. https://wiki.gentoo.org/wiki/Project:Binhost
  2. https://wiki.gentoo.org/wiki/Binary_package_guide.

gentoo-binhost's People

Contributors

fepitre avatar

Stargazers

 avatar

Watchers

 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.