cargo: inhibit patches for too-new rust

This commit is contained in:
Cody P Schafer
2014-12-01 22:21:49 -05:00
parent 9e929ff1c9
commit 8a698c1e51
5 changed files with 195 additions and 7 deletions
+38
View File
@@ -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"
+19 -7
View File
@@ -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 \
"
@@ -0,0 +1,26 @@
From 8085ebca084bb842a8896c48680fecdb9e06c59b Mon Sep 17 00:00:00 2001
From: Cody P Schafer <dev@codyps.com>
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
@@ -0,0 +1,49 @@
From 29fcce9f8147ff9644666824ce9f7739f4aa9ea8 Mon Sep 17 00:00:00 2001
From: Josh Stone <cuviper@gmail.com>
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
@@ -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?=
<hdhoang@zahe.me>
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<W: Writer> Archive<W> {
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