From 93117378b14bb5dda7c548a9df69630bce290df2 Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Mon, 31 Dec 2018 18:35:36 -0500 Subject: [PATCH] new set of citadel-tools recipes --- .../citadel-tools/citadel-appimg.bb | 36 --------- ...-desktopd.bb => citadel-desktopd_0.1.0.bb} | 6 +- .../citadel-tools/citadel-image_0.1.0.bb | 42 ++++++++++ .../citadel-tools/citadel-install_0.1.0.bb | 33 ++++++++ .../citadel-tools/citadel-mount_0.1.0.bb | 39 +++++++++ .../citadel-tools/citadel-realms_0.1.0.bb | 5 +- .../citadel-tools/citadel-tools.inc | 66 +++++++++++++--- .../citadel-tools/citadel-update.bb | 79 ------------------- 8 files changed, 175 insertions(+), 131 deletions(-) delete mode 100644 meta-citadel/recipes-core/citadel-tools/citadel-appimg.bb rename meta-citadel/recipes-core/citadel-tools/{citadel-desktopd.bb => citadel-desktopd_0.1.0.bb} (97%) create mode 100644 meta-citadel/recipes-core/citadel-tools/citadel-image_0.1.0.bb create mode 100644 meta-citadel/recipes-core/citadel-tools/citadel-install_0.1.0.bb create mode 100644 meta-citadel/recipes-core/citadel-tools/citadel-mount_0.1.0.bb delete mode 100644 meta-citadel/recipes-core/citadel-tools/citadel-update.bb diff --git a/meta-citadel/recipes-core/citadel-tools/citadel-appimg.bb b/meta-citadel/recipes-core/citadel-tools/citadel-appimg.bb deleted file mode 100644 index 3b1c646..0000000 --- a/meta-citadel/recipes-core/citadel-tools/citadel-appimg.bb +++ /dev/null @@ -1,36 +0,0 @@ -SUMMARY = "citadel-appimg" - -SRC_URI = "\ -crate://crates.io/ansi_term/0.11.0 \ -crate://crates.io/atty/0.2.8 \ -crate://crates.io/backtrace-sys/0.1.16 \ -crate://crates.io/backtrace/0.3.5 \ -crate://crates.io/bitflags/1.0.1 \ -crate://crates.io/cc/1.0.5 \ -crate://crates.io/cfg-if/0.1.2 \ -crate://crates.io/clap/2.31.1 \ -crate://crates.io/failure/0.1.1 \ -crate://crates.io/failure_derive/0.1.1 \ -crate://crates.io/lazy_static/1.0.0 \ -crate://crates.io/libc/0.2.39 \ -crate://crates.io/quote/0.3.15 \ -crate://crates.io/redox_syscall/0.1.37 \ -crate://crates.io/redox_termios/0.1.1 \ -crate://crates.io/rustc-demangle/0.1.7 \ -crate://crates.io/strsim/0.7.0 \ -crate://crates.io/syn/0.11.11 \ -crate://crates.io/synom/0.11.3 \ -crate://crates.io/synstructure/0.6.1 \ -crate://crates.io/termion/1.5.1 \ -crate://crates.io/textwrap/0.9.0 \ -crate://crates.io/unicode-width/0.1.4 \ -crate://crates.io/unicode-xid/0.0.4 \ -crate://crates.io/vec_map/0.8.0 \ -crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ -crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ -crate://crates.io/winapi/0.3.4 \ -" - -inherit cargo - -require citadel-tools.inc diff --git a/meta-citadel/recipes-core/citadel-tools/citadel-desktopd.bb b/meta-citadel/recipes-core/citadel-tools/citadel-desktopd_0.1.0.bb similarity index 97% rename from meta-citadel/recipes-core/citadel-tools/citadel-desktopd.bb rename to meta-citadel/recipes-core/citadel-tools/citadel-desktopd_0.1.0.bb index a5cb521..bb57180 100644 --- a/meta-citadel/recipes-core/citadel-tools/citadel-desktopd.bb +++ b/meta-citadel/recipes-core/citadel-tools/citadel-desktopd_0.1.0.bb @@ -1,6 +1,6 @@ -SUMMARY = "citadel-desktopd" +include citadel-tools.inc -SRC_URI = "\ +SRC_URI += " \ crate://crates.io/aho-corasick/0.6.4 \ crate://crates.io/atty/0.2.6 \ crate://crates.io/backtrace-sys/0.1.16 \ @@ -69,5 +69,3 @@ do_install() { } FILES_${PN} += "${datadir}/citadel ${systemd_system_unitdir}" - -require citadel-tools.inc diff --git a/meta-citadel/recipes-core/citadel-tools/citadel-image_0.1.0.bb b/meta-citadel/recipes-core/citadel-tools/citadel-image_0.1.0.bb new file mode 100644 index 0000000..c7f4fd3 --- /dev/null +++ b/meta-citadel/recipes-core/citadel-tools/citadel-image_0.1.0.bb @@ -0,0 +1,42 @@ +include citadel-tools.inc + +BBCLASSEXTEND = "native" + +SRC_URI += " \ +crate://crates.io/ansi_term/0.11.0 \ +crate://crates.io/atty/0.2.11 \ +crate://crates.io/backtrace-sys/0.1.24 \ +crate://crates.io/backtrace/0.3.9 \ +crate://crates.io/bitflags/1.0.4 \ +crate://crates.io/cc/1.0.25 \ +crate://crates.io/cfg-if/0.1.6 \ +crate://crates.io/clap/2.32.0 \ +crate://crates.io/failure/0.1.3 \ +crate://crates.io/failure_derive/0.1.3 \ +crate://crates.io/lazy_static/1.2.0 \ +crate://crates.io/libc/0.2.45 \ +crate://crates.io/nix/0.12.0 \ +crate://crates.io/proc-macro2/0.4.24 \ +crate://crates.io/quote/0.6.10 \ +crate://crates.io/redox_syscall/0.1.43 \ +crate://crates.io/redox_termios/0.1.1 \ +crate://crates.io/ring/0.13.2 \ +crate://crates.io/rustc-demangle/0.1.9 \ +crate://crates.io/rustc-serialize/0.3.24 \ +crate://crates.io/serde/1.0.82 \ +crate://crates.io/serde_derive/1.0.82 \ +crate://crates.io/strsim/0.7.0 \ +crate://crates.io/syn/0.15.22 \ +crate://crates.io/synstructure/0.10.1 \ +crate://crates.io/termion/1.5.1 \ +crate://crates.io/textwrap/0.10.0 \ +crate://crates.io/toml/0.4.10 \ +crate://crates.io/unicode-width/0.1.5 \ +crate://crates.io/unicode-xid/0.1.0 \ +crate://crates.io/untrusted/0.6.2 \ +crate://crates.io/vec_map/0.8.1 \ +crate://crates.io/void/1.0.2 \ +crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ +crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ +crate://crates.io/winapi/0.3.6 \ +" diff --git a/meta-citadel/recipes-core/citadel-tools/citadel-install_0.1.0.bb b/meta-citadel/recipes-core/citadel-tools/citadel-install_0.1.0.bb new file mode 100644 index 0000000..71f4691 --- /dev/null +++ b/meta-citadel/recipes-core/citadel-tools/citadel-install_0.1.0.bb @@ -0,0 +1,33 @@ +include citadel-tools.inc + +SRC_URI += " \ +crate://crates.io/autocfg/0.1.1 \ +crate://crates.io/backtrace-sys/0.1.28 \ +crate://crates.io/backtrace/0.3.13 \ +crate://crates.io/cc/1.0.28 \ +crate://crates.io/cfg-if/0.1.6 \ +crate://crates.io/failure/0.1.3 \ +crate://crates.io/failure_derive/0.1.3 \ +crate://crates.io/kernel32-sys/0.2.2 \ +crate://crates.io/libc/0.2.45 \ +crate://crates.io/proc-macro2/0.4.24 \ +crate://crates.io/quote/0.6.10 \ +crate://crates.io/rpassword/2.1.0 \ +crate://crates.io/rustc-demangle/0.1.11 \ +crate://crates.io/syn/0.15.23 \ +crate://crates.io/synstructure/0.10.1 \ +crate://crates.io/unicode-xid/0.1.0 \ +crate://crates.io/winapi-build/0.1.1 \ +crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ +crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ +crate://crates.io/winapi/0.2.8 \ +crate://crates.io/winapi/0.3.6 \ +" + +inherit cargo + +do_install() { + install -d ${D}${libexecdir} + install -m 755 ${B}/target/${CARGO_TARGET_SUBDIR}/citadel-install ${D}${libexecdir} +} + diff --git a/meta-citadel/recipes-core/citadel-tools/citadel-mount_0.1.0.bb b/meta-citadel/recipes-core/citadel-tools/citadel-mount_0.1.0.bb new file mode 100644 index 0000000..1281c6d --- /dev/null +++ b/meta-citadel/recipes-core/citadel-tools/citadel-mount_0.1.0.bb @@ -0,0 +1,39 @@ +include citadel-tools.inc + + +SRC_URI += " \ +crate://crates.io/autocfg/0.1.1 \ +crate://crates.io/backtrace-sys/0.1.26 \ +crate://crates.io/backtrace/0.3.13 \ +crate://crates.io/bitflags/1.0.4 \ +crate://crates.io/cc/1.0.26 \ +crate://crates.io/cfg-if/0.1.6 \ +crate://crates.io/failure/0.1.3 \ +crate://crates.io/failure_derive/0.1.3 \ +crate://crates.io/lazy_static/1.2.0 \ +crate://crates.io/libc/0.2.45 \ +crate://crates.io/nix/0.12.0 \ +crate://crates.io/proc-macro2/0.4.24 \ +crate://crates.io/quote/0.6.10 \ +crate://crates.io/ring/0.13.2 \ +crate://crates.io/rustc-demangle/0.1.11 \ +crate://crates.io/rustc-serialize/0.3.24 \ +crate://crates.io/serde/1.0.82 \ +crate://crates.io/serde_derive/1.0.82 \ +crate://crates.io/syn/0.15.23 \ +crate://crates.io/synstructure/0.10.1 \ +crate://crates.io/toml/0.4.10 \ +crate://crates.io/unicode-xid/0.1.0 \ +crate://crates.io/untrusted/0.6.2 \ +crate://crates.io/void/1.0.2 \ +crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ +crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ +crate://crates.io/winapi/0.3.6 \ +" + +inherit cargo + +do_install() { + install -d ${D}${libexecdir} + install -m 755 ${B}/target/${CARGO_TARGET_SUBDIR}/citadel-mount ${D}${libexecdir} +} diff --git a/meta-citadel/recipes-core/citadel-tools/citadel-realms_0.1.0.bb b/meta-citadel/recipes-core/citadel-tools/citadel-realms_0.1.0.bb index 2519c71..2c98fa4 100644 --- a/meta-citadel/recipes-core/citadel-tools/citadel-realms_0.1.0.bb +++ b/meta-citadel/recipes-core/citadel-tools/citadel-realms_0.1.0.bb @@ -1,4 +1,4 @@ -SUMMARY = "citadel-realms" +include citadel-tools.inc SRC_URI += " \ crate://crates.io/ansi_term/0.11.0 \ @@ -27,8 +27,8 @@ crate://crates.io/syn/0.11.11 \ crate://crates.io/syn/0.12.14 \ crate://crates.io/synom/0.11.3 \ crate://crates.io/synstructure/0.6.1 \ -crate://crates.io/termion/1.5.1 \ crate://crates.io/termcolor/0.3.5 \ +crate://crates.io/termion/1.5.1 \ crate://crates.io/textwrap/0.9.0 \ crate://crates.io/toml/0.4.5 \ crate://crates.io/unicode-width/0.1.4 \ @@ -49,4 +49,3 @@ do_install() { install -m 755 -T ${B}/target/${CARGO_TARGET_SUBDIR}/citadel-realms ${D}${bindir}/realms } -require citadel-tools.inc diff --git a/meta-citadel/recipes-core/citadel-tools/citadel-tools.inc b/meta-citadel/recipes-core/citadel-tools/citadel-tools.inc index de49e81..301203c 100644 --- a/meta-citadel/recipes-core/citadel-tools/citadel-tools.inc +++ b/meta-citadel/recipes-core/citadel-tools/citadel-tools.inc @@ -1,16 +1,64 @@ +SUMMARY = "${PN}" HOMEPAGE = "http://github.com/subgraph/citadel" LICENSE = "CLOSED" LIC_FILES_CHKSUM="" +inherit cargo + +# +# Update this when changes are pushed to github +# +SRCREV = "d2f07c01bf08900105715e6008f8cca517c21069" + +GIT_URI = "git://github.com/subgraph/citadel-tools.git;protocol=https" + +# +# To make development more convenient citadel-tools recipes support +# building from a checked out tree on the filesystem. If the variable +# CITADEL_TOOLS_PATH is set (preferably in build/conf/local.conf) then +# bitbake will not check out the source files from git but instead will +# copy the directory this variable contains. +# + +# +# +# By default: +# +# S = "${WORKDIR}/git/${BPN}", +# +# if CITADEL_TOOLS_PATH is set: +# +# S = ${WORKDIR}${CITADEL_TOOLS_PATH}/${BPN} +# +S = "${WORKDIR}${@source_path(d)}/${BPN}" + +# +# By default: +# +# SRC_URI += ${GIT_URI} +# +# If CITADEL_TOOLS_PATH is set: +# +# SRC_URI += "file://${CITADEL_TOOLS_PATH}" +# +SRC_URI += "${@source_uri(d)}" + # what is this even for? CARGO_SRC_DIR="" -S = "${WORKDIR}/${PN}" -do_unpack_src() { - rm -rf ${WORKDIR}/${PN} - cp -a ${TOPDIR}/../citadel-tools/${PN} ${WORKDIR} - rm -rf ${WORKDIR}$/${PN}/target -} -# don't use cached task -# do_unpack_src[nostamp] = "1" -addtask unpack_src after do_unpack before do_patch +def source_path(d): + tools_path = d.getVar("CITADEL_TOOLS_PATH") + + if tools_path: + return tools_path + else: + return "/git" + +def source_uri(d): + tools_path = d.getVar("CITADEL_TOOLS_PATH") + if tools_path: + return "file://" + tools_path + else: + return d.getVar("GIT_URI") + + diff --git a/meta-citadel/recipes-core/citadel-tools/citadel-update.bb b/meta-citadel/recipes-core/citadel-tools/citadel-update.bb deleted file mode 100644 index 12a4f6b..0000000 --- a/meta-citadel/recipes-core/citadel-tools/citadel-update.bb +++ /dev/null @@ -1,79 +0,0 @@ -SUMMARY = "citadel-update" - -SRC_URI = "\ -crate://crates.io/ansi_term/0.10.2 \ -crate://crates.io/arrayref/0.3.4 \ -crate://crates.io/atty/0.2.6 \ -crate://crates.io/backtrace-sys/0.1.16 \ -crate://crates.io/backtrace/0.3.5 \ -crate://crates.io/bitflags/1.0.1 \ -crate://crates.io/block-buffer/0.3.3 \ -crate://crates.io/build_const/0.2.0 \ -crate://crates.io/byte-tools/0.2.0 \ -crate://crates.io/byteorder/1.2.1 \ -crate://crates.io/bytes/0.4.6 \ -crate://crates.io/cc/1.0.4 \ -crate://crates.io/cfg-if/0.1.2 \ -crate://crates.io/clap/2.30.0 \ -crate://crates.io/clear_on_drop/0.2.3 \ -crate://crates.io/crc/1.7.0 \ -crate://crates.io/curve25519-dalek/0.14.4 \ -crate://crates.io/digest/0.7.2 \ -crate://crates.io/ed25519-dalek/0.6.1 \ -crate://crates.io/failure/0.1.1 \ -crate://crates.io/failure_derive/0.1.1 \ -crate://crates.io/fake-simd/0.1.2 \ -crate://crates.io/fuchsia-zircon-sys/0.3.3 \ -crate://crates.io/fuchsia-zircon/0.3.3 \ -crate://crates.io/gcc/0.3.54 \ -crate://crates.io/generic-array/0.9.0 \ -crate://crates.io/iovec/0.1.2 \ -crate://crates.io/libc/0.2.36 \ -crate://crates.io/log/0.4.1 \ -crate://crates.io/lzma-rs/0.1.0 \ -crate://crates.io/nix/0.10.0 \ -crate://crates.io/num-traits/0.1.43 \ -crate://crates.io/num-traits/0.2.0 \ -crate://crates.io/quote/0.3.15 \ -crate://crates.io/rand/0.4.2 \ -crate://crates.io/redox_syscall/0.1.37 \ -crate://crates.io/redox_termios/0.1.1 \ -crate://crates.io/rustc-demangle/0.1.6 \ -crate://crates.io/rustc-serialize/0.3.24 \ -crate://crates.io/serde/1.0.27 \ -crate://crates.io/serde_derive/1.0.27 \ -crate://crates.io/serde_derive_internals/0.19.0 \ -crate://crates.io/sha2/0.7.0 \ -crate://crates.io/strsim/0.7.0 \ -crate://crates.io/subtle/0.3.0 \ -crate://crates.io/subtle/0.5.1 \ -crate://crates.io/syn/0.11.11 \ -crate://crates.io/synom/0.11.3 \ -crate://crates.io/synstructure/0.6.1 \ -crate://crates.io/termion/1.5.1 \ -crate://crates.io/textwrap/0.9.0 \ -crate://crates.io/toml/0.4.5 \ -crate://crates.io/typenum/1.9.0 \ -crate://crates.io/unicode-width/0.1.4 \ -crate://crates.io/unicode-xid/0.0.4 \ -crate://crates.io/vec_map/0.8.0 \ -crate://crates.io/void/1.0.2 \ -crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ -crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ -crate://crates.io/winapi/0.2.8 \ -crate://crates.io/winapi/0.3.4 \ -" - -inherit cargo - -do_install() { - install -d ${D}${bindir} - install -d ${D}${datadir}/citadel - - install -m 755 ${B}/target/${CARGO_TARGET_SUBDIR}/citadel-update ${D}${bindir} - install -m 644 ${B}/conf/citadel-update.conf ${D}${datadir}/citadel -} - -FILES_${PN} += "${datadir}/citadel" - -require citadel-tools.inc