Using pkg with poudriere - pkg.conf

FreeBSD-12.2p3

I have built a pkg and its dependencies thus:
Code:
poudriere ports -u -p PORTS-12-1 && poudriere bulk -C  -j freebsd_12-2x64  -p PORTS-12-2  -f  /root/Poudriere/poudr_redmine4.txt

Which results in:
Code:
ll /usr/local/poudriere/data/packages/
total 22
drwxr-xr-x  4 root  wheel  12 Jan 11 17:10 freebsd_12-1x64-PORTS-12-1
drwxr-xr-x  3 root  wheel  11 Feb 22 22:09 freebsd_12-2x64-PORTS-12-2


ll /usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2   
total 15
lrwxr-xr-x  1 root  wheel  18 Feb 18 11:13 .buildname -> .latest/.buildname
lrwxr-xr-x  1 root  wheel  20 Feb 18 11:13 .jailversion -> .latest/.jailversion
lrwxr-xr-x  1 root  wheel  16 Feb 22 22:09 .latest -> .real_1614049740
drwxr-xr-x  4 root  wheel   9 Feb 22 22:09 .real_1614049740
lrwxr-xr-x  1 root  wheel  11 Feb 18 11:13 All -> .latest/All
lrwxr-xr-x  1 root  wheel  14 Feb 18 11:13 Latest -> .latest/Latest
lrwxr-xr-x  1 root  wheel  17 Feb 18 11:13 meta.conf -> .latest/meta.conf
lrwxr-xr-x  1 root  wheel  16 Feb 18 11:13 meta.txz -> .latest/meta.txz
lrwxr-xr-x  1 root  wheel  23 Feb 18 11:13 packagesite.txz -> .latest/packagesite.txz

find /usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2/ -name \*redmine4\*
/usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2/.real_1614049740/All/redmine4-4.1.1_6.txz

The HOWTO on this says to configure pkg.conf ( pkg_poudiere.conf in my case) to contain:
Code:
myrepo: {
    url             : "file:///usr/local/poudriere/data/packages/releng112amd64-default",
    enabled         : yes,
    mirror_type     : NONE
}

Interpolating this I arrived at:
Code:
Poudriere-12-2: {
#   url: "http://192.168.216.41/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    url: "file:///usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    mirror_type: "none",
#    signature_type: "pubkey",
#    pubkey: "/usr/local/etc/pki/tls/certs/ca.harte-lyne.hamilton.vhost04.crt",
#    enabled: no
   enabled: yes
}

However, when I attempt to install using pkg I get this:
Code:
pkg install --dry-run --repository Poudriere-12-2 redmine4
Updating Poudriere-12-2 repository catalogue...
All repositories are up to date.
pkg: No packages available to install matching 'redmine4' have been found in the repositories

If I append /Latest to the url then I get the same result.

What have I missed or misunderstood? How is this supposed to work?
 
Do a pkg search redmine. I suspect the package is named slightly different. If there's still no package, look for build errors. It's either skipped due to a failed dependency or failed on its own. I recommend enabling the web interface (examples are in /usr/local/share/examples/poudriere/), it's much easier to look at the build status of a run. You can also use the same webserver to host the repositories for other machines on your network.
 
Nope. It's file=///usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2. It's <jailname>-<ports tree>, which is freebsd_12-2x64-PORTS-12-2 in your case.
Code:
Poudriere-12-2: {
    url: "file=///usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    mirror_type: "none",
#   signature_type: "pubkey",
#   pubkey: "/usr/local/etc/pki/tls/certs/ca.harte-lyne.hamilton.vhost04.crt",
    enabled: no
#   enabled: yes
}

pkg install --dry-run --repository Poudriere-12-2 redmine4
pkg: invalid url: file=///usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2
pkg: Cannot parse configuration file!

Code:
Poudriere-12-2: {
#   url: "http://192.168.216.41/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    "file=///usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    mirror_type: "none",
. . .
pkg install --dry-run --repository Poudriere-12-2 redmine4
Updating Poudriere-12-2 repository catalogue...
All repositories are up to date.
pkg: No packages available to install matching 'redmine4' have been found in the repositories
 
Yeah, mistyped that before I noticed you actually had it correct.
 
Code:
pkg search -x redmine
p5-WebService-Redmine-0.06     Perl interface to Redmine
redmine4-4.1.1_3               Flexible project management web application
rubygem-redmine_plugin_support-0.0.5 Collection of tools to make redmine plugin development easier

pkg search -r Poudriere-12-2 -x redmine

If the web interface you refer to is that for Poudriere then that is how I monitor the build. The build succeeded without error.

QueuedBuiltFailedSkippedIgnoredRemaining
1431430000
Load AveragesSwapinfoElapsedPkg/HourImpulse
( 8%) 1.20 1.30 1.2414.68%09:15:0616--
 
That Poudriere-12-2 repository is disabled.

Code:
Poudriere-12-2: {
    url: "file=///usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    mirror_type: "none",
#   signature_type: "pubkey",
#   pubkey: "/usr/local/etc/pki/tls/certs/ca.harte-lyne.hamilton.vhost04.crt",
    enabled: no
#   enabled: yes
}
Set to enabled: yes. You can double check which repositories are enabled by looking at pkg -vv.
 
I changed the configuration file to this
Code:
Poudriere-12-2-http: {
#   url: "http://192.168.216.41/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    url:  "http:///192.168.216.41/poudriere/packages/freebsd_12-2x64-PORTS-12-2",
    mirror_type: "http",
#    signature_type: "pubkey",
#    pubkey: "/usr/local/etc/pki/tls/certs/ca.harte-lyne.hamilton.vhost04.crt",
    enabled: yes
#   enabled: yes
}

and got this:
Code:
pkg install -f  --dry-run --repository Poudriere-12-2-http redmine4
Updating Poudriere-12-2-http repository catalogue...
pkg: http:///192.168.216.41/poudriere/packages/freebsd_12-2x64-PORTS-12-2/meta.txz: No address record
repository Poudriere-12-2-http has no meta file, using default settings
pkg: http:///192.168.216.41/poudriere/packages/freebsd_12-2x64-PORTS-12-2/packagesite.txz: No address record
Unable to update repository Poudriere-12-2-http
Error updating repositories!
 
That Poudriere-12-2 repository is disabled.
Yes, but the --repository option enables it nonetheless.

Code:
PKG-INSTALL(8)          FreeBSD System Manager's Manual         PKG-INSTALL(8)

NAME
     pkg install - install packages from remote package repositories or local
     archives

SYNOPSIS
     pkg install [-AfIMnFqRUy] [-r reponame] [-Cgix]
                 <pkg-origin|pkg-name|pkg-name-version> ...
. . .
     -r reponame, --repository reponame
                Install packages from only the named repository, irrespective
                of the configured "active" status from repo.conf.
. . .
 
You have one slash to many in the URL.
Thank you again.

Code:
Poudriere-12-2-http: {
#   url: "http://192.168.216.41/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    url:  "http://192.168.216.41/poudriere/packages/freebsd_12-2x64-PORTS-12-2",
    mirror_type: "http",
#    signature_type: "pubkey",
#    pubkey: "/usr/local/etc/pki/tls/certs/ca.harte-lyne.hamilton.vhost04.crt",
    enabled: yes
#   enabled: yes
}



pkg install -f  --dry-run --repository Poudriere-12-2-http redmine4
Updating Poudriere-12-2-http repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01   
Fetching packagesite.txz: 100%  115 KiB 117.9kB/s    00:01   
Processing entries: 100%
The provides database is up-to-date.
Poudriere-12-2-http repository update completed. 461 packages processed.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    rubygem-pg: 1.2.3 [Poudriere-12-2-http]

Installed packages to be UPGRADED:
    redmine4: 4.1.1_3 -> 4.1.1_6 [Poudriere-12-2-http]

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

2 MiB to be downloaded.
 
If you use nginx, use this for the package directory:
Code:
        location /packages {
                alias /usr/local/poudiere/data/packages;

                fancyindex on;
                }
That'll make the URL a little easier to handle. So you get http://192.168.216.41/packages/freebsd_12-2x64-PORTS-12-2
The fancyindex option requires that you enable HTTP_FANCYINDEX on www/nginx (it's off by default). You can leave that out, I just think it looks better for this.
 
The url: "file:///usr/local/poudriere/data/packages/freebsd_12-1x64-PORTS-12-1 still fails however.
 
In the URL you're using PORTS-12-2, I suspect that was from a different build run with a different ports tree? Looks like you created two repositories, each has it's own set of packages.

Don't name the ports tree, just use the default for both builds. The ports tree is the same for every version of FreeBSD anyway. So there's no reason to create a specific ports tree for specific versions.
 
That'll make the URL a little easier to handle. So you get http://192.168.216.41/packages/freebsd_12-2x64-PORTS-12-2
I use apache24 and that is already done. I use this host for multiple development and maintance projects and so I use http://192.168.216.41/mumble/ as a visual indicator to keep things straight when I am looking at http pages.
 
In the URL you're using PORTS-12-2, I suspect that was from a different build run with a different ports tree? Looks like you created two repositories, each has it's own set of packages.
No, 12-2 is correct for this build. 12-1 was used last year to build an older version of samba for use on 12.1 . I copied the wrong line from pkg.conf.

Code:
Poudriere-12-1: {
#   url: "http://192.168.216.41/poudriere/data/packages/freebsd_12-1x64-PORTS-12-1",
    url: "file:///usr/local/poudriere/data/packages/freebsd_12-1x64-PORTS-12-1",
    mirror_type: "none",
#   signature_type: "pubkey",
#   pubkey: "/usr/local/etc/pki/tls/certs/ca.harte-lyne.hamilton.vhost04.crt",
    enabled: no
#    enabled: yes
}
# pkg install|upgrade -r Poudriere-12-1 <pkg> [<pkg> . . .]

Poudriere-12-2: {
#   url: "http://192.168.216.41/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    url: "file:///usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    mirror_type: "none",
#   signature_type: "pubkey",
#   pubkey: "/usr/local/etc/pki/tls/certs/ca.harte-lyne.hamilton.vhost04.crt",
    enabled: no
#   enabled: yes
}
 
You're referring to that old build here.
Copy and paste error as explained above. The correct file url still does not work.

Code:
pkg install -f  --dry-run --repository Poudriere-12-2 redmine4
Updating Poudriere-12-2 repository catalogue...
All repositories are up to date.
pkg: No packages available to install matching 'redmine4' have been found in the repositories
 
I can get by with using http but it would be nice to know exactly what I am doing wrong here.
 
Try forcing the update of the catalog pkg update -f. I've had it happen, when mucking about with various repository settings, it just loses track and doesn't update the cached catalog when it should.
 
I can get by with using http but it would be nice to know exactly what I am doing wrong here. I get the same error for the file version whether or not there are two or three slashes. And I believe that for file: urls three (///) is correct.
 
And I believe that for file: urls three (///) is correct.
Yep. The third slash is part of the path. The URI method is file://, when you add an absolute path to it you get three: file:///some/absolute/path.
 
Try forcing the update of the catalog pkg update -f.
Code:
pkg update -f                                             
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01   
Fetching packagesite.txz: 100%    6 MiB   3.2MB/s    00:02   
Processing entries: 100%
The provides database is up-to-date.
FreeBSD repository update completed. 30174 packages processed.
Updating Poudriere-12-2-http repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01   
Fetching packagesite.txz: 100%  115 KiB 117.9kB/s    00:01   
Processing entries: 100%
The provides database is up-to-date.
Poudriere-12-2-http repository update completed. 461 packages processed.
All repositories are up to date.


Poudriere-12-2: {
#   url: "http://192.168.216.41/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    url: "file:///usr/local/poudriere/data/packages/freebsd_12-2x64-PORTS-12-2",
    mirror_type: "none",
#   signature_type: "pubkey",
#   pubkey: "/usr/local/etc/pki/tls/certs/ca.harte-lyne.hamilton.vhost04.crt",
    enabled: no
#   enabled: yes
}

pkg install -f  --dry-run --repository Poudriere-12-2 redmine4
Updating Poudriere-12-2 repository catalogue...
All repositories are up to date.
pkg: No packages available to install matching 'redmine4' have been found in the repositories
 
Possible. I think it's because it's enabled: no. Try enabling it, see if that helps. If it works with enabled: yes then the explanation in the man page about --repository is incorrect or it's a bug in the way it handles them.
 
Back
Top