Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main gitignore ignoring var directory in skel #792

Closed
thefrenchone opened this issue Mar 8, 2016 · 7 comments
Closed

main gitignore ignoring var directory in skel #792

thefrenchone opened this issue Mar 8, 2016 · 7 comments

Comments

@thefrenchone
Copy link

  • rear version (/usr/sbin/rear -V): 1.17.2 and recent git clone. Both were tested.
  • OS version (cat /etc/rear/os.conf or lsb_release -a): Rhel 6 and 7
  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf): N/A

The main .gitignore file has the line "var". This appears to exclude the var directory within the usr/share/rear/skel/default directory from being committed in Git. When making rpm packages the usr/share/rear/skel/default/var directory was being excluded which would then exclude those directories from being created on the rescue ISO.

These directories missing was causing problems. Is there a justification for having the "var" exclude in the .gitignore file?

@gdha
Copy link
Member

gdha commented Mar 9, 2016

The var directory was added by change 87ebabb by @schlomo
Probably, when running rear from relative path then the var directory is automatically created and @schlomo wanted to exclude this from the rear archive tar.

@schlomo
Copy link
Member

schlomo commented Mar 9, 2016

Yes, this is correct.

Can you please let me know for which purpose you need a var directory within usr/share/rear/skel/default?

@thefrenchone
Copy link
Author

In this Git repo usr/share/rear/skel/default/var contains the directories empty,lib,lock,log,run,tmp then some sub-directories on top of that. Because of the "var" exclude these directories are not committed to git unless they are forced. Then because they never get committed to git they then don't end up in rpm packages. Finally, those folders never get created on the rescue ISO.

I'm only running into this because I have to download the zip folder and then create a git repo locally. These folder are already in the git repository here so if you do a proper git pull you wouldn't run into this issue.

For example /var/run was not being created on the rescue ISO which then resulted in the initramfs scripts failing (iirc).

@schlomo
Copy link
Member

schlomo commented Mar 9, 2016

I see. Maybe we change the gitignore entry from var to either /var or add another entry with !/usr/share/rear/skel/default/var to exclude that from the exclusion. However, since maybe others also want to add stuff to var I think that going for /var would be better and more direct.

@gdha
Copy link
Member

gdha commented Mar 10, 2016

@thefrenchone Could you test this and tell us the difference?

@thefrenchone
Copy link
Author

Changing the gitignore to have /var instead of var did include the usr/share/rear/skel/default/var directory in the rpm. This change appears to have the desired result.

I don't really understand the justification for that line.

@schlomo
Copy link
Member

schlomo commented Mar 10, 2016

As @gdha wrote already: If you run ReaR from a checkout it will create a var dir there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants