Skip to content

Instantly share code, notes, and snippets.

@RafaelPalomar
Last active March 13, 2020 15:56
Show Gist options
  • Save RafaelPalomar/5678dab22b4a1db461e58e59026c3d0a to your computer and use it in GitHub Desktop.
Save RafaelPalomar/5678dab22b4a1db461e58e59026c3d0a to your computer and use it in GitHub Desktop.

Building Sabayon packages

Base Information

<geaaru> __aure__:
	 https://github.com/Sabayon/community-repositories/#structure-of-a-repository
								        [12:43]
<geaaru> for building we now use mottainaici
	 (https://mottainaici.github.io/docs/) and our tasks are available
	 there: https://github.com/Sabayon/sbi-tasks  [12:44]
<geaaru> but there isn't a clean documentation for final users
<__aure__> I see. I will have a look :)  [12:45]
<geaaru> we could avoid use of mottainaici with simple run of the
	 sabayon/builder and execute sark-localbuild script
<geaaru> but mottainaici will do this for you :)
<__aure__> I was also wondering why a simple gentoo binary package wouldn't be
	   enough for sabayon   [12:46]
<__aure__> and now I also wonder...Sabayon packages are built within sabayon
	   or within gentoo? :)  [12:51]
<optiz0r> sabayon packages are built within a gentoo chroot and adorned with
	  additional metadata  [12:57]

Links

The regular way

Avoiding mottainaici

Execute sark-localbuild script https://github.com/Sabayon/sabayon-sark

Using sark- scripts

The philosophy behind using the sark- scripts is that of building a set of packages (possibly a whole overlay) in one go. To do so, a build.yaml is generated (see build.yaml example). This file contains multiple configurations sections dictating the whole building process (emerge configurations, equo configurations, overlays, etc.).

I think the sark- scripts will try to package all the binaries stored in the portage binary directory. Therefore if you are not interested on having other packages (e.g., dependences) in the target repository, you should try to avoid building the binary package of them.

Our approach to use the sark- scripts is:

  1. Create and configure a light-weight stage3-gentoo container using systemd-nspawn.
  2. Adding sabayon and sabayon-distro gentoo overlays.
  3. Install the sabayon packaging ecosystem:
    • equo
    • entropy
    • entropy-server
    • sabayon-sark
  4. Use sark-localbuild to build and
  5. Use sark-localcreaterepo to get the repository structure to be served.

Configuration notes

My gentoo stage3 of choice will be systemd, but I think it does not really matter much. Just make sure to configure the systemd (machine-id, timedatectl, hostnamectl, localectl…see gentoo systemd for more information).

Equo database will need to be initialized for the -sark scripts to work properly!! Just do: equo rescue generate

You might need to change the PKGDIR in make.conf to point to /usr/portage/packages, which is the destination the sark- scripts expect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment