<?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>13535</bug_id>
          
          <creation_ts>2019-09-17 12:54:44 +0000</creation_ts>
          <short_desc>systemctl-native fails if service file contains non-unix newlines</short_desc>
          <delta_ts>2019-09-19 14:41: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>OE-Core</product>
          <component>core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>f.bre</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>84993</commentid>
    <comment_count>0</comment_count>
    <who name="">f.bre</who>
    <bug_when>2019-09-17 12:54:44 +0000</bug_when>
    <thetext>This is similar to Bug 9337.
I had a start-firmware.service file which contained a \r\n as newline instead of just \n at the end of the WantedBy line. The result was the service is not enabled in the image. It took me 2 days to find that out.

I think, the problem is in the recipes-core/systemd/systemd-systemctl/systemctl shell script. The &quot;real&quot; systemctl binary on the target system works properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84996</commentid>
    <comment_count>1</comment_count>
    <who name="">f.bre</who>
    <bug_when>2019-09-17 13:08:50 +0000</bug_when>
    <thetext>The systemctl script in poky/meta/recipes-core/systemd/systemd-systemctl is a bit too complicated for me to understand. But a fast look let me tend that somewhere in the beginning it should do a tr &apos;\r\n&apos; &apos;\n&apos; or something of the whole .service file.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84998</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2019-09-17 20:26:57 +0000</bug_when>
    <thetext>If you can replicate the problem easily by breaking your file again can you test that this patch against systemctl fixes it:

-                line = line.rstrip(&quot;\n&quot;)
+                line = line.strip()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84999</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2019-09-17 20:30:46 +0000</bug_when>
    <thetext>Patch on the list</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85012</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-09-19 14:41:47 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=9ad35b87070f67483dbc639c8274a6f30ae78165</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>