<?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>14152</bug_id>
          
          <creation_ts>2020-12-11 10:29:24 +0000</creation_ts>
          <short_desc>cups: under systemd needs to use /run/cups as rundir</short_desc>
          <delta_ts>2021-03-22 01:46:57 +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>oe-core other</component>
          <version>3.1.4</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>3.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="tf">tf+bugs.yocto</reporter>
          <assigned_to name="Kai Kang">kai.kang</assigned_to>
          <cc>open.source</cc>
    
    <cc>randy.macleod</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>88767</commentid>
    <comment_count>0</comment_count>
    <who name="tf">tf+bugs.yocto</who>
    <bug_when>2020-12-11 10:29:24 +0000</bug_when>
    <thetext>Preconditions/Environment
-------------------------
dunfell image with systemd and cups

Triggering Action/Cause
-----------------------
Attempt to connect to cups daemon twice with sufficient time gap to allow it to exit (or close the daemon in between using systemctl).
 
Expectation
-----------
The cups daemon is supposed to auto-start every time.

Actual Result
-------------
The cups daemon will only auto-start on the first connection attempt.


Reproducibility
---------------
100%


The gist of it is that when running under systemd, cups needs to be configured with &apos;--with-rundir=/run/cups&apos;, as systemd takes an exception to the activation socket being under /var/run and relocates it. This leads to fd duplication in cupsd and an inadvertent closure of the activation socket when the daemon exits due to inactivity, so that the daemon cannot be activated again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89336</commentid>
    <comment_count>1</comment_count>
    <who name="Oleksandr Kravchuk">open.source</who>
    <bug_when>2021-02-21 16:54:14 +0000</bug_when>
    <thetext>I have sent a fix proposal: https://lists.openembedded.org/g/openembedded-core/topic/patch_cups_set_rundir_to/80803907?p=,,,20,0,0,0::recentpostdate%2Fsticky,,,20,2,0,80803907</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89368</commentid>
    <comment_count>2</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2021-02-24 07:16:02 +0000</bug_when>
    <thetext>Hi tf, Oleksandr,

I can not reproduce this failure. And I believe it has been fixed already by commit in master:

https://git.openembedded.org/openembedded-core/commit/meta/recipes-extended/cups?id=6c3f56020da7a26c2daea73e39c2f324f1f597db

cups: use /run instead /var/run in systemd&apos;s unit file
/var/run has been deprecated by systemd, so use /run instead,
as suggested by systemd.

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

I&apos;ll ask @steve to cherry-pick it for dunfell.

Regards,
Kai</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89521</commentid>
    <comment_count>3</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2021-03-09 01:41:39 +0000</bug_when>
    <thetext>Sent cherry pick request for branch dunfell in oe-core maillist.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89671</commentid>
    <comment_count>4</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2021-03-22 01:46:57 +0000</bug_when>
    <thetext>https://git.openembedded.org/openembedded-core/commit/?h=dunfell&amp;id=7c88d52eaca62237afcda606a3078ec483992213</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>