Commit 771218a6 authored by Łukasz Nowak's avatar Łukasz Nowak

component/systemd: Version up

Switch to pure meson build system and adapt configuration for SlapOS
requirements.

Support multiarch env by simply linking from lib64.

Version 249.6 incorporates fix from https://bugs.gentoo.org/824026 for:
  meson.build: ERROR: Object <[BooleanHolder] holds [bool]: False> of
  type bool does not support the +
parent c1bd35ff
......@@ -9,16 +9,77 @@ extends =
../pkgconfig/buildout.cfg
../util-linux/buildout.cfg
../xz-utils/buildout.cfg
../ninja/buildout.cfg
../meson/buildout.cfg
[systemd-markupsafe-download]
recipe = slapos.recipe.build:download
shared = true
url = https://files.pythonhosted.org/packages/4d/de/32d741db316d8fdb7680822dd37001ef7a448255de9699ab4bfcbdf4172b/${:filename}
filename = MarkupSafe-1.0.tar.gz
md5sum = 2fcedc9284d50e577b5192e8e3578355
[systemd-jinja2-download]
recipe = slapos.recipe.build:download
shared = true
url = https://files.pythonhosted.org/packages/4f/e7/65300e6b32e69768ded990494809106f87da1d436418d5f1367ed3966fd7/${:filename}
filename = Jinja2-2.11.3.tar.gz
md5sum = 231dc00d34afb2672c497713fa9cdaaa
[systemd-python]
recipe = slapos.recipe.build
shared = true
markupsafe = ${systemd-markupsafe-download:target}
jinja2 = ${systemd-jinja2-download:target}
install =
import os
call([options['python'], '-m', 'venv', '--clear', location])
pip = os.path.join(location, 'bin', 'pip')
call([pip, 'install', '--no-index', options['markupsafe'], options['jinja2']])
call([pip, 'uninstall', '-y', 'pip', 'setuptools'])
# selftest
python = os.path.join(location, 'bin', 'python3')
call([python, '-c', 'import jinja2'])
python = ${python3:executable}
[systemd-python:python3]
python = ${buildout:executable}
[systemd]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.build
shared = true
# XXX This version requires Linux kernel >= 3.7.
url = https://www.freedesktop.org/software/systemd/systemd-221.tar.xz
md5sum = b4d5a253841cf28a98b7ec99c45e3716
location = ${buildout:parts-directory}/${:_buildout_section_name_}
make-options = rootprefix=${:location} SYSTEM_SYSVINIT_PATH=${:location}/etc/init.d
url = https://github.com/systemd/systemd-stable/archive/v249.6.tar.gz
md5sum = eb4a1923009abdb4e25c4802f4921a18
install =
env = self.environ
extract_dir = self.extract(self.download(options['url'], options['md5sum']))
workdir = guessworkdir(extract_dir)
call([
'meson', 'setup', 'build',
'-Dprefix=%s' % (location,),
'-Drootprefix=%s' % (location,),
'-Dsysconfdir=%s/etc' % (location,),
'-Dsysvinit-path=%s/etc/init.d' % (location,),
'-Dsysvrcnd-path=%s/etc/rc.d' % (location,),
'-Dlocalstatedir=%s/var' % (location,),
'-Dcreate-log-dirs=False',
'-Dhwdb=False',
], cwd=workdir, env=env)
call(['meson', 'setup', 'build',], cwd=workdir, env=env)
call(['meson', 'compile', '-C', 'build/'], cwd=workdir, env=env)
call(['meson', 'install', '-C', 'build/'], cwd=workdir, env=env)
import os
# On some systems multiarch is detected, and then libraries go to
# x86_64-linux-gnu, and as there was no way to control this behaviour
# during meson setup build phase, simply link it to lib64, where other
# parts are looking for libraries
if os.path.exists(os.path.join(location, 'x86_64-linux-gnu')):
call(['ln', '-s', 'x86_64-linux-gnu', 'lib64'], cwd=location)
environment =
PATH=${coreutils:location}/bin:${gettext:location}/bin:${gperf:location}/bin:${intltool:location}/bin:${perl-XML-Parser:perl-PATH}:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${systemd-python:location}/bin:${meson:location}/bin:${ninja:location}/bin:${coreutils:location}/bin:${gettext:location}/bin:${gperf:location}/bin:${intltool:location}/bin:${perl-XML-Parser:perl-PATH}:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${libcap:location}/include -I${util-linux:location}/include
LDFLAGS=-L${libcap:location}/lib -Wl,-rpath=${libcap:location}/lib -L${util-linux:location}/lib -Wl,-rpath=${util-linux:location}/lib
PKG_CONFIG_PATH=${util-linux:location}/lib/pkgconfig
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment