Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add systemd (libsystemd and libudev outputs only!) #16062

Merged
merged 1 commit into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions recipes/systemd/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/usr/bin/env bash

set -ex

mkdir forgebuild

meson_config_args=(
-Dbuildtype=release
-Dlibdir=lib
-Dmode=release
-Dprefix=$PREFIX
-Drootprefix=$PREFIX
-Dsplit-user=false
-Dsplit-bin=false
-Dsysconfdir=etc
-Dsysvinit-path=""
-Dversion-tag=condaforge
# general toggles
-Dcreate-log-dirs=false
-Dinstall-sysconfdir=false
-Dtests=false
# component toggles
-Danalyze=false
-Dbacklight=false
-Dbinfmt=false
-Dbpf-framework=false
-Dcoredump=false
-Defi=false
-Denvironment-d=false
-Dfirstboot=false
-Dhibernate=false
-Dhomed=false
-Dhostnamed=false
-Dhwdb=false
-Dimportd=false
-Dinitrd=false
-Dkernel-install=false
-Dlocaled=false
-Dlogind=false
-Dmachined=false
-Dnetworkd=false
-Dnss-myhostname=false
-Dnss-mymachines=false
-Dnss-resolve=false
-Dnss-systemd=false
-Doomd=false
-Dportabled=false
-Dpstore=false
-Dquotacheck=false
-Drandomseed=False
-Drepart=false
-Dresolve=false
-Drfkill=false
-Dsysext=false
-Dsysusers=false
-Dtimedated=false
-Dtimesyncd=false
-Dtmpfiles=false
-Duserdb=false
-Dvconsole=false
-Dxdg-autostart=false
)

# Set DESTDIR so that the installation knows that we are packaging for a
# distribution and not installing to the local machine, but actual destination
# is still handled by setting the prefix/rootprefix.
# This avoids doing things like building the catalog database under /var
export DESTDIR="/"

meson setup forgebuild \
${MESON_ARGS} \
"${meson_config_args[@]}" \
--wrap-mode=nofallback
meson compile -v -C forgebuild -j ${CPU_COUNT}
meson install -C forgebuild --no-rebuild
198 changes: 198 additions & 0 deletions recipes/systemd/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
{% set name = "systemd" %}
{% set version = "249" %}
{% set build = "0" %}
{% set libudev_abi_version = "1" %}
{% set libsystemd_abi_version = "0" %}

package:
name: {{ name|lower }}-split
version: {{ version }}

source:
url: https://github.com/{{ name }}/{{ name }}/archive/v{{ version }}.tar.gz
sha256: 174091ce5f2c02123f76d546622b14078097af105870086d18d55c1c2667d855

build:
number: {{ build }}
skip: true # [not linux]

requirements:
build:
- {{ compiler('c') }}
- coreutils
- gperf
- jinja2
- meson
- ninja
- pkg-config
- python
- sysroot_linux-64 2.17 # [linux64]
host:
- elfutils
- libacl
- libcap
- libgcrypt
- lz4-c
- p11-kit
- libseccomp
- openssl
- util-linux
- xz
- zstd

outputs:
- name: libudev{{ libudev_abi_version }}
files:
- lib/libudev.so.{{ libudev_abi_version }}
- lib/libudev.so.{{ libudev_abi_version }}.*
requirements:
build:
- {{ compiler('c') }}
- sysroot_linux-64 2.17 # [linux64]
test:
commands:
# verify that library and its symlink gets installed
# symlink
- test -h $PREFIX/lib/libudev.so.{{ libudev_abi_version }}
# library
- test -f $PREFIX/lib/libudev.so.{{ libudev_abi_version }}
about:
home: https://www.freedesktop.org/wiki/Software/systemd/
dev_url: https://github.com/systemd/systemd
license: LGPL-2.1-or-later
license_file: LICENSE.LGPL2.1
summary: Library to access udev device information

- name: libudev
files:
- include/libudev.h
- lib/pkgconfig/libudev.pc
- lib/libudev.so
build:
# set build string to ensure unique outputs for each build of libudevN
string: {{ pin_subpackage('libudev' + libudev_abi_version, exact=True).split(' ')[-1] }}
run_exports:
- {{ pin_subpackage('libudev' + libudev_abi_version, max_pin='') }}
requirements:
run:
- {{ pin_subpackage('libudev' + libudev_abi_version, exact=True) }}
test:
commands:
# verify that header gets installed
- test -f $PREFIX/include/libudev.h

