From 519c4267f14a32c94bf3d976dbcadf145ea25bb0 Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Thu, 2 Jul 2015 17:11:38 +0200 Subject: [PATCH] Rebase to 4.2-rc0 (20150702 git snapshot) - Switch to new chardev-based communication layer (#1195029) Signed-off-by: Vitaly Kuznetsov --- hyperv-daemons.spec | 22 +++++++++++-------- ...vkvpd-0-long_file_names_from_readdir.patch | 18 +++++++-------- hypervkvpd.service | 1 + hypervvssd.service | 1 + sources | 6 ++--- 5 files changed, 27 insertions(+), 21 deletions(-) diff --git a/hyperv-daemons.spec b/hyperv-daemons.spec index fb01449..a72401e 100644 --- a/hyperv-daemons.spec +++ b/hyperv-daemons.spec @@ -5,43 +5,43 @@ # HyperV FCOPY daemon binary name %global hv_fcopy_daemon hypervfcopyd # snapshot version -%global snapver .20150108git +%global snapver .20150702git # use hardened build %global _hardened_build 1 Name: hyperv-daemons Version: 0 -Release: 0.11%{?snapver}%{?dist} +Release: 0.12%{?snapver}%{?dist} Summary: HyperV daemons suite Group: System Environment/Daemons License: GPLv2 URL: http://www.kernel.org -# Source files obtained from kernel upstream 3.19-rc3 (b1940cd21c0f4abdce101253e860feff547291b0) +# Source files obtained from kernel upstream 4.2-rc0 (4da3064d1775810f10f7ddc1c34c3f1ff502a654) # git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git # The daemon and scripts are located in "master branch - /tools/hv" # COPYING -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/COPYING?id=b1940cd21c0f4abdce101253e860feff547291b Source0: COPYING # HYPERV KVP DAEMON -# hv_kvp_daemon.c -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_kvp_daemon.c?id=b1940cd21c0f4abdce101253e860feff547291b0 +# hv_kvp_daemon.c -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_kvp_daemon.c?id=4da3064d1775810f10f7ddc1c34c3f1ff502a654 Source1: hv_kvp_daemon.c -# hv_get_dhcp_info.sh -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_get_dhcp_info.sh?id=b1940cd21c0f4abdce101253e860feff547291b0 +# hv_get_dhcp_info.sh -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_get_dhcp_info.sh?id=4da3064d1775810f10f7ddc1c34c3f1ff502a654 Source2: hv_get_dhcp_info.sh -# hv_get_dns_info.sh -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_get_dns_info.sh?id=b1940cd21c0f4abdce101253e860feff547291b0 +# hv_get_dns_info.sh -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_get_dns_info.sh?id=4da3064d1775810f10f7ddc1c34c3f1ff502a654 Source3: hv_get_dns_info.sh -# hv_set_ifconfig.sh -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_set_ifconfig.sh?id=b1940cd21c0f4abdce101253e860feff547291b0 +# hv_set_ifconfig.sh -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_set_ifconfig.sh?id=4da3064d1775810f10f7ddc1c34c3f1ff502a654 Source4: hv_set_ifconfig.sh Source5: hypervkvpd.service # HYPERV VSS DAEMON -# hv_vss_daemon.c -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_vss_daemon.c?id=b1940cd21c0f4abdce101253e860feff547291b0 +# hv_vss_daemon.c -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_vss_daemon.c?id=4da3064d1775810f10f7ddc1c34c3f1ff502a654 Source100: hv_vss_daemon.c Source101: hypervvssd.service # HYPERV FCOPY DAEMON -# hv_fcopy_daemon.c -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_fcopy_daemon.c?id=b1940cd21c0f4abdce101253e860feff547291b0 +# hv_fcopy_daemon.c -> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/tools/hv/hv_fcopy_daemon.c?id=4da3064d1775810f10f7ddc1c34c3f1ff502a654 Source200: hv_fcopy_daemon.c Source201: hypervfcopyd.service @@ -238,6 +238,10 @@ fi %doc COPYING %changelog +* Thu Jul 02 2015 Vitaly Kuznetsov - 0-0.12.20150702git +- Rebase to 4.2-rc0 (20150702 git snapshot) +- Switch to new chardev-based communication layer (#1195029) + * Wed Jun 17 2015 Fedora Release Engineering - 0-0.11.20150108git - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/hypervkvpd-0-long_file_names_from_readdir.patch b/hypervkvpd-0-long_file_names_from_readdir.patch index 3763576..1f926a8 100644 --- a/hypervkvpd-0-long_file_names_from_readdir.patch +++ b/hypervkvpd-0-long_file_names_from_readdir.patch @@ -1,6 +1,6 @@ -From 8d7fb2212e93411a8f2a07a9cf6be7325e30f3a4 Mon Sep 17 00:00:00 2001 +From a3634ce7eb5fc77e22c0d3722fb30e32b0d7d9fa Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov -Date: Thu, 8 Jan 2015 18:03:46 +0100 +Date: Thu, 2 Jul 2015 17:21:02 +0200 Subject: [PATCH] Tools: hv: Fix for long file names from readdir From: Tomas Hozza @@ -16,10 +16,10 @@ Signed-off-by: Vitaly Kuznetsov 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/hv_kvp_daemon.c b/hv_kvp_daemon.c -index 6a6432a..138666a 100644 +index 0d9f48e..ac89056 100644 --- a/hv_kvp_daemon.c +++ b/hv_kvp_daemon.c -@@ -43,6 +43,7 @@ +@@ -42,6 +42,7 @@ #include #include #include @@ -27,7 +27,7 @@ index 6a6432a..138666a 100644 #include /* -@@ -603,26 +604,22 @@ static char *kvp_get_if_name(char *guid) +@@ -599,26 +600,22 @@ static char *kvp_get_if_name(char *guid) DIR *dir; struct dirent *entry; FILE *file; @@ -58,7 +58,7 @@ index 6a6432a..138666a 100644 file = fopen(dev_id, "r"); if (file == NULL) -@@ -695,28 +692,23 @@ static char *kvp_mac_to_if_name(char *mac) +@@ -691,28 +688,23 @@ static char *kvp_mac_to_if_name(char *mac) DIR *dir; struct dirent *entry; FILE *file; @@ -69,7 +69,7 @@ index 6a6432a..138666a 100644 char *kvp_net_dir = "/sys/class/net/"; - char dev_id[256]; + char dev_id[PATH_MAX]; - int i; + unsigned int i; dir = opendir(kvp_net_dir); if (dir == NULL) @@ -87,10 +87,10 @@ index 6a6432a..138666a 100644 - strcat(dev_id, entry->d_name); - strcat(dev_id, "/address"); + snprintf(dev_id, sizeof(dev_id), "%s%s/address", kvp_net_dir, -+ entry->d_name); ++ entry->d_name); file = fopen(dev_id, "r"); if (file == NULL) -- -1.9.3 +2.4.3 diff --git a/hypervkvpd.service b/hypervkvpd.service index d84d18f..8ee1e59 100644 --- a/hypervkvpd.service +++ b/hypervkvpd.service @@ -1,6 +1,7 @@ [Unit] Description=Hyper-V KVP daemon ConditionVirtualization=microsoft +ConditionPathExists=/dev/vmbus/hv_kvp [Service] Type=simple diff --git a/hypervvssd.service b/hypervvssd.service index a834bf4..df62927 100644 --- a/hypervvssd.service +++ b/hypervvssd.service @@ -1,6 +1,7 @@ [Unit] Description=Hyper-V VSS daemon ConditionVirtualization=microsoft +ConditionPathExists=/dev/vmbus/hv_vss [Service] ExecStart=/usr/sbin/hypervvssd -n diff --git a/sources b/sources index f917882..2b6ae2b 100644 --- a/sources +++ b/sources @@ -1,7 +1,7 @@ 5a1b4a81be9d5bbbf8869976408354e8 hv_get_dhcp_info.sh dbb5cc7ec83ccc7b1c39458a7521c9b4 hv_get_dns_info.sh -20bb00d2260c7b3c2382aedfe097bffb hv_kvp_daemon.c +292ced879e33c28fff39994e6d1b3197 hv_kvp_daemon.c da7f77aa7507e950851cbb53673ce5d4 hv_set_ifconfig.sh -b9d0acb860d0e78f7637193e0af77936 hv_vss_daemon.c -9b67527810671cc62d6057f11c9e2841 hv_fcopy_daemon.c +80b96626b959b48c04050dd1441ded52 hv_vss_daemon.c +3311add6e715f6f4bfebf45b8910ed8d hv_fcopy_daemon.c d7810fab7487fb0aad327b76f1be7cd7 COPYING