#2503 PR merged: New 036_valid_output_methods.sh to error out for unsupported OUTPUT methods

Labels: enhancement, fixed / solved / done, minor bug

jsmeix opened issue at 2020-10-16 10:29:

  • Type: Enhancement

  • Impact: Low

  • Reference to related issue (URL):
    https://github.com/rear/rear/issues/2501

  • How was this pull request tested?
    Tested with OUTPUT=iso versus OUTPUT=ISO on my homeoffice laptop.

  • Brief description of the changes in this pull request:
    For "rear mkbackup/mkrescue/mkbackuponly/mkopalpba"
    (i.e. for all workflows that run the 'prep' stage)
    check that the OUTPUT method is actually implemented
    i.e. check that a usr/share/rear/output/$OUTPUT directory exists
    and error out when an OUTPUT method seems to be not supported
    to ensure that the user cannot specify a non-working OUTPUT in /etc/rear/local.conf
    cf. usr/share/rear/prep/default/035_valid_backup_methods.sh

jsmeix commented at 2020-10-16 10:37:

@OliverO2
please have a look here.
This new script might affect you because it does basically the same
as usr/share/rear/prep/default/035_valid_backup_methods.sh
and I remember https://github.com/rear/rear/pull/2353
where you used a special backup method BACKUP=INTERNAL
so perhaps you also use a special OUTPUT method that triggers now
an error exit by usr/share/rear/prep/default/036_valid_output_methods.sh

jsmeix commented at 2020-10-16 10:56:

Regarding exceptional OUTPUT methods that are not documented in "man rear":

The OUTPUT methods that are not documented in "man rear" are

       OUTPUT=RAMDISK
       OUTPUT=ISO
       OUTPUT=PXE
       OUTPUT=OBDR
       OUTPUT=USB
       OUTPUT=RAWDISK

This are output methods where "something is implemented"

# ls usr/share/rear/output/
DP  IPL  ISO  NSR  OBDR  PXE  RAMDISK  RAWDISK  RSYNC  TSM  USB  default

so for DP IPL NSR RSYNC TSM something is implemented
but I found nothing documented what it is.

I only know about preliminary basic support for OUTPUT=IPL
via usr/share/rear/output/IPL/Linux-s390/800_create_ipl.sh
cf. https://github.com/rear/rear/pull/2142#issuecomment-494426331

For the remaining DP NSR RSYNC TSM
it seems the main intent is to "save result files"

usr/share/rear/output/DP/default/950_dp_save_result_files.sh
usr/share/rear/output/NSR/default/950_nsr_save_result_files.sh
usr/share/rear/output/RSYNC/default/200_make_prefix_dir.sh
usr/share/rear/output/RSYNC/default/900_copy_result_files.sh
usr/share/rear/output/TSM/default/950_dsmc_save_result_files.sh
usr/share/rear/output/TSM/default/960_dsmc_verify_isofile.sh

but I don't use any of those backup methods so I don't know exactly what that is
nor can I test myself how that works.
I guess one cannot use DP NSR RSYNC TSM
as OUTPUT method but I don't know.
My current prep/default/036_valid_output_methods.sh would accept
when DP NSR RSYNC TSM is used as OUTPUT method.

OliverO2 commented at 2020-10-16 12:32:

@jsmeix Thanks for caring (as always)! I did a quick check and found that am not using any internal OUTPUT method. From reviewing your change it looks good to me in any case: If someone came up with a new OUTPUT method, it would show up below $SHARE_DIR/output and everything would still be fine.

Have a pleasant weekend!

jsmeix commented at 2020-10-16 12:45:

@OliverO2
thank you for your prompt reply.

Have a relaxed weekend!

jsmeix commented at 2020-10-16 12:47:

@rear/contributors
when there are no objections I would like to merge it next Monday (19. Oct. 2020) afternoon.


[Export of Github issue for rear/rear.]