From 8a698c1e51fe4ef95593eeccdb1c316f5b3f3926 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Mon, 1 Dec 2014 22:21:49 -0500 Subject: [PATCH] cargo: inhibit patches for too-new rust --- recipes/cargo/cargo_2014-11-30+1.bb | 38 +++++++++++ recipes/cargo/cargo_2014-11-30.bb | 26 +++++--- ...01-Update-to-work-with-new-curl-rust.patch | 26 ++++++++ ...001-Update-to-namespaced-io-FileType.patch | 49 +++++++++++++++ .../0001-update-to-new-io-FileType-enum.patch | 63 +++++++++++++++++++ 5 files changed, 195 insertions(+), 7 deletions(-) create mode 100644 recipes/cargo/cargo_2014-11-30+1.bb create mode 100644 recipes/cargo/files/0001-Update-to-work-with-new-curl-rust.patch create mode 100644 recipes/cargo/files/ssh2-rs/0001-Update-to-namespaced-io-FileType.patch create mode 100644 recipes/cargo/files/tar-rs/0001-update-to-new-io-FileType-enum.patch diff --git a/recipes/cargo/cargo_2014-11-30+1.bb b/recipes/cargo/cargo_2014-11-30+1.bb new file mode 100644 index 0000000..330f95c --- /dev/null +++ b/recipes/cargo/cargo_2014-11-30+1.bb @@ -0,0 +1,38 @@ +SRCREV_cargo = "da789a6b4b4cd85aee65ed8f7e99e65de7a3d200" +require cargo.inc + +SRC_URI += " \ + file://0001-Update-to-work-with-new-curl-rust.patch \ +\ + git://github.com/carllerche/curl-rust.git;protocol=https;name=curl-rust;destsuffix=curl-rust \ + file://curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl-If-it-.patch;patchdir=../curl-rust \ + file://curl-rust/0001-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch;patchdir=../curl-rust \ +\ + git://github.com/alexcrichton/gcc-rs.git;protocol=https;name=gcc-rs;destsuffix=gcc-rs \ +\ + git://github.com/alexcrichton/ssh2-rs.git;protocol=https;name=ssh2-rs;destsuffix=ssh2-rs \ + file://ssh2-rs/0001-Unconditionally-depend-on-openssl-sys.patch;patchdir=../ssh2-rs \ + file://ssh2-rs/0001-Update-to-namespaced-io-FileType.patch;patchdir=../ssh2-rs \ + git://github.com/alexcrichton/tar-rs.git;protocol=https;name=tar-rs;destsuffix=tar-rs \ + file://tar-rs/0001-update-to-new-io-FileType-enum.patch;patchdir=../tar-rs \ + git://github.com/sfackler/rust-openssl.git;protocol=https;name=rust-openssl;destsuffix=rust-openssl \ + git://github.com/alexcrichton/git2-rs.git;protocol=https;name=git2-rs;destsuffix=git2-rs \ +" +#file://gcc-rs/0001-XXX-hacks.patch;patchdir=../gcc-rs + +SRCREV_curl-rust = "5d0f5c8848e3cf1e12480a1923ae888e24d58f63" +SRCREV_gcc-rs = "903e8f8a2e3766ad3d514404d452dbaa1d3b2d79" +SRCREV_ssh2-rs = "922531da4c22abe7a216672314315d41769d7fb1" +SRCREV_tar-rs = "2f3fb3a976d7fae105e3c97c8206266e763061ef" +SRCREV_rust-openssl = "fd680e8a336f8870a411a3047c45b47ee72beb37" +SRCREV_git2-rs = "d0d21ca14b4a410806b577b04c2d29f7f8e45f61" +SRCREV_FORMAT = "cargo_curl-rust_gcc-rs_ssh2-rs_tar-rs_rust-openssl_git2-rs" +EXTRA_OECARGO_PATHS = "\ + ${WORKDIR}/tar-rs \ + ${WORKDIR}/ssh2-rs \ + ${WORKDIR}/rust-openssl \ + ${WORKDIR}/curl-rust \ + ${WORKDIR}/gcc-rs \ +" + +DEFAULT_PREFERENCE = "-1" diff --git a/recipes/cargo/cargo_2014-11-30.bb b/recipes/cargo/cargo_2014-11-30.bb index 06987c4..7f77d1d 100644 --- a/recipes/cargo/cargo_2014-11-30.bb +++ b/recipes/cargo/cargo_2014-11-30.bb @@ -2,6 +2,8 @@ SRCREV_cargo = "da789a6b4b4cd85aee65ed8f7e99e65de7a3d200" require cargo.inc SRC_URI += " \ + file://0001-Update-to-work-with-new-curl-rust.patch \ +\ git://github.com/carllerche/curl-rust.git;protocol=https;name=curl-rust;destsuffix=curl-rust \ file://curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl-If-it-.patch;patchdir=../curl-rust \ file://curl-rust/0001-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch;patchdir=../curl-rust \ @@ -10,15 +12,25 @@ SRC_URI += " \ \ git://github.com/alexcrichton/ssh2-rs.git;protocol=https;name=ssh2-rs;destsuffix=ssh2-rs \ file://ssh2-rs/0001-Unconditionally-depend-on-openssl-sys.patch;patchdir=../ssh2-rs \ + file://ssh2-rs/0001-Update-to-namespaced-io-FileType.patch;patchdir=../ssh2-rs \ + git://github.com/alexcrichton/tar-rs.git;protocol=https;name=tar-rs;destsuffix=tar-rs \ + file://tar-rs/0001-update-to-new-io-FileType-enum.patch;patchdir=../tar-rs \ + git://github.com/sfackler/rust-openssl.git;protocol=https;name=rust-openssl;destsuffix=rust-openssl \ + git://github.com/alexcrichton/git2-rs.git;protocol=https;name=git2-rs;destsuffix=git2-rs \ " #file://gcc-rs/0001-XXX-hacks.patch;patchdir=../gcc-rs -SRCREV_curl-rust = "c1b96e146f6752353a1e84cca932c628e6bf73af" +SRCREV_curl-rust = "5d0f5c8848e3cf1e12480a1923ae888e24d58f63" SRCREV_gcc-rs = "903e8f8a2e3766ad3d514404d452dbaa1d3b2d79" SRCREV_ssh2-rs = "922531da4c22abe7a216672314315d41769d7fb1" -SRCREV_FORMAT = "cargo_curl-rust_gcc-rs_ssh2-rs" -#EXTRA_OECARGO_PATHS = "\ -# ${WORKDIR}/curl-rust \ -# ${WORKDIR}/gcc-rs \ -#" - +SRCREV_tar-rs = "2f3fb3a976d7fae105e3c97c8206266e763061ef" +SRCREV_rust-openssl = "fd680e8a336f8870a411a3047c45b47ee72beb37" +SRCREV_git2-rs = "d0d21ca14b4a410806b577b04c2d29f7f8e45f61" +SRCREV_FORMAT = "cargo_curl-rust_gcc-rs_ssh2-rs_tar-rs_rust-openssl_git2-rs" +EXTRA_OECARGO_PATHS = "\ + ${WORKDIR}/tar-rs \ + ${WORKDIR}/ssh2-rs \ + ${WORKDIR}/rust-openssl \ + ${WORKDIR}/curl-rust \ + ${WORKDIR}/gcc-rs \ +" diff --git a/recipes/cargo/files/0001-Update-to-work-with-new-curl-rust.patch b/recipes/cargo/files/0001-Update-to-work-with-new-curl-rust.patch new file mode 100644 index 0000000..4eaecb6 --- /dev/null +++ b/recipes/cargo/files/0001-Update-to-work-with-new-curl-rust.patch @@ -0,0 +1,26 @@ +From 8085ebca084bb842a8896c48680fecdb9e06c59b Mon Sep 17 00:00:00 2001 +From: Cody P Schafer +Date: Mon, 1 Dec 2014 22:11:20 -0500 +Subject: [PATCH] Update to work with new curl-rust + +--- + src/registry/lib.rs | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/registry/lib.rs b/src/registry/lib.rs +index d2952ae..ddca499 100644 +--- a/src/registry/lib.rs ++++ b/src/registry/lib.rs +@@ -8,7 +8,8 @@ use std::io::util::ChainedReader; + use std::result; + + use curl::http; +-use curl::http::handle::{Put, Get, Delete, Method, Request}; ++use curl::http::handle::Method::{Put, Get, Delete}; ++use curl::http::handle::{Method, Request}; + use serialize::json; + + pub struct Registry { +-- +2.0.4 + diff --git a/recipes/cargo/files/ssh2-rs/0001-Update-to-namespaced-io-FileType.patch b/recipes/cargo/files/ssh2-rs/0001-Update-to-namespaced-io-FileType.patch new file mode 100644 index 0000000..d54862a --- /dev/null +++ b/recipes/cargo/files/ssh2-rs/0001-Update-to-namespaced-io-FileType.patch @@ -0,0 +1,49 @@ +From 29fcce9f8147ff9644666824ce9f7739f4aa9ea8 Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Sat, 29 Nov 2014 13:38:57 -0800 +Subject: [PATCH] Update to namespaced io::FileType + +--- + libssh2-sys/build.rs | 2 +- + src/session.rs | 12 ++++++------ + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs +index 4886782..c68643f 100644 +--- a/libssh2-sys/build.rs ++++ b/libssh2-sys/build.rs +@@ -90,7 +90,7 @@ fn main() { + let root = root.join("include"); + let dst = dst.join("include"); + for file in fs::walk_dir(&root).unwrap() { +- if fs::stat(&file).unwrap().kind != io::TypeFile { continue } ++ if fs::stat(&file).unwrap().kind != io::FileType::RegularFile { continue } + + let part = file.path_relative_from(&root).unwrap(); + let dst = dst.join(part); +diff --git a/src/session.rs b/src/session.rs +index 0fcee0c..c22d8e6 100644 +--- a/src/session.rs ++++ b/src/session.rs +@@ -588,12 +588,12 @@ fn mkstat(stat: &libc::stat) -> io::FileStat { + io::FileStat { + size: stat.st_size as u64, + kind: match (stat.st_mode as Mode) & libc::S_IFMT { +- libc::S_IFREG => io::TypeFile, +- libc::S_IFDIR => io::TypeDirectory, +- libc::S_IFIFO => io::TypeNamedPipe, +- libc::S_IFBLK => io::TypeBlockSpecial, +- libc::S_IFLNK => io::TypeSymlink, +- _ => io::TypeUnknown, ++ libc::S_IFREG => io::FileType::RegularFile, ++ libc::S_IFDIR => io::FileType::Directory, ++ libc::S_IFIFO => io::FileType::NamedPipe, ++ libc::S_IFBLK => io::FileType::BlockSpecial, ++ libc::S_IFLNK => io::FileType::Symlink, ++ _ => io::FileType::Unknown, + }, + perm: io::FilePermission::from_bits_truncate(stat.st_mode as u32), + created: mktime(stat.st_ctime as u64, stat.st_ctime_nsec as u64), +-- +2.0.4 + diff --git a/recipes/cargo/files/tar-rs/0001-update-to-new-io-FileType-enum.patch b/recipes/cargo/files/tar-rs/0001-update-to-new-io-FileType-enum.patch new file mode 100644 index 0000000..582d7db --- /dev/null +++ b/recipes/cargo/files/tar-rs/0001-update-to-new-io-FileType-enum.patch @@ -0,0 +1,63 @@ +From 3d850e1b1651a79085b994c12cdb78faa8271622 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ho=C3=A0ng=20=C4=90=E1=BB=A9c=20Hi=E1=BA=BFu?= + +Date: Mon, 1 Dec 2014 11:48:14 +0700 +Subject: [PATCH] update to new io::FileType enum + +--- + src/lib.rs | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +diff --git a/src/lib.rs b/src/lib.rs +index 5e13b84..3e24ff2 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -283,12 +283,12 @@ impl Archive { + octal(&mut header.dev_major, 0i); + + header.link[0] = match stat.kind { +- io::TypeFile => b'0', +- io::TypeDirectory => b'5', +- io::TypeNamedPipe => b'6', +- io::TypeBlockSpecial => b'4', +- io::TypeSymlink => b'2', +- io::TypeUnknown => b' ', ++ io::FileType::RegularFile => b'0', ++ io::FileType::Directory => b'5', ++ io::FileType::NamedPipe => b'6', ++ io::FileType::BlockSpecial => b'4', ++ io::FileType::Symlink => b'2', ++ io::FileType::Unknown => b' ', + }; + + // Final step, calculate the checksum +@@ -411,16 +411,16 @@ impl<'a, R> File<'a, R> { + /// Classify the type of file that this entry represents + pub fn classify(&self) -> io::FileType { + match (self.header.is_ustar(), self.header.link[0]) { +- (_, b'0') => io::TypeFile, +- (_, b'1') => io::TypeUnknown, // need a hard link enum? +- (_, b'2') => io::TypeSymlink, +- (false, _) => io::TypeUnknown, // not technically valid... +- +- (_, b'3') => io::TypeUnknown, // character special... +- (_, b'4') => io::TypeBlockSpecial, +- (_, b'5') => io::TypeDirectory, +- (_, b'6') => io::TypeNamedPipe, +- (_, _) => io::TypeUnknown, // not technically valid... ++ (_, b'0') => io::FileType::RegularFile, ++ (_, b'1') => io::FileType::Unknown, // need a hard link enum? ++ (_, b'2') => io::FileType::Symlink, ++ (false, _) => io::FileType::Unknown, // not technically valid... ++ ++ (_, b'3') => io::FileType::Unknown, // character special... ++ (_, b'4') => io::FileType::BlockSpecial, ++ (_, b'5') => io::FileType::Directory, ++ (_, b'6') => io::FileType::NamedPipe, ++ (_, _) => io::FileType::Unknown, // not technically valid... + } + } + +-- +2.0.4 +