<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>1625</bug_id>
          
          <creation_ts>2011-10-04 13:58:30 +0000</creation_ts>
          <short_desc>Support use of alternative init systems</short_desc>
          <delta_ts>2013-05-02 10:17:47 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>in development</status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.4 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Song Liu">song.liu</reporter>
          <assigned_to name="Radu Moisan">radu.moisan</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>alexandru.damian</cc>
    
    <cc>alexandrux.palalau</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>josh</cc>
    
    <cc>kai.kang</cc>
    
    <cc>martin.donnelly</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>16694</commentid>
    <comment_count>0</comment_count>
    <who name="Song Liu">song.liu</who>
    <bug_when>2011-10-04 13:58:30 +0000</bug_when>
    <thetext>Interest in systemd as a replacement for Sys V init is growing but it may not be appropriate for deeply embedded systems. I\&apos;d like to investigate a crop of service based and process monitoring init systems and compare them on a variety of criteria as determined by the community. Furthermore I would like to investigate supporting multiple init systems, the current SysV system, systemd and possibly others. As part of this work, and because increasingly many upstreams support systemd (no doubt thanks to its adoption in Fedora) I would like to investigate implementing some infrastructure which translates from systemd units to the appropriate init format for the supported init systems.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17625</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2011-12-13 14:55:23 +0000</bug_when>
    <thetext>We need to look into replacing sysvinit, or at the very least allowing users to easily replace sysvinit.

This task will involve reviewing the new world order of init systems and figuring out what the cost/benefit ratio is.

Key factors will include:
* on disk size footprint
* boot speed wins
* sysvinit compatibility
* kernel requirements
* ease of adoption (debugging, switching from sysvinit compatibility)

At the very least this task will produce documentation and configuration options to enable the use of alternatives to sysvinit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17626</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2011-12-13 14:57:20 +0000</bug_when>
    <thetext>What we decide with regards init will likely impact device management (bug 1608) and syslog (bug 717).

Switch milestones of the mentioned bugs so that init is handled first and its impact will be known.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17993</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2012-01-06 11:36:36 +0000</bug_when>
    <thetext>After discussion with various folks the design for 1.1 work on init is to enable the init daemon to be easily switched and provide recipes for alternative init systems (upstart and systemd, most likely).

Deliverables will be:
1) Upstart recipe created and available, possibly in meta-oe with Systemd?
  - alternatively in OE-Core and work with Koen to move systemd to OE-Core?
2) Enable init system to be easily switched for core-image-*
3) Integrate a boot profiling tool into the system
4) Benchmark the init systems:
  - sysvinit
  - upstart + sysvinit scripts
  - systemd + sysvinit scripts
  - upstart + upstart events
  - systemd + systemd units
5) Write a paper/presentation/blog post/all of the above on our decisions and discoveries.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17994</commentid>
    <comment_count>4</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2012-01-06 11:38:53 +0000</bug_when>
    <thetext>As we&apos;ll not be changing the default init in 1.2 the QA impact should be negligible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18187</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Lock - Disabled">josh</who>
    <bug_when>2012-01-17 14:16:23 +0000</bug_when>
    <thetext>bug #1608 has a &quot;stop-gap&quot; fix in alsa-state so this bug no longer blocks it</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21772</commentid>
    <comment_count>6</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-05-31 07:22:41 +0000</bug_when>
    <thetext>Is there a document/blog/wiki describing the work done so far?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25861</commentid>
    <comment_count>7</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2012-09-27 17:18:15 +0000</bug_when>
    <thetext>There is not existing info beyond, this bug and people.

Additionally, this should address re-packaging of scripts to split out existing sysvinit scripts into separate packages, since the systemd, and possibly other init systems will have packages.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27732</commentid>
    <comment_count>8</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-11-27 14:08:28 +0000</bug_when>
    <thetext>just a short status update:
I managed to get meta-openembedded/meta-systemd merged into oe-core and brought to a state where it builds fine for both core-image-minimal and core-image-sato. For the time being I changed my focus on core-image-minimal. At this point I am able to build sysvinit or systemd enabled images just by setting VIRTUAL-RUNTIME_init_manager accordingly

Working to enable run-postinsts.service and change default init without graphical support (for core-image-minimal).

My poky-contrib branch is rmoisan/systemd</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27792</commentid>
    <comment_count>9</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-11-28 15:20:37 +0000</bug_when>
    <thetext>I&apos;ve changed default.target to multi-user.target It used to be graphical.target but I talked with Richard about this and we decided it would be best to start without graphical support (for embedded use) and then people will enable it as needed.
Also received some review from Richard today so I started taking action on that. For now I just cleaned up the code a little and removed some old style programming.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27824</commentid>
    <comment_count>10</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-11-29 16:50:36 +0000</bug_when>
    <thetext>I&apos;m looking after mountall.service and a bunch of others failing which all source rcS-default script, and failing because it&apos;s missing (being provided by sysvinit). Initially I was considering packing separately all the scripts the sysvinit provides and placing a dependence on it in initscripts package.
