summaryrefslogtreecommitdiff
path: root/sys-block/sedutil
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-block/sedutil
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-block/sedutil')
-rw-r--r--sys-block/sedutil/Manifest7
-rw-r--r--sys-block/sedutil/files/nvme.h90
-rw-r--r--sys-block/sedutil/metadata.xml10
-rw-r--r--sys-block/sedutil/sedutil-1.12.ebuild49
-rw-r--r--sys-block/sedutil/sedutil-1.15.ebuild45
5 files changed, 201 insertions, 0 deletions
diff --git a/sys-block/sedutil/Manifest b/sys-block/sedutil/Manifest
new file mode 100644
index 000000000000..b8c2dcbf9048
--- /dev/null
+++ b/sys-block/sedutil/Manifest
@@ -0,0 +1,7 @@
+AUX nvme.h 1818 SHA256 debcb267f4190e9fcd4e096c03ca73ffab9a53254fb258e83df4132c5a5a9093 SHA512 a968f9843caedabe2a049180c4ee7aa68690e447b11d89641f917ab3d623d0030b0ed926642a5539d19ddd355fb754403f9bfbf4ea952d844cafa524c50f675e WHIRLPOOL b479ae1706ddfb0887adafc10b8a08dda774dffc8bd8f33d206bf1aaf210e7852834d295cf8d4de28a3c0fb9674c19eb00ecf9adce9fdd9ebd9f11f89ff3521d
+DIST sedutil-1.12.tar.gz 214066 SHA256 5509d4279cfb316f33730c5cb06f8162ae212c7f4d31d206642d67cc8be245c1 SHA512 f17fbb5a6d71d5bdd59d0fc85eed11036a8e365545133bc1374a733ce1975d6c8dd2cdc500bd46cffbec1f2bef621a98ca392e0dd314734c1ef12c073d70b0de WHIRLPOOL 299e35256de3c49a717fff727f45a1aaeeb2f65e1e3fb8afc4ba0af1626101e0f95618f182a32d90fee6278d980670df2c444219346fb6783fbe630d11209970
+DIST sedutil-1.15.tar.gz 295399 SHA256 6711fa34c95a96066570e2b1bca05fc7ecd825e817fd675683db76a58fa4d797 SHA512 f4071d510db8227c7a4e37e1055993436cd8469e584cdb9d2bf507e006570c103b9e19353733f4ba6631226856c9d2aa8817c134febf96750318cffc935707da WHIRLPOOL 4e417269dbea3f7e971240fedc627a80fc1ccc80bc1a664d472fd2bdc13ba774adb46d49b8ac9ff83cad2141c84858038d7e150edc035414c9414faab53eb2db
+EBUILD sedutil-1.12.ebuild 1211 SHA256 1289b07ec9cc3a658810f2cbe26124e069b5735dd1d4a1e06ad26cfa22ad25ee SHA512 b337a199bc8f2901764173f48a80643389a2f30b28985c916fc343d05d099464fca1820bb5e2add91763c0abbaad6b7c5ce9bae2cda1a69d6e36c1faf3497975 WHIRLPOOL da323957af3426b3ca7d6dc51eb2cd1f1ccc225caefdc0cdfabd896badab37a796d21ce864516f043d637db6b4b1bb523906c1465767e2c28cfa410719427438
+EBUILD sedutil-1.15.ebuild 1027 SHA256 fc667ffd4b54d89bc0479825e0f84880f40e80da572449d3bb6cc34c70960c57 SHA512 4811618ec7ec75894dd67767d162ee5898c67112818ee94f1cc64d1e1b37f1784e6a783a7e88809911ade4a6f6b2cbce49eeebe5378b4fa7597ea7040643eb8a WHIRLPOOL fa3f380cef26ce5ee4def22394ae6762c881e1e4109ddd3287d0ac24723273d4089ac6b890113e8cbb2ae4d7be38b0e60449925ec4d1f83ebd00dd54421934a8
+MISC ChangeLog 529 SHA256 2311547f952b839f77a92cb9da494fafee9a2ed35f4a3912a565e6d553556ce2 SHA512 202d0211a428aac888d26b9b8b4ba350e2b8dd5d873cdec05986f4084ec30621516297eb39a14347a852b73b24707015245bb852e8a5294cb5522017e25ee6d3 WHIRLPOOL f2c3521e8b882ac2761ab5891d4b29c189240c2208dbcb6f3594e32208c2a0392263f0ff34071a37b7dd60874aabc0fb15b3f4ba6daec522dd5945357dd3d7ac
+MISC metadata.xml 310 SHA256 0cd99229a86711d910a7cfa4a0372b87c230103119fd15ed3daaf48ef1b12f01 SHA512 d060f20a44ba11ff4bfcf99aba392a09b7959bab38477f5c1a0f1deaef43c8d69e719c6464d0592943fe4d4f6ec1df883736c822b890bc17973468f8d3efa59f WHIRLPOOL 26781d26d2f5a659d5a155b450acb2689e01590ee1fdbb6e929bc40c2d367d6d78dac5e16c135e2c3c0704de6db440a60f61c5e9f2814ec354b9627cf60e86f3
diff --git a/sys-block/sedutil/files/nvme.h b/sys-block/sedutil/files/nvme.h
new file mode 100644
index 000000000000..448aca0279ff
--- /dev/null
+++ b/sys-block/sedutil/files/nvme.h
@@ -0,0 +1,90 @@
+/* stub to deal with renamed/neutered nvme.h header */
+
+#include <linux/types.h>
+#include <linux/nvme_ioctl.h>
+
+struct nvme_id_power_state {
+ __le16 max_power; /* centiwatts */
+ __u8 rsvd2;
+ __u8 flags;
+ __le32 entry_lat; /* microseconds */
+ __le32 exit_lat; /* microseconds */
+ __u8 read_tput;
+ __u8 read_lat;
+ __u8 write_tput;
+ __u8 write_lat;
+ __le16 idle_power;
+ __u8 idle_scale;
+ __u8 rsvd19;
+ __le16 active_power;
+ __u8 active_work_scale;
+ __u8 rsvd23[9];
+};
+
+enum {
+ NVME_PS_FLAGS_MAX_POWER_SCALE = 1 << 0,
+ NVME_PS_FLAGS_NON_OP_STATE = 1 << 1,
+};
+
+struct nvme_id_ctrl {
+ __le16 vid;
+ __le16 ssvid;
+ char sn[20];
+ char mn[40];
+ char fr[8];
+ __u8 rab;
+ __u8 ieee[3];
+ __u8 mic;
+ __u8 mdts;
+ __le16 cntlid;
+ __le32 ver;
+ __u8 rsvd84[172];
+ __le16 oacs;
+ __u8 acl;
+ __u8 aerl;
+ __u8 frmw;
+ __u8 lpa;
+ __u8 elpe;
+ __u8 npss;
+ __u8 avscc;
+ __u8 apsta;
+ __le16 wctemp;
+ __le16 cctemp;
+ __u8 rsvd270[242];
+ __u8 sqes;
+ __u8 cqes;
+ __u8 rsvd514[2];
+ __le32 nn;
+ __le16 oncs;
+ __le16 fuses;
+ __u8 fna;
+ __u8 vwc;
+ __le16 awun;
+ __le16 awupf;
+ __u8 nvscc;
+ __u8 rsvd531;
+ __le16 acwu;
+ __u8 rsvd534[2];
+ __le32 sgls;
+ __u8 rsvd540[1508];
+ struct nvme_id_power_state psd[32];
+ __u8 vs[1024];
+};
+
+enum nvme_admin_opcode {
+ nvme_admin_delete_sq = 0x00,
+ nvme_admin_create_sq = 0x01,
+ nvme_admin_get_log_page = 0x02,
+ nvme_admin_delete_cq = 0x04,
+ nvme_admin_create_cq = 0x05,
+ nvme_admin_identify = 0x06,
+ nvme_admin_abort_cmd = 0x08,
+ nvme_admin_set_features = 0x09,
+ nvme_admin_get_features = 0x0a,
+ nvme_admin_async_event = 0x0c,
+ nvme_admin_activate_fw = 0x10,
+ nvme_admin_download_fw = 0x11,
+ nvme_admin_format_nvm = 0x80,
+ nvme_admin_security_send = 0x81,
+ nvme_admin_security_recv = 0x82,
+};
diff --git a/sys-block/sedutil/metadata.xml b/sys-block/sedutil/metadata.xml
new file mode 100644
index 000000000000..d42fdfaaa958
--- /dev/null
+++ b/sys-block/sedutil/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+</maintainer>
+<upstream>
+ <remote-id type="github">Drive-Trust-Alliance/sedutil</remote-id>
+</upstream>
+</pkgmetadata>
diff --git a/sys-block/sedutil/sedutil-1.12.ebuild b/sys-block/sedutil/sedutil-1.12.ebuild
new file mode 100644
index 000000000000..4f808a65ebe1
--- /dev/null
+++ b/sys-block/sedutil/sedutil-1.12.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit toolchain-funcs
+
+DESCRIPTION="The Drive Trust Alliance Self Encrypting Drive Utility"
+HOMEPAGE="https://github.com/Drive-Trust-Alliance/sedutil"
+SRC_URI="https://github.com/Drive-Trust-Alliance/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ # https://github.com/Drive-Trust-Alliance/sedutil/pull/49
+ find -name '*.mk' -exec sed -E -i 's: -(Werror|g|O[0-9]?) : :g' {} + || die
+ # https://github.com/Drive-Trust-Alliance/sedutil/issues/52
+ if has_version '>=sys-kernel/linux-headers-4.4' ; then
+ mkdir linux/linux || die
+ cp "${FILESDIR}"/nvme.h linux/linux/ || die
+ fi
+}
+
+src_configure() {
+ case $(tc-arch) in
+ x86) sedutil_arch="Release_i686" ;;
+ amd64) sedutil_arch="Release_x86_64" ;;
+ *) die "unsupported architecture" ;;
+ esac
+}
+
+src_compile() {
+ emake \
+ -C "linux/CLI" \
+ V=1 \
+ CONF="${sedutil_arch}" \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}"
+}
+
+src_install() {
+ dobin "linux/CLI/dist/${sedutil_arch}/GNU-Linux/sedutil-cli"
+ dodoc README.md
+}
diff --git a/sys-block/sedutil/sedutil-1.15.ebuild b/sys-block/sedutil/sedutil-1.15.ebuild
new file mode 100644
index 000000000000..058b0ec518c8
--- /dev/null
+++ b/sys-block/sedutil/sedutil-1.15.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit toolchain-funcs
+
+DESCRIPTION="The Drive Trust Alliance Self Encrypting Drive Utility"
+HOMEPAGE="https://github.com/Drive-Trust-Alliance/sedutil"
+SRC_URI="https://github.com/Drive-Trust-Alliance/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_prepare() {
+ default
+ # https://github.com/Drive-Trust-Alliance/sedutil/pull/49
+ find -name '*.mk' -exec sed -E -i 's: -(Werror|g|O[0-9]?) : :g' {} + || die
+}
+
+src_configure() {
+ case $(tc-arch) in
+ x86) sedutil_arch="Release_i686" ;;
+ amd64) sedutil_arch="Release_x86_64" ;;
+ *) die "unsupported architecture" ;;
+ esac
+}
+
+src_compile() {
+ emake \
+ -C "linux/CLI" \
+ V=1 \
+ CONF="${sedutil_arch}" \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}"
+}
+
+src_install() {
+ dobin "linux/CLI/dist/${sedutil_arch}/GNU-Linux/sedutil-cli"
+ dodoc README.md
+}