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

Miscellaneous patches #15

Open
nitro322 opened this issue Sep 24, 2019 · 4 comments
Open

Miscellaneous patches #15

nitro322 opened this issue Sep 24, 2019 · 4 comments

Comments

@nitro322
Copy link

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
Copy link
Author

lha-patches.zip

@jca02266
Copy link
Owner

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

jca02266 added a commit that referenced this issue Oct 5, 2019
@jca02266
Copy link
Owner

jca02266 commented Oct 5, 2019

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?

@nitro322
Copy link
Author

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.

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

2 participants