message: Update integration test section

diff:
@@ -198,7 +198,7 @@ class TodoListWorkflowTests: XCTestCase {
}
.send(action: .new)
.verifyOutput { output in
- // THe `.new` action should emit a `.newTodo` output.
+ // The `.new` action should emit a `.newTodo` output.
switch output {
case .newTodo:
break // Expected
@@ -451,14 +451,13 @@ Add tests against the `render` methods of the `TodoEdit` and `TodoList` workflow
## Composition Testing
-We've demonstrated how to test leaf workflows for their actions and renderings. However, the power of workflow is the ability to compose a tree of workflows. The `RenderTester` provides the tools to test workflows with children.
+We've demonstrated how to test leaf workflows for their actions and renderings. However, the power of workflow is the ability to compose a tree of workflows. The `RenderTester` provides tools to test workflows with children.
+
+`ExpectedWorkflow` allows us to describe a child workflow that is expected to be rendered in the next render pass. It is given the type of child, an optional key, and the mock rendering to return. It can also provide an optional output:
-The `ExpectedWorkflow` allows a child workflow to be described that is expected for the next render. It is given the type of child, and optional key, and the mock rendering to return. It can also provide an optional output:
```swift
public struct ExpectedWorkflow {
-
public init<WorkflowType: Workflow>(type: WorkflowType.Type, key: String = "", rendering: WorkflowType.Rendering, output: WorkflowType.Output? = nil)
-
}
```
@@ -470,7 +469,6 @@ Start by adding `Equatable` conformance to the `State` to simplify the tests:
```swift
extension RootWorkflow {
-
// The state is an enum, and can either be on the welcome screen or the todo list.
// When on the todo list, it also includes the name provided on the welcome screen
enum State: Equatable {
@@ -493,16 +491,15 @@ import WorkflowTesting
@testable import WorkflowUI
class RootWorkflowTests: XCTestCase {
-
- func testWelcomeRendering() {
+ func testWelcomeRendering() throws {
RootWorkflow()
// Start in the `.welcome` state
- .renderTester(initialState: RootWorkflow.State.welcome)
+ .renderTester(initialState: .welcome)
// The `WelcomeWorkflow` is expected to be started in this render.
.expectWorkflow(
type: WelcomeWorkflow.self,
producingRendering: WelcomeScreen(
- name: "MyName",
+ name: "Ada",
onNameChanged: { _ in },
onLoginTapped: {}
)
@@ -514,12 +511,12 @@ class RootWorkflowTests: XCTestCase {
XCTFail("Expected first screen to be a `WelcomeScreen`")
return
}
- XCTAssertEqual("MyName", welcomeScreen.name)
+
+ XCTAssertEqual("Ada", welcomeScreen.name)
}
// Assert that no action was produced during this render, meaning our state remains unchanged
- .assertNoAction()
+ .assertNoOutput()
}
-
}
```
@@ -528,21 +525,20 @@ We needed to use a few `@testable` imports to inspect the underlying screen (sin
Now, we can also test the transition from the `.welcome` state to the `.todo` state:
```swift
- func testLogin() {
+ func testLogIn() throws {
RootWorkflow()
// Start in the `.welcome` state
- .renderTester(initialState: RootWorkflow.State.welcome)
+ .renderTester(initialState: .welcome)
// The `WelcomeWorkflow` is expected to be started in this render.
.expectWorkflow(
type: WelcomeWorkflow.self,
- // Simulate this as the `WelcomeScreen` returned by the `WelcomeWorkflow`. The callback can be stubbed out, as they won't be used.
producingRendering: WelcomeScreen(
- name: "MyName",
+ name: "Ada",
onNameChanged: { _ in },
onLoginTapped: {}
),
- // Simulate the `WelcomeWorkflow` sending an output of `.didLogin` as if the login button was tapped.
- producingOutput: .didLogin(name: "MyName")
+ // Simulate the `WelcomeWorkflow` sending an out0put of `.didLogIn` as if the "log in" button was tapped.
+ producingOutput: .didLogIn(name: "Ada")
)
// Now, validate that there is a single item in the BackStackScreen, which is our welcome screen (prior to the output).
.render { rendering in
@@ -551,10 +547,10 @@ Now, we can also test the transition from the `.welcome` state to the `.todo` st
XCTFail("Expected first screen to be a `WelcomeScreen`")
return
}
- XCTAssertEqual("MyName", welcomeScreen.name)
+ XCTAssertEqual("Ada", welcomeScreen.name)
}
// Assert that the state transitioned to `.todo`
- .assert(state: .todo(name: "MyName"))
+ .assert(state: .todo(name: "Ada"))
}
```
@@ -562,75 +558,69 @@ By simulating the output from the `WelcomeWorkflow`, we were able to drive the `
### TodoWorkflow Render Tests
-Now add tests for the `TodoWorkflow`, so that we have relatively full coverage. These are two examples, of selecting and saving a TODO to validate the transitions between screens, as well as updating the state in the parent (Add `Equatable` conformance to `TodoWorkflow.State` to simplify the tests):
+Now add tests for the `TodoWorkflow`, so that we have relatively full coverage. These are two examples, of selecting and saving a todo to validate the transitions between screens, as well as updating the state in the parent (Add `Equatable` conformance to `TodoWorkflow.State` to simplify the tests):
```swift
import XCTest
@testable import TutorialBase
import BackStackContainer
import WorkflowTesting
-
+import WorkflowUI
class TodoWorkflowTests: XCTestCase {
-
- func testSelectingTodo() {
+ func testSelectingTodo() throws {
let todos: [TodoModel] = [TodoModel(title: "Title", note: "Note")]
- TodoWorkflow(name: "MyName")
- // Start from the list step to validate selecting a todo:
+ TodoWorkflow(name: "Ada")
+ // Start from the list step to validate selecting a todo.
.renderTester(initialState: TodoWorkflow.State(
todos: todos,
step: .list
))
- // We only expect the TodoListWorkflow
+ // We only expect the TodoListWorkflow to be rendered.
.expectWorkflow(
type: TodoListWorkflow.self,
- producingRendering: BackStackScreen.Item(
- screen: TodoListScreen(
- todoTitles: ["Title"],
- onTodoSelected: { _ in }
- )
+ producingRendering: BackStackScreen<AnyScreen>.Item(
+ screen: TodoListScreen(todoTitles: ["Title"], onTodoSelected: { _ in }).asAnyScreen()
),
- // Simulate selecting the first todo:
- producingOutput: TodoListWorkflow.Output.selectTodo(index: 0)
+ // Simulate selecting the first todo.
+ producingOutput: .selectTodo(index: 0)
)
.render { items in
// Just validate that there is one item in the back stack.
- // Additional validation could be done on the screens returned if so desired.
+ // Additional validation could be done on the screens returned, if desired.
XCTAssertEqual(1, items.count)
}
- // Assert that the state was updated after the last render pass with the output from the TodoEditWorkflow.
- .assert(
- state: TodoWorkflow.State(
+ // Assert that the state was updated after the render pass with the output from the TodoListWorkflow.
+ .assert(state: TodoWorkflow.State(
todos: [TodoModel(title: "Title", note: "Note")],
step: .edit(index: 0)
- )
- )
+ ))
}
- func testSavingTodo() {
+ func testSavingTodo() throws {
let todos: [TodoModel] = [TodoModel(title: "Title", note: "Note")]
- TodoWorkflow(name: "MyName")
- // Start from the edit step so we can simulate saving:
+ TodoWorkflow(name: "Ada")
+ // Start from the edit step so we can simulate saving.
.renderTester(initialState: TodoWorkflow.State(
todos: todos,
step: .edit(index: 0)
))
- // We always expect the TodoListWorkflow
+ // We always expect the TodoListWorkflow to be rendered.
.expectWorkflow(
type: TodoListWorkflow.self,
- producingRendering: BackStackScreen.Item(
+ producingRendering: BackStackScreen<AnyScreen>.Item(
screen: TodoListScreen(
todoTitles: ["Title"],
onTodoSelected: { _ in }
).asAnyScreen()
)
)
- // Expect the TodoEditWorkflow. Additionally, simulate it emitting an output of ".save" to update the state.
+ // Expect the TodoEditWorkflow to be rendered as well (as we're on the edit step).
.expectWorkflow(
type: TodoEditWorkflow.self,
- producingRendering: BackStackScreen.Item(
+ producingRendering: BackStackScreen<AnyScreen>.Item(
screen: TodoEditScreen(
title: "Title",
note: "Note",
@@ -638,25 +628,23 @@ class TodoWorkflowTests: XCTestCase {
onNoteChanged: { _ in }
).asAnyScreen()
),
- producingOutput: TodoEditWorkflow.Output.save(TodoModel(
+ // Simulate it emitting an output of `.save` to update the state.
+ producingOutput: .save(TodoModel(
title: "Updated Title",
note: "Updated Note"
))
)
.render { items in
// Just validate that there are two items in the back stack.
- // Additional validation could be done on the screens returned if so desired.
+ // Additional validation could be done on the screens returned, if desired.
XCTAssertEqual(2, items.count)
}
- // Validate that the state was updated after the last render pass with the output from the TodoEditWorkflow.
- .assert(
- state: TodoWorkflow.State(
+ // Validate that the state was updated after the render pass with the output from the TodoEditWorkflow.
+ .assert(state: TodoWorkflow.State(
todos: [TodoModel(title: "Updated Title", note: "Updated Note")],
step: .list
- )
- )
+ ))
}
-
}
```
@@ -668,7 +656,8 @@ Add another test to `RootWorkflowTests`. We will run the tree of workflows in a
```swift
// RootWorkflowTests.swift
- func testAppFlow() {
+ func testAppFlow() throws {
+ // Note: You'll need to `import Workflow` in order to use `WorkflowHost`
let workflowHost = WorkflowHost(workflow: RootWorkflow())
// First rendering is just the welcome screen. Update the name.
@@ -681,10 +670,10 @@ Add another test to `RootWorkflowTests`. We will run the tree of workflows in a
return
}
- welcomeScreen.onNameChanged("MyName")
+ welcomeScreen.onNameChanged("Ada")
}
- // Log in and go to the welcome list
+ // Log in and go to the todo list.
do {
let backStack = workflowHost.rendering.value
XCTAssertEqual(1, backStack.items.count)
@@ -697,7 +686,7 @@ Add another test to `RootWorkflowTests`. We will run the tree of workflows in a
welcomeScreen.onLoginTapped()
}
- // Expect the todo list. Edit the first todo.
+ // Expect the todo list to be rendered. Edit the first todo.
do {
let backStack = workflowHost.rendering.value
XCTAssertEqual(2, backStack.items.count)
@@ -711,8 +700,10 @@ Add another test to `RootWorkflowTests`. We will run the tree of workflows in a
XCTFail("Expected second screen of `TodoListScreen`")
return
}
+
XCTAssertEqual(1, todoScreen.todoTitles.count)
- // Select the first todo:
+
+ // Select the first todo.
todoScreen.onTodoSelected(0)
}
@@ -732,11 +723,11 @@ Add another test to `RootWorkflowTests`. We will run the tree of workflows in a
}
guard let editScreen = backStack.items[2].screen.wrappedScreen as? TodoEditScreen else {
- XCTFail("Expected second screen of `TodoEditScreen`")
+ XCTFail("Expected third screen of `TodoEditScreen`")
return
}
- // Update the title:
+ // Update the title.
editScreen.onTitleChanged("New Title")
}
@@ -803,15 +794,14 @@ Add another test to `RootWorkflowTests`. We will run the tree of workflows in a
XCTFail("Expected second screen of `TodoListScreen`")
return
}
+
XCTAssertEqual(1, todoScreen.todoTitles.count)
XCTAssertEqual("New Title", todoScreen.todoTitles[0])
-
}
-
}
```
-This test was *very* verbose, and rather long. Generally, it's not recommended to do full integration tests like this (the action tests and render tests can give pretty solid coverage of a workflow's behavior). However, this is an example of how it might be done in the case that it's needed.
+This test was *very* verbose, and rather long. Generally, it's not recommended to do full integration tests like this (the action tests and render tests can give pretty solid coverage of a workflow's behavior). However, this is an example of how it might be done in case it's needed.
# Conclusion

original_message: Update integration test section


message: Update the completed Tutorial 5 code

change_type: MODIFY

diff:
@@ -51,18 +51,17 @@ extension RootWorkflow {
enum Action: WorkflowAction {
typealias WorkflowType = RootWorkflow
- case login(name: String)
- case logout
+ case logIn(name: String)
+ case logOut
func apply(toState state: inout RootWorkflow.State) -> RootWorkflow.Output? {
switch self {
- case .login(name: let name):
- // When the `login` action is received, change the state to `todo`.
+ case .logIn(name: let name):
state = .todo(name: name)
- case .logout:
- // Return to the welcome state on logout.
+ case .logOut:
state = .welcome
}
+
return nil
}
}
@@ -90,17 +89,15 @@ extension RootWorkflow {
typealias Rendering = BackStackScreen<AnyScreen>
func render(state: RootWorkflow.State, context: RenderContext<RootWorkflow>) -> Rendering {
- // Delete the `let sink = context.makeSink(of: ...) as we no longer need a sink.
-
// Our list of back stack items. Will always include the "WelcomeScreen".
var backStackItems: [BackStackScreen<AnyScreen>.Item] = []
let welcomeScreen = WelcomeWorkflow()
.mapOutput { output -> Action in
switch output {
- // When `WelcomeWorkflow` emits `didLogin`, turn it into our `login` action.
- case .didLogin(name: let name):
- return .login(name: name)
+ // When `WelcomeWorkflow` emits `didLogIn`, turn it into our `logIn` action.
+ case .didLogIn(name: let name):
+ return .logIn(name: name)
}
}
.rendered(in: context)
@@ -116,25 +113,24 @@ extension RootWorkflow {
backStackItems.append(welcomeBackStackItem)
switch state {
- // When the state is `.welcome`, defer to the WelcomeWorkflow.
case .welcome:
// We always add the welcome screen to the backstack, so this is a no op.
break
- // When the state is `.todo`, defer to the TodoListWorkflow.
case .todo(name: let name):
+ // When the state is `.todo`, defer to the TodoListWorkflow.
- // was: let todoBackStackItems = TodoListWorkflow(name: name)
let todoBackStackItems = TodoWorkflow(name: name)
.mapOutput { output -> Action in
switch output {
case .back:
- // When receiving a `.back` output, treat it as a `.logout` action.
- return .logout
+ // When receiving a `.back` output, treat it as a `.logOut` action.
+ return .logOut
}
}
.rendered(in: context)
+ // Add the todoBackStackItems to our backStackItems
backStackItems.append(contentsOf: todoBackStackItems)
}

diff:
@@ -34,20 +34,19 @@ struct TodoEditScreen: Screen {
}
final class TodoEditViewController: ScreenViewController<TodoEditScreen> {
- // The `todoEditView` has all the logic for displaying the todo and editing.
- let todoEditView: TodoEditView
+ private var todoEditView: TodoEditView!
required init(screen: TodoEditScreen, environment: ViewEnvironment) {
- self.todoEditView = TodoEditView(frame: .zero)
-
super.init(screen: screen, environment: environment)
- update(with: screen)
}
override func viewDidLoad() {
super.viewDidLoad()
+ todoEditView = TodoEditView(frame: view.bounds)
view.addSubview(todoEditView)
+
+ updateView(with: screen)
}
override func viewDidLayoutSubviews() {
@@ -57,10 +56,14 @@ final class TodoEditViewController: ScreenViewController<TodoEditScreen> {
}
override func screenDidChange(from previousScreen: TodoEditScreen, previousEnvironment: ViewEnvironment) {
- update(with: screen)
+ super.screenDidChange(from: previousScreen, previousEnvironment: previousEnvironment)
+
+ guard isViewLoaded else { return }
+
+ updateView(with: screen)
}
- private func update(with screen: TodoEditScreen) {
+ private func updateView(with screen: TodoEditScreen) {
// Update the view with the data from the screen.
todoEditView.title = screen.title
todoEditView.note = screen.note

diff:
@@ -140,6 +140,7 @@ extension TodoEditWorkflow {
))
)
)
+
return backStackItem
}
}

diff:
@@ -31,18 +31,19 @@ struct TodoListScreen: Screen {
}
final class TodoListViewController: ScreenViewController<TodoListScreen> {
- let todoListView: TodoListView
+ private var todoListView: TodoListView!
required init(screen: TodoListScreen, environment: ViewEnvironment) {
- self.todoListView = TodoListView(frame: .zero)
super.init(screen: screen, environment: environment)
- update(with: screen)
}
override func viewDidLoad() {
super.viewDidLoad()
+ todoListView = TodoListView(frame: view.bounds)
view.addSubview(todoListView)
+
+ updateView(with: screen)
}
override func viewDidLayoutSubviews() {
@@ -52,10 +53,14 @@ final class TodoListViewController: ScreenViewController<TodoListScreen> {
}
override func screenDidChange(from previousScreen: TodoListScreen, previousEnvironment: ViewEnvironment) {
- update(with: screen)
+ super.screenDidChange(from: previousScreen, previousEnvironment: previousEnvironment)
+
+ guard isViewLoaded else { return }
+
+ updateView(with: screen)
}
- private func update(with screen: TodoListScreen) {
+ private func updateView(with screen: TodoListScreen) {
// Update the todoList on the view with what the screen provided:
todoListView.todoList = screen.todoTitles
todoListView.onTodoSelected = screen.onTodoSelected

diff:
@@ -25,6 +25,7 @@ import WorkflowUI
struct TodoListWorkflow: Workflow {
// The name is an input.
var name: String
+
// Use the list of todo items passed from our parent.
var todos: [TodoModel]
@@ -97,12 +98,11 @@ extension TodoListWorkflow {
typealias Rendering = BackStackScreen<AnyScreen>.Item
func render(state: TodoListWorkflow.State, context: RenderContext<TodoListWorkflow>) -> Rendering {
- // Define a sink to be able to send the .onBack action.
+ // Define a sink to be able to send actions.
let sink = context.makeSink(of: Action.self)
- let titles = todos.map { (todoModel) -> String in
- todoModel.title
- }
+ let titles = todos.map(\.title)
+
let todoListScreen = TodoListScreen(
todoTitles: titles,
onTodoSelected: { index in
@@ -115,7 +115,7 @@ extension TodoListWorkflow {
key: "list",
screen: todoListScreen.asAnyScreen(),
barContent: .init(
- title: "Welcome \(name)",
+ title: "Welcome, \(name)",
leftItem: .button(.back(handler: {
// When the left button is tapped, send the .onBack action.
sink.send(.onBack)

diff:
@@ -36,9 +36,11 @@ extension TodoWorkflow {
struct State: Equatable {
var todos: [TodoModel]
var step: Step
+
enum Step: Equatable {
// Showing the list of todo items.
case list
+
// Editing a single item. The state holds the index so it can be updated when a save action is received.
case edit(index: Int)
}
@@ -50,7 +52,7 @@ extension TodoWorkflow {
TodoModel(
title: "Take the cat for a walk",
note: "Cats really need their outside sunshine time. Don't forget to walk Charlie. Hamilton is less excited about the prospect."
- ),
+ )
],
step: .list
)
@@ -93,7 +95,7 @@ extension TodoWorkflow {
typealias WorkflowType = TodoWorkflow
case discardChanges
- case saveChanges(index: Int, todo: TodoModel)
+ case saveChanges(todo: TodoModel, index: Int)
func apply(toState state: inout TodoWorkflow.State) -> TodoWorkflow.Output? {
guard case .edit = state.step else {
@@ -102,13 +104,14 @@ extension TodoWorkflow {
switch self {
case .discardChanges:
+ // When a discard action is received, return to the list.
state.step = .list
- case .saveChanges(index: let index, todo: let updatedTodo):
- state.todos[index] = updatedTodo
- }
- // Return to the list view for either a discard or save action.
+ case .saveChanges(todo: let todo, index: let index):
+ // When changes are saved, update the state of that `todo` item and return to the list.
+ state.todos[index] = todo
state.step = .list
+ }
return nil
}
@@ -137,10 +140,7 @@ extension TodoWorkflow {
typealias Rendering = [BackStackScreen<AnyScreen>.Item]
func render(state: TodoWorkflow.State, context: RenderContext<TodoWorkflow>) -> Rendering {
- let todoListItem = TodoListWorkflow(
- name: name,
- todos: state.todos
- )
+ let todoListItem = TodoListWorkflow(name: name, todos: state.todos)
.mapOutput { output -> ListAction in
switch output {
case .back:
@@ -157,20 +157,21 @@ extension TodoWorkflow {
switch state.step {
case .list:
- // Return only the list item.
+ // On the "list" step, return just the list screen.
return [todoListItem]
case .edit(index: let index):
-
- let todoEditItem = TodoEditWorkflow(
- initialTodo: state.todos[index])
+ // On the "edit" step, return both the list and edit screens.
+ let todoEditItem = TodoEditWorkflow(initialTodo: state.todos[index])
.mapOutput { output -> EditAction in
switch output {
case .discard:
+ // Send the discardChanges actions when the discard output is received.
return .discardChanges
- case .save(let updatedTodo):
- return .saveChanges(index: index, todo: updatedTodo)
+ case .save(let todo):
+ // Send the saveChanges action when the save output is received.
+ return .saveChanges(todo: todo, index: index)
}
}
.rendered(in: context)

diff:
@@ -32,17 +32,18 @@ struct WelcomeScreen: Screen {
}
final class WelcomeViewController: ScreenViewController<WelcomeScreen> {
- var welcomeView: WelcomeView
+ private var welcomeView: WelcomeView!
required init(screen: WelcomeScreen, environment: ViewEnvironment) {
- self.welcomeView = WelcomeView(frame: .zero)
super.init(screen: screen, environment: environment)
- update(with: screen)
}
override func viewDidLoad() {
super.viewDidLoad()
+ welcomeView = WelcomeView(frame: view.bounds)
+ updateView(with: screen)
+
view.addSubview(welcomeView)
}
@@ -53,11 +54,14 @@ final class WelcomeViewController: ScreenViewController<WelcomeScreen> {
}
override func screenDidChange(from previousScreen: WelcomeScreen, previousEnvironment: ViewEnvironment) {
- update(with: screen)
+ super.screenDidChange(from: previousScreen, previousEnvironment: previousEnvironment)
+
+ guard isViewLoaded else { return }
+
+ updateView(with: screen)
}
- private func update(with screen: WelcomeScreen) {
- /// Update UI
+ private func updateView(with screen: WelcomeScreen) {
welcomeView.name = screen.name
welcomeView.onNameChanged = screen.onNameChanged
welcomeView.onLoginTapped = screen.onLoginTapped

diff:
@@ -23,7 +23,7 @@ import WorkflowUI
struct WelcomeWorkflow: Workflow {
enum Output: Equatable {
- case didLogin(name: String)
+ case didLogIn(name: String)
}
}
@@ -48,7 +48,7 @@ extension WelcomeWorkflow {
typealias WorkflowType = WelcomeWorkflow
case nameChanged(name: String)
- case didLogin
+ case didLogIn
func apply(toState state: inout WelcomeWorkflow.State) -> WelcomeWorkflow.Output? {
switch self {
@@ -58,13 +58,13 @@ extension WelcomeWorkflow {
// Return `nil` for the output, we want to handle this action only at the level of this workflow.
return nil
- case .didLogin:
- if state.name.count != 0 {
- // Return an output of `didLogin` with the name if it's not empty.
- return .didLogin(name: state.name)
- } else {
+ case .didLogIn:
+ if state.name.isEmpty {
// Don't log in if the name isn't filled in.
return nil
+ } else {
+ // Return an output of `didLogIn` with the name.
+ return .didLogIn(name: state.name)
}
}
}
@@ -102,8 +102,8 @@ extension WelcomeWorkflow {
sink.send(.nameChanged(name: name))
},
onLoginTapped: {
- // Whenever the login button is tapped, emit the `.didLogin` action.
- sink.send(.didLogin)
+ // Whenever the login button is tapped, emit the `.didLogIn` action.
+ sink.send(.didLogIn)
}
)
}

diff:
@@ -24,16 +24,15 @@ import XCTest
@testable import WorkflowUI
class RootWorkflowTests: XCTestCase {
- func testWelcomeRendering() {
+ func testWelcomeRendering() throws {
RootWorkflow()
// Start in the `.welcome` state
- .renderTester(initialState: RootWorkflow.State.welcome)
+ .renderTester(initialState: .welcome)
// The `WelcomeWorkflow` is expected to be started in this render.
.expectWorkflow(
type: WelcomeWorkflow.self,
- // Simulate this as the `WelcomeScreen` returned by the `WelcomeWorkflow`. The callback can be stubbed out, as they won't be used.
producingRendering: WelcomeScreen(
- name: "MyName",
+ name: "Ada",
onNameChanged: { _ in },
onLoginTapped: {}
)
@@ -45,28 +44,27 @@ class RootWorkflowTests: XCTestCase {
XCTFail("Expected first screen to be a `WelcomeScreen`")
return
}
- XCTAssertEqual("MyName", welcomeScreen.name)
+
+ XCTAssertEqual("Ada", welcomeScreen.name)
}
- // No output should be produced from the root workflow.
+ // Assert that no action was produced during this render, meaning our state remains unchanged
.assertNoOutput()
- // Assert that the state to stays as `.welcome`.
- .assert(state: .welcome)
}
- func testLogin() {
+ func testLogIn() throws {
RootWorkflow()
// Start in the `.welcome` state
- .renderTester(initialState: RootWorkflow.State.welcome)
+ .renderTester(initialState: .welcome)
// The `WelcomeWorkflow` is expected to be started in this render.
.expectWorkflow(
type: WelcomeWorkflow.self,
producingRendering: WelcomeScreen(
- name: "MyName",
+ name: "Ada",
onNameChanged: { _ in },
onLoginTapped: {}
),
- // Simulate the `WelcomeWorkflow` sending an output of `.didLogin` as if the login button was tapped.
- producingOutput: .didLogin(name: "MyName")
+ // Simulate the `WelcomeWorkflow` sending an out0put of `.didLogIn` as if the "log in" button was tapped.
+ producingOutput: .didLogIn(name: "Ada")
)
// Now, validate that there is a single item in the BackStackScreen, which is our welcome screen (prior to the output).
.render { rendering in
@@ -75,14 +73,14 @@ class RootWorkflowTests: XCTestCase {
XCTFail("Expected first screen to be a `WelcomeScreen`")
return
}
- XCTAssertEqual("MyName", welcomeScreen.name)
+ XCTAssertEqual("Ada", welcomeScreen.name)
}
- // No output should be produced from the root workflow.
- .assertNoOutput()
- .assert(state: .todo(name: "MyName"))
+ // Assert that the state transitioned to `.todo`
+ .assert(state: .todo(name: "Ada"))
}
- func testAppFlow() {
+ func testAppFlow() throws {
+ // Note: You'll need to `import Workflow` in order to use `WorkflowHost`
let workflowHost = WorkflowHost(workflow: RootWorkflow())
// First rendering is just the welcome screen. Update the name.
@@ -95,10 +93,10 @@ class RootWorkflowTests: XCTestCase {
return
}
- welcomeScreen.onNameChanged("MyName")
+ welcomeScreen.onNameChanged("Ada")
}
- // Log in and go to the welcome list
+ // Log in and go to the todo list.
do {
let backStack = workflowHost.rendering.value
XCTAssertEqual(1, backStack.items.count)
@@ -111,7 +109,7 @@ class RootWorkflowTests: XCTestCase {
welcomeScreen.onLoginTapped()
}
- // Expect the todo list. Edit the first todo.
+ // Expect the todo list to be rendered. Edit the first todo.
do {
let backStack = workflowHost.rendering.value
XCTAssertEqual(2, backStack.items.count)
@@ -125,8 +123,10 @@ class RootWorkflowTests: XCTestCase {
XCTFail("Expected second screen of `TodoListScreen`")
return
}
+
XCTAssertEqual(1, todoScreen.todoTitles.count)
- // Select the first todo:
+
+ // Select the first todo.
todoScreen.onTodoSelected(0)
}
@@ -150,7 +150,7 @@ class RootWorkflowTests: XCTestCase {
return
}
- // Update the title:
+ // Update the title.
editScreen.onTitleChanged("New Title")
}
@@ -177,17 +177,20 @@ class RootWorkflowTests: XCTestCase {
// Save the changes by tapping the right bar button.
// This also validates that the navigation bar was described as expected.
switch backStack.items[2].barVisibility {
+
case .hidden:
XCTFail("Expected a visible navigation bar")
case .visible(let barContent):
switch barContent.rightItem {
+
case .none:
XCTFail("Expected a right bar button")
case .button(let button):
switch button.content {
+
case .text(let text):
XCTAssertEqual("Save", text)
@@ -214,6 +217,7 @@ class RootWorkflowTests: XCTestCase {
XCTFail("Expected second screen of `TodoListScreen`")
return
}
+
XCTAssertEqual(1, todoScreen.todoTitles.count)
XCTAssertEqual("New Title", todoScreen.todoTitles[0])
}

diff:
@@ -19,13 +19,10 @@ import XCTest
@testable import Tutorial5
class TodoEditWorkflowTests: XCTestCase {
- func testAction() {
- TodoEditWorkflow
- .Action
+ func testAction() throws {
+ TodoEditWorkflow.Action
// Start with a todo of "Title" "Note"
- .tester(
- withState: TodoEditWorkflow.State(
- todo: TodoModel(title: "Title", note: "Note")))
+ .tester(withState: TodoEditWorkflow.State(todo: TodoModel(title: "Title", note: "Note")))
.verifyState { state in
XCTAssertEqual("Title", state.todo.title)
XCTAssertEqual("Note", state.todo.note)
@@ -41,7 +38,7 @@ class TodoEditWorkflowTests: XCTestCase {
// Update the note.
.send(action: .noteChanged("Updated Note"))
.assertNoOutput()
- // Validate that the note updated.
+ // Validate that the note was updated.
.verifyState { state in
XCTAssertEqual("Updated Title", state.todo.title)
XCTAssertEqual("Updated Note", state.todo.note)
@@ -69,9 +66,10 @@ class TodoEditWorkflowTests: XCTestCase {
}
}
- func testChangedPropertyUpdatesLocalState() {
+ func testChangedPropertyUpdatesLocalState() throws {
let initialWorkflow = TodoEditWorkflow(initialTodo: TodoModel(title: "Title", note: "Note"))
var state = initialWorkflow.makeInitialState()
+
// The initial state is a copy of the provided todo:
XCTAssertEqual("Title", state.todo.title)
XCTAssertEqual("Note", state.todo.note)
@@ -84,10 +82,9 @@ class TodoEditWorkflowTests: XCTestCase {
XCTAssertEqual("Updated Title", state.todo.title)
XCTAssertEqual("Note", state.todo.note)
- // The parent provided different properties. The internal state should be updated with the newly provided properties.
+ // The parent provided different properties. The internal state should be updated with the newly-provided properties.
let updatedWorkflow = TodoEditWorkflow(initialTodo: TodoModel(title: "New Title", note: "New Note"))
updatedWorkflow.workflowDidChange(from: initialWorkflow, state: &state)
-
XCTAssertEqual("New Title", state.todo.title)
XCTAssertEqual("New Note", state.todo.note)
}

diff:
@@ -19,9 +19,8 @@ import XCTest
@testable import Tutorial5
class TodoListWorkflowTests: XCTestCase {
- func testActions() {
- TodoListWorkflow
- .Action
+ func testActions() throws {
+ TodoListWorkflow.Action
.tester(withState: TodoListWorkflow.State())
.send(action: .onBack)
.verifyOutput { output in
@@ -37,7 +36,7 @@ class TodoListWorkflowTests: XCTestCase {
.verifyOutput { output in
// The `.selectTodo` action should emit a `.selectTodo` output.
switch output {
- case .selectTodo(let index):
+ case .selectTodo(index: let index):
XCTAssertEqual(7, index)
default:
XCTFail("Expected an output of `.selectTodo`")

diff:
import BackStackContainer
import Workflow
import WorkflowTesting
+import WorkflowUI
import XCTest
@testable import Tutorial5
class TodoWorkflowTests: XCTestCase {
- func testSelectingTodo() {
+ func testSelectingTodo() throws {
let todos: [TodoModel] = [TodoModel(title: "Title", note: "Note")]
- TodoWorkflow(name: "MyName")
- // Start from the list step to validate selecting a todo:
+ TodoWorkflow(name: "Ada")
+ // Start from the list step to validate selecting a todo.
.renderTester(initialState: TodoWorkflow.State(
todos: todos,
step: .list
))
- // We only expect the TodoListWorkflow
+ // We only expect the TodoListWorkflow to be rendered.
.expectWorkflow(
type: TodoListWorkflow.self,
- producingRendering: BackStackScreen.Item(
- screen: TodoListScreen(
- todoTitles: ["Title"],
- onTodoSelected: { _ in }
- ).asAnyScreen()),
- // Simulate selecting the first todo:
- producingOutput: TodoListWorkflow.Output.selectTodo(index: 0)
+ producingRendering: BackStackScreen<AnyScreen>.Item(
+ screen: TodoListScreen(todoTitles: ["Title"], onTodoSelected: { _ in }).asAnyScreen()
+ ),
+ // Simulate selecting the first todo.
+ producingOutput: .selectTodo(index: 0)
)
.render { items in
// Just validate that there is one item in the back stack.
- // Additional validation could be done on the screens returned if so desired.
+ // Additional validation could be done on the screens returned, if desired.
XCTAssertEqual(1, items.count)
}
- // Validate that the state was updated after the last render pass with the output from the TodoEditWorkflow.
- .assert(
- state: TodoWorkflow.State(
+ // Assert that the state was updated after the render pass with the output from the TodoListWorkflow.
+ .assert(state: TodoWorkflow.State(
todos: [TodoModel(title: "Title", note: "Note")],
step: .edit(index: 0)
- )
- )
+ ))
}
- func testSavingTodo() {
+ func testSavingTodo() throws {
let todos: [TodoModel] = [TodoModel(title: "Title", note: "Note")]
- TodoWorkflow(name: "MyName")
- // Start from the edit step so we can simulate saving:
+ TodoWorkflow(name: "Ada")
+ // Start from the edit step so we can simulate saving.
.renderTester(initialState: TodoWorkflow.State(
todos: todos,
step: .edit(index: 0)
))
- // We always expect the TodoListWorkflow
+ // We always expect the TodoListWorkflow to be rendered.
.expectWorkflow(
type: TodoListWorkflow.self,
- producingRendering: BackStackScreen.Item(
+ producingRendering: BackStackScreen<AnyScreen>.Item(
screen: TodoListScreen(
todoTitles: ["Title"],
onTodoSelected: { _ in }
).asAnyScreen()
)
)
- // Expect the TodoEditWorkflow. Additionally, simulate it emitting an output of ".save" to update the state.
+ // Expect the TodoEditWorkflow to be rendered as well (as we're on the edit step).
.expectWorkflow(
type: TodoEditWorkflow.self,
- producingRendering: BackStackScreen.Item(
+ producingRendering: BackStackScreen<AnyScreen>.Item(
screen: TodoEditScreen(
title: "Title",
note: "Note",
@@ -85,22 +82,21 @@ class TodoWorkflowTests: XCTestCase {
onNoteChanged: { _ in }
).asAnyScreen()
),
- producingOutput: TodoEditWorkflow.Output.save(TodoModel(
+ // Simulate it emitting an output of `.save` to update the state.
+ producingOutput: .save(TodoModel(
title: "Updated Title",
note: "Updated Note"
))
)
.render { items in
// Just validate that there are two items in the back stack.
- // Additional validation could be done on the screens returned if so desired.
+ // Additional validation could be done on the screens returned, if desired.
XCTAssertEqual(2, items.count)
}
- // Validate that the state was updated after the last render pass with the output from the TodoEditWorkflow.
- .assert(
- state: TodoWorkflow.State(
+ // Validate that the state was updated after the render pass with the output from the TodoEditWorkflow.
+ .assert(state: TodoWorkflow.State(
todos: [TodoModel(title: "Updated Title", note: "Updated Note")],
step: .list
- )
- )
+ ))
}
}

diff:
@@ -19,13 +19,9 @@ import XCTest
@testable import Tutorial5
class WelcomeWorkflowTests: XCTestCase {
- func testNameUpdates() {
+ func testNameUpdates() throws {
WelcomeWorkflow.Action
.tester(withState: WelcomeWorkflow.State(name: ""))
- .verifyState { state in
- // The initial state provided was an empty name.
- XCTAssertEqual("", state.name)
- }
.send(action: .nameChanged(name: "myName"))
// No output is expected when the name changes.
.assertNoOutput()
@@ -35,63 +31,66 @@ class WelcomeWorkflowTests: XCTestCase {
}
}
- func testLogin() {
+ func testLogIn() throws {
WelcomeWorkflow.Action
.tester(withState: WelcomeWorkflow.State(name: ""))
- .send(action: .didLogin)
- // Since the name is empty, `.didLogin` will not emit an output.
+ .send(action: .didLogIn)
+ // Since the name is empty, `.didLogIn` will not emit an output.
.assertNoOutput()
.verifyState { state in
// The name is empty, as was specified in the initial state.
XCTAssertEqual("", state.name)
}
- .send(action: .nameChanged(name: "MyName"))
+ .send(action: .nameChanged(name: "Ada"))
// Update the name, no output expected.
.assertNoOutput()
.verifyState { state in
// Validate the name was updated.
- XCTAssertEqual("MyName", state.name)
+ XCTAssertEqual("Ada", state.name)
}
- .send(action: .didLogin)
+ .send(action: .didLogIn)
.verifyOutput { output in
- // Now a `.didLogin` output should be emitted when the `.didLogin` action was received.
+ // Now a `.didLogIn` output should be emitted when the `.didLogIn` action was received.
switch output {
- case .didLogin(let name):
- XCTAssertEqual("MyName", name)
+ case .didLogIn(name: let name):
+ XCTAssertEqual("Ada", name)
}
}
}
- func testRendering() {
+ func testRenderingInitial() throws {
WelcomeWorkflow()
- // Use the initial state provided by the welcome workflow
+ // Use the initial state provided by the welcome workflow.
.renderTester()
.render { screen in
XCTAssertEqual("", screen.name)
- // Simulate tapping the login button. No output will be emitted, as the name is empty:
+
+ // Simulate tapping the log in button. No output will be emitted, as the name is empty.
screen.onLoginTapped()
}
.assertNoOutput()
- .assert(state: WelcomeWorkflow.State(name: ""))
+ }
- // Next, simulate the name updating, expecting the state to be changed to reflect the updated name:
+ func testRenderingNameChange() throws {
WelcomeWorkflow()
- .renderTester(initialState: WelcomeWorkflow.State(name: ""))
+ // Use the initial state provided by the welcome workflow.
+ .renderTester()
+ // Next, simulate the name updating, expecting the state to be changed to reflect the updated name.
.render { screen in
- screen.onNameChanged("myName")
+ screen.onNameChanged("Ada")
+ }
+ .assert(state: WelcomeWorkflow.State(name: "Ada"))
}
- .assert(state: WelcomeWorkflow.State(name: "myName"))
- .assertNoOutput()
- // Finally, validate that `.didLogin` is sent when login is tapped with a non-empty name:
+ func testRenderingLogIn() throws {
WelcomeWorkflow()
- .renderTester(initialState: WelcomeWorkflow.State(name: "myName"))
+ // Start with a name already entered.
+ .renderTester(initialState: WelcomeWorkflow.State(name: "Ada"))
+ // Simulate a log in button tap.
.render { screen in
- XCTAssertEqual("myName", screen.name)
- // Simulate tapping the login button. No output will be emitted, as the name is empty:
screen.onLoginTapped()
}
- .assert(output: .didLogin(name: "myName"))
- .assert(state: WelcomeWorkflow.State(name: "myName"))
+ // Finally, validate that `.didLogIn` was sent.
+ .assert(output: .didLogIn(name: "Ada"))
}
}

license: Apache License 2.0

repo: square/workflow-swift

original_message: Update the completed Tutorial 5 code


message: Bump ReactiveSwift to 7.0.0

diff:
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
s.source_files = 'Workflow/Sources/*.swift'
- s.dependency 'ReactiveSwift', '~> 6.3.0'
+ s.dependency 'ReactiveSwift', '~> 7.0.0'
s.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'Workflow/Tests/**/*.swift'

diff:
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.source_files = 'WorkflowReactiveSwift/Sources/**/*.swift'
s.dependency 'Workflow', "#{s.version}"
- s.dependency 'ReactiveSwift', '~> 6.3.0'
+ s.dependency 'ReactiveSwift', '~> 7.0.0'
s.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'WorkflowReactiveSwift/Tests/**/*.swift'

original_message: Bump ReactiveSwift to 7.0.0


message: Bump RxSwift to 6.5

diff:
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.source_files = 'WorkflowRxSwift/Sources/**/*.swift'
s.dependency 'Workflow', "#{s.version}"
- s.dependency 'RxSwift', '~> 6.2'
+ s.dependency 'RxSwift', '~> 6.5'
s.test_spec 'Tests' do |test_spec|
test_spec.source_files = 'WorkflowRxSwift/Tests/**/*.swift'

original_message: Bump RxSwift to 6.5


message: Use https download link

diff:
"iso_name": "FreeBSD-10.3-RELEASE-amd64-disc1.iso",
"memory": "1024",
"metadata": "floppy/dummy_metadata.json",
- "mirror": "http://ftp.freebsd.org/pub/FreeBSD",
+ "mirror": "https://download.freebsd.org/ftp",
"mirror_directory": "releases/amd64/amd64/ISO-IMAGES/10.3",
"name": "freebsd-10.3",
"no_proxy": "{{env `no_proxy`}}",

diff:
"iso_name": "FreeBSD-10.3-RELEASE-i386-disc1.iso",
"memory": "1024",
"metadata": "floppy/dummy_metadata.json",
- "mirror": "http://ftp.freebsd.org/pub/FreeBSD",
+ "mirror": "https://download.freebsd.org/ftp",
"mirror_directory": "releases/i386/i386/ISO-IMAGES/10.3",
"name": "freebsd-10.3-i386",
"no_proxy": "{{env `no_proxy`}}",

diff:
"iso_name": "FreeBSD-11.1-RELEASE-amd64-disc1.iso",
"memory": "1024",
"metadata": "floppy/dummy_metadata.json",
- "mirror": "http://ftp.freebsd.org/pub/FreeBSD",
+ "mirror": "https://download.freebsd.org/ftp",
"mirror_directory": "releases/amd64/amd64/ISO-IMAGES/11.1",
"no_proxy": "{{env `no_proxy`}}",
"template": "freebsd-11.1-amd64",

repo: chef/bento

original_message:
Use https download link

Signed-off-by: Li-Wen Hsu <lwhsu@lwhsu.org>


diff:
@@ -8,7 +8,7 @@ virtualbox-iso|virtualbox-ovf)
# Disable X11 because vagrants are (usually) headless
echo 'WITHOUT_X11="YES"' >> /etc/make.conf;
- pkg install -y virtualbox-ose-additions;
+ pkg install -y virtualbox-ose-additions-nox11;
echo 'vboxdrv_load="YES"' >>/boot/loader.conf;
echo 'vboxnet_enable="YES"' >>/etc/rc.conf;

original_message:
Use virtualbox-ose-additions-nox11 to minimize box size

Signed-off-by: Li-Wen Hsu <lwhsu@lwhsu.org>


message:
Don't install src while creating box
This speeds up box creation a lot.  The box creation is using pkg(1)
to install software so doesn't need source files.  It doesn't make much
sense installing all the source files and then deleting them during
cleanup stage.

diff:
-DISTRIBUTIONS="base.txz lib32.txz kernel.txz src.txz"
+DISTRIBUTIONS="base.txz lib32.txz kernel.txz"
# for variations in the root disk device name between VMware and Virtualbox
if [ -e /dev/ada0 ]; then

diff:
@@ -7,6 +7,5 @@ rm -f /var/db/freebsd-update/*-rollback;
rm -rf /var/db/freebsd-update/install.*;
rm -rf /boot/kernel.old;
rm -f /boot/kernel*/*.symbols;
-rm -rf /usr/src/*;
rm -f /*.core;
rm -rf /var/cache/pkg;


message: Add config for FreeBSD-11.1-i386

change_type: ADD

diff:
+{
+ "builders": [
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
+ "guest_os_type": "FreeBSD",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-virtualbox",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "virtualbox-iso",
+ "vboxmanage": [
+ [
+ "modifyvm",
+ "{{.Name}}",
+ "--memory",
+ "{{ user `memory` }}"
+ ],
+ [
+ "modifyvm",
+ "{{.Name}}",
+ "--cpus",
+ "{{ user `cpus` }}"
+ ]
+ ],
+ "virtualbox_version_file": ".vbox_version",
+ "vm_name": "{{ user `template` }}"
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "<wait5>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_os_type": "freebsd",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-vmare",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "tools_upload_flavor": "freebsd",
+ "type": "vmware-iso",
+ "vm_name": "{{ user `template` }}",
+ "vmx_data": {
+ "cpuid.coresPerSocket": "1",
+ "memsize": "{{ user `memory` }}",
+ "numvcpus": "{{ user `cpus` }}"
+ },
+ "vmx_remove_ethernet_interfaces": true
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "8s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_os_type": "freebsd",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-parallels",
+ "parallels_tools_mode": "disable",
+ "prlctl": [
+ [
+ "set",
+ "{{.Name}}",
+ "--memsize",
+ "{{ user `memory` }}"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--cpus",
+ "{{ user `cpus` }}"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-set",
+ "cdrom0",
+ "--iface",
+ "ide"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-del",
+ "fdd0"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-del",
+ "parallel0"
+ ]
+ ],
+ "prlctl_version_file": ".prlctl_version",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "parallels-iso",
+ "vm_name": "{{ user `template` }}"
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.vtnet0 vtnet0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "7s",
+ "disk_size": "{{user `disk_size`}}",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-qemu",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "qemu",
+ "vm_name": "{{ user `template` }}"
+ }
+ ],
+ "post-processors": [
+ {
+ "output": "../builds/{{user `box_basename`}}.{{.Provider}}.box",
+ "type": "vagrant",
+ "vagrantfile_template": "vagrantfile_templates/freebsd.rb"
+ }
+ ],
+ "provisioners": [
+ {
+ "environment_vars": [
+ "HOME_DIR=/home/vagrant",
+ "http_proxy={{user `http_proxy`}}",
+ "https_proxy={{user `https_proxy`}}",
+ "no_proxy={{user `no_proxy`}}"
+ ],
+ "execute_command": "echo 'vagrant' | {{.Vars}} su -m root -c 'sh -eux {{.Path}}'",
+ "expect_disconnect": true,
+ "scripts": [
+ "scripts/update.sh",
+ "scripts/postinstall.sh",
+ "scripts/sudoers.sh",
+ "../_common/vagrant.sh",
+ "scripts/vmtools.sh",
+ "scripts/cleanup.sh",
+ "scripts/minimize.sh"
+ ],
+ "type": "shell"
+ }
+ ],
+ "variables": {
+ "box_basename": "freebsd-11.1-i386",
+ "build_timestamp": "{{isotime \"20060102150405\"}}",
+ "cpus": "1",
+ "disk_size": "40960",
+ "git_revision": "__unknown_git_revision__",
+ "headless": "",
+ "http_proxy": "{{env `http_proxy`}}",
+ "https_proxy": "{{env `https_proxy`}}",
+ "install_path": "freebsd-11/installerconfig",
+ "iso_checksum": "e53ae5fc58fd2e28643ba4c64e2c49505cf9d84d22396e3633ee9670782aab57",
+ "iso_checksum_type": "sha256",
+ "iso_name": "FreeBSD-11.1-RELEASE-i386-disc1.iso",
+ "memory": "1024",
+ "mirror": "https://download.freebsd.org/ftp",
+ "mirror_directory": "releases/i386/i386/ISO-IMAGES/11.1",
+ "no_proxy": "{{env `no_proxy`}}",
+ "template": "freebsd-11.1-i386",
+ "version": "TIMESTAMP"
+ }
+}
+

original_message: Add config for FreeBSD-11.1-i386


message: Install lib32.txz conditionally

diff:
-DISTRIBUTIONS="base.txz lib32.txz kernel.txz src.txz"
+DISTRIBUTIONS="base.txz kernel.txz src.txz"
+if [ `uname -m` = "amd64" ]; then
+ DISTRIBUTIONS="${DISTRIBUTIONS} lib32.txz"
+fi
# for variations in the root disk device name between VMware and Virtualbox
if [ -e /dev/ada0 ]; then

original_message: Install lib32.txz conditionally


message: Use open-vm-tools-nox11 from pkg, this is suggested by vmware-install.pl

diff:
@@ -36,35 +36,9 @@ virtualbox-iso|virtualbox-ovf)
;;
vmware-iso|vmware-vmx)
- # Install Perl and other software needed by vmware-install.pl
- pkg install -y perl5;
- pkg install -y compat6x-`uname -m`;
- # the install script is very picky about location of perl command
- ln -s /usr/local/bin/perl /usr/bin/perl;
-
- mkdir -p /tmp/vmfusion;
- mkdir -p /tmp/vmfusion-archive;
- mdconfig -a -t vnode -f $HOME_DIR/freebsd.iso -u 0;
- mount -t cd9660 /dev/md0 /tmp/vmfusion;
- tar xzf /tmp/vmfusion/vmware-freebsd-tools.tar.gz -C /tmp/vmfusion-archive;
-
- VER="`cat /tmp/vmfusion/manifest.txt | cut -f2 -d'"'`";
- MAJ_VER="`echo ${VER} | cut -d'.' -f1`";
- echo "VMware Tools Version: $VER";
-
- if [ "${MAJ_VER}" -lt "10" ]; then
- /tmp/vmfusion-archive/vmware-tools-distrib/vmware-install.pl --default;
- else
- /tmp/vmfusion-archive/vmware-tools-distrib/vmware-install.pl --force-install;
- fi
+ pkg install -y open-vm-tools-nox11;
echo 'ifconfig_vxn0="dhcp"' >>/etc/rc.conf;
- umount /tmp/vmfusion;
- rm -rf /tmp/vmfusion;
- rm -rf /tmp/vmfusion-archive;
- rm -f $HOME_DIR/*.iso;
-
- rm -f /usr/bin/perl;
;;
parallels-iso|parallels-pvm)


message:
Restore and adjust turnings along with install vmtools
Load FUSE kernel module for shared folder
Reduce autoboot delay
Use built-in vmx(4) to replace vxn(4)

diff:
@@ -38,7 +38,13 @@ virtualbox-iso|virtualbox-ovf)
vmware-iso|vmware-vmx)
pkg install -y open-vm-tools-nox11;
- echo 'ifconfig_vxn0="dhcp"' >>/etc/rc.conf;
+ # for shared folder
+ echo 'fuse_load="YES"' >>/boot/loader.conf;
+
+ # Don't waste 10 seconds waiting for boot
+ echo 'autoboot_delay="-1"' >>/boot/loader.conf;
+
+ echo 'ifconfig_vmx0="dhcp"' >>/etc/rc.conf;
;;
parallels-iso|parallels-pvm)

original_message:
Restore and adjust turnings along with install vmtools

- Load FUSE kernel module for shared folder
- Reduce autoboot delay
- Use built-in vmx(4) to replace vxn(4)


message: Disable uploading vbox guest additions ISO, which is installed via pkg

diff:
],
"boot_wait": "10s",
"disk_size": "{{user `disk_size`}}",
- "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
+ "guest_additions_mode": "disable",
"guest_os_type": "FreeBSD_64",
"headless": "{{ user `headless` }}",
"http_directory": "http",

diff:
],
"boot_wait": "10s",
"disk_size": "{{user `disk_size`}}",
- "guest_additions_path": "VBoxGuestAdditions_{{.Version}}.iso",
+ "guest_additions_mode": "disable",
"guest_os_type": "FreeBSD",
"headless": "{{ user `headless` }}",
"http_directory": "http",


message: Use smaller install media

diff:
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
"install_path": "freebsd-10/install.sh",
- "iso_checksum": "195a270b4fd2db4f9e3a1451384f2d3bfa699696d110873b62bcf7540524da0d",
+ "iso_checksum": "7ac73b2a899024e1d9e71e55b5c9b9ac13938468206c72c5a1cf23c7e0a715b4",
"iso_checksum_type": "sha256",
- "iso_name": "FreeBSD-10.4-RELEASE-amd64-dvd1.iso",
+ "iso_name": "FreeBSD-10.4-RELEASE-amd64-disc1.iso",
"memory": "1024",
"mirror": "https://download.freebsd.org/ftp",
"mirror_directory": "releases/amd64/amd64/ISO-IMAGES/10.4",

diff:
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
"install_path": "freebsd-10/install.sh",
- "iso_checksum": "006a0f77b2d5ddfc1491a72b04b7246971ac35adb4da47a766228b36650a56c6",
+ "iso_checksum": "719ea971deb508936953be78ae9963caa9247d3ee437d0941b08fc7df7ce37b0",
"iso_checksum_type": "sha256",
- "iso_name": "FreeBSD-10.4-RELEASE-i386-dvd1.iso",
+ "iso_name": "FreeBSD-10.4-RELEASE-i386-disc1.iso",
"memory": "1024",
"mirror": "https://download.freebsd.org/ftp",
"mirror_directory": "releases/i386/i386/ISO-IMAGES/10.4",

original_message: Use smaller install media


message: Add new variable pkg_branch for choosing pkg branch

diff:
"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"
}

diff:
"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"
}

diff:
"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"
}

diff:
"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"
}

diff:
"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"
}

diff:
"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"
}

diff:
@@ -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


message: Drop < 10.x bits, not officially supported anymore

diff:
[ -z "$http_proxy" ] && unset http_proxy
[ -z "$https_proxy" ] && unset https_proxy
-major_version="`uname -r | awk -F. '{print $1}'`";
-
-if [ "$major_version" -lt 10 ]; then
- # Allow freebsd-update to run fetch without stdin attached to a terminal
- sed 's/\[ ! -t 0 \]/false/' /usr/sbin/freebsd-update >/tmp/freebsd-update;
- chmod +x /tmp/freebsd-update;
-
- freebsd_update="/tmp/freebsd-update";
-else
freebsd_update="/usr/sbin/freebsd-update --not-running-from-cron";
-fi
# Update FreeBSD
# NOTE: the install action fails if there are no updates so || true it
@@ -27,10 +17,5 @@ if [ "$pkg_branch" != "quarterly" ]; then
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
- echo "WITH_PKGNG=yes" >>/etc/make.conf;
-fi
-
pkg update;

diff:
@@ -16,10 +16,7 @@ virtualbox-iso|virtualbox-ovf)
echo 'vboxservice_enable="YES"' >>/etc/rc.conf;
echo 'virtio_blk_load="YES"' >>/boot/loader.conf;
- if [ "$freebsd_major" -gt 9 ]; then
- # Appeared in FreeBSD 10
echo 'virtio_scsi_load="YES"' >>/boot/loader.conf;
- fi
echo 'virtio_balloon_load="YES"' >>/boot/loader.conf;
echo 'if_vtnet_load="YES"' >>/boot/loader.conf;


message: Combine pkg invocations

diff:
ntpdate -v -b 0.freebsd.pool.ntp.org
# Install curl and ca_root_nss
-pkg install -y curl;
-pkg install -y ca_root_nss;
+pkg install -y curl ca_root_nss;
# Emulate the ETCSYMLINK behavior of ca_root_nss; this is for FreeBSD 10,
# where fetch(1) was massively refactored and doesn't come with

diff:
@@ -17,5 +17,4 @@ if [ "$pkg_branch" != "quarterly" ]; then
rm -f /etc/pkg/FreeBSD.conf.bak
fi
-env ASSUME_ALWAYS_YES=true pkg bootstrap;
-pkg update;
+env ASSUME_ALWAYS_YES=true pkg update;

original_message: Combine pkg invocations


message: Remove EOL'd FreeBSD-10.3

change_type: DELETE

diff:
-{
- "builders": [
- {
- "boot_command": [
- "<esc><wait>",
- "boot -s<wait>",
- "<enter><wait>",
- "<wait10><wait10>",
- "/bin/sh<enter><wait>",
- "mdmfs -s 100m md1 /tmp<enter><wait>",
- "mdmfs -s 100m md2 /mnt<enter><wait>",
- "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
- "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}<enter><wait>"
- ],
- "boot_wait": "10s",
- "disk_size": "{{user `disk_size`}}",
- "guest_additions_mode": "disable",
- "guest_os_type": "FreeBSD_64",
- "headless": "{{ user `headless` }}",
- "http_directory": "http",
- "iso_checksum": "{{user `iso_checksum`}}",
- "iso_checksum_type": "{{user `iso_checksum_type`}}",
- "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
- "output_directory": "../builds/packer-{{user `template`}}-virtualbox",
- "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
- "ssh_password": "vagrant",
- "ssh_port": 22,
- "ssh_username": "vagrant",
- "ssh_wait_timeout": "10000s",
- "type": "virtualbox-iso",
- "vboxmanage": [
- [
- "modifyvm",
- "{{.Name}}",
- "--memory",
- "{{ user `memory` }}"
- ],
- [
- "modifyvm",
- "{{.Name}}",
- "--cpus",
- "{{ user `cpus` }}"
- ]
- ],
- "virtualbox_version_file": ".vbox_version",
- "vm_name": "{{ user `template` }}"
- },
- {
- "boot_command": [
- "<esc><wait>",
- "boot -s<wait>",
- "<enter><wait>",
- "<wait10><wait10>",
- "/bin/sh<enter><wait>",
- "mdmfs -s 100m md1 /tmp<enter><wait>",
- "mdmfs -s 100m md2 /mnt<enter><wait>",
- "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
- "<wait5>",
- "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}<enter><wait>"
- ],
- "boot_wait": "10s",
- "disk_size": "{{user `disk_size`}}",
- "guest_os_type": "freebsd-64",
- "headless": "{{ user `headless` }}",
- "http_directory": "http",
- "iso_checksum": "{{user `iso_checksum`}}",
- "iso_checksum_type": "{{user `iso_checksum_type`}}",
- "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
- "output_directory": "../builds/packer-{{user `template`}}-vmware",
- "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
- "ssh_password": "vagrant",
- "ssh_port": 22,
- "ssh_username": "vagrant",
- "ssh_wait_timeout": "10000s",
- "type": "vmware-iso",
- "vm_name": "{{ user `template` }}",
- "vmx_data": {
- "cpuid.coresPerSocket": "1",
- "memsize": "{{ user `memory` }}",
- "numvcpus": "{{ user `cpus` }}"
- },
- "vmx_remove_ethernet_interfaces": true
- },
- {
- "boot_command": [
- "<esc><wait>",
- "boot -s<wait>",
- "<enter><wait>",
- "<wait10><wait10>",
- "/bin/sh<enter><wait>",
- "mdmfs -s 100m md1 /tmp<enter><wait>",
- "mdmfs -s 100m md2 /mnt<enter><wait>",
- "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
- "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}<enter><wait>"
- ],
- "boot_wait": "8s",
- "disk_size": "{{user `disk_size`}}",
- "guest_os_type": "freebsd",
- "http_directory": "http",
- "iso_checksum": "{{user `iso_checksum`}}",
- "iso_checksum_type": "{{user `iso_checksum_type`}}",
- "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
- "output_directory": "../builds/packer-{{user `template`}}-parallels",
- "parallels_tools_mode": "disable",
- "prlctl": [
- [
- "set",
- "{{.Name}}",
- "--memsize",
- "{{ user `memory` }}"
- ],
- [
- "set",
- "{{.Name}}",
- "--cpus",
- "{{ user `cpus` }}"
- ],
- [
- "set",
- "{{.Name}}",
- "--device-set",
- "cdrom0",
- "--iface",
- "ide"
- ],
- [
- "set",
- "{{.Name}}",
- "--device-del",
- "fdd0"
- ],
- [
- "set",
- "{{.Name}}",
- "--device-del",
- "parallel0"
- ]
- ],
- "prlctl_version_file": ".prlctl_version",
- "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
- "ssh_password": "vagrant",
- "ssh_port": 22,
- "ssh_username": "vagrant",
- "ssh_wait_timeout": "10000s",
- "type": "parallels-iso",
- "vm_name": "{{ user `template` }}"
- },
- {
- "boot_command": [
- "<esc><wait>",
- "boot -s<wait>",
- "<enter><wait>",
- "<wait10><wait10>",
- "/bin/sh<enter><wait>",
- "mdmfs -s 100m md1 /tmp<enter><wait>",
- "mdmfs -s 100m md2 /mnt<enter><wait>",
- "dhclient -l /tmp/dhclient.lease.vtnet0 vtnet0<enter><wait>",
- "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }} vtnet0<enter><wait>"
- ],
- "boot_wait": "7s",
- "disk_size": "{{user `disk_size`}}",
- "headless": "{{ user `headless` }}",
- "http_directory": "http",
- "iso_checksum": "{{user `iso_checksum`}}",
- "iso_checksum_type": "{{user `iso_checksum_type`}}",
- "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
- "output_directory": "../builds/packer-{{user `template`}}-qemu",
- "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
- "ssh_password": "vagrant",
- "ssh_port": 22,
- "ssh_username": "vagrant",
- "ssh_wait_timeout": "10000s",
- "type": "qemu",
- "vm_name": "{{ user `template` }}"
- }
- ],
- "post-processors": [
- {
- "output": "../builds/{{user `box_basename`}}.{{.Provider}}.box",
- "type": "vagrant",
- "vagrantfile_template": "vagrantfile_templates/freebsd.rb"
- }
- ],
- "provisioners": [
- {
- "environment_vars": [
- "HOME_DIR=/home/vagrant",
- "http_proxy={{user `http_proxy`}}",
- "https_proxy={{user `https_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,
- "scripts": [
- "scripts/update.sh",
- "scripts/postinstall.sh",
- "scripts/sudoers.sh",
- "../_common/vagrant.sh",
- "scripts/vmtools.sh",
- "scripts/cleanup.sh",
- "scripts/minimize.sh"
- ],
- "type": "shell"
- }
- ],
- "variables": {
- "box_basename": "freebsd-10.3",
- "build_timestamp": "{{isotime \"20060102150405\"}}",
- "cpus": "1",
- "disk_size": "65536",
- "git_revision": "__unknown_git_revision__",
- "headless": "",
- "http_proxy": "{{env `http_proxy`}}",
- "https_proxy": "{{env `https_proxy`}}",
- "install_path": "freebsd-10/install.sh",
- "iso_checksum": "fef068cf6dea26923ab84b62ba9f21461ca0bdec90a0741c8ffb0e1ca29e410d",
- "iso_checksum_type": "sha256",
- "iso_name": "FreeBSD-10.3-RELEASE-amd64-disc1.iso",
- "memory": "1024",
- "mirror": "https://download.freebsd.org/ftp",
- "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"
- }
-}
-

diff:
-{
- "builders": [
- {
- "boot_command": [
- "<esc><wait>",
- "boot -s<wait>",
- "<enter><wait>",
- "<wait10><wait10>",
- "/bin/sh<enter><wait>",
- "mdmfs -s 100m md1 /tmp<enter><wait>",
- "mdmfs -s 100m md2 /mnt<enter><wait>",
- "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
- "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}<enter><wait>"
- ],
- "boot_wait": "10s",
- "disk_size": "{{user `disk_size`}}",
- "guest_additions_mode": "disable",
- "guest_os_type": "FreeBSD",
- "headless": "{{ user `headless` }}",
- "http_directory": "http",
- "iso_checksum": "{{user `iso_checksum`}}",
- "iso_checksum_type": "{{user `iso_checksum_type`}}",
- "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
- "output_directory": "../builds/packer-{{user `template`}}-virtualbox",
- "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
- "ssh_password": "vagrant",
- "ssh_port": 22,
- "ssh_username": "vagrant",
- "ssh_wait_timeout": "10000s",
- "type": "virtualbox-iso",
- "vboxmanage": [
- [
- "modifyvm",
- "{{.Name}}",
- "--memory",
- "{{ user `memory` }}"
- ],
- [
- "modifyvm",
- "{{.Name}}",
- "--cpus",
- "{{ user `cpus` }}"
- ]
- ],
- "virtualbox_version_file": ".vbox_version",
- "vm_name": "{{ user `template` }}"
- },
- {
- "boot_command": [
- "<esc><wait>",
- "boot -s<wait>",
- "<enter><wait>",
- "<wait10><wait10>",
- "/bin/sh<enter><wait>",
- "mdmfs -s 100m md1 /tmp<enter><wait>",
- "mdmfs -s 100m md2 /mnt<enter><wait>",
- "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
- "<wait5>",
- "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}<enter><wait>"
- ],
- "boot_wait": "10s",
- "disk_size": "{{user `disk_size`}}",
- "guest_os_type": "freebsd",
- "headless": "{{ user `headless` }}",
- "http_directory": "http",
- "iso_checksum": "{{user `iso_checksum`}}",
- "iso_checksum_type": "{{user `iso_checksum_type`}}",
- "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
- "output_directory": "../builds/packer-{{user `template`}}-vmware",
- "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
- "ssh_password": "vagrant",
- "ssh_port": 22,
- "ssh_username": "vagrant",
- "ssh_wait_timeout": "10000s",
- "type": "vmware-iso",
- "vm_name": "{{ user `template` }}",
- "vmx_data": {
- "cpuid.coresPerSocket": "1",
- "memsize": "{{ user `memory` }}",
- "numvcpus": "{{ user `cpus` }}"
- },
- "vmx_remove_ethernet_interfaces": true
- },
- {
- "boot_command": [
- "<esc><wait>",
- "boot -s<wait>",
- "<enter><wait>",
- "<wait10><wait10>",
- "/bin/sh<enter><wait>",
- "mdmfs -s 100m md1 /tmp<enter><wait>",
- "mdmfs -s 100m md2 /mnt<enter><wait>",
- "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
- "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}<enter><wait>"
- ],
- "boot_wait": "8s",
- "disk_size": "{{user `disk_size`}}",
- "guest_os_type": "freebsd",
- "http_directory": "http",
- "iso_checksum": "{{user `iso_checksum`}}",
- "iso_checksum_type": "{{user `iso_checksum_type`}}",
- "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
- "output_directory": "../builds/packer-{{user `template`}}-parallels",
- "parallels_tools_mode": "disable",
- "prlctl": [
- [
- "set",
- "{{.Name}}",
- "--memsize",
- "{{ user `memory` }}"
- ],
- [
- "set",
- "{{.Name}}",
- "--cpus",
- "{{ user `cpus` }}"
- ],
- [
- "set",
- "{{.Name}}",
- "--device-set",
- "cdrom0",
- "--iface",
- "ide"
- ],
- [
- "set",
- "{{.Name}}",
- "--device-del",
- "fdd0"
- ],
- [
- "set",
- "{{.Name}}",
- "--device-del",
- "parallel0"
- ]
- ],
- "prlctl_version_file": ".prlctl_version",
- "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
- "ssh_password": "vagrant",
- "ssh_port": 22,
- "ssh_username": "vagrant",
- "ssh_wait_timeout": "10000s",
- "type": "parallels-iso",
- "vm_name": "{{ user `template` }}"
- },
- {
- "boot_command": [
- "<esc><wait>",
- "boot -s<wait>",
- "<enter><wait>",
- "<wait10><wait10>",
- "/bin/sh<enter><wait>",
- "mdmfs -s 100m md1 /tmp<enter><wait>",
- "mdmfs -s 100m md2 /mnt<enter><wait>",
- "dhclient -l /tmp/dhclient.lease.vtnet0 vtnet0<enter><wait>",
- "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}<enter><wait>"
- ],
- "boot_wait": "7s",
- "disk_size": "{{user `disk_size`}}",
- "headless": "{{ user `headless` }}",
- "http_directory": "http",
- "iso_checksum": "{{user `iso_checksum`}}",
- "iso_checksum_type": "{{user `iso_checksum_type`}}",
- "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
- "output_directory": "../builds/packer-{{user `template`}}-qemu",
- "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
- "ssh_password": "vagrant",
- "ssh_port": 22,
- "ssh_username": "vagrant",
- "ssh_wait_timeout": "10000s",
- "type": "qemu",
- "vm_name": "{{ user `template` }}"
- }
- ],
- "post-processors": [
- {
- "output": "../builds/{{user `box_basename`}}.{{.Provider}}.box",
- "type": "vagrant",
- "vagrantfile_template": "vagrantfile_templates/freebsd.rb"
- }
- ],
- "provisioners": [
- {
- "environment_vars": [
- "HOME_DIR=/home/vagrant",
- "http_proxy={{user `http_proxy`}}",
- "https_proxy={{user `https_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,
- "scripts": [
- "scripts/update.sh",
- "scripts/postinstall.sh",
- "scripts/sudoers.sh",
- "../_common/vagrant.sh",
- "scripts/vmtools.sh",
- "scripts/cleanup.sh",
- "scripts/minimize.sh"
- ],
- "type": "shell"
- }
- ],
- "variables": {
- "box_basename": "freebsd-10.3-i386",
- "build_timestamp": "{{isotime \"20060102150405\"}}",
- "cpus": "1",
- "disk_size": "65536",
- "git_revision": "__unknown_git_revision__",
- "headless": "",
- "http_proxy": "{{env `http_proxy`}}",
- "https_proxy": "{{env `https_proxy`}}",
- "install_path": "freebsd-10/install.sh",
- "iso_checksum": "8329ee2ca4779892edbb001c303670d74642e4353e97d02f4521895023cacd5d",
- "iso_checksum_type": "sha256",
- "iso_name": "FreeBSD-10.3-RELEASE-i386-disc1.iso",
- "memory": "1024",
- "mirror": "https://download.freebsd.org/ftp",
- "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"
- }
-}
-

original_message: Remove EOL'd FreeBSD-10.3


message: Add FreeBSD 11.2-RELEASE

diff:
+{
+ "builders": [
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_additions_mode": "disable",
+ "guest_os_type": "FreeBSD_64",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-virtualbox",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "virtualbox-iso",
+ "vboxmanage": [
+ [
+ "modifyvm",
+ "{{.Name}}",
+ "--memory",
+ "{{ user `memory` }}"
+ ],
+ [
+ "modifyvm",
+ "{{.Name}}",
+ "--cpus",
+ "{{ user `cpus` }}"
+ ]
+ ],
+ "virtualbox_version_file": ".vbox_version",
+ "vm_name": "{{ user `template` }}"
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "<wait5>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_os_type": "freebsd-64",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-vmware",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "vmware-iso",
+ "vm_name": "{{ user `template` }}",
+ "vmx_data": {
+ "cpuid.coresPerSocket": "1",
+ "memsize": "{{ user `memory` }}",
+ "numvcpus": "{{ user `cpus` }}"
+ },
+ "vmx_remove_ethernet_interfaces": true
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "8s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_os_type": "freebsd",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-parallels",
+ "parallels_tools_mode": "disable",
+ "prlctl": [
+ [
+ "set",
+ "{{.Name}}",
+ "--memsize",
+ "{{ user `memory` }}"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--cpus",
+ "{{ user `cpus` }}"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-set",
+ "cdrom0",
+ "--iface",
+ "ide"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-del",
+ "fdd0"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-del",
+ "parallel0"
+ ]
+ ],
+ "prlctl_version_file": ".prlctl_version",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "parallels-iso",
+ "vm_name": "{{ user `template` }}"
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.vtnet0 vtnet0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "7s",
+ "disk_size": "{{user `disk_size`}}",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-qemu",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "qemu",
+ "vm_name": "{{ user `template` }}"
+ }
+ ],
+ "post-processors": [
+ {
+ "output": "../builds/{{user `box_basename`}}.{{.Provider}}.box",
+ "type": "vagrant",
+ "vagrantfile_template": "vagrantfile_templates/freebsd.rb"
+ }
+ ],
+ "provisioners": [
+ {
+ "environment_vars": [
+ "HOME_DIR=/home/vagrant",
+ "http_proxy={{user `http_proxy`}}",
+ "https_proxy={{user `https_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,
+ "scripts": [
+ "scripts/update.sh",
+ "scripts/postinstall.sh",
+ "scripts/sudoers.sh",
+ "../_common/vagrant.sh",
+ "scripts/vmtools.sh",
+ "scripts/cleanup.sh",
+ "scripts/minimize.sh"
+ ],
+ "type": "shell"
+ }
+ ],
+ "variables": {
+ "box_basename": "freebsd-11.2",
+ "build_timestamp": "{{isotime \"20060102150405\"}}",
+ "cpus": "1",
+ "disk_size": "65536",
+ "git_revision": "__unknown_git_revision__",
+ "headless": "",
+ "http_proxy": "{{env `http_proxy`}}",
+ "https_proxy": "{{env `https_proxy`}}",
+ "install_path": "freebsd-11/installerconfig",
+ "iso_checksum": "710d237907f1753dbfbecb1186e401d9635156eeef6914f24f632f3219e59d3b",
+ "iso_checksum_type": "sha256",
+ "iso_name": "FreeBSD-11.2-RELEASE-amd64-disc1.iso",
+ "memory": "1024",
+ "mirror": "https://download.freebsd.org/ftp",
+ "mirror_directory": "releases/amd64/amd64/ISO-IMAGES/11.2",
+ "no_proxy": "{{env `no_proxy`}}",
+ "pkg_branch": "quarterly",
+ "template": "freebsd-11.2-amd64",
+ "version": "TIMESTAMP"
+ }
+}
+

diff:
+{
+ "builders": [
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_additions_mode": "disable",
+ "guest_os_type": "FreeBSD",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-virtualbox",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "virtualbox-iso",
+ "vboxmanage": [
+ [
+ "modifyvm",
+ "{{.Name}}",
+ "--memory",
+ "{{ user `memory` }}"
+ ],
+ [
+ "modifyvm",
+ "{{.Name}}",
+ "--cpus",
+ "{{ user `cpus` }}"
+ ]
+ ],
+ "virtualbox_version_file": ".vbox_version",
+ "vm_name": "{{ user `template` }}"
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "<wait5>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_os_type": "freebsd",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-vmware",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "vmware-iso",
+ "vm_name": "{{ user `template` }}",
+ "vmx_data": {
+ "cpuid.coresPerSocket": "1",
+ "memsize": "{{ user `memory` }}",
+ "numvcpus": "{{ user `cpus` }}"
+ },
+ "vmx_remove_ethernet_interfaces": true
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "8s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_os_type": "freebsd",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-parallels",
+ "parallels_tools_mode": "disable",
+ "prlctl": [
+ [
+ "set",
+ "{{.Name}}",
+ "--memsize",
+ "{{ user `memory` }}"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--cpus",
+ "{{ user `cpus` }}"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-set",
+ "cdrom0",
+ "--iface",
+ "ide"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-del",
+ "fdd0"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-del",
+ "parallel0"
+ ]
+ ],
+ "prlctl_version_file": ".prlctl_version",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "parallels-iso",
+ "vm_name": "{{ user `template` }}"
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.vtnet0 vtnet0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "7s",
+ "disk_size": "{{user `disk_size`}}",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-qemu",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "qemu",
+ "vm_name": "{{ user `template` }}"
+ }
+ ],
+ "post-processors": [
+ {
+ "output": "../builds/{{user `box_basename`}}.{{.Provider}}.box",
+ "type": "vagrant",
+ "vagrantfile_template": "vagrantfile_templates/freebsd.rb"
+ }
+ ],
+ "provisioners": [
+ {
+ "environment_vars": [
+ "HOME_DIR=/home/vagrant",
+ "http_proxy={{user `http_proxy`}}",
+ "https_proxy={{user `https_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,
+ "scripts": [
+ "scripts/update.sh",
+ "scripts/postinstall.sh",
+ "scripts/sudoers.sh",
+ "../_common/vagrant.sh",
+ "scripts/vmtools.sh",
+ "scripts/cleanup.sh",
+ "scripts/minimize.sh"
+ ],
+ "type": "shell"
+ }
+ ],
+ "variables": {
+ "box_basename": "freebsd-11.2-i386",
+ "build_timestamp": "{{isotime \"20060102150405\"}}",
+ "cpus": "1",
+ "disk_size": "40960",
+ "git_revision": "__unknown_git_revision__",
+ "headless": "",
+ "http_proxy": "{{env `http_proxy`}}",
+ "https_proxy": "{{env `https_proxy`}}",
+ "install_path": "freebsd-11/installerconfig",
+ "iso_checksum": "676ca4ca873b210a52a01c3c24fb2d114ea47ae77e7d86b445f459407d7a0a8d",
+ "iso_checksum_type": "sha256",
+ "iso_name": "FreeBSD-11.2-RELEASE-i386-disc1.iso",
+ "memory": "1024",
+ "mirror": "https://download.freebsd.org/ftp",
+ "mirror_directory": "releases/i386/i386/ISO-IMAGES/11.2",
+ "no_proxy": "{{env `no_proxy`}}",
+ "pkg_branch": "quarterly",
+ "template": "freebsd-11.2-i386",
+ "version": "TIMESTAMP"
+ }
+}
+

original_message: Add FreeBSD 11.2-RELEASE


message: Add FreeBSD 11.2-RELEASE to builds

original_message: Add FreeBSD 11.2-RELEASE to builds


message: Add FreeBSD 12.0-RELEASE

diff:
@@ -13,6 +13,8 @@ public:
- 'fedora-29'
- 'freebsd-11.2-i386'
- 'freebsd-11.2'
+- 'freebsd-12.0-i386'
+- 'freebsd-12.0'
- 'hardenedbsd-11'
- 'opensuse-leap-15.0'
- 'opensuse-leap-42.3'
@@ -34,6 +36,7 @@ slugs:
'oracle-7': 'oracle-7.6'
'oracle-6': 'oracle-6.10'
'freebsd-11': 'freebsd-11.2'
+ 'freebsd-12': 'freebsd-12.0'
'opensuse-leap-42': 'opensuse-leap-42.3'
'opensuse-leap-15': 'opensuse-leap-15.0'

diff:
+{
+ "builders": [
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_additions_mode": "disable",
+ "guest_os_type": "FreeBSD_64",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-virtualbox",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "virtualbox-iso",
+ "vboxmanage": [
+ [
+ "modifyvm",
+ "{{.Name}}",
+ "--memory",
+ "{{ user `memory` }}"
+ ],
+ [
+ "modifyvm",
+ "{{.Name}}",
+ "--cpus",
+ "{{ user `cpus` }}"
+ ]
+ ],
+ "virtualbox_version_file": ".vbox_version",
+ "vm_name": "{{ user `template` }}"
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "<wait5>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_os_type": "freebsd-64",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-vmware",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "vmware-iso",
+ "vm_name": "{{ user `template` }}",
+ "vmx_data": {
+ "cpuid.coresPerSocket": "1",
+ "memsize": "{{ user `memory` }}",
+ "numvcpus": "{{ user `cpus` }}"
+ },
+ "vmx_remove_ethernet_interfaces": true
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "8s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_os_type": "freebsd",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-parallels",
+ "parallels_tools_mode": "disable",
+ "prlctl": [
+ [
+ "set",
+ "{{.Name}}",
+ "--memsize",
+ "{{ user `memory` }}"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--cpus",
+ "{{ user `cpus` }}"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-set",
+ "cdrom0",
+ "--iface",
+ "ide"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-del",
+ "fdd0"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-del",
+ "parallel0"
+ ]
+ ],
+ "prlctl_version_file": ".prlctl_version",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "parallels-iso",
+ "vm_name": "{{ user `template` }}"
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.vtnet0 vtnet0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "7s",
+ "disk_size": "{{user `disk_size`}}",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-qemu",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "qemu",
+ "vm_name": "{{ user `template` }}"
+ }
+ ],
+ "post-processors": [
+ {
+ "output": "../builds/{{user `box_basename`}}.{{.Provider}}.box",
+ "type": "vagrant",
+ "vagrantfile_template": "vagrantfile_templates/freebsd.rb"
+ }
+ ],
+ "provisioners": [
+ {
+ "environment_vars": [
+ "HOME_DIR=/home/vagrant",
+ "http_proxy={{user `http_proxy`}}",
+ "https_proxy={{user `https_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,
+ "scripts": [
+ "scripts/update.sh",
+ "scripts/postinstall.sh",
+ "scripts/sudoers.sh",
+ "../_common/vagrant.sh",
+ "scripts/vmtools.sh",
+ "scripts/cleanup.sh",
+ "scripts/minimize.sh"
+ ],
+ "type": "shell"
+ }
+ ],
+ "variables": {
+ "box_basename": "freebsd-12.0",
+ "build_timestamp": "{{isotime \"20060102150405\"}}",
+ "cpus": "1",
+ "disk_size": "65536",
+ "git_revision": "__unknown_git_revision__",
+ "headless": "",
+ "http_proxy": "{{env `http_proxy`}}",
+ "https_proxy": "{{env `https_proxy`}}",
+ "install_path": "freebsd-11/installerconfig",
+ "iso_checksum": "63abec8aeb915f1a021dd2df6c7767251f9b6e87f403b7ddf9a423446d0a5453",
+ "iso_checksum_type": "sha256",
+ "iso_name": "FreeBSD-12.0-RELEASE-amd64-disc1.iso",
+ "memory": "1024",
+ "mirror": "https://download.freebsd.org/ftp",
+ "mirror_directory": "releases/amd64/amd64/ISO-IMAGES/12.0",
+ "name": "freebsd-12.0",
+ "no_proxy": "{{env `no_proxy`}}",
+ "pkg_branch": "quarterly",
+ "template": "freebsd-12.0-amd64",
+ "version": "TIMESTAMP"
+ }
+}

diff:
+{
+ "builders": [
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_additions_mode": "disable",
+ "guest_os_type": "FreeBSD",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-virtualbox",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "virtualbox-iso",
+ "vboxmanage": [
+ [
+ "modifyvm",
+ "{{.Name}}",
+ "--memory",
+ "{{ user `memory` }}"
+ ],
+ [
+ "modifyvm",
+ "{{.Name}}",
+ "--cpus",
+ "{{ user `cpus` }}"
+ ]
+ ],
+ "virtualbox_version_file": ".vbox_version",
+ "vm_name": "{{ user `template` }}"
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "<wait5>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "10s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_os_type": "freebsd",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-vmware",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "vmware-iso",
+ "vm_name": "{{ user `template` }}",
+ "vmx_data": {
+ "cpuid.coresPerSocket": "1",
+ "memsize": "{{ user `memory` }}",
+ "numvcpus": "{{ user `cpus` }}"
+ },
+ "vmx_remove_ethernet_interfaces": true
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.em0 em0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "8s",
+ "disk_size": "{{user `disk_size`}}",
+ "guest_os_type": "freebsd",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-parallels",
+ "parallels_tools_mode": "disable",
+ "prlctl": [
+ [
+ "set",
+ "{{.Name}}",
+ "--memsize",
+ "{{ user `memory` }}"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--cpus",
+ "{{ user `cpus` }}"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-set",
+ "cdrom0",
+ "--iface",
+ "ide"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-del",
+ "fdd0"
+ ],
+ [
+ "set",
+ "{{.Name}}",
+ "--device-del",
+ "parallel0"
+ ]
+ ],
+ "prlctl_version_file": ".prlctl_version",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "parallels-iso",
+ "vm_name": "{{ user `template` }}"
+ },
+ {
+ "boot_command": [
+ "<esc><wait>",
+ "boot -s<wait>",
+ "<enter><wait>",
+ "<wait10><wait10>",
+ "/bin/sh<enter><wait>",
+ "mdmfs -s 100m md1 /tmp<enter><wait>",
+ "mdmfs -s 100m md2 /mnt<enter><wait>",
+ "dhclient -l /tmp/dhclient.lease.vtnet0 vtnet0<enter><wait>",
+ "fetch -o /tmp/installerconfig http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `install_path`}} && bsdinstall script /tmp/installerconfig<enter><wait>"
+ ],
+ "boot_wait": "7s",
+ "disk_size": "{{user `disk_size`}}",
+ "headless": "{{ user `headless` }}",
+ "http_directory": "http",
+ "iso_checksum": "{{user `iso_checksum`}}",
+ "iso_checksum_type": "{{user `iso_checksum_type`}}",
+ "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
+ "output_directory": "../builds/packer-{{user `template`}}-qemu",
+ "shutdown_command": "echo 'vagrant' | su -m root -c 'shutdown -p now'",
+ "ssh_password": "vagrant",
+ "ssh_port": 22,
+ "ssh_username": "vagrant",
+ "ssh_wait_timeout": "10000s",
+ "type": "qemu",
+ "vm_name": "{{ user `template` }}"
+ }
+ ],
+ "post-processors": [
+ {
+ "output": "../builds/{{user `box_basename`}}.{{.Provider}}.box",
+ "type": "vagrant",
+ "vagrantfile_template": "vagrantfile_templates/freebsd.rb"
+ }
+ ],
+ "provisioners": [
+ {
+ "environment_vars": [
+ "HOME_DIR=/home/vagrant",
+ "http_proxy={{user `http_proxy`}}",
+ "https_proxy={{user `https_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,
+ "scripts": [
+ "scripts/update.sh",
+ "scripts/postinstall.sh",
+ "scripts/sudoers.sh",
+ "../_common/vagrant.sh",
+ "scripts/vmtools.sh",
+ "scripts/cleanup.sh",
+ "scripts/minimize.sh"
+ ],
+ "type": "shell"
+ }
+ ],
+ "variables": {
+ "box_basename": "freebsd-12.0-i386",
+ "build_timestamp": "{{isotime \"20060102150405\"}}",
+ "cpus": "1",
+ "disk_size": "40960",
+ "git_revision": "__unknown_git_revision__",
+ "headless": "",
+ "http_proxy": "{{env `http_proxy`}}",
+ "https_proxy": "{{env `https_proxy`}}",
+ "install_path": "freebsd-11/installerconfig",
+ "iso_checksum": "c2a2a18e9e803e1849533c5c7640f1eec058ef1426fb8fa62769d2fcbd58d485",
+ "iso_checksum_type": "sha256",
+ "iso_name": "FreeBSD-12.0-RELEASE-i386-disc1.iso",
+ "memory": "1024",
+ "mirror": "https://download.freebsd.org/ftp",
+ "mirror_directory": "releases/i386/i386/ISO-IMAGES/12.0",
+ "name": "freebsd-12.0-i386",
+ "no_proxy": "{{env `no_proxy`}}",
+ "pkg_branch": "quarterly",
+ "template": "freebsd-12.0-i386",
+ "version": "TIMESTAMP"
+ }
+}

original_message:
Add FreeBSD 12.0-RELEASE

Signed-off-by: Li-Wen Hsu <lwhsu@lwhsu.org>