Bug 797316 - RFE: Unify location of defaults
Summary: RFE: Unify location of defaults
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: filesystem
Version: rawhide
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Martin Osvald 🛹
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-24 22:07 UTC by Peter Backes
Modified: 2022-07-26 13:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-26 13:01:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Peter Backes 2012-02-24 22:07:38 UTC
Incorrect location of defaults

Description of problem:
Defaults are located at /etc/default/useradd, which is a debianism. The correct location on fedora should be /etc/sysconfig/useradd

Version-Release number of selected component (if applicable):
shadow-utils-4.1.4.3-13.fc16.i686

How reproducible:
always

Steps to Reproduce:
1. install shadow-utils
  
Actual results:
defaults stored in /etc/default/useradd

Expected results:
defaults stored in /etc/sysconfig/useradd

Comment 1 Peter Backes 2012-05-02 01:58:43 UTC
at comment #1 of bug 797314, Sergio Monteiro Basto proposed

> may instead do a symbol link of grub,  symbol link of all dir, 
>  /etc/default/ to /etc/sysconfig/
> 
> 
> mv /etc/default/* /etc/sysconfig/
> rmdir /etc/default/
> ln -s /etc/sysconfig/ /etc/default/

I think this is a reasonable idea. Both directories serve the same purpose, the one being a debianism, the other a fedoraism, so the one should be a symlink to the other, owned by filesystem.

reassigning to filesystem

see also bug 797315

Comment 2 Ondrej Vasik 2012-05-02 05:48:24 UTC
Makes sense to me, will check if there is some reason behind (imho unlikely) before this change , moving as low:low to Rawhide (as it doesn't make sense to do an update for this, it needs installation to make it work correctly).

Comment 3 Michael S. 2012-10-27 18:49:50 UTC
This change broke the installation of buildroot on rawhide :
DEBUG util.py:257:  Total download size: 91 M
DEBUG util.py:257:  Installed size: 385 M
DEBUG util.py:257:  Transaction Check Error:
DEBUG util.py:257:    file /etc/default conflicts between attempted installs of filesystem-3.2-1.fc19.x86_64 and shadow-utils-2:4.1.5.1-1.fc19.x86_64
DEBUG util.py:257:    file /etc/default conflicts between attempted installs of glibc-common-2.16.90-24.fc19.x86_64 and filesystem-3.2-1.fc19.x86_64
DEBUG util.py:257:  Error Summary

I guess the first step would be to move the file from shadow-utils and glibc-common to /etc/sysconfig and then use a %post ?

And the whole "replace directory with a symlink" is quite tricky to do right, IIRC

Comment 4 Sergio Basto 2012-11-01 18:28:16 UTC
(In reply to comment #3)
> This change broke the installation of buildroot on rawhide :
> DEBUG util.py:257:  Total download size: 91 M
> DEBUG util.py:257:  Installed size: 385 M
> DEBUG util.py:257:  Transaction Check Error:
> DEBUG util.py:257:    file /etc/default conflicts between attempted installs
> of filesystem-3.2-1.fc19.x86_64 and shadow-utils-2:4.1.5.1-1.fc19.x86_64
> DEBUG util.py:257:    file /etc/default conflicts between attempted installs
> of glibc-common-2.16.90-24.fc19.x86_64 and filesystem-3.2-1.fc19.x86_64
> DEBUG util.py:257:  Error Summary
> 
> I guess the first step would be to move the file from shadow-utils and
> glibc-common to /etc/sysconfig and then use a %post ?
> 
> And the whole "replace directory with a symlink" is quite tricky to do
> right, IIRC

seems to me bug #870655 , 
According to discussion on the Fedora development list, RPM has indeed
become stricter about checking for such conflicts -- different
packages may own the same directory only if they list the directory
with the same owner and permissions (though it's considered bad form,
esp if one of the package is a base package such as filesystem; the
other packages should just take that directory's existence for granted).

Comment 5 Fedora End Of Life 2013-04-03 20:11:48 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 7 Sergio Basto 2021-11-13 03:01:42 UTC
(In reply to Peter Backes from comment #0)
> Description of problem:
> Defaults are located at /etc/default/useradd, which is a debianism. The
> correct location on fedora should be /etc/sysconfig/useradd

the solution use by the grub package [1] , can be valid and solve this old bug which I don't know why is not closed by automatic system . 
i.e just link the individual file from /etc/default/grub to /etc/sysconfig 

[1]
rpm -qf /etc/sysconfig/grub
grub2-tools-extra-2.06-6.fc34b.x86_64


ls -l /etc/sysconfig/grub
lrwxrwxrwx 1 root root 15 Sep 29 19:48 /etc/sysconfig/grub -> ../default/grub

Comment 8 Martin Osvald 🛹 2022-07-26 13:01:12 UTC
Can see it was decided a long time ago to leave /etc/default as it is:

https://pagure.io/packaging-committee/issue/152#comment-146863

One can create something similar also for shadow-utils (/etc/sysconfig/useradd -> ../default/useradd) like it was done for grub2 if there is a wish to do so:

[Bug 800152 - link for config file in/etc/sysconfig]
https://bugzilla.redhat.com/show_bug.cgi?id=800152

Therefore closing this as WONTFIX and removing the originally reverted lines:

https://pagure.io/filesystem/c/97cdb959d6bf07cacbb0b10d80b386e3594eca0e?branch=master


Note You need to log in before you can comment on or make changes to this bug.