Skip to content
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

options and config (lrzip.conf) #112

Closed
tansy opened this issue May 6, 2019 · 9 comments
Closed

options and config (lrzip.conf) #112

tansy opened this issue May 6, 2019 · 9 comments

Comments

@tansy
Copy link

tansy commented May 6, 2019

There are few things about options.

  1. There is -c option that is nonstandard for (de)compressors; in all nix (de)compressors it is writing output to stdout. The way it is in lrzip prevents use of -I || --use-compress-program tar option to process archive through compressor of your choice.

  2. There is no (command line) option/s for rzip or lzma compression although these compressors are mentioned in man.

  3. Also in lrzip.conf.5 it's stated that user config file is to be located in $HOME/./lrzip which is essentially in $HOME/lrzip.
    a) I would say it was intended to be $HOME/.lrzip.
    b) consider moving user lrzip.conf to $HOME/.config as described in XDG Base Directory Specification. I know it is not X windows application but many sensible projects think the policy of keeping home directory clean and tidy is a good thing.

@ckolivas
Copy link
Owner

ckolivas commented May 6, 2019

  1. When used as 'lrz' instead of 'lrzip' it is in compatibility mode with gzip command line options.
  2. Those are subcomponents of lrzip and not meant to be configured directly.
  3. Will consider.

@ckolivas
Copy link
Owner

ckolivas commented May 8, 2019

Rzip is used on all compression all the time in lrzip as the first stage in compression irrespective of configuration choices. Lzma is used by default as the second stage of compression unless disabled by use of -n.

@tansy
Copy link
Author

tansy commented May 8, 2019

Ok, I understand now.
Still think that lzma should be able to be chosen explicitly. Its "privileged" status can change if you find something better maybe.

@ckolivas
Copy link
Owner

ckolivas commented May 8, 2019

Will take it under consideration. Unfortunately as you can see this project has been idle for quite some time due to lack of time and interest to address the reports and I can't give any estimate of if and when that will change.

@pete4abw
Copy link
Contributor

pete4abw commented May 8, 2019

The error in the lrzip.conf man file is a clear typo. It should be $HOME/.lrzip. The XDG specification comment is a valid one to consider.
In order to prepare a file using rzip ONLY, just use the -n option. It means don't compress, only prepare. It actually is quite useful and fast if you like. Even though LZMA is default method of compression, it can be overridden in the conf file. However, if you specify an alternate compression method in the conf file, and want to override the conf file to choose another compression, use --lzma option or similar.

Options affecting compression:
--lzma lzma compression (default) (unless override in lrzip.conf)
-b, --bzip2 bzip2 compression
-g, --gzip gzip compression using zlib
-l, --lzo lzo compression (ultra fast)
-n, --no-compress no backend compression - prepare for other compressor
-z, --zpaq zpaq compression (best, extreme compression, extremely slow)

@tansy
Copy link
Author

tansy commented May 8, 2019

I honestly didn't see that option as it is only long. Maybe because not so long time ago I was using standard packet version and there were only short options and manual remained old one, I just replaced executable.

@pete4abw
Copy link
Contributor

pete4abw commented May 8, 2019

This forced a review of the code, and it turns out that lrzip will also look for lrzip.conf in the CURRENT directory, as well as /etc/lrzip, $HOME/.lrzip. The first fopen() is for the current dir. I forgot I did that!

/* check for lrzip.conf in ., $HOME/.lrzip and /etc/lrzip */

char *HOME, homeconf[255];
char *parametervalue;
char *parameter;
char line[255];
FILE *fp;

fp = fopen("lrzip.conf", "r");

@pete4abw
Copy link
Contributor

Re: b) consider moving user lrzip.conf to $HOME/.config as described in XDG Base Directory Specification. I know it is not X windows application but many sensible projects think the policy of keeping home directory clean and tidy is a good thing.

I thought about this. the .config area is not normally written to directly by users. The lrzip.conf file is a user created file and not generated or modified by the lrzip program. So instructing the user to manually add something to .config could be risky. I do agree that keeping $HOME tidy is worthwhile. And, in fact, lrzip.conf is contained in the hidden directory $HOME/.lrzip as are many configuration settings for different programs. Node, Java, Git, Openoffice, Vim, Emacs, gimp, mozilla, ssh, subversion, midnight commander, etc. In this sense, lrzip behaves very consistently with numerous other applications, both graphical and not.

I'll leave the ultimate decision to Con on this as he is the maintainer. But I think all is fine as is.

@pete4abw
Copy link
Contributor

The lrzip.conf issue has been resolved in the latest PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants