Re: gnupg2 broken (Was Re: CVS: cvs.openbsd.org: ports)

2011-11-24 Thread Justin Lindberg

On 11/24/11 01:23, Pierre-Emmanuel André wrote:

On Thu, Nov 24, 2011 at 10:10:31AM +0100, David Coppa wrote:

On Tue, Nov 22, 2011 at 2:18 PM, David Coppa  wrote:

So, what shall we do?
Nobody cares enough, it seems...

I don't have a smardcard to test.
I'm ok with your diff (until a better solution).


I just happen to have a spare USB keyboard sitting around
that has a slot for a smart card and produces the following
output when I plug it in:

uhidev4 at uhub2 port 6 configuration 1 interface 0 "SILITEK USB SMART 
CARD KEYBOARD" rev 1.10/0.20 addr 5

uhidev4: iclass 3/1
ukbd1 at uhidev4: 8 modifier keys, 6 key codes
wskbd2 at ukbd1 mux 1
wskbd2: connecting to wsdisplay0
uhidev5 at uhub2 port 6 configuration 1 interface 2 "SILITEK USB SMART 
CARD KEYBOARD" rev 1.10/0.20 addr 5

uhidev5: iclass 3/0, 2 report ids
uhid5 at uhidev5 reportid 1: input=3, output=0, feature=0
uhid6 at uhidev5 reportid 2: input=1, output=0, feature=0
ugen0 at uhub2 port 6 configuration 1 "SILITEK USB SMART CARD KEYBOARD" 
rev 1.10/0.20 addr 5


If this would be of any use, I will be happy to send it.
However, there is one small issue:

http://www.bis.doc.gov/encryption/

--Justin



Re: gnupg2 broken (Was Re: CVS: cvs.openbsd.org: ports)

2011-11-24 Thread Pierre-Emmanuel André
On Thu, Nov 24, 2011 at 10:10:31AM +0100, David Coppa wrote:
> On Tue, Nov 22, 2011 at 2:18 PM, David Coppa  wrote:
> 
> So, what shall we do?
> Nobody cares enough, it seems...

I don't have a smardcard to test. 
I'm ok with your diff (until a better solution).

Regards,
 
