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
Glob values in COPY_AS_IS shouldn't be quoted. #2405
Glob values in COPY_AS_IS shouldn't be quoted. #2405
Conversation
Otherwise they are not included.
Just tested with commit aa82834 (Tag 2.5): there the cracklib files were added to the rescue system. |
@flyinggreenfrog Something severe has changed since the ReaR 2.5 A lot of other stuff is no longer copied into the recovery system This affects all places where
but also in the older form
It seems the root cause happens before the script
which lets
for example:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change makes this particular item work
but it seems we have a global problem, cf.
#2405 (comment)
So I do not approve this particular change
(regardless that it fixed this particular item)
because I am analyzing the root cause of our global problem...
Got it! I can make things work again when I add
at the beginning of usr/share/rear/build/GNU/Linux/100_copy_as_is.sh Ugh! In ReaR 2.5 we had for example in
which is the last script that had always re-written COPY_AS_IS
which does no longer re-write COPY_AS_IS The falsely used unquoted For example
or the same behaviour with
versus duplicated falsely false things that work by accident:
I will clean that up... |
Currently I think a minimal change to make things work again
is the following diff in build/GNU/Linux/100_copy_as_is.sh
i.e. use unquoted |
This reverts commit 64281d2.
…ystem Use plain ${COPY_AS_IS[*]} instead of quoted "${COPY_AS_IS[@]}" in the tar command call that copies things into the recovery system to ensure "things work as usually expected" for any methods that are used to add elements to the COPY_AS_IS array, see #2405 (comment)
With |
@flyinggreenfrog |
At current master with your commit it's working for me again. Just tested backup/restore for me. @jsmeix Thanks for your fast solution of this issue. I assume I just delete this branch, since finally no new commit was added? Or will it still be merged with commit and reverting commit to have this issue shown in the history? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes so I can trivially approve the empty set ;-)
The underlying issue is fixed via |
A side note: Currently we have several places where we specify
instead of just the wanted directory
I found out that the I tried if in usr/share/rear/conf/GNU/Linux.conf
That failed because I got only the plain The reason is that (at least on my openSUSE leap 15.1 system) So when In particular regarding the |
@jsmeix in order to perform filename expansion (glob expansion) but not word splitting (to support filenames with spaces properly), one can apparently set IFS to an empty string. |
... or maybe not, not sure myself whether it behaves properly. |
@pcahyna For now - i.e. for the ReaR 2.6 release - I will better explain in default.conf After the ReaR 2.6 release we can think about how to improve things The current |
@jsmeix I understand and very much appreciate the point about no regressions. I would like to improve this area, but unfortunately the amount of time I can spend on ReaR nowadays is limited, so I can't promise anything. |
Better explain in default.conf how COPY_AS_IS works, in particular that symlinks cannot be followed and that files or directories that contain blanks or other $IFS characters cannot be specified, cf. #2405 (comment)
@pcahyna |
Via |
Otherwise they are not included.
Pull Request Details:
Type: Bug Fix
Impact: Normal (for me it's High otherwise I can't restore to LUKS encrypted device)
Reference to related issue (URL): No new explicit issue, but reoccurrence of cryptsetup pw dict files missing #679 (or cryptsetup fails on restore due to missing cracklib dictionaries #972)
How was this pull request tested? openSUSE Leap 15.1. Baremetal via USB rescue medium
Brief description of the changes in this pull request:
With a3ce9fe needed cracklib files were added. In #679 (comment) it was stated that this commit was fixing that issue.
However, if I test from current master ad0f263 I ran into the same problems as in #679 (comment).
If I change
/usr/share/cracklib/\*
to/usr/share/cracklib/*
(this PR) needed cracklib files are present in rescue/restore system and restore works like expected.Besides that PR, I'm asking myself:
What is the correct way to specify things to
COPY_AS_IS
with glob patterns?According to conf/default.conf (line 1358 and following):
Why was in a3ce9fe
/usr/share/cracklib/\*
added instead of/usr/share/cracklib/*
and it was working, and now in current master it doesn't work again?I don't know, if Filter out duplicates in COPY_AS_IS and copy_as_is_filelist_file #2378 changed some behavior unintentionally?