Skip to content

Commit

Permalink
Merge pull request #3 from ocurrent/5.1.1
Browse files Browse the repository at this point in the history
Updated to FreeBSD 14
  • Loading branch information
mtelvers authored Mar 15, 2024
2 parents a5cd1f3 + bbe0cde commit 4529ae7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- ocluster
- docker
- { role: base-image, version: "busybox", user_name: opam, zfs_pool: "obuilder", default: false }
- { role: base-image, version: "4.14.1", user_name: opam, zfs_pool: "obuilder" , default: false }
- { role: base-image, version: "4.14.2", user_name: opam, zfs_pool: "obuilder" , default: false }
- { role: base-image, version: "5.0.0", user_name: opam, zfs_pool: "obuilder" , default: false }
- { role: base-image, version: "5.1.1", user_name: opam, zfs_pool: "obuilder" , default: true }

2 changes: 1 addition & 1 deletion roles/base-image/files/jail
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mkdir -p $1 || error "mkdir failed for $1"
test ! -d $BSDINSTALL_DISTDIR && mkdir -p $BSDINSTALL_DISTDIR

if [ ! -f $BSDINSTALL_DISTDIR/MANIFEST -a -z "$BSDINSTALL_DISTSITE" ]; then
export BSDINSTALL_DISTSITE="https://download.freebsd.org/ftp/releases/amd64/amd64/13.2-RELEASE"
export BSDINSTALL_DISTSITE="https://download.freebsd.org/ftp/releases/amd64/amd64/14.0-RELEASE"
fetch -o $BSDINSTALL_DISTDIR/MANIFEST $BSDINSTALL_DISTSITE/MANIFEST || error "Could not download $BSDINSTALL_DISTSITE/MANIFEST"
fi

Expand Down
6 changes: 3 additions & 3 deletions roles/base-image/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@

- name: Create setup script
copy:
dest: "/{{ zfs_pool }}/base-image/{{ base_image }}/rootfs/usr/home/{{ user_name }}/freebsd-ocaml.sh"
dest: "/{{ zfs_pool }}/base-image/{{ base_image }}/rootfs/home/{{ user_name }}/freebsd-ocaml.sh"
mode: u+rwx,g+rx,o+rx
content: |
#!/bin/sh
cd /usr/home/opam
cd /home/opam
touch .hushlogin
sed -i "" 's/^[^#]*fortune/# &/' .profile .login
echo "OPAMCONFIRMLEVEL=unsafe-yes; export OPAMCONFIRMLEVEL" >> .profile
Expand All @@ -72,7 +72,7 @@
when: version != "busybox"

- name: Run freebsd-ocaml.sh script in jail /{{ zfs_pool }}/base-image/{{ base_image }}/rootfs as user {{ user_name }} for {{ version }}
shell: jail -c name=base-image path=/{{ zfs_pool }}/base-image/{{ base_image }}/rootfs host=inherit ip6=inherit ip4=inherit mount.devfs exec.jail_user=opam command=/usr/home/opam/freebsd-ocaml.sh
shell: jail -c name=base-image path=/{{ zfs_pool }}/base-image/{{ base_image }}/rootfs host=inherit ip6=inherit ip4=inherit mount.devfs exec.jail_user=opam command=/home/opam/freebsd-ocaml.sh
when: version != "busybox"

- name: Unmount devfs
Expand Down

0 comments on commit 4529ae7

Please sign in to comment.