Bug 2240599 - Change minizip-compat dependency to minizip-ng
Summary: Change minizip-compat dependency to minizip-ng
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: libdigidocpp
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Germano Massullo
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2235710
TreeView+ depends on / blocked
 
Reported: 2023-09-25 12:37 UTC by Adam Dobes
Modified: 2024-02-15 22:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Adam Dobes 2023-09-25 12:37:53 UTC
There are plans to remove `zlib` package from Fedora in favor of `zlib-ng`. This would also mean the removal of `minizip-compat` as this is zlib's subpackage. Please try to update `minizip-compat-devel` dependency to `minizip-ng-devel`.

`minizip-ng` should provide backwards ABI compatibility with `minizip-compat`.

The plan to remove `zlib` has not yet been decided, so even if this dependency change is not possible, it would still provide valuable early feedback.

Comment 1 Lukas Javorsky 2023-10-16 08:13:05 UTC
Hello,

The Fedora Change proposal (https://fedoraproject.org/wiki/Changes/MinizipNGTransition) is already being worked on, please escalate this issue.

Comment 2 Germano Massullo 2023-10-16 08:54:38 UTC
It does not work in our case. I have to find the time to trying disabling minizip version control in source code

Finish: build setup for libdigidocpp-3.16.0-2.fc40.src.rpm
Start: Outputting list of installed packages
Finish: Outputting list of installed packages
Start: rpmbuild libdigidocpp-3.16.0-2.fc40.src.rpm
Building target platforms: x86_64
Building for target x86_64
setting SOURCE_DATE_EPOCH=1697414400
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.qHRZpD
+ umask 022
+ cd /builddir/build/BUILD
+ cd /builddir/build/BUILD
+ rm -rf libdigidocpp-3.16.0
+ /usr/lib/rpm/rpmuncompress -x /builddir/build/SOURCES/libdigidocpp-3.16.0.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd libdigidocpp-3.16.0
+ rm -rf /builddir/build/BUILD/libdigidocpp-3.16.0-SPECPARTS
+ /usr/bin/mkdir -p /builddir/build/BUILD/libdigidocpp-3.16.0-SPECPARTS
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ find . -type f -execdir sed -r -i 's/XALAN_USING_XALAN\(([^\(\)]+)\);*/using xalanc::\1;/g' '{}' +
+ rm -rf doc/sample_files.zip
+ rm -rf src/minizip
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.k6UWFC
+ umask 022
+ cd /builddir/build/BUILD
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
+ export CFLAGS
+ CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
+ export CXXFLAGS
+ FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn'
+ export RUSTFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
+ cd libdigidocpp-3.16.0
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
+ export CFLAGS
+ CXXFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
+ export CXXFLAGS
+ FFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules '
+ export FFLAGS
+ FCFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/lib64/gfortran/modules '
+ export FCFLAGS
+ VALAFLAGS=-g
+ export VALAFLAGS
+ RUSTFLAGS='-Copt-level=3 -Cdebuginfo=2 -Ccodegen-units=1 -Cstrip=none -Cforce-frame-pointers=yes -Clink-arg=-Wl,-z,relro -Clink-arg=-Wl,-z,now -Clink-arg=-specs=/usr/lib/rpm/redhat/redhat-package-notes --cap-lints=warn'
+ export RUSTFLAGS
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -Wl,--build-id=sha1 -specs=/usr/lib/rpm/redhat/redhat-package-notes '
+ export LDFLAGS
+ LT_SYS_LIBRARY_PATH=/usr/lib64:
+ export LT_SYS_LIBRARY_PATH
+ CC=gcc
+ export CC
+ CXX=g++
+ export CXX
+ /usr/bin/cmake -S . -B redhat-linux-build -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_Fortran_FLAGS_RELEASE:STRING=-DNDEBUG -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINCLUDE_INSTALL_DIR:PATH=/usr/include -DLIB_INSTALL_DIR:PATH=/usr/lib64 -DSYSCONF_INSTALL_DIR:PATH=/etc -DSHARE_INSTALL_PREFIX:PATH=/usr/share -DLIB_SUFFIX=64 -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_INSTALL_SYSCONFDIR=/etc -DSWIG_EXECUTABLE=SWIG_EXECUTABLE-NOTFOUND
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Found OpenSSL: /usr/lib64/libcrypto.so (found suitable version "3.1.1", minimum required is "1.1.1")  
-- Found PKCS11: opensc-pkcs11.so  
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Found XercesC: /usr/lib64/libxerces-c.so (found version "3.2.3") 
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "3.1.1")  
-- Found XalanC: /usr/lib64/libxalan-c.so (found version "1.12.0") 
-- Found XmlSecurityC: /usr/lib64/libxml-security-c.so  
-- Found XSD: /usr/bin/xsdcxx (found suitable version "4.1.0", minimum required is "4.0") 
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.13")  
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.9.5") 
-- Checking for modules 'minizip;minizip<2.0.0'
--   Package dependency requirement 'minizip < 2.0.0' could not be satisfied.
Package 'minizip' has version '3.0.7', required version is '< 2.0.0'
-- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR) 
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 AWT JVM) 
-- Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES Development Development.Module Development.Embed) (found version "3.12.0")
-- MiniZip not found; using bundled copy.
-- Could NOT find Boost (missing: Boost_INCLUDE_DIR unit_test_framework) 
-- Configuring done (1.2s)
CMake Error at src/CMakeLists.txt:3 (add_library):
  Cannot find source file:

    minizip/zip.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
  .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
  .f95 .f03 .hip .ispc


