<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>217848</bug_id>
          
          <creation_ts>2008-04-15 20:04 0000</creation_ts>
          <short_desc>upgrade to sys-apps/openrc deletes /etc/conf.d/net without warning</short_desc>
          <delta_ts>2008-04-21 18:19:44 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>baselayout</component>
          <version>2007.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <keywords>InCVS</keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <votes>10</votes>
          <everconfirmed>1</everconfirmed>
          <reporter>graham@gmurray.org.uk</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>avenj@tellink.net</cc>
    
    <cc>caster@gentoo.org</cc>
    
    <cc>chris@realcomputerguy.com</cc>
    
    <cc>dev-portage@gentoo.org</cc>
    
    <cc>devon.miller@verizon.net</cc>
    
    <cc>m.debruijne@matrict.nl</cc>
    
    <cc>nshephard@gmail.com</cc>
    
    <cc>rafnov@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>graham@gmurray.org.uk</who>
            <bug_when>2008-04-15 20:04:39 0000</bug_when>
            <thetext>Following the upgrade to baselayout-2.0/openrc, /etc/conf.d/net was replaced by a skeleton rather than being migrated. dispatch-conf did not show this change and it was not mentioned in the upgrade guide.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nshephard@gmail.com</who>
            <bug_when>2008-04-15 20:48:20 0000</bug_when>
            <thetext>Same problem here on ~x86</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2008-04-15 20:51:01 0000</bug_when>
            <thetext>It will affect all arches. We are currently discussing this as this looks like it&apos;s a potential Portage issue.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pappy_mcfae@yahoo.com</who>
            <bug_when>2008-04-15 20:53:45 0000</bug_when>
            <thetext>Same problem here. I fixed it by recreating the link to net.eth0 in /etc/init.d. Unfortunately, I am left without the ability to rename my network interfaces at boot time. This happened with both ~x86 and ~amd64.

Color me unimpressed.

Blessed be!
Pappy</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2008-04-15 20:54:33 0000</bug_when>
            <thetext>http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/openrc/openrc-0.2.2.ebuild?r1=1.1&amp;r2=1.2

so far..</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nshephard@gmail.com</who>
            <bug_when>2008-04-15 20:57:03 0000</bug_when>
            <thetext>Should have said that its not too hard to resolve, by recreating a symlink for the interface and modifying the now blank /etc/conf.d/net configuration filebut it doesn&apos;t seem to be read during initialisation

********** Start ***********
$ ln -s /etc/init.d/net.lo /etc/init.d/net.eth0
$ more /etc/conf.d/net
# This blank configuration will automatically use DHCP for any net.*
# scripts in /etc/init.d.  To create a more complete configuration,
# please review /usr/share/doc/openrc/net.example and save your configuration
# in /etc/conf.d/net (this file :]!).
modules=( &quot;ifconfig&quot; )
modules_eth0=( &quot;dhcpcd&quot; )

