Re: Par2 not available on Ubuntu 20.04

Per Jensen via Dar-support <[email protected]> Tue, 12 Jul 2022 08:44:25 +0000
Newsgroups gmane.comp.sysutils.backup.dar.support
Message-ID <[email protected]>
Hi Stefan,

I believe that "dar" complains about "dar2" not being found in your rc file.

I have this:

"""

par2:
   -B "@@CONFDIR@@/dar_par.dcf"

"""

where "@@CONFDIR@@" is substituted to a real path at install time.


Hope that helps.

/Per

Den 11.07.2022 kl. 21.27 skrev [email protected]:
> Am 08.07.22 um 20:38 schrieb Denis Corbin:
>> Le 08/07/2022 à 12:51, Per Jensen via Dar-support a écrit :
>>> I am using the par2 functionality with dar. If you are interested, take
>>> a look at my github repo:
>>>
>>> https://github.com/per2jensen/dar-backup
> Thanks, Per! In fact, I had already noticed your repo and glanced over
> it. The problem at hand seems to be very basic, though.
>>> Now I owe you some explanations of what the problem is, the possible
>>> solutions and a workaround:
>>>
>>> Den 08.07.2022 kl. 11.30 skrev [email protected]:
>>>> I have studied the documentation of Dar and wanted to start off with a
>>>> first full backup with redundancy provided by Par2.
>>>>
>>>> However, the a command like
>>>> dar --create INIT --fs-root=/tmp par2
>>>> results in the error message
>>>> Parse error: Given user target(s) could not be found: par2
>>>>
>>>> This happens on Ubuntu 20.04 with the packages dar (version 2.6.8) and
>>>> par2 (version 0.8.1) installed and /etc/darrc containing the lines
>>>> par2:
>>>>       -B "/usr/share/doc/dar/examples/dar_par.dcf"
>>>> and the file /usr/share/doc/dar/examples/dar_par.dcf
>>>> containing the lines
>>>> create:
>>>>             -E '/usr/share/dar/samples/dar_par_create.duc "%p" "%b"
>>>> %N %e %c 2'
>>>> test:
>>>>             -E '/usr/share/dar/samples/dar_par_test.duc "%p" "%b" %N
>>>> %e %c'
>>>>
>>>> However, the folder /usr/share/dar is empty, and even manually copying
>>>> the files* dar_par_create.duc and dar_par_test.duc from the source
>>>> tar-ball into a sub-folder named samples (* made executable) did not do
>>>> the trick.
>> Well, they do not need to be executable, just readable by the user that
>> is running the dar program.
>>
>>
>> When using dar from source, the ./configure script that you run at
>> first, has many options to define where should go the different results
>> of the compilation as well as the documentation. These are the
>> --prefix=<path> --bindir=<path> --sbindir=<path> --libexecdir=<path>
>> --sysconfdir=<path> and other options passed to ./configure script.
>>
>> by default all goes in /usr/local, but when dar is provided from a
>> distro package, it makes sense to use --prefix=/usr --sysconfdir=/etc,
>> this is something that the distro maintainer for dar at Ubuntu
>> probably did.
>>
>> in that context the darrc file goes to /etc/darrc and the DCF files
>> referred by /etc/darrc for par2 (dar_par.dcf file) goes to
>> /usr/share/dar/samples. This dar_par.dcf file in turns relies on
>> different DUC files also installed in that same directory
>> /usr/share/dar/samples.
>>
>> During the installation, the dar source package modifies all these files
>> content for the path to be correct in regard of the location of the
>> referred files. It then works flawlessly.
>>
>> However here, it seems that the Ubuntu process does not only rely on the
>> ./configure options to set the destination paths, but also manually
>> moved the dar_par.dcf file from "/usr/share/dar/samples" to
>> "/usr/share/doc/dar/examples". If they modified the /etc/darrc to
>> reflect this change, they missed to modify the content of dar_par.dcf
>> file to reflect the new location of the DUC files it refers.
>>
>> note also that "samples" has been renamed "examples" so you need to
>> change this also in dar_par.dcf, probably the reason why you could not
>> have it working?
> Thanks for this extensive answer, Denis! It is in fact the way you
> suspect. Indeed, all files are under /usr/share/doc/dar/examples/.
>>>> Is this a known problem with a solution? I have tried searching the
>>>> mailing list archives but the key "par2 target not found" returns
>>>> almost
>>>> 4'000 pages dating back to the year 2002 and the first one containing
>>>> "par2" in the title is from 2013; similar for "parchive" instead of
>>>> "par2". I gave up and am hoping for some support from the list members.
>> In other words I suspect the duc files are also in
>> /usr/share/doc/dar/examples beside the dar_par.dcf file. Just modifying
>> the dar_par.dcf replacing...
>>     /usr/share/dar/samples
>> by
>>     /usr/share/doc/dar/examples
>>
>> ...should make it working. Can you test that? (pay attention to
>> "samples" vs "examples" in the path)
>>
>> This was for a workaround. For a real fix, you should contact the person
>> in charge of dar/libdar packaging at Ubuntu to have this fixed. I'm also
>> flexible on my side, if 'examples' makes more sense than 'samples' this
>> can be changed in the dar source code.
> No luck, unfortunately. I did change the paths in dar_par.dcf:
> create:
>           -E '/usr/share/doc/dar/examples/dar_par_create.duc "%p" "%b" %N
> %e %c 2'
> test:
>           -E '/usr/share/doc/dar/examples/dar_par_test.duc "%p" "%b" %N
> %e %c'
>
> Nevertheless, I still get
> Parse error: Given user target(s) could not be found: par2
> ... upon launching
> dar --create INIT --fs-root=~/.config par2
>
> Is there anything obvious that I am missing? Thanks in advance for any
> advice!
>
> Stefan Mueller
>
>