CMake Error at src/CMakeLists.txt:3 (add_library):
  No SOURCES given to target: minizip


CMake Generate step failed.  Build files cannot be regenerated correctly.

RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.k6UWFC (%build)
    Bad exit status from /var/tmp/rpm-tmp.k6UWFC (%build)
Finish: rpmbuild libdigidocpp-3.16.0-2.fc40.src.rpm
Finish: build phase for libdigidocpp-3.16.0-2.fc40.src.rpm
ERROR: Exception(/home/user/folder/libdigidocpp/results_libdigidocpp/3.16.0/2.fc40/libdigidocpp-3.16.0-2.fc40.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 19 seconds
INFO: Results and/or logs in: /home/user/folder/libdigidocpp/results_libdigidocpp/3.16.0/2.fc40
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
INFO: unmounting tmpfs.
Finish: clean chroot
ERROR: Command failed: 
 # /usr/bin/systemd-nspawn -q -M 1146cb007a9e4d889b350aa4e3d5fe99 -D /var/lib/mock/fedora-rawhide-x86_64/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.w1mm3qa3:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/mapper/control --bind=/dev/fuse --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --console=pipe --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin '--setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007"' '--setenv=PS1=<mock-chroot> \s-\v\$ ' --setenv=LANG=C.UTF-8 --resolv-conf=off bash --login -c '/usr/bin/rpmbuild -bb  --target x86_64 --nodeps /builddir/build/SPECS/libdigidocpp.spec'

Comment 3 Lukas Javorsky 2023-10-23 10:26:22 UTC
Hi, did you try to remove the version control in CMake?

Comment 4 Lukas Javorsky 2023-10-23 10:41:02 UTC
I've bypassed the check, but it failed due to some syntax errors: https://download.copr.fedorainfracloud.org/results/ljavorsk/minizip-ng/fedora-rawhide-x86_64/06557294-libdigidocpp/builder-live.log.gz

However, I've noticed that libdigidocpp does bundle minizip [1], could we use this if it won't be ready in time of the change?

[1] https://src.fedoraproject.org/rpms/libdigidocpp/blob/rawhide/f/libdigidocpp.spec#_67

Comment 5 Germano Massullo 2023-10-23 17:35:07 UTC
Dmitri do you have time to replace (and test)
BuildRequires:  pkgconfig(minizip-ng)
with
Provides: bundled(minizip)
? Cause I tried, the build fails against another library (xsd) that in theory should just work. I don't have time to debug during this week

Thank you

Comment 6 Lukas Javorsky 2023-10-30 10:45:44 UTC
You didn't CCed Dimitri, so I'm not sure if he get your request.

Comment 7 Dmitri Smirnov 2023-10-30 11:08:56 UTC
Am here, sorry for the long quiet. I have it a stab at building with embedded minizip as recommended by the upstream devs, but no dice so far. Will give it another go tomorrow.

Comment 8 Lukas Javorsky 2023-11-08 08:13:56 UTC
Hi Dmitri, how did you manage the build?

Comment 9 Lukas Javorsky 2023-11-16 10:18:39 UTC
Gentle ping, also to Germano

Comment 10 Dmitri Smirnov 2023-11-16 10:44:37 UTC
None of the simple solutions have seemed to work out for me and my C skills are insufficient to migrate the libraty to zlib-ng.

I also seem to be missing zlib-ng-compat or minizip-ng-compat that were described in initial change proposal. I still need to invest a bit more time into understanding the migration and doing it.

Comment 11 Lukas Javorsky 2023-11-16 21:42:03 UTC
Dmitri,

For the time pressure, I asked if the `libdigidocpp` is ready to switch to bundled minizip.

Porting to minizip-ng-compat would be a great thing, but we need to have some safe space where we can be before we port (that's using the bundled minizip, that libdigidocpp provides in its sources).
I don't understand your package internals, so I don't know why it didn't work for Germano, as he described in comment#5.

Could you please check if it could work with the bundled minizip and then we can discuss the porting to minizip-ng-compat?

Comment 12 Dmitri Smirnov 2023-11-16 22:13:56 UTC
Just removing minizip dependency and not removing the bundled minizip doesn't seem to be enough, as previously it in that case zlib is missing as well (I guess it was being pulled in by minizip).

Comment 13 Lukas Javorsky 2023-11-17 20:28:50 UTC
Wait, so the `libdigidocpp` requires zlib to build without having it in the BuildRequires? Why it's not there in the first place?

The zlib-ng-compat and minizip-ng-compat are only in the testing COPR repos [1][2] right now, we can't add them to Fedora directly until the changes are approved. You can enable those repos, install the packages and test your builds.

[1] https://copr.fedorainfracloud.org/coprs/ljavorsk/minizip-ng/
[2] https://copr.fedorainfracloud.org/coprs/tuliom/zlib-ng-compat-mpb/

Comment 15 Lukas Javorsky 2023-11-28 10:07:54 UTC
That's unfortunately not possible as zlib will also be removed.

I've filled an issue to minizip-ng upstream to find out why they are not 100% compatible with their functions, so I see the resolution in switching to minizip-ng-compat once it's resolved.

Comment 17 Aoife Moloney 2024-02-15 22:58:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.


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