From 37eb5f09133c5429aecf269e8e268cd853fb2fac Mon Sep 17 00:00:00 2001 From: Vitaly Kuznetsov Date: Dec 11 2017 14:17:38 +0000 Subject: Rebase to 4.15-rc2 Both patches dropped as the required changes made it upstream. Signed-off-by: Vitaly Kuznetsov --- diff --git a/hyperv-daemons.spec b/hyperv-daemons.spec index 16c86b2..355768c 100644 --- a/hyperv-daemons.spec +++ b/hyperv-daemons.spec @@ -13,7 +13,7 @@ Name: hyperv-daemons Version: 0 -Release: 0.20%{?snapver}%{?dist} +Release: 0.21%{?snapver}%{?dist} Summary: Hyper-V daemons suite Group: System Environment/Daemons @@ -47,13 +47,6 @@ Source202: hypervfcopy.rules # HYPERV TOOLS Source301: lsvmbus -# HYPERV KVP DAEMON -# Correct paths to external scripts ("/usr/libexec/hypervkvpd"). -Patch0: hypervkvpd-0-corrected_paths_to_external_scripts.patch -# rhbz#872566 -Patch1: hypervkvpd-0-long_file_names_from_readdir.patch - - # Hyper-V is available only on x86 architectures # The base empty (a.k.a. virtual) package can not be noarch # due to http://www.rpm.org/ticket/78 @@ -144,9 +137,6 @@ cp -pvL %{SOURCE1} hv_kvp_daemon.c cp -pvL %{SOURCE100} hv_vss_daemon.c cp -pvL %{SOURCE200} hv_fcopy_daemon.c -%patch0 -p1 -b .external_scripts -%patch1 -p1 -b .long_names - %build # HYPERV KVP DAEMON gcc $RPM_OPT_FLAGS -c hv_kvp_daemon.c @@ -260,6 +250,10 @@ fi %{_sbindir}/lsvmbus %changelog +* Mon Dec 11 2017 Vitaly Kuznetsov - 0-0.21.20170105git +- Rebase to 4.15-rc2, drop fedora patches as changes are upstream +- Start kvpd after network.target + * Wed Aug 02 2017 Fedora Release Engineering - 0-0.20.20170105git - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/hypervkvpd-0-corrected_paths_to_external_scripts.patch b/hypervkvpd-0-corrected_paths_to_external_scripts.patch deleted file mode 100644 index 64463e9..0000000 --- a/hypervkvpd-0-corrected_paths_to_external_scripts.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c8cec9f3f9c34aa824e652a01ae08e7e7a621daa Mon Sep 17 00:00:00 2001 -From: Tomas Hozza -Date: Wed, 26 Sep 2012 10:26:55 +0200 -Subject: [PATCH] Corrected paths to hypervkvpd external scripts. - -Corrected paths to hypervkvpd external scripts, because -they will be located in "/usr/libexec/hypervkvpd". ---- - hv_kvp_daemon.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/hv_kvp_daemon.c b/hv_kvp_daemon.c -index 5959aff..3ea3af2 100644 ---- a/hv_kvp_daemon.c -+++ b/hv_kvp_daemon.c -@@ -812,7 +812,7 @@ static void kvp_get_ipconfig_info(char *if_name, - * . - */ - -- sprintf(cmd, "%s", "hv_get_dns_info"); -+ sprintf(cmd, "%s", "/usr/libexec/hypervkvpd/hv_get_dns_info"); - - /* - * Execute the command to gather DNS info. -@@ -829,7 +829,7 @@ static void kvp_get_ipconfig_info(char *if_name, - * Enabled: DHCP enabled. - */ - -- sprintf(cmd, "%s %s", "hv_get_dhcp_info", if_name); -+ sprintf(cmd, "%s %s", "/usr/libexec/hypervkvpd/hv_get_dhcp_info", if_name); - - file = popen(cmd, "r"); - if (file == NULL) -@@ -1331,7 +1331,7 @@ setval_done: - * invoke the external script to do its magic. - */ - -- snprintf(cmd, sizeof(cmd), "%s %s", "hv_set_ifconfig", if_file); -+ snprintf(cmd, sizeof(cmd), "%s %s", "/usr/libexec/hypervkvpd/hv_set_ifconfig", if_file); - if (system(cmd)) { - syslog(LOG_ERR, "Failed to execute cmd '%s'; error: %d %s", - cmd, errno, strerror(errno)); --- -1.7.11.4 - diff --git a/hypervkvpd-0-long_file_names_from_readdir.patch b/hypervkvpd-0-long_file_names_from_readdir.patch deleted file mode 100644 index 1f926a8..0000000 --- a/hypervkvpd-0-long_file_names_from_readdir.patch +++ /dev/null @@ -1,96 +0,0 @@ -From a3634ce7eb5fc77e22c0d3722fb30e32b0d7d9fa Mon Sep 17 00:00:00 2001 -From: Vitaly Kuznetsov -Date: Thu, 2 Jul 2015 17:21:02 +0200 -Subject: [PATCH] Tools: hv: Fix for long file names from readdir - -From: Tomas Hozza - -kvp_get_if_name and kvp_mac_to_if_name copy strings into statically -sized buffers which could be too small to store really long names. - -Buffer sizes have been increased and length checks added via snprintf. - -Signed-off-by: Vitaly Kuznetsov ---- - hv_kvp_daemon.c | 26 +++++++++----------------- - 1 file changed, 9 insertions(+), 17 deletions(-) - -diff --git a/hv_kvp_daemon.c b/hv_kvp_daemon.c -index 0d9f48e..ac89056 100644 ---- a/hv_kvp_daemon.c -+++ b/hv_kvp_daemon.c -@@ -42,6 +42,7 @@ - #include - #include - #include -+#include - #include - - /* -@@ -599,26 +600,22 @@ static char *kvp_get_if_name(char *guid) - DIR *dir; - struct dirent *entry; - FILE *file; -- char *p, *q, *x; -+ char *p, *x; - char *if_name = NULL; - char buf[256]; - char *kvp_net_dir = "/sys/class/net/"; -- char dev_id[256]; -+ char dev_id[PATH_MAX]; - - dir = opendir(kvp_net_dir); - if (dir == NULL) - return NULL; - -- snprintf(dev_id, sizeof(dev_id), "%s", kvp_net_dir); -- q = dev_id + strlen(kvp_net_dir); -- - while ((entry = readdir(dir)) != NULL) { - /* - * Set the state for the next pass. - */ -- *q = '\0'; -- strcat(dev_id, entry->d_name); -- strcat(dev_id, "/device/device_id"); -+ snprintf(dev_id, sizeof(dev_id), "%s%s/device/device_id", kvp_net_dir, -+ entry->d_name); - - file = fopen(dev_id, "r"); - if (file == NULL) -@@ -691,28 +688,23 @@ static char *kvp_mac_to_if_name(char *mac) - DIR *dir; - struct dirent *entry; - FILE *file; -- char *p, *q, *x; -+ char *p, *x; - char *if_name = NULL; - char buf[256]; - char *kvp_net_dir = "/sys/class/net/"; -- char dev_id[256]; -+ char dev_id[PATH_MAX]; - unsigned int i; - - dir = opendir(kvp_net_dir); - if (dir == NULL) - return NULL; - -- snprintf(dev_id, sizeof(dev_id), kvp_net_dir); -- q = dev_id + strlen(kvp_net_dir); -- - while ((entry = readdir(dir)) != NULL) { - /* - * Set the state for the next pass. - */ -- *q = '\0'; -- -- 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); - - file = fopen(dev_id, "r"); - if (file == NULL) --- -2.4.3 - diff --git a/sources b/sources index 96312a8..c414f2e 100644 --- a/sources +++ b/sources @@ -1,8 +1,8 @@ -SHA512 (hv_get_dhcp_info.sh) = 47e7a40e6acef9ead49f53e0fdfa97a11eb273642b9c1575f5d14da8124dc5d09dc81d0d4660f1ea8c49ce2b0dd7ec43d2796d37c4b3eb160c6b356fb8a815a4 +SHA512 (hv_get_dhcp_info.sh) = 4a9503f2a368cc078e00cdc7d3313d3e6f9c8e18c68e6b9ba0a1b6e4c8c0dbf8183d33158588097b275b7afba08d548187e27cdde05e3321065251389b1bdc63 SHA512 (hv_get_dns_info.sh) = 876effabea3ffe1daaa9c68dfa9b254d740003716f081aa524a1bdbd81724f744bd9dd900f2fdd94764d67584d3e853b26576aa8b53d6f6df94b12702a167428 -SHA512 (hv_kvp_daemon.c) = 261f6b8ed57bc1b3ead5c98e38b869712f1b37b6751006d37c780664994d1f3db30bdbc07d73090a00a015b51133609aa3704cbf89750e247116700ea3bf1234 -SHA512 (hv_set_ifconfig.sh) = 8fe9a21fd7af20173b421277a4fefec75465e577b64f5341951a5e71d0322898cda68d10f6ddb179bdb2d4bd0d6e5418ec131d4b63650b66f0cda69737152658 -SHA512 (hv_vss_daemon.c) = 9a91c5f9372b101871111c91fc498b6d1809ddedb74c035840270452a5f97d9bb385402631fa62488056fa00e4fdc5eec06a985a8fe4a9f6c1c780b7d2f4bbf8 -SHA512 (hv_fcopy_daemon.c) = 33ebd42a14fda8fa987d22243c6ff96b103697ea30cfed36e9abede451cf87b25140a6f2eba3829bb0db6fafa1e21269601816984d9904f2c843e2cfc035e010 +SHA512 (hv_kvp_daemon.c) = 28d7104f9971ea242196db4519c1e337b3ae1047c204d02cda9db8f984edc40b8c8369b5bff5c58a972c82df5821720a0b0dcc7a4626bdbb452ebaf8bc36b108 +SHA512 (hv_set_ifconfig.sh) = da6bbd90a265ebab7f63985c57ba8a19c1a9e3ca1e15f361663ec166c85647ecfb89e805a9b51134ebcd896b98a9dc4e2104665d3a0d2f3b5494e61cffbd8d86 +SHA512 (hv_vss_daemon.c) = 5010d6cc6f77676a996e4fd627d014b9f465fcd0d4b6b78e51941c36e56b5489f79c9bceb0f5922216357cf36d6e62918c5e1619bcff1ecbe4b8eb0cc8f8a771 +SHA512 (hv_fcopy_daemon.c) = 55f4f226c64c7cd62c1f95e0f5daa98cc18c1671d513c35d5072b25e1564114a99e6912732130d66b3805f25cc7fe1e167fbbb1d8fad8ba38fd559edd70260bc SHA512 (COPYING) = fbb1e0f29741e900a81ccbe76102103365423d310e9987dfc5858174999911037a9ad48270a3d0b86f245e91868ed73813ca273584be43816f53517858f3aabd -SHA512 (lsvmbus) = e4a686c4d07e5529eaf4de037a774ba3ae4a96a17e2972c41c740fbb017c58262c14d79c9e55088e9c7cf8205e9d10bb9da3f4918feec8d47418e8999a931031 +SHA512 (lsvmbus) = baeb2061b25075c6aea323005692672df4e8769ee77ee5984dafb1ea46e77e504dc194c9eaf2587b348f4abf52a74bc95c6298f79b2e880714434c8db81f55fd