# verify that pkgconfig files get installed
- test -f $PREFIX/lib/pkgconfig/libudev.pc

# verify that library symlink gets installed and points to the library
- test -h $PREFIX/lib/libudev.so
- test -f $PREFIX/lib/libudev.so
about:
home: https://www.freedesktop.org/wiki/Software/systemd/
dev_url: https://github.com/systemd/systemd
license: LGPL-2.1-or-later
license_file: LICENSE.LGPL2.1
summary: Development package for the udev library

- name: libsystemd{{ libsystemd_abi_version }}
files:
- lib/libsystemd.so.{{ libsystemd_abi_version }}
- lib/libsystemd.so.{{ libsystemd_abi_version }}.*
requirements:
build:
- {{ compiler('c') }}
- sysroot_linux-64 2.17 # [linux64]
host:
- libcap
- libgcrypt
- lz4-c
- xz
- zstd
test:
commands:
# verify that library and its symlink gets installed
# symlink
- test -h $PREFIX/lib/libsystemd.so.{{ libsystemd_abi_version }}
# library
- test -f $PREFIX/lib/libsystemd.so.{{ libsystemd_abi_version }}
about:
home: https://www.freedesktop.org/wiki/Software/systemd/
dev_url: https://github.com/systemd/systemd
license: LGPL-2.1-or-later
license_file: LICENSE.LGPL2.1
summary: Library for interfacing with systemd

- name: libsystemd
files:
- include/systemd
- lib/pkgconfig/libsystemd.pc
- lib/libsystemd.so
build:
# set build string to ensure unique outputs for each build of libudevN
string: {{ pin_subpackage('libsystemd' + libsystemd_abi_version, exact=True).split(' ')[-1] }}
run_exports:
- {{ pin_subpackage('libsystemd' + libsystemd_abi_version, max_pin='') }}
requirements:
run:
- {{ pin_subpackage('libsystemd' + libsystemd_abi_version, exact=True) }}
test:
commands:
# verify that headers get installed
- test -f $PREFIX/include/systemd/_sd-common.h
- test -f $PREFIX/include/systemd/sd-bus-protocol.h
- test -f $PREFIX/include/systemd/sd-bus-vtable.h
- test -f $PREFIX/include/systemd/sd-bus.h
- test -f $PREFIX/include/systemd/sd-daemon.h
- test -f $PREFIX/include/systemd/sd-device.h
- test -f $PREFIX/include/systemd/sd-event.h
- test -f $PREFIX/include/systemd/sd-hwdb.h
- test -f $PREFIX/include/systemd/sd-id128.h
- test -f $PREFIX/include/systemd/sd-journal.h
- test -f $PREFIX/include/systemd/sd-login.h
- test -f $PREFIX/include/systemd/sd-messages.h
- test -f $PREFIX/include/systemd/sd-path.h

# verify that pkgconfig files get installed
- test -f $PREFIX/lib/pkgconfig/libsystemd.pc

# verify that library gets installed and points to the library
- test -h $PREFIX/lib/libsystemd.so
- test -f $PREFIX/lib/libsystemd.so
about:
home: https://www.freedesktop.org/wiki/Software/systemd/
dev_url: https://github.com/systemd/systemd
license: LGPL-2.1-or-later
license_file: LICENSE.LGPL2.1
summary: Development package for the systemd library

about:
home: https://www.freedesktop.org/wiki/Software/systemd/
license: LGPL-2.1-or-later AND GPL-2.0-or-later
license_file:
- LICENSE.LGPL2.1
- LICENSE.GPL2
summary: System and Service Manager
description: |
systemd is a suite of basic building blocks for a Linux system. It provides
a system and service manager that runs as PID 1 and starts the rest of the
system.

systemd provides aggressive parallelization capabilities, uses socket and
D-Bus activation for starting services, offers on-demand starting of
daemons, keeps track of processes using Linux control groups, maintains
mount and automount points, and implements an elaborate transactional
dependency-based service control logic. systemd supports SysV and LSB init
scripts and works as a replacement for sysvinit.

Other parts include a logging daemon, utilities to control basic system
configuration like the hostname, date, locale, maintain a list of logged-in
users and running containers and virtual machines, system accounts, runtime
directories and settings, and daemons to manage simple network
configuration, network time synchronization, log forwarding, and name
resolution.
dev_url: https://github.com/systemd/systemd

extra:
feedstock-name: {{ name }}
recipe-maintainers:
- ryanvolz