Commit graph

196 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek e783f95718 Rename "system-preset" source dir to "presets"
I want to add presets/user/ later. This mirrors the layout for units:
we have units/ and units/user. The advantage is that we avoid having yet
another directory at the top level.
2017-12-06 10:18:35 +01:00
Yu Watanabe d6806870a2 meson: fix indentation 2017-12-05 14:01:39 +09:00
Ikey Doherty 84786b8e32 sysusers: Provide meson argument to set gid for 'users' group (#7533)
To allow better integration with distributions requiring an explicitly
set gid for the `users` group, provide the new `-Dusers-gid` option to
set to a new numeric value.

In the absence of a specified gid, we'll fallback to the default existing
behaviour of `-` as the gid value, to automatically assign the next available
gid on the system.
2017-12-03 13:28:23 +01:00
Zbigniew Jędrzejewski-Szmek d9daae55d5 tmpfiles: add a special return code for syntax failures
In this way, individual errors in files can be treated differently than a
failure of the whole service.

A test is added to check that the expected value is returned.
Some parts are commented out, because it is not. This will be fixed in
a subsequent commit.
2017-12-01 18:58:54 +01:00
Zbigniew Jędrzejewski-Szmek 7f2806d509 Add x-systemd.growfs option for fstab 2017-11-30 20:46:30 +01:00
Zbigniew Jędrzejewski-Szmek da495a0385 Add x-systemd.makefs option for fstab
I opted to completely generate a unit for both mount points and swaps. For
swaps, it would be possible to use fixed template unit like systemd-mkswap@.service,
because there's no information passed except the device name. For mount points,
that's not possible because both the device name and file system type need to
be passed. Nevertheless, I expect that options will need to passed to both mkfs
and mkswap, in which case it'll be necessary to create units of both types
anyway.
2017-11-30 20:46:30 +01:00
Zbigniew Jędrzejewski-Szmek b7f28ac51f Add mkfs wrapper which first checks if the partition is empty 2017-11-30 20:46:30 +01:00
Zbigniew Jędrzejewski-Szmek c34b75a124 growfs: add support for resizing encrypted partitions 2017-11-30 20:43:25 +01:00
Zbigniew Jędrzejewski-Szmek 80750adb22 Add systemd-growfs tool 2017-11-30 20:43:25 +01:00
Zbigniew Jędrzejewski-Szmek 9a8e64b0e9 meson: emit a warning if rootprefix is set
It's printed at the end because it's the easiest to spot there.

When meson is upgraded to 0.43.1, we'll be able to use warning() instead.
2017-11-29 13:29:59 +01:00
Zbigniew Jędrzejewski-Szmek 74344a1702 Revert "meson: drop rootprefix option"
This reverts commit ee4bfa21f6.

Also add comment so that this doesn't get deleted again by mistake.

Replaces #7461.
2017-11-28 20:02:53 +01:00
Yu Watanabe dd5082a9de
Merge pull request #7468 from yuwata/fix-7362
test and meson cleanups
2017-11-26 12:35:07 +09:00
Yu Watanabe e481645174 meson: update header file to detect memfd_create() 2017-11-26 02:17:06 +09:00
Yu Watanabe 359b496f66 meson: remove abbreviations in status 2017-11-25 20:35:24 +09:00
Yu Watanabe 8a38aac3a7 meson: do not install RPM macros if rpmmacrosdir is set to no (#7430)
Fixes #7427.
2017-11-23 14:20:22 +01:00
Zbigniew Jędrzejewski-Szmek 6b97bf2287 meson: re-attach rule-syntax-check.py test
39/248 rule-syntax-check                       OK     0.07 s

--- command ---
/home/zbyszek/src/systemd-work/test/rule-syntax-check.py \
    /home/zbyszek/src/systemd-work/build/../rules/60-block.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-cdrom_id.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-drm.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-evdev.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-input-id.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-persistent-alsa.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-persistent-input.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-persistent-storage.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-persistent-storage-tape.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-persistent-v4l.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-sensor.rules \
    /home/zbyszek/src/systemd-work/build/../rules/60-serial.rules \
    /home/zbyszek/src/systemd-work/build/../rules/70-joystick.rules \
    /home/zbyszek/src/systemd-work/build/../rules/70-mouse.rules \
    /home/zbyszek/src/systemd-work/build/../rules/70-touchpad.rules \
    /home/zbyszek/src/systemd-work/build/../rules/75-net-description.rules \
    /home/zbyszek/src/systemd-work/build/../rules/75-probe_mtd.rules \
    /home/zbyszek/src/systemd-work/build/../rules/78-sound-card.rules \
    /home/zbyszek/src/systemd-work/build/../rules/80-drivers.rules \
    /home/zbyszek/src/systemd-work/build/../rules/80-net-setup-link.rules \
    /home/zbyszek/src/systemd-work/build/rules/50-udev-default.rules \
    /home/zbyszek/src/systemd-work/build/rules/64-btrfs.rules \
    /home/zbyszek/src/systemd-work/build/rules/99-systemd.rules
--- stdout ---
...
-------

It got dropped by mistake in 72cdb3e783.
2017-11-22 12:46:08 +01:00
Susant Sahani d6df583c87 networkd: introduce vxcan netdev. (#7150)
Similar to the virtual ethernet driver veth, vxcan implements a
local CAN traffic tunnel between two virtual CAN network devices.
When creating a vxcan, two vxcan devices are created as pair
When one end receives the packet it appears on its pair and vice
versa. The vxcan can be used for cross namespace communication.
2017-11-22 08:23:22 +01:00
Zbigniew Jędrzejewski-Szmek 97279d8380 meson: "upgrade" -Wimplicit-fallthrough to 5
5 means that only the explicit attribute introduced in previous commit
is accepted. We don't want the comments anymore.
2017-11-21 12:47:51 +01:00
Zbigniew Jędrzejewski-Szmek 18c8db140f meson: add -Wimplicit-fallthrough=3 to compilation options (#7393)
At some point before gcc-7 was released, -Wimplicit-fallthrough=3 was included
in -Wextra. The documentation for gcc-7.2.1-2.fc27.x86_64 still says that, but
empirical testing shows that it's not. The documentation also misstates that
-Wimplicit-fallthrough is equivalent to -Wimplicit-fallthrough=3.

Let's add -Wimplicit-fallthrough=3 explicitly to get the warnings if we regress.

Prompted by #7389.
2017-11-20 12:14:47 +01:00
Zbigniew Jędrzejewski-Szmek 86ea8d70fc
meson: bump required meson version to 0.41 (#7385)
We need data_dirs argument for i18n.merge_file, added in 0.40.1-11-g82492f5d76.
2017-11-20 08:08:43 +01:00
Lennart Poettering 0e74bad141
Merge pull request #7376 from keszybz/simplify-root-options
Simplify root configuration options
2017-11-19 19:50:03 +01:00
Zbigniew Jędrzejewski-Szmek 3a726fcd08 Add license headers and SPDX identifiers to meson.build files
So far I avoided adding license headers to meson files, but they are pretty
big and important and should carry license headers like everything else.
I added my own copyright, even though other people modified those files too.
But this is mostly symbolic, so I hope that's OK.
2017-11-19 19:08:15 +01:00
Zbigniew Jędrzejewski-Szmek 0c6e2702b6 meson: use absolute path for rpmmacrosdir
This only matter for the status display at the end of configure step.
Now it looks like:
         RPM macros dir:                    /usr/lib/rpm/macros.d
2017-11-17 13:22:13 +01:00
Zbigniew Jędrzejewski-Szmek ee4bfa21f6 meson: drop rootprefix option
rootprefixdir is now always set to /usr or /, based on the split-usr setting.
Anything else does not work anyway.

C.f. #7375.
2017-11-17 13:08:00 +01:00
Tom Stellard 4e15a7343c udev-rules: Permission changes for /dev/dri/renderD*
- Remove the uaccess tag from /dev/dri/renderD*.
- Change the owning group from video to render.
- Change default mode to 0666.
- Add an option to allow users to set the access mode for these devices at
compile time.
2017-11-08 08:21:31 -08:00
Lennart Poettering 35682fd4a1 Merge pull request #7127 from keszybz/sundry-tweaks
Various unrelated small patches
2017-10-26 10:57:00 +02:00
Michael Biebl 02fa054dc4 modprobe.d: fix directory of modprobe configuration file (#7149)
kmod upstream uses /lib/modprobe.d which means we need to use rootprefix
instead of prefix for installing the modprobe configuration file as
otherwise split-usr systems are broken.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879191
2017-10-21 08:32:50 +02:00
Zbigniew Jędrzejewski-Szmek 9476ddba60 meson: drop unneeded check for grep 2017-10-18 17:14:05 +02:00
Yu Watanabe a7456af52c meson: fix feature list (#7011) 2017-10-06 09:33:21 +02:00
Lennart Poettering d128f369bc build-sys: bump so revisions for prepation of 235 2017-10-05 17:14:04 +02:00
Zbigniew Jędrzejewski-Szmek a9149d876b meson: generate ENABLE_* names automatically
After previous changes, the naming of configuration options and internal
defines is consistent.
2017-10-04 12:09:51 +02:00
Zbigniew Jędrzejewski-Szmek 1ec57f3394 build-sys: s/ENABLE_RESOLVED/ENABLE_RESOLVE/
The configuration option was called -Dresolve, but the internal define
was …RESOLVED. This options governs more than just resolved itself, so
let's settle on the version without "d".
2017-10-04 12:09:51 +02:00
Zbigniew Jędrzejewski-Szmek 08cf5b8dc3 build-sys: s/HAVE_MYHOSTNAME/ENABLE_MYHOSTNAME/
Same justification as for HAVE_UTMP. HAVE_MYHOSTNAME was used before mysthostname
was merged into systemd.
2017-10-04 12:09:51 +02:00
Zbigniew Jędrzejewski-Szmek f9fa32f09c build-sys: s/HAVE_SMACK/ENABLE_SMACK/
Same justification as for HAVE_UTMP.
2017-10-04 12:09:50 +02:00
Zbigniew Jędrzejewski-Szmek 392fd235fd build-sys: s/HAVE_IMA/ENABLE_IMA/
Same justification as for HAVE_UTMP.
2017-10-04 12:09:50 +02:00
Zbigniew Jędrzejewski-Szmek 3211da4bcb build-sys: s/HAVE_UTMP/ENABLE_UTMP/
"Have" should be about the external environment and dependencies. Anything
which is a pure yes/no choice should be "enable".
2017-10-04 12:09:50 +02:00
Zbigniew Jędrzejewski-Szmek 70160ce891 build-sys: require all defines under #if to be present
This should help to catch any errors with typos and HAVE/ENABLE mismatches.
2017-10-04 12:09:50 +02:00
Zbigniew Jędrzejewski-Szmek 349cc4a507 build-sys: use #if Y instead of #ifdef Y everywhere
The advantage is that is the name is mispellt, cpp will warn us.

$ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/"
$ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;'
$ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g'
$ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g'
+ manual changes to meson.build

squash! build-sys: use #if Y instead of #ifdef Y everywhere

v2:
- fix incorrect setting of HAVE_LIBIDN2
2017-10-04 12:09:29 +02:00
Zbigniew Jędrzejewski-Szmek af8786b16a meson: check for sys/auxv.h
This check was present in configure.ac, but was never added under meson.
The code under HAVE_SYS_AUX_H has been dead ever since :(.
2017-10-03 13:19:51 +02:00
Zbigniew Jędrzejewski-Szmek 4b9545f19e build-sys: change all HAVE_DECL_ macros to HAVE_
This is a legacy of autotools, where one detection routine used a different
prefix then the others.

$ git grep -e HAVE_DECL_ -l|xargs sed -i s/HAVE_DECL_/HAVE_/g
2017-10-03 10:32:34 +02:00
Zbigniew Jędrzejewski-Szmek 56d50ab1d3 meson: move library version defines to the top (#6939) 2017-09-28 19:24:16 +02:00
Lennart Poettering 63950427ab meson: bump release to 235 2017-09-28 11:29:52 +02:00
Daniel Mack 71e5200f94 Add abstraction model for BPF programs
This object takes a number of bpf_insn members and wraps them together with
the in-kernel reference id. Will be needed by the firewall code.
2017-09-22 15:24:54 +02:00
Zbigniew Jędrzejewski-Szmek d6e8096669 build-sys: require libmount >= 2.30 (#6795)
Fixes #4871.

The new libmount has two changes relevant for us:

- x-* options are propagated to /run/mount/utab and are visible through
  libmount (fixes #4817).

- umount -c now really works (partially solves #6115).
2017-09-15 14:47:57 +02:00
Susant Sahani bce67bbee3 networkd: add support to configure IP Rule (#5725)
Routing Policy rule manipulates rules in the routing policy database control the
route selection algorithm.

This work supports to configure Rule
```
[RoutingPolicyRule]
TypeOfService=0x08
Table=7
From= 192.168.100.18

```

```
ip rule show
0:	from all lookup local
0:	from 192.168.100.18 tos 0x08 lookup 7
```

V2 changes:

1. Added logic to handle duplicate rules.
2. If rules are changed or deleted and networkd restarted
   then those are deleted when networkd restarts next time

V3:

1. Add parse_fwmark_fwmask
2017-09-14 21:51:39 +02:00
Zbigniew Jędrzejewski-Szmek fb1b58820f build-sys: make nonnull warning non-fatal (#6742)
Seems to be some kind of confusion in gcc. Insteading of playing whack-a-mole and
adding work-arounds in code, let's adjust the compilation options instead.

Fixes #6119, replaces #6657.
2017-09-04 18:49:12 +02:00
Davide Cavalca 5e1771ace0 meson: add . to include_directories (#6634) 2017-08-30 17:34:44 +02:00
Davide Cavalca 450b60baa5 meson: use current_source_dir() to scope git invocations (#6635) 2017-08-30 17:04:53 +02:00
Felipe Sateler dcfe072ad6 build-sys: don't build networkctl if networkd is disabled 2017-08-23 16:10:42 -03:00
userwithuid e85a690b96 build-sys: fix invalid args detected by meson 0.42 (#6561)
some run_target() calls were using params from custom_target()

example message:
WARNING: Passed invalid keyword argument "input". This will become a hard error in the future.

New way to call targets:
ninja man/man
ninja man/html
ninja man/update-man-rules
2017-08-09 09:41:44 -04:00
Yu Watanabe ad6fc5bbae meson: fix modprobedir (#6523)
Follow-up for 582faeb461.
2017-08-03 08:01:38 -04:00
Dimitri John Ledkov 582faeb461 modprobe.d: ship drop-in to set bonding max_bonds to 0 (#6448)
This allows networkd to correctly manage bond0 using networkd, when requested
by the user.

Fixes #5971 #6184
2017-08-02 08:41:18 -04:00
Lennart Poettering f19ca6105e Merge pull request #6420 from keszybz/gateway-name
Rename "gateway" to "_gateway" and other resolved changes
2017-08-01 09:43:41 +02:00
Zbigniew Jędrzejewski-Szmek 5248e7e1f1 resolved,nss-myhostname: use _gateway for the gateway
This changes the symbolic name for the default gateway from "gateway" to
"_gateway". A new configuration option -Dcompat-gateway-hostname=true|false
is added. If it is set, the old name is also supported, but the new name
is used as the canonical name in either case. This is intended as a temporary
measure to make the transition easier, and the option should be removed
after a few releases, at which point only the new name will be used.

The old "gateway" name mostly works OK, but hasn't gained widespread acceptance
because of the following (potential) conflicts:
- it is completely legal to have a host called "gateway"
- there is no guarantee that "gateway" will not be registered as a TLD, even
  though this currently seems unlikely. (Even then, there would be no
  conflict except for the case when the top-level domain itself was being resolved.
  The "gateway" or "_gateway" labels have only special meaning when the
  whole name consists of a single label, so resolution of any subdomain
  of the hypothetical gateway. TLD would still work OK. )
Moving to "_gateway" avoids those issues because underscores are not allowed
in host names (RFC 1123, §2.1) and avoids potential conflicts with local or
global names.

v2:
- simplify the logic to hardcode "_gateway" and allow
  -Dcompat-gateway-hostname=true as a temporary measure.
2017-07-31 14:41:56 -04:00
Martin Pitt 896bbe7611 Merge pull request #6365 from keszybz/fast-tests
Make tests faster by default
2017-07-28 11:09:50 +02:00
Zbigniew Jędrzejewski-Szmek 9d39c1bf29 meson: add empty lines before enabled/disabled status
Those line are long enough to wrap around a few times, and they are
much more legible with some whitespace.
2017-07-26 14:17:50 -04:00
Zbigniew Jędrzejewski-Szmek a44fb6019f meson.build: reorder tests to match order in meson_options.txt
This makes it easier to edit both files.
2017-07-26 14:08:46 -04:00
Zbigniew Jędrzejewski-Szmek 003c887967 meson: install the git hook (#6425)
This was done autogen.sh previously and was dropped in
72cdb3e783. Let's add it back.
The meson configuration step is the only reasonable place.

Note that this only works for the most standard git dirs, e.g.
the hook will not be installed if git worktree is used or if
$GIT_DIR is specified, etc. I think that's OK because most of
the time meson will be run at least once in the original cloned
dir.
2017-07-24 10:41:45 +02:00
Zbigniew Jędrzejewski-Szmek 18b9ad1f61 build-sys: rename SD_BOOT_LOG_TPM to ENABLE_TPM
This makes it more like other configure defines.

Also, it fixes meson status output which was looking for HAVE_ and ENABLE_
prefixes only (the define under meson was OK, just the summary message was
wrong.)
2017-07-18 10:05:06 -04:00
Zbigniew Jędrzejewski-Szmek 00d82c81db meson: add option to configure "slow" tests on/off
This is just the meson part, no functional change.
Use meson -D slow-tests=yes to set the default,
or SYSTEMD_SLOW_TESTS=yes build/test-foobar for just one test.
Setting the default is more useful for installed tests.
2017-07-13 17:52:49 -04:00
Zbigniew Jędrzejewski-Szmek 7f7ab22892 NEWS: say that libidn2 is experimental (#6335)
Handling of "_" and some other details requires more thought:
https://gitlab.com/libidn/libidn2/issues/30

Let's switch the default back to libidn and add a note in NEWS.
2017-07-12 09:25:59 +02:00
Zbigniew Jędrzejewski-Szmek 75cf1d66b0 meson: use -Wextra if available
-Wextra was not added to CFLAGS under meson by default, as it is
done by the autotools build.

C.f. 218f467111.
2017-07-04 18:26:01 -04:00
Zbigniew Jędrzejewski-Szmek 0700e8ba71 meson: add support for ctags
This is a squash of casync commits
02fbbdb2b9
(by Silvio Fricke)
and b687a94b1e.

Instead of checking during every meson config whether etags are
available, just try to call them and error out if not. This has
the advantage that the target is always available (if git is installed),
and the error message gives a hint what needs to be installed.

The naming is confusing, but etags(1) is pretty clear:
- emacs expects TAGS file in etags format
- vi expects tags file in ctags format
and automake docs are pretty clear too:
- tags target generates TAGS file
- ctags target generates tags file
2017-07-03 12:42:29 -04:00
Lennart Poettering 4309172946 build-sys: bump versions in prepare for v234 2017-06-27 23:11:26 +02:00
Zbigniew Jędrzejewski-Szmek f52b982cc9 meson: stop setting the linker (#6182)
If wanted, the linker can be set with LDFLAGS (LDFLAGS=-Wl,-fuse-ld=gold meson ...),
and setting it internally was interfering with that. It seems that both gold and
bfd work very well and quick, and the reasons we had to prefer gold are not relevant
anymore.

Fixes #6169.
2017-06-26 15:00:45 +02:00
Waldemar Brodkorb e7e11bbf34 make nss-systemd support conditional (#6155)
This allows the nss-systemd module to be disabled on minimal installations.
2017-06-24 13:30:26 -04:00
Michael Biebl 7cdd978346 meson: install manual and unsafe tests (#6178)
Always install all tests if install-tests is set to true, as they might
be useful for CI. This includes manual and unsafe tests. Install those
in subdirectories of /usr/lib/systemd/tests.

Fixes #6163.
2017-06-22 21:23:30 -04:00
Zbigniew Jędrzejewski-Szmek 4b57a27200 meson: add -pthreads and more libs when -Dlink-udev-shared=false (#6159)
Three binaries would fail to link when ld.bfd was used and link-udev-shared was
false. Add -pthreads (again) to the failing binaries and synchronize the
dependency list between libsystemd-shared .a and .so versions.
Apart from allowing the build to succeed, this shouldn't have much effect becuase
systemd-networkd was already using pthreads.

Fixes #5828.
2017-06-21 12:05:15 +02:00
Yu Watanabe 42303dcb1a resolved: ignore DNSSEC= option when resolved is built without gcrypt (#6084)
Fixes #5583.
2017-06-17 16:22:32 -04:00
Zbigniew Jędrzejewski-Szmek d1bf56759b meson: add -Didn=yes|no option 2017-06-16 09:21:15 -04:00
Zbigniew Jędrzejewski-Szmek 341b892ba2 meson: output TAGS file in source not build directory
The TAGS file was generated in build/ following what autotools did.
Nevertheless, it's more convenient to put in the source dir.
(It doesn't get deleted by mistake, and it's easier to find for the
editor.)
2017-05-30 21:36:27 -04:00
Zbigniew Jędrzejewski-Szmek 94e2523b70 tests,meson: add test-bus-vtable, compiled as C and C++
This test is mostly a compilation test that checks that various defines in
sd-bus-vtable.h are valid C++. The code is executed, but the results are not
checked (apart from sd-bus functions not returning an error). test-bus-objects
contains pretty extensive tests for this functionality.

The C++ version is only added to meson, since it's simpler there.
Because of the .cc extension, meson will compile the executable with c++.

This test is necessary to properly check the macros in sd-bus-vtable.h. Just
running the headers through g++ is not enough, because the macros are not
exercised.

Follow-up for #5941.
2017-05-13 15:50:44 -04:00
Lennart Poettering 6e4177315f Merge pull request #5432 from keszybz/udev-logging
udev logging separation
2017-05-12 15:22:46 +02:00
Zbigniew Jędrzejewski-Szmek 5486a31d28 nss-resolve: drop the internal fallback to libnss_dns (#5945)
If we could not communicate with systemd-resolved, we would call into
libnss_dns. libnss_dns would return NOTFOUND for stuff like "localhost" and
other names resolved by nss-myhostname, which we would fall under the !UNAVAIL=
condition and cause resolution to fail. So the following recommended
configuration in nsswitch.conf would not work:

   hosts: resolve [!UNAVAIL=return] dns myhostname

Remove the internal fallback code completely so that the fallback logic
can be configured in nsswitch.conf.

Tested with
   hosts: resolve [!UNAVAIL=return] myhostname
and
   hosts: resolve [!UNAVAIL=return] dns myhostname

Fixes #5742.
2017-05-12 14:31:46 +02:00
Lennart Poettering 3823da25cf Merge pull request #5928 from keszybz/libidn2
Use idn2 instead of idn
2017-05-12 12:01:40 +02:00
Zbigniew Jędrzejewski-Szmek 87057e244b resolved: support libidn2 in addition to libidn
libidn2 2.0.0 supports IDNA2008, in contrast to libidn which supports IDNA2003.

https://bugzilla.redhat.com/show_bug.cgi?id=1449145
From that bug report:

Internationalized domain names exist for quite some time (IDNA2003), although
the protocols describing them have evolved in an incompatible way (IDNA2008).
These incompatibilities will prevent applications written for IDNA2003 to
access certain problematic domain names defined with IDNA2008, e.g., faß.de is
translated to domain xn--fa-hia.de with IDNA2008, while in IDNA2003 it is
translated to fass.de domain. That not only causes incompatibility problems,
but may be used as an attack vector to redirect users to different web sites.

v2:
- keep libidn support
- require libidn2 >= 2.0.0
v3:
- keep dns_name_apply_idna caller dumb, and keep the #ifdefs inside of the
  function.
- use both ±IDN and ±IDN2 in the version string
2017-05-11 14:25:01 -04:00
Franck Bui b14e1b4394 sysusers: make group shadow support configurable
Some distros (openSUSE) don't have group shadow support enabled. This can lead
to the following error:

  # systemd-sysusers
  Creating group foofoo with gid 478.
  # systemd-sysusers
  # groupdel foofoo
  # systemd-sysusers
  Creating group foofoo with gid 478.
  Failed to write files: File exists

This patch adds --disable-gshadow option to configure. If used,
systemd-sysvusers won't consider /etc/gshadow.
2017-05-10 10:19:37 +02:00
Zbigniew Jędrzejewski-Szmek 5c72049f91 udev: use LOG_REALM_UDEV in all udev code
Any call to set/query/use the log level in the code with LOG_REALM=LOG_REALM_UDEV
refers to log_max_level[1]. In particular this means that systemd code using
the libudev library uses does not set the log level for log calls done in libudev.

Fixes #4525.

v2:
- also update meson's meson.build
2017-05-07 22:49:12 -04:00
Zbigniew Jędrzejewski-Szmek 2c201c2140 meson: use booleans for conf.set and drop unecessary conditionals
Using conf.set() with a boolean argument does the right thing:
either #ifdef or #undef. This means that conf.set can be used unconditionally.

Previously I used '1' as the placeholder value, and that needs to be changed to
'true' for consistency (under meson 1 cannot be used in boolean context). All
checks need to be adjusted.
2017-05-02 16:29:11 -04:00
Zbigniew Jędrzejewski-Szmek 829257d135 meson: add status report
This is similar to what ./configure prints. Instead of a long list of yes/no lines,
I added two lines at the end with "enabled features" and "disabled features".
This is what the mplayer/mencoder ./configure script did back in the day.
The advantage is that it's easy to look at the list of disabled features
and check for any unexpected entries.
2017-05-02 16:29:11 -04:00
Zbigniew Jędrzejewski-Szmek 671677dad1 meson: add forgotten debug options
v2:
-rename -Dextra-debug to -Ddebug to match ./configure --debug
2017-05-02 16:28:40 -04:00
Martin Pitt b13586206b Merge pull request #5827 from keszybz/meson-libcap
meson: fixes to allow meson builds on Ubuntu Trusty
2017-04-27 22:12:28 +02:00
Zbigniew Jędrzejewski-Szmek 0bc9115251 Merge branch 'master' into meson-no-libudev 2017-04-27 13:39:54 -04:00
Zbigniew Jędrzejewski-Szmek 2c5434ad3c meson: fix detection of "-Wno-" options 2017-04-27 10:05:41 -04:00
Zbigniew Jędrzejewski-Szmek 9f0e9c0119 meson: add version check for libseccomp
Compilation fails because of the missing arm64 bits with old seccomp versions.
2017-04-27 10:05:18 -04:00
Zbigniew Jędrzejewski-Szmek 1800cc8546 meson: also search for libcap directly 2017-04-27 01:30:30 -04:00
Michael Biebl c3045943c4 meson: get rid of libfirewall 2017-04-26 22:14:23 +02:00
Michael Biebl 34ce0a52c7 meson: drop implicit libudev link dependencies
Executables which link against libshared do not need an explicit
dependency on libudev, as libshared will make sure that those symbols
are available.
2017-04-26 17:28:48 +02:00
Susant Sahani 9dfed8dd92 meson: add geneve to build system
```
[107/1793] Compiling c object 'src/basic/basic@sta/log.c.o'
In file included from ../src/basic/log.c:44:0:
../src/basic/missing.h:762:6: warning: "HAVE_DECL_IFLA_GENEVE_LABEL" is not defined, evaluates to 0 [-Wundef]
^~~~~~~~~~~~~~~~~~~~~~~~~~~
[108/1793] Compiling c object 'src/basic/basic@sta/path-util.c.o'
In file included from ../src/basic/path-util.c:40:0:
../src/basic/missing.h:762:6: warning: "HAVE_DECL_IFLA_GENEVE_LABEL" is not defined, evaluates to 0 [-Wundef]
^~~~~~~~~~~~~~~~~~~~~~~~~~~

```
2017-04-25 20:30:34 +05:30
Zbigniew Jędrzejewski-Szmek d730e2d164 meson: require newest meson and revert m4 patch
This reverts 78b68dcb55.
2017-04-25 08:49:58 -04:00
Zbigniew Jędrzejewski-Szmek 7572aa805c meson: use name arg so check result is reported 2017-04-25 08:49:16 -04:00
Zbigniew Jędrzejewski-Szmek 6e2afb1cab meson: fix checking of linker args
Previous checks did nothing, because cc.has_argument only does compilation,
without any linking. Unfortunately cc.links() cannot be used, because it does
not accept any options. Providing the test file as a static source is easiest,
even if not every elegant.

https://github.com/mesonbuild/meson/issues/1676
2017-04-25 08:49:16 -04:00
Zbigniew Jędrzejewski-Szmek dd6ab3df74 meson: add git-snapshot target
The output is systemd-<sha1abbrev>.tar.gz in source root.
2017-04-24 19:28:05 -04:00
Zbigniew Jędrzejewski-Szmek 5464ec8a8e meson: there is no smack library
Detection would always fail, so this was broken.
Treat this as a binary enable/disable option.
2017-04-24 19:28:04 -04:00
Zbigniew Jędrzejewski-Szmek 80c6fce81c meson: add forgotten tpm support 2017-04-24 19:28:04 -04:00
Zbigniew Jędrzejewski-Szmek 41afb5eb72 meson: use -f{function,data}-sections for optimized builds 2017-04-24 19:28:04 -04:00
Michael Biebl 0da6f39619 meson: allow static linking of systemd-hwdb
Various distros split udev and its helpers into a separate binary
package. In case of Debian this also includes systemd-hwdb.
In Debian, the udev package is not supposed to depend on systemd, so a
dependency on libsystemd-shared.so is not desired. Allow the
systemd-hwdb binary to be linked statically if link-udev-shared is set
to false.

Follow-up for 3a30f21ff8.
2017-04-24 19:25:33 -04:00
Michael Biebl 76c8741060 meson: fix gcrypt config option
Also detect libgpg-error. Require both to be present for HAVE_CRYPT,
even though libgpg-error is only used in src/resolve. If one is available,
the other should be too, so it doesn't seem worth the trouble to make two
separate conditions.
2017-04-24 19:25:33 -04:00
Zbigniew Jędrzejewski-Szmek 36f0387efc meson: add option to disable libacl support 2017-04-24 19:25:33 -04:00
Zbigniew Jędrzejewski-Szmek 6800fe7f06 meson: define gnu_efi_arch for the arch efi name, fix ldsdir detection
This fixes ldsdir detection under Debian.

v2:
- define gnu_efi_arch for the arch efi include directory name

  In the autotools naming convention, efi_arch and this directory always had
  the same name. But meson.cpu_family() uses a slightly different convention,
  so those two don't always match.
2017-04-24 19:24:36 -04:00