mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
- Use misc/ldconfig_compat on 4.x and rc.d/ldconfig in {5,6}x, this change fix
rc.d script starting too late. With this, ldconfig run automaticaly on startup and doesn't need add compat{4,5}x_enable in rc.conf. No objection: freebsd-rc, portmgr
This commit is contained in:
parent
f6199f9c2d
commit
2211587f68
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=164701
11 changed files with 75 additions and 187 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= compat4x
|
||||
PORTVERSION= ${COMPAT4X_PORTVERSION}
|
||||
PORTREVISION= 8
|
||||
PORTREVISION= 9
|
||||
CATEGORIES= misc
|
||||
MASTER_SITES= ${COMPAT4X_MASTER_SITES}
|
||||
MASTER_SITE_SUBDIR= ${COMPAT4X_MASTER_SITE_SUBDIR}
|
||||
|
@ -20,29 +20,22 @@ COMMENT= A convenience package to install the compat4x libraries
|
|||
|
||||
WRKSRC= ${WRKDIR}/usr/lib/compat
|
||||
|
||||
TARGET_DIR= ${PREFIX}/lib/compat
|
||||
TARGET32_DIR= ${PREFIX}/lib32/compat
|
||||
|
||||
NO_BUILD= yes
|
||||
INSTALLS_SHLIB= yes
|
||||
LDCONFIG_DIRS= %%PREFIX%%/lib/compat
|
||||
TARGET_DIR= ${PREFIX}/lib/compat
|
||||
TARGET32_DIR= ${PREFIX}/lib32/compat
|
||||
LDCONFIG_LIB32= ${LDCONFIG} -32
|
||||
USE_LDCONFIG= ${TARGET_DIR}
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} > 700011
|
||||
USE_LDCONFIG= ${TARGET_DIR}
|
||||
PLIST_SUB+= USE_LDCONFIG=""
|
||||
.else
|
||||
NO_MTREE= yes
|
||||
USE_RC_SUBR= 000.${PORTNAME}.sh
|
||||
SUB_LIST+= LDCONFIG="${LDCONFIG}"
|
||||
PLIST_SUB+= USE_LDCONFIG="@comment "
|
||||
.endif
|
||||
|
||||
COMPAT4X_ARCH= ${ARCH}
|
||||
|
||||
.if ${OSVERSION} >= 600016
|
||||
RUN_DEPENDS= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/localedata
|
||||
RUN_DEPENDS+= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/localedata
|
||||
.endif
|
||||
|
||||
.if ${OSVERSION} >= 500000
|
||||
COMPAT4X_OSVERSION= 5.3
|
||||
PLIST= ${.CURDIR}/pkg-plist.freebsd5
|
||||
|
@ -90,19 +83,16 @@ PLIST_SUB+= I386_ONLY="@comment "
|
|||
.if ${ARCH} == amd64
|
||||
PLIST_SUB+= AMD64_ONLY="" AMD64NA="@comment "
|
||||
PLIST_SUB+= LDCONFIG_LIB32="${LDCONFIG} -32"
|
||||
.if defined(USE_RC_SUBR)
|
||||
SUB_LIST+= AMD64="" TARGET32_DIR="${TARGET32_DIR}"
|
||||
.endif
|
||||
USE_LDCONFIG32= ${TARGET32_DIR}
|
||||
.undef USE_LDCONFIG
|
||||
INSTALLS_SHLIB= no
|
||||
.else
|
||||
PLIST_SUB+= AMD64_ONLY="@comment " AMD64NA=""
|
||||
.if defined(USE_RC_SUBR)
|
||||
SUB_LIST+= AMD64="@comment "
|
||||
.endif
|
||||
.endif
|
||||
|
||||
OPENSSL_LIBS= libcrypto.so.1 libcrypto.so.2 libssl.so.1 libssl.so.2
|
||||
.if defined(FORCE_VULNERABLE_OPENSSL)
|
||||
FORBIDDEN= "FreeBSD-SA-02:33.openssl, FreeBSD-SA-03:02.openssl, FreeBSD-SA-03:18.openssl - OpenSSL contains multiple vulnerabilities"
|
||||
FORBIDDEN= FreeBSD-SA-02:33.openssl, FreeBSD-SA-03:02.openssl, FreeBSD-SA-03:18.openssl - OpenSSL contains multiple vulnerabilities
|
||||
|
||||
PLIST_SUB+= FORBIDDEN:=""
|
||||
.else
|
||||
|
@ -116,8 +106,8 @@ COMPAT4X_PORTVERSION= ${COMPAT4X_OSVERSION}.${COMPAT4X_OSRELDATE}
|
|||
COMPAT4X_MASTER_SITES= ftp://current.FreeBSD.org/pub/FreeBSD/%SUBDIR%/
|
||||
COMPAT4X_MASTER_SITE_SUBDIR= snapshots/${COMPAT4X_ARCH}/${COMPAT4X_OSVERSION}-${COMPAT4X_OSBRANCH}-${COMPAT4X_OSRELDATE}-JPSNAP/${PORTNAME}
|
||||
.elif ${COMPAT4X_OSVERSION} == "5.3"
|
||||
COMPAT4X_PORTVERSION= ${COMPAT4X_OSVERSION}
|
||||
COMPAT4X_MASTER_SITES= ${MASTER_SITE_LOCAL}
|
||||
COMPAT4X_PORTVERSION= ${COMPAT4X_OSVERSION}
|
||||
COMPAT4X_MASTER_SITES= ${MASTER_SITE_LOCAL}
|
||||
COMPAT4X_MASTER_SITE_SUBDIR= kris/${COMPAT4X_ARCH}
|
||||
.else
|
||||
COMPAT4X_PORTVERSION= ${COMPAT4X_OSVERSION}
|
||||
|
@ -126,55 +116,35 @@ COMPAT4X_MASTER_SITE_SUBDIR= releases/${COMPAT4X_ARCH}/${COMPAT4X_OSVERSION}-REL
|
|||
.endif
|
||||
|
||||
do-extract:
|
||||
${MKDIR} ${WRKDIR}
|
||||
cd ${DISTDIR}/${DIST_SUBDIR} && ${CAT} ${DISTFILES} | ${TAR} -xzf - -C ${WRKDIR}
|
||||
@${MKDIR} ${WRKDIR}
|
||||
@(cd ${DISTDIR}/${DIST_SUBDIR} && ${CAT} ${DISTFILES} | ${TAR} -xzf - -C ${WRKDIR} )
|
||||
.if ${OSVERSION} >= 500000
|
||||
.for lib in ${FREEBSD4_LIBS}
|
||||
${MV} ${WRKSRC}/${lib} ${WRKSRC}/${lib}.compat4x
|
||||
@${MV} ${WRKSRC}/${lib} ${WRKSRC}/${lib}.compat4x
|
||||
.endfor
|
||||
.endif
|
||||
.if !defined(FORCE_VULNERABLE_OPENSSL)
|
||||
.for lib in ${OPENSSL_LIBS}
|
||||
${RM} -f ${WRKSRC}/${lib}
|
||||
@${RM} -f ${WRKSRC}/${lib}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
.if defined(USE_RC_SUBR)
|
||||
@( ${ECHO} ""; \
|
||||
${ECHO} "******************************************************"; \
|
||||
${ECHO} "To enable the ldconfig of these libraries at boot time"; \
|
||||
${ECHO} "you need to add compat4x_enable=\"yes\" to either"; \
|
||||
${ECHO} "/etc/rc.conf.local or /etc/rc.conf"; \
|
||||
${ECHO} "******************************************************"; \
|
||||
${ECHO} ""; ) > ${WRKDIR}/pkg-message
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
.endif
|
||||
|
||||
NO_BUILD= yes
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${TARGET_DIR}
|
||||
@${MKDIR} ${TARGET_DIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/* ${TARGET_DIR}/
|
||||
.if ${OSVERSION} >= 500000
|
||||
.for lib in ${FREEBSD4_LIBS}
|
||||
${LN} -sf ${lib}.compat4x ${TARGET_DIR}/${lib}
|
||||
.endfor
|
||||
.endif
|
||||
|
||||
# Include to automatic install file in libdata/ldconfig{,32}
|
||||
.include "${PORTSDIR}/misc/ldconfig_compat/bsd.ldconfig.mk"
|
||||
|
||||
post-install: install-ldconfig-file
|
||||
.if ${ARCH} == amd64
|
||||
${LDCONFIG} -32 -m ${TARGET32_DIR}
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
@${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
|
||||
.if defined(USE_LDCONFIG)
|
||||
.if ${ARCH} == amd64
|
||||
@${ECHO} ${TARGET32_DIR} > ${PREFIX}/libdata/ldconfig32/${UNIQUENAME}
|
||||
.else
|
||||
@${ECHO} ${USE_LDCONFIG} > ${PREFIX}/libdata/ldconfig/${UNIQUENAME}
|
||||
.endif
|
||||
.else
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: compat4x
|
||||
# REQUIRE: ldconfig
|
||||
#
|
||||
# Add the following to /etc/rc.conf[.local] to enable this service
|
||||
#
|
||||
# compat4x_enable="YES"
|
||||
#
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name=compat4x
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
command=%%LDCONFIG%%
|
||||
command_args='-m %%PREFIX%%/lib/compat'
|
||||
%%AMD64%%
|
||||
%%AMD64%%start_postcmd=${name}_poststart
|
||||
%%AMD64%%compat4x_poststart () {
|
||||
%%AMD64%% %%LDCONFIG%% -32 -m %%TARGET32_DIR%%
|
||||
%%AMD64%%}
|
||||
|
||||
load_rc_config ${name}
|
||||
run_rc_command "$1"
|
|
@ -1,11 +1,12 @@
|
|||
This package allows you to install the compat4x libraries on your
|
||||
system, so you can use legacy binaries that depend on them.
|
||||
|
||||
Usage example:
|
||||
Ports usage example:
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} >= 500000
|
||||
LIB_DEPENDS+= c.4:${PORTSDIR}/misc/compat4x
|
||||
.endif
|
||||
--
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} >= 500000
|
||||
LIB_DEPENDS+= c.4:${PORTSDIR}/misc/compat4x
|
||||
.endif
|
||||
--
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
case $2 in
|
||||
POST-INSTALL)
|
||||
echo ""
|
||||
echo "*******************************************************************************"
|
||||
echo "* *"
|
||||
echo "* Do not forget to add COMPAT_FREEBSD4 into *"
|
||||
echo "* your kernel configuration (enabled by default). *"
|
||||
echo "* *"
|
||||
echo "* To configure and recompile your kernel see: *"
|
||||
echo "* http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html *"
|
||||
echo "* *"
|
||||
echo "*******************************************************************************"
|
||||
echo ""
|
||||
;;
|
||||
esac
|
9
misc/compat4x/pkg-message
Normal file
9
misc/compat4x/pkg-message
Normal file
|
@ -0,0 +1,9 @@
|
|||
*******************************************************************************
|
||||
* *
|
||||
* Do not forget to add COMPAT_FREEBSD4 into *
|
||||
* your kernel configuration (enabled by default). *
|
||||
* *
|
||||
* To configure and recompile your kernel see: *
|
||||
* http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html *
|
||||
* *
|
||||
*******************************************************************************
|
|
@ -37,8 +37,6 @@
|
|||
%%LIBDIR%%/compat/pam_ssh.so
|
||||
%%LIBDIR%%/compat/pam_tacplus.so
|
||||
%%LIBDIR%%/compat/pam_unix.so
|
||||
%%USE_LDCONFIG%%%%AMD64NA%%libdata/ldconfig/compat4x
|
||||
%%USE_LDCONFIG%%%%AMD64_ONLY%%libdata/ldconfig32/compat4x
|
||||
%%AMD64_ONLY%%@exec %%LDCONFIG_LIB32%% -m %D/%%LIBDIR%%/compat
|
||||
@dirrmtry %%LIBDIR%%/compat
|
||||
@comment Hardcode lib32 since we should not remove lib.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
PORTNAME= compat5x
|
||||
PORTVERSION= 5.4.0.8
|
||||
PORTREVISION= 6
|
||||
PORTREVISION= 7
|
||||
CATEGORIES= misc
|
||||
MASTER_SITES= ${MASTER_SITE_LOCAL}
|
||||
MASTER_SITE_SUBDIR=lesi/compat5x
|
||||
|
@ -21,32 +21,25 @@ DISTNAME= ${PORTNAME}-${ARCH}-${PORTVERSION}
|
|||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= A convenience package to install the compat5x libraries
|
||||
|
||||
ONLY_FOR_ARCHS= alpha amd64 i386 sparc64
|
||||
USE_BZIP2= yes
|
||||
WRKSRC= ${WRKDIR}/${PORTNAME}
|
||||
|
||||
USE_BZIP2= yes
|
||||
NO_BUILD= yes
|
||||
ONLY_FOR_ARCHS= alpha amd64 i386 sparc64
|
||||
INSTALLS_SHLIB= yes
|
||||
LDCONFIG_DIRS= %%PREFIX%%/lib/compat
|
||||
TARGET_DIR= ${PREFIX}/lib/compat
|
||||
TARGET32_DIR= ${PREFIX}/lib32/compat
|
||||
USE_LDCONFIG= ${TARGET_DIR}
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} < 600000
|
||||
IGNORE= is for FreeBSD 6.x and newer
|
||||
.endif
|
||||
|
||||
.if ${OSVERSION} > 700011 || (${OSVERSION} < 700000 && ${OSVERSION} >= 600104)
|
||||
USE_LDCONFIG= ${TARGET_DIR}
|
||||
PLIST_SUB+= USE_LDCONFIG=""
|
||||
.else
|
||||
NO_MTREE= yes
|
||||
USE_RC_SUBR= 000.${PORTNAME}.sh
|
||||
SUB_LIST+= LDCONFIG="${LDCONFIG}"
|
||||
PLIST_SUB+= USE_LDCONFIG="@comment "
|
||||
IGNORE= is for FreeBSD 6.x and newer
|
||||
.endif
|
||||
|
||||
.if ${OSVERSION} >= 600016
|
||||
RUN_DEPENDS= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/localedata
|
||||
RUN_DEPENDS+= ${LOCALBASE}/share/compat/locale/UTF-8/LC_CTYPE:${PORTSDIR}/misc/localedata
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == alpha
|
||||
|
@ -54,60 +47,42 @@ PLIST_SUB+= ALPHA=""
|
|||
.else
|
||||
PLIST_SUB+= ALPHA="@comment "
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == amd64
|
||||
PLIST_SUB+= AMD64=""
|
||||
PLIST_SUB+= LDCONFIG_LIB32="${LDCONFIG} -32"
|
||||
.if defined(USE_RC_SUBR)
|
||||
SUB_LIST+= AMD64="" TARGET32_DIR="${TARGET32_DIR}"
|
||||
.endif
|
||||
USE_LDCONFIG32= ${TARGET32_DIR}
|
||||
.else
|
||||
PLIST_SUB+= AMD64="@comment "
|
||||
.if defined(USE_RC_SUBR)
|
||||
SUB_LIST+= AMD64="@comment "
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == i386
|
||||
PLIST_SUB+= I386=""
|
||||
.else
|
||||
PLIST_SUB+= I386="@comment "
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == sparc64
|
||||
PLIST_SUB+= SPARC64=""
|
||||
.else
|
||||
PLIST_SUB+= SPARC64="@comment "
|
||||
.endif
|
||||
|
||||
post-extract:
|
||||
.if defined(USE_RC_SUBR)
|
||||
@( ${ECHO} ""; \
|
||||
${ECHO} "******************************************************"; \
|
||||
${ECHO} "To enable the ldconfig of these libraries at boot time"; \
|
||||
${ECHO} "you need to add compat5x_enable=\"yes\" to either"; \
|
||||
${ECHO} "/etc/rc.conf.local or /etc/rc.conf"; \
|
||||
${ECHO} "******************************************************"; \
|
||||
${ECHO} ""; ) > ${WRKDIR}/pkg-message
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
.endif
|
||||
|
||||
NO_BUILD= yes
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${TARGET_DIR}
|
||||
@${MKDIR} ${TARGET_DIR}
|
||||
(cd ${WRKSRC} && ${INSTALL_DATA} *.so.* ${TARGET_DIR})
|
||||
.if ${ARCH} == amd64
|
||||
${MKDIR} ${TARGET32_DIR}
|
||||
@${MKDIR} ${TARGET32_DIR}
|
||||
(cd ${WRKSRC}/lib32 && ${INSTALL_DATA} *.so.* ${TARGET32_DIR})
|
||||
${LDCONFIG} -32 -m ${TARGET32_DIR}
|
||||
.endif
|
||||
|
||||
post-install:
|
||||
.if defined(USE_LDCONFIG)
|
||||
@${ECHO} ${USE_LDCONFIG} > ${PREFIX}/libdata/ldconfig/${UNIQUENAME}
|
||||
# Include to automatic install file in libdata/ldconfig{,32}
|
||||
.include "${PORTSDIR}/misc/ldconfig_compat/bsd.ldconfig.mk"
|
||||
|
||||
post-install: install-ldconfig-file
|
||||
.if ${ARCH} == amd64
|
||||
@${ECHO} ${TARGET32_DIR} > ${PREFIX}/libdata/ldconfig32/${UNIQUENAME}
|
||||
@${LDCONFIG} -32 -m ${TARGET32_DIR}
|
||||
.endif
|
||||
.else
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: compat5x
|
||||
# REQUIRE: ldconfig
|
||||
#
|
||||
# Add the following to /etc/rc.conf[.local] to enable this service
|
||||
#
|
||||
# compat5x_enable="YES"
|
||||
#
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name=compat5x
|
||||
rcvar=`set_rcvar`
|
||||
|
||||
command=%%LDCONFIG%%
|
||||
command_args='-m %%PREFIX%%/lib/compat'
|
||||
%%AMD64%%
|
||||
%%AMD64%%start_postcmd=${name}_poststart
|
||||
%%AMD64%%compat5x_poststart () {
|
||||
%%AMD64%% %%LDCONFIG%% -32 -m %%TARGET32_DIR%%
|
||||
%%AMD64%%}
|
||||
|
||||
load_rc_config ${name}
|
||||
run_rc_command "$1"
|
|
@ -1,10 +1,12 @@
|
|||
This package allows you to install the compat5x libraries on your
|
||||
system, so you can use legacy binaries that depend on them.
|
||||
|
||||
Usage example:
|
||||
Ports usage example:
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
--
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} >= 600000
|
||||
LIB_DEPENDS+= c.5:${PORTSDIR}/misc/compat5x
|
||||
.endif
|
||||
.if ${OSVERSION} >= 600000
|
||||
LIB_DEPENDS+= c.5:${PORTSDIR}/misc/compat5x
|
||||
.endif
|
||||
--
|
||||
|
|
9
misc/compat5x/pkg-message
Normal file
9
misc/compat5x/pkg-message
Normal file
|
@ -0,0 +1,9 @@
|
|||
*******************************************************************************
|
||||
* *
|
||||
* Do not forget to add COMPAT_FREEBSD5 into *
|
||||
* your kernel configuration (enabled by default). *
|
||||
* *
|
||||
* To configure and recompile your kernel see: *
|
||||
* http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html *
|
||||
* *
|
||||
*******************************************************************************
|
|
@ -107,8 +107,6 @@ lib/compat/pam_unix.so.2
|
|||
lib/compat/snmp_atm.so.2
|
||||
lib/compat/snmp_mibII.so.2
|
||||
lib/compat/snmp_netgraph.so.2
|
||||
%%USE_LDCONFIG%%libdata/ldconfig/compat5x
|
||||
%%USE_LDCONFIG%%%%AMD64%%libdata/ldconfig32/compat5x
|
||||
%%AMD64%%lib32/compat/libalias.so.4
|
||||
%%AMD64%%lib32/compat/libarchive.so.1
|
||||
%%AMD64%%lib32/compat/libatm.so.2
|
||||
|
|
Loading…
Add table
Reference in a new issue