From owner-freebsd-current@freebsd.org Mon Aug 10 10:20:22 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FD2537D991 for ; Mon, 10 Aug 2020 10:20:22 +0000 (UTC) (envelope-from dclarke@blastwave.org) Received: from mail.oetec.com (mail.oetec.com [108.160.241.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.oetec.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BQBmh5WZjz456V for ; Mon, 10 Aug 2020 10:20:20 +0000 (UTC) (envelope-from dclarke@blastwave.org) X-Spam-Status: No X-oetec-MailScanner-From: dclarke@blastwave.org X-oetec-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-2.654, required 6, autolearn=not spam, ALL_TRUSTED -1.00, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, DKIM_VALID_EF -0.10, NICE_REPLY_A -1.46, URIBL_BLOCKED 0.00) X-oetec-MailScanner: Found to be clean X-oetec-MailScanner-ID: 07AAKF6R024351 X-oetec-MailScanner-Information: Please contact oetec for more information Received: from [172.16.35.2] (CPEac202e7325b3-CMac202e7325b0.cpe.net.cable.rogers.com [99.253.170.241]) (authenticated bits=0) by mail.oetec.com (8.15.2/8.15.2/Debian-8) with ESMTPSA id 07AAKF6R024351 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 10 Aug 2020 06:20:16 -0400 Subject: Re: To people upgrading from before r363679 To: freebsd-current@freebsd.org References: From: Dennis Clarke Message-ID: <0169058e-ec49-7ce0-c510-4fd071a239e8@blastwave.org> Date: Mon, 10 Aug 2020 10:20:14 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.0.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4BQBmh5WZjz456V X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.20 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[blastwave.org:s=default]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.97)[-0.965]; NEURAL_HAM_MEDIUM(-1.03)[-1.035]; DKIM_TRACE(0.00)[blastwave.org:+]; DMARC_POLICY_ALLOW(-0.50)[blastwave.org,quarantine]; NEURAL_HAM_SHORT(-0.20)[-0.204]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:812, ipnet:108.160.240.0/20, country:CA]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[99.253.170.241:received] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2020 10:20:22 -0000 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@triton:/usr/obj/usr/src/head/amd64.amd64/sys/GENERIC amd64 amd64 1300105 1300105 Dennis