[Lunar-commits] <moonbase-core> systemd: Version bumped to 186 and added POST_INSTALL warnings

Stefan Wold ratler at lunar-linux.org
Tue Jul 10 15:34:18 CEST 2012


commit ae7698bfdbd92679799b4f6749a000a14c3ea3f0
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Tue, 10 Jul 2012 06:34:18 -0700
URL: https://github.com/lunar-linux/moonbase-core/commit/ae7698bfdbd92679799b4f6749a000a14c3ea3f0

systemd: Version bumped to 186 and added POST_INSTALL warnings

POST_INSTALL now issue warnings for things that need to be manually
fixed when migrating from sysvinit to systemd.

Minor cleanup in BUILD.
---
  system/systemd/BUILD                                         +8/-19    
  system/systemd/DETAILS                                       +3/-12    
  system/systemd/POST_INSTALL                                  +47/-1    
  3 files changed, 58 insertions (+), 32 deletions (-)

--- a/system/systemd/BUILD
+++ b/system/systemd/BUILD
@@ -7,37 +7,23 @@
           --enable-split-usr \
           --disable-tcpwrap"
 
-  # gtk is broken currently
-  OPTS+=" --disable-gtk"
-
   if module_installed Linux-PAM; then
     OPTS+=" --with-pamlibdir=/lib/security"
   fi
 
-  # just adding some files which are useful to
-  # systemd
-  # todo: some info-message to the user, that
-  #       he/she should adjust /etc/hostname,
-  #       /etc/vconsole.conf and /etc/locale.conf
-  #       could be useful.
-
   # a not existing hostname is set to lunar.
-  [ ! -f /etc/hostname ] && install -m 0644 -o root -g root $SCRIPT_DIRECTORY/files/hostname /etc/hostname
+  [ -f /etc/hostname ] || install -m 0644 -o root -g root $SCRIPT_DIRECTORY/files/hostname /etc/hostname &&
 
   # vconsole.conf defaults to us-layout
-  [ ! -f /etc/vconsole.conf ] && install -m 0644 -o root -g root $SCRIPT_DIRECTORY/files/vconsole.conf /etc/vconsole.conf
+  [ -f /etc/vconsole.conf ] || install -m 0644 -o root -g root $SCRIPT_DIRECTORY/files/vconsole.conf /etc/vconsole.conf &&
 
   # os-release should properly show lunar
   # todo: we might replace this with some auto-generated
   #       values from /etc/lunar.release in the future.
-  [ ! -f /etc/os-release ] && install -m 0644 -o root -g root $SCRIPT_DIRECTORY/files/os-release /etc/os-release
+  [ -f /etc/os-release ] || install -m 0644 -o root -g root $SCRIPT_DIRECTORY/files/os-release /etc/os-release &&
 
   # last but not least the locale settings, defaulting to US
-  [ ! -f /etc/locale.conf ] && install -m 0644 -o root -g root $SCRIPT_DIRECTORY/files/locale.conf /etc/locale.conf
-
-  patch_it $SOURCE2 1 &&
-  patch_it $SOURCE3 1 &&
-  patch_it $SOURCE4 1 &&
+  [ -f /etc/locale.conf ] || install -m 0644 -o root -g root $SCRIPT_DIRECTORY/files/locale.conf /etc/locale.conf &&
 
   # systemd guys wrongly assume that on every linux
   # installation is a group called "lock" this isn't
@@ -53,6 +39,9 @@
     lrm --upgrade udev
   fi &&
 
-  make install
+  make install &&
+
+  # Always install the legacy.conf file even if SysV compatibility isn't enabled
+  install -m 0644 -o root -g root tmpfiles.d/legacy.conf /usr/lib/tmpfiles.d
 
 ) > $C_FIFO 2>&1
--- a/system/systemd/DETAILS
+++ b/system/systemd/DETAILS
@@ -1,20 +1,11 @@
           MODULE=systemd
-         VERSION=185
+         VERSION=186
           SOURCE=$MODULE-$VERSION.tar.xz
-         SOURCE2=0001-Reinstate-TIMEOUT-handling.patch
-         SOURCE3=0001-udev-systemd-udev-settle.service-fix-After.patch
-         SOURCE4=0001-vconsole-setup-enable-utf-8-mode-explicitly.patch
       SOURCE_URL=http://www.freedesktop.org/software/systemd
