Bug 1546091 - Please rebase to the latest upstream version
Summary: Please rebase to the latest upstream version
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lzma-sdk
Version: 38
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dominik 'Rathann' Mierzejewski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2229984
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-16 10:05 UTC by Jaroslav Škarvada
Modified: 2023-08-24 12:34 UTC (History)
5 users (show)

Fixed In Version: lzma-sdk-22.01-1.fc40
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-24 12:34:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Updated sharedlib patch (17.36 KB, patch)
2018-02-21 18:25 UTC, Jaroslav Škarvada
no flags Details | Diff
Updated sharedlib patch (14.95 KB, patch)
2018-02-21 21:29 UTC, Jaroslav Škarvada
no flags Details | Diff
patch for specfile (4.05 KB, patch)
2018-02-22 15:39 UTC, Tomáš Korbař
no flags Details | Diff
Updated sharedlib patch (14.95 KB, patch)
2018-02-24 10:19 UTC, Tomáš Korbař
no flags Details | Diff
patch for specfile (4.15 KB, patch)
2018-02-24 10:21 UTC, Tomáš Korbař
no flags Details | Diff
patch for specfile (4.15 KB, patch)
2018-02-26 13:08 UTC, Tomáš Korbař
no flags Details | Diff
Updated sharedlib patch (14.95 KB, patch)
2018-02-26 13:10 UTC, Tomáš Korbař
no flags Details | Diff
patch for specfile (4.26 KB, patch)
2018-03-03 13:29 UTC, Tomáš Korbař
no flags Details | Diff
patch for upx used functions in library (16.33 KB, patch)
2018-03-03 13:31 UTC, Tomáš Korbař
no flags Details | Diff
22.01 spec (7.56 KB, text/x-matlab)
2022-12-08 19:56 UTC, Gwyn Ciesla
no flags Details

Description Jaroslav Škarvada 2018-02-16 10:05:02 UTC
Description of problem:
It seems the version of the lzma-sdk we have in Fedora is quite prehistoric, i.e. 4.6.5 vs upstream latest 18.01. The version in Fedora is currently missing LZMA2 support which we would like to use in hashcat package (currently under review bug 1540347).

Version-Release number of selected component (if applicable):
lzma-sdk-4.6.5-20.fc28

How reproducible:
Always

Steps to Reproduce:
1. Check version
2.
3.

Actual results:
4.6.5

Expected results:
18.01

Additional info:

Comment 1 Tomáš Korbař 2018-02-19 14:45:22 UTC
Hello,
I'm working with Jarda on hashcat. I would like to propose you a patch for specfile at https://tkorbar.fedorapeople.org/lzma-sdkspec.patch
and new sharedlib patch at https://tkorbar.fedorapeople.org/lzma-sdk-18.0.1-sharedlib.patch
I think fprintf patch is no longer needed because upstream seems to have repaired it themselves.
I'm a beginner at package maintaining so any feedback would be very appreciated.

