Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658536 - sys-libs/zlib[minizip] should not install <minizip/crypt.h>
Summary: sys-libs/zlib[minizip] should not install <minizip/crypt.h>
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://github.com/madler/zlib/pull/229
Whiteboard:
Keywords:
: 658622 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-19 21:34 UTC by cyrillic
Modified: 2018-06-27 18:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
zlib-1.2.11-r2.ebuild (zlib-1.2.11-r2.ebuild,3.06 KB, text/plain)
2018-06-19 21:37 UTC, cyrillic
Details
ebuild.diff (ebuild.diff,528 bytes, patch)
2018-06-20 00:19 UTC, cyrillic
Details | Diff
internal_crypt_header.patch (internal_crypt_header.patch,411 bytes, patch)
2018-06-20 22:11 UTC, cyrillic
Details | Diff
ebuild.diff (ebuild.diff,707 bytes, patch)
2018-06-20 22:13 UTC, cyrillic
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description cyrillic 2018-06-19 21:34:57 UTC
sys-libs/zlib should not install /usr/include/minizip/crypt.h because this header is intended for internal use only.

Reproducible: Always




RedHat has known about this issue for 3 months.
https://bugzilla.redhat.com/show_bug.cgi?id=1424609

I noticed it just recently when I was compiling app-office/scribus-9999
FAILED: scribus/plugins/scriptplugin/CMakeFiles/scriptplugin.dir/cmdcell.cpp.o 
/usr/lib/llvm/7/bin/clang++ -DAPPDATADIR=\"/usr/share/metainfo/\" -DDESKTOPDIR=\"/usr/share/applications/\" -DDOCDIR=\"/usr/share/doc/scribus-9999/\" -DHAVE_CONFIG_H -DHAVE_DLFCN_H -DHAVE_UNISTD_H -DICONDIR=\"/usr/share/scribus/icons/\" -DLIBDIR=\"/usr/lib64/scribus/\" -DPLUGINDIR=\"/usr/lib64/scribus/plugins/\" -DQMLDIR=\"/usr/share/scribus/qml/\" -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DSAMPLESDIR=\"/usr/share/scribus/samples/\" -DSCRIPTSDIR=\"/usr/share/scribus/scripts/\" -DSHAREDIR=\"/usr/share/scribus/\" -DTEMPLATEDIR=\"/usr/share/scribus/templates/\" -Dscriptplugin_EXPORTS -Iscribus/plugins/scriptplugin -I/tmp/portage/app-office/scribus-9999/work/scribus-9999/scribus/plugins/scriptplugin -I/usr/include/GraphicsMagick -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-clang -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtOpenGL -I/usr/include/qt5/QtPrintSupport -I. -Iscribus -I/usr/include/libxml2 -I/usr/include/minizip -I/tmp/portage/app-office/scribus-9999/work/scribus-9999/scribus/third_party/hyphen -I/tmp/portage/app-office/scribus-9999/work/scribus-9999 -I/tmp/portage/app-office/scribus-9999/work/scribus-9999/scribus -I/usr/include/freetype2 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/cairo -I/usr/include/python2.7  -DHAVE_MEMRCHR -DNDEBUG -march=nocona -O2 -pipe -fPIC   -fPIC -std=gnu++11 -MD -MT scribus/plugins/scriptplugin/CMakeFiles/scriptplugin.dir/cmdcell.cpp.o -MF scribus/plugins/scriptplugin/CMakeFiles/scriptplugin.dir/cmdcell.cpp.o.d -o scribus/plugins/scriptplugin/CMakeFiles/scriptplugin.dir/cmdcell.cpp.o -c /tmp/portage/app-office/scribus-9999/work/scribus-9999/scribus/plugins/scriptplugin/cmdcell.cpp
In file included from /tmp/portage/app-office/scribus-9999/work/scribus-9999/scribus/plugins/scriptplugin/cmdcell.cpp:10:
In file included from /tmp/portage/app-office/scribus-9999/work/scribus-9999/scribus/plugins/scriptplugin/cmdcell.h:11:
In file included from /tmp/portage/app-office/scribus-9999/work/scribus-9999/scribus/plugins/scriptplugin/cmdvar.h:24:
In file included from /usr/include/python2.7/Python.h:47:
/usr/include/minizip/crypt.h:35:53: error: unknown type name 'z_crc_t'
static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
                                                    ^
