using security/openssl in a port

Chris H portmaster at BSDforge.com
Fri Jan 5 02:55:53 UTC 2018


On Fri, 5 Jan 2018 15:44:31 +1300 "Matthew Luckie" <mjl at luckie.org.nz> said

> On 01/05/18 15:37, Chris H wrote:
> > On Fri, 5 Jan 2018 15:11:00 +1300 "Matthew Luckie" <mjl at luckie.org.nz> said
> > 
> >> Hi,
> >>
> >> I maintain a port that has a new release which requires openssl 1.0.2 to
> >> build.  FreeBSD 10.3 and 10.4 both have openssl 1.0.1, and 11 onwards
> >> have 1.0.2.  Is there a magic way to have this port depend on ports
> >> openssl for freebsd releases without openssl 1.0.2?  I ran
> >>
> >> find /usr/ports -exec grep "security/openssl" {} \; -print
> >>
> >> and didn't find anything that I could use as a recipe.  USES = ssl
> >> doesn't seem to be it either.
> >>
> >> Matthew
> > Hello Matthew,
> > Have a look at ports/Mk/bsd.port.mk
> > In there you will find some clues for defining rules for building
> > for specific (bsd)OS versions -- like >=XXXXX, or .if OSREL <=XXXXXX ...
> > As well as only permitting build/install when the correct version
> > of security/openssl is found in the systems ports tree.
> > It's well commented, and should give you some good options to try.
> > It will also give some good clues to search the ports tree for. Where
> > you can simply copy someone else's work verbatim. :-)
> > 
> > You might also try the following alternative for searching;
> > cd /usr/ports
> > find . | xargs <string-to-search-for>
> > 
> > HTH
> 
> My main worry is that I could not find a single port that apparently
> depends on security/openssl.  I'm worried that its more complicated than
> simply declaring a dependency on security/openssl on particular freebsd
> versions because other ports that use openssl might link against it
> without registering a dependency.  Is my worry misplaced?
Openssl is a PITA. You *also* have to consider whether the user is using
openssl in $BASE, rather than the ports version. There are many variables
to consider, and I don't envy you on this. :-)

If you get something you think might work, feel free to ask about it. :-)

--Chris
> 
> Matthew




More information about the freebsd-ports mailing list