Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

It's always sad when the fleas leave, because that means your dog is dead. -- Wesley T. Williams


devel / comp.unix.bsd.freebsd.misc / Re: using git for FreeBSD programs

SubjectAuthor
* using git for FreeBSD programsWinston
`* Re: using git for FreeBSD programsLowell Gilbert
 +* Re: using git for FreeBSD programsWinston
 |`* Re: using git for FreeBSD programsWinston
 | +* Re: using git for FreeBSD programsLowell Gilbert
 | |`- Re: using git for FreeBSD programsWinston
 | `- Re: using git for FreeBSD programsChristian Weisgerber
 `* Re: using git for FreeBSD programsDaveG
  `* Re: using git for FreeBSD programsChristian Weisgerber
   +* Re: using git for FreeBSD programsDrew Lawson
   |+- Re: using git for FreeBSD programsAlastair Hogge
   |`* Re: using git for FreeBSD programsJesse Rehmer
   | +- Re: using git for FreeBSD programsJesse Rehmer
   | `* Re: using git for FreeBSD programsAndreas Kempe
   |  `- Re: using git for FreeBSD programsAndreas Kempe
   `- Re: using git for FreeBSD programsDetlef Sax

1
using git for FreeBSD programs

<ydjzp2vfcz.fsf@UBEblock.psr.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=522&group=comp.unix.bsd.freebsd.misc#522

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wbe...@UBEBLOCK.psr.com.invalid (Winston)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: using git for FreeBSD programs
Date: Mon, 25 Dec 2023 03:46:52 -0500
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <ydjzp2vfcz.fsf@UBEblock.psr.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="ee9a6b09c3e7742aecadc8b4bc22a6bf";
logging-data="3152115"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lyIRDxMqu3y103ulH6qfy"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:JBrfeWJNDA1RIeEN1TzWtXQZWXw=
sha1:GP2FGj7cP9mdCm4M4MBXvzaVktE=
Mail-Copies-To: never
 by: Winston - Mon, 25 Dec 2023 08:46 UTC

(I've never had occasion to use git.)

After installing git,

1) What should I read to learn how to "check out" (obtain) the source
for some particular piece of software from git.freebsd.org?

2) When the code is part of a larger work, such as one particular X11
driver, will I ultimately have to build all of X11 just to build the
one driver, or can I build just the driver using the
already-installed X11 include files and libraries?

3) Do the source files obtained by git normally go in /usr/ports/, or
does location not matter?

TIA,
-WBE

Re: using git for FreeBSD programs

<44le9gli4q.fsf@be-well.ilk.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=526&group=comp.unix.bsd.freebsd.misc#526

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lguse...@be-well.ilk.org (Lowell Gilbert)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Tue, 26 Dec 2023 17:21:41 -0500
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <44le9gli4q.fsf@be-well.ilk.org>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="d1d3edb9a343cabdd359c013a72017cb";
logging-data="3819523"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wQmfVUuFWMSfhXRS8qqAC"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:5hM8+n9I/bnsCn3/Q/EqnlXVfKc=
sha1:NiD4YBJOmRhHuip9OjdMG1eqHbM=
 by: Lowell Gilbert - Tue, 26 Dec 2023 22:21 UTC

Winston <wbe@UBEBLOCK.psr.com.invalid> writes:

> (I've never had occasion to use git.)

That's fine. You don't seem to be a developer, so I don't see why you
would have.

> After installing git,
>
> 1) What should I read to learn how to "check out" (obtain) the source
> for some particular piece of software from git.freebsd.org?

Check out the "Running Git" chapter of the appendices to the FreeBSD
Handbook.

> 2) When the code is part of a larger work, such as one particular X11
> driver, will I ultimately have to build all of X11 just to build the
> one driver, or can I build just the driver using the
> already-installed X11 include files and libraries?

So you want to build a particular port locally, and you have other ports
already installed by some other means, such as pkg. You absolutely do
not need to rebuild everything you already have installed; there are
some caveats (one such being that you will likely be building from a
later version of the ports tree than were the packages you already have
installed), but it will in general just work.

> 3) Do the source files obtained by git normally go in /usr/ports/, or
> does location not matter?

If you are checking out the ports tree, they will normally go in
/usr/ports, but you can put them anywhere you want. If you put it
elsewhere you may need to set the PORTSDIR variable (defined in
${PORTSDIR}/Mk/bsd.port.mk) when working with that tree.

If you already have something in /usr/ports, such as from portsnap, then
consider using the same method to do your upgrades. If not, you might as
well go ahead and put your new ports tree there.

My guess is that you want to compile a driver with options different
than the ones that the standard pkg repositories use. If that is the
case, you will be able to set those options when you build the port; but
bear in mind that your system may still need to build a lot of other
things first -- things that are not needed to run the driver, but are
needed to build it.

Good luck.
--
Lowell Gilbert, embedded/networking software engineer
http://be-well.ilk.org/~lowell/

Re: using git for FreeBSD programs

<ydfrzouomv.fsf@UBEblock.psr.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=527&group=comp.unix.bsd.freebsd.misc#527

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wbe...@UBEBLOCK.psr.com.invalid (Winston)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Wed, 27 Dec 2023 01:48:40 -0500
Organization: A noiseless patient Spider
Lines: 77
Message-ID: <ydfrzouomv.fsf@UBEblock.psr.com>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com> <44le9gli4q.fsf@be-well.ilk.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="7916a565128bd75243725b54d4c26f9a";
logging-data="4043019"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zP71DsGgpDlrx4IMz3RWG"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:JiSklmVv0KktIrMzC2+nYJuDwBI=
sha1:Sztu2ltJcvA+5ssA7cWni2m1GjE=
Mail-Copies-To: never
 by: Winston - Wed, 27 Dec 2023 06:48 UTC

