Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#52372 closed submission (fixed)

opensc @0.16.0: new port

Reported by: lbschenkel (Leonardo Brondani Schenkel) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: opensc

Description

OpenSC contains a number of tools and libraries for smart cards, including a PKCS#11 driver that can be used by other software such as OpenSSH, OpenSSL, Firefox, Thunderbird, among others.

The attached Portfile builds the source in a way that replicates what the MacOSX/build-package script does.

I'm a heavy user of this tool and I have been building it from source for a long time. I'm volunteering to be the maintainer of this port.

P.S.: OpenSC also includes a TokenD module for macOS which integrates with the Keychain, however I am not building that yet — I want to get the basic Portfile merged first because building the TokenD module is more complicated and it will require the module to be installed outside /opt/local: in /Library/Security/tokend. When I manage to build that via MacPorts I plan to introduce a +tokend variant that will be disabled by default, but it could also be a subport or a different port. Any suggestions on the matter are greatly appreciated.

Attachments (1)

opensc.patch (4.5 KB) - added by lbschenkel (Leonardo Brondani Schenkel) 8 years ago.
included libcrypto dependency

Download all attachments as: .zip

Change History (11)

comment:1 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

I have updated the patch to set the default PKCS#11 provider to ${prefix}/lib which makes it possible to use pkcs11-tool without having to manually specify the path to the opensc shared library.

Last edited 8 years ago by lbschenkel (Leonardo Brondani Schenkel) (previous) (diff)

comment:2 Changed 8 years ago by mf2k (Frank Schima)

Version: 2.3.4

Thanks. Can we add openmaintainer?

comment:3 Changed 8 years ago by mf2k (Frank Schima)

Also, I think some dependencies are missing:

$ otool -L  /opt/local/bin/opensc-tool
/opt/local/bin/opensc-tool:
	/opt/local/lib/libopensc.4.dylib (compatibility version 5.0.0, current version 5.0.0)
	/opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

$ port provides /opt/local/lib/libcrypto.1.0.0.dylib
/opt/local/lib/libcrypto.1.0.0.dylib is provided by: openssl

It looks like openssl is needed at least. Can libressl be used in place of it?

comment:4 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

Sorry, I've made a mistake and the version I submitted had the dependency missing. I'm resubmitting the patch.

Yes, libressl works — in fact that's how I use it myself and I had to include a patch to make it build. I have submitted it upstream and it has been merged so it will go away in 0.17.0.

Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

Attachment: opensc.patch added

included libcrypto dependency

comment:5 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

Regarding the openmaintainer I am not entirely sure what you mean by that question. I am volunteering to be the maintainer of this port, so feel free to leave me there if there are no other candidates.

comment:6 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

Regarding the dependency to libcrypto, I have emulated what I saw in other ports but feel free to change that to lib:libcrypto:openssl which is probably more idiomatic and most likely the preferred form.

comment:7 Changed 8 years ago by mf2k (Frank Schima)

I think the best description is here. For maintainers who are not Macports team members, which is common, it is best to allow openmaintainer so we can easily make minor fixes as needed.

comment:8 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

Got it. Sure, go ahead, please add openmaintainer as well.

comment:9 Changed 8 years ago by mf2k (Frank Schima)

Resolution: fixed
Status: newclosed

Added in r153185 with minor formatting changes and openmaintainer.

For the next step, I would recommend submitting a new port for opensc-tokend rather than adding a variant.

comment:10 Changed 8 years ago by lbschenkel (Leonardo Brondani Schenkel)

I have submitted the new variant on #52431. I had to add a variant instead of introducing a new port for the reasons described on that ticket's description.

Note: See TracTickets for help on using tickets.