|
Bugzilla – Full Text Bug Listing |
| Summary: | netcfg's rename of HOSTNAME breaks | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | Stephan Kulow <coolo> |
| Component: | Network | Assignee: | Tomáš Chvátal <tchvatal> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P1 - Urgent | CC: | behlert, fcrozat, mls, mrmazda, mrueckert, ohering |
| Version: | 201409* | Flags: | coolo:
SHIP_STOPPER+
|
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
Stephan Kulow
2014-10-02 11:57:15 UTC
I tried with plain rpm -Uhv to go from 18.1.2 to 25.1 without success in reproducing this issue. Even zypper dup works on changeroot with /etc/HOSTNAME change and also unchanged.
Michael, would you have an idea what's wrong? /etc/HOSTNAME was regular file and now it is symbolic link to /etc/hostname.
Relevant parts of scriptlets:
%pre
if [ "0$1" -ge "2" ]; then
if [ -f /etc/HOSTNAME -a ! -L /etc/HOSTNAME ]; then
if [ -f /etc/hostname ]; then
mv /etc/hostname /etc/hostname.rpmsave
fi
ln -f /etc/HOSTNAME /etc/HOSTNAME.rpmsave
rm /etc/HOSTNAME
fi
fi
%post
if [ -f /etc/HOSTNAME.rpmsave -a ! -L /etc/HOSTNAME.rpmsave ]; then
cp -a /etc/HOSTNAME.rpmsave /etc/hostname
fi
Discussion is in yet referenced bug 883999.
Tried an update on live 13.1: 1. created fully patched 13.1 2. create temp-repo dir with netcfg-11.5-25.1 in it; 3. add temp-repo as zypper repo 3. zypper dup This went without any error. On the same system I have downgraded netcfg back to 11.5-18.1.2 and then subscribed to http://download.opensuse.org/factory/repo/oss/ and did zypper dup. It is updating without errors so far and netcfg was updated to 25.1 correctly yet. I guess you must not remove the old /etc/HOSTNAME. I think the error happens when rpm tries to rename the old /etc/HOSTNAME file to /etc/HOSTNAME.rpmxxx. It tries to do this because at the time the file fates are decided the preinstall script is not run. So when you then mess with the system in the preinstall script, rpm's expectations are no longer valid. So I would remove the "rm /etc/HOSTNAME" line. Michael, that makes sense, thanks! This is an autogenerated message for OBS integration: This bug (899506) was mentioned in https://build.opensuse.org/request/show/253698 Factory / netcfg Good news: 1) I can easily reproduce the problem. But only with Factory's rpm version. 2) I can confirm that it's the rpmsave rename that breaks the update. 3) Your new netcfg version works. As the rpm in SLE-12 does not care about the failing rpmsave rename, it's IMHO ok to not have a fixed version in SLE-12. But Stefan needs to decide this. (In reply to Michael Schroeder from comment #9) > Good news: > > 1) I can easily reproduce the problem. But only with Factory's rpm version. > > 2) I can confirm that it's the rpmsave rename that breaks the update. > > 3) Your new netcfg version works. > > As the rpm in SLE-12 does not care about the failing rpmsave rename, it's > IMHO ok to not have a fixed version in SLE-12. But Stefan needs to decide > this. Thats really verry good news, thanks! And I'm very happy that my instict told me not to copy the rpm to 13.2 - 13.2's dup tests did not show the problem :) No showstopper for SLE 12. Fixed. *** Bug 899517 has been marked as a duplicate of this bug. *** This fix is incomplete you have to remove the HOSTNAME.rpmsave. Otherwise every upgrade of the netcfg package will restore HOSTNAME.rpmsave again and thus overwrite changes done by the admin in the meantime. HOSTNAME.rpmsave restored?? I do not understand I am afraid :(. I guess we can drop whole migration nonsense anyway now? I. e. dummy netcfg could ship only /etc/hostname, nothing more? Or, would it be possible to not do migration on the rpm level? Btw. who needs /etc/HOSTNAME link at all? Really, really confused. You currently have: ``` if [ -f /etc/HOSTNAME.rpmsave -a ! -L /etc/HOSTNAME.rpmsave ]; then cp -a /etc/HOSTNAME.rpmsave /etc/hostname fi ``` You want: ``` if [ -f /etc/HOSTNAME.rpmsave -a ! -L /etc/HOSTNAME.rpmsave ]; then cp -a /etc/HOSTNAME.rpmsave /etc/hostname rm /etc/HOSTNAME.rpmsave fi ``` I think darix just wants you to add a rm -f /etc/HOSTNAME.rpmsave after the cp statement in the post scriptlet. (And maybe he also complains a bit about you using .rpmsave as suffix, as that's also what rpm uses and so there can be an old HOSTNAME.rpmsave file in the system from some old rpm run...) and all the other scripts with a similar fashion should have the rm call. Hopefully fixed in the Base:System and sent to Factory. This is an autogenerated message for OBS integration: This bug (899506) was mentioned in https://build.opensuse.org/request/show/263637 Factory / netcfg This is an autogenerated message for OBS integration: This bug (899506) was mentioned in https://build.opensuse.org/request/show/264371 13.2 / netcfg openSUSE-RU-2014:1633-1: An update that has three recommended fixes can now be installed. Category: recommended (moderate) Bug References: 858908,887039,899506 CVE References: Sources used: openSUSE 13.2 (src): netcfg-11.5-24.5.1 |