I previously posted:
>> (I've never had occasion to use git.)

Lowell Gilbert <lgusenet@be-well.ilk.org> kindly replied:
> That's fine. You don't seem to be a developer, so I don't see why you
> would have.

I've used other source code managers, just not git.
Even created my own back in the mid-80s when I was tech. lead on a
project and each of us needed to work on our own, possibly slightly
overlapping, pieces.

> Check out the "Running Git" chapter of the appendices to the FreeBSD
> Handbook.

Ah, that's where it is. OK, thanks!

> So you want to build a particular port locally, and you have other
> ports already installed by some other means, such as pkg.

One's a port, one's a core program. For the port, yes, exactly.

> You absolutely do not need to rebuild everything you already have
> installed;

Yay! IIRC (from several years ago), portsnap seemed to want to pull in
every other dependency and rebuild it, too, which I sometimes was
willing to let it do, but I prefer not to mix pkg and ports things on a
system.

>> 3) Do the source files obtained by git normally go in /usr/ports/, or
>> does location not matter?

> If you are checking out the ports tree, they will normally go in
> /usr/ports, but you can put them anywhere you want.

OK, good. The ports thing I have in mind is one particular X11 driver,
which, I would think, is a relatively stand-alone piece.

> If you put it elsewhere you may need to set the PORTSDIR variable
> (defined in ${PORTSDIR}/Mk/bsd.port.mk) when working with that tree.

OK, easy enough.

> If you already have something in /usr/ports, such as from portsnap,

Exactly, but with 14.0, there's only git, and I didn't know how those
mix, if at all, since "make"s in my old portsnap tree expect to be able
to pull in the source files. I've been tempted to rm -r /usr/ports/*,
but haven't yet. It's portsnap content is from years ago.

> then consider using the same method to do your upgrades. If not, you
> might as well go ahead and put your new ports tree there.

So "rm -r /usr/ports/*" followed by obtaining just the X11 driver in
question should work -- it doesn't need the rest. Good.

> My guess is that you want to compile a driver with options different
> than the ones that the standard pkg repositories use.

A good guess, but no. :-) In comments to a bug report, the maintainer
offered a patch, and I think maybe he's waiting for me to test it, even
though the fix applies to all the related drivers, he's made it in some
of them, and we know the fix works in those.

If, like with portsnap, building a patched version required dragging in
and rebuilding all the rest of X11, (which, in theory, might include
some new change elsewhere that affects the driver, making installing
just the driver an inappropriate test), where I have to uninstall the
pkg version of all of X, etc., that's more than I feel like fighting.
But it sounds like I can build generic+patch of this one piece against
the pkg-installed header files and libraries, so that's fine.

Time to go read the "Running Git" section of the FreeBSD Handbook...

Thanks!
-WBE

Re: using git for FreeBSD programs

<AM_iN.54294$i529.11880@fx12.ams1>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=529&group=comp.unix.bsd.freebsd.misc#529

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!feeder.cambriumusenet.nl!feed.tweaknews.nl!posting.tweaknews.nl!fx12.ams1.POSTED!not-for-mail
From: nos...@nospam.net (DaveG)
Subject: Re: using git for FreeBSD programs
Newsgroups: comp.unix.bsd.freebsd.misc
References: <ydjzp2vfcz.fsf@UBEblock.psr.com>
<44le9gli4q.fsf@be-well.ilk.org>
X-Clacks-Overhead: GNU Terry Pratchett, Lester Haines
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Lines: 24
Message-ID: <AM_iN.54294$i529.11880@fx12.ams1>
X-Complaints-To: abuse@tweaknews.nl
NNTP-Posting-Date: Wed, 27 Dec 2023 19:18:56 UTC
Organization: Tweaknews
Date: Wed, 27 Dec 2023 19:18:56 GMT
X-Received-Bytes: 1762
 by: DaveG - Wed, 27 Dec 2023 19:18 UTC

On Tue, 26 Dec 2023 17:21:41 -0500, Lowell Gilbert wrote:

> but bear in
> mind that your system may still need to build a lot of other things first
> -- things that are not needed to run the driver, but are needed to build
> it.

If the above is true, I'd recommend using portsnap to make sure the ports
tree is up to date first, then use portinstall (alias of portupgrade) with
the -P (--use-packages) option so any of the build dependencies which
have binary packages as up to date as ports, things will go much more
quickly. Ideally, the port you are building will not be one of those
binary packages and will do a "make config" at the start where you can
make the required changes. Worst case, the required port can then be
rebuilt in whatever way is chosen, possibly even using
make config fetch extract and then patching or whatever before doing
a make deinstall reinstall

HTH :-)

--
ad astra tabernamque

Don't feed the trolls. You might catch something nasty.

Re: using git for FreeBSD programs