> cheers,
> David
> 
> > On Sun, 13 Nov 2011, Antoine Jacoutot wrote:
> >
> >> Log message:
> >> Sync dependencies after move from libusb to libusb-compat and fix a
> >> couple of fallouts. Note that these ports are only the ones that used to
> >> have a direct dependency on devel/libusb so there may be some other
> >> hidden ports that may break because of the switch. If that's the case,
> >> no need to start ranting all over but instead tell me which one(s)
> >> break. Thanks.
> >
> > I'm sorry to bring bad news, but this broke security/gnupg2 in a
> > bad way:
> >
> > (gdb) run --pinentry-program /usr/local/bin/pinentry-curses 
> > --enable-ssh-support --daemon --log-file ~/.gnupg/gpg-agent.log 
> > --write-env-file
> > Starting program: /usr/local/bin/gpg-agent --pinentry-program 
> > /usr/local/bin/pinentry-curses --enable-ssh-support --daemon --log-file 
> > ~/.gnupg/gpg-agent.log --write-env-file
> > O j: ... this is a bug (global.c:121:global_init)
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to process 2746, thread 0x2037b1800]
> > __pth_ring_append (r=0x150, rn=0x20113a9c0) at pth_ring.c:159
> > 159         if (r->r_hook == NULL) {
> > (gdb) bt
> > #0  __pth_ring_append (r=0x150, rn=0x20113a9c0) at pth_ring.c:159
> > #1  0x00021052985e in pth_mutex_acquire (mutex=0x20113a9c0, 
> > tryonly=Variable "tryonly" is not available.
> > ) at pth_sync.c:101
> > #2  0x00406ee0 in gcry_pth_mutex_lock (lock=Variable "lock" is not 
> > available.
> > ) at gpg-agent.c:280
> > #3  0x00020630938d in lock_fsm () from /usr/local/lib/libgcrypt.so.15.0
> > #4  0x00020630943b in fips_new_state () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #5  0x00020630965c in _gcry_fips_signal_error () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #6  0x000206303844 in _gcry_logv () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #7  0x000206303eb8 in _gcry_log () from /usr/local/lib/libgcrypt.so.15.0
> > #8  0x000206303f0f in _gcry_bug () from /usr/local/lib/libgcrypt.so.15.0
> > #9  0x00020630484a in global_init () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #10 0x000206304c0f in _gcry_vcontrol () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #11 0x000206302cdd in gcry_control () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #12 0x00408037 in main (argc=8, argv=0x7f7ea178) at 
> > gpg-agent.c:598
> >
> > This is because the new libusb brings "-pthread" in and you cannot
> > mix GNU pth with libpthread, at least until (I think) we'll be able
> > to have a working devel/pth built using the "--enable-syscall-hard"
> > option that provides replacement syscalls wrapping libpthread ones.
> >
> > So, for now, we are forced to lose smartcard support unless someone
> > can jump in with a fix for this giant mess...
> >
> > Ciao,
> > David
> >
> > Index: Makefile
> > ===
> > RCS file: /cvs/ports/security/gnupg2/Makefile,v
> > retrieving revision 1.13
> > diff -u -p -r1.13 Makefile
> > --- Makefile    13 Nov 2011 13:54:05 -      1.13
> > +++ Makefile    22 Nov 2011 13:17:09 -
> > @@ -4,7 +4,7 @@ COMMENT =       gnu privacy guard - a free PG
> >
> >  DISTNAME =     gnupg-2.0.18
> >  CATEGORIES =   security
> > -REVISION =     0
> > +REVISION =     1
> >
> >  MASTER_SITES =         ftp://ftp.gnupg.org/gcrypt/gnupg/ \
> >                ftp://gd.tuwien.ac.at/privacy/gnupg/gnupg/ \
> > @@ -25,8 +25,8 @@ PERMIT_PACKAGE_FTP =  Yes
> >  PERMIT_DISTFILES_CDROM =Yes
> >  PERMIT_DISTFILES_FTP =         Yes
> >
> > -WANTLIB +=             assuan bz2 c gcrypt gpg-error pthread
> > -WANTLIB +=             ksba pth readline termcap usb z
> > +WANTLIB +=             assuan bz2 c gcrypt gpg-error
> > +WANTLIB +=             ksba pth readline termcap z
> >
> >  EXTRACT_SUFX =                 .tar.bz2
> >
> > @@ -35,8 +35,7 @@ MODULES =             devel/gettext
> >  FLAVORS =              ldap
> >  FLAVOR ?=
> >
> > -LIB_DEPENDS =          devel/libusb-compat \
> > -                       archivers/bzip2 \
> > +LIB_DEPENDS =          archivers/bzip2 \
> >                        security/libassuan \
> >                        security/libgcrypt \
> >                        security/libksba \
> > @@ -61,9 +60,12 @@ USE_GROFF =          Yes
> >
> >  CONFIGURE_STYLE =      gnu
> >  CONFIGURE_ENV =        CPPFLAGS="-I${LOCALBASE}/include" \
> > -                       LDFLAGS="-L${LOCALBASE}/lib -pthread"
> > +                       LDFLAGS="-L${LOCALBASE}/lib"
> >  CONFIGURE_ARGS =       docdir=${LOCALBASE}/share/doc/gnupg2 \
> >                        --enable-gpgtar
> > +
> > +# XXX pth/pthread segfault woes
> > +C

Re: gnupg2 broken (Was Re: CVS: cvs.openbsd.org: ports)

