summaryrefslogtreecommitdiffstats
path: root/core/modules/systemd
diff options
context:
space:
mode:
authorJonathan Bauer2017-11-30 11:17:19 +0100
committerJonathan Bauer2017-11-30 11:17:19 +0100
commit6e548029643e1afbc397dfe69163487198bae8c4 (patch)
treeda63e2daf774e9c1befa148e40f97d5e1a0eaa86 /core/modules/systemd
parent[xorg] add xorg config for intel gpus (diff)
downloadmltk-6e548029643e1afbc397dfe69163487198bae8c4.tar.gz
mltk-6e548029643e1afbc397dfe69163487198bae8c4.tar.xz
mltk-6e548029643e1afbc397dfe69163487198bae8c4.zip
[systemd] fixes compilation problems on 17.10
For Ubuntu 17.10: * gperf needs to be version 3.0.4 and repos provide 3.1 only * systemd-204/src/udev/mtd_probe/mtd_probe.h is missing an include of stdint.h with newer libc versions
Diffstat (limited to 'core/modules/systemd')
-rw-r--r--core/modules/systemd/module.build25
-rw-r--r--core/modules/systemd/module.conf.ubuntu1
-rw-r--r--core/modules/systemd/systemd-204-mtd_probe.patch10
3 files changed, 35 insertions, 1 deletions
diff --git a/core/modules/systemd/module.build b/core/modules/systemd/module.build
index eba706ca..4ed9b57e 100644
--- a/core/modules/systemd/module.build
+++ b/core/modules/systemd/module.build
@@ -26,6 +26,31 @@ fetch_source () {
# However, there were lots of changes after systemd 204, so we didn't update yet
# See http://cgit.freedesktop.org/systemd/systemd/tree/NEWS for changes.
patch -p0 src/systemd-*/src/core/main.c < ${MODULE_DIR}/systemd-openslx.patch || perror "Failed to apply openslx systemd patch."
+ # fix mtd_probe.h missing an include for stdint.h, those types probably used to
+ # be defined elsewhere and that was change with newer libc versions
+ patch -p0 src/systemd-*/src/udev/mtd_probe/mtd_probe.h < ${MODULE_DIR}/systemd-204-mtd_probe.patch || perror "Failed to apply mtd_probe.h patch."
+ # systemd-204 requires gperf 3.0.4 for generating internal code,
+ # starting with ubuntu 17.10, gperf is only available in version 3.1.1.
+ # launchpad has the correct version: https://launchpad.net/ubuntu/artful/amd64/gperf/3.0.4-2
+ if which gperf &> /dev/null; then
+ LOCAL_GPERF_VER="$(gperf --version | head -1 | awk '{print $3}')"
+ if [ "x${LOCAL_GPERF_VER}" != "x3.0.4" ]; then
+ # bad version, no force removal
+ perror "gperf version '3.0.4' expected but '${LOCAL_GPERF_VER}' is installed. Please remove it and try again."
+ fi
+ else
+ # no gperf installed, install it from launchpad
+ REQUIRED_GPERF_URL="http://launchpadlibrarian.net/214035609/gperf_3.0.4-2_amd64.deb"
+ pinfo "Downloading gperf from '${REQUIRED_GPERF_URL}'..."
+ if ! wget -P "${MODULE_WORK_DIR}" "${REQUIRED_GPERF_URL}"; then
+ perror "Failed to download '${REQUIRED_GPERF_URL}'."
+ fi
+ pinfo "Installing gperf from '${MODULE_WORK_DIR}/${REQUIRED_GPERF_URL##*/}'..."
+ if ! dpkg -i "${MODULE_WORK_DIR}/${REQUIRED_GPERF_URL##*/}"; then
+ perror "Failed to install '${MODULE_WORK_DIR}/${REQUIRED_GPERF_URL##*/}'."
+ fi
+ fi
+
elif [ "x${REQUIRED_VERSION#systemd-}" = "x229" ]; then
patch -p0 src/systemd-*/src/basic/path-util.h < ${MODULE_DIR}/systemd-openslx-229.patch || perror "Failed to apply openslx systemd patch."
else
diff --git a/core/modules/systemd/module.conf.ubuntu b/core/modules/systemd/module.conf.ubuntu
index 04752c0b..09233f45 100644
--- a/core/modules/systemd/module.conf.ubuntu
+++ b/core/modules/systemd/module.conf.ubuntu
@@ -1,7 +1,6 @@
#!/bin/bash
REQUIRED_INSTALLED_PACKAGES="
intltool
- gperf
dbus
libcap-dev
libudev-dev
diff --git a/core/modules/systemd/systemd-204-mtd_probe.patch b/core/modules/systemd/systemd-204-mtd_probe.patch
new file mode 100644
index 00000000..5486da66
--- /dev/null
+++ b/core/modules/systemd/systemd-204-mtd_probe.patch
@@ -0,0 +1,10 @@
+--- udev/mtd_probe/mtd_probe.h.pre 2017-11-30 10:22:58.370237301 +0100
++++ udev/mtd_probe/mtd_probe.h 2017-11-23 17:23:44.437540620 +0100
+@@ -18,6 +18,7 @@
+ */
+
+ #include <mtd/mtd-user.h>
++#include <stdint.h>
+
+ /* Full oob structure as written on the flash */
+ struct sm_oob {