2020-11-09 05:23:58 +01:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2017-11-18 18:32:01 +01:00
|
|
|
|
meson: recompile all sources for install_libudev_static and install_libsystemd_static
This means that when those targets are built, all the sources are built again,
instead of reusing the work done to create libbasic.a and other convenience static
libraries. It would be nice to not do this, but there seems to be no support in
our toolchain for joining multiple static libraries into one. When linking
a static library, any -l arguments are simply ignored by ar/gcc-ar, and .a
libraries given as positional arguments are copied verbatim into the archive
so they objects in them cannot be accessed.
https://stackoverflow.com/questions/2157629/linking-static-libraries-to-other-static-libraries
suggests either unzipping all the archives and putting them back togather,
or using a linker script. Unzipping and zipping back together seems ugly.
The other option is not very nice. The linker script language does not
allow "+" to appear in the filenames, and filenames that meson generates
use that, so files would have to be renamed before a linker script was used.
And we would have to generate the linker script on the fly. Either way, this
doesn't seem attractive. Since those static libraries are a niche use case,
it seems reasonable to just go with the easiest and safest solution and
recompile all the source files. Thanks to ccache, this is probably almost as
cheap as actually reusing the convenience .a libraries.
test-libsystemd-sym.c and test-libudev-sym.c compile fine with the generated
static libs, so it seems that they indeed provide all the symbols they should.
2018-04-25 15:29:48 +02:00
|
|
|
shared_sources = files('''
|
2017-04-18 01:25:00 +02:00
|
|
|
acl-util.h
|
|
|
|
acpi-fpdt.c
|
|
|
|
acpi-fpdt.h
|
|
|
|
apparmor-util.c
|
|
|
|
apparmor-util.h
|
|
|
|
ask-password-api.c
|
|
|
|
ask-password-api.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
barrier.c
|
|
|
|
barrier.h
|
2017-04-18 01:25:00 +02:00
|
|
|
base-filesystem.c
|
|
|
|
base-filesystem.h
|
2020-04-23 16:36:06 +02:00
|
|
|
binfmt-util.c
|
|
|
|
binfmt-util.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
bitmap.c
|
|
|
|
bitmap.h
|
|
|
|
blkid-util.h
|
2020-05-17 06:14:49 +02:00
|
|
|
bond-util.c
|
|
|
|
bond-util.h
|
2017-04-18 01:25:00 +02:00
|
|
|
boot-timestamps.c
|
|
|
|
boot-timestamps.h
|
2017-10-17 18:23:16 +02:00
|
|
|
bootspec.c
|
|
|
|
bootspec.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
bpf-program.c
|
|
|
|
bpf-program.h
|
2020-03-24 12:23:08 +01:00
|
|
|
bridge-util.c
|
|
|
|
bridge-util.h
|
2020-06-28 16:43:29 +02:00
|
|
|
bus-get-properties.c
|
|
|
|
bus-get-properties.h
|
2020-05-07 10:16:59 +02:00
|
|
|
bus-locator.c
|
|
|
|
bus-locator.h
|
2020-04-21 10:25:50 +02:00
|
|
|
bus-log-control-api.c
|
|
|
|
bus-log-control-api.h
|
2020-06-28 16:08:37 +02:00
|
|
|
bus-map-properties.c
|
|
|
|
bus-map-properties.h
|
2020-07-19 03:57:04 +02:00
|
|
|
bus-message-util.c
|
|
|
|
bus-message-util.h
|
2020-06-28 15:37:47 +02:00
|
|
|
bus-object.c
|
|
|
|
bus-object.h
|
2020-04-21 10:25:50 +02:00
|
|
|
bus-polkit.c
|
|
|
|
bus-polkit.h
|
2020-06-28 16:17:46 +02:00
|
|
|
bus-print-properties.c
|
|
|
|
bus-print-properties.h
|
2019-04-05 16:22:47 +02:00
|
|
|
bus-unit-procs.c
|
|
|
|
bus-unit-procs.h
|
2017-04-18 01:25:00 +02:00
|
|
|
bus-unit-util.c
|
|
|
|
bus-unit-util.h
|
|
|
|
bus-util.c
|
|
|
|
bus-util.h
|
2019-03-06 19:38:45 +01:00
|
|
|
bus-wait-for-jobs.c
|
|
|
|
bus-wait-for-jobs.h
|
2019-04-01 18:54:59 +02:00
|
|
|
bus-wait-for-units.c
|
|
|
|
bus-wait-for-units.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
calendarspec.c
|
|
|
|
calendarspec.h
|
2019-08-01 13:14:45 +02:00
|
|
|
cgroup-setup.c
|
|
|
|
cgroup-setup.h
|
2017-04-18 01:25:00 +02:00
|
|
|
cgroup-show.c
|
|
|
|
cgroup-show.h
|
2018-12-23 19:31:29 +01:00
|
|
|
chown-recursive.c
|
|
|
|
chown-recursive.h
|
2017-04-18 01:25:00 +02:00
|
|
|
clean-ipc.c
|
|
|
|
clean-ipc.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
clock-util.c
|
|
|
|
clock-util.h
|
2017-04-18 01:25:00 +02:00
|
|
|
condition.c
|
|
|
|
condition.h
|
|
|
|
conf-parser.c
|
|
|
|
conf-parser.h
|
2020-04-04 15:02:12 +02:00
|
|
|
coredump-util.c
|
|
|
|
coredump-util.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
cpu-set-util.c
|
|
|
|
cpu-set-util.h
|
2020-08-28 21:26:33 +02:00
|
|
|
cryptsetup-util.c
|
|
|
|
cryptsetup-util.h
|
2018-11-26 09:55:56 +01:00
|
|
|
daemon-util.h
|
2017-04-18 01:25:00 +02:00
|
|
|
dev-setup.c
|
|
|
|
dev-setup.h
|
|
|
|
dissect-image.c
|
|
|
|
dissect-image.h
|
2018-12-23 19:19:51 +01:00
|
|
|
dm-util.c
|
|
|
|
dm-util.h
|
2017-04-18 01:25:00 +02:00
|
|
|
dns-domain.c
|
|
|
|
dns-domain.h
|
|
|
|
dropin.c
|
|
|
|
dropin.h
|
2019-08-01 16:28:29 +02:00
|
|
|
efi-loader.c
|
|
|
|
efi-loader.h
|
2018-10-09 16:02:55 +02:00
|
|
|
enable-mempool.c
|
2018-11-30 22:08:41 +01:00
|
|
|
env-file-label.c
|
|
|
|
env-file-label.h
|
2019-06-17 07:52:55 +02:00
|
|
|
ethtool-util.c
|
|
|
|
ethtool-util.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
exec-util.c
|
|
|
|
exec-util.h
|
|
|
|
exit-status.c
|
|
|
|
exit-status.h
|
2017-04-18 01:25:00 +02:00
|
|
|
fdset.c
|
|
|
|
fdset.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
fileio-label.c
|
|
|
|
fileio-label.h
|
2020-06-25 15:00:54 +02:00
|
|
|
firewall-util.c
|
firewall-util: add nftables backend
Idea is to use a static ruleset, added when the first attempt to
add a masquerade or dnat rule is made.
The alternative would be to add the ruleset when the init function is called.
The disadvantage is that this enables connection tracking and NAT in the kernel
(as the ruleset needs this to work), which comes with some overhead that might
not be needed (no nspawn usage and no IPMasquerade option set).
There is no additional dependency on the 'nft' userspace binary or other libraries.
sd-netlinks nfnetlink backend is used to modify the nftables ruleset.
The commit message/comments still use nft syntax since that is what
users will see when they use the nft tool to list the ruleset.
The added initial skeleton (added on first fw_add_masquerade/local_dnat
call) looks like this:
table ip io.systemd.nat {
set masq_saddr {
type ipv4_addr
flags interval
elements = { 192.168.59.160/28 }
}
map map_port_ipport {
type inet_proto . inet_service : ipv4_addr . inet_service
elements = { tcp . 2222 : 192.168.59.169 . 22 }
}
chain prerouting {
type nat hook prerouting priority dstnat + 1; policy accept;
fib daddr type local dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
}
chain output {
type nat hook output priority -99; policy accept;
ip daddr != 127.0.0.0/8 oif "lo" dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
}
chain postrouting {
type nat hook postrouting priority srcnat + 1; policy accept;
ip saddr @masq_saddr masquerade
}
}
Next calls to fw_add_masquerade/add_local_dnat will then only add/delete the
element/mapping to masq_saddr and map_port_ipport, i.e. the ruleset doesn't
change -- only the set/map content does.
Running test-firewall-util with this backend gives following output
on a parallel 'nft monitor':
$ nft monitor
add table ip io.systemd.nat
add chain ip io.systemd.nat prerouting { type nat hook prerouting priority dstnat + 1; policy accept; }
add chain ip io.systemd.nat output { type nat hook output priority -99; policy accept; }
add chain ip io.systemd.nat postrouting { type nat hook postrouting priority srcnat + 1; policy accept; }
add set ip io.systemd.nat masq_saddr { type ipv4_addr; flags interval; }
add map ip io.systemd.nat map_port_ipport { type inet_proto . inet_service : ipv4_addr . inet_service; }
add rule ip io.systemd.nat prerouting fib daddr type local dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
add rule ip io.systemd.nat output ip daddr != 127.0.0.0/8 fib daddr type local dnat ip addr . port to meta l4proto . th dport map @map_port_ipport
add rule ip io.systemd.nat postrouting ip saddr @masq_saddr masquerade
add element ip io.systemd.nat masq_saddr { 10.1.2.3 }
add element ip io.systemd.nat masq_saddr { 10.0.2.0/28 }
delete element ip io.systemd.nat masq_saddr { 10.0.2.0/28 }
delete element ip io.systemd.nat masq_saddr { 10.1.2.3 }
add element ip io.systemd.nat map_port_ipport { tcp . 4711 : 1.2.3.4 . 815 }
delete element ip io.systemd.nat map_port_ipport { tcp . 4711 : 1.2.3.4 . 815 }
add element ip io.systemd.nat map_port_ipport { tcp . 4711 : 1.2.3.5 . 815 }
delete element ip io.systemd.nat map_port_ipport { tcp . 4711 : 1.2.3.5 . 815 }
CTRL-C
Things not implemented/supported:
1. Change monitoring. The kernel allows userspace to learn about changes
made by other clients (using nfnetlink notifications). It would be
possible to detect when e.g. someone removes the systemd nat table.
This would need more work. Its also not clear on how to react to
external changes -- it doesn't seem like a good idea to just auto-undo
everthing.
2. 'set masq_saddr' doesn't handle overlaps.
Example:
fw_add_masquerade(true, AF_INET, "10.0.0.0" , 16);
fw_add_masquerade(true, AF_INET, "10.0.0.0" , 8); /* fails */
With the iptables backend the second call works, as it adds an
independent iptables rule.
With the nftables backend, the range 10.0.0.0-10.255.255.255 clashes with
the existing range of 10.0.0.0-10.0.255.255 so 2nd add gets rejected by the
kernel.
This will generate an error message from networkd ("Could not enable IP
masquerading: File exists").
To resolve this it would be needed to either keep track of the added elements
and perform range merging when overlaps are detected.
However, the add erquests are done using the configured network on a
device, so no overlaps should occur in normal setups.
IPv6 support is added in a extra changeset.
Fixes: #13307
2020-06-19 15:53:03 +02:00
|
|
|
firewall-util-nft.c
|
2017-04-26 22:14:23 +02:00
|
|
|
firewall-util.h
|
2020-06-25 15:00:54 +02:00
|
|
|
firewall-util-private.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
format-table.c
|
|
|
|
format-table.h
|
2018-12-23 19:22:12 +01:00
|
|
|
fsck-util.h
|
2017-04-18 01:25:00 +02:00
|
|
|
fstab-util.c
|
|
|
|
fstab-util.h
|
|
|
|
generator.c
|
|
|
|
generator.h
|
2020-03-25 14:52:31 +01:00
|
|
|
geneve-util.c
|
|
|
|
geneve-util.h
|
2020-01-23 22:55:48 +01:00
|
|
|
gpt.c
|
2017-04-18 01:25:00 +02:00
|
|
|
gpt.h
|
2019-08-07 15:25:36 +02:00
|
|
|
group-record.c
|
|
|
|
group-record.h
|
2020-12-04 18:39:23 +01:00
|
|
|
hostname-setup.c
|
|
|
|
hostname-setup.h
|
2018-08-21 15:38:04 +02:00
|
|
|
id128-print.c
|
|
|
|
id128-print.h
|
2020-10-09 11:52:41 +02:00
|
|
|
idn-util.c
|
|
|
|
idn-util.h
|
2017-04-18 01:25:00 +02:00
|
|
|
ima-util.c
|
|
|
|
ima-util.h
|
|
|
|
import-util.c
|
|
|
|
import-util.h
|
|
|
|
initreq.h
|
|
|
|
install-printf.c
|
|
|
|
install-printf.h
|
2018-10-17 20:40:09 +02:00
|
|
|
install.c
|
|
|
|
install.h
|
2020-03-19 10:59:08 +01:00
|
|
|
ipvlan-util.c
|
|
|
|
ipvlan-util.h
|
2018-12-07 16:24:55 +01:00
|
|
|
ip-protocol-list.c
|
|
|
|
ip-protocol-list.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
journal-importer.c
|
|
|
|
journal-importer.h
|
2017-04-18 01:25:00 +02:00
|
|
|
journal-util.c
|
|
|
|
journal-util.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
json-internal.h
|
|
|
|
json.c
|
|
|
|
json.h
|
2019-11-13 23:13:42 +01:00
|
|
|
libcrypt-util.c
|
|
|
|
libcrypt-util.h
|
2020-11-25 15:07:06 +01:00
|
|
|
libfido2-util.c
|
|
|
|
libfido2-util.h
|
2019-04-04 12:54:19 +02:00
|
|
|
libmount-util.h
|
2019-04-10 12:55:53 +02:00
|
|
|
linux/auto_dev-ioctl.h
|
|
|
|
linux/bpf.h
|
|
|
|
linux/bpf_common.h
|
|
|
|
linux/bpf_insn.h
|
|
|
|
linux/dm-ioctl.h
|
|
|
|
linux/ethtool.h
|
2019-07-23 14:22:06 +02:00
|
|
|
local-addresses.c
|
|
|
|
local-addresses.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
lockfile-util.c
|
|
|
|
lockfile-util.h
|
2019-03-06 15:54:57 +01:00
|
|
|
log-link.h
|
2017-04-18 01:25:00 +02:00
|
|
|
logs-show.c
|
|
|
|
logs-show.h
|
|
|
|
loop-util.c
|
|
|
|
loop-util.h
|
|
|
|
machine-image.c
|
|
|
|
machine-image.h
|
|
|
|
machine-pool.c
|
|
|
|
machine-pool.h
|
2020-03-19 10:31:45 +01:00
|
|
|
macvlan-util.c
|
|
|
|
macvlan-util.h
|
2018-11-20 15:42:57 +01:00
|
|
|
main-func.h
|
2020-07-29 18:36:26 +02:00
|
|
|
mkfs-util.c
|
|
|
|
mkfs-util.h
|
2018-07-06 11:57:54 +02:00
|
|
|
module-util.h
|
2018-11-29 10:29:34 +01:00
|
|
|
mount-util.c
|
|
|
|
mount-util.h
|
2020-10-28 16:20:14 +01:00
|
|
|
net-condition.c
|
|
|
|
net-condition.h
|
2020-01-02 19:33:29 +01:00
|
|
|
netif-naming-scheme.c
|
|
|
|
netif-naming-scheme.h
|
2018-12-07 16:24:55 +01:00
|
|
|
nscd-flush.h
|
2017-04-18 01:25:00 +02:00
|
|
|
nsflags.c
|
|
|
|
nsflags.h
|
2020-02-17 13:04:08 +01:00
|
|
|
numa-util.c
|
|
|
|
numa-util.h
|
2020-11-24 15:07:53 +01:00
|
|
|
openssl-util.c
|
2019-11-12 15:08:17 +01:00
|
|
|
openssl-util.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
os-util.c
|
|
|
|
os-util.h
|
2017-04-18 01:25:00 +02:00
|
|
|
output-mode.c
|
|
|
|
output-mode.h
|
2018-11-20 15:42:57 +01:00
|
|
|
pager.c
|
|
|
|
pager.h
|
2019-02-06 17:49:37 +01:00
|
|
|
pe-header.h
|
2019-11-05 11:49:27 +01:00
|
|
|
pkcs11-util.c
|
|
|
|
pkcs11-util.h
|
2018-11-20 15:42:57 +01:00
|
|
|
pretty-print.c
|
|
|
|
pretty-print.h
|
2020-03-08 02:58:33 +01:00
|
|
|
psi-util.c
|
|
|
|
psi-util.h
|
2017-04-18 01:25:00 +02:00
|
|
|
ptyfwd.c
|
|
|
|
ptyfwd.h
|
2020-08-18 09:56:56 +02:00
|
|
|
pwquality-util.c
|
|
|
|
pwquality-util.h
|
2020-10-25 12:11:21 +01:00
|
|
|
qrcode-util.c
|
|
|
|
qrcode-util.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
reboot-util.c
|
|
|
|
reboot-util.h
|
2018-12-27 14:31:27 +01:00
|
|
|
resize-fs.c
|
|
|
|
resize-fs.h
|
2017-04-18 01:25:00 +02:00
|
|
|
resolve-util.c
|
|
|
|
resolve-util.h
|
|
|
|
seccomp-util.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
securebits-util.c
|
|
|
|
securebits-util.h
|
2018-10-17 20:40:09 +02:00
|
|
|
serialize.c
|
|
|
|
serialize.h
|
2020-04-23 10:19:11 +02:00
|
|
|
service-util.c
|
|
|
|
service-util.h
|
2017-04-18 01:25:00 +02:00
|
|
|
sleep-config.c
|
|
|
|
sleep-config.h
|
2020-01-10 17:22:37 +01:00
|
|
|
socket-netlink.c
|
|
|
|
socket-netlink.h
|
2017-04-18 01:25:00 +02:00
|
|
|
spawn-ask-password-agent.c
|
|
|
|
spawn-ask-password-agent.h
|
|
|
|
spawn-polkit-agent.c
|
|
|
|
spawn-polkit-agent.h
|
|
|
|
specifier.c
|
|
|
|
specifier.h
|
|
|
|
switch-root.c
|
|
|
|
switch-root.h
|
|
|
|
sysctl-util.c
|
|
|
|
sysctl-util.h
|
2018-11-30 21:05:27 +01:00
|
|
|
tmpfile-util-label.c
|
|
|
|
tmpfile-util-label.h
|
2017-11-07 17:12:36 +01:00
|
|
|
tomoyo-util.c
|
|
|
|
tomoyo-util.h
|
2020-11-28 15:27:34 +01:00
|
|
|
tpm2-util.c
|
|
|
|
tpm2-util.h
|
2017-02-23 09:16:44 +01:00
|
|
|
udev-util.c
|
2018-10-17 20:40:09 +02:00
|
|
|
udev-util.h
|
2017-04-18 01:25:00 +02:00
|
|
|
uid-range.c
|
|
|
|
uid-range.h
|
2019-07-04 15:46:16 +02:00
|
|
|
unit-file.c
|
2019-07-23 14:29:18 +02:00
|
|
|
unit-file.h
|
2019-08-05 18:21:30 +02:00
|
|
|
user-record-nss.c
|
|
|
|
user-record-nss.h
|
2019-08-05 18:21:49 +02:00
|
|
|
user-record-show.c
|
|
|
|
user-record-show.h
|
2019-08-07 15:25:36 +02:00
|
|
|
user-record.c
|
|
|
|
user-record.h
|
2019-08-07 15:26:32 +02:00
|
|
|
userdb.c
|
|
|
|
userdb.h
|
2017-04-18 01:25:00 +02:00
|
|
|
utmp-wtmp.h
|
2019-04-11 18:46:54 +02:00
|
|
|
varlink.c
|
|
|
|
varlink.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
verbs.c
|
|
|
|
verbs.h
|
2017-04-18 01:25:00 +02:00
|
|
|
vlan-util.c
|
|
|
|
vlan-util.h
|
|
|
|
volatile-util.c
|
|
|
|
volatile-util.h
|
|
|
|
watchdog.c
|
|
|
|
watchdog.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
web-util.c
|
|
|
|
web-util.h
|
2019-10-23 13:01:35 +02:00
|
|
|
wifi-util.c
|
|
|
|
wifi-util.h
|
Move various files that don't need to be in basic/ to shared/
This doesn't have much effect on the final build, because we link libbasic.a
into libsystemd-shared.so, so in the end, all the object built from basic/
end up in libsystemd-shared. And when the static library is linked into binaries,
any objects that are included in it but are not used are trimmed. Hence, the
size of output artifacts doesn't change:
$ du -sb /var/tmp/inst*
54181861 /var/tmp/inst1 (old)
54207441 /var/tmp/inst1s (old split-usr)
54182477 /var/tmp/inst2 (new)
54208041 /var/tmp/inst2s (new split-usr)
(The negligible change in size is because libsystemd-shared.so is bigger
by a few hundred bytes. I guess it's because symbols are named differently
or something like that.)
The effect is on the build process, in particular partial builds. This change
effectively moves the requirements on some build steps toward the leaves of the
dependency tree. Two effects:
- when building items that do not depend on libsystemd-shared, we
build less stuff for libbasic.a (which wouldn't be used anyway,
so it's a net win).
- when building items that do depend on libshared, we reduce libbasic.a as a
synchronization point, possibly allowing better parallelism.
Method:
1. copy list of .h files from src/basic/meson.build to /tmp/basic
2. $ for i in $(grep '.h$' /tmp/basic); do echo $i; git --no-pager grep "include \"$i\"" src/basic/ 'src/lib*' 'src/nss-*' 'src/journal/sd-journal.c' |grep -v "${i%.h}.c";echo ;done | less
2018-11-19 11:12:28 +01:00
|
|
|
xml.c
|
|
|
|
xml.h
|
meson: recompile all sources for install_libudev_static and install_libsystemd_static
This means that when those targets are built, all the sources are built again,
instead of reusing the work done to create libbasic.a and other convenience static
libraries. It would be nice to not do this, but there seems to be no support in
our toolchain for joining multiple static libraries into one. When linking
a static library, any -l arguments are simply ignored by ar/gcc-ar, and .a
libraries given as positional arguments are copied verbatim into the archive
so they objects in them cannot be accessed.
https://stackoverflow.com/questions/2157629/linking-static-libraries-to-other-static-libraries
suggests either unzipping all the archives and putting them back togather,
or using a linker script. Unzipping and zipping back together seems ugly.
The other option is not very nice. The linker script language does not
allow "+" to appear in the filenames, and filenames that meson generates
use that, so files would have to be renamed before a linker script was used.
And we would have to generate the linker script on the fly. Either way, this
doesn't seem attractive. Since those static libraries are a niche use case,
it seems reasonable to just go with the easiest and safest solution and
recompile all the source files. Thanks to ccache, this is probably almost as
cheap as actually reusing the convenience .a libraries.
test-libsystemd-sym.c and test-libudev-sym.c compile fine with the generated
static libs, so it seems that they indeed provide all the symbols they should.
2018-04-25 15:29:48 +02:00
|
|
|
'''.split())
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 05:03:47 +02:00
|
|
|
|
2018-09-30 16:08:14 +02:00
|
|
|
if get_option('tests') != 'false'
|
|
|
|
shared_sources += files('tests.c', 'tests.h')
|
|
|
|
endif
|
|
|
|
|
2017-04-07 06:19:09 +02:00
|
|
|
test_tables_h = files('test-tables.h')
|
2018-07-31 09:44:11 +02:00
|
|
|
shared_sources += test_tables_h
|
2017-04-07 06:19:09 +02:00
|
|
|
|
2020-08-19 17:43:23 +02:00
|
|
|
generate_syscall_list = find_program('generate-syscall-list.py')
|
|
|
|
fname = 'syscall-list.h'
|
|
|
|
syscall_list_h = custom_target(
|
|
|
|
fname,
|
|
|
|
input : 'syscall-names.text',
|
|
|
|
output : fname,
|
|
|
|
command : [generate_syscall_list,
|
|
|
|
'@INPUT@'],
|
|
|
|
capture : true)
|
|
|
|
|
2017-10-03 10:41:51 +02:00
|
|
|
if conf.get('HAVE_ACL') == 1
|
meson: recompile all sources for install_libudev_static and install_libsystemd_static
This means that when those targets are built, all the sources are built again,
instead of reusing the work done to create libbasic.a and other convenience static
libraries. It would be nice to not do this, but there seems to be no support in
our toolchain for joining multiple static libraries into one. When linking
a static library, any -l arguments are simply ignored by ar/gcc-ar, and .a
libraries given as positional arguments are copied verbatim into the archive
so they objects in them cannot be accessed.
https://stackoverflow.com/questions/2157629/linking-static-libraries-to-other-static-libraries
suggests either unzipping all the archives and putting them back togather,
or using a linker script. Unzipping and zipping back together seems ugly.
The other option is not very nice. The linker script language does not
allow "+" to appear in the filenames, and filenames that meson generates
use that, so files would have to be renamed before a linker script was used.
And we would have to generate the linker script on the fly. Either way, this
doesn't seem attractive. Since those static libraries are a niche use case,
it seems reasonable to just go with the easiest and safest solution and
recompile all the source files. Thanks to ccache, this is probably almost as
cheap as actually reusing the convenience .a libraries.
test-libsystemd-sym.c and test-libudev-sym.c compile fine with the generated
static libs, so it seems that they indeed provide all the symbols they should.
2018-04-25 15:29:48 +02:00
|
|
|
shared_sources += files('acl-util.c')
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 05:03:47 +02:00
|
|
|
endif
|
|
|
|
|
2017-10-03 12:19:30 +02:00
|
|
|
if conf.get('ENABLE_UTMP') == 1
|
meson: recompile all sources for install_libudev_static and install_libsystemd_static
This means that when those targets are built, all the sources are built again,
instead of reusing the work done to create libbasic.a and other convenience static
libraries. It would be nice to not do this, but there seems to be no support in
our toolchain for joining multiple static libraries into one. When linking
a static library, any -l arguments are simply ignored by ar/gcc-ar, and .a
libraries given as positional arguments are copied verbatim into the archive
so they objects in them cannot be accessed.
https://stackoverflow.com/questions/2157629/linking-static-libraries-to-other-static-libraries
suggests either unzipping all the archives and putting them back togather,
or using a linker script. Unzipping and zipping back together seems ugly.
The other option is not very nice. The linker script language does not
allow "+" to appear in the filenames, and filenames that meson generates
use that, so files would have to be renamed before a linker script was used.
And we would have to generate the linker script on the fly. Either way, this
doesn't seem attractive. Since those static libraries are a niche use case,
it seems reasonable to just go with the easiest and safest solution and
recompile all the source files. Thanks to ccache, this is probably almost as
cheap as actually reusing the convenience .a libraries.
test-libsystemd-sym.c and test-libudev-sym.c compile fine with the generated
static libs, so it seems that they indeed provide all the symbols they should.
2018-04-25 15:29:48 +02:00
|
|
|
shared_sources += files('utmp-wtmp.c')
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 05:03:47 +02:00
|
|
|
endif
|
|
|
|
|
2017-10-03 10:41:51 +02:00
|
|
|
if conf.get('HAVE_SECCOMP') == 1
|
meson: recompile all sources for install_libudev_static and install_libsystemd_static
This means that when those targets are built, all the sources are built again,
instead of reusing the work done to create libbasic.a and other convenience static
libraries. It would be nice to not do this, but there seems to be no support in
our toolchain for joining multiple static libraries into one. When linking
a static library, any -l arguments are simply ignored by ar/gcc-ar, and .a
libraries given as positional arguments are copied verbatim into the archive
so they objects in them cannot be accessed.
https://stackoverflow.com/questions/2157629/linking-static-libraries-to-other-static-libraries
suggests either unzipping all the archives and putting them back togather,
or using a linker script. Unzipping and zipping back together seems ugly.
The other option is not very nice. The linker script language does not
allow "+" to appear in the filenames, and filenames that meson generates
use that, so files would have to be renamed before a linker script was used.
And we would have to generate the linker script on the fly. Either way, this
doesn't seem attractive. Since those static libraries are a niche use case,
it seems reasonable to just go with the easiest and safest solution and
recompile all the source files. Thanks to ccache, this is probably almost as
cheap as actually reusing the convenience .a libraries.
test-libsystemd-sym.c and test-libudev-sym.c compile fine with the generated
static libs, so it seems that they indeed provide all the symbols they should.
2018-04-25 15:29:48 +02:00
|
|
|
shared_sources += files('seccomp-util.c')
|
2020-08-19 17:43:23 +02:00
|
|
|
shared_sources += syscall_list_h
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 05:03:47 +02:00
|
|
|
endif
|
|
|
|
|
2017-10-03 10:41:51 +02:00
|
|
|
if conf.get('HAVE_LIBIPTC') == 1
|
2020-06-25 15:00:54 +02:00
|
|
|
shared_sources += files('firewall-util-iptables.c')
|
2017-04-26 22:14:23 +02:00
|
|
|
endif
|
|
|
|
|
2018-07-22 16:25:07 +02:00
|
|
|
if conf.get('HAVE_KMOD') == 1
|
|
|
|
shared_sources += files('module-util.c')
|
|
|
|
endif
|
|
|
|
|
2019-12-18 10:06:34 +01:00
|
|
|
if conf.get('HAVE_PAM') == 1
|
|
|
|
shared_sources += files('''
|
|
|
|
pam-util.c
|
|
|
|
pam-util.h
|
|
|
|
'''.split())
|
|
|
|
endif
|
|
|
|
|
2020-12-07 08:45:15 +01:00
|
|
|
if conf.get('ENABLE_NSCD') == 1
|
|
|
|
shared_sources += files('nscd-flush.c')
|
|
|
|
endif
|
|
|
|
|
2018-11-29 15:58:43 +01:00
|
|
|
generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh')
|
|
|
|
ip_protocol_list_txt = custom_target(
|
|
|
|
'ip-protocol-list.txt',
|
|
|
|
output : 'ip-protocol-list.txt',
|
|
|
|
command : [generate_ip_protocol_list, cpp],
|
2018-11-28 12:20:29 +01:00
|
|
|
capture : true)
|
|
|
|
|
2018-11-29 15:58:43 +01:00
|
|
|
fname = 'ip-protocol-from-name.gperf'
|
2018-11-28 12:20:29 +01:00
|
|
|
gperf_file = custom_target(
|
|
|
|
fname,
|
2018-11-29 15:58:43 +01:00
|
|
|
input : ip_protocol_list_txt,
|
2018-11-28 12:20:29 +01:00
|
|
|
output : fname,
|
2018-11-29 15:58:43 +01:00
|
|
|
command : [generate_gperfs, 'ip_protocol', 'IPPROTO_', '@INPUT@'],
|
2018-11-28 12:20:29 +01:00
|
|
|
capture : true)
|
|
|
|
|
2018-11-29 15:58:43 +01:00
|
|
|
fname = 'ip-protocol-from-name.h'
|
2018-11-28 12:20:29 +01:00
|
|
|
target1 = custom_target(
|
|
|
|
fname,
|
|
|
|
input : gperf_file,
|
|
|
|
output : fname,
|
|
|
|
command : [gperf,
|
|
|
|
'-L', 'ANSI-C', '-t', '--ignore-case',
|
2018-11-29 15:58:43 +01:00
|
|
|
'-N', 'lookup_ip_protocol',
|
|
|
|
'-H', 'hash_ip_protocol_name',
|
2018-11-28 12:20:29 +01:00
|
|
|
'-p', '-C',
|
|
|
|
'@INPUT@'],
|
|
|
|
capture : true)
|
|
|
|
|
2018-11-29 15:58:43 +01:00
|
|
|
fname = 'ip-protocol-to-name.h'
|
|
|
|
awkscript = 'ip-protocol-to-name.awk'
|
2018-11-28 12:20:29 +01:00
|
|
|
target2 = custom_target(
|
|
|
|
fname,
|
2018-11-29 15:58:43 +01:00
|
|
|
input : [awkscript, ip_protocol_list_txt],
|
2018-11-28 12:20:29 +01:00
|
|
|
output : fname,
|
|
|
|
command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
|
|
|
|
capture : true)
|
|
|
|
|
2018-11-29 16:28:33 +01:00
|
|
|
shared_generated_gperf_headers = [target1, target2]
|
|
|
|
shared_sources += shared_generated_gperf_headers
|
2018-11-28 12:20:29 +01:00
|
|
|
|
meson: build systemd using meson
It's crucial that we can build systemd using VS2010!
... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.
This is not complete, I'm throwing it out here for your amusement and critique.
- rules for sd-boot are missing. Those might be quite complicated.
- rules for tests are missing too. Those are probably quite simple and
repetitive, but there's lots of them.
- it's likely that I didn't get all the conditions right, I only tested "full"
compilation where most deps are provided and nothing is disabled.
- busname.target and all .busname units are skipped on purpose.
Otherwise, installation into $DESTDIR has the same list of files and the
autoconf install, except for .la files.
It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.
meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.
The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.
v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments
v3:
- drop required:true and fix progs/prog typo
v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute
v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components
v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.
v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
split-usr==true.
v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it
v9:
- indentation
v10:
- fix check for qrencode and libaudit
v11:
- unify handling of executable paths, provide options for all progs
This makes the meson build behave slightly differently than the
autoconf-based one, because we always first try to find the executable in the
filesystem, and fall back to the default. I think different handling of
loadkeys, setfont, and telinit was just a historical accident.
In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
but in Debian, those directories are not included in the path.
C.f. https://github.com/mesonbuild/meson/issues/1576.
- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-05 05:03:47 +02:00
|
|
|
libshared_name = 'systemd-shared-@0@'.format(meson.project_version())
|
|
|
|
|
2017-06-21 12:05:15 +02:00
|
|
|
libshared_deps = [threads,
|
|
|
|
libacl,
|
2019-11-12 15:30:01 +01:00
|
|
|
libblkid,
|
|
|
|
libcap,
|
2019-11-13 23:13:42 +01:00
|
|
|
libcrypt,
|
2017-06-21 12:05:15 +02:00
|
|
|
libgcrypt,
|
|
|
|
libiptc,
|
2018-07-06 11:57:54 +02:00
|
|
|
libkmod,
|
2019-11-12 15:30:01 +01:00
|
|
|
liblz4,
|
2018-11-29 10:29:34 +01:00
|
|
|
libmount,
|
2019-11-05 11:49:27 +01:00
|
|
|
libopenssl,
|
|
|
|
libp11kit,
|
2019-12-18 10:06:34 +01:00
|
|
|
libpam,
|
2019-11-12 15:30:01 +01:00
|
|
|
librt,
|
2017-06-21 12:05:15 +02:00
|
|
|
libseccomp,
|
|
|
|
libselinux,
|
2020-04-12 01:09:05 +02:00
|
|
|
libzstd,
|
2019-11-12 15:30:01 +01:00
|
|
|
libxz]
|
2017-06-21 12:05:15 +02:00
|
|
|
|
2017-08-28 18:49:03 +02:00
|
|
|
libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
|
|
|
|
|
2017-12-19 14:19:46 +01:00
|
|
|
libshared_static = static_library(
|
2017-04-18 01:25:00 +02:00
|
|
|
libshared_name,
|
|
|
|
shared_sources,
|
2017-12-19 14:19:46 +01:00
|
|
|
include_directories : includes,
|
|
|
|
dependencies : libshared_deps,
|
|
|
|
c_args : ['-fvisibility=default'])
|
|
|
|
|
|
|
|
libshared = shared_library(
|
|
|
|
libshared_name,
|
2017-04-18 01:25:00 +02:00
|
|
|
include_directories : includes,
|
2017-08-28 18:49:03 +02:00
|
|
|
link_args : ['-shared',
|
2017-12-19 14:19:46 +01:00
|
|
|
'-Wl,--version-script=' + libshared_sym_path],
|
|
|
|
link_whole : [libshared_static,
|
2017-12-19 19:06:56 +01:00
|
|
|
libbasic,
|
2017-12-19 19:14:03 +01:00
|
|
|
libbasic_gcrypt,
|
2017-12-19 19:38:43 +01:00
|
|
|
libsystemd_static,
|
|
|
|
libjournal_client],
|
2017-04-18 01:25:00 +02:00
|
|
|
c_args : ['-fvisibility=default'],
|
2017-06-21 12:05:15 +02:00
|
|
|
dependencies : libshared_deps,
|
2017-04-18 01:25:00 +02:00
|
|
|
install : true,
|
|
|
|
install_dir : rootlibexecdir)
|
2020-08-18 16:27:20 +02:00
|
|
|
|
|
|
|
############################################################
|
|
|
|
|
|
|
|
run_target(
|
|
|
|
'syscall-names-update',
|
|
|
|
command : [syscall_names_update_sh, meson.current_source_dir()])
|