<?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>14080</bug_id>
          
          <creation_ts>2020-10-08 05:48:33 +0000</creation_ts>
          <short_desc>string replace in do_install_append breaks pseudo</short_desc>
          <delta_ts>2020-10-09 04:05:04 +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>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>3.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>nickersk</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>JPEWhacker</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</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>88321</commentid>
    <comment_count>0</comment_count>
    <who name="">nickersk</who>
    <bug_when>2020-10-08 05:48:33 +0000</bug_when>
    <thetext>we have in do_install_append in initscripts bbappend this replace commands:

perl -i -pe &apos;s:mount -a.+?$:mount -a -t 
 nonfs,nfs4,smbfs,cifs,ncp,ncpfs,coda,ocfs2,gfs,gfs2,ceph -O no_netdev 2&gt;/dev/null:&apos; ${D}${sysconfdir}/init.d/mountall.sh

perl -i -pe &apos;s:(mount -a).*?$:$1:&apos; ${D}${sysconfdir}/init.d/mountnfs.sh

which causes pseudo abort and build fail.

this error became in place after this oe-core commit: 
https://git.openembedded.org/openembedded-core/commit/?h=master-next&amp;id=2db491d97da08d44ebd257f98489550a82a7935c

how can/should be this error fixed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88326</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-10-08 07:52:43 +0000</bug_when>
    <thetext>CAan you clean the recipe and report if this is reproducible?

If it is, please also, try to remove your &lt;proj&gt;/tmp directory?
Richard is going to add a warning if this clean-up is needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88336</commentid>
    <comment_count>2</comment_count>
    <who name="">nickersk</who>
    <bug_when>2020-10-08 08:36:03 +0000</bug_when>
    <thetext>wipeing out tmpdir, do_cleanall and build from scratch didnt work, same error

exit 134 from &apos;perl -i
-pe &apos;s:mount -a.+?$:mount -a -t nonfs,nfs4,smbfs,cifs,ncp,ncpfs,coda,ocfs2,gfs,g
fs2,ceph -O no_netdev 2&gt;/dev/null:&apos;
tmp/work/mips32el-oe-linux/initscripts/1.0-r155.7/image/etc/init.d/mountall.sh&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88337</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Watt">JPEWhacker</who>
    <bug_when>2020-10-08 08:38:32 +0000</bug_when>
    <thetext>I ran perl under strace to see if it&apos;s doing something weird. Here is the relevant output:

$ touch foo.txt; strace perl -i -pe &apos;s:(mount -a).*?$:$1:&apos; foo.txt
openat(AT_FDCWD, &quot;foo.txt&quot;, O_RDONLY)   = 3                                     
ioctl(3, TCGETS, 0x7fffde1209f0)        = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR)                   = 0                                     
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0                            
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0                                     
unlink(&quot;foo.txt&quot;)                       = 0                                     
openat(AT_FDCWD, &quot;foo.txt&quot;, O_WRONLY|O_CREAT|O_EXCL, 0600) = 4                   
ioctl(4, TCGETS, 0x7fffde1209f0)        = -1 ENOTTY (Inappropriate ioctl for device)
lseek(4, 0, SEEK_CUR)                   = 0                                      
fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0                             
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0                                      
fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0                             
fchmod(4, 0100644)                      = 0                                      
read(3, &quot;&quot;, 8192)                       = 0                                      
close(4)                                = 0                                      
close(3)                                = 0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88347</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-10-08 14:28:59 +0000</bug_when>
    <thetext>I think Joshua ran that under perl 5.26.1 and I saw similar on my build machine where that do_install_append worked. I did find a machine with perl 5.30 on it which gave:

openat(AT_FDCWD, &quot;foo.txt&quot;, O_RDONLY|O_CLOEXEC) = 3
ioctl(3, TCGETS, 0x7ffe3b6def30)        = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR)                   = 0
fstat(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
umask(0177)                             = 002
getpid()                                = 3242451
openat(AT_FDCWD, &quot;XXCPEqW8&quot;, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 4
fcntl(4, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)
umask(002)                              = 0177
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
ioctl(4, TCGETS, 0x7ffe3b6defc0)        = -1 ENOTTY (Inappropriate ioctl for device)
lseek(4, 0, SEEK_CUR)                   = 0
fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
getpid()                                = 3242451
openat(AT_FDCWD, &quot;.&quot;, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 5
fstat(5, {st_mode=S_IFDIR|S_ISVTX|0777, st_size=978944, ...}) = 0
fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fchmod(4, 0100664)                      = 0
brk(0x55aebdfc7000)                     = 0x55aebdfc7000
read(3, &quot;&quot;, 8192)                       = 0
close(4)                                = 0
getpid()                                = 3242451
renameat(5, &quot;XXCPEqW8&quot;, 5, &quot;foo.txt&quot;)   = 0
close(5)                                = 0
close(3)                                = 0

Which perl version is on the system from the original report?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88348</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-10-08 14:59:56 +0000</bug_when>
    <thetext>I confirmed this is only an issue with perl 5.30 and does abort on that system. It looks like the:

openat(AT_FDCWD, &quot;XXCPEqW8&quot;, O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 4

call isn&apos;t seen by pseudo. Running out of time to work out why today though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88349</commentid>
    <comment_count>6</comment_count>
      <attachid>4737</attachid>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-10-08 15:35:50 +0000</bug_when>
    <thetext>Created attachment 4737
Patch to pseudo which fixed the issue on my system</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88350</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-10-08 15:36:58 +0000</bug_when>
    <thetext>When I applied the attached patch to pseudo, this started working for me on my system with perl 5.30. Could you confirm if it works for you please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88351</commentid>
    <comment_count>8</comment_count>
    <who name="">nickersk</who>
    <bug_when>2020-10-08 22:36:49 +0000</bug_when>
    <thetext>I can confirm, works with provided patch. Thank You.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88355</commentid>
    <comment_count>9</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2020-10-09 04:05:04 +0000</bug_when>
    <thetext>Thanks for testing.

I&apos;ve merged the fix into pseudo and master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=d446d8b818a49e66b72fccbd29328cdbf4294239</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>4737</attachid>
            <date>2020-10-08 15:35:50 +0000</date>
            <delta_ts>2020-10-08 15:35:50 +0000</delta_ts>
            <desc>Patch to pseudo which fixed the issue on my system</desc>
            <filename>mkostemp64.patch</filename>
            <type>text/plain</type>
            <size>3787</size>
            <attacher name="Richard Purdie">richard.purdie</attacher>
            
              <data encoding="base64">SW5kZXg6IGdpdC9wb3J0cy9saW51eC9ndXRzL21rb3N0ZW1wNjQuYwo9PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSAv
ZGV2L251bGwKKysrIGdpdC9wb3J0cy9saW51eC9ndXRzL21rb3N0ZW1wNjQuYwpAQCAtMCwwICsx
LDQ5IEBACisvKiAKKyAqIENvcHlyaWdodCAoYykgMjAxMCBXaW5kIFJpdmVyIFN5c3RlbXM7IHNl
ZQorICogZ3V0cy9DT1BZUklHSFQgZm9yIGluZm9ybWF0aW9uLgorICoKKyAqIFNQRFgtTGljZW5z
ZS1JZGVudGlmaWVyOiBMR1BMLTIuMS1vbmx5CisgKgorICogc3RhdGljIGludAorICogd3JhcF9t
a3N0ZW1wNjQoY2hhciAqdGVtcGxhdGUsIGludCBvZmxhZ3MpIHsKKyAqCWludCByYyA9IC0xOwor
ICovCisJc3RydWN0IHN0YXQ2NCBidWY7CisgCWludCBzYXZlX2Vycm5vOworCXNpemVfdCBsZW47
CisJY2hhciAqdG1wX3RlbXBsYXRlOworCisJaWYgKCF0ZW1wbGF0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