# /etc/init.d/net.eth0 restart
 * Bringing down interface eth0
 *   Stopping dhcpcd on eth0 ...                                          [ ok ]
 * Bringing up interface eth0
 *   No configuration specified; defaulting to DHCP
 *   dhcp ...
 *     Running dhcpcd ...                                                 [ ok ]
 *     received address 192.168.1.100/24                                  [ ok ]
 *   Waiting for IPv6 addresses ...                                       [ ok 
# ifconfig eth0
eth0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500  metric 1
        inet 192.168.1.100  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::20c:76ff:fe12:9d40  prefixlen 64  scopeid 0x20&lt;link&gt;
        ether 00:0c:76:12:9d:40  txqueuelen 1000  (Ethernet)
        RX packets 72235  bytes 53425799 (50.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 100046  bytes 94590003 (90.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  base 0xce00  

*********** End ***********

Has the configuration file moved to a different location?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2008-04-15 21:10:45 0000</bug_when>
            <thetext>(In reply to comment #5)

&gt; ********** Start ***********
&gt; $ ln -s /etc/init.d/net.lo /etc/init.d/net.eth0
&gt; $ more /etc/conf.d/net
&gt; # This blank configuration will automatically use DHCP for any net.*
&gt; # scripts in /etc/init.d.  To create a more complete configuration,
&gt; # please review /usr/share/doc/openrc/net.example and save your configuration
&gt; # in /etc/conf.d/net (this file :]!).
&gt; modules=( &quot;ifconfig&quot; )
&gt; modules_eth0=( &quot;dhcpcd&quot; )
&gt;

Please review /usr/share/doc/openrc/net.example for how to set this file up.

&gt; 
&gt; Has the configuration file moved to a different location?
&gt; 

No.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nshephard@gmail.com</who>
            <bug_when>2008-04-15 21:22:30 0000</bug_when>
            <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; 
&gt; &gt; ********** Start ***********
&gt; &gt; $ ln -s /etc/init.d/net.lo /etc/init.d/net.eth0
&gt; &gt; $ more /etc/conf.d/net
&gt; &gt; # This blank configuration will automatically use DHCP for any net.*
&gt; &gt; # scripts in /etc/init.d.  To create a more complete configuration,
&gt; &gt; # please review /usr/share/doc/openrc/net.example and save your configuration
&gt; &gt; # in /etc/conf.d/net (this file :]!).
&gt; &gt; modules=( &quot;ifconfig&quot; )
&gt; &gt; modules_eth0=( &quot;dhcpcd&quot; )
&gt; &gt;
&gt; 
&gt; Please review /usr/share/doc/openrc/net.example for how to set this file up.
&gt; 
&gt; &gt; 
&gt; &gt; Has the configuration file moved to a different location?
&gt; &gt; 
&gt; 
&gt; No.
&gt; 

Thanks for the pointer Doug, didn&apos;t even occur to look in there for the net.example file.  Doesn&apos;t a copy normally reside in /etc/conf.d/net.example ?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2008-04-15 21:46:21 0000</bug_when>
            <thetext>(In reply to comment #7)
&gt; 
&gt; Thanks for the pointer Doug, didn&apos;t even occur to look in there for the
&gt; net.example file.  Doesn&apos;t a copy normally reside in /etc/conf.d/net.example ?
&gt; 

I&apos;ve added a note to the migration guide to check this out. /etc/conf.d/net.example was deprecated since it clutters up /etc/conf.d. The file has since moved to /usr/share/doc/openrc/net.example
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-04-15 22:40:58 0000</bug_when>
            <thetext>simply deleting the line still makes for etc-update hell

you also dont want to go adding /etc/conf.d/net to the default CONTENTS as it may contain passwords which can make it into a binpkg

http://sources.gentoo.org/sys-apps/openrc/openrc-0.2.1-r2.ebuild?r1=1.5&amp;r2=1.6
http://sources.gentoo.org/sys-apps/openrc/openrc-0.2.2.ebuild?r1=1.3&amp;r2=1.4
http://sources.gentoo.org/sys-apps/openrc/openrc-9999.ebuild?r1=1.30&amp;r2=1.31</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2008-04-15 22:52:59 0000</bug_when>
            <thetext>This bug isn&apos;t fixed because there appears to still be a bug in Portage wrt to deleting unmerged-orphans when it should not. This was confirmed by zmedico and is being researched.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2008-04-15 23:07:47 0000</bug_when>
            <thetext>*** Bug 217879 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zmedico@gentoo.org</who>
            <bug_when>2008-04-15 23:08:14 0000</bug_when>
            <thetext>(In reply to comment #10)
&gt; This bug isn&apos;t fixed because there appears to still be a bug in Portage wrt to
&gt; deleting unmerged-orphans when it should not. This was confirmed by zmedico and
&gt; is being researched.

I&apos;ve traced the issue back to the remap_dns_vars() function inside baselayout-1.12.12.ebuild. It copies your configs into ${D} so then portage sees all those configs as defaults when they actually contain whatever local modifications you&apos;ve made to them.

So unmerged-orphans is working by design. It&apos;s just the baselayout-1.12.12 ebuild is doing things to make your real configs appear to be the default ones.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>cardoe@gentoo.org</who>
            <bug_when>2008-04-15 23:17:40 0000</bug_when>
            <thetext>I guess this is back over to us. Too much hackery in these ebuilds..</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>chris@realcomputerguy.com</who>
            <bug_when>2008-04-16 13:17:35 0000</bug_when>
            <thetext>(In reply to comment #3)
&gt; Same problem here. I fixed it by recreating the link to net.eth0 in
&gt; /etc/init.d.

Different problem: /etc/init.d/net.eth0 != /etc/conf.d/net</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>pc-gentoo-bugs08a@crowcastle.net</who>
            <bug_when>2008-04-17 15:54:31 0000</bug_when>
            <thetext>This is a very serious problem.  On my laptop, I had fairly complex configurations in /etc/conf.d/net to configure either the ethernet or wireless for different environments, set up /etc/hosts based on location, launch ssh tunnels, and such.  I lost all of that and had to recreate everything from scratch.  Sure, for most users, it&apos;s not a big deal, but when using preup()/postup() and such, losing the file is a nightmare.

Could openrc be masked until this is fixed?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>avenj@tellink.net</who>
            <bug_when>2008-04-17 16:43:32 0000</bug_when>
            <thetext>Regarding comment #15: This is indeed an annoying bug, but masking would be rather counterproductive at this point. I would suggest, though, that the OpenRC migration guide may want to mention keeping a copy of /etc/conf.d backed up for reference purposes when migrating, especially until this bug is fixed...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zmedico@gentoo.org</who>
            <bug_when>2008-04-17 17:00:37 0000</bug_when>
            <thetext>(In reply to comment #15)
&gt; Could openrc be masked until this is fixed?

Due to the effects of the remap_dns_vars() function, all users who currently have baselayout-1.12.12 installed are in danger of losing any config files in /etc/conf.d that haven&apos;t changed since it was installed.

One possible solution is to add `touch &quot;${ROOT}&quot;/etc/conf.d/*` the pkg_preinst() function of the baselayout-2 ebuild. This will protect those files from being unmerged with the rest of the baselayout-1.12.12 contents, effectively undoing the damage that was initially done by the remap_dns_vars() function.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zmedico@gentoo.org</who>
            <bug_when>2008-04-17 17:15:10 0000</bug_when>
            <thetext>Created an attachment (id=150090)
make the baselayout-2.0.0 ebuild protect config fiels in /etc/conf.d

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zmedico@gentoo.org</who>
            <bug_when>2008-04-17 17:45:31 0000</bug_when>
            <thetext>(In reply to comment #18)
&gt; Created an attachment (id=150090) [edit]
&gt; make the baselayout-2.0.0 ebuild protect config fiels in /etc/conf.d

That&apos;s in cvs now, so users are protected. I&apos;m not sure if you guys want to do anything about the remap_dns_vars() in the old ebuilds or just let it go since the workaround now in the baselayout-2.0.0 ebuild makes it relatively harmless.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>caster@gentoo.org</who>
            <bug_when>2008-04-17 18:47:41 0000</bug_when>
            <thetext>(In reply to comment #18)
&gt; Created an attachment (id=150090) [edit]
&gt; make the baselayout-2.0.0 ebuild protect config fiels in /etc/conf.d

I think this should go to openrc not baselayout, as openrc is now owner of the files there? And last time I checked, a different workaround for /etc/conf.d/net workaround was already there.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>zmedico@gentoo.org</who>
            <bug_when>2008-04-17 19:33:10 0000</bug_when>
            <thetext>(In reply to comment #20)
&gt; I think this should go to openrc not baselayout, as openrc is now owner of the
&gt; files there?

Is has to go in the baselayout-2.0.0 ebuild it is when upgrading to that ebuild (and then unmerging baselayout-1.x) that the user&apos;s configs get lost.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-04-21 18:19:44 0000</bug_when>
            <thetext>*** Bug 218725 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>150090</attachid>
            <date>2008-04-17 17:15 0000</date>
            <desc>make the baselayout-2.0.0 ebuild protect config fiels in /etc/conf.d</desc>
            <filename>workaround_remap_dns_vars.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IGJhc2VsYXlvdXQtMi4wLjAuZWJ1aWxkCj09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC92YXIv
Y3Zzcm9vdC9nZW50b28teDg2L3N5cy1hcHBzL2Jhc2VsYXlvdXQvYmFzZWxheW91dC0yLjAuMC5l
YnVpbGQsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuMgpkaWZmIC11IC1iIC1CIC1yMS4yIGJhc2Vs
YXlvdXQtMi4wLjAuZWJ1aWxkCi0tLSBiYXNlbGF5b3V0LTIuMC4wLmVidWlsZAk4IEFwciAyMDA4
IDAxOjMxOjE5IC0wMDAwCTEuMgorKysgYmFzZWxheW91dC0yLjAuMC5lYnVpbGQJMTcgQXByIDIw
MDggMTc6MTE6NTMgLTAwMDAKQEAgLTE3LDYgKzE3LDEzIEBACiBQREVQRU5EPSJzeXMtYXBwcy9v
cGVucmMiCiAKIHBrZ19wcmVpbnN0KCkgeworCSMgU2luY2UgdGhlIHJlbWFwX2Ruc192YXJzKCkg
Y2FsbGVkIGJ5IHBrZ19wcmVpbnN0KCkgb2YgdGhlIGJhc2VsYXlvdXQtMS54CisJIyBlYnVpbGQg
Y29waWVzIGFsbCB0aGUgcmVhbCBjb25maWdzIGZyb20gdGhlIHVzZXIncyAvZXRjL2NvbmYuZCBp
bnRvCisJIyAke0R9LCBpdCBtYWtlcyB0aGVtIGFsbCBhcHBlYXIgdG8gYmUgdGhlIGRlZmF1bHQg
dmVyc2lvbnMuIEluIG9yZGVyCisJIyB0byBwcm90ZWN0IHRoZW0gZnJvbSBiZWluZyB1bm1lcmdl
ZCBhZnRlciB0aGlzIHVwZ3JhZGUsIG1vZGlmeSB0aGVpcgorCSMgdGltZXN0YW1wcy4KKwl0b3Vj
aCAiJHtST09UfSIvZXRjL2NvbmYuZC8qCisKIAkjIFdlIG5lZWQgdG8gaW5zdGFsbCBkaXJlY3Rv
cmllcyBhbmQgbWF5YmUgc29tZSBkZXYgbm9kZXMgd2hlbiBidWlsZGluZwogCSMgc3RhZ2VzLCBi
dXQgdGhleSBjYW5ub3QgYmUgaW4gQ09OVEVOVFMuCiAJIyBBbHNvLCB3ZSBjYW5ub3QgcmVmZXJl
bmNlICRTIGFzIGJpbnBrZyB3aWxsIGJyZWFrIHNvIHdlIGRvIHRoaXMuCg==
</data>        

          </attachment>
    </bug>

</bugzilla>