Project:Binhost/Request new packages

From Gentoo Wiki
Jump to:navigation Jump to:search

To request new packages to the Binhost project then these steps should be followed to allow quick additions with minimal disappointment.

Decide on the package

First think of a package that should be included in the binhost. The first questions you should ask yourself are:

1. Will the package improve the Binhost for everyone or will it just improve it for yourself?
2. Are there any open bugs which will cause the Binhost issues?

Ask if it will be accepted

There is no point doing the work if the Binhost project members aren't interested in the package.

Visit #gentoo-binhost (webchat) and politely ask if the package would be accepted and the reasoning for why it will improve the Binhost offerings in Gentoo.

Note
This guide will use sys-boot/grub as an example package from this point on.

"Hello, I would like to add the package grub to the Binhost. I find it strange we don't include the basic tools listed in the Handbook, even if it is a rather small package."

Wait for a reply and possibly for some questioning on the reasoning.

USE flag testing

The Binhost builder builds for four main types of profiles to cover a wide range of USE flags and to allow all users to be able to use the binpkg.

The three profiles we will test for are:

  • default/linux/amd64/23.0
  • default/linux/amd64/23.0/desktop/gnome
  • default/linux/amd64/23.0/desktop/gnome/systemd
  • default/linux/amd64/23.0/desktop/plasma/systemd

Chroot testing

This step will setup three chroots to see which USE flags will be set before adding as a patch. Chroot are used to make sure no host information is leaked into results before setting it to the devs for review.

Server Profile

Download the latest stage tarball such as stage3-amd64-openrc-20240915T163400Z.tar.xz from https://www.gentoo.org/downloads/mirrors/

root #cd /home/USER/chroot/server
root #tar xvf current-stage3-amd64-openrc/stage3-amd64-openrc-20240915T163400Z.tar.xz
root #mount -t proc none proc
root #mount -R /dev dev
root #mount -R /sys sys
root #cp /etc/resolv.conf etc/
root #chroot . /bin/bash -l
root #emerge --sync

Next, let's see what USE flags the server profile sets with:

root #emerge -vp sys-boot/grub

These are the packages that would be merged, in order:

Calculating dependencies... done! Dependency resolution took 0.58 s (backtrack: 0/20).

[ebuild N ] sys-apps/hwdata-0.383::gentoo 2374 KiB
[ebuild N ] virtual/libudev-251-r2:0/1::gentoo USE="-systemd" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild N ] media-libs/libpng-1.6.43:0/16::gentoo USE="-apng -static-libs -test" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse" 1020 KiB
[ebuild N ] app-text/mandoc-1.14.6::gentoo USE="-cgi (-selinux) -system-man -test" 681 KiB
[ebuild N ] sys-fs/lvm2-2.03.22-r5::gentoo USE="readline udev -lvm -sanlock (-selinux) -static -static-libs -systemd -thin -valgrind" 2691 KiB
[ebuild N ] media-libs/freetype-2.13.2:2::gentoo USE="adobe-cff bzip2 cleartype-hinting png -X -brotli -debug -doc -fontforge -harfbuzz -static-libs -svg -utils" ABI_X86="(64) -32 (-x32)" 2444 KiB

[ebuild N ] sys-apps/pciutils-3.13.0::gentoo USE="kmod udev zlib -dns -static-libs" ABI_X86="(64) -32 (-x32)" 658 KiB
[ebuild N ] sys-libs/efivar-38:0/1::gentoo USE="-test" 313 KiB
[ebuild N ] sys-boot/efibootmgr-18-r1::gentoo 45 KiB
[ebuild N ] sys-boot/grub-2.12-r5:2/2.12-r5::gentoo USE="device-mapper fonts nls themes -doc -efiemu -libzfs -mount -sdl -secureboot (-test) -truetype -verify-sig" GRUB_PLATFORMS="efi-64 pc -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh" 8258 KiB

Total: 10 packages (10 new), Size of downloads: 18479 KiB
GNOME Profile

Download the latest desktop stage tarball such as stage3-amd64-desktop-openrc-20240915T163400Z.tar.xz from https://www.gentoo.org/downloads/mirrors/

root #cd /home/USER/chroot/gnome
root #tar xvf current-stage3-amd64-desktop-openrc/stage3-amd64-openrc-20240915T163400Z.tar.xz
root #mount -t proc none proc
root #mount -R /dev dev
root #mount -R /sys sys
root #cp /etc/resolv.conf etc/
root #chroot . /bin/bash -l
root #emerge --sync
root #eselect profile set default/linux/amd64/23.0/desktop/gnome

Next, let's see what USE flags the server profile sets with:

root #emerge -vp sys-boot/grub

These are the packages that would be merged, in order:

Calculating dependencies... done! Dependency resolution took 0.53 s (backtrack: 0/20).