<slrnuop661.12lk.naddy@lorvorc.mips.inka.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=530&group=comp.unix.bsd.freebsd.misc#530

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!newsfeed.endofthelinebbs.com!weretis.net!feeder8.news.weretis.net!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mail
From: nad...@mips.inka.de (Christian Weisgerber)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Wed, 27 Dec 2023 21:36:01 -0000 (UTC)
Message-ID: <slrnuop661.12lk.naddy@lorvorc.mips.inka.de>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com>
<44le9gli4q.fsf@be-well.ilk.org> <AM_iN.54294$i529.11880@fx12.ams1>
Injection-Date: Wed, 27 Dec 2023 21:36:01 -0000 (UTC)
Injection-Info: lorvorc.mips.inka.de; posting-host="localhost:::1";
logging-data="35509"; mail-complaints-to="usenet@mips.inka.de"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Christian Weisgerber - Wed, 27 Dec 2023 21:36 UTC

On 2023-12-27, DaveG <nospam@nospam.net> wrote:

> If the above is true, I'd recommend using portsnap to make sure the ports
> tree is up to date first, then use portinstall (alias of portupgrade) with

From the 14.0 release notes:
The portsnap(8) utility has been removed. Users are encouraged
to fetch the ports tree by using pkg install git and then git
clone https://git.FreeBSD.org/ports.git /usr/ports.

--
Christian "naddy" Weisgerber naddy@mips.inka.de

Re: using git for FreeBSD programs

<umiag7$pid$1@raid.furrfu.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=531&group=comp.unix.bsd.freebsd.misc#531

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!69.80.99.26.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 27 Dec 2023 23:03:35 +0000
From: dre...@furrfu.invalid (Drew Lawson)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Wed, 27 Dec 2023 23:03:35 -0000 (UTC)
Organization: Center for Unverified Assertions
Sender: drew@furrfu.invalid
Message-ID: <umiag7$pid$1@raid.furrfu.com>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com> <44le9gli4q.fsf@be-well.ilk.org> <AM_iN.54294$i529.11880@fx12.ams1> <slrnuop661.12lk.naddy@lorvorc.mips.inka.de>
Injection-Date: Wed, 27 Dec 2023 23:03:35 -0000 (UTC)
Injection-Info: raid.furrfu.com; posting-host="localhost:127.0.0.1"; logging-data="26189"; mail-complaints-to="usenet@raid.furrfu.com"
X-Host: raid.furrfu.com
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: drew@raid.furrfu.com (Drew Lawson)
Lines: 23
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-GPSmkEAZgo+niFsw4qZLffeF7bokvQD7qbBWccvAegIHyMj/aawb8kn5770Kw2EeFj5SSm0ZchulI2P!InSA9cBt+3SkBQjxht2AThpHSZrD/HhHQMZ2pnkzHBooQEuFAtvQ
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Drew Lawson - Wed, 27 Dec 2023 23:03 UTC

In article <slrnuop661.12lk.naddy@lorvorc.mips.inka.de>
Christian Weisgerber <naddy@mips.inka.de> writes:
>On 2023-12-27, DaveG <nospam@nospam.net> wrote:
>
>> If the above is true, I'd recommend using portsnap to make sure the ports
>> tree is up to date first, then use portinstall (alias of portupgrade) with
>
>From the 14.0 release notes:
> The portsnap(8) utility has been removed. Users are encouraged
> to fetch the ports tree by using pkg install git and then git
> clone https://git.FreeBSD.org/ports.git /usr/ports.

Thanks for that. I'd heard there was a change, but wash't sure of
the practical details.

So is 'portsnap fetch update' now just 'cd /usr/ports ; git pull'?

(Still waiting for 14.1 to make the switch.)

--
Drew Lawson | Radioactive cats have
| 18 half-lives
|

Re: using git for FreeBSD programs

<umihn7$3kr57$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=532&group=comp.unix.bsd.freebsd.misc#532

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: agh...@riseup.net (Alastair Hogge)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Thu, 28 Dec 2023 01:06:47 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <umihn7$3kr57$1@dont-email.me>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com>
<44le9gli4q.fsf@be-well.ilk.org> <AM_iN.54294$i529.11880@fx12.ams1>
<slrnuop661.12lk.naddy@lorvorc.mips.inka.de> <umiag7$pid$1@raid.furrfu.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 28 Dec 2023 01:06:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c050ad0c802830bd1adf246f0102a1f3";
logging-data="3828903"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+VcF7l1qliy2bnARacBCOVyCJBVGmsRnk="
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
Cancel-Lock: sha1:GRJ1cPtNW0Tk5e9lrLQ3Td7Jnj8=
 by: Alastair Hogge - Thu, 28 Dec 2023 01:06 UTC

On Wed, 27 Dec 2023 23:03:35 +0000, Drew Lawson wrote:

> In article <slrnuop661.12lk.naddy@lorvorc.mips.inka.de>
> Christian Weisgerber <naddy@mips.inka.de> writes:
>>On 2023-12-27, DaveG <nospam@nospam.net> wrote:
>>
>>> If the above is true, I'd recommend using portsnap to make sure the
>>> ports tree is up to date first, then use portinstall (alias of
>>> portupgrade) with
>>
>>From the 14.0 release notes:
>> The portsnap(8) utility has been removed. Users are encouraged to
>> fetch the ports tree by using pkg install git and then git clone
>> https://git.FreeBSD.org/ports.git /usr/ports.
>
> Thanks for that. I'd heard there was a change, but wash't sure of the
> practical details.
>
> So is 'portsnap fetch update' now just 'cd /usr/ports ; git pull'?

Not quite:
https://docs.freebsd.org/en/books/handbook/book/#ports-using-installation-
methods

There are a few more steps, no mountains to climb tho.

> (Still waiting for 14.1 to make the switch.)

--
To health and anarchy

Re: using git for FreeBSD programs

<umihor$2pt$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=533&group=comp.unix.bsd.freebsd.misc#533

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.re...@blueworldhosting.com (Jesse Rehmer)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Thu, 28 Dec 2023 01:07:39 -0000 (UTC)
Organization: BWH Usenet (https://usenet.blueworldhosting.com)
Message-ID: <umihor$2pt$1@nnrp.usenet.blueworldhosting.com>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com> <44le9gli4q.fsf@be-well.ilk.org> <AM_iN.54294$i529.11880@fx12.ams1> <slrnuop661.12lk.naddy@lorvorc.mips.inka.de> <umiag7$pid$1@raid.furrfu.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 28 Dec 2023 01:07:39 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="2877"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:Km06KB8eBHgFyg+YNYBP2AFwPus= sha256:S/+fSmOoVrS2TQCGkSiu6G2R5icFJEZmFgzouGjsEws=
sha1:y6CeaFvZTfNfrU3Bf4AoJ4p4Sso= sha256:s46gIYSWXZ/TsLNruM7lWnU4rbsERqXz5BW12MfP3Yw=
X-Usenapp: v1.27.2/d - Full License
 by: Jesse Rehmer - Thu, 28 Dec 2023 01:07 UTC

On Dec 27, 2023 at 5:03:35 PM CST, "Drew Lawson" <Drew Lawson> wrote:

> In article <slrnuop661.12lk.naddy@lorvorc.mips.inka.de>
> Christian Weisgerber <naddy@mips.inka.de> writes:
>> On 2023-12-27, DaveG <nospam@nospam.net> wrote:
>>
>>> If the above is true, I'd recommend using portsnap to make sure the ports
>>> tree is up to date first, then use portinstall (alias of portupgrade) with
>>
>> From the 14.0 release notes:
>> The portsnap(8) utility has been removed. Users are encouraged
>> to fetch the ports tree by using pkg install git and then git
>> clone https://git.FreeBSD.org/ports.git /usr/ports.
>
> Thanks for that. I'd heard there was a change, but wash't sure of
> the practical details.
>
> So is 'portsnap fetch update' now just 'cd /usr/ports ; git pull'?
>
> (Still waiting for 14.1 to make the switch.)

Everything I've read claims the procedure is 'git pull' inside the /usr/src/
directory once you've checked it out, but even though I don't make any
changes, I always get this error:

error: Your local changes to the following files would be overwritten by merge
UPDATING
contrib/tzdata/CONTRIBUTING
contrib/tzdata/Makefile
...

Not sure if packages or OS updates touch /usr/src, or if things get touched
enough during certain builds, but every time I have tried to do a 'git pull' I
get that error. Not sure it is the 'right' way, but I've been doing 'git pull
--autostash' to deal with that.

Re: using git for FreeBSD programs

<umii8l$qgo$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=534&group=comp.unix.bsd.freebsd.misc#534

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!newsfeed.endofthelinebbs.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: jesse.re...@blueworldhosting.com (Jesse Rehmer)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Thu, 28 Dec 2023 01:16:05 -0000 (UTC)
Organization: BWH Usenet (https://usenet.blueworldhosting.com)
Message-ID: <umii8l$qgo$1@nnrp.usenet.blueworldhosting.com>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com> <slrnuop661.12lk.naddy@lorvorc.mips.inka.de> <umiag7$pid$1@raid.furrfu.com> <umihor$2pt$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 28 Dec 2023 01:16:05 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com;
logging-data="27160"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:2qlUBMP0k2pc5H9Nxx0cBq8fGYc= sha256:2soggd8vUQTnTNc6kASPxeik8AIjllFjB6slYZph6Bo=
sha1:wslYsJhLdr94mCoxBP9FAR7+SL8= sha256:4fB/MV/BioKslMqdJyDbDrSNtbqUO+pFfO9VSNvqFLc=
X-Usenapp: v1.27.2/d - Full License
 by: Jesse Rehmer - Thu, 28 Dec 2023 01:16 UTC

On Dec 27, 2023 at 7:07:39 PM CST, "Jesse Rehmer"
<jesse.rehmer@blueworldhosting.com> wrote:

> On Dec 27, 2023 at 5:03:35 PM CST, "Drew Lawson" <Drew Lawson> wrote:
>
>> In article <slrnuop661.12lk.naddy@lorvorc.mips.inka.de>
>> Christian Weisgerber <naddy@mips.inka.de> writes:
>>> On 2023-12-27, DaveG <nospam@nospam.net> wrote:
>>>
>>>> If the above is true, I'd recommend using portsnap to make sure the ports
>>>> tree is up to date first, then use portinstall (alias of portupgrade) with
>>>
>>> From the 14.0 release notes:
>>> The portsnap(8) utility has been removed. Users are encouraged
>>> to fetch the ports tree by using pkg install git and then git
>>> clone https://git.FreeBSD.org/ports.git /usr/ports.
>>
>> Thanks for that. I'd heard there was a change, but wash't sure of
>> the practical details.
>>
>> So is 'portsnap fetch update' now just 'cd /usr/ports ; git pull'?
>>
>> (Still waiting for 14.1 to make the switch.)
>
> Everything I've read claims the procedure is 'git pull' inside the /usr/src/
> directory once you've checked it out, but even though I don't make any
> changes, I always get this error:
>
> error: Your local changes to the following files would be overwritten by merge
> UPDATING
> contrib/tzdata/CONTRIBUTING
> contrib/tzdata/Makefile
> ...
>
> Not sure if packages or OS updates touch /usr/src, or if things get touched
> enough during certain builds, but every time I have tried to do a 'git pull' I
> get that error. Not sure it is the 'right' way, but I've been doing 'git pull
> --autostash' to deal with that.

Derp, I mention /usr/src and pasted from output in that directory, but this is
about ports, though I have the same kind of issues with 'git pull' there too
since upgrading to 14.0.

Re: using git for FreeBSD programs

<kv4ql1Fo396U1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=535&group=comp.unix.bsd.freebsd.misc#535

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: sax...@noart.de (Detlef Sax)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: 28 Dec 2023 08:41:05 GMT
Lines: 26
Message-ID: <kv4ql1Fo396U1@mid.individual.net>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com>
<44le9gli4q.fsf@be-well.ilk.org> <AM_iN.54294$i529.11880@fx12.ams1>
<slrnuop661.12lk.naddy@lorvorc.mips.inka.de>
X-Trace: individual.net fY7J4Ygc7qEerO4wCB+mBQAfv3MAZ7sdq3AGYdMo5LRMDgdlR4
Cancel-Lock: sha1:PE9KKGC+NJPGp3zpCUxX13gAcJE= sha256:8IhsAMkRs0V2dG2HQrT2Qj26nj4yCJ5ozlQop+Jad5w=
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Detlef Sax - Thu, 28 Dec 2023 08:41 UTC

On Wed, 27 Dec 2023 21:36:01 -0000 (UTC), Christian Weisgerber wrote:
> On 2023-12-27, DaveG <nospam@nospam.net> wrote:
>
>> If the above is true, I'd recommend using portsnap to make sure the ports
>> tree is up to date first, then use portinstall (alias of portupgrade) with
>
> From the 14.0 release notes:
> The portsnap(8) utility has been removed. Users are encouraged
> to fetch the ports tree by using pkg install git and then git
> clone https://git.FreeBSD.org/ports.git /usr/ports.
>

Instead I use:
/usr/ports/net/gitup

gitup ports updates /usr/ports
gitup release updates /usr/src

More in the gitup.conf

It's very fast.

Detlef
--
https://www.12schrittefrei.de/
https://www.noart.de/

Re: using git for FreeBSD programs

<umk632$44l$1@nyheter.lysator.liu.se>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=536&group=comp.unix.bsd.freebsd.misc#536

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!nyheter.lysator.liu.se!.POSTED!not-for-mail
From: kem...@lysator.liu.se (Andreas Kempe)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Thu, 28 Dec 2023 16:00:34 -0000 (UTC)
Organization: Lysator ACS
Message-ID: <umk632$44l$1@nyheter.lysator.liu.se>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com>
<44le9gli4q.fsf@be-well.ilk.org> <AM_iN.54294$i529.11880@fx12.ams1>
<slrnuop661.12lk.naddy@lorvorc.mips.inka.de> <umiag7$pid$1@raid.furrfu.com>
<umihor$2pt$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 28 Dec 2023 16:00:34 -0000 (UTC)
Injection-Info: nyheter.lysator.liu.se; posting-account="kempe";
logging-data="4245"; mail-complaints-to="newsmaster@lysator.liu.se"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Andreas Kempe - Thu, 28 Dec 2023 16:00 UTC

Den 2023-12-28 skrev Jesse Rehmer <jesse.rehmer@blueworldhosting.com>:
> On Dec 27, 2023 at 5:03:35 PM CST, "Drew Lawson" <Drew Lawson> wrote:
>
>> So is 'portsnap fetch update' now just 'cd /usr/ports ; git pull'?
>>
>> (Still waiting for 14.1 to make the switch.)
>
> Everything I've read claims the procedure is 'git pull' inside the /usr/src/
> directory once you've checked it out, but even though I don't make any
> changes, I always get this error:
>
> error: Your local changes to the following files would be overwritten by merge
> UPDATING
> contrib/tzdata/CONTRIBUTING
> contrib/tzdata/Makefile
> ...
>
> Not sure if packages or OS updates touch /usr/src, or if things get touched
> enough during certain builds, but every time I have tried to do a 'git pull' I
> get that error. Not sure it is the 'right' way, but I've been doing 'git pull
> --autostash' to deal with that.

Something has caused non-commited changes in your repository. If you
run freebsd-update without excluding /usr/ports and /usr/src, that can
happen.

There are two ways I usually deal with that type of conflict. First is
to do

git reset --hard
git pull

to discard local uncommited changes and update. If I have local
commits I also want to get rid of, I do

git fetch
git reset --hard origin/$insert_branch_name

and any local commit I have added on my branch is also discarded. If I
have local commited changes that I want to keep, I usually do

git pull --rebase

with --rebase lifting my commits and trying to apply them on top of
the latest upstream commit. This can result in conflicts that need to
be worked out.

Re: using git for FreeBSD programs

<umk6j4$44l$2@nyheter.lysator.liu.se>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=537&group=comp.unix.bsd.freebsd.misc#537

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!nyheter.lysator.liu.se!.POSTED!not-for-mail
From: kem...@lysator.liu.se (Andreas Kempe)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Thu, 28 Dec 2023 16:09:08 -0000 (UTC)
Organization: Lysator ACS
Message-ID: <umk6j4$44l$2@nyheter.lysator.liu.se>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com>
<44le9gli4q.fsf@be-well.ilk.org> <AM_iN.54294$i529.11880@fx12.ams1>
<slrnuop661.12lk.naddy@lorvorc.mips.inka.de> <umiag7$pid$1@raid.furrfu.com>
<umihor$2pt$1@nnrp.usenet.blueworldhosting.com>
<umk632$44l$1@nyheter.lysator.liu.se>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 28 Dec 2023 16:09:08 -0000 (UTC)
Injection-Info: nyheter.lysator.liu.se; posting-account="kempe";
logging-data="4245"; mail-complaints-to="newsmaster@lysator.liu.se"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Andreas Kempe - Thu, 28 Dec 2023 16:09 UTC

Den 2023-12-28 skrev Andreas Kempe <kempe@lysator.liu.se>:
> Den 2023-12-28 skrev Jesse Rehmer <jesse.rehmer@blueworldhosting.com>:
>> On Dec 27, 2023 at 5:03:35 PM CST, "Drew Lawson" <Drew Lawson> wrote:
>>
>>> So is 'portsnap fetch update' now just 'cd /usr/ports ; git pull'?
>>>
>>> (Still waiting for 14.1 to make the switch.)
>>
>> Everything I've read claims the procedure is 'git pull' inside the /usr/src/
>> directory once you've checked it out, but even though I don't make any
>> changes, I always get this error:
>>
>> error: Your local changes to the following files would be overwritten by merge
>> UPDATING
>> contrib/tzdata/CONTRIBUTING
>> contrib/tzdata/Makefile
>> ...
>>
>> Not sure if packages or OS updates touch /usr/src, or if things get touched
>> enough during certain builds, but every time I have tried to do a 'git pull' I
>> get that error. Not sure it is the 'right' way, but I've been doing 'git pull
>> --autostash' to deal with that.

I forgot to address the autostash. It works, but it will save the
conflicting changes every time in the Git repository, causing it to
grow in size over time. Using git reset --hard discards the changes.

>
> Something has caused non-commited changes in your repository. If you
> run freebsd-update without excluding /usr/ports and /usr/src, that can
> happen.
>
> There are two ways I usually deal with that type of conflict. First is
> to do
>
> git reset --hard
> git pull
>
> to discard local uncommited changes and update. If I have local
> commits I also want to get rid of, I do
>
> git fetch
> git reset --hard origin/$insert_branch_name
>
> and any local commit I have added on my branch is also discarded. If I
> have local commited changes that I want to keep, I usually do
>
> git pull --rebase
>
> with --rebase lifting my commits and trying to apply them on top of
> the latest upstream commit. This can result in conflicts that need to
> be worked out.

Re: using git for FreeBSD programs

<yd8r5eut1h.fsf@UBEblock.psr.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=539&group=comp.unix.bsd.freebsd.misc#539

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wbe...@UBEBLOCK.psr.com.invalid (Winston)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Thu, 28 Dec 2023 12:38:02 -0500
Organization: A noiseless patient Spider
Lines: 69
Message-ID: <yd8r5eut1h.fsf@UBEblock.psr.com>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com> <44le9gli4q.fsf@be-well.ilk.org>
<ydfrzouomv.fsf@UBEblock.psr.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="0695e0ad1a2c982d903f3b4879167a35";
logging-data="494524"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xUgiLg+qJkyCITXeR6lEa"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:AH6XiWvSDiV7gsP6yaA7gfyCGMk=
sha1:gLz3WWX37I++wyLcCYs1pERyz3A=
Mail-Copies-To: never
 by: Winston - Thu, 28 Dec 2023 17:38 UTC

Re: observed result regarding git and /usr/ports

I asked:
>>> 3) Do the source files obtained by git normally go in /usr/ports/,
>>> or does location not matter?

to which Lowell Gilbert <lgusenet@be-well.ilk.org> kindly replied (in part):
>> If you already have something in /usr/ports, such as from portsnap,

> Exactly, [... What I currently have in /usr/ports is] portsnap content
> from years ago.

"git clone ..." complains when /usr/ports isn't empty, so any portsnap
content already there is apparently incompatible with "git clone"'s
results being put in /usr/ports. OK.

Re: using git to obtain and build specific pieces

>> You absolutely do not need to rebuild everything you already have
>> installed;

to which I replied:
> Yay! IIRC (from several years ago), portsnap seemed to want to pull in
> every other dependency and rebuild it, too, which I sometimes was
> willing to let it do, but I prefer not to mix pkg and ports things on a
> system.

Here's where I'd like advice from those of you who know more about git.

* Do I have to have a local clone of the remote repository to be able to
obtain the individual parts?

I'd prefer not have to clone gigabytes worth of the /usr/ports and
/usr/src repositories just to obtain and build one program or piece.

Doing:
git clone --sparse --depth 1 --single-branch \
https://git.freebsd.org/ports.git /usr/ports

is fine and fairly small. I did that (mistakenly) thinking that
git-sparse-checkout could then be used to expand the tree down to the
piece I wanted, but after actually reading the man page for
git-sparse-checkout, it appears that's not what it does.

ISTM that there ought to be a way to get a copy of a subset directly
from the remote repository. The man page for the most likely command,
"git checkout", however, talks about saving and restoring a work area
to/from multiple branches (which maybe doesn't apply if
--single-branch?) etc., which would seem (on casual reading) to require
a local repository.

* Is there some not-too-painful way to do what I'm trying to do: obtain
enough of just the parts I'm interested in to be able to make local
changes and build the result against the existing, installed header
files and libraries? I don't need to be able to upload the changes or
make commits to the remote repositories (which I'm not authorized to
do anyway), so part of what git does regarding branches and merging
isn't relevant. If git just reports which version it obtained (for
reference), I should be fine.

