From 15e5974a9b4621a99eb86bc0fcad560996461562 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 2 Jan 2018 03:11:07 +0100 Subject: systemd: update to 236, convert to meson build --- package/systemd/patches/patch-Makefile_am | 30 ------ package/systemd/patches/patch-configure_ac | 11 --- package/systemd/patches/patch-meson_build | 108 +++++++++++++++++++++ package/systemd/patches/patch-meson_options_txt | 11 +++ .../systemd/patches/patch-units_getty@_service_m4 | 6 +- .../patches/patch-units_serial-getty@_service_m4 | 6 +- 6 files changed, 125 insertions(+), 47 deletions(-) delete mode 100644 package/systemd/patches/patch-Makefile_am delete mode 100644 package/systemd/patches/patch-configure_ac create mode 100644 package/systemd/patches/patch-meson_build create mode 100644 package/systemd/patches/patch-meson_options_txt (limited to 'package/systemd/patches') diff --git a/package/systemd/patches/patch-Makefile_am b/package/systemd/patches/patch-Makefile_am deleted file mode 100644 index a75c96f55..000000000 --- a/package/systemd/patches/patch-Makefile_am +++ /dev/null @@ -1,30 +0,0 @@ ---- systemd-234.orig/Makefile.am 2017-07-12 16:01:10.000000000 +0200 -+++ systemd-234/Makefile.am 2017-08-05 00:41:34.167419565 +0200 -@@ -325,9 +325,9 @@ install-aliases-hook: - set -- $(SYSTEM_UNIT_ALIASES) && \ - dir=$(systemunitdir) && $(install-aliases) - set -- $(USER_UNIT_ALIASES) && \ -- dir=$(userunitdir) && $(install-relative-aliases) -+ dir=$(userunitdir) && $(install-aliases) - set -- $(GENERAL_ALIASES) && \ -- dir= && $(install-relative-aliases) -+ dir= && $(install-aliases) - - define install-aliases - while [ -n "$$1" ]; do \ -@@ -337,15 +337,6 @@ define install-aliases - shift 2 || exit $$?; \ - done - endef -- --define install-relative-aliases -- while [ -n "$$1" ]; do \ -- $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \ -- rm -f $(DESTDIR)$$dir/$$2 && \ -- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \ -- shift 2 || exit $$?; \ -- done --endef - - install-touch-usr-hook: - touch -c $(DESTDIR)/$(prefix) diff --git a/package/systemd/patches/patch-configure_ac b/package/systemd/patches/patch-configure_ac deleted file mode 100644 index f41aa4191..000000000 --- a/package/systemd/patches/patch-configure_ac +++ /dev/null @@ -1,11 +0,0 @@ ---- systemd-234.orig/configure.ac 2017-07-12 16:01:10.000000000 +0200 -+++ systemd-234/configure.ac 2017-08-05 00:41:34.135401520 +0200 -@@ -109,8 +109,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr - AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin]) - AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin]) - --AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])]) -- - M4_DEFINES= - - AC_CHECK_TOOL(OBJCOPY, objcopy) diff --git a/package/systemd/patches/patch-meson_build b/package/systemd/patches/patch-meson_build new file mode 100644 index 000000000..ce1c3596a --- /dev/null +++ b/package/systemd/patches/patch-meson_build @@ -0,0 +1,108 @@ +--- systemd-236.orig/meson.build 2017-12-14 23:09:57.000000000 +0100 ++++ systemd-236/meson.build 2018-01-01 21:03:50.570757021 +0100 +@@ -260,10 +260,12 @@ cc = meson.get_compiler('c') + pkgconfig = import('pkgconfig') + check_compilation_sh = find_program('tools/meson-check-compilation.sh') + +-cxx = find_program('c++', required : false) +-if cxx.found() +- # Used only for tests +- add_languages('cpp') ++if get_option('tests') != 'false' ++ cxx = find_program('c++', required : false) ++ if cxx.found() ++ # Used only for tests ++ add_languages('cpp') ++ endif + endif + + foreach arg : ['-Wextra', +@@ -2388,48 +2390,51 @@ executable('systemd-sulogin-shell', + install_dir : rootlibexecdir) + + ############################################################ ++if want_tests == 'false' ++ message('Not compiling because tests is set to false') ++else ++ foreach tuple : tests ++ sources = tuple[0] ++ link_with = tuple[1].length() > 0 ? tuple[1] : [libshared] ++ dependencies = tuple[2] ++ condition = tuple.length() >= 4 ? tuple[3] : '' ++ type = tuple.length() >= 5 ? tuple[4] : '' ++ defs = tuple.length() >= 6 ? tuple[5] : [] ++ incs = tuple.length() >= 7 ? tuple[6] : includes ++ timeout = 30 + +-foreach tuple : tests +- sources = tuple[0] +- link_with = tuple[1].length() > 0 ? tuple[1] : [libshared] +- dependencies = tuple[2] +- condition = tuple.length() >= 4 ? tuple[3] : '' +- type = tuple.length() >= 5 ? tuple[4] : '' +- defs = tuple.length() >= 6 ? tuple[5] : [] +- incs = tuple.length() >= 7 ? tuple[6] : includes +- timeout = 30 +- +- name = sources[0].split('/')[-1].split('.')[0] +- if type.startswith('timeout=') +- timeout = type.split('=')[1].to_int() +- type = '' +- endif ++ name = sources[0].split('/')[-1].split('.')[0] ++ if type.startswith('timeout=') ++ timeout = type.split('=')[1].to_int() ++ type = '' ++ endif + +- if condition == '' or conf.get(condition) == 1 +- exe = executable( +- name, +- sources, +- include_directories : incs, +- link_with : link_with, +- dependencies : dependencies, +- c_args : defs, +- install_rpath : rootlibexecdir, +- install : install_tests, +- install_dir : join_paths(testsdir, type)) ++ if condition == '' or conf.get(condition) == 1 ++ exe = executable( ++ name, ++ sources, ++ include_directories : incs, ++ link_with : link_with, ++ dependencies : dependencies, ++ c_args : defs, ++ install_rpath : rootlibexecdir, ++ install : install_tests, ++ install_dir : join_paths(testsdir, type)) + +- if type == 'manual' +- message('@0@ is a manual test'.format(name)) +- elif type == 'unsafe' and want_tests != 'unsafe' +- message('@0@ is an unsafe test'.format(name)) ++ if type == 'manual' ++ message('@0@ is a manual test'.format(name)) ++ elif type == 'unsafe' and want_tests != 'unsafe' ++ message('@0@ is an unsafe test'.format(name)) ++ else ++ test(name, exe, ++ env : test_env, ++ timeout : timeout) ++ endif + else +- test(name, exe, +- env : test_env, +- timeout : timeout) ++ message('Not compiling @0@ because @1@ is not true'.format(name, condition)) + endif +- else +- message('Not compiling @0@ because @1@ is not true'.format(name, condition)) +- endif +-endforeach ++ endforeach ++endif + + test_libsystemd_sym = executable( + 'test-libsystemd-sym', diff --git a/package/systemd/patches/patch-meson_options_txt b/package/systemd/patches/patch-meson_options_txt new file mode 100644 index 000000000..d1845921f --- /dev/null +++ b/package/systemd/patches/patch-meson_options_txt @@ -0,0 +1,11 @@ +--- systemd-236.orig/meson_options.txt 2017-12-14 23:09:57.000000000 +0100 ++++ systemd-236/meson_options.txt 2018-01-01 21:03:50.574757135 +0100 +@@ -284,7 +284,7 @@ option('bashcompletiondir', type : 'stri + option('zshcompletiondir', type : 'string', + description : 'directory for zsh completion scripts ["no" disables]') + +-option('tests', type : 'combo', choices : ['true', 'unsafe'], ++option('tests', type : 'combo', choices : ['true', 'unsafe', 'false'], + description : 'enable extra tests with =unsafe') + option('slow-tests', type : 'boolean', value : 'false', + description : 'run the slow tests by default') diff --git a/package/systemd/patches/patch-units_getty@_service_m4 b/package/systemd/patches/patch-units_getty@_service_m4 index aa58ad8fb..27bf00933 100644 --- a/package/systemd/patches/patch-units_getty@_service_m4 +++ b/package/systemd/patches/patch-units_getty@_service_m4 @@ -1,6 +1,6 @@ ---- systemd-234.orig/units/getty@.service.m4 2017-07-12 16:01:10.000000000 +0200 -+++ systemd-234/units/getty@.service.m4 2017-08-05 00:42:14.790312223 +0200 -@@ -36,7 +36,7 @@ ConditionPathExists=/dev/tty0 +--- systemd-236.orig/units/getty@.service.m4 2017-12-14 23:09:57.000000000 +0100 ++++ systemd-236/units/getty@.service.m4 2018-01-01 18:46:35.149141863 +0100 +@@ -38,7 +38,7 @@ ConditionPathExists=/dev/tty0 # The '-o' option value tells agetty to replace 'login' arguments with an # option to preserve environment (-p), followed by '--' for safety, and then # the entered username. diff --git a/package/systemd/patches/patch-units_serial-getty@_service_m4 b/package/systemd/patches/patch-units_serial-getty@_service_m4 index 74ef3ed8e..08d8f74ff 100644 --- a/package/systemd/patches/patch-units_serial-getty@_service_m4 +++ b/package/systemd/patches/patch-units_serial-getty@_service_m4 @@ -1,6 +1,6 @@ ---- systemd-234.orig/units/serial-getty@.service.m4 2017-07-12 16:01:10.000000000 +0200 -+++ systemd-234/units/serial-getty@.service.m4 2017-08-05 00:42:27.573516075 +0200 -@@ -31,7 +31,7 @@ Before=rescue.service +--- systemd-236.orig/units/serial-getty@.service.m4 2017-12-14 23:09:57.000000000 +0100 ++++ systemd-236/units/serial-getty@.service.m4 2018-01-01 18:46:35.157142052 +0100 +@@ -33,7 +33,7 @@ Before=rescue.service # The '-o' option value tells agetty to replace 'login' arguments with an # option to preserve environment (-p), followed by '--' for safety, and then # the entered username. -- cgit v1.2.3