From owner-freebsd-stable@freebsd.org Sun Apr 5 14:42:29 2020 Return-Path: Delivered-To: freebsd-stable@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 79DAC2B9614; Sun, 5 Apr 2020 14:42:29 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48wGbY6yC9z4SmY; Sun, 5 Apr 2020 14:42:17 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: by mail-ed1-x544.google.com with SMTP id e5so15666431edq.5; Sun, 05 Apr 2020 07:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UaiP1mSB6/S9l4si/4VRb4jkyuXzKqU2mMnHh+7FbV0=; b=BpUnvajM8dWCICAuCSr+tUIcmzUdTwTT61zUx2jNpZN2H/nWNDAcabOb6SPw8IHsC3 0VRS5DhBI37psMDmTJlExR1VGaw0Wah7tvNqM6K4SMlSOJKYmnEw8ZXWalbKHyk5+Zfx qW+Rj5dEZ31oEzXTqRiwFCBJeGIGLjrToAd9Bgt4Zi+jDgt1eFS4sMCUgJvbPpXRskwU iDD3fakNiAFkR3M27f+vnj0lhtz78whwmWdjUlzPymuxF004rh1a5jmoVnQRVEewBeIn 17Yuhk4AFBUb0d/rYKfCLoour9FeMqC0efBdYvRw9GIMiEtUxrL1ZRaXXX1/zNaPmIbr 02Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UaiP1mSB6/S9l4si/4VRb4jkyuXzKqU2mMnHh+7FbV0=; b=b7uHVVZt1hSHXzKRpG0aZuzBKYBuVElSPart1hLwXYpqdBE+mqK6u4vwdIB5N170K/ ti4QFTUKHubS4LDsNt99bQBKbDeUB3wAlbN7vj5vE2pxX9Xg9S4HAAYtTEYgeP1o2N8P WK3n5+rLuK8+tPf72ko0sfPGkFnK3dZKuewbig3Tvg2e/APSgkR9INXQhaMBfyr4B4i/ VU690nmDd1spx2fQwznwzbrmJ6gDh9ND5pGKThtJiprn+PQO8Cc1vLhuGUYh+9txZoKV bYxikYUWQmB9wzmtin8X0E9VJZkbZrGHXmU+noUHXLxEn3YQ9zGCuQuQEFhv8dsWULQy 0X8g== X-Gm-Message-State: AGi0PuZi26WDOqKhAMcXOYhi+d9RhGC88V/I+boVxJvPIyn8aHOqlpMj mL9q80ociyu5azY/jdaXljSfU9dX X-Google-Smtp-Source: APiQypIROjObsu7j7pWwsEn+stFehS3e42O+NFM8QAItVz3qSXipBXllFH5Yen5lEiJaqXSmmMW82w== X-Received: by 2002:a2e:8719:: with SMTP id m25mr9948438lji.76.1586097373660; Sun, 05 Apr 2020 07:36:13 -0700 (PDT) Received: from [192.168.1.3] ([46.48.69.183]) by smtp.gmail.com with ESMTPSA id p21sm8432782ljg.5.2020.04.05.07.36.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Apr 2020 07:36:13 -0700 (PDT) Subject: Re: /usr/src/release/release.sh -> ports -> fetch pkg -> Bad system call (core dumped) To: Tomasz CEDRO Cc: FreeBSD Questions Mailing List , FreeBSD Stable , freebsd-ports References: From: Ruslan Garipov Message-ID: <37aa12e6-7e26-9c4c-4f89-fa089f30ce1e@gmail.com> Date: Sun, 5 Apr 2020 19:36:11 +0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 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: 48wGbY6yC9z4SmY X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=BpUnvajM; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ruslanngaripov@gmail.com designates 2a00:1450:4864:20::544 as permitted sender) smtp.mailfrom=ruslanngaripov@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (0.34), ipnet: 2a00:1450::/32(-2.36), asn: 15169(-0.43), country: US(-0.05)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; DWL_DNSWL_FAIL(0.00)[gmail.com.dwl.dnswl.org:query timed out]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[4.4.5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE_FREEMAIL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2020 14:42:29 -0000 On 4/5/2020 6:52 PM, Tomasz CEDRO wrote: > Hello Ruslav and thank you for your feedback! :-) > > On Sun, Apr 5, 2020 at 3:07 PM Ruslan Garipov wrote: >> On 4/4/2020 7:50 PM, Tomasz CEDRO wrote: >>> 1. Is it a good build / testing environment? Maybe there is a simpler >>> / better way to cross compile binaries and test on another machine? >>> Both are using 12.1-RELEASE AMD64 installations so far. All /usr/local >>> should work both with 12.1-RELEASE and 12-STABLE right? >> Both machines have the same architecture, therefore it is not a cross >> build, I believe. For my direct builds (both build and consumer >> machines are x86-64) I use the procedure described in the handbook >> (``23.6. Tracking for Multiple Machines''[1]). > > I know that method, thank you :-) But I also want to try out the > binary release, which seems a bit more flexible to have just > everything in one place, may be used to install on an external machine > without NFS access, etc :-) > > It would be also nice to know the time cost of those two methods, so I > want to verify :-) > > >>> 3. During /usr/src/release/release.sh I get following error as pasted >>> below. Does release.sh update /usr/ports just as it snaps from svn or >>> it will use the /usr/porst that are just there and I need to provide >>> /usr/ports in a state that will be bindled into a /scratch release? >> A quote from release(7) man page: >> >> release.sh checks out the src/, ports/, and doc/ trees to CHROOTDIR... >> >> Therefore, release(7) "ignores" /usr/ports and uses >> ${CHROOTDIR}/usr/ports. My build machine doesn't have access to the >> Internet, therefore, I have to define the PORTS_UPDATE_SKIP variable and >> provide ports tree into the ${CHROOTDIR}/usr/ports before >> I will call /usr/src/release/release.sh. > > Okay, so the build uses totally separate CHROOT in /scratch? Yes. > I wonder > if that "Bad System Call" is caused by my Host tools or the CHROOT > tools? By the chrooted environment within the ${CHROOTDIR} I believe. Otherwise you would get the same error on "host". > > It looks like the /scratch has its own compiled in tools not a copy > from my host? Yes, release(7) builds and installs clean userland into the ${CHROOTDIR} (DESTDIR=${CHROOTDIR}), and doesn't copy it from the "host". > > # diff -u /usr/bin/fetch /scratch/usr/bin/fetch > Binary files /usr/bin/fetch and /scratch/usr/bin/fetch differ > > >>> ===> docproj-2.0_14 depends on file: /usr/local/sbin/pkg - not found >>> ===> License BSD2CLAUSE accepted by the user >>> ===> Fetching all distfiles required by pkg-1.14.2 for building >>> ===> Extracting for pkg-1.14.2 >>> ===> License BSD2CLAUSE accepted by the user >>> ===> Fetching all distfiles required by pkg-1.14.2 for building >>> => SHA256 Checksum mismatch for freebsd-pkg-1.14.2_GH0.tar.gz. >>> ===> Refetch for 1 more times files: freebsd-pkg-1.14.2_GH0.tar.gz >>> ===> License BSD2CLAUSE accepted by the user >>> => freebsd-pkg-1.14.2_GH0.tar.gz doesn't seem to exist in /tmp/distfiles/. >>> => Attempting to fetch >>> https://codeload.github.com/freebsd/pkg/tar.gz/1.14.2?dummy=/freebsd-pkg-1.14.2_GH0.tar.gz >>> freebsd-pkg-1.14.2_GH0.tar.gz Bad system call (core dumped) >> /usr/src/release/release.sh defines DISTDIR=/tmp/distfiles when it >> installs the textproc/docproj port or a port from the ${EMBEDDEDPORTS}. >> >> As for why fetch(1) fails with bad system call under chrooted >> environment -- I don't know. I failed on a port fetching only if I >> hadn't provided all necessary distfiles. You have checksum error >> message which is causing refetching of the ports-mgmt/pkg port. >> Therefore, I believe >> ${CHROOTDIR}/tmp/distfiles/freebsd-pkg-1.14.2_GH0.tar.gz exists on your >> file system (remained from a previous fetch try?)... May be you should >> try fetch(1) from the chrooted environment manually, to get any content? > > This "Bad System Call" stops me from proceeding. I did place by hand > the required package in the right place, then it built ok, then I got > that "Bad System Call" again on install :-( > > How can I get the debug symbols in /scratch binaries? You need to provide custom src.conf or/and make.conf to release(7). I, actually, provide make.conf, src.conf and kernel config (not for the debug symbols; just for tuning the target release). > > So far I can just show: > [New LWP 100764] > Core was generated by `/usr/bin/fetch -Fpr -S 3405355 > http://distcache.FreeBSD.org/ports-distfiles/free'. > Program terminated with signal SIGSYS, Bad system call. > #0 0x00000008003c1bca in ?? () > (gdb) bt > #0 0x00000008003c1bca in ?? () > #1 0x000000080031d144 in ?? () > #2 0x000000080031d260 in ?? () > #3 0x0000000000000008 in ?? () > #4 0xb650b69b3fd03fb8 in ?? () > #5 0x00007fffffffdd40 in ?? () > #6 0x00007fffffffe64c in ?? () > #7 0x0000000800e1d000 in ?? () > #8 0x00000000002091e0 in ?? () > #9 0x00007fffffffdc80 in ?? () > #10 0x00007fffffffdc40 in ?? () > #11 0x000000080031d2f9 in ?? () > #12 0x0000000800e1d000 in ?? () > #13 0x00007fffffffdd40 in ?? () > #14 0x0000000000000000 in ?? () > > > Thank you! :-) > Tomek >