[ebuild N ] sys-apps/hwdata-0.383::gentoo 2374 KiB
[ebuild N ] virtual/libudev-251-r2:0/1::gentoo USE="-systemd" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild N ] app-text/mandoc-1.14.6::gentoo USE="-cgi (-selinux) -system-man -test" 681 KiB
[ebuild N ] media-libs/libpng-1.6.43:0/16::gentoo USE="-apng -static-libs -test" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse" 1020 KiB
[ebuild N ] sys-fs/lvm2-2.03.22-r5::gentoo USE="readline udev -lvm -sanlock (-selinux) -static -static-libs -systemd -thin -valgrind" 2691 KiB
[ebuild N ] media-libs/freetype-2.13.2:2::gentoo USE="X adobe-cff bzip2 cleartype-hinting png svg -brotli -debug -doc -fontforge -harfbuzz -static-libs -utils" ABI_X86="(64) -32 (-x32)" 2444 KiB
[ebuild N ] sys-apps/pciutils-3.13.0::gentoo USE="kmod udev zlib -dns -static-libs" ABI_X86="(64) -32 (-x32)" 658 KiB
[ebuild N ] sys-libs/efivar-38:0/1::gentoo USE="-test" 313 KiB
[ebuild N ] sys-boot/efibootmgr-18-r1::gentoo 45 KiB
[ebuild N ] sys-boot/grub-2.12-r5:2/2.12-r5::gentoo USE="device-mapper fonts nls sdl themes truetype -doc -efiemu -libzfs -mount -secureboot (-test) -verify-sig" GRUB_PLATFORMS="efi-64 pc -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh" 8258 KiB

Total: 10 packages (10 new), Size of downloads: 18479 KiB
KDE Profile
Tip
A user could just switch the profile from the above chroot if they so wish to do the save time however, if they user is unsure how to make sure there is no USE flags being leaked then they should be following all the steps below.

Download the latest desktop stage tarball such as stage3-amd64-desktop-systemd-20240915T163400Z.tar.xz from https://www.gentoo.org/downloads/mirrors/

root #cd /home/USER/chroot/kde
root #tar xvf current-stage3-amd64-desktop-systemd/stage3-amd64-systemd-20240915T163400Z.tar.xz
root #mount -t proc none proc
root #mount -R /dev dev
root #mount -R /sys sys
root #cp /etc/resolv.conf etc/
root #chroot . /bin/bash -l
root #emerge --sync
root #eselect profile set default/linux/amd64/23.0/desktop/plasma/systemd

Next, let's see what USE flags the server profile sets with:

root #emerge -vp sys-boot/grub

These are the packages that would be merged, in order:

Calculating dependencies... done! Dependency resolution took 0.53 s (backtrack: 0/20).

[ebuild N ] sys-apps/hwdata-0.383::gentoo 2374 KiB
[ebuild N ] virtual/libudev-251-r2:0/1::gentoo USE="-systemd" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild N ] app-text/mandoc-1.14.6::gentoo USE="-cgi (-selinux) -system-man -test" 681 KiB
[ebuild N ] media-libs/libpng-1.6.43:0/16::gentoo USE="-apng -static-libs -test" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="sse" 1020 KiB
[ebuild N ] sys-fs/lvm2-2.03.22-r5::gentoo USE="readline udev -lvm -sanlock (-selinux) -static -static-libs -systemd -thin -valgrind" 2691 KiB
[ebuild N ] media-libs/freetype-2.13.2:2::gentoo USE="X adobe-cff bzip2 cleartype-hinting png svg -brotli -debug -doc -fontforge -harfbuzz -static-libs -utils" ABI_X86="(64) -32 (-x32)" 2444 KiB
[ebuild N ] sys-apps/pciutils-3.13.0::gentoo USE="kmod udev zlib -dns -static-libs" ABI_X86="(64) -32 (-x32)" 658 KiB
[ebuild N ] sys-libs/efivar-38:0/1::gentoo USE="-test" 313 KiB
[ebuild N ] sys-boot/efibootmgr-18-r1::gentoo 45 KiB
[ebuild N ] sys-boot/grub-2.12-r5:2/2.12-r5::gentoo USE="device-mapper fonts nls sdl themes truetype -doc -efiemu -libzfs -mount -secureboot (-test) -verify-sig" GRUB_PLATFORMS="efi-64 pc -coreboot -efi-32 -emu -ieee1275 (-loongson) -multiboot -qemu (-qemu-mips) -uboot -xen -xen-32 -xen-pvh" 8258 KiB

Total: 10 packages (10 new), Size of downloads: 18479 KiB

Comparing results

Above we can see both the GNOME and KDE profiles set sdl and truetype so this tells us that the Binhost builder will need to create binpks for both the server profile and one of the desktop profiles.

Create patch

Checkout repo

user $mkdir ~/git
user $cd ~/git/binhost

Edit files

In our testing it was discovered that the server and GNOME profile world is required to be edited so lets do that now:

We need to add sys-boot/grub to the following files:

  • builders/milou/server-23/world
  • builders/milou/server-v3-23/world
  • builders/milou/gnome-23/world
  • builders/milou/gnome-v3-23/world
Note
We don't need to add to the KDE profile builder because the USE flags are the same in this example.

Create patch

If any help is required in setting up git for commit signing then please see Creating_GitHub_Pull_Requests

user $git add .
user $git commit --signoff
user $git format-patch -1 HEAD

This will create a patch file named something like 0001-Add-sys-boot/grub-to-binhost.patch

It is now time to send this patch either via the Gentoo Binhost mailing list or via IRC.