Discussion:
I run poudriere - what do I need to do once ports switch over to git?
Rainer Duffner
2021-04-07 09:11:44 UTC
Permalink
Hi,
subject says it all, basically.
Do I have to re-checkout the ports-trees?
What about going to FreeBSD 13, which supposedly(?) has base-packages?
Essentially, yes. You will need to create a new ports tree which pulls from the FreeBSD git and tweak your poudriere setup to use that instead of your original SVN-based setup. eg.
poudriere ports -c -p ports-git -m git -B main
(Or delete your original ports tree and re-create it from git using the same name for simplicity.)
Alternatively you can clone the ports from git separately and then tell poudriere to null-mount it into the build jails. That means you can eg. use worktrees to check out different branches from a single copy of the repo, and map those onto poudriere. Effectively it allows you to have full control over your local git repo rather than letting poudriere do its usual thing.
FreeBSD-13 does have base system packages available -- I /think/ there has been some work on building them via poudriere, but I don't know what the status of that is. You can pretty easily just checkout /usr/src and then run `make buildworld buildkernel packages` which will create a repository under /usr/obj -- either use that as a 'file' based repo, or point nginx at it. Probably best to play with base system packages on a throw-away VM before trying to use it on anything important: until you've got it properly fettled, there's a risk of stomping all over important files like /etc/passwd
Cheers,
Matthew
Hi,

this does not work:


***@bsd1-build-prod:~ # poudriere ports -cvv -B branches/2021Q2 -m git -p 2021Q2
=>> Debug: Reading /usr/local/etc/poudriere.conf
[00:00:01] Creating 2021Q2 fs at /usr/local/poudriere/ports/2021Q2... done
[00:00:01] Cloning the ports tree...Cloning into '/usr/local/poudriere/ports/2021Q2'...
warning: Could not find remote branch branches/2021Q2 to clone.
fatal: Remote branch branches/2021Q2 not found in upstream origin
[00:00:01] Error: fail
[00:00:01] Error while creating ports tree, cleaning up.
***@bsd1-build-prod:~ # pkg info poudriere
poudriere-3.3.6
Name : poudriere
Version : 3.3.6
Installed on : Tue Jan 5 09:33:28 2021 CET
Origin : ports-mgmt/poudriere
Architecture : FreeBSD:12:amd64
Prefix : /usr/local
Categories : ports-mgmt
Licenses : BSD2CLAUSE
Maintainer : ***@FreeBSD.org
WWW : https://github.com/freebsd/poudriere/wiki
Comment : Port build and test system
Options :
BASH : on
CERTS : on
DIALOG4PORTS : on
EXAMPLES : on
QEMU : off
ZSH : on
Annotations :
FreeBSD_version: 1202000
repo_type : binary
repository : EveryWare
Flat size : 2.23MiB
Description :
poudriere is a tool primarily designed to test package production on
FreeBSD. However, most people will find it useful to bulk build ports
for FreeBSD.

WWW: https://github.com/freebsd/poudriere/wiki






Rainer
Mathieu Arnold
2021-04-07 13:03:36 UTC
Permalink
poudriere ports -cvv -B 2021Q2 -m git -p 2021Q2
--
Mathieu Arnold
Rainer Duffner
2021-04-07 13:48:37 UTC
Permalink
Post by Mathieu Arnold
poudriere ports -cvv -B 2021Q2 -m git -p 2021Q2
Ah, OK.
Thanks!

But it still does not work:


***@bsd1-build-prod:~ # poudriere ports -cvv -B 2021Q2 -m git -p 2021Q2
=>> Debug: Reading /usr/local/etc/poudriere.conf
[00:00:00] Creating 2021Q2 fs at /usr/local/poudriere/ports/2021Q2... done
[00:00:00] Cloning the ports tree...Cloning into '/usr/local/poudriere/ports/2021Q2'...
warning: Could not find remote branch 2021Q2 to clone.
fatal: Remote branch 2021Q2 not found in upstream origin
[00:00:00] Error: fail
[00:00:00] Error while creating ports tree, cleaning up.





Best Regards
Rainer
Michael Grimm
2021-04-07 14:45:17 UTC
Permalink
Post by Rainer Duffner
Post by Mathieu Arnold
poudriere ports -cvv -B 2021Q2 -m git -p 2021Q2
=>> Debug: Reading /usr/local/etc/poudriere.conf
[00:00:00] Creating 2021Q2 fs at /usr/local/poudriere/ports/2021Q2... done
[00:00:00] Cloning the ports tree...Cloning into '/usr/local/poudriere/ports/2021Q2'...
warning: Could not find remote branch 2021Q2 to clone.
fatal: Remote branch 2021Q2 not found in upstream origin
[00:00:00] Error: fail
[00:00:00] Error while creating ports tree, cleaning up.
I didn't follow this thread completetly, thus the following might have been mentioned before.

2021Q2 has been build very recently, thus older git repositories don't include it.

Thus, what does your poudriere.conf show for FREEBSD_HOST?

Mine is: FREEBSD_HOST=https://cgit.freebsd.org/ports.git
I had had to change this to the current repo yesterday.

Regards,
Michael
Rainer Duffner
2021-04-07 14:51:26 UTC
Permalink
Post by Michael Grimm
Post by Rainer Duffner
Post by Mathieu Arnold
poudriere ports -cvv -B 2021Q2 -m git -p 2021Q2
=>> Debug: Reading /usr/local/etc/poudriere.conf
[00:00:00] Creating 2021Q2 fs at /usr/local/poudriere/ports/2021Q2... done
[00:00:00] Cloning the ports tree...Cloning into '/usr/local/poudriere/ports/2021Q2'...
warning: Could not find remote branch 2021Q2 to clone.
fatal: Remote branch 2021Q2 not found in upstream origin
[00:00:00] Error: fail
[00:00:00] Error while creating ports tree, cleaning up.
I didn't follow this thread completetly, thus the following might have been mentioned before.
2021Q2 has been build very recently, thus older git repositories don't include it.
Thus, what does your poudriere.conf show for FREEBSD_HOST?
Mine is: FREEBSD_HOST=https://cgit.freebsd.org/ports.git
I had had to change this to the current repo yesterday.
It was:

