Poudriere setup to compile from GhostBSD 14.0 Stable source code github.com/ghostbsd/ghostbsd-src

https://man.freebsd.org/cgi/man.cgi?query=poudriere-jail&sektion=8&apropos=0&manpath=FreeBSD+13.2-RELEASE+and+Ports Poudriere setup to compile from GhostBSD 14.0 Stable source code  github.com/ghostbsd/ghostbsd-src 





Will do better on the graphic above. Use  Red Ryder Computer #1 running Poudriere build and running NGINX web server, IP number 192.168.1.7

Tin Can Computer #2  is the client computer looking to install new software pkgs to his base software.  Like  pkg install xorg xfce on his base GhostBSD kernel build 14.0 or 15.0.  IP number 192.168.1.23

REDRYDER Computer #1 files:

/etc/pkg/FreeBSD.conf    DON'T EDIT this file at this location. Leave it alone.

mkdir -p /usr/local/etc/pkg/repos
echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
cp -p /etc/pkg/FreeBSD.conf  /usr/local/etc/pkg/repos/GhostBSD.conf 

/usr/local/etc/pkg/repos/FreeBSD.conf    Yes, you may Edit this file.  Its location and use will be superior (used in place of the contents of the files in directory /etc/pkg )

The file /usr/local/etc/pkg/repos/FreeBSD.conf with contents { enabled: no } will turn off accessing  pkg.FreeBSD.org for software packages.  This allows you to use a local network Nginx Web server on RedRyder Computer #1 to serve fresh built Poudriere build packages to a networked client computer, Tin Can Computer #2.  Edit and setup up file /usr/local/etc/pkg/repos/GhostBSD.conf on Tin Can Computer.  Point the line in the file GhostBSD.conf "url: network protocol and address to either one of these.  These examples help to answer what address to use.

  • url: file:///packages/ghostbsd-14-0-aarch64-default/    
    • This worked to get pkg.txz, fetched and installed to bootstrap pkg.
  • url: file:///packages/ghostbsd-14-0-aarch64-default/latest
  • url: file:///packages/ghostbsd-14-0-aarch64-default/All
  • url: http://192.168.1.57/packages/ghostbsd-14-0-aarch64-default/latest
  • url: http://192.168.1.57/packages/ghostbsd-14-0-aarch64-default/All

9.5. Poudriere

For a ports contributor, Poudriere is one of the most important and helpful testing and build tools. Its main features include:

https://people.freebsd.org/~blackend/doc/en/books/porters-handbook/testing-poudriere.html

9.5.2. Setting Up Poudriere

9.5.3. Creating Poudriere Jails

Create the base jails which Poudriere will use for building:

# poudriere jail -c -j 93Ramd64 -v 9.3-RELEASE -a amd64

Fetch a 9.3-RELEASE for amd64 from the FTP server given by FREEBSD_HOST in poudriere.conf, create the zfs file system tank/poudriere/jails/93Ramd64, mount it on /poudriere/jails/93Ramd64 and extract the 9.3-RELEASE tarballs into this file system.

# poudriere jail -c -j 10i386 -v stable/10 -a i386 -m svn+https

Create tank/poudriere/jails/10i386, mount it on /poudriere/jails/10i386, then check out the tip of the Subversion branch of FreeBSD-10-STABLE from SVN_HOST in poudriere.conf into /poudriere/jails/10i386/usr/src, then complete a buildworld and install it into /poudriere/jails/10i386.

Tip:

If a specific Subversion revision is needed, append it to the version string. For example:

# poudriere jail -c -j 10i386 -v stable/10@123456 -a i386 -m svn+https

Note:

While it is possible to build a newer version of FreeBSD on an older version, most of the time it will not run. For example, if a stable/10 jail is needed, the host will have to run stable/10 too. Running 10.0-RELEASE is not enough.

Caution:

The default svn protocol works but is not very secure. Using svn+https along with verifying the remote server's SSL fingerprint is advised. It will ensure that the files used for building the jail are from a trusted source.

A list of jails currently known to Poudriere can be shown with poudriere jail -l:

# poudriere jail -l
JAILNAME             VERSION              ARCH    METHOD
93Ramd64             9.3-RELEASE          amd64   ftp
10i386               10.0-STABLE          i386    svn+https

