Bug 887039 - unnecessary write to /etc/HOSTNAME and/or /etc/hostname unnecessarily prevents netcfg installation
Summary: unnecessary write to /etc/HOSTNAME and/or /etc/hostname unnecessarily prevent...
Status: RESOLVED WONTFIX
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: 13.2 Milestone 0
Hardware: All Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Tomáš Chvátal
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-12 21:56 UTC by Felix Miata
Modified: 2015-02-19 07:33 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Miata 2014-07-12 21:56:01 UTC
In order to not have a current timestamp polluting either /etc/HOSTNAME or /etc/hostname, and preserve the timestamp of a wired single fixed IP network access point desktop PC's original installation, before doing installation or upgrade,  I set a hard link from /etc/HOSTNAME to /etc/hostname, then set "HOSTNAME" immutable.

I just did a minimal X HTTP Factory (20140626) installation, which failed to install netcfg. On later installing some package that "requires" netcfg, installation halted waiting for user input because the netcfg package apparently thinks it needs to disturb /etc/HOSTNAME:

Error: Subprocess failed. Error: RPM failed: error: unpacking of archive failed on file /etc/HOSTNAME: cpio: rename failed - Operation not permitted
error: netcfg-11.5-22.1.noarch: install failed

This unnecessary write shouldn't halt the process waiting for user input. It should be sufficient for the package to complain in an installation log if it insists on an unnecessary write. In the case of netcfg, the package installation fails "completely" - on querying its changelog, not installed is reported, and yet according to zypper the package depending on it is installed.

cf. bug 883999
Comment 1 Petr Gajdos 2014-07-25 07:19:06 UTC
Hmmm, as I said in 883999, I can't choose if there will be /etc/HOSTNAME symlink or hardlink. If you don't agree, ask on mailing list or something. Let's resolve present netcfg package issue(s) in 883999 -- see comment 14 for last proposal.

*** This bug has been marked as a duplicate of bug 883999 ***
Comment 2 Felix Miata 2014-11-02 05:52:57 UTC
"Fixing" bug 883999 did not affect this problem. Each update of netcfg still wants to obliterate the HOSTNAME timestamp that in an upgrade installation should be a hallmark of the original installation. It still eliminates a hardlink that preserves the timestamp, replacing it with a currently timestamped symlink. There could be an rpmnew, if the new netcfg package must leave evidence of its installation. An rpmsave is backwards. If both hostname and HOSTNAME exist as either hard or soft link, there is nothing netcfg installation needs to do. An immutable flag on hostname shouldn't prevent netcfg from installing.
Comment 3 Felix Miata 2014-11-02 05:53:16 UTC
.
Comment 4 Petr Gajdos 2014-11-18 11:32:55 UTC
Reassigning to current netcfg maintainer.
Comment 5 Tomáš Chvátal 2014-12-01 17:00:30 UTC
I don't plan to preserve timestamp of configuration files.
It is hell road to support this configuration.

The rest of the migration was changed to always preserve the HOSTNAME content during migration and to ensure it will always pass the install phase.

Rest is more of CANTFIX as we really can't do the rest of the magic reliably without trampling our legs for some corner cases.
Comment 6 Bernhard Wiedemann 2014-12-01 18:00:22 UTC
This is an autogenerated message for OBS integration:
This bug (887039) was mentioned in
https://build.opensuse.org/request/show/263637 Factory / netcfg
Comment 7 Felix Miata 2014-12-01 21:36:18 UTC
From my reading of the reference in comment 6 it appears this may get fixed.

I can't believe "can't". If you won't fix it, it should be reassigned so that someone else might, or at least left open so as to not obscure a philosophical difference between assignee and ideal. Other distros (e.g. Fedora, Mageia, *buntu) don't seem to have openSUSE's apparent inability to not change timestamps on unchanged config files that is one of the more pervasive annoyances about using openSUSE. This is a fundamental distro-wide complaint, not just about hostname: https://features.opensuse.org/313803

After all, /etc/ belongs to the admin, not the package manager, right?
Comment 8 Bernhard Wiedemann 2014-12-08 09:00:30 UTC
This is an autogenerated message for OBS integration:
This bug (887039) was mentioned in
https://build.opensuse.org/request/show/264371 13.2 / netcfg
Comment 9 Swamp Workflow Management 2014-12-15 09:05:26 UTC
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