blob: cb2801fd2f9932e1fa0c484059d8607b7c2cb96d [file] [log] [blame]
# Copyright 2015 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This package includes version of cgpt from CoreOS. That version
# supports 'resize' which allows us resize the partition without
# reboot. This is a temporary solution until we've integrated CoreOS
# changes into our copy of cgpt or have a separate tool to do
# the same (http://brbug.com/1209).
EAPI=7
EGIT_REPO_URI="https://chromium.googlesource.com/external/github.com/coreos/seismograph"
EGIT_COMMIT="edbe2360e9af362914868df0c7c1ace62e8e1778"
KEYWORDS="*"
inherit autotools git-2 systemd
DESCRIPTION="An upstart task that resizes stateful partition"
LICENSE="BSD"
SLOT="0"
IUSE=""
RDEPEND="
sys-apps/util-linux
sys-fs/e2fsprogs
"
DEPEND="${RDEPEND}"
DEST_DIRECTORY="/usr/share/cloud"
src_prepare() {
default
eautoreconf
}
src_configure() {
# The source code contains a few tautological comparisons
# caused by comparing unsigned integer to 0.
# The source code contains a sometimes-uninitialized warning
# about variable "fs" in src/e2size/e2size.c. Suppress the warning
# to make it compilable w/ Clang.
# TODO(andreyu): this is not ideal. Separate resize functionality
# out of cgpt tool and put it into our own repository.
export CFLAGS="-Wno-tautological-compare -Wno-sometimes-uninitialized"
econf
}
src_install() {
systemd_dounit "${FILESDIR}"/resize-stateful-partition.service
systemd_enable_service sysinit.target resize-stateful-partition.service
exeinto ${DEST_DIRECTORY}
doexe "cgpt"
doexe "${FILESDIR}/resize-stateful"
}