summaryrefslogtreecommitdiffstats
path: root/core/modules/systemd
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/systemd')
-rw-r--r--core/modules/systemd/data/etc/systemd/system/network-interface@.service2
-rw-r--r--core/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules2
-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
5 files changed, 37 insertions, 3 deletions
diff --git a/core/modules/systemd/data/etc/systemd/system/network-interface@.service b/core/modules/systemd/data/etc/systemd/system/network-interface@.service
index ea9cc56e..9da35a5c 100644
--- a/core/modules/systemd/data/etc/systemd/system/network-interface@.service
+++ b/core/modules/systemd/data/etc/systemd/system/network-interface@.service
@@ -5,5 +5,5 @@ Before=dhcpc@%i.service
[Service]
Type=simple
-ExecStart=/opt/openslx/sbin/ip link set dev %I up
+ExecStart=/opt/openslx/sbin/ip link set dev %i up
diff --git a/core/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules b/core/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules
index 99cdf676..77ef9615 100644
--- a/core/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules
+++ b/core/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules
@@ -33,7 +33,7 @@ SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_T
SUBSYSTEM=="net", KERNEL=="eth*", TAG=="openslxignore", GOTO="systemd_end"
-SUBSYSTEM=="net", KERNEL=="br0|eth*", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/$name", ENV{SYSTEMD_WANTS}="network-interface@$name.service"
+SUBSYSTEM=="net", KERNEL=="br0|br-nic-*", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/$name", ENV{SYSTEMD_WANTS}="network-interface@$name.service"
SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/bluetooth/devices/%k"
SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}="bluetooth.target"
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 {