However, I&apos;m not that sure that we need these scripts pulled in, so now I&apos;m considering just patching all the scripts that source rcS-default not to source it anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27899</commentid>
    <comment_count>11</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-12-03 15:30:04 +0000</bug_when>
    <thetext>disabled rcS-default in all initscripts becase we don&apos;t need rcS-default&apos;s environment while running systemd.

also switched from VIRTUAL-RUNTIME_init_manager to DISTRO_FEATURES_INITMAN as init scheme switch, as Richard suggested.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27980</commentid>
    <comment_count>12</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-12-05 09:31:26 +0000</bug_when>
    <thetext>* rebased to master and remove a dependency on cairo (since appears to be broken)
* removed gitpckgv.bbclass as Richard suggested
* systemd-native failed becase of incomplete FILESPATH, fixed that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28046</commentid>
    <comment_count>13</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-12-06 13:12:43 +0000</bug_when>
    <thetext>* disabled sysfs.service because the operations in sysfs.sh are already handled by systemd
* disabled acl support in systemd; I&apos;ve seen that udev-acl in udev recipe si packed in a separate package and not loaded into traditional targets, so I assume it would be safe here to disable it(enabled it gives some warnings about Operation not permitted) since I don&apos;t have an option to package it separately. This options leaves room for future optimization, but for now I don&apos;t see a reason to leave it enabled.
* I still have some warnings from systemd-tmpfiles complaining that it cannot create some files/dirs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28067</commentid>
    <comment_count>14</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-12-06 17:23:26 +0000</bug_when>
    <thetext>Still fighting to understand why I get this failures from systemd-tmpfiles:

systemd-udevd[58]: IMPORT{builtin}: &apos;uaccess&apos; unknown /lib/udev/rules.d/73-seat-late.rules:15
systemd-tmpfiles[90]: Failed to create directory /var/cache/man: No such file or directory
systemd-tmpfiles[90]: Failed to create file /var/run/utmp: No such file or directory

/var/run/utmp for instance it exists. I&apos;ll look more into it tomorrow.
THe failure from systemd-udev is because I disabled acl in systemd, I need to look over it again.

I also built and booted sato, and appears to be fine. No other failures than above, although I&apos;m a little intrigued it actually butted graphically since I have my default target set to multi-user instead of graphical. I&apos;ll look into this tomorrow as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28324</commentid>
    <comment_count>15</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-12-17 14:55:31 +0000</bug_when>
    <thetext>* Investigated the problem with ACL support. As far as I can tell devtmpfs does not have support for ACL, and thus the warnings when systemd-udev is trying to access /dev/snd/seq, /dev/sequencer and /dev/snd/timer. I can&apos;t think of other solution for this but to disable those from their respective init scripts. A second opinion on this will be much appreciated.

* Rebased my branch to master, and applied Martin&apos;s patch on initscripts

* took a look over meta-openembedded and noticed a few new patches that need to be brought in. 

* Ross mentioned a failure on atom-pc, didn&apos;t get to look over yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28327</commentid>
    <comment_count>16</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2012-12-17 15:28:46 +0000</bug_when>
    <thetext>Ignore my moans about it not working for now, that was probably due to meta-oe sneaking in and breaking it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28357</commentid>
    <comment_count>17</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-12-18 16:16:25 +0000</bug_when>
    <thetext>New commits:
* xserver-nodm-init: add systemd support
* util-linux: Enable systemd support
* lighttpd: Enable systemd support

Pulled in a few more patches from meta-openembedded.

Current issues:
* service 9oprofileui-server failing
* dropbear.service - complains about not being able to write bropbear_rsa_host_key because it already exists
* var-volatile.mount - complains about /var/volatile not empty when mounting</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28376</commentid>
    <comment_count>18</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2012-12-19 17:04:37 +0000</bug_when>
    <thetext>I dug a little after the 9oprofileui-server issue. I couldn&apos;t find anything wrong except it does not exist. We have however oprofileui-server file which is the script intended to run.Both /etc/init.d/oprofileui-server script and 
/usr/bin/oprofile-server binary exists.I don&apos;t understand where the &quot;9&quot; comes from. I&apos;m leaving aside this issue for now, I&apos;m moving in circles. 

Updated systemd to v196 and gave it a shoot but I&apos;m facing a problem which might not have an easy fix. dbus-daemon is not started and thus dbus.socket is failing. Starting from this point several services depending on dbus activation are failing to. The problem arose in the past as a dependency problem among sysvinit services that systemd was trying to start. However, the issue I&apos;m dealing with did not appear with previous version of systemd so I&apos;m thinking this is not the same issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29027</commentid>
    <comment_count>19</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-01-22 11:58:42 +0000</bug_when>
    <thetext>Ross submitted a pull request on the mailing list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29028</commentid>
    <comment_count>20</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-01-22 11:59:15 +0000</bug_when>
    <thetext>systemd changes merged into master</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30711</commentid>
    <comment_count>21</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-03-14 16:12:39 +0000</bug_when>
    <thetext>I could build a core-image-minimal, core-image-sato image with SystemD, install, boot, start/stop and enable/disable services.

I am setting this feature to Verified.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32839</commentid>
    <comment_count>22</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2013-05-02 10:17:47 +0000</bug_when>
    <thetext>Following Testopia test cases are created for this feature:
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=549
https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=724</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>