So... how do now update my local ports tree?

firetree

New Member


Messages: 10

I run a home/office server, mainly for my own personal/business use, I need to do little server admin but do regularly update.
portsnap is obviously not playing ball at the moment; I've looked through the "Ports transitioned to git." thread a few times (also performed many google searches like: "how to update freebsd via git") and installed gitup but
Code:
gitup ports
# Host: github.com
# Port: 443
# Repository: /freebsd/freebsd-ports.git
# Target: /usr/ports
gitup: get_commit_details: refs/heads/master doesn't exist in /freebsd/freebsd-ports.git: Invalid argument
doesn't help.
Apologies if I'm missing the bleedin' obvious but I just have no idea what to do to update my ports now; the Handbook hasn't been updated and all the git transition talk is a bit "wood for the trees" territory for me; I've never used git and am rather lost >_< This is the sort of thing that I should breeze through but... aaaarg!
Whaddoido? I appreciate that patience might be the immediate answer and that all will be documented in time.
Many thanks.
 

Zirias

Daemon

Reaction score: 1,313
Messages: 2,340

You have an old gitup config.
 

Minbari

Aspiring Daemon

Reaction score: 296
Messages: 550

I have a similar error but with quarterly and I've updated that config file.
Code:
 gitup quarterly
# Host: git.freebsd.org
# Port: 443
# Repository: /ports.git
# Target: /usr/ports
gitup: get_commit_details: refs/heads/branches/2021Q2 doesn't exist in /ports.git: Invalid argument

gitup.conf:
Code:
# $FreeBSD$
#
# Default configuration options for gitup.conf.
{
    "defaults" : {
        "host"           : "git.freebsd.org",
        "port"           : 443,
#        "proxy_host"     : "",
#        "proxy_port"     : 0,
#        "proxy_username" : "",
#        "proxy_password" : "",
        "verbosity"      : 1,
        "work_directory" : "/var/db/gitup",
    },

    "ports" : {
        "repository_path"  : "/ports.git",
        "branch"           : "main",
        "target_directory" : "/usr/ports",
        "ignores"          : [
            "distfiles",
            "packages",
            "INDEX-11",
            "INDEX-12",
            "INDEX-13",
            "INDEX-14",
        ],
    },

    "quarterly" : {
        "repository_path"  : "/ports.git",
        "branch"           : "quarterly",
        "target_directory" : "/usr/ports",
        "ignores"          : [
            "distfiles",
            "packages",
            "INDEX-11",
            "INDEX-12",
            "INDEX-13",
            "INDEX-14",
        ]
    },

    "release" : {
        "repository_path"  : "/src.git",
        "branch"           : "releng/12.2",
        "target_directory" : "/usr/src",
        "ignores"          : [
            "sys/amd64/conf",
            "sys/arm64/conf",
            "sys/i386/conf",
            "sys/pc98/conf",
            "sys/powerpc/conf",
            "sys/riscv/conf",
            "sys/sparc64/conf",
        ]
    },

}
Things were so simple with cvn/svn...
 

bsduck

Active Member

Reaction score: 67
Messages: 110

I also tried using gitup quarterly with the same config, and it did not work either. Obviously there is no branch named "quarterly" on git.freebsd.org, so it cannot find anything. It would probably work with setting "branch" : "2021Q2" but then I don't see any advantage in using it instead of plain git if you have to manually switch from a quarterly branch to the next one anyway.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,190
Messages: 37,326

Obviously there is no branch named "quarterly" on git.freebsd.org, so it cannot find anything.

The code calculates the correct branch when it's been set to 'quarterly'.


The error seems to indicate it doesn't know that a new branch exists. jmehr is this a bug?
 

jmehr

Member

Reaction score: 54
Messages: 28

The code calculates the correct branch when it's been set to 'quarterly'. The error seems to indicate it doesn't know that a new branch exists. jmehr is this a bug?

I pushed out a fix for this issue a few days ago. As soon as the code I had to add to switch from using the installed /usr/include/base64.h to OpenSSL's base64 encoding functions is validated, the proxy support feature should be fully functional and I'll be able to release 0.91 (hopefully tomorrow).
 

athan

Member

Reaction score: 3
Messages: 21

Why don't people use the git method in the Handbook? I install git-lite not git. Works perfectly and nothing to learn except the command.
I use the ports tree to build applications as lightweight as possible with the least possible dependencies. So how can I want git (or even git-lite) installed when it has more dependencies than all the other applications together?

Gitup as a standalone executable could be an ideal alternative to portsnap, especially if FreeBSD devs decide to include it in the base as they did in the past with svnlite and portsnap.

Great job jmehr!👍
 

ShelLuser

Son of Beastie

Reaction score: 2,066
Messages: 3,774

I have to agree with drhowarddrfine up there, I also fail to understand all the fuzz about making something so trivial a lot harder ;) If you want the ports collection then all it takes is one command: # git clone https://git.freebsd.org/ports.git /usr/ports and from there all you need is to run git pull from within /usr/ports to keep things up to date.

Do you want to keep track of a quarterly release? Just take your pick: git branch -r and switch if needed. For example, after the above commands I could use git switch origin/2021q2 to solely use the state of the second quarterly release.

This setup also gives you way more flexibility.
 

drhowarddrfine

Son of Beastie

Reaction score: 2,096
Messages: 4,107

So how can I want git (or even git-lite) installed when it has more dependencies than all the other applications together?
Not my point. My point is that people now want to install gitup which (I have not looked) I assume installs git. So an application for an application when one can just install git-lite and accomplish the same thing on their own. Or do I not understand exactly how gitup makes life easier than git clone https://git.freebsd.org/ports.git /usr/ports?
 

drhowarddrfine

Son of Beastie

Reaction score: 2,096
Messages: 4,107

So gitup is not git but does the same thing as git? Now I'm really confused.

And if gitup is not git, then you lose the value of having git should you need it?
 

Zirias

Daemon

Reaction score: 1,313
Messages: 2,340

Again, the whole point of gitup is to be minimal and dependency-free. And no, it doesn't do the same as git. There's a whole lot of things you can't do with gitup. It just uses the git protocol to update a local file tree from a remote git repository and that's it. More or less a replacement for portsnap using the repository as its source (just as svnup did with subversion).
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,190
Messages: 37,326

So gitup is not git but does the same thing as git? Now I'm really confused.
Do you remember net/cvsup-without-gui or svnup(1)? Same idea. It's just a really toned down client, only capable of getting the latest versions from CVS, SVN and now with net/gitup git. Intended for people that don't need (or want) a full fledged VCS but want to grab the latest ports or source trees.
 
Top