<?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>5789</bug_id>
          
          <creation_ts>2014-02-05 11:41:15 +0000</creation_ts>
          <short_desc>IPK Postinstalls spit out sed failures.</short_desc>
          <delta_ts>2014-03-03 22:49:08 +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>1.6</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Nyström">david.nystrom</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>laurentiu.palcu</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</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>40189</commentid>
    <comment_count>0</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2014-02-05 11:41:15 +0000</bug_when>
    <thetext>| sed: -e expression #1, char 41: unterminated address regex
| sed: -e expression #1, char 42: unterminated address regex
| sed: -e expression #1, char 41: unterminated address regex
| sed: -e expression #1, char 42: unterminated address regex

During do_rootfs, when running postinstalls(IPK) for core-image-minimal, these error reports from sed can be seen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40190</commentid>
    <comment_count>1</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2014-02-05 11:42:21 +0000</bug_when>
    <thetext>These are seen when installing packagegroup-core-boot, I suspect its related to update-alternatives.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40549</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-02-21 00:49:04 +0000</bug_when>
    <thetext>David, could you give some more details, and possibly double check if this is 
fixed, we recently refactored the packaging/rootfs generation, I just tried to 
build core-image-minimal with IPK, but did not see these errors, so I would 
like better information about a reproducer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40784</commentid>
    <comment_count>3</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2014-02-28 08:35:02 +0000</bug_when>
    <thetext>Saul asked on IRC yesturday, and yes, I still see this on master.

NOTE: Installing the following packages: opkg-collateral run-postinsts tcf-agent packagegroup-core-eclipse-debug dhcp-client packagegroup-core-boot opkg poky-feed-config-opkg
NOTE: /media/sdb5/oel/build/tmp/sysroots/x86_64-linux/usr/bin/opkg-cl -f /media/sdb5/oel/build/tmp/work/p1025twr-oel-linux-gnuspe/core-image-minimal/1.0-r0/opkg.conf -o /media/sdb5/oel/build/tmp
/work/p1025twr-oel-linux-gnuspe/core-image-minimal/1.0-r0/rootfs --force_postinstall --prefer-arch-to-version   install opkg-collateral run-postinsts tcf-agent packagegroup-core-eclipse-debug dh
cp-client packagegroup-core-boot opkg poky-feed-config-opkg
sed: -e expression #1, char 41: unterminated address regex
sed: -e expression #1, char 42: unterminated address regex
sed: -e expression #1, char 41: unterminated address regex
sed: -e expression #1, char 42: unterminated address regex

Isolated the issue with rootfs-sandbox to busybox, when running update alternatives on mdev.

update-alternatives: Linking /tmp/rootfs//bin/sh to /usr/lib/busybox/bin/sh
update-alternatives: Linking /tmp/rootfs//sbin/fstrim to /usr/lib/busybox/sbin/fstrim
update-alternatives: Linking /tmp/rootfs//sbin/mdev to /usr/lib/busybox/sbin/mdev
sed: -e expression #1, char 41: unterminated address regex
sed: -e expression #1, char 42: unterminated address regex
&lt;snip&gt;
update-alternatives: Linking /tmp/rootfs//sbin/fstrim to /usr/lib/busybox/sbin/fstrim
update-alternatives: Linking /tmp/rootfs//sbin/mdev to /usr/lib/busybox/sbin/mdev
sed: -e expression #1, char 41: unterminated address regex
sed: -e expression #1, char 42: unterminated address regex

Update alternatives seems to be run twice for all symlinks, 
Thus yeilding 4 sed errors where two are generated each run.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40788</commentid>
    <comment_count>4</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2014-02-28 10:14:42 +0000</bug_when>
    <thetext>Looking at the busybox postinstall it indeed runs update-alternatives twice for each binary. This calls for another bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40789</commentid>
    <comment_count>5</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2014-02-28 10:22:17 +0000</bug_when>
    <thetext>Found the issue:

Garbage in the generated busybox postinstall

$ cat var/lib/opkg/info/busybox.postinst  | grep -C 3 mdev
	update-alternatives --install /bin/ash ash /usr/lib/busybox/bin/ash 50
	update-alternatives --install /bin/sh sh /usr/lib/busybox/bin/sh 50
	update-alternatives --install /sbin/fstrim fstrim /usr/lib/busybox/sbin/fstrim 50
	update-alternatives --install /sbin/mdev mdev /usr/lib/busybox/sbin/mdev 50
	update-alternatives --install /usr/bin/[ lbracket /usr/lib/busybox/usr/bin/[ 50
	update-alternatives --install /usr/bin/[[ [[ /usr/lib/busybox/usr/bin/[[ 50
	update-alternatives --install /usr/sbin/addgroup addgroup /usr/lib/busybox/usr/sbin/addgroup 50
--
	update-alternatives --install /bin/ash ash /usr/lib/busybox/bin/ash 50
	update-alternatives --install /bin/sh sh /usr/lib/busybox/bin/sh 50
	update-alternatives --install /sbin/fstrim fstrim /usr/lib/busybox/sbin/fstrim 50
	update-alternatives --install /sbin/mdev mdev /usr/lib/busybox/sbin/mdev 50
	update-alternatives --install /usr/bin/[ lbracket /usr/lib/busybox/usr/bin/[ 50
	update-alternatives --install /usr/bin/[[ [[ /usr/lib/busybox/usr/bin/[[ 50
	update-alternatives --install /usr/sbin/addgroup addgroup /usr/lib/busybox/usr/sbin/addgroup 50</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40792</commentid>
    <comment_count>6</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2014-02-28 10:28:08 +0000</bug_when>
    <thetext>$ cat etc/busybox.links.nosuid | grep -C 4 mdev
/sbin/rmmod
/bin/ash
/bin/sh
/sbin/fstrim
/sbin/mdev
/usr/bin/[
/usr/bin/[[
/usr/sbin/addgroup
/usr/sbin/adduser

links.nosuid is tainted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40822</commentid>
    <comment_count>7</comment_count>
    <who name="David Nyström">david.nystrom</who>
    <bug_when>2014-03-03 08:40:50 +0000</bug_when>
    <thetext>Stems from meta-selinux busybox bbappend it seems.
The bug on oe-core can be closed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40849</commentid>
    <comment_count>8</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-03-03 22:49:08 +0000</bug_when>
    <thetext>David, thanks for following up on this, this is very helpful to know the the 
additional information that you were using mdev and meta-selinux. Your intitial 
description did not include that and I would have been chasing this issue.  I 
am glad you could track it down, I will close this.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>