As an alternative to git, I tried visiting the FreeBSD repository files
with a browser. Clicking down to the pieces I want is easy, but that
doesn't give me C code for file foo.c: it comes with HTML wrapping that
formats and numbers every line of the code. Removing all that wrapping
to get something compilable would be a pain.

TVMIA,
-WBE

Re: using git for FreeBSD programs

<44cyuqp3fd.fsf@be-well.ilk.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=540&group=comp.unix.bsd.freebsd.misc#540

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lguse...@be-well.ilk.org (Lowell Gilbert)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Thu, 28 Dec 2023 13:50:14 -0500
Organization: A noiseless patient Spider
Lines: 115
Message-ID: <44cyuqp3fd.fsf@be-well.ilk.org>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com> <44le9gli4q.fsf@be-well.ilk.org>
<ydfrzouomv.fsf@UBEblock.psr.com> <yd8r5eut1h.fsf@UBEblock.psr.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="3eec9e74f7d159af8ce08156d5a8e07a";
logging-data="515331"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RmpK+Oab1AfyIAfth08dh"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:3iRx885bC/tQ2Mb0zOoocewwMxU=
sha1:dnltQZ+SeBFVA1Q4llKyTcpVyLs=
 by: Lowell Gilbert - Thu, 28 Dec 2023 18:50 UTC

