<?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>10669</bug_id>
          
          <creation_ts>2016-11-15 22:14:38 +0000</creation_ts>
          <short_desc>apt package missing systemd files</short_desc>
          <delta_ts>2017-12-06 17:16:31 +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>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>All</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>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>linus.wallgren</reporter>
          <assigned_to>linus.wallgren</assigned_to>
          <cc>anibal.limon</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</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>68336</commentid>
    <comment_count>0</comment_count>
    <who name="">linus.wallgren</who>
    <bug_when>2016-11-15 22:14:38 +0000</bug_when>
    <thetext>Upstream apt installs the following files:

- /lib/systemd/system/apt-daily.service
- /lib/systemd/system/apt-daily.service
- /usr/lib/apt/apt.systemd.daily

These are used for running daily tasks such as automatically running `apt-get update`, running `unattended-upgrades`, `apt-get clean` and such.

These files are not included in the packages built from the yocto apt recipe.

Discussing this on IRC Ross Burton raised the question of why the current apt recipe is doing do_install manually and not using the upstream rules. Sadly I don&apos;t know enough about the yocto build-system to answer that, however the majority of the do_install is from commit abfc1dbd, which was done 10 years ago.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68398</commentid>
    <comment_count>1</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-11-17 14:58:02 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Upstream apt installs the following files:
&gt; 
&gt; - /lib/systemd/system/apt-daily.service
&gt; - /lib/systemd/system/apt-daily.service
&gt; - /usr/lib/apt/apt.systemd.daily
&gt; 
&gt; These are used for running daily tasks such as automatically running
&gt; `apt-get update`, running `unattended-upgrades`, `apt-get clean` and such.
&gt; 
&gt; These files are not included in the packages built from the yocto apt recipe.
&gt; 
&gt; Discussing this on IRC Ross Burton raised the question of why the current
&gt; apt recipe is doing do_install manually and not using the upstream rules.
&gt; Sadly I don&apos;t know enough about the yocto build-system to answer that,
&gt; however the majority of the do_install is from commit abfc1dbd, which was
&gt; done 10 years ago.

This case wasn&apos;t covered before so i&apos;ll review the install step for package those  systemd files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68399</commentid>
    <comment_count>2</comment_count>
    <who name="">linus.wallgren</who>
    <bug_when>2016-11-17 15:06:56 +0000</bug_when>
    <thetext>I submitted this patch:

http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128870.html

What do you think about that?

Also, was this the correct way for me to submit the issue and patch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68402</commentid>
    <comment_count>3</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-11-17 15:39:54 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; I submitted this patch:
&gt; 
&gt; http://lists.openembedded.org/pipermail/openembedded-core/2016-November/
&gt; 128870.html
&gt; 
&gt; What do you think about that?
&gt; 
&gt; Also, was this the correct way for me to submit the issue and patch?

Looks good, only missing one thing you need to conditional those lines to only work when systemd is enabled in DISTRO_FEATURES, see example:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-support/consolekit/consolekit_0.4.6.bb#n26</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68468</commentid>
    <comment_count>4</comment_count>
    <who name="">linus.wallgren</who>
    <bug_when>2016-11-21 21:05:05 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; I submitted this patch:
&gt; &gt; 
&gt; &gt; http://lists.openembedded.org/pipermail/openembedded-core/2016-November/
&gt; &gt; 128870.html
&gt; &gt; 
&gt; &gt; What do you think about that?
&gt; &gt; 
&gt; &gt; Also, was this the correct way for me to submit the issue and patch?
&gt; 
&gt; Looks good, only missing one thing you need to conditional those lines to
&gt; only work when systemd is enabled in DISTRO_FEATURES, see example:
&gt; 
&gt; http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-support/
&gt; consolekit/consolekit_0.4.6.bb#n26

As Andreas mentioned[0] as a reply to the patch the systemd bbclass will ensure systemd files only are included if that DISTRO_FEATURE is enabled.

I have however fixed indentation to be consistent with the rest of the file [1].

[0]: http://lists.openembedded.org/pipermail/openembedded-core/2016-November/128995.html
[1]: http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129031.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68492</commentid>
    <comment_count>5</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-11-22 16:52:15 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; (In reply to comment #2)
&gt; &gt; &gt; I submitted this patch:
&gt; &gt; &gt; 
&gt; &gt; &gt; http://lists.openembedded.org/pipermail/openembedded-core/2016-November/
&gt; &gt; &gt; 128870.html
&gt; &gt; &gt; 
&gt; &gt; &gt; What do you think about that?
&gt; &gt; &gt; 
&gt; &gt; &gt; Also, was this the correct way for me to submit the issue and patch?
&gt; &gt; 
&gt; &gt; Looks good, only missing one thing you need to conditional those lines to
&gt; &gt; only work when systemd is enabled in DISTRO_FEATURES, see example:
&gt; &gt; 
&gt; &gt; http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-support/
&gt; &gt; consolekit/consolekit_0.4.6.bb#n26
&gt; 
&gt; As Andreas mentioned[0] as a reply to the patch the systemd bbclass will
&gt; ensure systemd files only are included if that DISTRO_FEATURE is enabled.
&gt; 
&gt; I have however fixed indentation to be consistent with the rest of the file
&gt; [1].
&gt; 
&gt; [0]:
&gt; http://lists.openembedded.org/pipermail/openembedded-core/2016-November/
&gt; 128995.html
&gt; [1]:
&gt; http://lists.openembedded.org/pipermail/openembedded-core/2016-November/
&gt; 129031.html

Fair enough, thanks for your patch.

Cheers,
    alimon</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70489</commentid>
    <comment_count>6</comment_count>
    <who name="">linus.wallgren</who>
    <bug_when>2017-02-07 15:34:31 +0000</bug_when>
    <thetext>cde67af8ce9b8e72b5818233a7ef4c2aa181404a seems to have solved this issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>