From 0b05a07db7699beb8b47d6e43342efc6a76d0fdc Mon Sep 17 00:00:00 2001 From: Joe Grund Date: Mon, 6 May 2019 11:21:28 -0400 Subject: [PATCH] Bump zfs (#81) * Bump deps to latest Signed-off-by: Joe Grund * Update libzfs-sys to 0.7.13 Update bindings to 0.7.13. Signed-off-by: Joe Grund * remove module-tools Signed-off-by: Joe Grund * update to use docker builder + some cleanup Signed-off-by: Joe Grund * add global neon install Signed-off-by: Joe Grund * use tabs Signed-off-by: Joe Grund * force newer box version Signed-off-by: Joe Grund * move modprobe Signed-off-by: Joe Grund * exit if command fails Signed-off-by: Joe Grund * add cleanup fn Signed-off-by: Joe Grund * use ZFS kmod Signed-off-by: Joe Grund * fixup trap fn Signed-off-by: Joe Grund * bump libzfs-sys dep Signed-off-by: Joe Grund * bump libzfs version Signed-off-by: Joe Grund * add 5.0 deploy Signed-off-by: Joe Grund * remove extra job Signed-off-by: Joe Grund * fix release field Signed-off-by: Joe Grund * address CR feedback Signed-off-by: Joe Grund --- .gitignore | 1 - .travis.yml | 56 ++++-- Cargo.lock | 239 ++++++++++++------------ Vagrantfile | 18 +- include/.gitrepo | 12 -- include/LICENSE | 21 --- include/Makefile | 1 - include/README.md | 25 --- include/common.mk | 15 -- include/copr-mfl.enc | 3 - include/copr.mk | 76 -------- include/copr_srpm.mk | 15 -- include/git-versioning.mk | 62 ------ include/githooks.mk | 3 - include/hooks/commit-msg | 18 -- include/include | 1 - include/npm.mk | 29 --- include/python-common.mk | 17 -- include/python-localsrc.mk | 83 -------- include/python-pypi.mk | 29 --- include/rpm-common.mk | 124 ------------ include/rpm.mk | 33 ---- include/travis/copr-deploy.sh | 26 --- include/travis/mock_build_test.sh | 64 ------- include/travis/run_in_centos7_docker.sh | 17 -- include/travis/virus-scan.sh | 5 - libzfs-sys/Cargo.toml | 2 +- libzfs-sys/README.md | 4 +- libzfs-sys/build.rs | 6 +- libzfs-sys/src/bindings.rs | 12 +- libzfs-sys/src/lib.rs | 2 +- libzfs/Cargo.toml | 4 +- node-libzfs/.copr/Makefile | 26 +++ node-libzfs/.gitignore | 12 +- node-libzfs/.npmignore | 2 - node-libzfs/Makefile | 6 - node-libzfs/iml-node-libzfs.spec | 29 ++- node-libzfs/mock-build.sh | 38 ---- node-libzfs/native/Cargo.lock | 63 +++++-- node-libzfs/native/Cargo.toml | 4 +- node-libzfs/package-lock.json | 2 +- node-libzfs/package.json | 9 +- test.sh | 9 +- 43 files changed, 288 insertions(+), 935 deletions(-) delete mode 100644 include/.gitrepo delete mode 100644 include/LICENSE delete mode 100644 include/Makefile delete mode 100644 include/README.md delete mode 100644 include/common.mk delete mode 100644 include/copr-mfl.enc delete mode 100644 include/copr.mk delete mode 100644 include/copr_srpm.mk delete mode 100644 include/git-versioning.mk delete mode 100644 include/githooks.mk delete mode 100755 include/hooks/commit-msg delete mode 120000 include/include delete mode 100644 include/npm.mk delete mode 100644 include/python-common.mk delete mode 100644 include/python-localsrc.mk delete mode 100644 include/python-pypi.mk delete mode 100644 include/rpm-common.mk delete mode 100644 include/rpm.mk delete mode 100755 include/travis/copr-deploy.sh delete mode 100755 include/travis/mock_build_test.sh delete mode 100755 include/travis/run_in_centos7_docker.sh delete mode 100755 include/travis/virus-scan.sh create mode 100644 node-libzfs/.copr/Makefile delete mode 100644 node-libzfs/.npmignore delete mode 100644 node-libzfs/Makefile delete mode 100755 node-libzfs/mock-build.sh diff --git a/.gitignore b/.gitignore index cc2e7a2..3706999 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,3 @@ target /*.xml .idea/ travis_env -include/copr-mfl diff --git a/.travis.yml b/.travis.yml index 797a250..bceef32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,25 +7,42 @@ jobs: - stage: test name: "bindgen test" script: - - docker run -d -it --name libzfs -v $(pwd):/rust-libzfs:rw imlteam/zfs - - docker exec -i libzfs bash -c 'cd /rust-libzfs/node-libzfs && cargo build' + - docker run -dit --name libzfs -v $(pwd):/rust-libzfs:rw imlteam/zfs + - docker exec -i libzfs bash -c 'yum install -y cargo yum-plugin-copr' + - docker exec -i libzfs bash -c 'yum copr -y enable alonid/llvm-5.0.0' + - docker exec -i libzfs bash -c 'yum install -y clang-5.0.0' - docker exec -i libzfs bash -c 'cd /rust-libzfs/libzfs-sys && cargo test bindgen_test_layout' - stage: test - name: "mock build" - language: node_js - node_js: "10" + name: "copr build test" script: - - cd node-libzfs - - npm run mock + - cd node-libzfs + - export SPEC=iml-node-libzfs.spec + - docker run -it -e SPEC="$SPEC" -e LOCAL_ONLY="True" -v $(pwd):/build:rw imlteam/copr-zfs + - ((`find _topdir/RPMS -name *.rpm | wc -l` > 0)) + - stage: cd + name: "Continuous Deployment" + script: + - cd node-libzfs + - export OWNER=managerforlustre + - export PROJECT=manager-for-lustre-devel + - export PACKAGE=iml-node-libzfs + - export SPEC=iml-node-libzfs.spec + - docker run -it -e OWNER="$OWNER" -e PROJECT="$PROJECT" -e PACKAGE="$PACKAGE" -e SPEC="$SPEC" -e KEY="$encrypted_253525cedcf6_key" -e IV="$encrypted_253525cedcf6_iv" -v $(pwd):/build:rw imlteam/copr - stage: deploy-libzfs-sys name: "libzfs-sys" script: - docker run -d -it --name libzfs -v $(pwd):/rust-libzfs:rw imlteam/zfs + - docker exec -i libzfs bash -c 'yum install -y cargo yum-plugin-copr' + - docker exec -i libzfs bash -c 'yum copr -y enable alonid/llvm-5.0.0' + - docker exec -i libzfs bash -c 'yum install -y clang-5.0.0' - docker exec -i libzfs bash -c "cd /rust-libzfs/libzfs-sys && cargo package && cargo publish --token $CARGO_TOKEN" - stage: deploy-libzfs name: "libzfs" script: - docker run -d -it --name libzfs -v $(pwd):/rust-libzfs:rw imlteam/zfs + - docker exec -i libzfs bash -c 'yum install -y cargo yum-plugin-copr' + - docker exec -i libzfs bash -c 'yum copr -y enable alonid/llvm-5.0.0' + - docker exec -i libzfs bash -c 'yum install -y clang-5.0.0' - docker exec -i libzfs bash -c "cd /rust-libzfs/libzfs && cargo package && cargo publish --token $CARGO_TOKEN" - stage: deploy-libzfs-types name: "libzfs-types" @@ -45,18 +62,19 @@ jobs: skip_cleanup: true on: tags: true - - stage: deploy-copr - name: "Copr deploy" - before_deploy: - - include/travis/copr-deploy.sh prepare - deploy: - skip_cleanup: true - provider: script - script: ./travis_wait "./include/travis/run_in_centos7_docker.sh ./include/travis/copr-deploy.sh build" - on: - all_branches: true + - stage: deploy-copr-r5.0 + name: "Copr 5.0 deploy" + script: + - cd node-libzfs + - export OWNER=managerforlustre + - export PROJECT=manager-for-lustre-5.0 + - export PACKAGE=iml-node-libzfs + - export SPEC=iml-node-libzfs.spec + - docker run -it -e PROD="true" -e OWNER="$OWNER" -e PROJECT="$PROJECT" -e PACKAGE="$PACKAGE" -e SPEC="$SPEC" -e KEY="$encrypted_253525cedcf6_key" -e IV="$encrypted_253525cedcf6_iv" -v $(pwd):/build:rw imlteam/copr stages: - test + - name: cd + if: branch = master AND type = push AND fork = false - name: deploy-libzfs-sys if: branch =~ ^v\d+\.\d+\.\d+libzfs-sys$ - name: deploy-libzfs @@ -65,5 +83,5 @@ stages: if: branch =~ ^v\d+\.\d+\.\d+libzfs-types$ - name: deploy-node-libzfs if: branch =~ ^v\d+\.\d+\.\d+node-libzfs$ - - name: deploy-copr - if: branch =~ ^v\d+\.\d+\.\d+-.+node-libzfs$ + - name: deploy-copr-r5.0 + if: branch =~ ^v\d+\.\d+\.\d+-.+-r5\.0$ diff --git a/Cargo.lock b/Cargo.lock index 00ec480..61d3c41 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,9 +1,11 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "aho-corasick" -version = "0.6.9" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -11,7 +13,7 @@ name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -19,96 +21,96 @@ name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bindgen" -version = "0.43.1" +version = "0.43.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cexpr 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "clang-sys 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bitflags" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cc" -version = "1.0.25" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cexpr" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cfg-if" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "clang-sys" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clap" -version = "2.32.0" +version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cstr-argument" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "env_logger" -version = "0.5.13" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -132,7 +134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "humantime" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -140,12 +142,12 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.43" +version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -153,29 +155,29 @@ name = "libloading" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libzfs" -version = "0.6.13" +version = "0.6.14" dependencies = [ - "cstr-argument 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cstr-argument 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libzfs-sys 0.5.9", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libzfs-sys 0.5.10", "libzfs-types 0.1.1", "nvpair-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "libzfs-sys" -version = "0.5.9" +version = "0.5.10" dependencies = [ - "bindgen 0.43.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bindgen 0.43.2 (registry+https://github.com/rust-lang/crates.io-index)", "nvpair-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -184,8 +186,8 @@ dependencies = [ name = "libzfs-types" version = "0.1.1" dependencies = [ - "serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -193,27 +195,28 @@ name = "log" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "memchr" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "nom" -version = "4.1.1" +version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "numtoa" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "nvpair-sys" version = "0.1.0" @@ -239,7 +242,7 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "0.4.23" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -260,15 +263,15 @@ dependencies = [ [[package]] name = "quote" -version = "0.6.10" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "redox_syscall" -version = "0.1.40" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -276,56 +279,56 @@ name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex" -version = "1.0.6" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "regex-syntax" -version = "0.6.3" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "serde" -version = "1.0.80" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde_derive" -version = "1.0.80" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.20 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "strsim" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "syn" -version = "0.15.20" +version = "0.15.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -339,17 +342,18 @@ dependencies = [ [[package]] name = "termion" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", + "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "textwrap" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", @@ -360,12 +364,12 @@ name = "thread_local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "ucd-util" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -398,12 +402,12 @@ name = "which" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "winapi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -417,10 +421,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "winapi-util" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -433,62 +437,63 @@ name = "wincolor" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] -"checksum aho-corasick 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9a933f4e58658d7b12defcf96dc5c720f20832deebe3e0a19efd3b6aaeeb9e" +"checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" -"checksum bindgen 0.43.1 (registry+https://github.com/rust-lang/crates.io-index)" = "49a944a85a9f2a49c602cad1e87cebe90963190d8a3c12101f608300f2210f2f" -"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" -"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" -"checksum cexpr 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8fc0086be9ca82f7fc89fc873435531cb898b86e850005850de1f820e2db6e9b" -"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" -"checksum clang-sys 0.26.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1de610566438a6f9e60515a198bb6830fcea8c3bbe8fb83d50c82c83624e6e3b" -"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" -"checksum cstr-argument 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "22fab941bd464955e5cbeb59816a39b26ab6867942b3e6d3c28cd98ed01acded" -"checksum env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)" = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" +"checksum bindgen 0.43.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d52d263eacd15d26cbcf215d254b410bd58212aaa2d3c453a04b2d3b3adcf41" +"checksum bitflags 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "bd1fa8ad26490b0a5cfec99089952250301b6716cdeaa7c9ab229598fb82ab66" +"checksum cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a0c56216487bb80eec9c4516337b2588a4f2a2290d72a1416d930e4dcdb0c90d" +"checksum cexpr 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7fa24eb00d5ffab90eaeaf1092ac85c04c64aaf358ea6f84505b8116d24c6af" +"checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" +"checksum clang-sys 0.26.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ef0c1bcf2e99c649104bd7a7012d8f8802684400e03db0ec0af48583c6fa0e4" +"checksum clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" +"checksum cstr-argument 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20bd4e8067c20c7c3a4dea759ef91d4b18418ddb5bd8837ef6e2f2f93ca7ccbb" +"checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" -"checksum humantime 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0484fda3e7007f2a4a0d9c3a703ca38c71c54c55602ce4660c419fd32e188c9e" -"checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" -"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" +"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" +"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" +"checksum libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)" = "c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6" "checksum libloading 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3ad660d7cb8c5822cd83d10897b0f1f1526792737a179e73896152f85b88c2" "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" -"checksum memchr 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0a3eb002f0535929f1199681417029ebea04aadc0c7a4224b46be99c7f5d6a16" -"checksum nom 4.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9c349f68f25f596b9f44cf0e7c69752a5c633b0550c3ff849518bfba0233774a" +"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" +"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +"checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" "checksum nvpair-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5fc4cc751960db1094a7a732dd0706927aeae9194bf66c30fa227b70fc62b6c8" "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c" "checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4" -"checksum proc-macro2 0.4.23 (registry+https://github.com/rust-lang/crates.io-index)" = "88dae56b29da695d783ea7fc5a90de281f79eb38407e77f6d674dd8befc4ac47" +"checksum proc-macro2 0.4.29 (registry+https://github.com/rust-lang/crates.io-index)" = "64c827cea7a7ab30ce4593e5e04d7a11617ad6ece2fa230605a78b00ff965316" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" "checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" -"checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" -"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" +"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" +"checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" "checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ee84f70c8c08744ea9641a731c7fadb475bf2ecc52d7f627feb833e0b3990467" -"checksum regex-syntax 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fbc557aac2b708fe84121caf261346cc2eed71978024337e42eb46b8a252ac6e" -"checksum serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "15c141fc7027dd265a47c090bf864cf62b42c4d228bbcf4e51a0c9e2b0d3f7ef" -"checksum serde_derive 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)" = "225de307c6302bec3898c51ca302fc94a7a1697ef0845fcee6448f33c032249c" -"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum syn 0.15.20 (registry+https://github.com/rust-lang/crates.io-index)" = "8886c8d2774e853fcd7d9d2131f6e40ba46c9c0e358e4d57178452abd6859bb0" +"checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" +"checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" +"checksum serde 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "aa5f7c20820475babd2c077c3ab5f8c77a31c15e16ea38687b4c02d3e48680f4" +"checksum serde_derive 1.0.90 (registry+https://github.com/rust-lang/crates.io-index)" = "58fc82bec244f168b23d1963b45c8bf5726e9a15a9d146a067f9081aeed2de79" +"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +"checksum syn 0.15.33 (registry+https://github.com/rust-lang/crates.io-index)" = "ec52cd796e5f01d0067225a5392e70084acc4c0013fa71d55166d38a8b307836" "checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" -"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" -"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" +"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" +"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -"checksum ucd-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d0f8bfa9ff0cadcd210129ad9d2c5f145c13e9ced3d3e5d948a6213487d52444" +"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" "checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" "checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" "checksum which 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e84a603e7e0b1ce1aa1ee2b109c7be00155ce52df5081590d1ffb93f4f515cb2" -"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" +"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" +"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" diff --git a/Vagrantfile b/Vagrantfile index b0ad3c1..927804d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,9 +5,11 @@ require 'open3' Vagrant.configure('2') do |config| config.vm.box = 'centos/7' + config.vm.box_version = '1902.01' config.vm.provider 'virtualbox' do |v| v.linked_clone = true + v.customize ['modifyvm', :id, '--audio', 'none'] end config.vm.synced_folder '.', '/vagrant', @@ -15,7 +17,6 @@ Vagrant.configure('2') do |config| rsync__exclude: [ '.git/', 'target/', - 'include/', 'node-libzfs/target', 'node-libzfs/node_modules' ] @@ -42,7 +43,7 @@ Vagrant.configure('2') do |config| '--variant', 'fixed'] end - vb.customize ['storageattach', :id, + vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', i, '--type', 'hdd', @@ -55,20 +56,17 @@ Vagrant.configure('2') do |config| end config.vm.provision 'shell', inline: <<-SHELL - yum -y install yum-plugin-copr epel-release http://download.zfsonlinux.org/epel/zfs-release.el7_5.noarch.rpm + yum -y install yum-plugin-copr epel-release http://download.zfsonlinux.org/epel/zfs-release.el7_6.noarch.rpm + yum-config-manager --disable zfs + yum-config-manager --enable zfs-kmod yum -y copr enable alonid/llvm-5.0.0 - yum -y install clang-5.0.0 zfs libzfs2-devel --nogpgcheck + yum -y install clang-5.0.0 zfs libzfs2-devel cargo --nogpgcheck + zgenhostid modprobe zfs - genhostid zpool create test mirror sdb sdc cache sdd spare sde sdf zfs create test/ds zfs set lustre:mgsnode="10.14.82.0@tcp:10.14.82.1@tcp" test/ds zpool export test - curl https://sh.rustup.rs -sSf > /home/vagrant/rustup.sh - chmod 755 rustup.sh - ./rustup.sh -y - source $HOME/.cargo/env - rustup component add rustfmt-preview SHELL end diff --git a/include/.gitrepo b/include/.gitrepo deleted file mode 100644 index ee4aac0..0000000 --- a/include/.gitrepo +++ /dev/null @@ -1,12 +0,0 @@ -; DO NOT EDIT (unless you know what you are doing) -; -; This subdirectory is a git "subrepo", and this file is maintained by the -; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme -; -[subrepo] - remote = git@github.com:intel-hpdd/module-tools.git - branch = master - commit = 104711627362adf7c5e012e069cd14883a5a6a1b - parent = b8ca884ec3fdc2e222619f7fedea27103ddcaa11 - method = merge - cmdver = 0.4.0 diff --git a/include/LICENSE b/include/LICENSE deleted file mode 100644 index 61263dc..0000000 --- a/include/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Intel HPDD - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/include/Makefile b/include/Makefile deleted file mode 100644 index 8158af7..0000000 --- a/include/Makefile +++ /dev/null @@ -1 +0,0 @@ -include githooks.mk diff --git a/include/README.md b/include/README.md deleted file mode 100644 index 9f3af75..0000000 --- a/include/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# module-tools -Tools to work with and build modules - -This module can be included as a [git subrepo](https://github.com/ingydotnet/git-subrepo), imported at ``include/` in an enclosing module to provide tools to help build RPMs for the enclosing module. - -See the writeup for the [Basics of git subrepo](https://github.com/ingydotnet/git-subrepo/wiki/Basics). - -Once this module is imported to an enclosing module, the enclosing module needs a Makefile defining the enclosing module's *NAME* and optionally *PACKAGE_VERSION*, *DIST_VERSION*, *PACKAGE_RELEASE*, *TEST_DEPS* and include a _Makefile_ fragment indicating what type of package it is. Choices for example are *python-localsrc.mk* for a Python package with source local to the module. *python-pypi.mk* is used for a Python module that will be built from it's PyPI release. - -Some of the useful make targets provided are: -- githooks: Installs the hooks/ subdirectory into your git repo as it - git hooks -- rpms: Creates all of the binary RPMs for the module -- srpm: Creates the source RPM for the module -- build_test: Performs an RPM build in mock -- test: Runs any tests of the module -- tag: Generates any needed files and applies a git tag -- copr_build: Submits the RPM specfile to Copr for building in a - private repo - - this requires that a file named copr-local.mk exists - in the repo with COPR_OWNER and COPR_PROJECT defined - as the owner and project in Copr to build in -- iml_copr_repo: Submits the RPM specfile to Corp for building in - the production IML repo - diff --git a/include/common.mk b/include/common.mk deleted file mode 100644 index 9cbc1ad..0000000 --- a/include/common.mk +++ /dev/null @@ -1,15 +0,0 @@ -travis_mock_build_test: - TRAVIS=true TRAVIS_EVENT_TYPE=pull_request \ - TRAVIS_PULL_REQUEST_BRANCH=$${TRAVIS_PULL_REQUEST_BRANCH:-master} \ - include/travis/run_in_centos7_docker.sh \ - include/travis/mock_build_test.sh - -clean: - if [ -n "$(CLEAN)" ]; then \ - rm -rf $(CLEAN); \ - fi - -distclean: clean - if [ -n "$(DISTCLEAN)" ]; then \ - rm -rf $(DISTCLEAN); \ - fi diff --git a/include/copr-mfl.enc b/include/copr-mfl.enc deleted file mode 100644 index 4da5fdd..0000000 --- a/include/copr-mfl.enc +++ /dev/null @@ -1,3 +0,0 @@ -rtT~*l'|:S -9e.LHLb^5JhU - ڬٜ`Bý璍 ! T킼NRef?'@ ʭQl}.YpX^4 ;xVWo&Rkdo\瞇wSَ'º$'|x-NF> \ No newline at end of file diff --git a/include/copr.mk b/include/copr.mk deleted file mode 100644 index 379613b..0000000 --- a/include/copr.mk +++ /dev/null @@ -1,76 +0,0 @@ -PREREQ := - -# default to failsafe -DRYRUN := true -ifeq ($(DRYRUN),true) - ECHO := echo -$(warning Not actually executing commands. \ -Pass DRYRUN=false to make to execute commands.) -else - ECHO := -endif - -ifneq ($(filter iml_%,$(MAKECMDGOALS)),) - COPR_CONFIG := --config include/copr-mfl - OWNER_PROJECT = managerforlustre/manager-for-lustre -else - # local settings - -include copr-local.mk - - ifeq ($(COPR_PROJECT),) - PREREQ += create_copr_project - COPR_PROJECT := $(NAME) - endif - ifneq ($(filter copr_%,$(MAKECMDGOALS)),) - ifndef COPR_OWNER - $(error COPR_OWNER needs to be set in copr-local.mk) - endif - ifndef COPR_PROJECT - $(error COPR_PROJECT needs to be set in copr-local.mk) - endif - endif - OWNER_PROJECT = $(COPR_OWNER)/$(COPR_PROJECT) -endif - -ifeq ($(shell grep -q ^%patch $(RPM_SPEC); echo $${PIPESTATUS[0]}),0) - PREREQ += $(TARGET_SRPM) -else - ifeq ($(UNPUBLISHED),true) - PREREQ += $(TARGET_SRPM) - else - PREREQ += $(RPM_SPEC) - endif -endif - - -delete_copr_project: - if copr-cli list | grep $(NAME); then \ - $(ECHO) copr-cli $(COPR_CONFIG) delete $(NAME); \ - fi - -create_copr_project: delete_copr_project - $(ECHO) copr-cli $(COPR_CONFIG) create --chroot epel-7-x86_64 \ - --enable-net on $(NAME) - -ifeq ($(BUILD_METHOD),PyPI) -#copr_build: -# https://pagure.io/copr/copr/issue/207 -copr_build iml_copr_build: $(PREREQ) - # buildpypi is pretty useless right now: - # https://pagure.io/copr/copr/issue/207 - #copr-cli buildpypi --packagename $(NAME) - #$(COPR_OWNER)/$(COPR_PROJECT) - $(ECHO) copr-cli $(COPR_CONFIG) build $(OWNER_PROJECT) $(filter-out \ - create_copr_project,$^) -else ifeq ($(BUILD_METHOD),Registry) -copr_build iml_copr_build: $(PREREQ) - $(ECHO) copr-cli $(COPR_CONFIG) build $(OWNER_PROJECT) $(filter-out \ - create_copr_project,$^) -else -copr_build iml_copr_build: $(PREREQ) - $(ECHO) copr-cli $(COPR_CONFIG) buildmock $(OWNER_PROJECT) \ - --scm-type git \ - --scm-url https://github.com/intel-hpdd/$(NAME) -endif - -.PHONY: copr_build iml_copr_build diff --git a/include/copr_srpm.mk b/include/copr_srpm.mk deleted file mode 100644 index 9bac37f..0000000 --- a/include/copr_srpm.mk +++ /dev/null @@ -1,15 +0,0 @@ -SPECFILE := $(shell if [ -d "$(spec)" ]; then \ - ls *.spec | head -1; \ - else \ - echo "$(spec)"; \ - fi) -ifeq ($(SPECFILE),) -$(error "SPECFILE cannot be empty!") -endif - -srpm: - dnf -y install 'dnf-command(copr)' rpmdevtools wget - dnf -y --setopt=reposdir=/tmp/yum.repos.d copr enable clime/rpkg-client - dnf -y install rpkg - spectool -g $(SPECFILE) - rpkg srpm --outdir=$(outdir) --spec=$(SPECFILE) diff --git a/include/git-versioning.mk b/include/git-versioning.mk deleted file mode 100644 index cf39f8d..0000000 --- a/include/git-versioning.mk +++ /dev/null @@ -1,62 +0,0 @@ -space := -space += -SCM_COMMIT_NUMBER := $(shell git rev-list HEAD | wc -l) -ifeq ($(strip $(JOB_NAME)),) -JENKINS_BUILD_TAG := -else -JENKINS_BUILD_TAG := $(shell echo .jenkins-$(JOB_NAME)-$(BUILD_NUMBER) | \ - sed -e 's/arch=[^,-]*,\?-\?//' \ - -e 's/distro=[^,-]*,\?-\?//' \ - -e 's,[/-],_,g') -endif -SCM_DESCRIPTION := $(shell msg=$$(git log -n 1 --abbrev-commit); \ - if echo "$$msg" | \ - grep -q "^ Create-Tag:"; then \ - echo "$$msg" | \ - sed -ne '/^ Create-Tag:/s/RC[0-9]*//;s/^.*: *v//p;/^ Create-Tag:/s/P[0-9]*//'; fi) -ifeq ($(strip $(SCM_DESCRIPTION)),) -SCM_DESCRIPTION := $(subst -,$(space),$(shell git describe --tags \ - --match v[0-9]* | \ - sed -e 's/^v//' \ - -e 's/RC[0-9]*//' \ - -e 's/P[0-9]*//')) -endif - -# Stable variable names exported to packaging and code -BUILD_NUMBER := $(SCM_COMMIT_NUMBER) -VERSION := $(subst $(space),-,$(SCM_DESCRIPTION)) -PACKAGE_VERSION := $(word 1, $(SCM_DESCRIPTION)) -PACKAGE_RELEASE := $(subst $(space),.,$(wordlist 2, 10, $(SCM_DESCRIPTION))) -ifeq ($(strip $(PACKAGE_RELEASE)),) - IS_RELEASE := True - # We use the build number in a package's release field in - # order to distinguish between RCs with identical version fields. - # e.g. 2.0.0.0-2983 (RC1), 2.0.0.0-2987 (RC2) - # The important thing is that newer RCs must upgrade older ones, - # and end-users only really care about the %{version} field. - PACKAGE_RELEASE := $(BUILD_NUMBER) -else - IS_RELEASE := False - # In development, we embed the rest of the git describe output - # in order to easily understand the provenance of a package. - # The commits-since-tag number will ensure that newer packages - # are preferred, since RPM's version parsing works left-to-right. - PACKAGE_RELEASE := $(BUILD_NUMBER).$(PACKAGE_RELEASE)$(JENKINS_BUILD_TAG) - - # Display this in the UI to make ID easier in dev/test - BUILD_NUMBER := $(JENKINS_BUILD_TAG) -endif - -MODULE_SUBDIR ?= $(subst -,_,$(NAME)) - -# only overwrite scm_version.py if we have info from git -ifneq ($(strip $(PACKAGE_VERSION)),) -$(shell { echo 'VERSION = "$(VERSION)"'; \ - echo 'PACKAGE_VERSION = "$(PACKAGE_VERSION)"'; \ - echo 'BUILD = "$(BUILD_NUMBER)"'; \ - echo 'IS_RELEASE = $(IS_RELEASE)'; } > scm_version.py.tmp; \ - trap 'rm -f scm_version.py.tmp' EXIT; \ - if ! cmp scm_version.py.tmp $(MODULE_SUBDIR)/scm_version.py; then \ - cp scm_version.py.tmp $(MODULE_SUBDIR)/scm_version.py; \ - fi) -endif diff --git a/include/githooks.mk b/include/githooks.mk deleted file mode 100644 index ef10f70..0000000 --- a/include/githooks.mk +++ /dev/null @@ -1,3 +0,0 @@ -githooks: - git config --add core.hooksPath include/hooks/ - diff --git a/include/hooks/commit-msg b/include/hooks/commit-msg deleted file mode 100755 index e108b90..0000000 --- a/include/hooks/commit-msg +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -if ! grep -qs "^$SOB" "$1"; then - mv "$1"{,.tmp} - trap 'rm $1.tmp' EXIT - added=false - while read -r line; do - if ! $added && [[ $line == \#* ]]; then - echo -e "\n$SOB" - added=true - fi - echo "$line" - done < "$1".tmp > "$1" - if ! $added; then - echo -e "\n$SOB" >> "$1" - fi -fi diff --git a/include/include b/include/include deleted file mode 120000 index 945c9b4..0000000 --- a/include/include +++ /dev/null @@ -1 +0,0 @@ -. \ No newline at end of file diff --git a/include/npm.mk b/include/npm.mk deleted file mode 100644 index 978e52a..0000000 --- a/include/npm.mk +++ /dev/null @@ -1,29 +0,0 @@ -CLEAN += $(NAME)-$(PACKAGE_VERSION).tgz \ - $(subst iml-,,$(NAME)-$(PACKAGE_VERSION).tgz) targetdir - -include include/common.mk - -TARGET_RPMS = $(NAME)-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)$(RPM_DIST).noarch.rpm -BUILD_METHOD := Registry - -include include/rpm-common.mk -include include/copr.mk - -# these are interesting ways to try to generate the prerequisite list but -# they don't quite work since prerequisite determination is done at Makefile -# reading time, not when this recipe is evaluated, which is what needs to -# happen in order to generate the list of files *after* the .html files are -# generated -# worth keeping here for future reference -# $(shell npx npm-packlist-cli -o make 2>/dev/null) -# this one needs: -# SHELL := /bin/bash -# $(shell find | grep -v -f <(echo "\.sw."; echo ".npmignore"; echo "^.$$"; echo "^.\/.git"; sed -e 's/\/$$//' -e 's/\*/.*/g' -e 's/^/^.\//' .npmignore) | sed -e 's/^\.\///' -e 's/ /\\ /g') -$(NAME)-$(PACKAGE_VERSION).tgz: $(NPM_PREREQS) package.json LICENSE - npm pack - -$(subst iml-,,$(NAME)-$(PACKAGE_VERSION).tgz): $(NAME)-$(PACKAGE_VERSION).tgz - rm -f $@ - ln $^ $@ - -.PHONY: install_build_deps clean distclean diff --git a/include/python-common.mk b/include/python-common.mk deleted file mode 100644 index ecb3301..0000000 --- a/include/python-common.mk +++ /dev/null @@ -1,17 +0,0 @@ -RPM_SPEC := python-$(NAME).spec - -TARGET_RPMS = $(addprefix _topdir/RPMS/noarch/python-, \ - $(addsuffix -$(PACKAGE_VRD).noarch.rpm, \ - $(ALL_PKGS))) - -test_dependencies: - test_deps="$(TEST_DEPS)"; \ - if rpm --version && yum --version && \ - ! rpm -q $$test_deps >/dev/null 2>&1; then \ - echo "Some dependencies need installing..."; \ - echo "You will need sudo root privilledges for yum" \ - sudo yum -y install $$test_deps; \ - fi - -test: test_dependencies - @nosetests $(NOSE_ARGS) diff --git a/include/python-localsrc.mk b/include/python-localsrc.mk deleted file mode 100644 index 30768fa..0000000 --- a/include/python-localsrc.mk +++ /dev/null @@ -1,83 +0,0 @@ -BUILD_METHOD := Registry - -include include/git-versioning.mk - -ifeq ($(strip $(VERSION)),) -VERSION := $(shell set -x; PYTHONPATH=$(MODULE_SUBDIR) python -c \ - "import scm_version; print scm_version.VERSION") -endif - -ifeq ($(strip $(PACKAGE_VERSION)),) -PACKAGE_VERSION := $(shell set -x; PYTHONPATH=$(MODULE_SUBDIR) python -c \ - "import scm_version; print scm_version.PACKAGE_VERSION") -endif - -include include/common.mk -include include/python-common.mk -include include/rpm-common.mk -include include/copr.mk - -# should always remove the tarball sources if DIST_VERSION was set -ifneq ($(DIST_VERSION),$(PACKAGE_VERSION)) - $(shell rm -f $(word 1,$(RPM_SOURCES))) -endif - -%.egg-info/SOURCES.txt: install_build_deps-stamp - python setup.py egg_info - -deps: $(subst -,_,$(NAME)).egg-info/SOURCES.txt - sed -e 's/^/dist\/python-$(NAME)-$(PACKAGE_VERSION).tar.gz: /' < $< > deps - -dist/$(NAME)-$(PACKAGE_VERSION).tar.gz: Makefile $(MODULE_SUBDIR)/__init__.py - echo "jenkins_fold:start:Make Agent Tarball" - rm -f MANIFEST - python setup.py sdist - # TODO - is this really necessary? time precedence - # of the tarball vs. the product in _topdir/ - # should simply require that any older product - # in _topdir/ will just be rebuilt - # if we made a new tarball, get rid of all previous - # build product - rm -rf _topdir - echo "jenkins_fold:end:Make Agent Tarball" - -dist: dist/$(NAME)-$(PACKAGE_VERSION).tar.gz - -ifneq ($(DIST_VERSION),$(PACKAGE_VERSION)) -$(RPM_SOURCES): # why do we want this prereq? dist/$(NAME)-$(PACKAGE_VERSION).tar.gz -# this builds the RPM from the Source(s) specified in -# the specfile. i don't think this is what we want here. -# here, we want to build an rpm from the source tree -# let's see what time tells us we want to do - if ! spectool $(RPM_DIST_VERSION_ARG) \ - -g $(RPM_SPEC); then \ - echo "Failed to fetch $@."; \ - echo "Is this an unpublished version still?"; \ - echo "Perhaps you want to assign a PR branch name" \ - "to DIST_VERSION in your make"; \ - echo "command?"; \ - exit 1; \ - fi - # uncomment this to build the tarball from the local source tree - #git archive --prefix $(NAME)-$(DIST_VERSION)/ \ - # -o $(DIST_VERSION).tar.gz HEAD -else -_topdir/SOURCES/$(NAME)-$(PACKAGE_VERSION).tar.gz: \ - dist/$(NAME)-$(PACKAGE_VERSION).tar.gz - mkdir -p _topdir/SOURCES - cp dist/$(NAME)-$(PACKAGE_VERSION).tar.gz _topdir/SOURCES -endif - -_topdir/SOURCES/%: % - mkdir -p _topdir/SOURCES - cp $< $@ - -install_build_deps: install_build_deps-stamp - -install_build_deps-stamp: - if ! rpm -q python-setuptools; then \ - yum -y install python-setuptools; \ - fi - touch $@ - -include deps diff --git a/include/python-pypi.mk b/include/python-pypi.mk deleted file mode 100644 index d637e41..0000000 --- a/include/python-pypi.mk +++ /dev/null @@ -1,29 +0,0 @@ -BUILD_METHOD := PyPI -include include/common.mk -include include/python-common.mk -include include/rpm-common.mk -include include/copr.mk - -DISTCLEAN += $(NAME)-*.tar.gz - -# don't rebuild if tracked by git since this has to be manually -# updated by a developer because pyp2rpm is just not sufficient -# to produce a working specfile -ifneq ($(shell git ls-files --error-unmatch $(RPM_SPEC) 2>/dev/null),$(RPM_SPEC)) -$(RPM_SPEC): include/python-pypi.mk - #pyp2rpm $(NAME) -t epel7 | sed \ - # -e '/%check/,/^$$/d' > $@ - pyp2rpm $(NAME) | sed -e 's/python3-/python%{python3_pkgversion}-/' \ - -e '/%check/,/^$$/d' > $@ -endif - -$(RPM_SOURCES): - if ! spectool $(RPM_DIST_VERSION_ARG) \ - --define "epel 1" \ - -g $(RPM_SPEC); then \ - echo "Failed to fetch $@."; \ - exit 1; \ - fi - -install_build_deps: - echo "Nothing to install" diff --git a/include/rpm-common.mk b/include/rpm-common.mk deleted file mode 100644 index 2be8de8..0000000 --- a/include/rpm-common.mk +++ /dev/null @@ -1,124 +0,0 @@ -RPM_SPEC ?= $(NAME).spec - -CLEAN += _topdir -DISTCLEAN += dist - -# I would love nothing more than to build the specfile using the -# standard %.in rule but we need it to be made before many of the -# following variable evaluations so we can't leave it to be built -# during target processing. -# So we end up having to run this every time. -$(shell if [ $(RPM_SPEC).in -nt $(RPM_SPEC) ]; then \ - sed -e "s/@VERSION@/$(PACKAGE_VERSION)/g" \ - -e "s/@RELEASE@/$(PACKAGE_RELEASE)/g" \ - < $(RPM_SPEC).in > $(RPM_SPEC); \ - fi) - -ifndef DIST_VERSION -DIST_VERSION := $(PACKAGE_VERSION) -else -RPM_DIST_VERSION_ARG := --define dist_version\ $(DIST_VERSION) -endif - -RPM_DIST=$(subst .centos,,$(shell rpm --eval %dist)) - -# probably a way to determine this from parsespec methods -ALL_PKGS := $(NAME) $(addprefix $(NAME)-,$(SUBPACKAGES)) - -PACKAGE_VRD := $(PACKAGE_VERSION)-$(PACKAGE_RELEASE)$(RPM_DIST) - -RPM_SOURCES := $(shell spectool --define version\ $(PACKAGE_VERSION) \ - $(RPM_DIST_VERSION_ARG) \ - --define "epel 1" \ - -l $(RPM_SPEC) | \ - sed -e 's/^[^:]*: *//' -e 's/.*\///') - -COMMON_RPMBUILD_ARGS += $(RPM_DIST_VERSION_ARG) \ - --define "version $(PACKAGE_VERSION)" \ - --define "package_release $(PACKAGE_RELEASE)" \ - --define "epel 1" \ - --define "%dist $(RPM_DIST)" - -RPMBUILD_ARGS += $(COMMON_RPMBUILD_ARGS) --define "_topdir $$(pwd)/_topdir" - -TARGET_SRPM := _topdir/SRPMS/$(shell rpm $(RPMBUILD_ARGS) -q \ - --qf %{name}-%{version}-%{release}\\n \ - --specfile $(RPM_SPEC) | head -1).src.rpm -all: rpms - -genfiles: $(RPM_SPEC) - -develop: - python setup.py develop - -tarball: dist/$(NAME)-$(PACKAGE_VERSION).tar.gz - -%: %.in - sed -e "s/@VERSION@/$(PACKAGE_VERSION)/g" \ - -e "s/@RELEASE@/$(PACKAGE_RELEASE)/g" < $< > $@ - -_topdir/SPECS/$(RPM_SPEC): $(RPM_SPEC) - mkdir -p _topdir/SPECS - cp $< $@ - -_topdir/SOURCES/%: % - mkdir -p _topdir/SOURCES - cp $< $@ - -srpm: $(TARGET_SRPM) - -$(TARGET_SRPM): $(addprefix _topdir/SOURCES/, $(RPM_SOURCES)) \ - _topdir/SPECS/$(RPM_SPEC) - mkdir -p _topdir/SRPMS - rpmbuild $(RPMBUILD_ARGS) -bs _topdir/SPECS/$(RPM_SPEC) - -rpms: $(TARGET_RPMS) - -# see https://stackoverflow.com/questions/2973445/ for why we subst -# the "rpm" for "%" to effectively turn this into a multiple matching -# target pattern rule -$(subst rpm,%,$(TARGET_RPMS)): \ - $(addprefix _topdir/SOURCES/, $(RPM_SOURCES)) \ - _topdir/SPECS/$(RPM_SPEC) - echo "jenkins_fold:start:Make Agent RPMS" - rm -rf $(addprefix _topdir/, BUILD RPMS) - mkdir -p $(addprefix _topdir/, BUILD $(addprefix RPMS/,noarch x86_64)) - rpmbuild $(RPMBUILD_ARGS) -bb _topdir/SPECS/$(RPM_SPEC) - echo "jenkins_fold:end:Make Agent RPMS" - -build_test: $(TARGET_SRPM) - $${TRAVIS:-false} && echo "travis_fold:start:mock" || true - mock -v $(COMMON_RPMBUILD_ARGS) $< - $${TRAVIS:-false} && echo "travis_fold:end:mock" || true - -# it's not clear yet that we need/want this -#rpm_deps: $(RPM_SPEC) -# spectool -l $(RPM_SPEC) | \ -# sed -e 's/^Source[0-9][0-9]*: \(.*\/\)\(.*\)/\2: ; curl -L -O \1\2/' > $@ -# -#include rpm_deps - -rpmlint: $(RPM_SPEC) - rpmlint $< - -tags: - ctags -R . - -.PHONY: rpms srpm test test_dependencies build_test dist develop \ - all genfiles setuphooks rpmlint - -include include/githooks.mk - -# make a release -tag: - if [ -z "$(TAG)" ]; then \ - echo "Usage: make TAG= tag"; \ - exit 1; \ - fi - make genfiles - if git status --porcelain | grep ^\ M; then \ - echo "You have uncommitted diffs that " \ - "you need to commit before you can tag"; \ - exit 1; \ - fi - git tag $(TAG) diff --git a/include/rpm.mk b/include/rpm.mk deleted file mode 100644 index 56b9557..0000000 --- a/include/rpm.mk +++ /dev/null @@ -1,33 +0,0 @@ -include include/rpm-common.mk -include include/copr.mk - -VERSION_RELEASE := $(shell repoquery -q --qf "%{version}-%{release}" $(NAME) | sed -e 's/.el7//g') -SRPM := $(NAME)-$(VERSION_RELEASE).el7.src.rpm - -$(SRPM): - yumdownloader --source $(NAME) - -unpack: $(SRPM) - #if [ -d old ]; then \ - # echo "directory old already exists." \ - # "please clean it up and try again"; \ - # exit 1; \ - #fi - #mkdir old - #mv $$(ls | egrep -v -e ^old$$ -e ^Makefile$$) old - rpm2cpio < $(SRPM) | cpio -iu - -download: $(SRPM) - -$(RPM_SOURCES): - if ! spectool $(RPM_DIST_VERSION_ARG) \ - --define "epel 1" \ - -g $(RPM_SPEC); then \ - echo "Failed to fetch $@."; \ - exit 1; \ - fi - -install_build_deps: - echo "Nothing to do" - -.PHONY: unpack download install_build_deps diff --git a/include/travis/copr-deploy.sh b/include/travis/copr-deploy.sh deleted file mode 100755 index 5a50d7f..0000000 --- a/include/travis/copr-deploy.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -xe - -prepare() { - - # shellcheck disable=SC2154 - openssl aes-256-cbc -K "$encrypted_253525cedcf6_key" -iv "$encrypted_253525cedcf6_iv" -in include/copr-mfl.enc -out include/copr-mfl -d - curl -O https://raw.githubusercontent.com/m3t/travis_wait/master/travis_wait - chmod 755 travis_wait - -} - -build() { - - echo 'travis_fold:start:yum' - yum -y install epel-release - yum -y install rpm-build rpmdevtools copr-cli yum-utils git make python-setuptools - echo 'travis_fold:end:yum' - cd "${1:-/build}" - make iml_copr_build - -} - -# default action to build for backward compatibility -action=${1:-build} - -$action diff --git a/include/travis/mock_build_test.sh b/include/travis/mock_build_test.sh deleted file mode 100755 index 4aefd0f..0000000 --- a/include/travis/mock_build_test.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -xe - -# allow caller to override MAPPED_DIR, but default if they don't -MAPPED_DIR="${MAPPED_DIR:-/build}" - -echo 'travis_fold:start:yum' -yum -y install git mock rpm-build ed sudo make rpmdevtools rpmlint -echo 'travis_fold:end:yum' - -# edit per the module if specified -if [ -f mock-default.cfg.ed ]; then - cp /etc/mock/default.cfg{,.orig} - ed /etc/mock/default.cfg < mock-default.cfg.ed - diff -u /etc/mock/default.cfg{.orig,} || true -fi - -# add our repos to the mock configuration -ed <<"EOF" /etc/mock/default.cfg -$i - -[copr-be.cloud.fedoraproject.org_results_managerforlustre_manager-for-lustre_epel-7-x86_64_] -name=added from: https://copr-be.cloud.fedoraproject.org/results/managerforlustre/manager-for-lustre/epel-7-x86_64/ -baseurl=https://copr-be.cloud.fedoraproject.org/results/managerforlustre/manager-for-lustre/epel-7-x86_64/ -enabled=1 -. -wq -EOF - -eval export "$(grep -e "^TRAVIS=" -e "^TRAVIS_EVENT_TYPE=" "$MAPPED_DIR"/travis_env)" - -if [ "$TRAVIS_EVENT_TYPE" = "push" ]; then - eval export "$(grep -e "^TRAVIS_BRANCH=" "$MAPPED_DIR"/travis_env)" - TEST_BRANCH="$TRAVIS_BRANCH" -elif [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then - eval export "$(grep -e "^TRAVIS_PULL_REQUEST_BRANCH=" \ - "$MAPPED_DIR"/travis_env)" - TEST_BRANCH="$TRAVIS_PULL_REQUEST_BRANCH" -else - echo "Don't know how to handle TRAVIS_EVENT_TYPE $TRAVIS_EVENT_TYPE." - exit 1 -fi - -groupadd --gid "$(stat -c '%g' "$MAPPED_DIR")" mocker -useradd --uid "$(stat -c '%u' "$MAPPED_DIR")" --gid "$(stat -c '%g' "$MAPPED_DIR")" mocker -usermod -a -G mock mocker - -pushd "$MAPPED_DIR" -make install_build_deps -popd - -if ! su - mocker < travis_env - -# Run tests in Container -docker run --privileged -d -i -e "container=docker" -v /sys/fs/cgroup:/sys/fs/cgroup -v "$(pwd)":"$MAPPED_DIR":rw centos:centos7 /usr/sbin/init -DOCKER_CONTAINER_ID=$(docker ps | grep centos | awk 'NR==1{print $1}') -trap 'set -x -docker stop "$DOCKER_CONTAINER_ID" -docker rm -v "$DOCKER_CONTAINER_ID"' EXIT -docker logs "$DOCKER_CONTAINER_ID" -docker exec -i "$DOCKER_CONTAINER_ID" /bin/bash -xec "cd $MAPPED_DIR; $*" -docker ps -a diff --git a/include/travis/virus-scan.sh b/include/travis/virus-scan.sh deleted file mode 100755 index d3d6f1c..0000000 --- a/include/travis/virus-scan.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -xe - -sudo apt-get install clamav -y -sudo freshclam -clamscan --quiet -r ./ diff --git a/libzfs-sys/Cargo.toml b/libzfs-sys/Cargo.toml index 589ce85..e37b4b2 100644 --- a/libzfs-sys/Cargo.toml +++ b/libzfs-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libzfs-sys" -version = "0.5.9" +version = "0.5.10" description = "Rust bindings to libzfs" license = "MIT" repository = "https://github.com/whamcloud/rust-libzfs" diff --git a/libzfs-sys/README.md b/libzfs-sys/README.md index 7023abc..46558a0 100644 --- a/libzfs-sys/README.md +++ b/libzfs-sys/README.md @@ -1,6 +1,6 @@ # libzfs-sys -Bindings to libzfs 0.7.11. Uses [bindgen](https://github.com/rust-lang-nursery/rust-bindgen). +Bindings to libzfs 0.7.13. Uses [bindgen](https://github.com/rust-lang-nursery/rust-bindgen). ## Overview @@ -9,7 +9,7 @@ to the src dir. To rebuild bindings, delete [this file](src/bindings.rs) and run ## ZFS version -These bindings were compiled against ZFS 0.7.11. As `libzfs` is not a stable interface, +These bindings were compiled against ZFS 0.7.13. As `libzfs` is not a stable interface, they should only be used against this version. ## OS diff --git a/libzfs-sys/build.rs b/libzfs-sys/build.rs index 0b1200a..3965ca3 100644 --- a/libzfs-sys/build.rs +++ b/libzfs-sys/build.rs @@ -17,7 +17,7 @@ fn main() { env::set_var("LIBCLANG_PATH", "/opt/llvm-5.0.0/lib64/"); pkg_config::Config::new() - .atleast_version("0.7.9") + .atleast_version("0.7.13") .probe("libzfs") .unwrap(); println!("cargo:rustc-link-lib=zpool"); @@ -106,8 +106,8 @@ fn main() { .whitelist_function("zfs_validate_name") .whitelist_function("zprop_free_list") .clang_arg("-I/usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/") - .clang_arg("-I/usr/src/zfs-0.7.11/lib/libspl/include/") - .clang_arg("-I/usr/src/zfs-0.7.11/include/") + .clang_arg("-I/usr/src/zfs-0.7.13/lib/libspl/include/") + .clang_arg("-I/usr/src/zfs-0.7.13/include/") .generate() .expect("Unable to generate bindings"); diff --git a/libzfs-sys/src/bindings.rs b/libzfs-sys/src/bindings.rs index 3ab172b..a5c5c69 100644 --- a/libzfs-sys/src/bindings.rs +++ b/libzfs-sys/src/bindings.rs @@ -614,8 +614,10 @@ extern "C" { pub fn zpool_pool_state_to_name(arg1: pool_state_t) -> *const ::std::os::raw::c_char; } pub type zpool_iter_f = ::std::option::Option< - unsafe extern "C" fn(arg1: *mut zpool_handle_t, arg2: *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int, + unsafe extern "C" fn( + arg1: *mut zpool_handle_t, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, >; extern "C" { pub fn zpool_iter( @@ -804,8 +806,10 @@ extern "C" { pub fn zprop_free_list(arg1: *mut zprop_list_t); } pub type zfs_iter_f = ::std::option::Option< - unsafe extern "C" fn(arg1: *mut zfs_handle_t, arg2: *mut ::std::os::raw::c_void) - -> ::std::os::raw::c_int, + unsafe extern "C" fn( + arg1: *mut zfs_handle_t, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, >; extern "C" { pub fn zfs_iter_filesystems( diff --git a/libzfs-sys/src/lib.rs b/libzfs-sys/src/lib.rs index 686837b..8fa6f4e 100644 --- a/libzfs-sys/src/lib.rs +++ b/libzfs-sys/src/lib.rs @@ -15,7 +15,7 @@ //! to the src dir. To rebuild bindings run `cargo build`. //! //! ## ZFS version -//! These bindings were compiled against ZFS 0.7.11. As `libzfs` is not a stable interface, +//! These bindings were compiled against ZFS 0.7.13. As `libzfs` is not a stable interface, //! they should only be used against this version. //! //! ## OS diff --git a/libzfs/Cargo.toml b/libzfs/Cargo.toml index e8f0ceb..e24a7f4 100644 --- a/libzfs/Cargo.toml +++ b/libzfs/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "libzfs" -version = "0.6.13" +version = "0.6.14" authors = ["IML Team "] description = "Rust wrapper around libzfs-sys" license = "MIT" [dependencies] -libzfs-sys = { path = "../libzfs-sys", version = "0.5.9"} +libzfs-sys = { path = "../libzfs-sys", version = "0.5.10"} libzfs-types = { path = "../libzfs-types", version = "0.1.1" } nvpair-sys = "0.1" serde = "1.0" diff --git a/node-libzfs/.copr/Makefile b/node-libzfs/.copr/Makefile new file mode 100644 index 0000000..c86b60c --- /dev/null +++ b/node-libzfs/.copr/Makefile @@ -0,0 +1,26 @@ +BUILDROOT:=$(shell [ -d "/build" ] && echo "/build" || echo ".") +TMPDIR:=$(shell mktemp -d) + +srpm: + mkdir -p ${TMPDIR}/_topdir/SOURCES/node-libzfs/{lib,native} + mkdir -p ${TMPDIR}/_topdir/SPECS + rm -rf ${BUILDROOT}/_topdir + yum install -y epel-release http://download.zfsonlinux.org/epel/zfs-release.el7_6.noarch.rpm + yum install -y zfs libzfs2-devel --nogpgcheck + yum install -y cargo yum-plugin-copr rpm-build nodejs-packaging + yum copr -y enable alonid/llvm-5.0.0 + yum install -y clang-5.0.0 cargo nodejs + npm i -g neon-cli@0.1.23 + npm run install + cp package.json ${TMPDIR}/_topdir/SOURCES/node-libzfs/ + cp lib/index.js ${TMPDIR}/_topdir/SOURCES/node-libzfs/lib/ + cp native/index.node ${TMPDIR}/_topdir/SOURCES/node-libzfs/native + tar -czvf ${TMPDIR}/_topdir/SOURCES/iml-node-libzfs.tar.gz -C ${TMPDIR}/_topdir/SOURCES/node-libzfs . + cp iml-node-libzfs.spec ${TMPDIR}/_topdir/SPECS + rpmbuild -bs -D "_topdir ${TMPDIR}/_topdir" ${TMPDIR}/_topdir/SPECS/iml-node-libzfs.spec + cp -rf ${TMPDIR}/_topdir ${BUILDROOT}/ + cp -f _topdir/SRPMS/*.rpm $(outdir) + + + + diff --git a/node-libzfs/.gitignore b/node-libzfs/.gitignore index c2eb757..13d45b5 100644 --- a/node-libzfs/.gitignore +++ b/node-libzfs/.gitignore @@ -1,8 +1,8 @@ -native/target -native/index.node -native/artifacts.json -**/*~ -**/node_modules +.cargo/ +native/ +node_modules/ **/.DS_Store *.rpm -*.tgz \ No newline at end of file +*.tgz +*.log +_topdir diff --git a/node-libzfs/.npmignore b/node-libzfs/.npmignore deleted file mode 100644 index d271880..0000000 --- a/node-libzfs/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -*.spec -mock-build.sh diff --git a/node-libzfs/Makefile b/node-libzfs/Makefile deleted file mode 100644 index ccb073e..0000000 --- a/node-libzfs/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -NAME := iml-node-libzfs -PACKAGE_VERSION := 0.1.15 -DIST_VERSION := $(PACKAGE_VERSION) -PACKAGE_RELEASE := 1 - -include ../include/rpm.mk diff --git a/node-libzfs/iml-node-libzfs.spec b/node-libzfs/iml-node-libzfs.spec index b0ebd59..0264d79 100755 --- a/node-libzfs/iml-node-libzfs.spec +++ b/node-libzfs/iml-node-libzfs.spec @@ -1,41 +1,35 @@ %define base_name node-libzfs + Name: iml-%{base_name} -Version: 0.1.19 +Version: 0.1.20 +# Release Start Release: 1%{?dist} +# Release End + Summary: Implements a binding layer from node to rust-libzfs License: MIT Group: System Environment/Libraries URL: https://github.com/whamcloud/rust-libzfs/tree/master/%{base_name} -# Forcing local source because rpkg in copr does not seem to have a way -# to build source in the same way a package manager would. -Source0: %{name}-%{version}.tgz + +Source0: %{name}.tar.gz ExclusiveArch: %{nodejs_arches} BuildRequires: nodejs-packaging -BuildRequires: nodejs -BuildRequires: npm -BuildRequires: cargo -BuildRequires: clang-5.0.0 -BuildRequires: libzfs2-devel -BuildRequires: zfs Requires: nodejs %description -Implements a binding layer from node to rust-libzfs. +%{summary} %prep -%setup -npm i neon-cli@0.1.23 +%setup -c %nodejs_fixdep -r neon-cli %build -npm run install %install -mkdir -p %{buildroot}%{nodejs_sitearch}/@iml/node-libzfs/lib/ -mkdir -p %{buildroot}%{nodejs_sitearch}/@iml/node-libzfs/native/ +mkdir -p %{buildroot}%{nodejs_sitearch}/@iml/node-libzfs/{lib,native} cp -p package.json %{buildroot}%{nodejs_sitearch}/@iml/node-libzfs/ cp -p lib/index.js %{buildroot}%{nodejs_sitearch}/@iml/node-libzfs/lib/ cp -p native/index.node %{buildroot}%{nodejs_sitearch}/@iml/node-libzfs/native/ @@ -52,6 +46,9 @@ rm -rf %{buildroot} %{nodejs_sitearch}/@iml/node-libzfs/package.json %changelog +* Sat May 04 2019 Joe Grund - 0.1.20-1 +- Bump to ZFS 0.7.13 + * Thu Nov 01 2018 Joe Grund - 0.1.19-1 - Bump to ZFS 0.7.11 diff --git a/node-libzfs/mock-build.sh b/node-libzfs/mock-build.sh deleted file mode 100755 index 06f7d0c..0000000 --- a/node-libzfs/mock-build.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -xe - -sed -i $'1i config_opts[\'use_nspawn\'] = False' /etc/mock/default.cfg - -ed <<"EOF" /etc/mock/default.cfg -$i - -[copr-be.cloud.fedoraproject.org_results_managerforlustre_manager-for-lustre_epel-7-x86_64_] -name=added from: https://copr-be.cloud.fedoraproject.org/results/managerforlustre/manager-for-lustre/epel-7-x86_64/ -baseurl=https://copr-be.cloud.fedoraproject.org/results/managerforlustre/manager-for-lustre/epel-7-x86_64/ -enabled=1 - -[alonid-llvm-5.0.0] -name=Copr repo for llvm-5.0.0 owned by alonid -baseurl=https://copr-be.cloud.fedoraproject.org/results/alonid/llvm-5.0.0/epel-7-$basearch/ -enabled=1 - -[zfs] -name=ZFS on Linux for EL7 - dkms -baseurl=http://download.zfsonlinux.org/epel/7.5/$basearch/ -enabled=1 -. -w -q -EOF - -chown -R mockbuild:mock /builddir - -cd /builddir/ -RELEASE=$(git rev-list HEAD | wc -l) - -su - mockbuild <"] license = "MIT" build = "build.rs" @@ -17,4 +17,4 @@ neon = "0.1.23" neon-serde = "0.0.3" serde = "1.0" serde_derive = "1.0" -libzfs = "0.6.8" +libzfs = "0.6.14" diff --git a/node-libzfs/package-lock.json b/node-libzfs/package-lock.json index 33948d8..f0c3369 100644 --- a/node-libzfs/package-lock.json +++ b/node-libzfs/package-lock.json @@ -1,6 +1,6 @@ { "name": "@iml/node-libzfs", - "version": "0.1.19", + "version": "0.1.20", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/node-libzfs/package.json b/node-libzfs/package.json index 2d257af..c728792 100644 --- a/node-libzfs/package.json +++ b/node-libzfs/package.json @@ -1,6 +1,6 @@ { "name": "@iml/node-libzfs", - "version": "0.1.19", + "version": "0.1.20", "description": "Neon bindings to libzfs", "main": "lib/index.js", "publishConfig": { @@ -10,15 +10,16 @@ "type": "git", "url": "https://github.com/whamcloud/node-libzfs" }, + "files": [ + "lib/index.js", + "native/index.node" + ], "author": "IML Team", "license": "MIT", "dependencies": { "neon-cli": "0.1.23" }, "scripts": { - "premock": "docker run -dit --cap-add=SYS_ADMIN --privileged --name mock imlteam/mock /usr/sbin/init", - "mock": "cd ../ && docker cp -a ./ mock:/builddir", - "postmock": "docker exec -ti mock bash -xec 'cd /builddir/node-libzfs && rpkg make-source --outdir ./ && ./mock-build.sh'", "install": "neon build" } } diff --git a/test.sh b/test.sh index fd800c8..7a3c884 100755 --- a/test.sh +++ b/test.sh @@ -1,7 +1,14 @@ +#!/bin/bash +set -e + +function cleanup { + vagrant destroy -f +} +trap cleanup EXIT + vagrant destroy -f vagrant up vagrant ssh -c 'sudo -i -- <