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

Support minizip-ng build #574

Merged
merged 3 commits into from
Jan 26, 2024
Merged

Support minizip-ng build #574

merged 3 commits into from
Jan 26, 2024

Conversation

ljavorsk
Copy link
Contributor

@ljavorsk ljavorsk commented Jan 4, 2024

Fedora has switched to minizip-ng (with the compat mode) and these patches fixed the failed build of libdigidocpp.

You can see more here: https://src.fedoraproject.org/rpms/libdigidocpp/pull-request/4

Signed-off-by: Lukas Javorsky ljavorsk@redhat.com

@ljavorsk
Copy link
Contributor Author

ljavorsk commented Jan 8, 2024

@metsma Could you please review? It is related to the issue #569

CMakeLists.txt Outdated
@@ -48,7 +48,7 @@ find_package(ZLIB REQUIRED)
find_package(MiniZip 1 QUIET) # version range (0...<2.0.0) requires CMake>=3.19
if(UNIX AND NOT APPLE)
find_package(PkgConfig)
pkg_check_modules(MINIZIP minizip IMPORTED_TARGET minizip<2.0.0)
pkg_check_modules(MINIZIP minizip IMPORTED_TARGET minizip<5.0.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 5? do we need version restriction?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was there before, and I wasn't sure if it served some purpose, so I left it there

Copy link
Contributor

@metsma metsma Jan 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was there to avoid pickup minizip-ng. My question is why version 5 or can we get rid of this condition?
Or are all minizip-ng versions compatible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I could test, version 3 is compatible after these two changes. I can test version 4 as well, but I cannot guarantee the upcoming ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@metsma I've tested it on version 4 and it's building, so I would leave it this way. Can you merge this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not remove then the <5 condition? If new release is with major version number 5 then we need change code again

CMakeLists.txt Outdated
@@ -48,7 +48,7 @@ find_package(ZLIB REQUIRED)
find_package(MiniZip 1 QUIET) # version range (0...<2.0.0) requires CMake>=3.19
if(UNIX AND NOT APPLE)
find_package(PkgConfig)
pkg_check_modules(MINIZIP minizip IMPORTED_TARGET minizip<2.0.0)
pkg_check_modules(MINIZIP minizip IMPORTED_TARGET minizip<5.0.0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not remove then the <5 condition? If new release is with major version number 5 then we need change code again

@ljavorsk
Copy link
Contributor Author

Changed to not check the version at all

@ljavorsk
Copy link
Contributor Author

Hi, can this MR be merged?

@kristelmerilain
Copy link
Contributor

We have to test it before we can merge it.
If there are no problems during testing, then we will merge it as soon as possible.

@metsma
Copy link
Contributor

metsma commented Jan 23, 2024

Can you please rebase to latest master to fix github actions and provide fedora builds with minizip-ng (needs probably installing minizip-ng-devel package?)

Up until now, the minizip was including this header file, but minizip-ng
does not and it causing the build to fail.
If the file uses structures defined in the zlib.h it should explicitly
include it.
minizip-ng versions are 3 and 4, so support it in CMakeList as well
@ljavorsk
Copy link
Contributor Author

Rebased.
Builds are here: https://copr.fedorainfracloud.org/coprs/ljavorsk/minizip-ng/build/6880707/

It requires both minizip-ng-compat-devel and zlib-ng-compat-devel (same as I've changed here: https://src.fedoraproject.org/rpms/libdigidocpp/pull-request/4#request_diff). I left the zlib-devel because it's provided/obsoleted by zlib-ng-compat-devel.

@metsma
Copy link
Contributor

metsma commented Jan 24, 2024

I was reffering to this project github action builds

https://github.com/open-eid/libdigidocpp/blob/master/.github/workflows/build.yml#L87

@ljavorsk
Copy link
Contributor Author

I've just added a new commit fixing the deps in Fedora. I used the old names because the new names work only since Fedora 40. However, the old names are working in Fedora 40 so don't worry

@kristelmerilain kristelmerilain merged commit 6d60da4 into open-eid:master Jan 26, 2024
19 checks passed
plaes added a commit to plaes/libdigidocpp that referenced this pull request Oct 23, 2024
Ideally we would like to include 'rawhide' in the loop as well,
which would allow spotting issues like open-eid#574 early on,
but official docker image only supports stable/rawhide which at
current point of time correspond to F40 and F42 version, thus we
still miss 41.
plaes added a commit to plaes/libdigidocpp that referenced this pull request Oct 23, 2024
Fedora 41 will be the latest stable version to be released in
upcoming weeks and thus will render 39 as EOL.

Also bring in 'rawhide' so we can detect issues like open-eid#574/open-eid#600 earlier.
plaes added a commit to plaes/libdigidocpp that referenced this pull request Oct 23, 2024
Fedora 41 will be the latest stable version to be released in
upcoming weeks and thus will render 39 as EOL.

Also bring in 'rawhide' so we can detect issues like open-eid#574/open-eid#600 earlier.

Signed-off-by: Priit Laes <plaes@plaes.org>
plaes added a commit to plaes/libdigidocpp that referenced this pull request Nov 8, 2024
Fedora 39 drops upstream support from 12 Nov 2024.
Also bring in 'rawhide' so we can detect issues like open-eid#574/open-eid#600 earlier.

Signed-off-by: Priit Laes <plaes@plaes.org>
klemensn pushed a commit to klemensn/libdigidocpp that referenced this pull request Nov 12, 2024
* Add include to zlib.h as it uses the structures defined in the zlib.h

Up until now, the minizip was including this header file, but minizip-ng
does not and it causing the build to fail.
If the file uses structures defined in the zlib.h it should explicitly
include it.

* Support minizip version 3 and 4 as well

minizip-ng versions are 3 and 4, so support it in CMakeList as well

* Fix install deps in Fedora Github action
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

Successfully merging this pull request may close these issues.

3 participants