mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +00:00
packages: Improve handling of -lib packages
For some packages (OpenSSL, Kerberos) we want to ship runtime libraries in a separate package, e.g. openssl and openssl-lib. Currently this is done using PACKAGE=openssl-lib, but that creates packages with strange names like openssl-lib-lib32. Instead, add a new LIB_PACKAGE option to bsd.lib.mk that causes runtime libraries to be placed in a new -lib subpackage. This significantly improves the set of packages we create; for example, OpenSSL goes from: FreeBSD-openssl FreeBSD-openssl-dbg FreeBSD-openssl-lib FreeBSD-openssl-lib-dbg FreeBSD-openssl-lib-dbg-lib32 FreeBSD-openssl-lib-dev FreeBSD-openssl-lib-dev-lib32 FreeBSD-openssl-lib-lib32 FreeBSD-openssl-lib-man FreeBSD-openssl-man to: FreeBSD-openssl FreeBSD-openssl-dbg FreeBSD-openssl-dbg-lib32 FreeBSD-openssl-dev FreeBSD-openssl-dev-lib32 FreeBSD-openssl-lib FreeBSD-openssl-lib32 FreeBSD-openssl-man While here, move /usr/bin/krb5-config and /usr/bin/compile_et into the kerberos-dev package. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D51925
This commit is contained in:
parent
1fc995f9e2
commit
929f5966a9
29 changed files with 68 additions and 54 deletions
7
UPDATING
7
UPDATING
|
|
@ -27,6 +27,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW:
|
|||
world, or to merely disable the most expensive debugging functionality
|
||||
at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".)
|
||||
|
||||
20250823:
|
||||
The set of pkgbase packages for Kerberos and OpenSSL has changed.
|
||||
After updating past 250e77d4f0a5, you should check 'pkg orphans'
|
||||
and remove any orphaned packages, then examine the output of
|
||||
'pkg install -r base -g FreeBSD-openssl\* FreeBSD-kerberos\*'
|
||||
and install any new packages you need.
|
||||
|
||||
20250823:
|
||||
To restore bridge(4)'s ABI compatibility with ifconfig from 14.x or
|
||||
earlier, the size of struct ifbreq has changed, so you must update
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
.include <src.opts.mk>
|
||||
|
||||
PACKAGE?= kerberos
|
||||
KRB5_VERSION= 1.22-final
|
||||
|
||||
# MIT KRB5 uses KRB5_DIR. Heimdal uses KRB5DIR.
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos-lib
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,4 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos-lib
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
.include "../Makefile.inc"
|
||||
|
||||
PACKAGE?= kerberos-lib
|
||||
LIB_PACKAGE=
|
||||
|
||||
KRB5_KRB5LIBDIR= ${KRB5_SRCLIBDIR}/krb5
|
||||
KRB5_K5CRYPTODIR= ${KRB5_SRCLIBDIR}/crypto
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@
|
|||
|
||||
.include "../Makefile.inc"
|
||||
|
||||
PACKAGE?= kerberos-kdc
|
||||
PACKAGE= kerberos-kdc
|
||||
BINDIR?= /usr/libexec
|
||||
|
|
|
|||
|
|
@ -9,5 +9,4 @@
|
|||
|
||||
.include "../Makefile.inc"
|
||||
|
||||
PACKAGE?= kerberos
|
||||
BINDIR?= /usr/bin
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos
|
||||
|
||||
PROG= gss-server
|
||||
|
||||
LIBADD= gssapi_krb5 krb5 k5crypto com_err krb5profile krb5support sys
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos
|
||||
|
||||
PROG= sim_server
|
||||
|
||||
LIBADD= krb5 k5crypto com_err krb5profile krb5support sys
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos
|
||||
|
||||
PROG= sserver
|
||||
|
||||
LIBADD= krb5 k5crypto com_err krb5profile krb5support sys
|
||||
|
|
|
|||
|
|
@ -9,5 +9,7 @@
|
|||
|
||||
.include "../Makefile.inc"
|
||||
|
||||
LIB_PACKAGE=
|
||||
|
||||
SHLIBDIR?= /usr/lib
|
||||
SHLIB_MAJOR?= 122
|
||||
|
|
|
|||
|
|
@ -7,12 +7,11 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos-lib
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
||||
SCRIPTS= krb5-config.sh
|
||||
BINDIR?= /usr/bin
|
||||
TAGS= dev
|
||||
|
||||
MAN= krb5-config.1
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
||||
SRC_ETDIR= ${KRB5_DIR}/util/et
|
||||
|
|
@ -18,6 +16,7 @@ SCRIPTS= compile_et
|
|||
BINDIR?= /usr/bin
|
||||
MAN= compile_et.1
|
||||
CLEANFILES= compile_et
|
||||
TAGS+= dev
|
||||
|
||||
compile_et: compile_et.sh
|
||||
sh ${SRC_ETDIR}/config_script ${SRC_ETDIR}/compile_et.sh \
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos-lib
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
|
@ -44,6 +42,7 @@ ETSCRIPTS= et_c.awk \
|
|||
|
||||
ETSCRIPTSDIR= ${KRB5_ETDIR}
|
||||
ETSCRIPTSMODE= 0444
|
||||
ETSCRIPTSTAGS= dev
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos-lib
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos-lib
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos-lib
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@
|
|||
# under sponsorship from the FreeBSD Foundation.
|
||||
#
|
||||
|
||||
PACKAGE= kerberos-lib
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ libcrypt.ald: ${.CURDIR}/${STATIC_LDSCRIPT}
|
|||
all: ${STATIC_LDSCRIPT} libcrypt.ald
|
||||
|
||||
install-libcrypt.a: libcrypt.ald
|
||||
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${INSTALL} ${DEV_TAG_ARGS} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${_INSTALLFLAGS} libcrypt.ald ${DESTDIR}${_LIBDIR}/lib${LIB}.a
|
||||
|
||||
realinstall: install-libcrypt.a
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@ pkg_suffixes = {
|
|||
"This package contains 32-bit libraries for running 32-bit "..
|
||||
"applications on a 64-bit host.",
|
||||
},
|
||||
{
|
||||
"%-lib$", "(libraries)",
|
||||
"This package contains runtime shared libraries.",
|
||||
},
|
||||
{
|
||||
"%-dev$", "(development files)",
|
||||
"This package contains development files for "..
|
||||
|
|
@ -98,6 +102,9 @@ function add_gen_dep(pkgname, pkggenname)
|
|||
if no_gen_deps[pkgname] ~= nil then
|
||||
return false
|
||||
end
|
||||
if pkgname:match("%-lib$") ~= nil then
|
||||
return false
|
||||
end
|
||||
if pkggenname == "kernel" then
|
||||
return false
|
||||
end
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ main() {
|
|||
*-lib32)
|
||||
outname="${outname%%-lib32}"
|
||||
;;
|
||||
*-lib)
|
||||
outname="${outname%%-lib}"
|
||||
;;
|
||||
*-man)
|
||||
outname="${outname%%-man}"
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
comment = "Kerberos libraries"
|
||||
desc = <<EOD
|
||||
Libraries requires to run programs that use Kerberos.
|
||||
EOD
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
comment = "OpenSSL Libraries"
|
||||
desc = <<EOD
|
||||
OpenSSL Libraries
|
||||
EOD
|
||||
|
|
@ -9,7 +9,6 @@ CFLAGS+= -DOPENSSL_NO_SCTP
|
|||
.include <bsd.own.mk>
|
||||
.include <src.opts.mk>
|
||||
|
||||
PACKAGE= openssl-lib
|
||||
LIB= crypto
|
||||
SHLIB_MAJOR= 35
|
||||
VERSION_MAP= ${.CURDIR}/Version.map
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
.include <bsd.own.mk>
|
||||
|
||||
PACKAGE= openssl
|
||||
LIB_PACKAGE=
|
||||
|
||||
# OpenSSL version used for manual page generation
|
||||
.include "Makefile.version"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
PACKAGE?= openssl-lib
|
||||
PACKAGE?= openssl
|
||||
LIB_PACKAGE=
|
||||
|
||||
SHLIBDIR= ${LIBDIR}/engines-3
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
PACKAGE?= openssl-lib
|
||||
PACKAGE?= openssl
|
||||
LIB_PACKAGE=
|
||||
SHLIBDIR= ${LIBDIR}/ossl-modules
|
||||
|
||||
LCRYPTO_SRC= ${SRCTOP}/crypto/openssl
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
LIB= ssl
|
||||
SHLIB_MAJOR= 35
|
||||
VERSION_MAP= ${.CURDIR}/Version.map
|
||||
PACKAGE= openssl-lib
|
||||
|
||||
NO_LINT=
|
||||
|
||||
|
|
|
|||
|
|
@ -52,10 +52,30 @@ TAGS+= lib${_libcompat}
|
|||
|
||||
.if defined(NO_ROOT)
|
||||
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
|
||||
TAGS+= package=${PACKAGE:Uutilities}
|
||||
TAGS+= package=${PACKAGE:Uutilities}
|
||||
.endif
|
||||
|
||||
# By default, if PACKAGE=foo, then the native runtime libraries will go into
|
||||
# the FreeBSD-foo package, and subpackages will be created for -dev, -lib32,
|
||||
# and so on. If LIB_PACKAGE is set, then we also create a subpackage for
|
||||
# runtime libraries with a -lib suffix. This is used when a package has
|
||||
# libraries and some other content (e.g., executables) to allow consumers to
|
||||
# depend on the libraries.
|
||||
.if defined(LIB_PACKAGE) && ! ${TAGS:Mlib*}
|
||||
.if !defined(PACKAGE)
|
||||
.error LIB_PACKAGE cannot be used without PACKAGE
|
||||
.endif
|
||||
|
||||
LIB_TAG_ARGS= ${TAG_ARGS},lib
|
||||
.else
|
||||
LIB_TAG_ARGS= ${TAG_ARGS}
|
||||
.endif
|
||||
|
||||
TAG_ARGS= -T ${TAGS:ts,:[*]}
|
||||
.endif
|
||||
|
||||
DBG_TAG_ARGS= ${TAG_ARGS},dbg
|
||||
DEV_TAG_ARGS= ${TAG_ARGS},dev
|
||||
.endif # !defined(NO_ROOT)
|
||||
|
||||
# ELF hardening knobs
|
||||
.if ${MK_BIND_NOW} != "no"
|
||||
|
|
@ -355,7 +375,7 @@ _SHLINSTALLFLAGS:= ${_SHLINSTALLFLAGS${ie}}
|
|||
installpcfiles: installpcfiles-${pcfile}
|
||||
|
||||
installpcfiles-${pcfile}: ${pcfile}
|
||||
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${INSTALL} ${DEV_TAG_ARGS} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${_INSTALLFLAGS} \
|
||||
${.ALLSRC} ${DESTDIR}${LIBDATADIR}/pkgconfig/
|
||||
.endfor
|
||||
|
|
@ -367,37 +387,38 @@ realinstall: _libinstall installpcfiles _debuginstall
|
|||
.ORDER: beforeinstall _libinstall _debuginstall
|
||||
_libinstall:
|
||||
.if defined(LIB) && !empty(LIB) && ${MK_INSTALLLIB} != "no"
|
||||
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${INSTALL} ${DEV_TAG_ARGS} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${_INSTALLFLAGS} lib${LIB_PRIVATE}${LIB}${_STATICLIB_SUFFIX}.a ${DESTDIR}${_LIBDIR}/
|
||||
.endif
|
||||
.if defined(SHLIB_NAME)
|
||||
${INSTALL} ${TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${INSTALL} ${LIB_TAG_ARGS} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
|
||||
${SHLIB_NAME} ${DESTDIR}${_SHLIBDIR}/
|
||||
.if defined(SHLIB_LINK)
|
||||
.if commands(${SHLIB_LINK:R}.ld)
|
||||
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -S -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${INSTALL} ${DEV_TAG_ARGS} -S -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \
|
||||
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
|
||||
.for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS}
|
||||
${INSTALL_LIBSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS} ${SHLIB_LINK} \
|
||||
${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK}
|
||||
${INSTALL_LIBSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${LIB_TAG_ARGS} \
|
||||
${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK}
|
||||
.endfor
|
||||
.else
|
||||
.if ${_SHLIBDIR} == ${_LIBDIR}
|
||||
.if ${SHLIB_LINK:Mlib*}
|
||||
${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS:D${TAG_ARGS},dev} \
|
||||
${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${DEV_TAG_ARGS} \
|
||||
${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
|
||||
.else
|
||||
${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS} ${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
|
||||
${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${LIB_TAG_ARGS} \
|
||||
${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} \
|
||||
${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
|
||||
.endif
|
||||
.else
|
||||
.if ${SHLIB_LINK:Mlib*}
|
||||
${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS:D${TAG_ARGS},dev} \
|
||||
${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${DEV_TAG_ARGS} \
|
||||
${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
|
||||
.else
|
||||
${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${TAG_ARGS} \
|
||||
${INSTALL_RSYMLINK} ${_SHLINSTALLSYMLINKFLAGS} ${LIB_TAG_ARGS} \
|
||||
${DESTDIR}${_SHLIBDIR}/${SHLIB_NAME} ${DESTDIR}${_LIBDIR}/${SHLIB_LINK}
|
||||
.endif
|
||||
.if exists(${DESTDIR}${_LIBDIR}/${SHLIB_NAME})
|
||||
|
|
@ -409,7 +430,7 @@ _libinstall:
|
|||
.endif # SHLIB_LINK
|
||||
.endif # SHIB_NAME
|
||||
.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
|
||||
${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${INSTALL} ${DEV_TAG_ARGS} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
||||
${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/
|
||||
.endif
|
||||
.endif # !defined(INTERNALLIB)
|
||||
|
|
@ -429,7 +450,7 @@ LINKGRP?= ${LIBGRP}
|
|||
LINKMODE?= ${LIBMODE}
|
||||
SYMLINKOWN?= ${LIBOWN}
|
||||
SYMLINKGRP?= ${LIBGRP}
|
||||
LINKTAGS= dev
|
||||
LINKTAGS= dev${_COMPAT_TAG}
|
||||
.include <bsd.links.mk>
|
||||
|
||||
.if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue