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 --- mk/package.mk | 4 + mk/pkg-bottom.mk | 4 +- package/systemd/Makefile | 145 +++++++++++---------- 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 +- target/config/Config.in.runtime | 1 - 10 files changed, 210 insertions(+), 116 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 diff --git a/mk/package.mk b/mk/package.mk index 88dcaadb7..96add5789 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -15,6 +15,10 @@ AUTOTOOL_ENV+= PATH='${HOST_PATH}' \ PKG_CONFIG_SYSROOT_DIR='${STAGING_TARGET_DIR}' \ ${COMMON_ENV} +MESON_ENV+= PATH='${HOST_PATH}' \ + PKG_CONFIG_LIBDIR='${STAGING_TARGET_DIR}/usr/lib/pkgconfig:${STAGING_TARGET_DIR}/usr/share/pkgconfig' \ + PKG_CONFIG_SYSROOT_DIR='${STAGING_TARGET_DIR}' + CONFIGURE_ENV+= PATH='${TARGET_PATH}' \ ${COMMON_ENV} \ ${TARGET_ENV} \ diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index 585420ace..868bd69fe 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -52,10 +52,10 @@ ifneq ($(filter manual,${CONFIG_STYLE}),) env ${CONFIGURE_ENV} ${MAKE} do-configure $(MAKE_TRACE) else ifneq ($(filter meson,${CONFIG_STYLE}),) @$(CMD_TRACE) "configuring meson.. " - (cd ${WRKSRC} && PATH='${HOST_PATH}' \ + (cd ${WRKSRC} && $(MESON_ENV) \ meson --prefix /usr --libdir lib \ --cross-file $(STAGING_HOST_DIR)/etc/meson/cross-compilation.conf \ - --buildtype release \ + --buildtype release $(MESON_FLAGS) \ $(WRKSRC) $(WRKBUILD)) else ifneq ($(filter cmake,${CONFIG_STYLE}),) @$(CMD_TRACE) "configuring cmake.. " diff --git a/package/systemd/Makefile b/package/systemd/Makefile index 69dd8c510..e37e4b603 100644 --- a/package/systemd/Makefile +++ b/package/systemd/Makefile @@ -4,28 +4,32 @@ include $(ADK_TOPDIR)/rules.mk PKG_NAME:= systemd -PKG_VERSION:= 234 -PKG_RELEASE:= 2 -PKG_HASH:= da3e69d10aa1c983d33833372ad4929037b411ac421fb085c8cee79ae1d80b6a +PKG_VERSION:= 236 +PKG_RELEASE:= 1 +PKG_HASH:= 0cadccfa7109232ec2a469d41ca595d5595b83b648b534ea669c15dbca904c43 PKG_DESCR:= system and service manager PKG_SECTION:= base/init PKG_DEPENDS:= libcap libmount libuuid libblkid libncurses libkmod -PKG_BUILDDEP:= intltool-host gperf-host libcap util-linux gettext-host kmod -PKG_KDEPENDS:= cgroups namespaces fhandle tmpfs-posix-acl tmpfs-xattr +PKG_BUILDDEP:= intltool-host gperf-host libcap util-linux +PKG_BUILDDEP+= gettext-host kmod meson-host ninja-host +PKG_KDEPENDS:= inotify-user cgroups namespaces fhandle tmpfs-posix-acl tmpfs-xattr PKG_NEEDS:= locale intl PKG_URL:= https://wiki.freedesktop.org/www/Software/systemd/ PKG_SITES:= https://github.com/systemd/systemd/archive/ -PKG_CFLINE_SYSTEMD:= select BUSYBOX_SULOGIN +PKG_CFLINE_SYSTEMD:= select BUSYBOX_SULOGIN if ADK_RUNTIME_BASE_BUSYBOX PKG_LIBC_DEPENDS:= !musl -PKG_FLAVOURS_SYSTEMD:= WITH_PAM WITH_XZ +PKG_FLAVOURS_SYSTEMD:= WITH_PAM WITH_XZ WITH_ZLIB PKGFD_WITH_PAM:= enable pam support PKGFS_WITH_PAM:= pam PKGFB_WITH_PAM:= pam PKGFD_WITH_XZ:= enable xz support PKGFS_WITH_XZ:= xz PKGFB_WITH_XZ:= xz +PKGFD_WITH_ZLIB:= enable zlib support +PKGFS_WITH_ZLIB:= zlib +PKGFB_WITH_ZLIB:= zlib DISTFILES:= v$(PKG_VERSION).tar.gz @@ -33,72 +37,81 @@ include $(ADK_TOPDIR)/mk/package.mk $(eval $(call PKG_template,SYSTEMD,systemd,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION))) -XAKE_FLAGS+= V=1 - -AUTOTOOL_STYLE:= autogen -CONFIGURE_ENV+= ac_cv_path_SULOGIN=/sbin/sulogin \ - ac_cv_path_MOUNT_PATH=/bin/mount -CONFIGURE_ARGS+= --disable-static \ - --disable-manpages \ - --disable-selinux \ - --enable-split-usr \ - --disable-ima \ - --disable-efi \ - --disable-gnuefi \ - --disable-ldconfig \ - --disable-tests \ - --disable-coverage \ - --with-default-dnssec=no \ - --without-python \ - --disable-acl \ - --disable-idn \ - --disable-libidn \ - --disable-libidn2 \ - --disable-libcryptsetup \ - --disable-seccomp \ - --disable-xkbcommon \ - --disable-localed \ - --disable-coredump \ - --disable-polkit \ - --disable-bzip2 \ - --disable-lz4 \ - --disable-zlib \ - --disable-libcurl \ - --disable-gcrypt \ - --disable-microhttpd \ - --disable-qrencode \ - --disable-quotacheck \ - --disable-utmp \ - --disable-rfkill \ - --disable-smack \ - --disable-backlight \ - --disable-binfmt \ - --disable-vconsole \ - --disable-hibernate \ - --disable-audit \ - --disable-hwdb \ - --disable-machined \ - --disable-myhostname \ - --disable-resolved \ - --disable-importd \ - --disable-sysusers \ - --disable-nss-systemd \ - --enable-randomseed \ - --enable-timedated \ - --enable-timesyncd \ - --enable-tmpfiles \ - --enable-firstboot +WRKBUILD= $(WRKDIR)/$(PKG_NAME)-obj + +CONFIG_STYLE:= meson +BUILD_STYLE:= meson +INSTALL_STYLE:= meson + +MESON_FLAGS+= -Drootlibdir='/usr/lib' \ + -Dman=false \ + -Dima=false \ + -Dlibcryptsetup=false \ + -Defi=false \ + -Dgnu-efi=false \ + -Dldconfig=false \ + -Ddefault-dnssec=no \ + -Dtests=false \ + -Dkill-path=/usr/bin/kill \ + -Dkmod-path=/usr/bin/kmod \ + -Dkexec-path=/usr/sbin/kexec \ + -Dsulogin-path=/usr/sbin/sulogin \ + -Dmount-path=/usr/bin/mount \ + -Dumount-path=/usr/bin/umount \ + -Dacl=false \ + -Daudit=false \ + -Dlibidn=false \ + -Dseccomp=false \ + -Dxkbcommon=false \ + -Dbzip2=false \ + -Dlz4=false \ + -Dlibcurl=false \ + -Dgcrypt=false \ + -Dqrencode=false \ + -Dmicrohttpd=false \ + -Dselinux=false \ + -Dhwdb=false \ + -Dbinfmt=false \ + -Dvconsole=false \ + -Dquotacheck=false \ + -Dbacklight=false \ + -Drfkill=false \ + -Dmachined=false \ + -Dimportd=false \ + -Dhostnamed=false \ + -Dmyhostname=false \ + -Dlocaled=false \ + -Dcoredump=false \ + -Dsmack=false \ + -Dhibernate=false \ + -Dpolkit=false \ + -Dnetworkd=true \ + -Dresolved=true \ + -Dtimesyncd=true \ + -Dtmpfiles=true \ + -Dsysusers=true \ + -Dfirstboot=true \ + -Drandomseed=true \ + -Dlogind=true \ + -Dtimedated=true + ifeq ($(ADK_PACKAGE_SYSTEMD_WITH_PAM),y) -CONFIGURE_ARGS+= --enable-pam +MESON_FLAGS+= -Dpam=true else -CONFIGURE_ARGS+= --disable-pam +MESON_FLAGS+= -Dpam=false endif ifeq ($(ADK_PACKAGE_SYSTEMD_WITH_XZ),y) -CONFIGURE_ARGS+= --enable-xz +MESON_FLAGS+= -Dxz=true +else +MESON_FLAGS+= -Dxz=false +endif + +ifeq ($(ADK_PACKAGE_SYSTEMD_WITH_ZLIB),y) +MESON_FLAGS+= -Dzlib=true else -CONFIGURE_ARGS+= --disable-xz +MESON_FLAGS+= -Dzlib=false endif systemd-install: 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. diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime index 9a82aac2d..67ec0ef1a 100644 --- a/target/config/Config.in.runtime +++ b/target/config/Config.in.runtime @@ -40,7 +40,6 @@ config ADK_RUNTIME_INIT_SYSTEMD select ADK_PACKAGE_DBUS_WITH_SYSTEMD select ADK_TARGET_LIBC_WITH_LOCALE if ADK_TARGET_LIB_UCLIBC_NG select ADK_TARGET_LIBC_WITH_LIBINTL_STUB if ADK_TARGET_LIB_UCLIBC_NG - select ADK_TARGET_USE_SSP depends on ADK_TARGET_LIB_GLIBC || ADK_TARGET_LIB_UCLIBC_NG config ADK_RUNTIME_INIT_SIMPLEINIT -- cgit v1.2.3