2011-11-24 Thread Antoine Jacoutot
On Thu, Nov 24, 2011 at 10:10:31AM +0100, David Coppa wrote:
> On Tue, Nov 22, 2011 at 2:18 PM, David Coppa  wrote:
> 
> So, what shall we do?
> Nobody cares enough, it seems...

Just do whatever you think is right.
I doubt anyone uses this port so ...


> > On Sun, 13 Nov 2011, Antoine Jacoutot wrote:
> >
> >> Log message:
> >> Sync dependencies after move from libusb to libusb-compat and fix a
> >> couple of fallouts. Note that these ports are only the ones that used to
> >> have a direct dependency on devel/libusb so there may be some other
> >> hidden ports that may break because of the switch. If that's the case,
> >> no need to start ranting all over but instead tell me which one(s)
> >> break. Thanks.
> >
> > I'm sorry to bring bad news, but this broke security/gnupg2 in a
> > bad way:
> >
> > (gdb) run --pinentry-program /usr/local/bin/pinentry-curses 
> > --enable-ssh-support --daemon --log-file ~/.gnupg/gpg-agent.log 
> > --write-env-file
> > Starting program: /usr/local/bin/gpg-agent --pinentry-program 
> > /usr/local/bin/pinentry-curses --enable-ssh-support --daemon --log-file 
> > ~/.gnupg/gpg-agent.log --write-env-file
> > O j: ... this is a bug (global.c:121:global_init)
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to process 2746, thread 0x2037b1800]
> > __pth_ring_append (r=0x150, rn=0x20113a9c0) at pth_ring.c:159
> > 159         if (r->r_hook == NULL) {
> > (gdb) bt
> > #0  __pth_ring_append (r=0x150, rn=0x20113a9c0) at pth_ring.c:159
> > #1  0x00021052985e in pth_mutex_acquire (mutex=0x20113a9c0, 
> > tryonly=Variable "tryonly" is not available.
> > ) at pth_sync.c:101
> > #2  0x00406ee0 in gcry_pth_mutex_lock (lock=Variable "lock" is not 
> > available.
> > ) at gpg-agent.c:280
> > #3  0x00020630938d in lock_fsm () from /usr/local/lib/libgcrypt.so.15.0
> > #4  0x00020630943b in fips_new_state () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #5  0x00020630965c in _gcry_fips_signal_error () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #6  0x000206303844 in _gcry_logv () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #7  0x000206303eb8 in _gcry_log () from /usr/local/lib/libgcrypt.so.15.0
> > #8  0x000206303f0f in _gcry_bug () from /usr/local/lib/libgcrypt.so.15.0
> > #9  0x00020630484a in global_init () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #10 0x000206304c0f in _gcry_vcontrol () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #11 0x000206302cdd in gcry_control () from 
> > /usr/local/lib/libgcrypt.so.15.0
> > #12 0x00408037 in main (argc=8, argv=0x7f7ea178) at 
> > gpg-agent.c:598
> >
> > This is because the new libusb brings "-pthread" in and you cannot
> > mix GNU pth with libpthread, at least until (I think) we'll be able
> > to have a working devel/pth built using the "--enable-syscall-hard"
> > option that provides replacement syscalls wrapping libpthread ones.
> >
> > So, for now, we are forced to lose smartcard support unless someone
> > can jump in with a fix for this giant mess...
> >
> > Ciao,
> > David
> >
> > Index: Makefile
> > ===
> > RCS file: /cvs/ports/security/gnupg2/Makefile,v
> > retrieving revision 1.13
> > diff -u -p -r1.13 Makefile
> > --- Makefile    13 Nov 2011 13:54:05 -      1.13
> > +++ Makefile    22 Nov 2011 13:17:09 -
> > @@ -4,7 +4,7 @@ COMMENT =       gnu privacy guard - a free PG
> >
> >  DISTNAME =     gnupg-2.0.18
> >  CATEGORIES =   security
> > -REVISION =     0
> > +REVISION =     1
> >
> >  MASTER_SITES =         ftp://ftp.gnupg.org/gcrypt/gnupg/ \
> >                ftp://gd.tuwien.ac.at/privacy/gnupg/gnupg/ \
> > @@ -25,8 +25,8 @@ PERMIT_PACKAGE_FTP =  Yes
> >  PERMIT_DISTFILES_CDROM =Yes
> >  PERMIT_DISTFILES_FTP =         Yes
> >
> > -WANTLIB +=             assuan bz2 c gcrypt gpg-error pthread
> > -WANTLIB +=             ksba pth readline termcap usb z
> > +WANTLIB +=             assuan bz2 c gcrypt gpg-error
> > +WANTLIB +=             ksba pth readline termcap z
> >
> >  EXTRACT_SUFX =                 .tar.bz2
> >
> > @@ -35,8 +35,7 @@ MODULES =             devel/gettext
> >  FLAVORS =              ldap
> >  FLAVOR ?=
> >
> > -LIB_DEPENDS =          devel/libusb-compat \
> > -                       archivers/bzip2 \
> > +LIB_DEPENDS =          archivers/bzip2 \
> >                        security/libassuan \
> >                        security/libgcrypt \
> >                        security/libksba \
> > @@ -61,9 +60,12 @@ USE_GROFF =          Yes
> >
> >  CONFIGURE_STYLE =      gnu
> >  CONFIGURE_ENV =        CPPFLAGS="-I${LOCALBASE}/include" \
> > -                       LDFLAGS="-L${LOCALBASE}/lib -pthread"
> > +                       LDFLAGS="-L${LOCALBASE}/lib"
> >  CONFIGURE_ARGS =       docdir=${LOCALBASE}/share/doc/gnupg2 \
> >                        --enable-gpgtar
> > +
> > +# XXX pth/pthread segfault woes
> > +CONFIGURE_ARGS +=      --disable-ccid-driv

