# Issue with freebsd-update-server



## silverglade00 (Jan 13, 2012)

Trying to build 9.0-RELEASE freebsd-update binaries on my local freebsd-update-server machine. I created the build.conf and it pulls the disc1.iso just fine. The checksum check passes and then it moves to extract components. At that point it flies by very quickly because it does not find the proper files on the iso file. This is a sample of what it is telling me:


```
cat: /usr/local/freebsd-update-server/work/9.0-RELEASE/amd64/iso/9.0-RELEASE/base/base.??: No such file or directory
cat: /usr/local/freebsd-update-server/work/9.0-RELEASE/amd64/iso/9.0-RELEASE/catpages/catpages.??: No such file or directory
cat: /usr/local/freebsd-update-server/work/9.0-RELEASE/amd64/iso/9.0-RELEASE/dict/dict.??: No such file or directory
cat: /usr/local/freebsd-update-server/work/9.0-RELEASE/amd64/iso/9.0-RELEASE/doc/doc.??: No such file or directory
```

It goes on much farther from here. It basically does the entire build process, but with no files to build, it really does nothing. I have already tried removing the work/9.0-RELEASE directory and starting over and I installed the latest freebsd-update-server code as of yesterday. Any suggestions?


----------



## silverglade00 (Jan 13, 2012)

Now extracting components. I had to create a custom build.conf and build.subr due to layout changes on the 9.0-RELEASE disc.

Relevant part of scripts/9.0-RELEASE/amd64/build.subr:

```
extractiso () {
        # Create and mount a md(4) attached to the ISO image.
        ISOMD=`mdconfig -a -t vnode -f ${WORKDIR}/iso.img -n`
        mkdir -p ${WORKDIR}/iso                           
        mount -t cd9660 -o ro,nosuid /dev/md${ISOMD} ${WORKDIR}/iso

        # Extract the various components into different directories
        log "Extracting components"
        for C in ${WORLDPARTS}; do
                mkdir -p ${WORKDIR}/release/R/trees/world/${C}
                    [B]cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.???[/B] |
                    tar -xpzf - -C ${WORKDIR}/release/R/trees/world/${C}
        done
#       for C in ${KERNELPARTS}; do
#               mkdir -p ${WORKDIR}/release/R/trees/kernel/${C}
#               cat ${WORKDIR}/iso/usr/freebsd-dist/${C}.?? |
#                   tar -xpzf - -C ${WORKDIR}/release/R/trees/kernel/${C}
#       done
#       for C in ${SOURCEPARTS}; do
#               mkdir -p ${WORKDIR}/release/R/trees/src/${C}
#               cat ${WORKDIR}/iso/usr/src/s${C}.?? |
#                   tar -xpzf - -C ${WORKDIR}/release/R/trees/src/${C}
#       done
```

Modified scripts/9.0-RELEASE/amd64/build.conf:

```
# SHA256 hash of RELEASE disc1.iso image.
export RELH=bcc69320cd2f227411d55967113abc8ffa5ede0a6526090ca3fb5ab776fead9d
# Components of the world, source, and kernels
export WORLDPARTS="base doc games kernel lib32 ports src"
#export SOURCEPARTS="base bin contrib crypto etc games gnu include krb5  \
#                lib libexec release rescue sbin secure share sys tools  \
#                ubin usbin cddl"
#export KERNELPARTS="kernel"

# EOL date
export EOL=1358748000
```


----------



## silverglade00 (Jan 18, 2012)

This has really changed a lot. Still trying to figure out which parts go where. The above files are incorrect. I will post the correct ones once I get them figured out.


----------

