Check-in [edf474ab6f]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Update entry for creating pkgng repositories 1. pkgng is no longer required in host 2. 90amd64 -> 91amd64 3. Various content rewording
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:edf474ab6f121c1851af0d3a4cb291913810dcf6
User & Date: bdrewery 2013-06-17 22:52:19
Context
2013-06-19
12:17
Change default build name to YYYY-MM-DD_HHhMMmSSs to remove ':' causing encoding/tab-completion issues check-in: b25b12fa3d user: bdrewery tags: trunk
2013-06-17
22:52
Update entry for creating pkgng repositories 1. pkgng is no longer required in host 2. 90amd64 -> 91amd64 3. Various content rewording check-in: edf474ab6f user: bdrewery tags: trunk
2013-06-16
14:36
Remove license from pkgbuild.sh.sample check-in: dede4eff2a user: bdrewery tags: trunk
Changes

Changes to doc/pkgng_repos.wiki.

1
2
3
4

5
6
7
8
9
10
11
12

13
14
15
16

17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
..
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90


<h1>creating pkgng repositories</h1>

Install poudriere and pkgng on the host (please note that the host does not need
to be converted to pkgng)


    <verbatim>make -C /usr/ports/ports-mgmt/poudriere install clean
make -C /usr/ports/ports-mgmt/pkg install clean</verbatim>

Create a default configuration in the ${LOCALBASE}/etc/poudriere.conf
configuration file: 

    <verbatim>BASEFS=/poudriere

# For ZFS:
ZPOOL=myzpool
# For NO ZFS:
NO_ZFS=yes

FREEBSD_HOST=ftp://ftp.freebsd.org
POUDRIERE_DATA=/poudriere_data
RESOLV_CONF=/etc/resolv.conf
DISTFILES_CACHE=/usr/ports/distfiles</verbatim>

poudriere is now ready to be used.

First create a ports tree to be used by poudriere:

    <verbatim>poudriere ports -c</verbatim>

Create the jail in version you want to build packages for: 

    <verbatim>poudriere jail -c -j 90amd64 -v 9.0-RELEASE -a amd64
poudriere jail -c -j 10i386 -v head -a i386 -m svn</verbatim>

The first will create a 9.0-RELEASE amd64 jail from the official sets (fetched
from FREEBSD_HOST) The second will create a current jail using svn and build for
i386.

As poudriere works for both legacy pkg_* and pkgng you need to make it pkgng
aware: 

    <verbatim>mkdir /usr/local/etc/poudriere.d
echo "WITH_PKGNG=yes" > /usr/local/etc/poudriere.d/90amd64-make.conf
echo "WITH_PKGNG=yes" > /usr/local/etc/poudriere.d/10i386-make.conf</verbatim>

Create the list of packages you want to see built by poudriere:

    <verbatim>cat ~/mylist1
editors/vim-lite
www/nginx</verbatim>
................................................................................

    <verbatim>cat ~/mylist2
www/firefox
editors/libreoffice</verbatim>

Start a poudriere build run:

    <verbatim>poudriere bulk -f ~/mylist1 -j 90amd64
poudriere bulk -f ~/mylist2 -j 10i386</verbatim>

This will build two pkgng repositories:

  *  ${POUDRIERE_DATA}/packages/10i386-default
  *  ${POUDRIERE_DATA}/packages/90amd64-default 

Configure an http server to serve these directories.

On your user boxes: (if you use the automatic bootstrap it will take
care of creating this file) 

    <verbatim>echo "packagesite: http://yoururl/10i386-default" >> /usr/local/etc/pkg.conf</verbatim>
    <verbatim>echo "packagesite: http://yoururl/90amd64-default" >> /usr/local/etc/pkg.conf</verbatim>

From FreeBSD 9.1 and later it is possible to directly bootstrap from the base:

    <verbatim>PACKAGESITE="http://yoururl/10i386-default" pkg update</verbatim>

Before FreeBSD 9.1, it is necessary to bootstrap by hand:

    <verbatim>fetch http://yoururl/90amd64-default/Latest/pkg.txz
tar xf ./pkg.txz -s ",/.*/,,g" "*/pkg-static"
./pkg-static add ./pkg.txz</verbatim>

