| # Copyright 2012 The ChromiumOS Authors |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI="7" |
| |
| CROS_WORKON_COMMIT="8b6e11a069e490c761cdab7ab3ff59434806cd9c" |
| CROS_WORKON_TREE=("9942607d3de36a375711502f44f44d28aac7bd3a" "41d899585b7a07ea908a0cca2944a7b8a4d13655" "21bfaad8f62af33397787efafbe6cbd691b13a15" "faa5b8036561b66b5b9d79ea1af8a95927a0ae0f" "466d46556e26af1d31a5e30f9001eb07fa4ad00c" "f91b6afd5f2ae04ee9a2c19109a3a4a36f7659e6") |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| # TODO(crbug.com/809389): Avoid directly including headers from other packages. |
| CROS_WORKON_SUBTREE="chromeos-config common-mk installer metrics verity .gn" |
| |
| PLATFORM_SUBDIR="installer" |
| # Do not run test parallelly until unit tests are fixed. |
| # shellcheck disable=SC2034 |
| PLATFORM_PARALLEL_GTEST_TEST="no" |
| |
| inherit cros-workon platform systemd |
| |
| DESCRIPTION="Chrome OS Installer" |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/installer/" |
| SRC_URI="" |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="*" |
| IUSE=" |
| cros_embedded |
| enable_slow_boot_notify |
| -mtd |
| pam |
| systemd |
| lvm_stateful_partition |
| postinstall_cgpt_repair |
| postinstall_config_efi_and_legacy |
| manage_efi_boot_entries |
| postinst_metrics |
| reven_partition_migration |
| " |
| |
| COMMON_DEPEND=" |
| chromeos-base/vboot_reference |
| chromeos-base/verity |
| manage_efi_boot_entries? ( chromeos-base/chromeos-config sys-libs/efivar ) |
| postinst_metrics? ( chromeos-base/metrics ) |
| " |
| |
| DEPEND="${COMMON_DEPEND} |
| dev-libs/openssl:0= |
| " |
| |
| RDEPEND="${COMMON_DEPEND} |
| pam? ( app-admin/sudo ) |
| chromeos-base/chromeos-common-script |
| !cros_embedded? ( chromeos-base/chromeos-storage-info ) |
| dev-libs/openssl:0= |
| dev-util/shflags |
| sys-apps/rootdev |
| sys-apps/util-linux |
| sys-apps/which |
| sys-fs/e2fsprogs" |
| |
| platform_pkg_test() { |
| platform_test "run" "${OUT}/cros_installer_test" |
| } |
| |
| src_prepare() { |
| # The workdir is platform2/nnapi - we need to pop up one level in the stack |
| # to apply our patches. |
| pushd .. || exit |
| eapply -p1 "${FILESDIR}/installer-support-new-dm-format.patch" |
| eapply -p1 "${FILESDIR}/0001-Add-dm-mod.create.patch" |
| popd || exit |
| |
| eapply_user |
| } |
| |
| src_install() { |
| platform_src_install |
| |
| # Install init scripts. Non-systemd case is defined in BUILD.gn. |
| if use systemd; then |
| systemd_dounit init/install-completed.service |
| systemd_enable_service boot-services.target install-completed.service |
| systemd_dounit init/crx-import.service |
| systemd_enable_service system-services.target crx-import.service |
| fi |
| } |