From owner-freebsd-current@freebsd.org Mon Jan 25 18:55:34 2021 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 7B7404EC94A for ; Mon, 25 Jan 2021 18:55:34 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82d.google.com (mail-qt1-x82d.google.com [IPv6:2607:f8b0:4864:20::82d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4DPfFd5Nr1z4rDW for ; Mon, 25 Jan 2021 18:55:33 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82d.google.com with SMTP id r9so10436541qtp.11 for ; Mon, 25 Jan 2021 10:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E1/LIzk/FMTtNO3VVyCnppti2O59ZyXvetqs52UCV8Q=; b=ELMPibNltGphGOqHwxYtrMsWHzaUioyKo4faEXOySSEEfRNIhagJD6gu5xFMZ4TlHn uhEeYaKLcAo+MyUsbao6z3w/R3ZYSXidy3xnPrd77g5u5MjtVfrZwdnt91gCvS3ZlRq7 k/QOe8lLu3UuVMpLQ0HsSKQ8jxyPm6R4i2mwvDAPl3Qz5SoM7zwN/8v8QErb8jjLkN+L uhnZvvERSMV00BWGEvOBzQgl0l7QVwUAU08xwLpfhutXJY2019D7+ySH1F9xeVYC9XoE g+uwRnEnwltrUPPSk9lJ6e8lhP/ezMdFESwlDH37qjlv845k+gBpybvx+B/txbs1VInG fySw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E1/LIzk/FMTtNO3VVyCnppti2O59ZyXvetqs52UCV8Q=; b=ktW4IXTTm9YB0wl7KtEGnAwJ2va7PA7rcV/Ezn/VULBn9i9mD/i8ukbcObw7zIFQlo 6fBmj48EBqq+8C7ELwHufvLDvH6/sx0ZuJmT0GNXULfc2QgVJeHRbu0eRCX2mDUuuh4Y 56j/G/YWJsrsBTfULJxoWMq53w2xj9GoS4n5UxKmU/vlEVcoJxn6zSxFTabXi2c5sD+u ySntC6l55SO7eJ7g17oslJWT2ldHaTio6Zp02Xud4cAEB0nCQk/N+qSpPJZ+RkrJdjjr l7kXV6Yb9azLCpc1viYJwFn3SXmpxZg3GcM3QmaVzGjiFe6yl9/heQmcsgTDfbq6tVrA x/hw== X-Gm-Message-State: AOAM531kBZm+aPZsUkGO3HJv1j40D/JlGevunFEjIvl17t9ke+lPBxux FUCWOkDXrv6qK/JcjZNZlEMMrpjYi40clAEChdIIXCzHfMqpC0yt X-Google-Smtp-Source: ABdhPJyAuLW48qMSQPmzxd94maZ8Z1+OTsU7Ax3roorszMuxM2vNzBwVJw3gN8DGPBECDxXCDZt++GMeH5+qYDbk61c= X-Received: by 2002:a05:622a:303:: with SMTP id q3mr1805163qtw.235.1611600932957; Mon, 25 Jan 2021 10:55:32 -0800 (PST) MIME-Version: 1.0 References: <77a956396fd05d21ccd23d865fca9c6f@bsdforge.com> <20210126.031127.811432923528445023.yasu@utahime.org> In-Reply-To: <20210126.031127.811432923528445023.yasu@utahime.org> From: Warner Losh Date: Mon, 25 Jan 2021 11:55:22 -0700 Message-ID: Subject: Re: using git to get a particular version of src To: Yasuhiro Kimura Cc: FreeBSD Current X-Rspamd-Queue-Id: 4DPfFd5Nr1z4rDW X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=ELMPibNl; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::82d) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::82d:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82d:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::82d:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[freebsd-current]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 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, 25 Jan 2021 18:55:34 -0000 On Mon, Jan 25, 2021 at 11:11 AM Yasuhiro Kimura wrote: > From: Chris > Subject: Re: using git to get a particular version of src > Date: Mon, 25 Jan 2021 09:21:44 -0800 > > >> Hi, > >> I have this version installed: > >> 13.0-CURRENT #0 2ed50808d2b-c254384(main): Thu Nov 12 10:03:35 UTC > >> 2020 > >> I'd like to get the sources for this (want to make a no-debug kernel) > >> as I know > >> this version works on this hardware. > >> But -current has gone to 14 and what was -current is now > >> 13-stable. What git > >> incantation is required to get 2ed50808d2b-c254384 sources, given an > >> empty > >> /usr/src and git method of ssh://anongit@git.freebsd.org ? > > I am by *no* means a GIT expert > > but will > > cd /usr/src > > git up 2ed50808d2b > > accomplish your intended task? > > Unfortunately it doesn't work as is expected in this case because hashes > of src repostory changed on Dec 6 when it was still beta. > > HEADS UP: src hashes will respin/change this Sunday > https://lists.freebsd.org/pipermail/freebsd-git/2020-December/000548.html > > In original case it was after this change so hash value can be used to > checkout it. But this case is befere hash change. So there isn't hash > 2ed50808d2b in current src repository any more. > > I also faced this problem when I tried to checkout source tree that > corresponds to 20201119 snapshot of 13-CURRENT. Fortunately I still > kept ISO image of it. So I did following steps to get the source tree. > > 1. Mount the ISO image > 2. Extract src.txz in the ISO image to somewhere (e.g. /tmp/usr/src) > 3. cd /usr > 4. git clone https://git.freebsd.org/src.git > 5. cd src > 6. Checkout 65c207758a9 that was committed at Thu Nov 19 21:10:36 > 2020 +0000 (the last one committed on Nov 19, 2020) > 7. diff -ru /tmp/usr/src /usr/src > 8. If there are any differences, checkout f9fe7b28bc2 that is just > previous commit of 65c207758a9 > 9. Repeat step 7 and 8 until there is no difference between > /tmp/usr/src and /usr/src. > We should see how hard it would be to convert c254384 into a git hash... So, for me: % git describe vendor/tzdata/tzdata2020f-255971-gfa6662b3689e (so my tip of main is 255971 vs 254384 or +1587) % git log -1 main~1587 commit dda1987fe5dbf418b55195990896b0ef0a5b8e4a Author: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Tue Nov 17 12:04:29 2020 +0000 Add an example for the -s flag which is a little late. If you checked out the source and built it ASAP, then I'd suggest: commit f14436adc61a52b29d035791c0b90c0b221bea9a Author: Hans Petter Selasky Date: Thu Nov 12 09:26:01 2020 +0000 Add a tunable sysctl, hw.usb.uaudio.handle_hid, to allow disabling the the HID volume keys support in the USB audio driver. which is the version just before that. Or if you installed from a snapshot and rebuilt, The 20201112 snapshot was likely built from commit 38033780a3f4ed616d638fc0e9ef9a4d309f1fb3 Author: Kyle Evans Date: Wed Nov 11 22:35:23 2020 +0000 umtx: drop incorrect timespec32 definition Warner