On Sun Mar 27, 2022 at 08:49:25PM +0200, ~Ricardo wrote:
> Hey Rafael,
> 
> That's great to "hear", My initial diff was not so dumb after all. :)
> By the way, just for curiosity sake, instead of including zlib.h directly on 
> ShareExport.cpp, could we somehow use cmake?

I don't think so. We need zlib.h for some defines.

> 
> About those 4 failed tests, it seems they require xcb. but even with 
> TEST_DEPENDS = x11/xcb they fail.
> xenocara comes with libxcb, right? Perhaps we need to link it with TEST_FLAGS 
> or TEST_ENV? I don't know. Last case scenario, I say ignore them. :P

Will the GUI tests be started? For me only one test fails. I think some
X11 components are still necessary here. For example D-Bus must run.

If you want to invest more time, fell free ;) UI/GUI tests are specially
in the ports tree.

> 
> Thank you for your help.
> 
> Take care.
> ~Ricardo
> 
> > ----------------------------------------
> > From: Rafael Sadowski <raf...@sizeofvoid.org>
> > Sent: Sun Mar 27 08:39:48 CEST 2022
> > To: ~Ricardo <r.san...@mailfence.com>
> > Cc: Ports <ports@openbsd.org>
> > Subject: Re: [WIP] UPDATE: security/keepassxc 1.6.6 -> 1.7.0 | 
> > Feedback/testing needed
> > 
> > Thanks Ricardo for your work here. It doesn't look bad. A few small
> > flaws here and there but Josh Grosse has described them well.
> > 
> > Here is my work, tested with yubikey and browser plugin as well with
> > password based KDBX dbs.
> > 
> > Thank you for your work here, it has made things easier for me.
> > 
> > Other tests, feedback?
> > 
> > Rafael
> > 
> > diff --git a/security/keepassxc/Makefile b/security/keepassxc/Makefile
> > index c3523af26d2..01dbb7b9c1b 100644
> > --- a/security/keepassxc/Makefile
> > +++ b/security/keepassxc/Makefile
> > @@ -1,6 +1,6 @@
> >  COMMENT =  management tool for password and sensitive data
> >  
> > -V =                2.6.6
> > +V =                2.7.0
> >  DISTNAME = keepassxc-${V}
> >  
> >  CATEGORIES =       security
> > @@ -13,9 +13,8 @@ MAINTAINER =      Rafael Sadowski <rsadow...@openbsd.org>
> >  PERMIT_PACKAGE =   Yes
> >  
> >  WANTLIB += ${COMPILER_LIBCXX} Qt5Concurrent Qt5Core Qt5DBus Qt5Gui
> > -WANTLIB += Qt5Network Qt5Svg Qt5Widgets Qt5X11Extras X11 Xi Xtst
> > -WANTLIB += argon2 c gcrypt gpg-error m qrencode quazip5 readline
> > -WANTLIB += sodium z
> > +WANTLIB += Qt5Network Qt5Svg Qt5Widgets Qt5X11Extras X11 Xtst
> > +WANTLIB += argon2 botan-2 c m minizip qrencode readline z
> >  
> >  MASTER_SITES =     \
> >     https://github.com/keepassxreboot/keepassxc/releases/download/${V}/
> > @@ -24,10 +23,9 @@ EXTRACT_SUFX =   -src.tar.xz
> >  MODULES =  x11/qt5 \
> >             devel/cmake
> >  
> > -LIB_DEPENDS =      archivers/quazip \
> > -           security/libgcrypt \
> > -           security/libsodium \
> > +LIB_DEPENDS =      archivers/minizip \
> >             security/argon2 \
> > +           security/botan2 \
> >             graphics/libqrencode \
> >             x11/qt5/qtsvg \
> >             x11/qt5/qtx11extras  # needed for auto-type
> > @@ -52,10 +50,11 @@ FLAVORS =       browser yubikey
> >  FLAVOR ?=
> >  
> >  .if ${FLAVOR:Myubikey}
> > -LIB_DEPENDS +=             security/yubico/yubico-c \
> > +LIB_DEPENDS +=             devel/libusb1 \
> > +                   security/yubico/yubico-c \
> >                     security/yubico/yubikey-personalization
> >  CONFIGURE_ARGS +=  -DWITH_XC_YUBIKEY=ON
> > -WANTLIB += yubikey ykpers-1
> > +WANTLIB += yubikey ykpers-1 usb-1.0
> >  .endif
> >  
> >  .if ${FLAVOR:Mbrowser}
> > @@ -65,12 +64,13 @@ CONFIGURE_ARGS +=       -DWITH_XC_BROWSER=ON \
> >                     -DWITH_XC_NETWORKING=ON
> >  .endif
> >  
> > +FIX_CRLF_FILES =   src/keeshare/ShareExport.cpp
> > +
> >  # ld: error: unable to find library -lX11
> >  CONFIGURE_ARGS +=  -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS} -L${X11BASE}/lib"
> >  
> >  post-patch:
> >     cd ${WRKSRC}/src/; sed -i -e 's/Q_OS_LINUX/Q_OS_UNIX/g' \
> > -           core/ScreenLockListenerPrivate.cpp \
> >             gui/MainWindow.cpp \
> >             main.cpp \
> >             browser/BrowserSettingsWidget.cpp \
> > diff --git a/security/keepassxc/distinfo b/security/keepassxc/distinfo
> > index b3b13f3daf4..b9a04b17d52 100644
> > --- a/security/keepassxc/distinfo
> > +++ b/security/keepassxc/distinfo
> > @@ -1,2 +1,2 @@
> > -SHA256 (keepassxc-2.6.6-src.tar.xz) = 
> > NgOxGsObKJxH+sd/oVDgX9ZLOT2M/fVzLcPvEGZQpOI=
> > -SIZE (keepassxc-2.6.6-src.tar.xz) = 7640532
> > +SHA256 (keepassxc-2.7.0-src.tar.xz) = 
> > g752iQkEzWcDND+gl9aLz92Zu1Jc9Rj6YqffkpMCaqc=
> > +SIZE (keepassxc-2.7.0-src.tar.xz) = 8846780
> > diff --git a/security/keepassxc/patches/patch-src_keeshare_ShareExport_cpp 
> > b/security/keepassxc/patches/patch-src_keeshare_ShareExport_cpp
> > new file mode 100644
> > index 00000000000..3cba142a43d
> > --- /dev/null
> > +++ b/security/keepassxc/patches/patch-src_keeshare_ShareExport_cpp
> > @@ -0,0 +1,22 @@
> > +Index: src/keeshare/ShareExport.cpp
> > +--- src/keeshare/ShareExport.cpp.orig
> > ++++ src/keeshare/ShareExport.cpp
> > +@@ -27,7 +27,8 @@
> > + 
> > + #include <QBuffer>
> > + #include <botan/pubkey.h>
> > +-#include <zip.h>
> > ++#include <minizip/zip.h>
> > ++#include <zlib.h>
> > + 
> > + namespace
> > + {
> > +@@ -108,7 +109,7 @@ namespace
> > + 
> > +     bool writeZipFile(void* zf, const QString& fileName, const 
> > QByteArray& data)
> > +     {
> > +-        zipOpenNewFileInZip64(zf,
> > ++        zipOpenNewFileInZip_64(zf,
> > +                               fileName.toLatin1().data(),
> > +                               nullptr,
> > +                               nullptr,
> > diff --git a/security/keepassxc/pkg/PLIST b/security/keepassxc/pkg/PLIST
> > index cfd22927893..1896a3c2876 100644
> > --- a/security/keepassxc/pkg/PLIST
> > +++ b/security/keepassxc/pkg/PLIST
> > @@ -2,7 +2,7 @@
> >  @bin bin/keepassxc-cli
> >  %%browser%%
> >  lib/keepassxc/
> > -@so lib/keepassxc/libkeepassx-autotype-xcb.so
> > +@so lib/keepassxc/libkeepassxc-autotype-xcb.so
> >  @man man/man1/keepassxc-cli.1
> >  @man man/man1/keepassxc.1
> >  share/applications/org.keepassxc.KeePassXC.desktop
> > @@ -27,44 +27,45 @@ share/keepassxc/icons/application/256x256/
> >  share/keepassxc/icons/application/256x256/apps/
> >  share/keepassxc/icons/application/256x256/apps/keepassxc.png
> >  share/keepassxc/translations/
> > -share/keepassxc/translations/keepassx_ar.qm
> > -share/keepassxc/translations/keepassx_bg.qm
> > -share/keepassxc/translations/keepassx_ca.qm
> > -share/keepassxc/translations/keepassx_cs.qm
> > -share/keepassxc/translations/keepassx_da.qm
> > -share/keepassxc/translations/keepassx_de.qm
> > -share/keepassxc/translations/keepassx_el.qm
> > -share/keepassxc/translations/keepassx_en.qm
> > -share/keepassxc/translations/keepassx_en_GB.qm
> > -share/keepassxc/translations/keepassx_en_US.qm
> > -share/keepassxc/translations/keepassx_es.qm
> > -share/keepassxc/translations/keepassx_et.qm
> > -share/keepassxc/translations/keepassx_fi.qm
> > -share/keepassxc/translations/keepassx_fr.qm
> > -share/keepassxc/translations/keepassx_fr_CA.qm
> > -share/keepassxc/translations/keepassx_hr_HR.qm
> > -share/keepassxc/translations/keepassx_hu.qm
> > -share/keepassxc/translations/keepassx_id.qm
> > -share/keepassxc/translations/keepassx_it.qm
> > -share/keepassxc/translations/keepassx_ja.qm
> > -share/keepassxc/translations/keepassx_ko.qm
> > -share/keepassxc/translations/keepassx_lt.qm
> > -share/keepassxc/translations/keepassx_nb.qm
> > -share/keepassxc/translations/keepassx_nl_NL.qm
> > -share/keepassxc/translations/keepassx_pl.qm
> > -share/keepassxc/translations/keepassx_pt_BR.qm
> > -share/keepassxc/translations/keepassx_pt_PT.qm
> > -share/keepassxc/translations/keepassx_ro.qm
> > -share/keepassxc/translations/keepassx_ru.qm
> > -share/keepassxc/translations/keepassx_sk.qm
> > -share/keepassxc/translations/keepassx_sl_SI.qm
> > -share/keepassxc/translations/keepassx_sr.qm
> > -share/keepassxc/translations/keepassx_sv.qm
> > -share/keepassxc/translations/keepassx_th.qm
> > -share/keepassxc/translations/keepassx_tr.qm
> > -share/keepassxc/translations/keepassx_uk.qm
> > -share/keepassxc/translations/keepassx_zh_CN.qm
> > -share/keepassxc/translations/keepassx_zh_TW.qm
> > +share/keepassxc/translations/keepassxc_ar.qm
> > +share/keepassxc/translations/keepassxc_bg.qm
> > +share/keepassxc/translations/keepassxc_ca.qm
> > +share/keepassxc/translations/keepassxc_cs.qm
> > +share/keepassxc/translations/keepassxc_da.qm
> > +share/keepassxc/translations/keepassxc_de.qm
> > +share/keepassxc/translations/keepassxc_el.qm
> > +share/keepassxc/translations/keepassxc_en.qm
> > +share/keepassxc/translations/keepassxc_en_GB.qm
> > +share/keepassxc/translations/keepassxc_en_US.qm
> > +share/keepassxc/translations/keepassxc_es.qm
> > +share/keepassxc/translations/keepassxc_et.qm
> > +share/keepassxc/translations/keepassxc_fi.qm
> > +share/keepassxc/translations/keepassxc_fr.qm
> > +share/keepassxc/translations/keepassxc_fr_CA.qm
> > +share/keepassxc/translations/keepassxc_he.qm
> > +share/keepassxc/translations/keepassxc_hr.qm
> > +share/keepassxc/translations/keepassxc_hu.qm
> > +share/keepassxc/translations/keepassxc_id.qm
> > +share/keepassxc/translations/keepassxc_it.qm
> > +share/keepassxc/translations/keepassxc_ja.qm
> > +share/keepassxc/translations/keepassxc_ko.qm
> > +share/keepassxc/translations/keepassxc_my.qm
> > +share/keepassxc/translations/keepassxc_nb.qm
> > +share/keepassxc/translations/keepassxc_nl.qm
> > +share/keepassxc/translations/keepassxc_pl.qm
> > +share/keepassxc/translations/keepassxc_pt_BR.qm
> > +share/keepassxc/translations/keepassxc_pt_PT.qm
> > +share/keepassxc/translations/keepassxc_ro.qm
> > +share/keepassxc/translations/keepassxc_ru.qm
> > +share/keepassxc/translations/keepassxc_sk.qm
> > +share/keepassxc/translations/keepassxc_sl.qm
> > +share/keepassxc/translations/keepassxc_sr.qm
> > +share/keepassxc/translations/keepassxc_sv.qm
> > +share/keepassxc/translations/keepassxc_th.qm
> > +share/keepassxc/translations/keepassxc_tr.qm
> > +share/keepassxc/translations/keepassxc_uk.qm
> > +share/keepassxc/translations/keepassxc_zh_CN.qm
> > +share/keepassxc/translations/keepassxc_zh_TW.qm
> >  share/keepassxc/wordlists/
> >  share/keepassxc/wordlists/eff_large.wordlist
> >  share/metainfo/
> 
> 
> Take care.
> 
> Obrigado e boa semana.
> ~Ricardo
> 
> -- 
> Sent with https://mailfence.com  
> Secure and private email
> 

Reply via email to