#1150 Issue closed: all links got deleted by commit 64535e0d3a76d8688bd47372fdd34c1b40c5849a

Labels: fixed / solved / done, critical / security / legal

jsmeix opened issue at 2017-01-04 09:40:

It seems by
https://github.com/rear/rear/commit/64535e0d3a76d8688bd47372fdd34c1b40c5849a
all links got deleted.

What had been symbolic links before are now separated
regular files, e.g:

Before

usr/share/rear/backup/BORG/default/400_create_include_exclude_files.sh -> ../../NETFS/default/400_create_include_exclude_files.sh

versus now:

$ ls -l usr/share/rear/backup/BORG/default/400_create_include_exclude_files.sh  usr/share/rear/backup/NETFS/default/400_create_include_exclude_files.sh
-rw------- 1 jsmeix suse 1396 Jan  4 10:35 usr/share/rear/backup/BORG/default/400_create_include_exclude_files.sh
-rw-r--r-- 1 jsmeix suse 1396 Dec  1 10:46 usr/share/rear/backup/NETFS/default/400_create_include_exclude_files.sh

$ diff -s usr/share/rear/backup/BORG/default/400_create_include_exclude_files.sh  usr/share/rear/backup/NETFS/default/400_create_include_exclude_files.sh
Files usr/share/rear/backup/BORG/default/400_create_include_exclude_files.sh and usr/share/rear/backup/NETFS/default/400_create_include_exclude_files.sh are identical

Before we had 76 symbolic links

$ find usr/sbin/rear usr/share/rear/ | xargs -n 1 ls -ld | grep '^l'
lrwxrwxrwx 1 jsmeix suse 55 Oct 27 17:42 usr/share/rear/backup/BORG/default/400_create_include_exclude_files.sh -> ../../NETFS/default/400_create_include_exclude_files.sh
...
lrwxrwxrwx 1 jsmeix suse 40 Oct 27 17:42 usr/share/rear/verify/default/030_translate_tape.sh -> ../../prep/default/030_translate_tape.sh

versus now we have only one symbolic link left:

$ find usr/sbin/rear usr/share/rear/ | xargs -n 1 ls -ld | grep '^l'
lrwxrwxrwx 1 jsmeix suse 32 Dec 13 13:39 usr/share/rear/finalize/SUSE_LINUX/ppc64/500_rebuild_initramfs.sh -> ../i386/170_rebuild_initramfs.sh

jsmeix commented at 2017-01-04 09:49:

Regarding
https://github.com/rear/rear/commit/df8c92a0bfb27669340c35e8d8b05b0cc55fe8f3
"Seems usr/share/rear/verify/EXTERNAL/default/050_check_external.sh
was lost somehow during the renumbering task (I guess)"

I have it in my local git repository from before
https://github.com/rear/rear/commit/64535e0d3a76d8688bd47372fdd34c1b40c5849a
but not afterwards.

Accordingly it seems
usr/share/rear/verify/EXTERNAL/default/050_check_external.sh
was lost during
https://github.com/rear/rear/commit/64535e0d3a76d8688bd47372fdd34c1b40c5849a
but currently I don't see how it was lost there.

jsmeix commented at 2017-01-04 09:55:

I my local git repository from before
https://github.com/rear/rear/commit/64535e0d3a76d8688bd47372fdd34c1b40c5849a
I get:

$ ls -l usr/share/rear/verify/EXTERNAL/default/050_check_external.sh
-rw-r--r-- 1 jsmeix suse 242 Oct 27 17:42 usr/share/rear/verify/EXTERNAL/default/050_check_external.sh

$ git blame usr/share/rear/verify/EXTERNAL/default/050_check_external.sh
fatal: no such path 'usr/share/rear/verify/EXTERNAL/default/050_check_external.sh' in HEAD

jsmeix commented at 2017-01-04 10:04:

I my local git repository from before
https://github.com/rear/rear/commit/64535e0d3a76d8688bd47372fdd34c1b40c5849a
I get:

$ find usr/sbin/rear usr/share/rear/ | grep check_external
usr/share/rear/prep/EXTERNAL/default/050_check_external.sh

i.e. before we had
usr/share/rear/prep/EXTERNAL/default/050_check_external.sh
and now we have
usr/share/rear/verify/EXTERNAL/default/050_check_external.sh

Accordingly in my current git master I have:

$ git log -p --follow usr/share/rear/verify/EXTERNAL/default/050_check_external.sh

commit df8c92a0bfb27669340c35e8d8b05b0cc55fe8f3
Author: Gratien D'haese <gratien.dhaese@gmail.com>
Date:   Wed Jan 4 08:49:26 2017 +0100

    Seems usr/share/rear/verify/EXTERNAL/default/050_check_external.sh was lost somehow during the renumbering task (I guess),
    but I think it is still  a valid script to keep (in prep it is still there I noticed).
    Related to issue #1053

diff --git a/usr/share/rear/prep/EXTERNAL/default/050_check_external.sh b/usr/share/rear/verify/EXTERNAL/default/050_check_external.sh
similarity index 100%
copy from usr/share/rear/prep/EXTERNAL/default/050_check_external.sh
copy to usr/share/rear/verify/EXTERNAL/default/050_check_external.sh

commit d8f1571a213a9df272327bb070e8a87f78fc14c3
Author: Johannes Meixner <jsmeix@suse.com>
Date:   Thu Oct 27 12:44:16 2016 +0200

    renumbered by ading a trailing 0 so that 12 becomes 120 except 00 which becomes 005 and adapted symlinks to point again to the right re-numbered scripts

diff --git a/usr/share/rear/prep/EXTERNAL/default/05_check_external.sh b/usr/share/rear/prep/EXTERNAL/default/050_check_external.sh
similarity index 100%
rename from usr/share/rear/prep/EXTERNAL/default/05_check_external.sh
rename to usr/share/rear/prep/EXTERNAL/default/050_check_external.sh

commit 4887c0c468596c2ffbe7828bc89156febb10e3c4
Author: Dag Wieers <dag@wieers.com>
Date:   Fri Jun 3 00:05:02 2011 +0000
...

jsmeix commented at 2017-01-04 10:05:

@gdha
I think you shoud undo both
https://github.com/rear/rear/commit/64535e0d3a76d8688bd47372fdd34c1b40c5849a
and
https://github.com/rear/rear/commit/df8c92a0bfb27669340c35e8d8b05b0cc55fe8f3

jsmeix commented at 2017-01-04 10:17:

I my local git repository from before
https://github.com/rear/rear/commit/64535e0d3a76d8688bd47372fdd34c1b40c5849a
I get

$ ls -l usr/share/rear/verify/EXTERNAL/default/050_check_external.sh
-rw-r--r-- 1 jsmeix suse 242 Oct 27 17:42 usr/share/rear/verify/EXTERNAL/default/050_check_external.sh

$ ls -l usr/share/rear/prep/EXTERNAL/default/050_check_external.sh
-rw-r--r-- 1 jsmeix suse 242 Oct 27 17:42 usr/share/rear/prep/EXTERNAL/default/050_check_external.sh

$ ls -l usr/share/rear/verify/EXTERNAL        
lrwxrwxrwx 1 jsmeix suse 16 Jan  4 11:14 usr/share/rear/verify/EXTERNAL -> ../prep/EXTERNAL

but that link is gone now which is the reason why
usr/share/rear/prep/EXTERNAL/default/050_check_external.sh
is no longer also accessible as
usr/share/rear/verify/EXTERNAL/default/050_check_external.sh

gdha commented at 2017-01-04 10:53:

I reverted the last 2 changes:

$ git revert df8c92a0bfb27669340c35e8d8b05b0cc55fe8f3
[master 3e25984] Revert "Seems usr/share/rear/verify/EXTERNAL/default/050_check_external.sh was lost somehow during the renumbering task (I guess),"
 1 file changed, 8 deletions(-)
 delete mode 100644 usr/share/rear/verify/EXTERNAL/default/050_check_external.sh
$ git revert 64535e0d3a76d8688bd47372fdd34c1b40c5849a
[master 8ca0aee] Revert "Added the 3-digit validate check in the Makefile (see validate part)"

and git clone rear from fresh again. It looks OK now. Perhaps, my home directory was somehow wrongly un-tarred on my new laptop. Sorry for the inconvenience

jsmeix commented at 2017-01-04 11:16:

Now it looks perfectly o.k. again.


[Export of Github issue for rear/rear.]