From owner-freebsd-questions@freebsd.org Sun Apr 5 13:07:29 2020 Return-Path: Delivered-To: freebsd-questions@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 440702B6BB7; Sun, 5 Apr 2020 13:07:29 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 48wDTt4dWhz3M3p; Sun, 5 Apr 2020 13:07:14 +0000 (UTC) (envelope-from ruslanngaripov@gmail.com) Received: by mail-lf1-x130.google.com with SMTP id n20so9484879lfl.10; Sun, 05 Apr 2020 06:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=nthNStkpmxhl7eEbbWP1mv8Z/9W6UMC1sBnGDa198a0=; b=UvyDqiQIkibrsQE4e594cUWrSy6XTwUwXydbmnNKzjM9S59ekN1vZqT0N85L/0IQsx 2e9czENeSLCBPssyDu+Z/6xN/4CBZLPrqZdvU52cAtewUo7TSVOh+jRGL0M2v1k4cOEp vKeKkSr/fJo5Cv9ljaBXin6n8aUMhhd8KdUisAk6LY4zOkjIxKh1NzgBLUNxBnTZavME VSS7hlgdbjCzLtN1Dp7GcOHKG8DtJo2ZrlC4f+5eN7FUxtaH2aAjQ+2W3sBd4s1MPYMU IQ1JKCdgkzbyR/boWDiipJ9W/BFNdd3PxMtHfMrL50zIl43ohq1qEGRYNoRsQ05Cbpk6 Qt5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nthNStkpmxhl7eEbbWP1mv8Z/9W6UMC1sBnGDa198a0=; b=ThqyMGHA3rQEFqf+eG8xv3geS9eafFcXaA5R4oOSwGhd62zBteLr2EMTW+B2U6Lj4z WNkNX10K8FSo1Plf8n5HWongh4gEU8Sj0SmO38xBXW6tDLPUiZy9aLKBKXTlRYMg82OR 8PCtRbbBMoX24drVARrekh6MdbP3q1cykwNuwjNaaCp8AvYZekIO5FwpYKH8HIfeR8Dt i45U8VLrSTT5edoEgqNCyWoLsUMAlENRuqn/8rnvF9J1qJ9h4ZyOOEO1yMfGo0UJzUtL Ny7S4chTGkbbf2w/uCOB2q5Nsl61RH+3KoelwG3/eIWUhsWwpun5PpBAhXGGigKQRURz i20w== X-Gm-Message-State: AGi0PuZXLbm+YUA2O09EiCsu0Tfs1XmV39E+BgfX40+EHh6UAtOPCGdM MvjDoz7+GjETfDQXzXxtpVDFXpig X-Google-Smtp-Source: APiQypLKZ9ZCqYOWxEM1MxP1SGsXUfh2QPPom3qq67ooYViW0bppbI+OIReGbOfB3qgQDb9aqvd0Bw== X-Received: by 2002:ac2:57cb:: with SMTP id k11mr282446lfo.19.1586092024493; Sun, 05 Apr 2020 06:07:04 -0700 (PDT) Received: from [192.168.1.3] ([46.48.69.183]) by smtp.gmail.com with ESMTPSA id k18sm9596244lfg.81.2020.04.05.06.07.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Apr 2020 06:07:03 -0700 (PDT) Subject: Re: /usr/src/release/release.sh -> ports -> fetch pkg -> Bad system call (core dumped) To: Tomasz CEDRO , FreeBSD Questions Mailing List , FreeBSD Stable , freebsd-ports References: From: Ruslan Garipov Message-ID: Date: Sun, 5 Apr 2020 18:07:00 +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: 48wDTt4dWhz3M3p X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=UvyDqiQI; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ruslanngaripov@gmail.com designates 2a00:1450:4864:20::130 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]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(0.00)[ip: (-9.08), ipnet: 2a00:1450::/32(-2.36), asn: 15169(-0.43), country: US(-0.05)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; 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)[0.3.1.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]; 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)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Apr 2020 13:07:30 -0000 On 4/4/2020 7:50 PM, Tomasz CEDRO wrote: > Hello world :-) > > I would like to build a 12-STABLE (/usr/src contains > svn.freebsd.org/base/stable/12) locally on strong machine (24CPU 127GB > RAM 12-1-RELEASE AMD64), then test changes on my local machine > (panasonic toughbook i5 laptop 12.1-RELEASE AMD64). This will be used > for testing kernel patches and driver development/fixes. > > The goal is to have separate zroot/ROOT/stable to select and act as > the FreeBSD base. So far I have zroot/ROOT/default to use FreeBSD > 12.1-RELEASE. I would like to switch between those to on boot to have > one base system stable for working and another base system for testing > on real environment. > > I noticed that simple copy of /boot/kernel does not work on my target > machine. Thus I am trying to create a whole release, put a separate > system base, then on boot select different zfs container base to boot > from. I just love ZFS for that! I may even use snapshots to log and > rollback changes. > > Questions: > > 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]). > > 2. When that works, I would like to cross-compile for ARM in a similar > manner, then attach pyOCD + GDB to debug ARM target. I guess that > should work too as above? > > 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. > > ===> 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? > => Attempting to fetch > http://distcache.FreeBSD.org/ports-distfiles/freebsd-pkg-1.14.2_GH0.tar.gz > freebsd-pkg-1.14.2_GH0.tar.gz Bad system call (core dumped) > => Couldn't fetch it - please try to retrieve this > => port manually into /tmp/distfiles/ and try again. > *** Error code 1 > > Stop. > > Any hints and comments are welcome :-) > Tomek > [1] https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/small-lan.html