Bug 999114 - contents of /etc/skel should be copied to the /root directory
contents of /etc/skel should be copied to the /root directory
Product: Fedora
Classification: Fedora
Component: rootfiles (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-08-20 14:42 EDT by Jóhann B. Guðmundsson
Modified: 2013-09-29 20:36 EDT (History)
4 users (show)

See Also:
Fixed In Version: rootfiles-8.1-14.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-29 20:36:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jóhann B. Guðmundsson 2013-08-20 14:42:34 EDT
Description of problem:

This components is probably more appropriate for copying the contents of /etc/skel to root's home directory rather then the setup component which seem to be the component that creates the root user. 

Since I'm unsure no spec file patch but the owner of this components is also owner of setup he can just decide which place it's more appropriate to fix this in... 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
Comment 1 Ondrej Vasik 2013-08-21 02:29:56 EDT
Best component for this is rootfiles, filesystem shouldn't handle files. Rootfiles component is kept to be as close as possible to the default /etc/skel content with few exceptions. If you have any comment/idea what should be improved there, feel free to propose it.
Comment 2 Jóhann B. Guðmundsson 2013-08-21 06:31:13 EDT
Should not the component that creates the root user in the first place be responsible for creating root's home directory and copy the contents of /etc/skel into it?
Comment 3 Ondrej Vasik 2013-08-21 06:50:08 EDT
I don't think so - root's home directory is part of FHS, so it is created by filesystem package. Package rootfiles adds the files into it. Basic system accounts should be created by setup package, but I don't think this should handle the root's home directory content and copy /etc/skel content.

First of all, common files from /etc/skel are owned by various packages e.g. bash package owns .bash_logout, .bash_profile, .bashrc ... I can't add dependency on bash into setup/filesystem, because these packages have to be installed as one of the first packages. This is the main reason for existence of rootfiles package - I keep the content of it as close as possible to the /etc/skel default content - with few modifications. 
Copying the content in setup or filesystem package is no go because of the dependencies (bash, coreutils). Will check where in dependency order is actually rootfiles package and possibly the copying could be done there somehow. If not, I'll likely WONTFIX that (as there is actually no content in /etc/skel at the time of root user creation).
Comment 4 Jóhann B. Guðmundsson 2013-08-21 07:01:56 EDT
fun scenario... 

Hm so the best scenario would be if we simply could copy those files at users first login instead of user creation ( pam_mkhomedir? ) while the workaround would be to create or <<EOF post install the content of the .bashrc files without the dependency on bash or other stuff in the setup package?
Comment 5 Ondrej Vasik 2013-08-21 07:27:40 EDT
Note that even post install script brings usually the bash dependency automatically (as this is default "language" of the scriptlet).
I think posttrans scriptlet might work, I will check it when time allows - I think this is generally good idea (to allow admins to adjust the content as a part of kickstart of something). We'll see...
Comment 6 Jóhann B. Guðmundsson 2013-08-21 08:02:09 EDT
I could also take care of that and provide you with a patch if you just mention which component the mkdir -p /root and posttrans should be in?
Comment 7 Ondrej Vasik 2013-08-21 08:27:58 EDT
I think mkdir -p /root is unnecessary - as this one will come from filesystem package anyway. Patch is not needed, correct component is the only uncertain thing - other than that it should be pretty easy to copy content of the directory via posttrans... As I said, rootfiles is probably correct option, I'll check that.
Comment 8 Ondrej Vasik 2013-08-21 11:08:04 EDT
cp -a /etc/skel/* /root/
in rootfiles package should probably work. 

As it works after the transaction, packages should be in place and files should be copied. And simple reinstall of rootfiles will update everything to latest greatest. However, all files will be unowned (this is already the case for the home directories, so should not be a big issue).
Comment 9 Fedora End Of Life 2013-09-16 12:54:55 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
Comment 10 Jóhann B. Guðmundsson 2013-09-16 14:14:36 EDT
? there is nothing preventing you from committing this change to F20
Comment 11 Fedora End Of Life 2013-09-17 03:47:36 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
Comment 12 Ondrej Vasik 2013-09-18 10:13:11 EDT
Commited and built in Rawhide as rootfiles-8.1-12.fc21 - let's see if everything is fine before the F20 change (I don't want to break the dependency chain).
Comment 13 Ondrej Vasik 2013-09-18 10:20:40 EDT
Actually cp -na is not what we want, cp -ndpr is probably better (we don't want etc_t selinux context type on the files). rootfiles-8.1-13.fc21 is hopefully right one.
Comment 14 Orion Poplawski 2013-09-19 17:15:11 EDT
I'm seeing:

cp: cannot stat ‘/etc/skel/*’: No such file or directory

you probably want:

  cp -ndpr /etc/skel/. /root/
Comment 15 Ondrej Vasik 2013-09-20 02:19:26 EDT
Yes, you are right, it worked for me because I had some not-hidden files in that directory. Thanks.
Comment 16 Fedora Update System 2013-09-23 09:14:10 EDT
rootfiles-8.1-14.fc20 has been submitted as an update for Fedora 20.
Comment 17 Fedora Update System 2013-09-23 20:31:07 EDT
Package rootfiles-8.1-14.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rootfiles-8.1-14.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 18 Fedora Update System 2013-09-29 20:36:51 EDT
rootfiles-8.1-14.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

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