Cannot get source using git

sprock

Active Member

Reaction score: 11
Messages: 107

I'm using this command:
Code:
sudo git clone -b releng/12.2 --depth 1 https://git.freebsd.org/src.git 122src
to get the source for 12.2-RELEASE. It fails like this:

Code:
Cloning into '122src'...
fatal: unable to access 'https://git.freebsd.org/src.git/': Could not resolve host: git.freebsd.org

Am I using the correct command?
 

Jose

Daemon

Reaction score: 1,084
Messages: 1,314

Capitalization doesn't matter in DNS names. You had a DNS failure, likely because of a network problem.
Code:
$ ping git.freebsd.org
PING gitmir.geo.freebsd.org (149.20.1.203): 56 data bytes
64 bytes from 149.20.1.203: icmp_seq=0 ttl=54 time=3.335 ms
64 bytes from 149.20.1.203: icmp_seq=1 ttl=54 time=3.402 ms
64 bytes from 149.20.1.203: icmp_seq=2 ttl=54 time=3.391 ms

Why are you cloning the source as root?
 
OP
S

sprock

Active Member

Reaction score: 11
Messages: 107

OK, thanks.

Why root: building in /usr/122src
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,767
Messages: 39,377

Why root: building in /usr/122src
Sources don't need to be checked out as root, they don't even need to be built by root. You can build it as a regular user as long as you set MAKEOBJDIRPREFIX to a directory that user can write to.

Code:
     MAKEOBJDIRPREFIX      Defines the prefix for directory names in the tree
                           of built objects.  Defaults to /usr/obj if not
                           defined.  This variable should only be set in the
                           environment or /etc/src-env.conf and not via
                           /etc/make.conf or /etc/src.conf or the command
                           line.
See build(7).
 
OP
S

sprock

Active Member

Reaction score: 11
Messages: 107

Sources don't need to be checked out as root, they don't even need to be built by root. You can build it as a regular user as long as you set MAKEOBJDIRPREFIX to a directory that user can write to.

Code:
     MAKEOBJDIRPREFIX      Defines the prefix for directory names in the tree
                           of built objects.  Defaults to /usr/obj if not
                           defined.  This variable should only be set in the
                           environment or /etc/src-env.conf and not via
                           /etc/make.conf or /etc/src.conf or the command
                           line.
See build(7).
Yes, I have built as a user sometimes. No particular reason I'm not doing it that way presently.
Cheers,
sprock
 
OP
S

sprock

Active Member

Reaction score: 11
Messages: 107

A typo?

Code:
root@mowa219-gjp4-8570p-freebsd:~ # ls -dhl /usr/src
drwxr-xr-x  27 root  wheel    44B Oct 19 22:31 /usr/src
root@mowa219-gjp4-8570p-freebsd:~ #
No. I have /usr/122src & /usr/122obj to distinguish them from my build of 13.0, which exists on the same host.
Cheers,
sprock
 
Top