Comment 2 Fedora End Of Life 2018-02-20 15:38:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 3 Jaroslav Škarvada 2018-02-20 17:08:41 UTC
(In reply to Tomáš Korbař from comment #1)
> Hello,
> I'm working with Jarda on hashcat. I would like to propose you a patch for
> specfile at https://tkorbar.fedorapeople.org/lzma-sdkspec.patch
> and new sharedlib patch at
> https://tkorbar.fedorapeople.org/lzma-sdk-18.0.1-sharedlib.patch
> I think fprintf patch is no longer needed because upstream seems to have
> repaired it themselves.
> I'm a beginner at package maintaining so any feedback would be very
> appreciated.

Thanks for looking into it. Few comments from me related to your patches:
- when rebasing please return the release to 1 (i.e. it should be 1, not 22)
- I think you should rm -rf the whole bin directory in %prep phase
- rather then using "cd DIR; cd ..", use: "pushd DIR; popd", you don't need to remember where to return then
- maybe you can keep the sourceforge home page. I am not 100% sure about it, maybe the 7zip homepage is better. I would let it on the maintainer to decide.

Few more things for consideration:
- what about dos2unix the whole unpacked package? It's quite strange to have  CR+LF in the includes
- what about putting lzma-sdk-LICENSE.fedora under %license tag? Well it's not license, but it's license related, so according to [1] it should be there.

[1] https://fedoraproject.org/wiki/Packaging:LicensingGuidelines?rd=Packaging/LicensingGuidelines#License_Clarification

Comment 4 Tomáš Korbař 2018-02-20 18:05:40 UTC
Thanks for feedback. Updated patch for spec: https://tkorbar.fedorapeople.org/lzma-sdkspec.patch

Comment 5 Jaroslav Škarvada 2018-02-21 12:35:31 UTC
(In reply to Tomáš Korbař from comment #4)
> Thanks for feedback. Updated patch for spec:
> https://tkorbar.fedorapeople.org/lzma-sdkspec.patch

Thanks two more comments:
- I think you can use just 'rm -rf bin', i.e. without the slash
- 'dos2unix -ic * | xargs dos2unix' this is a bit overcomplicated and only converts the current directory (i.e. the documentation and not the headers/includes), better to use in the top dir (or CPP top dir):
 find . -type f -exec dos2unix '{}' \;

Comment 6 Jaroslav Škarvada 2018-02-21 15:30:04 UTC
Also I think the BuildRequires should contain:
- coreutils (for touch, mkdir, ln)
- glibc-common (for iconv)
- findutils (for xargs, find)
- make (for make)

Comment 7 Jaroslav Škarvada 2018-02-21 15:33:01 UTC
Also better to do the dos2unix conversion before calling the first patch command. I.e. to have the patches without CR+LF.

Comment 8 Jaroslav Škarvada 2018-02-21 16:12:10 UTC
One more thing for consideration. At the moment we have '/usr/include/lzma1801'. Is the version name in the include really needed? What about renaming it to just '/usr/include/lzma'. It will simplify further version bumps. At the moment it seems there is only 'upx' package build requiring lzma-sdk-devel, which hardcodes:

UPX_LZMA_VERSION=0x465 UPX_LZMADIR=%{_includedir}/lzma465 make %{?_smp_mflags} -C src

This seems quite strange. We could have then:
UPX_LZMADIR=%{_includedir}/lzma

And maybe we could also get rid of the UPX_LZMA_VERSION, there is quite strange:

const char *upx_lzma_version_string(void)
{
#if (WITH_LZMA == 0x443)
    return "4.43";
#else
#   error "unknown WITH_LZMA version"
    return NULL;
#endif
}

It could use MY_VERSION_NUMBERS from the 7zVersion.h, i.e. it could be rewritten as:

#include <lzma/C/7zVersion.h>
...
const char *upx_lzma_version_string(void)
{
    return MY_VERSION_NUMBERS;
}

And similarly on other places. This seems much better to me. I am ready to open the bugzilla / PR to upx if we accommodate this change.

Comment 9 Jaroslav Škarvada 2018-02-21 18:25:06 UTC
Created attachment 1398937 [details]
Updated sharedlib patch

Also for the hashcat to work the sharedlib patch needs updating to make Lzma2Decode part of the public API. This is the updated patch (assuming that dos2unix is run before patching).

@tomas next time please attach the patches to the bugzilla

Comment 10 Jaroslav Škarvada 2018-02-21 18:47:52 UTC
(In reply to Jaroslav Škarvada from comment #8)
> One more thing for consideration. At the moment we have
> '/usr/include/lzma1801'. Is the version name in the include really needed?
> What about renaming it to just '/usr/include/lzma'.

It seems we cannot use /usr/include/lzma, because it's already provided by the 'xz-devel' package. But I think we could use '/usr/include/lzma-sdk'.

Comment 11 Jaroslav Škarvada 2018-02-21 21:29:40 UTC
Created attachment 1399008 [details]
Updated sharedlib patch

Comment 12 Tomáš Korbař 2018-02-22 15:39:05 UTC
Created attachment 1399443 [details]
patch for specfile

This is patch with all changes for lzma-sdk spec.

Comment 13 Tomáš Korbař 2018-02-22 15:42:29 UTC
My latest patch installs the headers into /usr/include/lzma-sdk
I think this is the best name for folder with headers.

Comment 14 Jaroslav Škarvada 2018-02-22 18:26:06 UTC
(In reply to Tomáš Korbař from comment #13)
> My latest patch installs the headers into /usr/include/lzma-sdk
> I think this is the best name for folder with headers.

Thanks, two more things I noticed:
- the version isn't 18.0.1, but 18.01, see [1] and C/7zVersion.h. I think the RPM package should be then lzma-sdk-18.1 and the library should be named liblzmasdk.so.18.1.0. It seems even that the current 4.6.5 version isn't correct, it should be 4.65, see [2].
- I think you should remove /usr/include/lzma-sdk/CPP/Windows, it seems to be only Windows OS related includes

[1] http://www.7-zip.org/sdk.html
[2] https://sourceforge.net/projects/sevenzip/files/LZMA

Comment 15 Tomáš Korbař 2018-02-23 09:57:15 UTC
Ok. You used the patch i uploaded to fedorapeople and created attachment or is it your own? I ask because the version needs to be repaired also at the makefile.

Comment 16 Tomáš Korbař 2018-02-24 10:19:51 UTC
Created attachment 1400178 [details]
Updated sharedlib patch

I picked our current patch for sharedlib from attachments and changed the version of library at makefile to 18.01

Comment 17 Tomáš Korbař 2018-02-24 10:21:31 UTC
Created attachment 1400179 [details]
patch for specfile

The version of rpm package is now 18.01-1

Comment 18 Jaroslav Škarvada 2018-02-26 09:45:20 UTC
(In reply to Tomáš Korbař from comment #17)
> Created attachment 1400179 [details]
> patch for specfile
> 
> The version of rpm package is now 18.01-1

Both the library and the spec should be without the leading zero, i.e. 18.1-1 for the SPEC, 18.1.0 for the library.

Comment 19 Tomáš Korbař 2018-02-26 13:08:30 UTC
Created attachment 1400835 [details]
patch for specfile

repaired version to 18.1-1

Comment 20 Tomáš Korbař 2018-02-26 13:10:38 UTC
Created attachment 1400836 [details]
Updated sharedlib patch

Repaired version of library to 18.1.0

Comment 21 Jaroslav Škarvada 2018-02-28 08:21:52 UTC
Gwyn is the rebase feasible? Do you need help with co-maintenance?

Comment 22 Gwyn Ciesla 2018-02-28 13:38:52 UTC
If it doesn't break upx, I'm all for it. Co-maintainers welcome.

I've just been watching this evolve. :)

Comment 23 Tomáš Korbař 2018-03-03 13:29:39 UTC
Created attachment 1403432 [details]
patch for specfile

New version of patch because last time i failed to do symlinks right.
Also contains command for addfuncspatch.

Comment 24 Tomáš Korbař 2018-03-03 13:31:44 UTC
Created attachment 1403433 [details]
patch for upx used functions in library

This patch will allow us to unbundle lzma-sdk from upx.

Comment 25 Paul K 2018-05-04 17:40:52 UTC
Can we consider updating this to 18.05 before it's finalized?

Comment 26 Jaroslav Škarvada 2018-06-04 14:33:05 UTC
(In reply to Paul K from comment #25)
> Can we consider updating this to 18.05 before it's finalized?

Sorry for delay, Tomas is working on it.

Comment 27 Jaroslav Škarvada 2018-06-06 08:52:33 UTC
Upx bugzilla for reference: bug 1550187. I will continue to comment there for things related to upx.

Comment 28 Jan Kurik 2018-08-14 10:16:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 29 Ben Cotton 2019-10-31 20:52:29 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 30 Ben Cotton 2019-11-27 19:04:05 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 31 Petr Pisar 2022-11-18 16:05:27 UTC
This still an issue. Latest Fedora delivers lzma-sdk-4.6.5-30.fc37, but upstream is at lzma2201.7z <https://sourceforge.net/projects/sevenzip/files/LZMA%20SDK/>
There are other potential users like lrzip-next which rely on the modern LZMA SDK <https://github.com/pete4abw/lrzip-next/discussions/94>.

Comment 32 Gwyn Ciesla 2022-12-08 19:55:36 UTC
Apologies, this completely fell off my radar. I'm backporting patches and it looks like there are some changes from 18.01 to 22.01. The attached patches were also made before we needed diff -U3. Could someone rebase the sharedlib and addfuncstolibrary patches? upx actually no longer uses lzma-sdk, so if you don't otherwise need it just do sharedlib. I'll attach my current spec.

Comment 33 Gwyn Ciesla 2022-12-08 19:56:07 UTC
Created attachment 1931154 [details]
22.01 spec

Comment 34 Ben Cotton 2023-02-07 15:09:48 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle.
Changing version to 38.

Comment 35 Dominik 'Rathann' Mierzejewski 2023-07-19 21:41:56 UTC
Looks like I ended up owning this package but this bug didn't get auto-reassigned to me. I'll look into this as soon as I can.

Comment 36 Dominik 'Rathann' Mierzejewski 2023-08-10 11:10:18 UTC
https://src.fedoraproject.org/rpms/lzma-sdk/pull-request/1 until the rpm bug is fixed. If anyone is still interested, please test (on rawhide, it requires setting %__7zip macro to /usr/bin/7za in /usr/lib/rpm/macros).

Comment 37 Fedora Update System 2023-08-24 12:32:02 UTC
FEDORA-2023-a41be8fa00 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a41be8fa00

Comment 38 Fedora Update System 2023-08-24 12:34:34 UTC
FEDORA-2023-a41be8fa00 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.