/usr/include/minizip/crypt.h:48:51: error: unknown type name 'z_crc_t'
static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
                                                  ^
/usr/include/minizip/crypt.h:54:7: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register]
      register int keyshift = (int)((*(pkeys+1)) >> 24);
      ^~~~~~~~~
/usr/include/minizip/crypt.h:65:69: error: unknown type name 'z_crc_t'
static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)
                                                                    ^

The build system should have included /usr/include/crypt.h (glibc) and not /usr/include/minizip/crypt.h (zlib)
Comment 1 cyrillic 2018-06-19 21:37:00 UTC
Created attachment 536462 [details]
zlib-1.2.11-r2.ebuild
Comment 2 SpanKY gentoo-dev 2018-06-19 22:34:37 UTC
the zlib sources themselves install this header.  we should patch the source & send it upstream if it really is an internal header.
Comment 3 SpanKY gentoo-dev 2018-06-19 22:35:11 UTC
Comment on attachment 536462 [details]
zlib-1.2.11-r2.ebuild

please attach diffs, not entire ebuilds.  it's very hard to review entire files when you only change one or two lines.
Comment 4 cyrillic 2018-06-20 00:19:35 UTC
Created attachment 536486 [details, diff]
ebuild.diff

(In reply to SpanKY from comment #2)
> we should patch the source
> & send it upstream if it really is an internal header.

I agree. Not sure why RedHat did not think of that ...
Comment 5 Andreas Sturmlechner gentoo-dev 2018-06-20 16:18:29 UTC
Just had a scribus build failure as a result of this, your ebuild fixed it.
Comment 6 SpanKY gentoo-dev 2018-06-20 19:17:03 UTC
Comment on attachment 536486 [details, diff]
ebuild.diff

since we need to always generate minizip autotools, can you patch contrib/minizip/Makefile.am instead ?  move crypt.h to a noinst var instead.

then you can e-mail it upstream (for proper credit) and we can merge it here linking to the upstream mailing list thread
Comment 7 cyrillic 2018-06-20 22:11:05 UTC
Created attachment 536634 [details, diff]
internal_crypt_header.patch

My mistake, RedHat did try to fix this the right way, but their patch has not been accepted upstream yet.

https://github.com/madler/zlib/pull/229
Comment 8 cyrillic 2018-06-20 22:13:07 UTC
Created attachment 536636 [details, diff]
ebuild.diff

The current zlib ebuild ignores user patches.
Comment 9 SpanKY gentoo-dev 2018-06-21 02:56:25 UTC
thanks for tracking that down
Comment 10 Larry the Git Cow gentoo-dev 2018-06-21 02:57:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89cbe844bb4c4363270c692f50df5741cc2e78d7

commit 89cbe844bb4c4363270c692f50df5741cc2e78d7
Author:     Mike Frysinger <vapier@gentoo.org>
AuthorDate: 2018-06-21 02:55:38 +0000
Commit:     Mike Frysinger <vapier@gentoo.org>
CommitDate: 2018-06-21 02:57:06 +0000

    sys-libs/zlib: drop install of minizip/crypt.h #658536
    
    Closes: https://bugs.gentoo.org/658536

 .../zlib-1.2.11-minizip-drop-crypt-header.patch    |  38 +++++++
 sys-libs/zlib/zlib-1.2.11-r2.ebuild                | 123 +++++++++++++++++++++
 2 files changed, 161 insertions(+)
Comment 11 Pavel Volkov 2018-06-21 18:22:14 UTC
*** Bug 658622 has been marked as a duplicate of this bug. ***