Add new variable pkg_branch for choosing pkg branch
MODIFY
freebsd/freebsd-10.3-amd64.json
freebsd/freebsd-10.3-amd64.json
"HOME_DIR=/home/vagrant",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
- "no_proxy={{user `no_proxy`}}"
+ "no_proxy={{user `no_proxy`}}",
+ "pkg_branch={{user `pkg_branch`}}"
],
"execute_command": "echo 'vagrant' | {{.Vars}} su -m root -c 'sh -eux {{.Path}}'",
"expect_disconnect": true,
"mirror_directory": "releases/amd64/amd64/ISO-IMAGES/10.3",
"name": "freebsd-10.3",
"no_proxy": "{{env `no_proxy`}}",
+ "pkg_branch": "quarterly",
"template": "freebsd-10.3-amd64",
"version": "TIMESTAMP"
}

MODIFY
freebsd/freebsd-10.3-i386.json
freebsd/freebsd-10.3-i386.json
"HOME_DIR=/home/vagrant",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
- "no_proxy={{user `no_proxy`}}"
+ "no_proxy={{user `no_proxy`}}",
+ "pkg_branch={{user `pkg_branch`}}"
],
"execute_command": "echo 'vagrant' | {{.Vars}} su -m root -c 'sh -eux {{.Path}}'",
"expect_disconnect": true,
"mirror_directory": "releases/i386/i386/ISO-IMAGES/10.3",
"name": "freebsd-10.3-i386",
"no_proxy": "{{env `no_proxy`}}",
+ "pkg_branch": "quarterly",
"template": "freebsd-10.3-i386",
"version": "TIMESTAMP"
}

MODIFY
freebsd/freebsd-10.4-amd64.json
freebsd/freebsd-10.4-amd64.json
"HOME_DIR=/home/vagrant",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
- "no_proxy={{user `no_proxy`}}"
+ "no_proxy={{user `no_proxy`}}",
+ "pkg_branch={{user `pkg_branch`}}"
],
"execute_command": "echo 'vagrant' | {{.Vars}} su -m root -c 'sh -eux {{.Path}}'",
"expect_disconnect": true,
"mirror_directory": "releases/amd64/amd64/ISO-IMAGES/10.4",
"name": "freebsd-10.4",
"no_proxy": "{{env `no_proxy`}}",
+ "pkg_branch": "quarterly",
"template": "freebsd-10.4-amd64",
"version": "TIMESTAMP"
}

MODIFY
freebsd/freebsd-10.4-i386.json
freebsd/freebsd-10.4-i386.json
"HOME_DIR=/home/vagrant",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
- "no_proxy={{user `no_proxy`}}"
+ "no_proxy={{user `no_proxy`}}",
+ "pkg_branch={{user `pkg_branch`}}"
],
"execute_command": "echo 'vagrant' | {{.Vars}} su -m root -c 'sh -eux {{.Path}}'",
"expect_disconnect": true,
"mirror_directory": "releases/i386/i386/ISO-IMAGES/10.4",
"name": "freebsd-10.4-i386",
"no_proxy": "{{env `no_proxy`}}",
+ "pkg_branch": "quarterly",
"template": "freebsd-10.4-i386",
"version": "TIMESTAMP"
}

MODIFY
freebsd/freebsd-11.1-amd64.json
freebsd/freebsd-11.1-amd64.json
"HOME_DIR=/home/vagrant",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
- "no_proxy={{user `no_proxy`}}"
+ "no_proxy={{user `no_proxy`}}",
+ "pkg_branch={{user `pkg_branch`}}"
],
"execute_command": "echo 'vagrant' | {{.Vars}} su -m root -c 'sh -eux {{.Path}}'",
"expect_disconnect": true,
"mirror": "https://download.freebsd.org/ftp",
"mirror_directory": "releases/amd64/amd64/ISO-IMAGES/11.1",
"no_proxy": "{{env `no_proxy`}}",
+ "pkg_branch": "quarterly",
"template": "freebsd-11.1-amd64",
"version": "TIMESTAMP"
}

MODIFY
freebsd/freebsd-11.1-i386.json
freebsd/freebsd-11.1-i386.json
"HOME_DIR=/home/vagrant",
"http_proxy={{user `http_proxy`}}",
"https_proxy={{user `https_proxy`}}",
- "no_proxy={{user `no_proxy`}}"
+ "no_proxy={{user `no_proxy`}}",
+ "pkg_branch={{user `pkg_branch`}}"
],
"execute_command": "echo 'vagrant' | {{.Vars}} su -m root -c 'sh -eux {{.Path}}'",
"expect_disconnect": true,
"mirror": "https://download.freebsd.org/ftp",
"mirror_directory": "releases/i386/i386/ISO-IMAGES/11.1",
"no_proxy": "{{env `no_proxy`}}",
+ "pkg_branch": "quarterly",
"template": "freebsd-11.1-i386",
"version": "TIMESTAMP"
}

MODIFY
freebsd/scripts/update.sh
freebsd/scripts/update.sh
@@ -22,6 +22,11 @@ fi
env PAGER=/bin/cat $freebsd_update fetch || true;
env PAGER=/bin/cat $freebsd_update install || true;
+if [ "$pkg_branch" != "quarterly" ]; then
+ sed -i.bak -e "s,pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly,pkg+http://pkg.FreeBSD.org/\${ABI}/${pkg_branch}," /etc/pkg/FreeBSD.conf
+ rm -f /etc/pkg/FreeBSD.conf.bak
+fi
+
# Always use pkgng - pkg_add is EOL as of 1 September 2014
env ASSUME_ALWAYS_YES=true pkg bootstrap;
if [ "$major_version" -lt 10 ]; then

Add new variable pkg_branch for choosing pkg branch