systemd-02-remove-incorrect-service-files.patch 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. This patch removes some unwanted *.service files shipped with the tarball, in
  2. order to force their re-generation when building.
  3. These files contain hard-coded paths which are invalid, as systemd is
  4. configured with --enable-split-usr (i.e. /bin is not a link to /usr/bin).
  5. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
  6. ---
  7. diff -aburN systemd-210.orig/rules/99-systemd.rules systemd-210/rules/99-systemd.rules
  8. --- systemd-210.orig/rules/99-systemd.rules 2014-02-24 17:48:38.000000000 +0100
  9. +++ systemd-210/rules/99-systemd.rules 1970-01-01 01:00:00.000000000 +0100
  10. @@ -1,70 +0,0 @@
  11. -# This file is part of systemd.
  12. -#
  13. -# systemd is free software; you can redistribute it and/or modify it
  14. -# under the terms of the GNU Lesser General Public License as published by
  15. -# the Free Software Foundation; either version 2.1 of the License, or
  16. -# (at your option) any later version.
  17. -
  18. -ACTION=="remove", GOTO="systemd_end"
  19. -
  20. -SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*", TAG+="systemd"
  21. -
  22. -KERNEL=="vport*", TAG+="systemd"
  23. -
  24. -SUBSYSTEM=="block", KERNEL!="ram*", TAG+="systemd"
  25. -SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
  26. -
  27. -# Ignore encrypted devices with no identified superblock on it, since
  28. -# we are probably still calling mke2fs or mkswap on it.
  29. -SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0"
  30. -
  31. -# Ignore raid devices that are not yet assembled and started
  32. -SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0"
  33. -SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"
  34. -
  35. -# Ignore nbd devices in the "add" event, with "change" the nbd is ready
  36. -ACTION=="add", SUBSYSTEM=="block", KERNEL=="nbd*", ENV{SYSTEMD_READY}="0"
  37. -
  38. -# We need a hardware independent way to identify network devices. We
  39. -# use the /sys/subsystem path for this. Current vanilla kernels don't
  40. -# actually support that hierarchy right now, however upcoming kernels
  41. -# will. HAL and udev internally support /sys/subsystem already, hence
  42. -# it should be safe to use this here, too. This is mostly just an
  43. -# identification string for systemd, so whether the path actually is
  44. -# accessible or not does not matter as long as it is unique and in the
  45. -# filesystem namespace.
  46. -#
  47. -# http://cgit.freedesktop.org/systemd/systemd/tree/src/libudev/libudev-enumerate.c#n922
  48. -
  49. -SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/net/devices/$name"
  50. -SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k"
  51. -
  52. -SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bluetooth.target"
  53. -ENV{ID_SMARTCARD_READER}=="*?", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target"
  54. -SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target"
  55. -
  56. -SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
  57. -SUBSYSTEM=="usb", KERNEL=="lp*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
  58. -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
  59. -
  60. -# Apply sysctl variables to network devices (and only to those) as they appear.
  61. -
  62. -ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name"
  63. -
  64. -# Pull in backlight save/restore for all backlight devices and
  65. -# keyboard backlights
  66. -
  67. -SUBSYSTEM=="backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@backlight:$name.service"
  68. -SUBSYSTEM=="leds", KERNEL=="*kbd_backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@leds:$name.service"
  69. -
  70. -# Pull in rfkill save/restore for all rfkill devices
  71. -
  72. -SUBSYSTEM=="rfkill", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-rfkill@$name.service"
  73. -
  74. -# Asynchronously mount file systems implemented by these modules as
  75. -# soon as they are loaded.
  76. -
  77. -SUBSYSTEM=="module", KERNEL=="fuse", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-fs-fuse-connections.mount"
  78. -SUBSYSTEM=="module", KERNEL=="configfs", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-kernel-config.mount"
  79. -
  80. -LABEL="systemd_end"
  81. diff -aburN systemd-210.orig/units/emergency.service systemd-210/units/emergency.service
  82. --- systemd-210.orig/units/emergency.service 2014-02-24 17:48:38.000000000 +0100
  83. +++ systemd-210/units/emergency.service 1970-01-01 01:00:00.000000000 +0100
  84. @@ -1,28 +0,0 @@
  85. -# This file is part of systemd.
  86. -#
  87. -# systemd is free software; you can redistribute it and/or modify it
  88. -# under the terms of the GNU Lesser General Public License as published by
  89. -# the Free Software Foundation; either version 2.1 of the License, or
  90. -# (at your option) any later version.
  91. -
  92. -[Unit]
  93. -Description=Emergency Shell
  94. -Documentation=man:sulogin(8)
  95. -DefaultDependencies=no
  96. -Conflicts=shutdown.target
  97. -Before=shutdown.target
  98. -
  99. -[Service]
  100. -Environment=HOME=/root
  101. -WorkingDirectory=/root
  102. -ExecStartPre=-/bin/plymouth quit
  103. -ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
  104. -ExecStart=-/sbin/sulogin
  105. -ExecStopPost=/usr/bin/systemctl --fail --no-block default
  106. -Type=idle
  107. -StandardInput=tty-force
  108. -StandardOutput=inherit
  109. -StandardError=inherit
  110. -KillMode=process
  111. -IgnoreSIGPIPE=no
  112. -SendSIGHUP=yes
  113. diff -aburN systemd-210.orig/units/systemd-udevd.service systemd-210/units/systemd-udevd.service
  114. --- systemd-210.orig/units/systemd-udevd.service 2014-02-24 17:48:38.000000000 +0100
  115. +++ systemd-210/units/systemd-udevd.service 1970-01-01 01:00:00.000000000 +0100
  116. @@ -1,23 +0,0 @@
  117. -# This file is part of systemd.
  118. -#
  119. -# systemd is free software; you can redistribute it and/or modify it
  120. -# under the terms of the GNU Lesser General Public License as published by
  121. -# the Free Software Foundation; either version 2.1 of the License, or
  122. -# (at your option) any later version.
  123. -
  124. -[Unit]
  125. -Description=udev Kernel Device Manager
  126. -Documentation=man:systemd-udevd.service(8) man:udev(7)
  127. -DefaultDependencies=no
  128. -Wants=systemd-udevd-control.socket systemd-udevd-kernel.socket
  129. -After=systemd-udevd-control.socket systemd-udevd-kernel.socket
  130. -Before=sysinit.target
  131. -ConditionPathIsReadWrite=/sys
  132. -
  133. -[Service]
  134. -Type=notify
  135. -OOMScoreAdjust=-1000
  136. -Sockets=systemd-udevd-control.socket systemd-udevd-kernel.socket
  137. -Restart=always
  138. -RestartSec=0
  139. -ExecStart=/usr/lib/systemd/systemd-udevd
  140. diff -aburN systemd-210.orig/units/systemd-udev-settle.service systemd-210/units/systemd-udev-settle.service
  141. --- systemd-210.orig/units/systemd-udev-settle.service 2014-02-24 17:48:38.000000000 +0100
  142. +++ systemd-210/units/systemd-udev-settle.service 1970-01-01 01:00:00.000000000 +0100
  143. @@ -1,25 +0,0 @@
  144. -# This file is part of systemd.
  145. -#
  146. -# systemd is free software; you can redistribute it and/or modify it
  147. -# under the terms of the GNU Lesser General Public License as published by
  148. -# the Free Software Foundation; either version 2.1 of the License, or
  149. -# (at your option) any later version.
  150. -
  151. -# This service can dynamically be pulled-in by legacy services which
  152. -# cannot reliably cope with dynamic device configurations, and wrongfully
  153. -# expect a populated /dev during bootup.
  154. -
  155. -[Unit]
  156. -Description=udev Wait for Complete Device Initialization
  157. -Documentation=man:udev(7) man:systemd-udevd.service(8)
  158. -DefaultDependencies=no
  159. -Wants=systemd-udevd.service
  160. -After=systemd-udev-trigger.service
  161. -Before=sysinit.target
  162. -ConditionPathIsReadWrite=/sys
  163. -
  164. -[Service]
  165. -Type=oneshot
  166. -TimeoutSec=180
  167. -RemainAfterExit=yes
  168. -ExecStart=/usr/bin/udevadm settle
  169. diff -aburN systemd-210.orig/units/systemd-udev-trigger.service systemd-210/units/systemd-udev-trigger.service
  170. --- systemd-210.orig/units/systemd-udev-trigger.service 2014-02-24 17:48:38.000000000 +0100
  171. +++ systemd-210/units/systemd-udev-trigger.service 1970-01-01 01:00:00.000000000 +0100
  172. @@ -1,20 +0,0 @@
  173. -# This file is part of systemd.
  174. -#
  175. -# systemd is free software; you can redistribute it and/or modify it
  176. -# under the terms of the GNU Lesser General Public License as published by
  177. -# the Free Software Foundation; either version 2.1 of the License, or
  178. -# (at your option) any later version.
  179. -
  180. -[Unit]
  181. -Description=udev Coldplug all Devices
  182. -Documentation=man:udev(7) man:systemd-udevd.service(8)
  183. -DefaultDependencies=no
  184. -Wants=systemd-udevd.service
  185. -After=systemd-udevd-kernel.socket systemd-udevd-control.socket
  186. -Before=sysinit.target
  187. -ConditionPathIsReadWrite=/sys
  188. -
  189. -[Service]
  190. -Type=oneshot
  191. -RemainAfterExit=yes
  192. -ExecStart=/usr/bin/udevadm trigger --type=subsystems --action=add ; /usr/bin/udevadm trigger --type=devices --action=add