-
-
Notifications
You must be signed in to change notification settings - Fork 265
"make dist" ReaR tarball misses usr/share/rear/skel/default/root/.vimrc #3368
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
Comments
@rear/contributors I think this should be fixed for ReaR 2.8 |
Let's just add an empty Users who want to carry along their own VIM config can still use |
I have the same
as copies now in
and all three are missing in dist/rear-2.7.tar.gz BUT |
Do you know why? |
If I knew why I would "just fix" it, cf. |
Unfortunately, if we remove this, I suspect we will get unwanted stuff in the build, like |
@jsmeix the root cause is that we exlcude dot files when building the tar in 8000 Line 90 in 3d17f43
Therefore we have the ability to use an archive as skel, see https://github.com/rear/rear/blob/master/usr/share/rear/skel/Debian/default.tar.gz But for this specific problem I'd prefer to solve the Or we use code to create the dotfile in the rescue system. |
Ah! |
If I remove --- unpatched.list 2024-12-18 15:26:29.207157564 +0100
+++ patched.list 2024-12-18 15:25:45.518053248 +0100
@@ -462,6 +462,7 @@
rear-2.7/usr/share/rear/lib/output-functions.sh
rear-2.7/usr/share/rear/lib/config-functions.sh
rear-2.7/usr/share/rear/lib/mkbackup-workflow.sh
+rear-2.7/usr/share/rear/lib/.shellcheckrc
rear-2.7/usr/share/rear/lib/udev-workflow.sh
rear-2.7/usr/share/rear/lib/mail-functions.sh
rear-2.7/usr/share/rear/lib/layoutonly-workflow.sh
@@ -579,6 +580,7 @@
rear-2.7/usr/share/rear/skel/default/mnt/cdrom/
rear-2.7/usr/share/rear/skel/default/mnt/local/
rear-2.7/usr/share/rear/skel/default/root/
+rear-2.7/usr/share/rear/skel/default/root/.vimrc
rear-2.7/usr/share/rear/skel/default/etc/
rear-2.7/usr/share/rear/skel/default/etc/lilo.conf
rear-2.7/usr/share/rear/skel/default/etc/syslog-ng.conf
@@ -1422,6 +1424,7 @@
rear-2.7/usr/share/rear/restore/NSR/default/400_restore_with_nsr.sh
rear-2.7/usr/share/rear/restore/SUSE_LINUX/
rear-2.7/usr/share/rear/restore/SUSE_LINUX/910_create_missing_directories.sh
+rear-2.7/usr/share/rear/.shellcheckrc
rear-2.7/usr/share/rear/rescue/
rear-2.7/usr/share/rear/rescue/NETFS/
rear-2.7/usr/share/rear/rescue/NETFS/default/ looks good. @schlomo what do you mean by "Therefore we have the ability to use an archive as skel"? How is it related to excludign dot files from the dist archive? |
rear/usr/share/rear/rescue/default/010_merge_skeletons.sh Lines 30 to 34 in 3d17f43
If the But, I'd rather use a non-dotfile to solve a problem as this is much easier to see and understand than having to look into an archive hidden somewhere deep in our source tree. That is why I was asking if |
@pcahyna and I'd rather exclude the development relevant files like In any case we have slightly different behavior of the HTH for context |
Unfortunately it neither works with /etc/vimrc |
@jsmeix So it seems like |
Not sure if I get it. What if there is a non-dotfile in the archive? It would not get filtered either. What makes the |
the skel archive is a means to transport anything whatsoever into the rescue system. this of course also works for non-dotfiles. It is only required for special or weird stuff. The |
But what's the problem with dotfiles in the first place? Is it related to the skel archive or not (if it also works for non-dotfiles)? |
Unfortunately it neither works with /etc/vim/vimrc |
I think the only "problem" is, that we filter out dotfiles in the BTW, I just noticed in
we check for I now understand that @jsmeix tried to fix the missing VIM rc file via 700727b#diff-86dae0514a9be4af4b9a40cd2670d62f8d815757a620cdebd29038458af0c2d6 and that we now realize that it didn't work for package building. @jsmeix to quickly resolve this I'd suggest to also create the
/usr/share/vim/vimrc file instead. AFAIK /etc/vim/vimrc is actually not the path that vim looks for. vim --version will show you the actual paths it checks.
|
In my ReaR recovery sytem made on SLES 15 SP6:
No, it just lies because /etc/vimrc does not work |
Let's stop filtering them, then? diff --git a/Makefile b/Makefile
index 731c05af7..54f5d4ee1 100644
--- a/Makefile
+++ b/Makefile
@@ -87,7 +87,7 @@ RUNASUSER :=
endif
# .gitignore is optional, avoid tar errors if it does not exist, e.g. in a dist archive
-tarparams = $(shell test -f .gitignore && echo --exclude-from=.gitignore --exclude=.gitignore) --exclude=".??*" $(DIST_CONTENT)
+tarparams = $(shell test -f .gitignore && echo --exclude-from=.gitignore --exclude=.gitignore) $(DIST_CONTENT)
DIST_FILES := $(shell tar -cv -f /dev/null $(tarparams))
|
@pcahyna |
By the way (not related to the original problem anymore), having a gzipped archive in our source tree is at best an antipattern and at worst a way to sneakily inject malware (who knows what is inside? see the xz attack), so I hope we will get rid of it. |
@pcahyna But I never used that functionality myself |
I meant, get rid of the archive, not of the functionality. |
While I understand and agree with your thoughts about having an archive in the source tree I'd like to keep it there to keep testing the skel archive feature. I'm fine with removing the dotfile exclude from the tar creation process because in Line 12 in cc1e9e4
For actually solving the vimrc problem, the SLES example maybe confirms my suggestion that we should add common vimrc locations to Or we don't deal with it for 2.8 - also totally fine for me as I'm using |
Regarding usr/share/rear/skel/Debian/default.tar.gz
It doesn't look as if this single file
tells that it originated since "Switch to trunk model" |
Yes, I just put some BS into that archive to see that the mechanism works. |
From my current (Wednesday evening) point of view I assume an appropriate
is a sufficient workaround in ReaR 2.8 Alternatively @schlomo @pcahyna if you work longer today |
@schlomo |
The file contains the following:
I would indeed assume that this is long obsolete, at least https://en.wikipedia.org/wiki/Open_Sound_System suggests that this doesn't apply any more. I'm also totally fine with just removing this archive and to fix problems if somebody complains about a problem here. |
@jsmeix this is an entirely reasonable approach. OTOH, when changing the Makefile, it is easy to check what is being introduced by the change: make OFFICIAL=1 dist
tar tzf dist/rear-2.7.tar.gz > unpatched.list
# here change the Makefile...
make OFFICIAL=1 dist
tar tzf dist/rear-2.7.tar.gz > patched.list
diff -u unpatched.list patched.list so I will leave it up to you. |
Yes, I also prefer to get a release now, TBH. So please what you deem right @jsmeix |
I will try to make a PR out of the proposed Makefile change. |
Testing is useful, but I would very much prefer to move the test to https://github.com/rear/rear-integration-tests/ where it is clearly separate from ReaR sources. |
I postpone this issue to ReaR 3.0 because |
Avoids dropping .vimrc from /root of the rescue ramdisk. This adds .shellcheckrc to the release tarballs, so package builds using static analyzers (OpenScanHub) will know what ShellCheck warnings to ignore. Closes rear#3368.
Just be aware we could always use script |
See
#3238 (comment)
excerpt
usr/share/rear/skel/default/root/.vimrc
is not in dist/rear-2.7.tar.gz
but this file is needed because
#3151
cf.
#3238 (comment)
The text was updated successfully, but these errors were encountered: