Solved freebsd update server custom

Hello All,

i'm currently working on a freebsd-update-server.
I followed up the documentation freebsd-update-server.

So, i create media from one of my server with my custom kernel. everything went well, i put it on one of my web server.

I modified build.conf and create a specific directory for my custom kernel at ./freebsd-update-server/scripts/11.2-CUSTOM/amd64.
As describe in the documentation a create another build.conf inside this repository and put my properties.

After all of this, i ran the different scripts :
- sh scripts/make.sh
- sh scripts/init.sh amd64 11.2-CUSTOM

everything lookd good until it needs to build the kernel/world..
but during the run i got some errors and it sounds like nothing happen...


Code:
Thu Sep 19 17:35:56 CEST 2019 Starting fetch for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:35:56 CEST 2019 Verifying dvd1 hash for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:35:59 CEST 2019 Extracting components for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:36:12 CEST 2019 Constructing world+src image for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:36:44 CEST 2019 Extracting world+src for FreeBSD/amd64 11.2-CUSTOM
ls: /root/freebsd-update-server/patches/11.2-CUSTOM: No such file or directory
sed: /root/freebsd-update-server/work/11.2-CUSTOM/amd64/world0/usr/src/sys/conf/newvers.sh: No such file or directory
sed: /root/freebsd-update-server/work/11.2-CUSTOM/amd64/world0/usr/src/sys/conf/newvers.sh: No such file or directory
Thu Sep 19 15:36:47 UTC 2019 Building world for FreeBSD/amd64 11.2-CUSTOM
jail: /usr/bin/env -i PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin RELP=11.2-CUSTOM JFLAG=-j2 BRANCH_OVERRIDE= XZ_THREADS=16 TARGET=amd64 TARGET_ARCH=amd64 /bin/sh -e: failed
Thu Sep 19 17:36:47 CEST 2019 Moving components into staging area for FreeBSD/amd64 11.2-CUSTOM
cat: /R/ftp/base.txz: No such file or directory
cat: /R/ftp/kernel.txz: No such file or directory
Thu Sep 19 17:36:47 CEST 2019 Indexing release for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:37:28 CEST 2019 Indexing world0 for FreeBSD/amd64 11.2-CUSTOM

Files built but not released:
Files released but not built:
kernel|kernel|/boot
kernel|kernel|/boot/kernel
kernel|kernel|/boot/kernel/bridgestp.ko
kernel|kernel|/boot/kernel/cfiscsi.ko
kernel|kernel|/boot/kernel/dtmalloc.ko
kernel|kernel|/boot/kernel/dtnfscl.ko
kernel|kernel|/boot/kernel/dtrace.ko
kernel|kernel|/boot/kernel/dtrace_test.ko
kernel|kernel|/boot/kernel/dtraceall.ko
kernel|kernel|/boot/kernel/fasttrap.ko
kernel|kernel|/boot/kernel/fbt.ko
kernel|kernel|/boot/kernel/geom_multipath.ko
kernel|kernel|/boot/kernel/hwpmc.ko
kernel|kernel|/boot/kernel/if_bridge.ko
[...]
Code:
world|base|/var/tmp
world|base|/var/tmp/vi.recover
world|base|/var/unbound
world|base|/var/unbound/conf.d
world|base|/var/yp
world|base|/var/yp/Makefile
world|base|/var/yp/Makefile.dist
Files which differ by more than contents:
Files which differ between release and build:

Thu Sep 19 17:37:28 CEST 2019 Extracting world+src for FreeBSD/amd64 11.2-CUSTOM
ls: /root/freebsd-update-server/patches/11.2-CUSTOM: No such file or directory
sed: /root/freebsd-update-server/work/11.2-CUSTOM/amd64/world1/usr/src/sys/conf/newvers.sh: No such file or directory
sed: /root/freebsd-update-server/work/11.2-CUSTOM/amd64/world1/usr/src/sys/conf/newvers.sh: No such file or directory
Fri Oct 23 15:37:33 UTC 2020 Building world for FreeBSD/amd64 11.2-CUSTOM
jail: /usr/bin/env -i PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin RELP=11.2-CUSTOM JFLAG=-j2 BRANCH_OVERRIDE=FUTUREBUILD XZ_THREADS=16 TARGET=amd64 TARGET_ARCH=amd64 /bin/sh -e: failed
Fri Oct 23 17:37:33 CEST 2020 Moving components into staging area for FreeBSD/amd64 11.2-CUSTOM
cat: /R/ftp/base.txz: No such file or directory
cat: /R/ftp/kernel.txz: No such file or directory
Thu Sep 19 17:37:33 CEST 2019 Indexing world1 for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:37:33 CEST 2019 Locating build stamps for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:37:43 CEST 2019 Cleaning staging area for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:37:44 CEST 2019 Preparing to copy files into staging area for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:37:44 CEST 2019 Copying data files into staging area for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:40:10 CEST 2019 Copying metadata files into staging area for FreeBSD/amd64 11.2-CUSTOM
Thu Sep 19 17:40:10 CEST 2019 Constructing metadata index and tag for FreeBSD/amd64 11.2-CUSTOM

Files found which include build stamps:

Values of build stamps, excluding library archive headers:

FreeBSD/amd64 11.2-CUSTOM initialization build complete.  Please
review the list of build stamps printed above to confirm that
they look sensible, then run
# sh -e approve.sh amd64 11.2-CUSTOM
to sign the release.

Did i miss something ? Or do i need more steps to be able to do this ? or that's work only with RELEASE version ? as my custom kernel is based on a STABLE...

BR,
N!
 
or that's work only with RELEASE version ? as my custom kernel is based on a STABLE...
Don't mix and match kernels and userland, the kernel needs to be the same version as the rest of the userland.
 
Hi SirDice,

No worries, userland and kernel are on the same version and i built both to create the .iso
I explained myself badly...i just wanted to say, by default there is no build script for STABLE version in freebsd-update-server.
 
Hello All,

So no one of you is using the freebsd-update-server for your custom kernel ?
i really would like to know how toset up this server or at least if it really possible.

I tried with no specific configuration and a script for an FBSD release version but that didnt work anyway.
 
freebsd-update(8):
Code:
DESCRIPTION
     The freebsd-update tool is used to fetch, install, and rollback binary
     updates to the FreeBSD base system.  Note that updates are only available
     if they are being built for the FreeBSD release and architecture being
     used; in particular, the FreeBSD Security Team only builds updates for
     releases shipped in binary form by the FreeBSD Release Engineering Team,
     e.g., FreeBSD 11.2-RELEASE and FreeBSD 12.0-RELEASE, but not FreeBSD
     11.2-STABLE or FreeBSD 13.0-CURRENT.
 
I assume, that you are talking about a modified RELEASE (GENERIC) kernel, which has been build after changing some of the option and device settings of the GENERIC kernel configuration. In this case it is possible to use freebsd-update(8). See

Pay special attention to the paragraphs starting with: „When using a custom kernel, the above step will produce a warning similar to the following: ...“

In the past, I followed this procedure upgrading a machine from FreeBSD 9 to FreeBSD 11, all the way through once the respective minor and major releases hit on earth, In that period of time, IPsec was not build into the GENERIC kernel, and therefore I build a GENERIC+IPsec one.

The bottom-line is, you would keep the GENERIC kernel around, and before running freebsd-upgrade you woulf switch your machine to GENERIC and after upgrading you would build and install the CUSTOM kernel with the upgraded sources.
 
Hi,

Okay, but the freebsd-update-server can be used to create our own patch right ?
but we can build and perform patching on server from the same version where patch has been built ?

create patch with kernel/base of 11.2-STABLE, we could only patching server under 11.2-STABLE, correct or i'm wrong ?

BR,
N!
 
I suggest you read the code from /usr/sbin/freebsd-update (it's a rather large, complex, shell script).
 
So no one of you is using the freebsd-update-server for your custom kernel ?
This is a case where I would really like to reply with a meme: "But why?"

A: You can run stock precompiled versions, using standard tools to install and update them.

B: You can alternatively download the source code, compile it, and install your own version, again using the standard build tools.

It seems to me that mixing the two makes no sense. You ask:
i really would like to know how toset up this server or at least if it really possible.
and my answer is: I don't know whether it is possible to use part of the tools for workflow A above with workflow B, but trying to do so doesn't seem logical to me.
 
Back
Top