9.5.4. Keeping Poudriere Jails Updated

Managing updates is very straightforward. The command:

# poudriere jail -u -j JAILNAME

updates the specified jail to the latest version available. For FreeBSD releases, update to the latest patchlevel with freebsd-update(8). For FreeBSD versions built from source, update to the latest Subversion revision in the branch.

Tip:

For jails employing a svn+* method, it is helpful to add -J NumberOfParallelBuildJobs to speed up the build by increasing the number of parallel compile jobs used. For example, if the building machine has 6 CPUs, use:

# poudriere jail -u -J 6 -j JAILNAME

 

 

Poudriere Important Files to wrangle with, pay attention to these settings

/usr/local/etc/poudriere.conf  /usr/local/etc/poudriere.conf

/usr/local/share/poudriere/  files common.sh 

 

NGINX Important Files to wrangle with

/usr/local/etc/nginx/nginx.conf
/usr/local/etc/nginx/mime.types





URLs to read about setting up Poudriere, Nginx, CCache on Red Ryder 192.168.1.7

https://vermaden.wordpress.com/2023/08/10/freebsd-on-freeipa-idm-with-poudriere-repo/

https://vermaden.wordpress.com/2023/08/10/freebsd-on-freeipa-idm-with-poudriere-repo/



https://vermaden.wordpress.com/2023/08/10/freebsd-on-freeipa-idm-with-poudriere-repo/  Using this Vermaden Poudriere Repo Webpage


REDRYDER Computer #1 FreeBSD.conf repository file configuration
ie.  Where do I find my source for package files across the network to a location like the FreeBSD hosted package servers 
   url: "http://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest",
  mirror_type: "srv"
  • url:  uniform resource locator:  
      • protocol http  port 80 
      • plain  https port 443 secure   
      • ftp  port 21  file transfer protocol 
    pkg.FreeBSD.org    Domain Naming Service string that is changed into an IP number for use on the internet
    FreeBSD:14:aarch64  Triplet that represents: 
  • OS Operating system name: FreeBSD 
  • OS Version: 14
  • OS Architecture Type aarch64 : x86 : x86_64 : powerpc : powerpc64 : aarch32 etc

Kind of Sofware Release in those packages:   The file name, 'latest' or 'Quarterly' matches a directory name below the BASEROOT software directory in the Poudriere Configuration file poudreier.conf

  • latest (lower case L) for the latest softwre releases 
  • Quartery Quarterly 4 times a year releases of FreeBSD software updates to RELEASE Software

mirror_type:  3 or 4 style available 

  • srv   server record variable type.  Use this only with FreeBSD server mirrors.  This allows redirection from the main IP number to other IP server mirrors to spread the load out among several mirrors, not only just the main mirror IP number.
  • none  Use this for 99% of the time for your local personal Poudriere Build servers. 
  • http   Use this for over the internet past the firewall router, http connections.
  • ftp    Use this for  file transfer protocol  connections
ie.  Where do I find my source for package files across the local network to a 
    like the local Poudriere build Nginx package servers. 

 
   url: "http://poudriere-devel.lab.org/FreeBSD:14:aarch64/latest",
  mirror_type: "none"

 
# mkdir -p /usr/local/etc/pkg/repos

# sed s-quarterly-latest-g /etc/pkg/FreeBSD.conf > /usr/local/etc/pkg/repos/FreeBSD.conf

root@fredselfbuilt_rpi4b:~ # cp -p /etc/pkg/FreeBSD.conf /usr/local/etc/pkg/repos/FreeBSD.conf
root@fredselfbuilt_rpi4b:~ # cat /usr/local/etc/pkg/repos/FreeBSD.conf
# $FreeBSD$
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

FreeBSD: {
#   url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
#   url: "pkg+http://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest",
   url: "http://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

We will now install the needed packages.

 pkg install -y \
    poudriere-devel \
    nginx           \
    git-lite        \
    ccache4         \
    tree
 
DID not Realize that I was going- to overwrite an existing executing running Poudriere Build of 
ghostbsd-13-2-aarch64-default   OOPS!! 
 
root@fredselfbuilt_rpi4b:~ # echo We will now install the needed packages.
We will now install the needed packages.
root@fredselfbuilt_rpi4b:~ # pkg install -y \
> poudriere-devel \
> nginx \
> git-lite \
> ccache4 \
> tree
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 4 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
git-lite: 2.42.0
poudriere-devel: 3.3.99.20220831

Installed packages to be UPGRADED:
nginx: 1.24.0_11,3 -> 1.24.0_12,3

Installed packages to be REINSTALLED:
tree-2.1.0 (ABI changed: 'freebsd:15:aarch64:64' -> 'freebsd:14:aarch64:64')

Number of packages to be installed: 2
Number of packages to be upgraded: 1
Number of packages to be reinstalled: 1

The process will require 35 MiB more space.
7 MiB to be downloaded.
[1/4] Fetching tree-2.1.0.pkg: 100% 46 KiB 46.7kB/s 00:01
[2/4] Fetching nginx-1.24.0_12,3.pkg: 100% 471 KiB 482.7kB/s 00:01
[3/4] Fetching poudriere-devel-3.3.99.20220831.pkg: 100% 769 KiB 787.8kB/s 00:01
[4/4] Fetching git-lite-2.42.0.pkg: 100% 6 MiB 6.5MB/s 00:01
Checking integrity... done (2 conflicting)
- poudriere-devel-3.3.99.20220831 conflicts with poudriere-3.3.7_1 on /usr/local/bin/poudriere
- git-lite-2.42.0 conflicts with git-2.42.0 on /usr/local/bin/git
Checking integrity... done (0 conflicting)
Conflicts with the existing packages have been found.
One more solver iteration is needed to resolve them.
The following 8 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
git: 2.42.0
poudriere: 3.3.7_1

New packages to be INSTALLED:
git-lite: 2.42.0
poudriere-devel: 3.3.99.20220831

Installed packages to be UPGRADED:
nginx: 1.24.0_11,3 -> 1.24.0_12,3

Installed packages to be REINSTALLED:
libXext-1.3.4,1
pkg-1.20.7
tree-2.1.0 (ABI changed: 'freebsd:15:aarch64:64' -> 'freebsd:14:aarch64:64')

Number of packages to be removed: 2
Number of packages to be installed: 2
Number of packages to be upgraded: 1
Number of packages to be reinstalled: 3

The operation will free 1 MiB.
10 MiB to be downloaded.
[1/2] Fetching pkg-1.20.7.pkg: 100% 10 MiB 5.2MB/s 00:02
[2/2] Fetching libXext-1.3.4,1.pkg: 100% 97 KiB 98.8kB/s 00:01
[1/8] Deinstalling poudriere-3.3.7_1...
[1/8] Deleting files for poudriere-3.3.7_1: 100%
[2/8] Deinstalling git-2.42.0...
[2/8] Deleting files for git-2.42.0: 100%
[3/8] Reinstalling pkg-1.20.7...
[3/8] Extracting pkg-1.20.7: 100%
/etc/rc.conf: sendmail_enable-NONE: not found
/etc/rc.conf: sendmail_enable-NONE: not found
[4/8] Reinstalling tree-2.1.0...
[4/8] Extracting tree-2.1.0: 100%
[5/8] Upgrading nginx from 1.24.0_11,3 to 1.24.0_12,3...
===> Creating groups.
Using existing group 'www'.
===> Creating users
Using existing user 'www'.
[5/8] Extracting nginx-1.24.0_12,3: 100%
[6/8] Installing poudriere-devel-3.3.99.20220831...
[6/8] Extracting poudriere-devel-3.3.99.20220831: 100%
[7/8] Installing git-lite-2.42.0...
===> Creating groups.
Creating group 'git_daemon' with gid '964'.
===> Creating users
Creating user 'git_daemon' with uid '964'.
[7/8] Extracting git-lite-2.42.0: 100%
[8/8] Reinstalling libXext-1.3.4,1...
[8/8] Extracting libXext-1.3.4,1: 100%
/etc/rc.conf: sendmail_enable-NONE: not found
/etc/rc.conf: sendmail_enable-NONE: not found
You may need to manually remove /usr/local/etc/poudriere.conf if it is no longer needed.
You may need to manually remove /usr/local/etc/pkg.conf if it is no longer needed.
You may need to manually remove /usr/local/etc/nginx/mime.types if it is no longer needed.
You may need to manually remove /usr/local/etc/nginx/nginx.conf if it is no longer needed.
=====
Message from git-lite-2.42.0:

--
If you installed the GITWEB option please follow these instructions:

In the directory /usr/local/share/examples/git/gitweb you can find all files to
make gitweb work as a public repository on the web.

All you have to do to make gitweb work is:
1) Please be sure you're able to execute CGI scripts in
/usr/local/share/examples/git/gitweb.
2) Set the GITWEB_CONFIG variable in your webserver's config to
/usr/local/etc/git/gitweb.conf. This variable is passed to gitweb.cgi.
3) Restart server.


If you installed the CONTRIB option please note that the scripts are
installed in /usr/local/share/git-core/contrib. Some of them require
other ports to be installed (perl, python, etc), which you may need to
install manually.
root@fredselfbuilt_rpi4b:~ #
root@fredselfbuilt_rpi4b:~ #

 
 
 

FreeBSD Configuration for NGINX web server

  Main FreeBSD config.  enabling NGINX web server

# cat /etc/rc.conf

 root@fredselfbuilt_rpi4b:/etc # cat /etc/rc.conf
# NETWORK
hostname="fredselfbuilt_rpi4b"
defaultrouter="192.168.1.1"   # for my Raspberry Pi 4B network
ifconfig_genet0="DCHP"

# DAEMONS  
syslogd_flags="-ss"
sshd_enable="YES"
zfs_enable="YES"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
nginx_enable="YES"

background_dhclient="YES"
sendmail_enable="NONE"

# OTHER  
clear_tmp_enable="YES"
dumpdev=AUTO



HOSTS

and /etc/hosts file.

cat /etc/hosts

# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1            localhost localhost.my.domain
127.0.0.1        localhost localhost.my.domain

192.168.1.7     redryder-devel.lab.org redryder-devel

# Imaginary network.
#10.0.0.2        myname.my.domain myname
#10.0.0.3        myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP blocks for
# private internets:
#
#    10.0.0.0    -   10.255.255.255    (10/8 prefix)
#    172.16.0.0    -   172.31.255.255    (172.16/12 prefix)
#    192.168.0.0    -   192.168.255.255    (192.168/16 prefix)
#
# In case you want to make addresses available on the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#

 


Now the SSL keys.

# SSL=/usr/local/etc/ssl

# mkdir -p            /usr/ports/distfiles \
                      ${SSL}/keys \
                      ${SSL}/certs

# chmod 0600          ${SSL}/keys

# openssl genrsa -out ${SSL}/keys/poudriere.key 4096

# openssl rsa     -in ${SSL}/keys/poudriere.key -pubout \
                 -out ${SSL}/certs/poudriere.cert 
 
 
 

… and ZFS datasets.

  # zfs create -o mountpoint=/usr/local/poudriere zroot/poudriere 

 # zfs create -o mountpoint=/var/ccache zroot/var/ccache

 

Now the Poudriere config.

# IP=10.0.0.122 # cat < /usr/local/etc/poudriere.conf
ZPOOL=zroot
BASEFS=/usr/local/poudriere
ZROOTFS=/usr/local/poudriere
FREEBSD_HOST=ftp://ftp.freebsd.org
POUDRIERE_DATA=/usr/local/poudriere/data CHECK_CHANGED_OPTIONS=verbose
CHECK_CHANGED_DEPS=yes
PKG_REPO_SIGNING_
KEY=/usr/local/etc/ssl/keys/poudriere.key
URL_BASE=http://${IP}/
USE_TMPFS=no
TMPFS_LIMIT=12
MAX_MEMORY=12
PARALLEL_JOBS=4
PREPARE_PARALLEL_JOBS=4
MAX_FILES=4096
DISTFILES_CACHE=/usr/ports/distfiles
KEEP_OLD_PACKAGES=yes
KEEP_OLD_PACKAGES_COUNT=3
CHECK_CHANGED_OPTIONS=verbose
CHECK_CHANGED_DEPS=yes
CCACHE_DIR=/var/ccache
RESTRICT_NETWORKING=no
EOF

… and symlink for certificate that we will use later.

# ln -s /usr/local/etc/ssl/certs/poudriere.cert /usr/local/poudriere/data/logs/bulk/poudriere.cert

Nginx Setup

Simple Nginx config to host the packages. Change txt & log filenames to display as text file.  Set the MIME TYPE in file /usr/local/etc/nginx/mime.types

# IP=10.0.0.122
# service nginx enable
# sed -i '' -E 's|text/plain[\t\ ]*txt|text/plain txt log|g' /usr/local/etc/nginx/mime.types 
# cat < /usr/local/etc/nginx/nginx.conf
events {
  worker_connections 1024;
}

http {
  include      mime.types;
  default_type application/octet-stream;

  server {
    listen 80 default;
    server_name ${IP};
    root /usr/local/share/poudriere/html;

    location /data {
      alias /usr/local/poudriere/data/logs/bulk;
      autoindex on;
    }

    location /packages {
      root /usr/local/poudriere/data;
      autoindex on;
    }
  }
}
 EOF
 
# service nginx restart 
 

NGINX file contents explained 
 server {
    listen 80 default;
    server_name ${IP};
    root /usr/local/share/poudriere/html;
This setting produces the Poudriere Build Data in HTML data format to view with a WEB Browser 
pointed to the base IP number on port 80, type this into web browser http://192.168.7/
or http://poudriere-devel.lab.org . Note: Use http: NOT https: for this web server.
http: protocol refers to access the web server at Network port 80
https: protocol refers to access the web server at Network port 443
"listen 80 default:" selects the port number to use
directory /usr/local/share/poudriere/html/  file index.html  contains the first 
html web page for display and navigation of the Poudriere Build Status web page on this 
computer RedRyder Computer #1.


    location /data {
      alias /usr/local/poudriere/data/logs/bulk;
      autoindex on;
    }

This location setting is where the bulk log files are stored. When you click on that error reason
display on the Poudriere build log, the Nginx web server pulls up that build log file for you
to read and determine why the build failed. This is where the work happens behind the scenes.

    location /packages {
      root /usr/local/poudriere/data;
      autoindex on;
    }
This location setting is where the packages are available for pickup from RedRyder Computer #1 Nginx Web Server.
 at the root location of  /usr/local/poudriere/data .  In this poudriere/data directory are 3 sub directories
cache,  logs, packages.  Underneath packages is the 'NAMED build' you created with the poudriere create jail command:
Example:  "poudriere jail -c -j ghostbsd-14-aarch64  -m src=/usr/ghostbsd-src
Named Build:
ghostbsd-14-aarch64-default 
Full path name: /usr/local/poudriere/data/packages/
ghostbsd-14-aarch64-default/
Nginx
web served root path: /packages/ghostbsd-14-aarch64-default/
Setup Nginx to build a private local webserver for Poudriere Build packages.  Set up, Edit the 
contents the configuration file "FreeBSD.conf" on Tin Can Computer #2 at location
/usr/local/etc/pkg/repos/FreeBSD.conf

FreeBSD.conf file url line: url:  http://192.168.1.7/packages/ghostbsd-14-aarch64-default/
   url: "http://pkg.FreeBSD.org/FreeBSD:14:aarch64/latest",
  mirror_type: "srv", 
 



Download the source code for GhostBSD 14.0-STABLE from Ghost Repository
mkdir -p /usr/ghost14
cd /usr/ghost14
git clone -b stable/14 https://github.com/ghostbsd/ghostbsd-src.git




Eric Turgeon, [9/3/23 5:19 AM]
you need to do make -j4 buildworld buildkernel TARGET_ARCH=aarch64 in the ghostbsd-src folder.

Eric Turgeon, [9/3/23 5:20 AM]
and poudriere jail -c -j ghostbsd-14-aarch64 -m src=/path/to/ghostbsd-src

example poudriere jail -c -j ghostbsd-14-aarch64 -m src=/usr/ghost14/ghostbsd-src

 


Fred Finster, [9/3/23 7:04 AM]
Yes,
su -
root password:
cd /usr
# git clone
# by the way if you want to build ghostbsd from stable/14 you can use
git clone -b stable/14 https://github.com/ghostbsd/ghostbsd-src.git

cd /usr/ghostbsd-src
time make -j4 buildworld buildkernel TARGET_ARCH=aarch64 KERNCONF=GENERIC-VCHIQ -DNO_CLEAN

It is running since yesterday morning, Eric. Thank you for this confirmation of the proper
command to use.

Fred Finster, [9/3/23 2:11 PM]
Is there a way you can run build kernel and help me fix errors in the print messages?
time make -j4 buildkernel TARGET_ARCH=aarch64 KERNCONF=GENERIC-VCHIQ -DNO_CLEAN

Thanks for looking Eric. I should try making "patch" files from the source code differences
to make it easy for you, too. make same changes. will google for patch file creation howto.
Fred

Eric Turgeon, [2/22/23 5:36 PM]

To create a poudriere jail on the Raspberry Pi 4B.

cd /usr/src
make -j4 buildworld buildkernel TARGET_ARCH=aarch64  KERNCONF=GENERIC-VCHIQ

poudriere jail -c -j freebsd-13-aarch64  -m src=/usr/src  ??FREEBSD??
poudriere jail -c -j ghostbsd-13-2-aarch64  -m src=/usr/ghostbsd-src  ??GhostBSD-13-2??
poudriere jail -c -j ghostbsd-14-aarch64  -m src=/usr/ghostbsd-src  ??GhostBSD-14??

To create  ghostbsd ports for poudriere
cd /usr/ghost14   ????
poudriere ports -c -p ghostbsd_ports -m git -U "https://github.com/ghostbsd/ghostbsd-ports" -B main

[00:00:00] Error: The ports name should not contain a dash (-). Poudriere will parse it as a SETNAME (-z).
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/ghost14 # 
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/ghost14 # poudriere ports -c -p ghostbsd_ports -m git -U "https://github.com/ghostbsd/ghostbsd-ports" -B main
[00:00:00] Error: The ports tree, ghostbsd_ports, already exists



To update ghostbsd ports source code to latest main version
cd /usr/ghost14
poudriere ports -u -p ghostbsd_ports -m git -U "https://github.com/ghostbsd/ghostbsd-ports" -B main
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/ghost14 # poudriere ports -u -p ghostbsd_ports -m git -U "https://github.com/ghostbsd/ghostbsd-ports" -B main
[00:00:00] Updating portstree "ghostbsd_ports" with git+https...fatal: not a git repository (or any of the parent directories): .git
[00:00:00] Error:  fail
root@Ghost14-selfbuilt-rpi4B-nginx-tst1:/usr/ghost14 #git clone https://github.com/ghostbsd/ghostbsd-ports


 
To create a Jail to use
 poudriere jail -c -j ghostbsd-14-aarch64  -m src=/usr/ghost14/ghostbsd-src

To bulk build packages 
poudriere bulk -j ghostbsd-13-aarch64  -p ghostbsd_ports -a
poudriere bulk -j ghostbsd-14-aarch64  -p ghostbsd_ports -f /usr/local/etc/poudriere.d/pkglist




Example from FreeBSD-Current Mailing list, October 2023

https://lists.freebsd.org/archives/freebsd-current/2023-October/004849.html

> Nuno Teixeira
> FreeBSD Committer (ports)

Shortage on /tmp?
If not, what happens when you run 
  `/tmp/poudriere.3homsGor/freebsd-update.1BURpmmK fetch`
as suggested by pudriere?

Or possibly your nearest mirror not yet has needed updates to fetch?

FYI: I'm using src upgrading and created poudriere jail as below

 `poudriere jail -c -v stable/14 -a amd64 -K kernname -j jailname \Nuno Teixeira <eduardo@freebsd.org> escreveu no dia sábado, 14/10/2023 à(s)
12:22:

> Hello all,
>
> I did try updating BETA1 -> BETA2, BETA2 -> BETA3, ..., BETA5 -> RC1 in
> poudriere:
>
> `poudriere jail -u -j JAIL -t 14.0-RC1`
>
> All fails with:
> ---
> <snip>
> /usr/src/sys/x86/x86/cpu_machdep.c
> /usr/src/tests/sys/netpfil/pf/pfsync.sh
> /usr/src/usr.bin/man/man.sh
> /var/db/etcupdate/log
> To install the downloaded upgrades, run
> "/tmp/poudriere.3homsGor/freebsd-update.1BURpmmK install".
> Installing updates... done.
> No updates are available to install.
> Run '/tmp/poudriere.3homsGor/freebsd-update.1BURpmmK fetch' first.
> [00:11:17] Error: Fail to upgrade system
> ---
>
> Any clues?
>
> Thanks,
>
> --
> Nuno Teixeira
> FreeBSD Committer (ports)
>
  -m src=/usr/src`

and didn't yet encountered problems on updating poudriere jail.
This way, poudriere uses pre-built objects under /usr/obj as default.

Regards.

-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp> 
EXAMPLE Poudriere create jail CLI:
`poudriere jail -c -v stable/14 -a amd64 -K kernname -j jailname \
  -m src=/usr/src`
 

AARCH64 example to use for build Raspberry Pi 4B GhostBSD pkgs on a FreeBSD 15.0-CURRENT running system

 poudriere jail -c -v stable/14 -a aarch64 -K kernel -j ghostbsd-14-RC3-aarch64 -m src=/usr/ghost14/ghostbsd-src
 https://man.freebsd.org/cgi/man.cgi?poudriere   Poudriere Manual pages for details on option usage
https://dan.langille.org/category/open-source/freebsd/poudriere/ Dan Langille Poudriere Blog Posts
https://dan.langille.org/2022/03/27/making-my-pkg-conf-configuration-version-independent/  pkg.conf
https://dan.langille.org/2023/02/20/moving-the-poudriere-jail-from-slocum-to-r730-01/ 
 
EXAMPLES
   Bulk	build of specific binary packages
       This  first  example  provides a	guide on how to	use poudriere for bulk
       build packages.

       [Prepare	infrastructure]

       First you have to create	a jail,	which will hold	all the	 building  in-
       frastructure needs.

	     poudriere jail -c -v 13.1-RELEASE -a amd64	-j 131amd64
 
  https://wiki.freebsd.org/f451/LTO.Poudriere.src.conf  use and copy this src.conf file to /usr/local/etc/poudriere.d/src.conf
added a couple lines
WITHOUT_CLEAN=yes
WITH_CCACHE_BUILD=/var/ccache
https://wiki.freebsd.org/f451/ UK  he is interested in a few Raspberry Pi things using FreeBSD.
 
https://zewaren.net/poudriere.html  Examples of using your own built packages

Use your pkg repository on other systems


Now that our packages are built, let's use them on other systems:

Make sure the config directory exists:

# mkdir -p /usr/local/etc/pkg/repos
Write a pkg repository config file in /usr/local/etc/pkg/repos/poudriere.conf:

poudriere: {
url: "http://pkg.example.com/packages/111x64-someports/",
mirror_type: "http",
enabled: yes,
priority: 100
}

Writing a secure version of this file is left as an exercise for the reader.

Update the local database:

# pkg update

Install your custom ports:

# pkg install custom-port

Enjoy your new custom ports infrastructure! 
 https://man.freebsd.org/cgi/man.cgi?query=poudriere-jail&sektion=8&apropos=0&manpath=FreeBSD+13.2-RELEASE+and+Ports
 Poudriere Jail  options
       -j name		Specify	the name of the	jail.

       -K kernelname	Install	the jail with the specified kernel  name.   If
			the kernelname is an empty string then GENERIC will be
			used.	If installing from FTP then the	default	kernel
			is installed and the value of kernelname is ignored. 
 
https://man.freebsd.org/cgi/man.cgi?query=build&sektion=7&apropos=0&manpath=FreeBSD+13.2-RELEASE+and+Ports 
BBuilD(7) 
       FETCH_BIND_ADDRESS  The	bind  address  used by fetch(1).  See fetch(3)
			   for more details.

       HTTP_PROXY HTTP_* http_*	FTP_PROXY FTP_*	http_* SSL_* NO_PROXY no_proxy
			   The proxy configuration for fetch(1).  See fetch(3)
			   for other supported proxy environment variables.

       MAKEOBJDIRPREFIX	   See	build(7)  and  the   implementation   of   the
			   poudriere jail command for more details.

       TERM		   Passed through for interactive modes. 
 
https://man.freebsd.org/cgi/man.cgi?query=ports&sektion=7&apropos=0&manpath=FreeBSD+13.2-RELEASE+and+Ports 
ports(7)  information
 
https://man.freebsd.org/cgi/man.cgi?query=pkg&sektion=8&apropos=0&manpath=FreeBSD+13.2-RELEASE+and+Ports 
pkg(8)  information
test
https://negativo17.org/category/freebsd/  https://negativo17.org/category/freebsd  From 2013, 14  Good to read and learn from


https://klarasystems.com/articles/customizing-freebsd-ports-and-packages/  Klara Systems article Customizing FreeBSD ports and packages



Poudriere create Jail lines:
poudriere jail -c -j ghostbsd14aarch64 -a arm64.aarch64 -v 14.0-RC3

poudriere jail -c -v 14 -a arm64.aarch64 -j ghostbsd-14-RC3-aarch64 -m src=/usr/ghost14/ghostbsd-src    Not working yet.  Might have to edit src.conf and src-env.conf files




Failed to fetch from ghostbsd-ports,  Look at Poudriere.conf , src-env.conf files

 poudriere jail -c -j ghostbsd14aarch64 -a arm64.aarch64 -S /usr/ghost14/ghostbsd-src -v stable/14 

poudriere jail -c -j ghostbsd-14-aarch64  -m src=/usr/ghost14/ghostbsd-src
This incantation is working right now.  Wish I had updated the ghostbsd-ports before hand.


--- installdirs-CONFSDIR ---
--- _CONFSINS_GhostBSD.conf ---
--- installdirs-CONFSDIR ---
installing DIRS CONFSDIR
install -N /usr/ghost14/ghostbsd-src/etc  -d -m 0755 -o root  -g wheel  /usr/local/poudriere/jails/ghostbsd-14-aarch64/etc/pkg
--- _CONFSINS_GhostBSD.conf ---


install -N /usr/ghost14/ghostbsd-src/etc  -C -o root  -g wheel -m 644  /usr/ghost14/ghostbsd-src/usr.sbin/pkg/GhostBSD.conf /usr/local/poudriere/jails/ghostbsd-14-aarch64/etc/pkg/GhostBSD.conf
[00:07:02] Recording filesystem state for clean... done
[00:07:02] Jail ghostbsd-14-aarch64 14.0-STABLE 1400500 arm64.aarch64 is ready to be used
root@fredselfbuilt_rpi4b:/usr/ghost14/ghostbsd-src #  


Start Poudriere Build with Jail

poudriere jail -l

poudriere ports -l

root@fredselfbuilt_rpi4b:/usr/ghost14/ghostbsd-src # poudriere jail -l
JAILNAME              VERSION              ARCH          METHOD                        TIMESTAMP           PATH
ghostbsd-13-2-aarch64 15.0-CURRENT 1500000 arm64.aarch64 src=/usr/src                  2023-08-26 12:36:12 /usr/local/poudriere/jails/ghostbsd-13-2-aarch64
ghostbsd-14-aarch64   14.0-STABLE 1400500  arm64.aarch64 src=/usr/ghost14/ghostbsd-src 2023-10-29 22:14:16 /usr/local/poudriere/jails/ghostbsd-14-aarch64
root@fredselfbuilt_rpi4b:/usr/ghost14/ghostbsd-src # poudriere ports -l
PORTSTREE      METHOD    TIMESTAMP           PATH
default        git+https 2023-10-20 23:48:08 /usr/local/poudriere/ports/default
ghostbsd_ports git+https 2023-10-29 00:17:21 /usr/local/poudriere/ports/ghostbsd_ports
root@fredselfbuilt_rpi4b:/usr/ghost14/ghostbsd-src #





Comments

Popular posts from this blog

HDMI Audio sound patches into GhostBSD source code /usr/ghost14/ghostbsd-src SOLVED Jan20 2024

How to install GhostBSD-Arm64 into a USB Flash Drive stick April 24, 2024 update edition.

January 19, 2024 Howto Download a Raspberry Pi 4B bootable image from http://ghostbsdarm64.hopto.org/packages/