<?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>14395</bug_id>
          
          <creation_ts>2021-05-15 16:49:04 +0000</creation_ts>
          <short_desc>Postinstall scriptlets Error misleading with systemd errors</short_desc>
          <delta_ts>2023-01-10 18:54:45 +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>5.99</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>NIR 12/09, 12/16, 12/23, 12/30, 01/06</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>4.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="akuster">akuster808</reporter>
          <assigned_to name="akuster">akuster808</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90396</commentid>
    <comment_count>0</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2021-05-15 16:49:04 +0000</bug_when>
    <thetext>ERROR: security-build-image-1.0-r0 do_rootfs: Postinstall scriptlets of [&apos;clamav-daemon&apos;] have failed. If the intention is to defer them to first boot,
then please place them into pkg_postinst_ontarget_${PN} ().
Deferring to first boot via &apos;exit 1&apos; is no longer supported.
Details of the failure are in /home/build/builds/master/tmp/work/qemux86_64-poky-linux/security-build-image/1.0-r0/temp/log.do_rootfs.

The problem is a missing dependency in the systemd service file.

This is the error. 

__main__.SystemdUnitNotFoundError: (PosixPath(&apos;/home/build/builds/master/tmp/work/qemux86_64-poky-linux/security-build-image/1.0-r0/rootfs&apos;), &apos;clamav-daemon.socket&apos;)
%post(clamav-daemon-0.104.0-r0.core2_64): waitpid(3635548) rc 3635548 status 100
warning: %post(clamav-daemon-0.104.0-r0.core2_64) scriptlet failed, exit status 1


Not sure if we can improve the Error to be more informative.

The recipe did have a &quot;pkg_postinst_ontarget_&quot; so it sent me off in a wild goose chase. 

Wonder if systemd_preset_all() could be more informative.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90541</commentid>
    <comment_count>1</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2021-06-01 13:51:52 +0000</bug_when>
    <thetext>patches sent to ML</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94355</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-11-03 15:12:44 +0000</bug_when>
    <thetext>Armin, 

Is this fixed now and if so, what are the patches?

../Randy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94652</commentid>
    <comment_count>3</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2023-01-10 17:11:33 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Armin, 
&gt; 
&gt; Is this fixed now and if so, what are the patches?
&gt; 
&gt; ../Randy

yes.

https://git.yoctoproject.org/poky/commit/?id=75f691d728dba4de53f89cd7ce1cdb69e35000cf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94653</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-01-10 18:54:45 +0000</bug_when>
    <thetext>Thanks Armin.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>