Re: [9fans] /usr/src and /usr/ports not git directories ?
- In reply to: Mark Millard : "Re: [9fans] /usr/src and /usr/ports not git directories ?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 24 Jan 2025 03:52:53 UTC
> On Jan 23, 2025, at 7:30 PM, Mark Millard <marklmi@yahoo.com> wrote: > > Bakul Shah <bakul_at_iitbombay.org> wrote on > Date: Fri, 24 Jan 2025 00:15:04 UTC : > >> [-9fans, +freebsd-current as 9fans adds a reply-to: 9fans line] >> >>> On Jan 23, 2025, at 3:53 PM, Warner Losh <imp@bsdimp.com> wrote: >>> >>> I fail to see how putting code in the kernel is better than just using got for the few people that are alergic to git. Even if it is only 1000 lines in plan 9, but likely more in FreeBSD and by the way not yet ported to FreeBSD. We know got can't crash the system and is small enough to not matter, even if it isn't in the base today. >> >> >> May I suggest: >> - always ship the *commit hash* for any release or snapshot with its base.txz > > For stable/* and main builds via PkgBase: > > I'll note that, for PkgBase, the commit hashes for the "base" vs. the "kernel" > need not be identical from what I've seen. In other words, the separate > packages for /usr/src/sys/ vs. for the rest of /usr/src/ need not be > based on the exact-same commit hash. News to me. Since there is one repo for /usr/src and /usr/src/sys, this would mess things up. Why have more or less two identical repos. In the quick hack script below I assume one. This will need more work, this was just a PoC to show what I mean. For an existing local repo the script can be enhanced to fetch to a later commit hash (or one can just use git). #!/bin/sh cmd=`basename $0` case .$2 in .) echo Usage: $cmd url commit-hash; exit 1;; esac if [ -e .git ]; then echo $cmd: .git already exists; exit 1; fi # check if there are any other files if [ ! -z "$(ls -A)" ] ; then echo $cmd: directory must be empty exit 1 fi git init git remote add origin $1 git fetch --depth=1 origin $2 || exit 1 git checkout FETCH_HEAD > > Releases avoid that via the explicit control of when the releng/*.* content is > updated: no update happens between and teh result happens to always match > because of that (if I understand right). > > This seems to be something new for any official FreeBSD builds of stable/* and > main . > >> - src.txz as now (or add commit hash) > > See above if a stable/* or main context might involve PkgBase > build instead. > >> - this is enough to download a repo (1-deep or whatever), bare if src.txz was also unpacked. >> - add a simple script to download as above. >> - people can install whatever git client they want for further work. >> >> git9 doesn't require any kernel code but on freebsd you'd have to >> use plan9port. It is far simpler but has a different interface. > > === > Mark Millard > marklmi at yahoo.com >