-     SOURCE2_URL=$PATCH_URL
-     SOURCE3_URL=$PATCH_URL
-     SOURCE4_URL=$PATCH_URL
-      SOURCE_VFY=sha1:1038b5c7c6be99e59af94c74c8b6476e19c89166
-     SOURCE2_VFY=sha1:a6539821cc493ce282013d79de8b5db3ec1003ac
-     SOURCE3_VFY=sha1:8b5cdb6e37b6ff47cb08eed9446e3c6c36297369
-     SOURCE4_VFY=sha1:bc3af38048845fa929bb2cec8d9518af6d23bf2e
+      SOURCE_VFY=sha1:abf25fac986a2fc34a4bcc93fd5481f74e822cc7
         WEB_SITE=http://www.freedesktop.org/wiki/Software/systemd
          ENTERED=20100919
-         UPDATED=20120701
+         UPDATED=20120710
            SHORT="A system and program management daemon"
 
 cat << EOF
--- a/system/systemd/POST_INSTALL
+++ b/system/systemd/POST_INSTALL
@@ -1,3 +1,49 @@
-lin -c dbus
 # generate the machine id
 /usr/bin/systemd-machine-id-setup
+
+# systemd readyness checks
+if [ ! -f /etc/machine-id ]; then
+  SYSTEMD_ERROR=1
+  message "\n${PROBLEM_COLOR}WARNING: ${MESSAGE_COLOR} File ${FILE_COLOR}/etc/machine-id${MESSAGE_COLOR} not found."
+  message "${MESSAGE_COLOR}To manually create /etc/machine-id run 'systemd-machine-id-setup' or 'dbus-uuidgen --ensure=/etc/machine-id'"
+fi
+
+if [ ! -L /etc/mtab ]; then
+  SYSTEMD_ERROR=1
+  message "\n${PROBLEM_COLOR}WARNING: ${FILE_COLOR}/etc/mtab${MESSAGE_COLOR} is not a symlink."
+  message "${MESSAGE_COLOR}To manually create a symlink to /proc/self/mounts run 'rm -f /etc/mtab; ln -s /proc/self/mounts /etc/mtab'"
+fi
+
+if [ ! -L /var/run ]; then
+  SYSTEMD_ERROR=1
+  message "\n${PROBLEM_COLOR}WARNING: ${FILE_COLOR}/var/run${MESSAGE_COLOR} is not a symlink."
+  if mountpoint -q /var/run; then
+    message "${MESSAGE_COLOR}To manually create a symlink to /run run 'umount /var/run; rm -rf /var/run; ln -s ../run /var/run'"
+  else
+    message "${MESSAGE_COLOR}To manually create a symlink to /run run 'rm -rf /var/run; ln -s ../run /var/run'"
+  fi
+fi
+
+if [ ! -L /var/lock ]; then
+  SYSTEMD_ERROR=1
+  message "\n${PROBLEM_COLOR}WARNING: ${FILE_COLOR}/var/lock${MESSAGE_COLOR} is not a symlink."
+  if mountpoint -q /var/lock; then
+    message "${MESSAGE_COLOR}To manually create a symlink to /run/lock run 'umount /var/lock; rm -rf /var/lock; ln -s ../run/lock /var/lock'"
+  else
+    message "${MESSAGE_COLOR}To manually create a symlink to /run/lock run 'rm -rf /var/lock; ln -s ../run/lock /var/lock'"
+  fi
+fi
+
+if egrep -q '^(proc|none|devpts|usbfs|tmpfs)' /etc/fstab; then
+  SYSTEMD_ERROR=1
+  message "\n${PROBLEM_COLOR}WARNING: ${MESSAGE_COLOR}Incompatible systemd mountpoints found in ${FILE_COLOR}/etc/fstab${MESSAGE_COLOR}."
+  message "${MESSAGE_COLOR}Please comment out or remove all lines except your file system and swap mountpoints from ${FILE_COLOR}/etc/fstab${MESSAGE_COLOR}."
+  message "${MESSAGE_COLOR}Hint: Lines that begin with proc, none, devpts, usbfs and tmpfs can safely be removed."
+fi
+
+if [ -n "$SYSTEMD_ERROR" ]; then
+  message "\e[5;31mPress any key to continue..."
+  read -n 1
+fi
+
+lin -c dbus




More information about the Lunar-commits mailing list