blob: 1d4705e70f503ff7f3f48af8adc43b07c9a5e58d [file] [log] [blame]
# Copyright 2018 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/assembly/config_data_for_assembly.gni")
import("//build/components.gni")
import("//build/config.gni")
import("//src/sys/core/build/core_shard.gni")
group("tests") {
testonly = true
deps = [ ":sshd-host-tests" ]
}
source_set("sshd_constants") {
sources = [ "constants.h" ]
}
source_set("lib") {
sources = [
"service.cc",
"service.h",
]
deps = [
":sshd_constants",
"//sdk/fidl/fuchsia.process:fuchsia.process_cpp",
"//sdk/lib/fdio",
"//sdk/lib/fit",
"//src/lib/fxl",
"//zircon/system/ulib/zx",
]
public_deps = [
"//sdk/fidl/fuchsia.boot:fuchsia.boot_cpp",
"//sdk/fidl/fuchsia.component:fuchsia.component_cpp",
"//sdk/lib/component/incoming/cpp",
"//src/lib/fsl",
"//zircon/system/ulib/async",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/fbl",
]
}
executable("bin") {
output_name = "sshd-host"
sources = [ "sshd-host.cc" ]
deps = [
":lib",
"//sdk/lib/fdio",
"//sdk/lib/syslog/cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
]
}
fuchsia_component("sshd-component") {
component_name = "sshd"
manifest = "meta/sshd.cml"
deps = [
# Ensure this isn't included in production
"//build/validate:non_production_tag",
"//third_party/openssh-portable:scp",
"//third_party/openssh-portable:sftp-server",
"//third_party/openssh-portable:sshd",
]
}
fuchsia_component("sshd-host-component") {
component_name = "sshd-host"
manifest = "meta/sshd-host.cml"
deps = [
":bin",
# Ensure this isn't included in production
"//build/validate:non_production_tag",
"//third_party/openssh-portable:hostkeygen",
]
}
fuchsia_package("sshd-host") {
deps = [
":sshd-component",
":sshd-host-component",
]
}
config_data_for_assembly("config") {
for_pkg = "sshd-host"
sources = [ "//third_party/openssh-portable/fuchsia/sshd_config" ]
outputs = [ "sshd_config" ]
}
config_data_for_assembly("config_eng") {
for_pkg = "sshd-host"
sources = [ "//third_party/openssh-portable/fuchsia/sshd_config_eng" ]
outputs = [ "sshd_config" ]
}
executable("test") {
testonly = true
output_name = "sshd-host-test"
sources = [ "test.cc" ]
deps = [
":lib",
":sshd_constants",
"//sdk/fidl/fuchsia.boot:fuchsia.boot_cpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp/testing:unit",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/zx",
]
}
fuchsia_unittest_package("sshd-host-tests") {
manifest = "meta/sshd-host-test.cml"
deps = [ ":test" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}