Normal operation after the needed build jails have been created looks like:
 * Update the poudriere ports tree:
    <verbatim>poudriere ports -u</verbatim>
 * Run an incremental build on both build jails:
    <verbatim>poudriere bulk -f ~/mylist1 -j 90amd64
poudriere bulk -f ~/mylist2 -j 10i386</verbatim>

It might become necessary to do a full fresh build, use the -c flag to bulk to
clear all packages and build fresh.




|
|
>

|
<





>




>











|

|


|
|
|





|







 







|





|




|


|







|







|



|
>
>
1
2
3
4
5
6
7

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
..
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<h1>creating pkgng repositories</h1>

Install poudriere on the build host. This should be newer or the same version
of all the target machines. Cross-building is supported with an amd64 host
for i386 jails.

    <verbatim>make -C /usr/ports/ports-mgmt/poudriere install clean</verbatim>


Create a default configuration in the ${LOCALBASE}/etc/poudriere.conf
configuration file: 

    <verbatim>BASEFS=/poudriere
# Only 1 of the 2 following options is needed
# For ZFS:
ZPOOL=myzpool
# For NO ZFS:
NO_ZFS=yes

FREEBSD_HOST=ftp://ftp.freebsd.org
POUDRIERE_DATA=/poudriere_data
RESOLV_CONF=/etc/resolv.conf
DISTFILES_CACHE=/usr/ports/distfiles</verbatim>

poudriere is now ready to be used.

First create a ports tree to be used by poudriere:

    <verbatim>poudriere ports -c</verbatim>

Create jails for the target versions you want to build packages for:

    <verbatim>poudriere jail -c -j 91amd64 -v 9.1-RELEASE -a amd64
poudriere jail -c -j 10i386 -v head -a i386 -m svn</verbatim>

The first will create a 9.1-RELEASE amd64 jail from the official sets (fetched
from FREEBSD_HOST) The second will create a current jail using svn and build
from source for i386.

As poudriere works for both legacy pkg_* and pkgng you need to make it pkgng
aware: 

    <verbatim>mkdir /usr/local/etc/poudriere.d
echo "WITH_PKGNG=yes" > /usr/local/etc/poudriere.d/91amd64-make.conf
echo "WITH_PKGNG=yes" > /usr/local/etc/poudriere.d/10i386-make.conf</verbatim>

Create the list of packages you want to see built by poudriere:

    <verbatim>cat ~/mylist1
editors/vim-lite
www/nginx</verbatim>
................................................................................

    <verbatim>cat ~/mylist2
www/firefox
editors/libreoffice</verbatim>

Start a poudriere build run:

    <verbatim>poudriere bulk -f ~/mylist1 -j 91amd64
poudriere bulk -f ~/mylist2 -j 10i386</verbatim>

This will build two pkgng repositories:

  *  ${POUDRIERE_DATA}/packages/10i386-default
  *  ${POUDRIERE_DATA}/packages/91amd64-default 

Configure an http server to serve these directories.

On your user boxes: (if you use the automatic bootstrap it will take
care of creating this file)

    <verbatim>echo "packagesite: http://yoururl/10i386-default" >> /usr/local/etc/pkg.conf</verbatim>
    <verbatim>echo "packagesite: http://yoururl/91amd64-default" >> /usr/local/etc/pkg.conf</verbatim>

From FreeBSD 9.1 and later it is possible to directly bootstrap from the base:

    <verbatim>PACKAGESITE="http://yoururl/10i386-default" pkg update</verbatim>

Before FreeBSD 9.1, it is necessary to bootstrap by hand:

    <verbatim>fetch http://yoururl/91amd64-default/Latest/pkg.txz
tar xf ./pkg.txz -s ",/.*/,,g" "*/pkg-static"
./pkg-static add ./pkg.txz</verbatim>

Normal operation after the needed build jails have been created looks like:
 * Update the poudriere ports tree:
    <verbatim>poudriere ports -u</verbatim>
 * Run an incremental build on both build jails:
    <verbatim>poudriere bulk -f ~/mylist1 -j 91amd64
poudriere bulk -f ~/mylist2 -j 10i386</verbatim>

It might become necessary to do a full fresh build, use the -c flag to bulk to
clear all packages and build fresh. This is normally not required though as
poudriere, by default, supports incremental builds and will rebuild anything
requiring to be rebuilt.