gnupg2 broken (Was Re: CVS: cvs.openbsd.org: ports)

2011-11-24 Thread David Coppa
On Tue, Nov 22, 2011 at 2:18 PM, David Coppa  wrote:

So, what shall we do?
Nobody cares enough, it seems...

cheers,
David

> On Sun, 13 Nov 2011, Antoine Jacoutot wrote:
>
>> Log message:
>> Sync dependencies after move from libusb to libusb-compat and fix a
>> couple of fallouts. Note that these ports are only the ones that used to
>> have a direct dependency on devel/libusb so there may be some other
>> hidden ports that may break because of the switch. If that's the case,
>> no need to start ranting all over but instead tell me which one(s)
>> break. Thanks.
>
> I'm sorry to bring bad news, but this broke security/gnupg2 in a
> bad way:
>
> (gdb) run --pinentry-program /usr/local/bin/pinentry-curses 
> --enable-ssh-support --daemon --log-file ~/.gnupg/gpg-agent.log 
> --write-env-file
> Starting program: /usr/local/bin/gpg-agent --pinentry-program 
> /usr/local/bin/pinentry-curses --enable-ssh-support --daemon --log-file 
> ~/.gnupg/gpg-agent.log --write-env-file
> O j: ... this is a bug (global.c:121:global_init)
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to process 2746, thread 0x2037b1800]
> __pth_ring_append (r=0x150, rn=0x20113a9c0) at pth_ring.c:159
> 159         if (r->r_hook == NULL) {
> (gdb) bt
> #0  __pth_ring_append (r=0x150, rn=0x20113a9c0) at pth_ring.c:159
> #1  0x00021052985e in pth_mutex_acquire (mutex=0x20113a9c0, 
> tryonly=Variable "tryonly" is not available.
> ) at pth_sync.c:101
> #2  0x00406ee0 in gcry_pth_mutex_lock (lock=Variable "lock" is not 
> available.
> ) at gpg-agent.c:280
> #3  0x00020630938d in lock_fsm () from /usr/local/lib/libgcrypt.so.15.0
> #4  0x00020630943b in fips_new_state () from 
> /usr/local/lib/libgcrypt.so.15.0
> #5  0x00020630965c in _gcry_fips_signal_error () from 
> /usr/local/lib/libgcrypt.so.15.0
> #6  0x000206303844 in _gcry_logv () from /usr/local/lib/libgcrypt.so.15.0
> #7  0x000206303eb8 in _gcry_log () from /usr/local/lib/libgcrypt.so.15.0
> #8  0x000206303f0f in _gcry_bug () from /usr/local/lib/libgcrypt.so.15.0
> #9  0x00020630484a in global_init () from /usr/local/lib/libgcrypt.so.15.0
> #10 0x000206304c0f in _gcry_vcontrol () from 
> /usr/local/lib/libgcrypt.so.15.0
> #11 0x000206302cdd in gcry_control () from 
> /usr/local/lib/libgcrypt.so.15.0
> #12 0x00408037 in main (argc=8, argv=0x7f7ea178) at 
> gpg-agent.c:598
>
> This is because the new libusb brings "-pthread" in and you cannot
> mix GNU pth with libpthread, at least until (I think) we'll be able
> to have a working devel/pth built using the "--enable-syscall-hard"
> option that provides replacement syscalls wrapping libpthread ones.
>
> So, for now, we are forced to lose smartcard support unless someone
> can jump in with a fix for this giant mess...
>
> Ciao,
> David
>
> Index: Makefile
> ===
> RCS file: /cvs/ports/security/gnupg2/Makefile,v
> retrieving revision 1.13
> diff -u -p -r1.13 Makefile
> --- Makefile    13 Nov 2011 13:54:05 -      1.13
> +++ Makefile    22 Nov 2011 13:17:09 -
> @@ -4,7 +4,7 @@ COMMENT =       gnu privacy guard - a free PG
>
>  DISTNAME =     gnupg-2.0.18
>  CATEGORIES =   security
> -REVISION =     0
> +REVISION =     1
>
>  MASTER_SITES =         ftp://ftp.gnupg.org/gcrypt/gnupg/ \
>                ftp://gd.tuwien.ac.at/privacy/gnupg/gnupg/ \
> @@ -25,8 +25,8 @@ PERMIT_PACKAGE_FTP =  Yes
>  PERMIT_DISTFILES_CDROM =Yes
>  PERMIT_DISTFILES_FTP =         Yes
>
> -WANTLIB +=             assuan bz2 c gcrypt gpg-error pthread
> -WANTLIB +=             ksba pth readline termcap usb z
> +WANTLIB +=             assuan bz2 c gcrypt gpg-error
> +WANTLIB +=             ksba pth readline termcap z
>
>  EXTRACT_SUFX =                 .tar.bz2
>
> @@ -35,8 +35,7 @@ MODULES =             devel/gettext
>  FLAVORS =              ldap
>  FLAVOR ?=
>
> -LIB_DEPENDS =          devel/libusb-compat \
> -                       archivers/bzip2 \
> +LIB_DEPENDS =          archivers/bzip2 \
>                        security/libassuan \
>                        security/libgcrypt \
>                        security/libksba \
> @@ -61,9 +60,12 @@ USE_GROFF =          Yes
>
>  CONFIGURE_STYLE =      gnu
>  CONFIGURE_ENV =        CPPFLAGS="-I${LOCALBASE}/include" \
> -                       LDFLAGS="-L${LOCALBASE}/lib -pthread"
> +                       LDFLAGS="-L${LOCALBASE}/lib"
>  CONFIGURE_ARGS =       docdir=${LOCALBASE}/share/doc/gnupg2 \
>                        --enable-gpgtar
> +
> +# XXX pth/pthread segfault woes
> +CONFIGURE_ARGS +=      --disable-ccid-driver
>
>  # Avoid conflict with gnupg-1.x
>  post-install:
>