To people upgrading from before r363679
Dennis Clarke
dclarke at blastwave.org
Mon Aug 10 10:20:22 UTC 2020
On 8/5/20 9:19 PM, Warner Losh wrote:
> If you are upgrading across r363679, you may have installworld fail, as
> documented in UPDATING.
>
> I have a fix (that requires a trip through buildworld) that's under review
> at https://reviews.freebsd.org/D25967 . The changes are likely good, but
> comments likely need updating.
>
> The short version is that we purposely use old libraries to install the
> system. We created a symbolic link to a bunch of binaries on the system and
> once installworld installs one of them, we get the error. The workaround
> works because we copy libc.so before doing the installworld, so now we're
> running with a new libc.so with new binaries, which works. My fix always
> copies and never symlinks. The symbolic link stuff is too fragile.
>
> With it, I've done one system, but I'd appreciate reports (on the code
> review if possible, to me in email if not) of people who have success
> upgrading with this. If you've already run installworld and hit the
> undefined symbol, it's too late for you to help me test (since re-running
> is the same as hitting to test is the same as the workaround and so it will
> work even if my workaround is busted).
>
> Some history: This was introduced about 2 years ago. Prior to that, we
> always copied binaries for the install.
This will fix the situation :
triton$
triton$ cat /usr/src/my.patch
--- Makefile.inc1.orig 2020-08-06 21:55:35.403116000 +0000
+++ Makefile.inc1 2020-08-07 04:51:05.259840000 +0000
@@ -2296,13 +2296,12 @@
.for _tool in ${_bootstrap_tools_links}
${_bt}-link-${_tool}: .PHONY .MAKE
- @if [ ! -e "${WORLDTMP}/legacy/bin/${_tool}" ]; then \
- source_path=`which ${_tool}`; \
- if [ ! -e "$${source_path}" ] ; then \
- echo "Cannot find host tool '${_tool}'"; false; \
- fi; \
- ln -sfnv "$${source_path}"
"${WORLDTMP}/legacy/bin/${_tool}"; \
- fi
+ @rm -f "${WORLDTMP}/legacy/bin/${_tool}"; \
+ source_path=`which ${_tool}`; \
+ if [ ! -e "$${source_path}" ] ; then \
+ echo "Cannot find host tool '${_tool}'"; false; \
+ fi; \
+ cp -f "$${source_path}" "${WORLDTMP}/legacy/bin/${_tool}"
${_bt}-links: ${_bt}-link-${_tool}
.endfor
--- tools/build/Makefile.orig 2020-08-06 21:55:35.416626000 +0000
+++ tools/build/Makefile 2020-08-07 04:49:09.064737000 +0000
@@ -119,26 +119,26 @@
host-symlinks:
@echo "Linking host tools into ${DESTDIR}/bin"
.for _tool in ${_host_tools_to_symlink}
- @if [ ! -e "${DESTDIR}/bin/${_tool}" ]; then \
- source_path=`which ${_tool}`; \
- if [ ! -e "$${source_path}" ] ; then \
- echo "Cannot find host tool '${_tool}'"; false; \
- fi; \
- ln -sfnv "$${source_path}" "${DESTDIR}/bin/${_tool}"; \
- fi
+ @source_path=`which ${_tool}`; \
+ if [ ! -e "$${source_path}" ] ; then \
+ echo "Cannot find host tool '${_tool}'"; false; \
+ fi; \
+ rm -f "${DESTDIR}/bin/${_tool}"; \
+ cp -f "$${source_path}" "${DESTDIR}/bin/${_tool}"
.endfor
.for _tool in ${_host_abs_tools_to_symlink}
@source_path="${_tool:S/:/ /:[1]}"; \
target_path="${DESTDIR}/bin/${_tool:S/:/ /:[2]}"; \
- if [ ! -e "$${target_path}" ] ; then \
- if [ ! -e "$${source_path}" ] ; then \
- echo "Host tool '${src_path}' is missing"; false; \
- fi; \
- ln -sfnv "$${source_path}" "$${target_path}"; \
- fi
+ if [ ! -e "$${source_path}" ] ; then \
+ echo "Host tool '${src_path}' is missing"; false; \
+ fi; \
+ rm -f "$${target_path}"; \
+ cp -f "$${source_path}" "$${target_path}"
.endfor
.if exists(/usr/libexec/flua)
ln -sf /usr/libexec/flua ${DESTDIR}/usr/libexec/flua
++ rm -f ${DESTDIR}/usr/libexec/flua
++ cp -f /usr/libexec/flua ${DESTDIR}/usr/libexec/flua
.endif
# Create all the directories that are needed during the legacy,
bootstrap-tools
triton$
triton$ uname -apKU
FreeBSD triton 13.0-CURRENT FreeBSD 13.0-CURRENT #2 r363997: Fri Aug 7
02:48:03 GMT 2020
root at triton:/usr/obj/usr/src/head/amd64.amd64/sys/GENERIC amd64 amd64
1300105 1300105
Dennis
More information about the freebsd-current
mailing list