lha icon indicating copy to clipboard operation
lha copied to clipboard

Miscellaneous patches

Open nitro322 opened this issue 5 years ago • 4 comments

Hello. I'm assisting with packaging LHA for Gentoo and found a few issues that I wanted to call to your attention. Best I can tell these are not Gentoo-specific, so I thought it'd make sense to get them patched upstream.

I'm including patch files for each. Please forgive the manual approach to this - I'm not especially familiar with git and unsure how to submit a pull request.

fix-config_headers.patch

This updates AM_CONFIG_HEADER, which was deprecated by automake, with AC_CONFIG_HEADERS. Reference here: https://www.gnu.org/software/automake/manual/automake.html

fix-getopt_long-delaration.patch

This updates the include syntax to support current versions of GCC, which requires using quotes to search for include files relative to the current file. The <> syntax only searches system directories now. Reference here: https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html

fix-file-list-from-stdin.patch

This re-enables support for specifying file lists via stdin, which was already present but disabled because it apparently doesn't work with mingw32. This patch detects whether mingw32 is being used and only then disables the code. No authoritative reference, but discussion here: https://bugs.gentoo.org/184911

Please let me know if you need any additional info or I could assist further. Thanks!

nitro322 avatar Sep 24 '19 00:09 nitro322

lha-patches.zip

nitro322 avatar Sep 24 '19 00:09 nitro322

Sorry for my late response. I will look now your patches.Thanks.

jca02266 avatar Sep 29 '19 01:09 jca02266

I applied fix-config_headers.patch and fix-getopt_long-delaration.patch. Thanks.

However, I must consider the fix-file-list-from-stdin.patch.

If there is the daemon (which close stdin) do the following command. it expects to extract all files in the archive foo.lzh

lha x foo.lzh

If the 'file-list-from-stdin' feature is enabled, such the daemon try to read file list from stdin and does not achive.

I think that it needs new command line option (-T like GNU tar)

# (1) create archive from stdin
find dir -type f -name '*.txt' | lha c foo.lzh -T -

# (2) extract archive from stdin
echo dir/foo.txt | lha x foo.lzh -T -

What do you think about it?

jca02266 avatar Oct 05 '19 04:10 jca02266

Hello. Apologies for the tardy reply, and thanks for applying the first two patches.

Regarding the third, I think your approach sounds reasonable. I've honestly never used the feature myself (just posting as it seems to be a useful for others), so I'd defer to your expertise on the matter. Reusing -T from tar, which should be reasonably well recognized, seems like a good approach.

Thanks again for your consideration on this.

nitro322 avatar Mar 25 '20 02:03 nitro322