Skip to content

Conversation

@jkloetzke
Copy link
Member

I'm creating some Linux blueprint recipes that showcase how to build a "standard" Linux with Bob. I needed quite a lot of changes to get this running.

@rhubert @sixtyfourktec Please have a look. There are probably some breaking in there:

  • Rename "fontUtil" tool to "font-util"
  • graphics::fonts::font-util: make a pure binary package
  • core::dbus: remove breaking configure options
  • core::dbus: split into binary and library package

I really would like to hear your feedback before merging this. I hope that I'll post the Linux blueprint in the next days as well...

The tools should usually be named like the recipe.
Some packages will use the fontutil.pc file to get the font root
directory. As pc files are relocated in Bob, the value must be hard
coded path.

Interestingly, pkg-config has a heuristic that detects if variables
start with the same string as the "prefix" variable. But we only want
the include and library directories to be relocated. To work around this
problem, use a dummy prefix. It will be overwritten anyway by the actual
pc file location.

On the other hand, the "mapdir" path must be relocated. It is used to
find the mapping data at runtime when the tools are invoked. This is at
cross-compile time of other packages.

At the same time, the ...
Some packages will use the xkbcomp.pc file to get the X11 keymaps
directory. As pc files are relocated in Bob, the value must be hard
coded path.

Interestingly, pkg-config has a heuristic that detects if variables
start with the same string as the "prefix" variable. But we only want
the include and library directories to be relocated. To work around this
problem, use a dummy prefix. It will be overwritten anyway by the actual
pc file location.
Some packages will use the xcursor.pc file to get the icons directory.
As pc files are relocated in Bob, the value must be hard coded path.

Interestingly, pkg-config has a heuristic that detects if variables
start with the same string as the "prefix" variable. But we only want
the include and library directories to be relocated. To work around this
problem, use a dummy prefix. It will be overwritten anyway by the actual
pc file location.
The mesa3d library does not have any applications. Remove the
libs::mesa3d package because it just holds a configuration file. Install
it with the libraries directly instead.
Some packages will use the dri.pc file to get the DRI drivers directory.
As pc files are relocated in Bob, the value must be hard coded path.

Interestingly, pkg-config has a heuristic that detects if variables
start with the same string as the "prefix" variable. But we only want
the include and library directories to be relocated. To work around this
problem, use a dummy prefix. It will be overwritten anyway by the actual
pc file location.
Some packages may use the gbm.pc file to get the GBM drivers directory.
As pc files are relocated in Bob, the value must be hard coded path.

Interestingly, pkg-config has a heuristic that detects if variables
start with the same string as the "prefix" variable. But we only want
the include and library directories to be relocated. To work around this
problem, use a dummy prefix. It will be overwritten anyway by the actual
pc file location.
A helper to create an xauth cookie. It comes with no apparent version
and is public domain.
The font-utils package produces only two executables with some
development meta data. It's used by other packages to process font data
at compile time. In particular, it is *not* a library. Hence, it makes
no sense to have a -dev and -tgt multiPackage.

Because some packages require pkg-config to find the font-util binaries,
add a class that adds the tool to the pkg-config search path.
The xserver won't work without xkeyboard-config files. Add the package
as a standard runtime dependency because there is no sane configuration
with xserver where those are not needed.
Centrally define the allowed values of CONFIG_INIT. Ensures consistency
between recipes that are dependent on the init system.
The data- and sysconf-directories were set to inconsistent values. This
had the effect that files provided by other packages for dbus were not
picked up. Consequently, the services would not run.

Remove the options and use the default values as expected by other
packages.
The dbus-dev package contains only libdbus-1.so. Consequently, the
dbus-tgt package should only hold the shared library as well. If the
dbus daemon is to be installed on the target, it must be selected
explicitly by the core::dbus package.
If the x11 platform is not selected, the "glx" switch must be disabled.
Do this in the recipe because so that the user of the recipe does not
have to bother.
This is a good default when building for x11. When building for wayland,
the switch is forced to "disabled" by the build script, so its value
does not matter.
The setup of the XDG_RUNTIME_DIR variable is only necessary on sysvinit
based systems. On systemd, the variable will have the correct setting
already.
@sixtyfourktec
Copy link
Contributor

Looks good to me. The only small issue is that you define the initIsSystemd helper after some commits using it already. But I guess this doesn't matter anyway, because it gets merged in one go.

Copy link
Contributor

@rhubert rhubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Thanks for adding the font stuff. I also have this on my side bit it looks quiet identical.

[[ ${CONFIG_INIT:-} == "sysvinit" ]] || initIsSysvinitSysv || initIsSysvinitBusybox
}
# Check is the init system is systemd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Check is the init system is systemd
# Check if the init system is systemd

usr/lib/pkgconfig/fontutil.pc
provideTools:
font-util: "usr/bin"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need to rename this? :/

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants