# pkg install from poudriere server



## balanga (May 7, 2019)

How would I go about installing pkgs from a poudriere server? 

Since some of the pkgs may not have been built at the time the pkg install instruction is issued, would pkg install wait until the pkg was built?


----------



## Ofloo (May 7, 2019)

i'd assume you'll have to change the pkg url, check /etc/pkg/FreeBSD.conf read the header of the file on how to do this.









						Chapter 4. Installing Applications: Packages and Ports
					

FreeBSD provides two complementary technologies for installing third-party software: the FreeBSD Ports Collection, for installing from source, and packages, for installing from pre-built binaries




					www.freebsd.org


----------



## SirDice (May 7, 2019)

balanga said:


> Since some of the pkgs may not have been built at the time the pkg install instruction is issued, would pkg install wait until the pkg was built?


No, it would simply fail because it can't find the package or one or more of its dependencies.


----------



## balanga (May 7, 2019)

SirDice said:


> No, it would simply fail because it can't find the package or one or more of its dependencies.


Is there any way to trigger a build of the required pkg?


----------



## SirDice (May 7, 2019)

Yes, you run the `poudriere bulk` command on the server. There's no way to "remotely" trigger a build if something is missing. You just have to make sure your repository is complete.


----------



## asteriskRoss (May 7, 2019)

balanga, ports-mgmt/synth might be worth a look as an alternative if you are only building ports for a single system.


----------



## balanga (May 7, 2019)

Ofloo said:


> i'd assume you'll have to change the pkg url, check /etc/pkg/FreeBSD.conf read the header of the file on how to do this.
> 
> 
> 
> ...



This sections mentions using a Poudriere Repository:-

*4.6.2. Configuring pkg Clients to Use a Poudriere Repository*

and suggests creating /usr/local/etc/pkg/repos/custom.conf containing something like

```
custom: {
    url: "http://pkg.example.com/10amd64",
    enabled: yes,
}
```

Not sure how to configure the url though... Not even sure where built packages are meant to be stored..


----------



## balanga (May 7, 2019)

asteriskRoss said:


> balanga, ports-mgmt/synth might be worth a look as an alternative if you are only building ports for a single system.



Can it build 11.1 pkgs for armv5?


----------



## hukadan (May 7, 2019)

balanga said:


> Can it build 11.1 pkgs for armv5?


Yes, but you have already invested a lot of time in poudriere(8). Anyway, cross compiling instructions are here https://github.com/jrmarino/synth#how-to-configure-synth-to-crossbuild-binaries.


balanga said:


> Not sure how to configure the url though... Not even sure where built packages are meant to be stored.


Have you read the thread in the HowTo section of this forum dedicated to poudriere(8) ? The second post has everything you need to know to use repositories obtained using poudriere(8).


----------



## balanga (May 7, 2019)

hukadan said:


> Have you read the thread in the HowTo section of this forum dedicated to poudriere(8) ? The second post has everything you need to know to use repositories obtained using poudriere(8).



Many thanks. There is a section in Thread 38859 which shows exactly how to set it up.

*10. Using the package repository with pkg(8)*

`pkg add /usr/local/poudriere/data/packages/releng112amd64-default/All/apache22.txz`


```
myrepo: {
    url             : "file:///usr/local/poudriere/data/packages/releng112amd64-default",
    enabled         : yes,
    mirror_type     : NONE
}
```


----------