Winston <wbe@UBEBLOCK.psr.com.invalid> writes:

> Re: observed result regarding git and /usr/ports
>
> I asked:
>>>> 3) Do the source files obtained by git normally go in /usr/ports/,
>>>> or does location not matter?
>
> to which Lowell Gilbert <lgusenet@be-well.ilk.org> kindly replied (in part):
>>> If you already have something in /usr/ports, such as from portsnap,
>
>> Exactly, [... What I currently have in /usr/ports is] portsnap content
>> from years ago.

That's completely useless to you at this point. Might as well wipe it out.

> "git clone ..." complains when /usr/ports isn't empty, so any portsnap
> content already there is apparently incompatible with "git clone"'s
> results being put in /usr/ports. OK.

I'd recommend clearing that out and putting it there, which will
slightly simplify the procedure.

> Re: using git to obtain and build specific pieces
>
>>> You absolutely do not need to rebuild everything you already have
>>> installed;
>
> to which I replied:
>> Yay! IIRC (from several years ago), portsnap seemed to want to pull in
>> every other dependency and rebuild it, too, which I sometimes was
>> willing to let it do, but I prefer not to mix pkg and ports things on a
>> system.

Ports from git won't normally do that, but neither would portsnap. They
are different ways to download the tree, but how the tree works once you
have it will be the same as far as I can recall.