FREEBSD_HOST=http://ftp5.de.freebsd.org

Changing it to you setting does not change the outcome, unfortunately.

***@bsd1-build-prod:~ # poudriere ports -cvvv -B 2021Q2 -m git -p 2021Q2
=>> Debug: Reading /usr/local/etc/poudriere.conf
[00:00:00] Creating 2021Q2 fs at /usr/local/poudriere/ports/2021Q2... done
[00:00:00] Dev: cache_invalidate: Invalidating _zfs_getfs(/usr/local/poudriere/ports/2021Q2)
[00:00:00] Cloning the ports tree...Cloning into '/usr/local/poudriere/ports/2021Q2'...
warning: Could not find remote branch 2021Q2 to clone.
fatal: Remote branch 2021Q2 not found in upstream origin
[00:00:00] Error: fail
[00:00:00] Error while creating ports tree, cleaning up.
[00:00:00] Dev: cache_call: Fetching _zfs_getfs(/usr/local/poudriere/ports/2021Q2)
[00:00:01] Dev: cache_invalidate: Invalidating _zfs_getfs(/usr/local/poudriere/ports/2021Q2)



Is there a way to see what it actually wants to do with git?




Rainer
tech-lists
2021-04-07 15:07:38 UTC
Permalink
Post by Rainer Duffner
FREEBSD_HOST=http://ftp5.de.freebsd.org
that's the setting for getting freebsd sources

you want this:

GIT_BASEURL=git.freebsd.org/ports.git
--
J.
tech-lists
2021-04-07 16:19:40 UTC
Permalink
Post by tech-lists
Post by Rainer Duffner
FREEBSD_HOST=http://ftp5.de.freebsd.org
that's the setting for getting freebsd sources
GIT_BASEURL=git.freebsd.org/ports.git
seems this doesn't work either.

I've had to set the ports tree that poudriere uses to the system ports
tree /usr/ports. Make poudriere tree like poudriere ports -m null -M
/usr/ports and update /usr/ports externally like git pull --ff-only
--
J.
Michael Grimm
2021-04-07 15:08:03 UTC
Permalink
Post by Rainer Duffner
Post by Michael Grimm
Mine is: FREEBSD_HOST=https://cgit.freebsd.org/ports.git
FREEBSD_HOST=http://ftp5.de.freebsd.org
Changing it to you setting does not change the outcome, unfortunately.
[same error message]
Post by Rainer Duffner
Is there a way to see what it actually wants to do with git?
Go to your ports directory and check your config by:

mwn> git config -l
user.name=Michael Grimm
user.mail=***@ellael.org
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
check this url:
remote.origin.url=https://git.freebsd.org/ports.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main

I did check and 'poudriere ports -v -u' doesn't use the above mentioned FREEBSD_HOST at all.
Sorry for the noise.

As mentioned before I didn't follow this thread from the beginning.

Here what I did for following main (change this to 2021Q2):

#) install devel/***@tiny
#) git clone https://git.freebsd.org/ports.git --branch main /usr/home/poudriere/ports/default

Done.

Regards,
Michael
Rainer Duffner
2021-04-07 15:19:58 UTC
Permalink
Post by Michael Grimm
Post by Rainer Duffner
Post by Michael Grimm
Mine is: FREEBSD_HOST=https://cgit.freebsd.org/ports.git
FREEBSD_HOST=http://ftp5.de.freebsd.org
Changing it to you setting does not change the outcome, unfortunately.
[same error message]
Post by Rainer Duffner
Is there a way to see what it actually wants to do with git?
mwn> git config -l
user.name=Michael Grimm
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://git.freebsd.org/ports.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main
I did check and 'poudriere ports -v -u' doesn't use the above mentioned FREEBSD_HOST at all.
Sorry for the noise.
Well, 2021Q2 does not exist in /usr/local/poudriere/ports, yet. Probably because checking out the sources doesn’t work….
Post by Michael Grimm
As mentioned before I didn't follow this thread from the beginning.
#) git clone https://git.freebsd.org/ports.git --branch main /usr/home/poudriere/ports/default
Done.
Regards,
Michael
Do I really need clone the repo outside of poudriere?

I thought this is poudriere ports -c is supposed to do?

The poudriere documentation is rather sparse on the use of git so far…





Rainer
Michael Grimm
2021-04-07 15:44:17 UTC
Permalink
Post by Rainer Duffner
Well, 2021Q2 does not exist in /usr/local/poudriere/ports, yet. Probably because checking out the sources doesn’t work….
Yes.
Post by Rainer Duffner
Post by Michael Grimm
#) git clone https://git.freebsd.org/ports.git --branch main /usr/home/poudriere/ports/default
Done.
Do I really need clone the repo outside of poudriere?
I thought this is poudriere ports -c is supposed to do?
The poudriere documentation is rather sparse on the use of git so far…
Honestly, I didn't even think about using poudriere to fill my /usr/home/poudriere/ports/default repo, because I have been doing the same during the migration for /usr/src from svn to git. And because I am following main, I will only have to do this once ;-)

Sorry, but I am lost here. I do not know how to use poudriere's functionality to achieve what you want to do. Others need to help.

Regards,
Michael
Loading...