johnmehr / gitup

A minimalist, dependency-free FreeBSD program to clone/pull Git repositories.
BSD 2-Clause "Simplified" License
51 stars 9 forks source link

gitup.conf, gitup.conf.sample: releng/13.2, stable/14 #99

Closed grahamperrin closed 1 year ago

grahamperrin commented 1 year ago

releng/11.4 is end of life, so update the release section of configuration files.

Whilst here: update the stable section.

grahamperrin commented 1 year ago

How is /usr/local/etc/gitup.conf.sample created?

I see https://github.com/freebsd/freebsd-ports/blob/main/net/gitup/pkg-post-install, however I'm confused because my local sample file (below) is so different from the gitup.conf in this repo.

My gitup.conf.sample ```text % pkg iinfo gitup gitup-0.98.8 % cat /usr/local/etc/gitup.conf.sample # $FreeBSD$ # # Default configuration options for gitup.conf. { "defaults" : { "host" : "git.freebsd.org", "port" : 443, # "proxy_host" : "", # "proxy_port" : 0, # "proxy_username" : "", # "proxy_password" : "", # "source_address" : "", "low_memory" : false, "display_depth" : 0, "verbosity" : 1, "work_directory" : "/var/db/gitup", }, "ports" : { "repository_path" : "/ports.git", "branch" : "main", "target_directory" : "/usr/ports", "ignores" : [], }, "quarterly" : { "repository_path" : "/ports.git", "branch" : "quarterly", "target_directory" : "/usr/ports", "ignores" : [], }, "release" : { "repository_path" : "/src.git", "branch" : "releng/11.4", "target_directory" : "/usr/src", "ignores" : [ "sys/[^\/]+/conf", ], }, "stable" : { "repository_path" : "/src.git", "branch" : "stable/12", "target_directory" : "/usr/src", "ignores" : [ "sys/[^\/]+/conf", ], }, "current" : { "repository_path" : "/src.git", "branch" : "main", "target_directory" : "/usr/src", "ignores" : [ "sys/[^\/]+/conf", ], } } % ```
MartinVonReichenberg commented 1 year ago

How is /usr/local/etc/gitup.conf.sample created?

I see https://github.com/freebsd/freebsd-ports/blob/main/net/gitup/pkg-post-install, however I'm confused because my local sample file (below) is so different from the gitup.conf in this repo.

My gitup.conf.sample ```text % pkg iinfo gitup gitup-0.98.8 % cat /usr/local/etc/gitup.conf.sample # $FreeBSD$ # # Default configuration options for gitup.conf. { "defaults" : { "host" : "git.freebsd.org", "port" : 443, # "proxy_host" : "", # "proxy_port" : 0, # "proxy_username" : "", # "proxy_password" : "", # "source_address" : "", "low_memory" : false, "display_depth" : 0, "verbosity" : 1, "work_directory" : "/var/db/gitup", }, "ports" : { "repository_path" : "/ports.git", "branch" : "main", "target_directory" : "/usr/ports", "ignores" : [], }, "quarterly" : { "repository_path" : "/ports.git", "branch" : "quarterly", "target_directory" : "/usr/ports", "ignores" : [], }, "release" : { "repository_path" : "/src.git", "branch" : "releng/11.4", "target_directory" : "/usr/src", "ignores" : [ "sys/[^\/]+/conf", ], }, "stable" : { "repository_path" : "/src.git", "branch" : "stable/12", "target_directory" : "/usr/src", "ignores" : [ "sys/[^\/]+/conf", ], }, "current" : { "repository_path" : "/src.git", "branch" : "main", "target_directory" : "/usr/src", "ignores" : [ "sys/[^\/]+/conf", ], } } % ```

The GitHub repository is not the primary place for making changes to internal FreeBSD software. FreeBSD developers use this cgit repository for committing changes to the software code: CGIT The file you are looking for is here: GitUP .

The link you are referring to is a post-installation script which is mentioning that gitup.conf.sample file . . .

grahamperrin commented 1 year ago

The file you are looking for is here: GitUP

No, gitup.conf was found before I made this pull request. Please see the Files changed tab.

johnmehr commented 1 year ago

Thank you!

MartinVonReichenberg commented 1 year ago

The file you are looking for is here: GitUP

No, gitup.conf was found before I made this pull request. Please see the Files changed tab.

But the initial question was: How is /usr/local/etc/gitup.conf.sample created?

The answer is simple.

It is made of the already mentioned gitup.conf file by telling the package builder (MAKEFILE) to create/make/install something out of something else (basically only in the terms of names) - Like in Alchemy:

34   ${INSTALL_DATA} ${WRKSRC}/gitup.conf \
35          ${STAGEDIR}${PREFIX}/etc/gitup.conf.sample

Mentioned in: https://cgit.freebsd.org/ports/tree/net/gitup/Makefile https://cgit.freebsd.org/ports/tree/net/gitup/files/pkg-message.in

So was I referring to that . . .

grahamperrin commented 1 year ago

Ah, thank you, @MartinVonReichenberg, yes, it was direction to https://github.com/freebsd/freebsd-ports/blob/83058c529515ca422e41893e158e321f7b4a3bce/net/gitup/Makefile#L34-L35 that I needed.

The two related comments are now hidden by me as resolved.


I was partly thrown by your mention of internal FreeBSD software.

I did, in May 2023, suggest inclusion of Gitup (and GoT) in base, for FreeBSD 14.0-RELEASE, however that was a private discussion (the developers@ list), whilst I was a committer.