> Here's where I'd like advice from those of you who know more about git.
>
> * Do I have to have a local clone of the remote repository to be able to
> obtain the individual parts?

No, but it will be a lot less work. For one thing I can think of
offhand, you will have to go back to fill in missing dependencies one at
a time.

> I'd prefer not have to clone gigabytes worth of the /usr/ports and
> /usr/src repositories just to obtain and build one program or piece.
>
> Doing:
> git clone --sparse --depth 1 --single-branch \
> https://git.freebsd.org/ports.git /usr/ports
>
> is fine and fairly small. I did that (mistakenly) thinking that
> git-sparse-checkout could then be used to expand the tree down to the
> piece I wanted, but after actually reading the man page for
> git-sparse-checkout, it appears that's not what it does.

Hmm. It looks to me like it can do that, but it isn't
straightforward. You might try
git sparse-checkout set <desired subtree>

Perhaps more importantly to you, a sparse checkout downloads almost
exactly the same amount of data that it would without using --sparse;
the difference is what it puts into the working tree. For the ports
tree, that is slightly under one gigabyte, and it sounds to me as though
you have already done that.

> ISTM that there ought to be a way to get a copy of a subset directly
> from the remote repository. The man page for the most likely command,
> "git checkout", however, talks about saving and restoring a work area
> to/from multiple branches (which maybe doesn't apply if
> --single-branch?) etc., which would seem (on casual reading) to require
> a local repository.

git is a distributed RCS. You are probably accustomed to client/server
version control, where most operations go back to the remote server.

> * Is there some not-too-painful way to do what I'm trying to do: obtain
> enough of just the parts I'm interested in to be able to make local
> changes and build the result against the existing, installed header
> files and libraries? I don't need to be able to upload the changes or
> make commits to the remote repositories (which I'm not authorized to
> do anyway), so part of what git does regarding branches and merging
> isn't relevant. If git just reports which version it obtained (for
> reference), I should be fine.

Depends on your personal tolerance for different kinds of pain, I
suppose. Downloading the database of the whole default branch of the
ports tree with git takes about a minute at 100 megabits per second, and
checking the objects out once they're downloaded will take much longer
than that. In typical usage, It's all one operation from the command
line, of course.

For version numbers, remember (again) that the model is
distributed. There is no monotonically increasing version value you can
apply, because there's no single master location to assign it.

> As an alternative to git, I tried visiting the FreeBSD repository files
> with a browser. Clicking down to the pieces I want is easy, but that
> doesn't give me C code for file foo.c: it comes with HTML wrapping that
> formats and numbers every line of the code. Removing all that wrapping
> to get something compilable would be a pain.

