Solved META_MODE and poudriere jails

Hello,

I am tracking FreeBSD (11) STABLE. Since I don't want to waste resources the jail I am using /usr/src with poudriere for my only jail. It also makes keeping my main system and the poudriere jail in sync.

Recently, I started using
Code:
WITH_META_MODE=YES

I have this setting in /etc/src-env.conf, but also copied it to:

/usr/local/poudriere/jails/<jailname>/etc/src-env.conf

However, this doesn't seem to be enough to have it working. Everything is still recompiled.

Any idea on how to fix this, or a better way to keep the jail and my host system in sync?
 
Any idea on how to fix this, or a better way to keep the jail and my host system in sync?
After doing the whole buildworld stanza and installing it on the host I create a release(7) and use the resulting FTP file tree to install or update my poudriere jails.
Code:
root@molly:/usr/local/etc/poudriere.d # poudriere jail -l
JAILNAME   VERSION          ARCH  METHOD                                    TIMESTAMP           PATH
10-desktop 10.3-RELEASE-p18 amd64 ftp                                       2017-04-17 16:05:50 /usr/local/poudriere/jails/10-desktop
10-server  10.3-RELEASE-p18 amd64 ftp                                       2017-04-17 16:05:10 /usr/local/poudriere/jails/10-server
11-desktop 11.1-PRERELEASE  amd64 url=file:///storage/release/11-stable/ftp 2017-07-09 17:00:54 /usr/local/poudriere/jails/11-desktop
11-server  11.1-PRERELEASE  amd64 url=file:///storage/release/11-stable/ftp 2017-07-09 18:06:45 /usr/local/poudriere/jails/11-server

The release(7) is built using:
Code:
cd /usr/src/release
make -DNOPKG -DNODOC -DNOPORTS KERNCONF="GENERIC VBOX" release
make -DNOPKG -DNODOC -DNOPORTS KERNCONF="GENERIC VBOX" DESTDIR=/storage/release/11-stable install

The added bonus is that you also get CD and memory stick installer images for your 11-STABLE.
 
I don't think poudriere looks at anything other than /usr/local/poudriere/jails/<jailname>/etc/src.conf. I don't see why it's recompiling everything though? I thought using src meant it just did an installworld and distribution. Which method are you actually using? I do poudriere jail -c -j 11 -m src=/usr/src. And then poudriere jail -u -j 11 to upgrade it. This just does an installworld from the previously built world that I built in the host system.

On a related note, I've tried to use WITH_META_MODE=yes myself several times and can never get it to compile. The buildworld always bombs out somewhere through the build. Have you done anything other than setting that and loading the filemon kernel module? I always think I must be missing something.
 
I don't think poudriere looks at anything other than /usr/local/poudriere/jails/<jailname>/etc/src.conf. I don't see why it's recompiling everything though? I thought using src meant it just did an installworld and distribution. Which method are you actually using? I do poudriere jail -c -j 11 -m src=/usr/src. And then poudriere jail -u -j 11 to upgrade it. This just does an installworld from the previously built world that I built in the host system.

Oh, argh, probably because I am using it with a bit different. It does SVN update. That's probably the reason. Of course I only realize this now. It actually was a symlink and I completely forgot that. I used to update/build it with poudriere.

On a related note, I've tried to use WITH_META_MODE=yes myself several times and can never get it to compile. The buildworld always bombs out somewhere through the build. Have you done anything other than setting that and loading the filemon kernel module? I always think I must be missing something.
No, I really just have filemon and the WITH_META_MODE=yes. I don't do anything else though. No ccache, no other ways to speed it up, because I read somewhere that this is the only completely safe option, so you won't have remnants. For ccache and some of the other options it's more like a "Works 99% of time".
 
Ahhh that might be why then. I am using ccache. I should try it without that and see what happens.

And also yep, if you are using the svn method then that makes sense why it recompiles. You should check out the src method that I mentioned. Then you can do buildworld/kernel in the host environment and point it to the same thing and it will just do an installworld from it. Unless you are happy with the ftp method described above.
 
Also disabling ccache for world/kernel builds has fixed the meta mode for me too. So Thank you for suggesting that :)
 
I just noticed that oddly enough I now lack the content of /usr/src inside the jail, resulting in no kernel modules (virtualbox one for example) to build. Since I don't find any options the right way would probably be null mounting, but I don't see where to do this.

Did you solve this problem as well?
 
Add the -S flag:

Code:
     -S srcpath   Use the specified srcpath as the FreeBSD source tree mounted
                  inside the jail.

It doesn't look like the usual version of poudriere has that option. Is that maybe in the devel version? On the normal version the source tree is automatically copied into the jail. It's the first thing it does before it runs installworld. Have they maybe made that optional in the devel version meaning you need that switch?
 
I found that oddly enough running pudriere jail -u results in a populated /usr/src inside the jail. Can someone confirm this? This strikes me as odd since creating a jail with src=<path> created an empty /usr/src. If someone is able to confirm this I'd be inclined to open up a bug report on this, since having to update after creating a jail from fresh sources seems highly unintuitive.

EDIT: Tried to reproduce and failed. Not sure what went wrong there.
 
Not sure why that didn't work for you the first time. It has always worked as expected for me.

Code:
# poudriere version
3.1.19

# poudriere jail -c -j 11 -m src=/usr/src
[00:00:00] ====>> Copying /usr/src to /var/poudriere/jails/11/usr/src...
(installworld / distribution stuff here)

# du -sh /var/poudriere/jails/11/usr/src
1.2G    /var/poudriere/jails/11/usr/src
 
Back
Top