/usr/ports & gitup+git: What am I doing wrong?

Colleagues, from the explanations, I realized that portsnap(8) will no longer work and I need to switch to git.

I already had git, so I installed gitup and removed the /usr/ports hierarchy as recommended.
Then it turned out that the default gitup.conf file was somehow wrong and I found another one.

Code:
{
        "defaults" : {
                "host"           : "git.freebsd.org",
                "port"           : 443,
                "verbosity"      : 1,
                "work_directory" : "/var/db/gitup",
        },

        "ports" : {
                "host"       : "git.freebsd.org",
                "repository" : "/ports.git",
                "branch"     : "main",
                "target"     : "/usr/ports",
                "ignores"    : [
                        "distfiles",
                        "packages",
                ],
        },

        "quarterly" : {
                "repository_path"  : "/ports.git",
                "branch"           : "quarterly",
                "target_directory" : "/usr/ports",
                "ignores"          : [
                        "distfiles",
                        "packages",
                ]
        },

        "release" : {
                "repository_path"  : "/src.git",
                "branch"           : "releng/11.4",
                "target_directory" : "/usr/src",
                "ignores"          : [
                        "sys/amd64/conf",
                ]
        },
}
After that, using the gitup ports command, I got the /usr/ports hierarchy without any problems.
Then, with the cd /usr/ports/ && make index command, I built the index.

As they say in the novels, "nothing foreshadowed trouble". All I had to do was say git pull and see how git brings in the last changes that have taken place over a long enough time when to build the index.

But of course not! This is what the git said in reverse translation into English:
Code:
ogogon@ot:/usr/ports# git pull
fatal: git repository not found (or one of its directories up to /usr mount point)
I stop searching at the file system boundary (since GIT_DISCOVERY_ACROSS_FILESYSTEM is not installed).
ogogon@ot:/usr/ports#

Where have I not paid respect to this crocodile? What is he not happy with?
Maybe there is some kind of instruction or FAQ?

Ogogon.
 
Do you WANT to use git?

If you just want ports, just use "gitup ports"

To see what has changed - try "pkg version -vL="

I think you choose git OR gitup depending on your requirements.

There's been talk that the index isn't to be relied on, so I skip the "I" parameter in my pkg version. So you might not need to make or fetch the index.
 
On https://github.com/johnmehr/gitup you can read:
Because gitup neither uses nor updates the contents of .git directories, the official Git client should not be used on repositories cloned or modified with gitup or vice versa.
So: use gitup or git but not both!

I chose to use regular git and built the ports tree with git clone https://git.freebsd.org/ports.git --branch 2021Q2 /usr/ports (2021Q2 being the newest quarterly branch). If you want the latest ports then --branch main.
 
So: use gitup or git but not both!
Exactly this. Use one or the other, not both.

I realized that portsnap(8) will no longer work and I need to switch to git.
No, that's not entirely correct. At the moment the portsnap(8) infrastructure is being worked on due to the subversion to git migration of the ports tree. In a future version portsnap(8) will likely disappear. But this won't happen any time soon. So it's perfectly fine to keep using it once the maintenance of the infrastructure has been completed.

Where have I not paid respect to this crocodile? What is he not happy with?
If you want to update your /usr/ports with gitup(1) simply run the command again; gitup ports.
 
Back
Top