AS best I recall, there is more than one web interface to the ports
collection, but most likely you're looking at cgit, which has a link on
each leaf page labelled "(plain)"; see it next to the blob hash at, for
example:
https://cgit.freebsd.org/ports/tree/x11-drivers/xf86-video-voodoo/Makefile

Good luck.
--
Lowell Gilbert, embedded/networking software engineer
http://be-well.ilk.org/~lowell/

Re: using git for FreeBSD programs

<yd4jg1vmbg.fsf@UBEblock.psr.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=544&group=comp.unix.bsd.freebsd.misc#544

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: wbe...@UBEBLOCK.psr.com.invalid (Winston)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Thu, 28 Dec 2023 20:17:55 -0500
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <yd4jg1vmbg.fsf@UBEblock.psr.com>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com> <44le9gli4q.fsf@be-well.ilk.org>
<ydfrzouomv.fsf@UBEblock.psr.com> <yd8r5eut1h.fsf@UBEblock.psr.com>
<44cyuqp3fd.fsf@be-well.ilk.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="7a80ccfc2b8fc88d25c9b8b5dbbb7f25";
logging-data="614882"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+5Ghlkeq/y4m0nzJ196X/F"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:s1UvgFqQ070y6hPiZ5Uhv698Dbw=
sha1:oJVttnVgQ9AqqIsB2q3+CwPafSs=
Mail-Copies-To: never
 by: Winston - Fri, 29 Dec 2023 01:17 UTC

(Partial reply)

Lowell Gilbert <lgusenet@be-well.ilk.org> kindly replied:
> ... most likely you're looking at cgit, which has a link on each leaf
> page labelled "(plain)"; see it next to the blob hash at, for example:
> https://cgit.freebsd.org/ports/tree/x11-drivers/xf86-video-voodoo/Makefile

Well, lookie there! :) That's also true for src tree code.
That should take care of the src mods I want to try.

Thanks!
-WBE

[I'll reply to the rest later.]

Re: using git for FreeBSD programs

<slrnup30h5.178u.naddy@lorvorc.mips.inka.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=554&group=comp.unix.bsd.freebsd.misc#554

  copy link   Newsgroups: comp.unix.bsd.freebsd.misc
Path: i2pn2.org!i2pn.org!news.niel.me!glou.org!news.glou.org!fdn.fr!3.eu.feeder.erje.net!feeder.erje.net!weretis.net!feeder8.news.weretis.net!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mail
From: nad...@mips.inka.de (Christian Weisgerber)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: using git for FreeBSD programs
Date: Sun, 31 Dec 2023 15:00:53 -0000 (UTC)
Message-ID: <slrnup30h5.178u.naddy@lorvorc.mips.inka.de>
References: <ydjzp2vfcz.fsf@UBEblock.psr.com>
<44le9gli4q.fsf@be-well.ilk.org> <ydfrzouomv.fsf@UBEblock.psr.com>
<yd8r5eut1h.fsf@UBEblock.psr.com>
Injection-Date: Sun, 31 Dec 2023 15:00:53 -0000 (UTC)
Injection-Info: lorvorc.mips.inka.de; posting-host="localhost:::1";
logging-data="42391"; mail-complaints-to="usenet@mips.inka.de"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Christian Weisgerber - Sun, 31 Dec 2023 15:00 UTC

On 2023-12-28, Winston <wbe@UBEBLOCK.psr.com.invalid> wrote:

> Here's where I'd like advice from those of you who know more about git.
>
> * Do I have to have a local clone of the remote repository to be able to
> obtain the individual parts?

Yes.
The topic already came up for the switch from CVS to Subversion,
because the latter keeps an extra copy of the checkout on disk, and
then again for Subversion to Git, and each time the developer
consensus was "disk space is cheap".

> I'd prefer not have to clone gigabytes worth of the /usr/ports and
> /usr/src repositories just to obtain and build one program or piece.

Well, it's... 1.4G for ports, 1.7G for src. You can mess around
with...

> Doing:
> git clone --sparse --depth 1 --single-branch \
> https://git.freebsd.org/ports.git /usr/ports

.... well, I see you already did.

> ISTM that there ought to be a way to get a copy of a subset directly
> from the remote repository.

There is not. Git is a distributed version control system. A local
clone of the repository is an inherent part of that. Git is not
designed as a source distribution system.

> * Is there some not-too-painful way to do what I'm trying to do: obtain
> enough of just the parts I'm interested in to be able to make local
> changes and build the result against the existing, installed header
> files and libraries? I don't need to be able to upload the changes or
> make commits to the remote repositories (which I'm not authorized to
> do anyway), so part of what git does regarding branches and merging
> isn't relevant.

Actually, if you have local changes, then it makes perfect sense
to commit them to a local branch. Now that is what Git is designed
for. You have local code under version control that you synchronize
from time to time with a remote repository.

The not-too-painful way is to go along with how Git works, not to
fight it at every step. *shrug*

BTW, I highly recommend the Git Book. Chapters 1-3 provide an
excellent introduction to Git and its concepts.
https://git-scm.com/book/en/v2

> As an alternative to git, I tried visiting the FreeBSD repository files
> with a browser.

As somebody else already mentioned, net/gitup is probably what you
are looking for.

--
Christian "naddy" Weisgerber naddy@mips.inka.de


devel / comp.unix.bsd.freebsd.misc / Re: using git for FreeBSD programs

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor