commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2020-08-23 09:20:39 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new.3399 (New) Package is "hyper-v" Sun Aug 23 09:20:39 2020 rev:43 rq:828201 version:8 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2020-07-29 17:14:22.308254786 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new.3399/hyper-v.changes 2020-08-23 09:20:45.338671033 +0200 @@ -1,0 +2,8 @@ +Thu Aug 20 12:12:12 UTC 2020 - oher...@suse.de + +- Allow daemon restart again (bsc#1116957) + Since some time the kernel moved from netlink sockets to char + devices, which is supposed to handle a connection reopen for the + kernel<->daemon interface + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.0nUc07/_old 2020-08-23 09:20:46.654671762 +0200 +++ /var/tmp/diff_new_pack.0nUc07/_new 2020-08-23 09:20:46.654671762 +0200 @@ -135,12 +135,8 @@ [Service] Environment="PATH=%{helper_dir}/bin:/usr/sbin:/usr/bin:/sbin:/bin" -# Restart appears to work, but its unsupported -# Reboot required until kernel-user protocol is fixed -ExecStartPre=/usr/bin/mkdir /run/%{hv_kvp_daemon} ExecStart=${bindir}/%{hv_kvp_daemon} --no-daemon -ExecReload=/usr/bin/false -Restart=no +Restart=on-failure [Install] WantedBy=default.target @@ -153,12 +149,8 @@ ConditionVirtualization=microsoft [Service] -# Restart appears to work, but its unsupported -# Reboot required until kernel-user protocol is fixed -ExecStartPre=/usr/bin/mkdir /run/%{hv_vss_daemon} ExecStart=${bindir}/%{hv_vss_daemon} --no-daemon -ExecReload=/usr/bin/false -Restart=no +Restart=on-failure [Install] WantedBy=default.target @@ -172,6 +164,7 @@ [Service] ExecStart=${bindir}/%{hv_fcopy_daemon} --no-daemon +Restart=on-failure [Install] WantedBy=default.target
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2020-07-29 17:14:13 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new.3592 (New) Package is "hyper-v" Wed Jul 29 17:14:13 2020 rev:42 rq:822481 version:8 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2020-02-25 16:02:25.048107599 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new.3592/hyper-v.changes 2020-07-29 17:14:22.308254786 +0200 @@ -1,0 +2,14 @@ +Wed Jul 22 12:12:12 UTC 2020 - oher...@suse.de + +- Remove dependency to network-online.target now that gethostname + is used in kvp_daemon (bsc#1174443, bsc#117) +- Reopen the devices if read() or write() returns errors (9fc3c01a) +- Use either python2 or python3 for lsvmbus (bsc#1093910) +- Remove sysv init scripts + +--- +Wed Jul 22 09:12:44 UTC 2020 - Guillaume GARDET + +- Enable build on aarch64 + +--- Old: hyper-v.init.fcopy.sh hyper-v.init.sh hyper-v.init.vss.sh Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.oIz0gG/_old 2020-07-29 17:14:27.928259131 +0200 +++ /var/tmp/diff_new_pack.oIz0gG/_new 2020-07-29 17:14:27.928259131 +0200 @@ -22,20 +22,9 @@ %define helper_dir /usr/lib/%{name} Name: hyper-v -ExclusiveArch: %ix86 x86_64 -# systemd for post 13.1 releases -%if 0%{?suse_version} > 1310 -%define use_systemd 1 -%else -%define use_systemd 0 -%endif -%if %{use_systemd} +ExclusiveArch: %ix86 x86_64 aarch64 %{?systemd_requires} BuildRequires: pkgconfig(systemd) -%else -PreReq: %insserv_prereq -Requires(pre): coreutils -%endif # Due to usage of char device instead of netlink Conflicts: kernel < 4.2 Summary:Microsoft Hyper-V tools @@ -45,18 +34,15 @@ Supplements:modalias(pci:v1414d5353sv*sd*bc*sc*i*) Url:http://www.kernel.org # Arbitrary version number -Version:7 +Version:8 Release:0 Source0:hyper-v.lsvmbus.py Source5:hyper-v.kvptest.ps1.txt Source7:hyper-v.compare-with-upstream.sh Source9:hyper-v.include.linux.hyperv.h Source10: hyper-v.tools.hv.hv_kvp_daemon.c -Source11: hyper-v.init.sh Source12: hyper-v.tools.hv.hv_vss_daemon.c -Source13: hyper-v.init.vss.sh Source14: hyper-v.tools.hv.hv_fcopy_daemon.c -Source15: hyper-v.init.fcopy.sh Source20: hyper-v.tools.hv.hv_get_dhcp_info.sh Source21: hyper-v.tools.hv.hv_get_dns_info.sh Source22: hyper-v.tools.hv.hv_set_ifconfig.sh @@ -115,23 +101,28 @@ -o %{hv_fcopy_daemon} %install -%if %{use_systemd} # It is not a callable app anyway, so move it out of the way bindir=%{helper_dir}/bin -%else -bindir=%{_sbindir} -%endif mkdir -p $RPM_BUILD_ROOT${bindir} +mkdir -p $RPM_BUILD_ROOT%{_sbindir} mkdir -p $RPM_BUILD_ROOT%{helper_dir}/bin install -m755 %{hv_kvp_daemon} $RPM_BUILD_ROOT${bindir} install -m755 %{hv_vss_daemon} $RPM_BUILD_ROOT${bindir} install -m755 %{hv_fcopy_daemon} $RPM_BUILD_ROOT${bindir} -install -D -m755 %{S:0} $RPM_BUILD_ROOT%{_sbindir}/lsvmbus +sed ' +1 { +%if 0%{?suse_version} > 1315 +s@^.*@#!%{_bindir}/python3@ +%else +s@^.*@#!%{_bindir}/python2@ +%endif +} +' %{S:0} > $RPM_BUILD_ROOT%{_sbindir}/lsvmbus +chmod 0755 $RPM_BUILD_ROOT%{_sbindir}/lsvmbus cp -avL %{S:20} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_get_dhcp_info cp -avL %{S:21} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_get_dns_info cp -avL %{S:22} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_set_ifconfig chmod 755 $RPM_BUILD_ROOT%{helper_dir}/bin/* -%if %{use_systemd} d=$RPM_BUILD_ROOT%{_unitdir} mkdir -vp ${d} # @@ -139,9 +130,7 @@ # started via %{_udevrulesdir}/%{hv_kvp_daemon}.rules [Unit] Description=Hyper-V KVP Daemon -# During startup the current hostname is cached, so start very late -Requires=network-online.target -After=network-online.target +After=local-fs.target ConditionVirtualization=microsoft [Service] @@ -228,25 +217,12 @@ EOF chmod 755 $RPM_BUILD_ROOT${bindir}/${helper} # -%else -mkdir -p $RPM_BUILD_ROOT/etc/init.d -install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon} -ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT${bindir}/rc%{hv_kvp_daemon} -install -m755 %{S:13} $RPM_BUILD_ROOT/etc/init.d/%{hv_vss_daemon} -ln -sfvbn ../../etc/init.d/%{hv_vss_daemon} $RPM_BUILD_ROOT${bindir}/rc%{hv_vss_daemon} -install -m755 %{S:15} $RPM_BUILD_ROOT/etc/init.d/%{hv_fcopy_daemon} -ln -sfvbn ../../etc/init.d/%{hv_fcopy_daemon} $RPM_BUILD_ROOT${bindir}/rc%{hv_fcopy_daemon} -%endif %files %doc kvptest.ps1.txt
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2020-02-25 16:01:50 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new.26092 (New) Package is "hyper-v" Tue Feb 25 16:01:50 2020 rev:41 rq:42 version:7 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2019-12-02 11:38:07.370457923 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new.26092/hyper-v.changes 2020-02-25 16:02:25.048107599 +0100 @@ -1,0 +2,6 @@ +Thu Feb 20 16:16:16 UTC 2020 - oher...@suse.de + +- Revert previous non-upstream change for async name resolution + Just use gethostname via hyper-v.kvp.gethostname.patch (bsc#1100758) + +--- New: hyper-v.kvp.gethostname.patch Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.SC5hrn/_old 2020-02-25 16:02:27.504113521 +0100 +++ /var/tmp/diff_new_pack.SC5hrn/_new 2020-02-25 16:02:27.508113531 +0100 @@ -61,7 +61,7 @@ Source21: hyper-v.tools.hv.hv_get_dns_info.sh Source22: hyper-v.tools.hv.hv_set_ifconfig.sh -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Patch0: hyper-v.kvp.gethostname.patch %description This package contains the Microsoft Hyper-V tools. @@ -70,9 +70,11 @@ %setup -Tc cp -avL %{S:5} kvptest.ps1.txt cp -vL %{S:9} %{hv_kvp_daemon}.h -cp -vL %{S:10} %{hv_kvp_daemon}.c +cp -vL %{S:10} . cp -vL %{S:12} %{hv_vss_daemon}.c cp -vL %{S:14} %{hv_fcopy_daemon}.c +%patch0 -p1 +mv `basename %{S:10}` %{hv_kvp_daemon}.c %build sed -i~ '/#include /d' %{hv_kvp_daemon}.c @@ -237,7 +239,6 @@ %endif %files -%defattr (-,root,root) %doc kvptest.ps1.txt %if %{use_systemd} %{_unitdir} ++ hyper-v.kvp.gethostname.patch ++ --- a/hyper-v.tools.hv.hv_kvp_daemon.c +++ b/hyper-v.tools.hv.hv_kvp_daemon.c @@ -1335,6 +1335,7 @@ kvp_get_domain_name(char *buffer, int le struct addrinfo hints, *info ; int error = 0; + return; gethostname(buffer, length); memset(, 0, sizeof(hints)); hints.ai_family = AF_INET; /*Get only ipv4 addrinfo. */ @@ -1572,6 +1573,12 @@ int main(int argc, char *argv[]) switch (hv_msg->body.kvp_enum_data.index) { case FullyQualifiedDomainName: + /* +* The API is undocumented. +* The Host can not possibly care about DNS within the guest network +* The time it takes to get the hostname is much shorter than a DNS lookup. +*/ + gethostname(full_domain_name, sizeof(full_domain_name)); strcpy(key_value, full_domain_name); strcpy(key_name, "FullyQualifiedDomainName"); break; ++ hyper-v.tools.hv.hv_kvp_daemon.c ++ --- /var/tmp/diff_new_pack.SC5hrn/_old 2020-02-25 16:02:27.608113771 +0100 +++ /var/tmp/diff_new_pack.SC5hrn/_new 2020-02-25 16:02:27.608113771 +0100 @@ -41,7 +41,6 @@ #include #include #include -#include /* * KVP protocol: The user mode component first registers with the @@ -86,7 +85,7 @@ static char *os_build; static char *os_version; static char *lic_version = "Unknown version"; -static char *full_domain_name; +static char full_domain_name[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; static struct utsname uts_buf; /* @@ -1329,76 +1328,27 @@ return error; } -/* - * Async retrival of Fully Qualified Domain Name because getaddrinfo takes an - * unpredictable amount of time to finish. - */ -static void *kvp_getaddrinfo(void *p) -{ - char *tmp, **str_ptr = (char **)p; - char hostname[HOST_NAME_MAX + 1]; - struct addrinfo *info, hints = { - .ai_family = AF_INET, /* Get only ipv4 addrinfo. */ - .ai_socktype = SOCK_STREAM, - .ai_flags = AI_CANONNAME, - }; - int ret; - int prev_ret = 0, cnt = 5; - - do { - if (gethostname(hostname, sizeof(hostname) - 1) < 0) - goto out; - - ret = getaddrinfo(hostname, NULL, , ); - switch (ret) { - case 0: - break; - case EAI_BADFLAGS: - case EAI_MEMORY: - case EAI_OVERFLOW: - case EAI_SOCKTYPE: - case EAI_SYSTEM: - /* Permanent failure */ - syslog(LOG_ERR, "getaddrinfo failed: %d %s", - ret, gai_strerror(ret)); - goto out; - default: - /* runtime
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2019-12-02 11:33:37 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new.4691 (New) Package is "hyper-v" Mon Dec 2 11:33:37 2019 rev:40 rq:752453 version:7 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2018-10-11 11:40:24.519171988 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new.4691/hyper-v.changes 2019-12-02 11:38:07.370457923 +0100 @@ -1,0 +2,16 @@ +Fri Nov 29 16:41:25 UTC 2019 - oher...@suse.de + +- Update lsvmbus interpreter from python(1) to python3(1) again + because only SLE12 lacked proper python3 support (bsc#1093910) + +--- +Wed Nov 27 09:08:07 UTC 2019 - oher...@suse.de + +- async name resolution in kvp_daemon (bsc#1100758) +- kvp: eliminate 'may be used uninitialized' warning (89eb4d8d) +- fix typos in toolchain (2d35c660) +- fixed Python pep8/flake8 warnings for lsvmbus (5912e791) +- Replace GPLv2 boilerplate/reference with SPDX (43aa3132) +- Fix a warning of buffer overflow with gcc 8.0.1 (4fcba780) + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.DRDJCE/_old 2019-12-02 11:38:07.910458036 +0100 +++ /var/tmp/diff_new_pack.DRDJCE/_new 2019-12-02 11:38:07.910458036 +0100 @@ -89,6 +89,7 @@ -DCN_KVP_IDX=0x9 \ -DCN_KVP_VAL=0x1 \ -DKVP_SCRIPTS_PATH= \ + -pthread \ -o %{hv_kvp_daemon} gcc \ $RPM_OPT_FLAGS \ ++ hyper-v.lsvmbus.py ++ --- /var/tmp/diff_new_pack.DRDJCE/_old 2019-12-02 11:38:07.982458052 +0100 +++ /var/tmp/diff_new_pack.DRDJCE/_new 2019-12-02 11:38:07.986458052 +0100 @@ -1,13 +1,13 @@ -#!/usr/bin/python +#!/usr/bin/python3 # SPDX-License-Identifier: GPL-2.0 import os from optparse import OptionParser +help_msg = "print verbose messages. Try -vv, -vvv for more verbose messages" parser = OptionParser() -parser.add_option("-v", "--verbose", dest="verbose", - help="print verbose messages. Try -vv, -vvv for \ - more verbose messages", action="count") +parser.add_option( + "-v", "--verbose", dest="verbose", help=help_msg, action="count") (options, args) = parser.parse_args() @@ -21,27 +21,28 @@ exit(-1) vmbus_dev_dict = { - '{0e0b6031-5213-4934-818b-38d90ced39db}' : '[Operating system shutdown]', - '{9527e630-d0ae-497b-adce-e80ab0175caf}' : '[Time Synchronization]', - '{57164f39-9115-4e78-ab55-382f3bd5422d}' : '[Heartbeat]', - '{a9a0f4e7-5a45-4d96-b827-8a841e8c03e6}' : '[Data Exchange]', - '{35fa2e29-ea23-4236-96ae-3a6ebacba440}' : '[Backup (volume checkpoint)]', - '{34d14be3-dee4-41c8-9ae7-6b174977c192}' : '[Guest services]', - '{525074dc-8985-46e2-8057-a307dc18a502}' : '[Dynamic Memory]', - '{cfa8b69e-5b4a-4cc0-b98b-8ba1a1f3f95a}' : 'Synthetic mouse', - '{f912ad6d-2b17-48ea-bd65-f927a61c7684}' : 'Synthetic keyboard', - '{da0a7802-e377-4aac-8e77-0558eb1073f8}' : 'Synthetic framebuffer adapter', - '{f8615163-df3e-46c5-913f-f2d2f965ed0e}' : 'Synthetic network adapter', - '{32412632-86cb-44a2-9b5c-50d1417354f5}' : 'Synthetic IDE Controller', - '{ba6163d9-04a1-4d29-b605-72e2ffb1dc7f}' : 'Synthetic SCSI Controller', - '{2f9bcc4a-0069-4af3-b76b-6fd0be528cda}' : 'Synthetic fiber channel adapter', - '{8c2eaf3d-32a7-4b09-ab99-bd1f1c86b501}' : 'Synthetic RDMA adapter', - '{44c4f61d--4400-9d52-802e27ede19f}' : 'PCI Express pass-through', - '{276aacf4-ac15-426c-98dd-7521ad3f01fe}' : '[Reserved system device]', - '{f8e65716-3cb3-4a06-9a60-1889c5cccab5}' : '[Reserved system device]', - '{3375baf4-9e15-4b30-b765-67acb10d607b}' : '[Reserved system device]', + '{0e0b6031-5213-4934-818b-38d90ced39db}': '[Operating system shutdown]', + '{9527e630-d0ae-497b-adce-e80ab0175caf}': '[Time Synchronization]', + '{57164f39-9115-4e78-ab55-382f3bd5422d}': '[Heartbeat]', + '{a9a0f4e7-5a45-4d96-b827-8a841e8c03e6}': '[Data Exchange]', + '{35fa2e29-ea23-4236-96ae-3a6ebacba440}': '[Backup (volume checkpoint)]', + '{34d14be3-dee4-41c8-9ae7-6b174977c192}': '[Guest services]', + '{525074dc-8985-46e2-8057-a307dc18a502}': '[Dynamic Memory]', + '{cfa8b69e-5b4a-4cc0-b98b-8ba1a1f3f95a}': 'Synthetic mouse', + '{f912ad6d-2b17-48ea-bd65-f927a61c7684}': 'Synthetic keyboard', + '{da0a7802-e377-4aac-8e77-0558eb1073f8}': 'Synthetic framebuffer adapter', + '{f8615163-df3e-46c5-913f-f2d2f965ed0e}': 'Synthetic network adapter', +
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2018-10-11 11:40:20 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is "hyper-v" Thu Oct 11 11:40:20 2018 rev:39 rq:640773 version:7 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2018-08-17 23:57:01.665810570 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2018-10-11 11:40:24.519171988 +0200 @@ -1,0 +2,20 @@ +Tue Oct 9 09:27:45 UTC 2018 - oher...@suse.de + +- fcopy: set 'error' in case an unknown operation was requested (c2d68afb) + +--- +Mon Oct 8 06:48:04 UTC 2018 - oher...@suse.de + +- Update lsvmbus interpreter from python3(1) to python(1) + because SLE12 lacks python3 support (bsc#1093910) + +--- +Tue Sep 25 08:33:36 UTC 2018 - oher...@suse.de + +- vss: fix loop device detection (07136793) +- Fix IP reporting by KVP daemon with SRIOV (4ba63412) +- Fix a bug in the key delete code (86503bd3) +- fix compiler warnings about major/target_fname (1330fc35) +- PRIVATE hyper-v.compare-with-upstream.sh + +--- New: hyper-v.compare-with-upstream.sh Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.d7BJCw/_old 2018-10-11 11:40:25.291171005 +0200 +++ /var/tmp/diff_new_pack.d7BJCw/_new 2018-10-11 11:40:25.295171000 +0200 @@ -49,6 +49,7 @@ Release:0 Source0:hyper-v.lsvmbus.py Source5:hyper-v.kvptest.ps1.txt +Source7:hyper-v.compare-with-upstream.sh Source9:hyper-v.include.linux.hyperv.h Source10: hyper-v.tools.hv.hv_kvp_daemon.c Source11: hyper-v.init.sh ++ hyper-v.compare-with-upstream.sh ++ d=~/work/src/kernel/kerncvs.kernel.master diff -u hyper-v.tools.hv.hv_vss_daemon.c ${d}/tools/hv/hv_vss_daemon.c diff -u hyper-v.tools.hv.hv_kvp_daemon.c ${d}/tools/hv/hv_kvp_daemon.c diff -u hyper-v.tools.hv.hv_fcopy_daemon.c ${d}/tools/hv/hv_fcopy_daemon.c diff -u hyper-v.include.linux.hyperv.h ${d}/include/uapi/linux/hyperv.h diff -u hyper-v.lsvmbus.py ${d}/tools/hv/lsvmbus ++ hyper-v.lsvmbus.py ++ --- /var/tmp/diff_new_pack.d7BJCw/_old 2018-10-11 11:40:25.379170893 +0200 +++ /var/tmp/diff_new_pack.d7BJCw/_new 2018-10-11 11:40:25.379170893 +0200 @@ -1,4 +1,5 @@ -#!/usr/bin/python3 +#!/usr/bin/python +# SPDX-License-Identifier: GPL-2.0 import os from optparse import OptionParser ++ hyper-v.tools.hv.hv_fcopy_daemon.c ++ --- /var/tmp/diff_new_pack.d7BJCw/_old 2018-10-11 11:40:25.391170878 +0200 +++ /var/tmp/diff_new_pack.d7BJCw/_new 2018-10-11 11:40:25.391170878 +0200 @@ -24,13 +24,14 @@ #include #include #include +#include #include #include #include #include static int target_fd; -static char target_fname[W_MAX_PATH]; +static char target_fname[PATH_MAX]; static unsigned long long filesize; static int hv_start_fcopy(struct hv_start_fcopy *smsg) @@ -233,6 +234,7 @@ break; default: + error = HV_E_FAIL; syslog(LOG_ERR, "Unknown operation: %d", buffer.hdr.operation); ++ hyper-v.tools.hv.hv_kvp_daemon.c ++ --- /var/tmp/diff_new_pack.d7BJCw/_old 2018-10-11 11:40:25.423170836 +0200 +++ /var/tmp/diff_new_pack.d7BJCw/_new 2018-10-11 11:40:25.423170836 +0200 @@ -286,7 +286,7 @@ * Found a match; just move the remaining * entries up. */ - if (i == num_records) { + if (i == (num_records - 1)) { kvp_file_info[pool].num_records--; kvp_update_file(pool); return 0; @@ -634,64 +634,6 @@ return mac_addr; } - -/* - * Retrieve the interface name given tha MAC address. - */ - -static char *kvp_mac_to_if_name(char *mac) -{ - DIR *dir; - struct dirent *entry; - FILE*file; - char*p, *x; - char*if_name = NULL; - charbuf[256]; - char dev_id[PATH_MAX]; - unsigned int i; - - dir = opendir(KVP_NET_DIR); - if (dir == NULL) - return NULL; - - while ((entry = readdir(dir)) != NULL) { - /* -* Set the state for the next pass. -*/ - snprintf(dev_id, sizeof(dev_id), "%s%s/address", KVP_NET_DIR, -entry->d_name); - - file = fopen(dev_id, "r"); - if (file == NULL) -
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2018-08-17 23:57:00 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is "hyper-v" Fri Aug 17 23:57:00 2018 rev:38 rq:628366 version:7 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2018-05-25 21:36:27.149840695 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2018-08-17 23:57:01.665810570 +0200 @@ -1,0 +2,5 @@ +Thu Aug 2 08:46:52 UTC 2018 - sch...@suse.de + +- hyper-v.tools.hv.hv_vss_daemon.c: Include for major + +--- Other differences: -- ++ hyper-v.tools.hv.hv_vss_daemon.c ++ --- /var/tmp/diff_new_pack.deF7VZ/_old 2018-08-17 23:57:02.277812387 +0200 +++ /var/tmp/diff_new_pack.deF7VZ/_new 2018-08-17 23:57:02.277812387 +0200 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2018-05-25 21:36:14 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is "hyper-v" Fri May 25 21:36:14 2018 rev:37 rq:611145 version:7 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2018-04-05 15:27:10.553838943 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2018-05-25 21:36:27.149840695 +0200 @@ -1,0 +2,5 @@ +Tue May 22 06:56:57 UTC 2018 - oher...@suse.de + +- Update lsvmbus interpreter from env(1) to python3(1) (bsc#1093910) + +--- Other differences: -- ++ hyper-v.lsvmbus.py ++ --- /var/tmp/diff_new_pack.gjQtxR/_old 2018-05-25 21:36:29.093770335 +0200 +++ /var/tmp/diff_new_pack.gjQtxR/_new 2018-05-25 21:36:29.105769900 +0200 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 import os from optparse import OptionParser @@ -16,7 +16,7 @@ vmbus_sys_path = '/sys/bus/vmbus/devices' if not os.path.isdir(vmbus_sys_path): - print "%s doesn't exist: exiting..." % vmbus_sys_path + print("%s doesn't exist: exiting..." % vmbus_sys_path) exit(-1) vmbus_dev_dict = { @@ -92,11 +92,11 @@ for d in vmbus_dev_list: if verbose == 0: - print ('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc) + print(('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc)) elif verbose == 1: - print ('VMBUS ID ' + format1) % \ - (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping) + print (('VMBUS ID ' + format1) %\ + (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping)) else: - print ('VMBUS ID ' + format2) % \ + print (('VMBUS ID ' + format2) % \ (d.vmbus_id, d.class_id, d.dev_desc, \ - d.device_id, d.sysfs_path, d.chn_vp_mapping) + d.device_id, d.sysfs_path, d.chn_vp_mapping))
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2018-04-05 15:27:06 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is "hyper-v" Thu Apr 5 15:27:06 2018 rev:36 rq:593085 version:7 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2018-01-16 09:30:55.817812156 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2018-04-05 15:27:10.553838943 +0200 @@ -6 +6 @@ -- Avoid reading past allocated blocks from KVP file +- Avoid reading past allocated blocks from KVP file (bnc#1087658) Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.9hlNVe/_old 2018-04-05 15:27:11.261813352 +0200 +++ /var/tmp/diff_new_pack.9hlNVe/_new 2018-04-05 15:27:11.265813208 +0200 @@ -39,7 +39,7 @@ # Due to usage of char device instead of netlink Conflicts: kernel < 4.2 Summary:Microsoft Hyper-V tools -License:GPL-2.0 +License:GPL-2.0-only Group: System/Kernel Supplements: modalias(dmi:*svnMicrosoftCorporation*pnVirtualMachine*rnVirtualMachine*) Supplements:modalias(pci:v1414d5353sv*sd*bc*sc*i*)
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2018-01-16 09:30:54 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is "hyper-v" Tue Jan 16 09:30:54 2018 rev:35 rq:562485 version:7 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2017-07-02 13:37:43.454902586 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2018-01-16 09:30:55.817812156 +0100 @@ -1,0 +2,12 @@ +Mon Jan 8 10:45:35 UTC 2018 - oher...@suse.de + +- update buffer handling in hv_fcopy_daemon +- remove unnecessary header files and netlink related code +- Avoid reading past allocated blocks from KVP file +- fix snprintf warning in kvp_daemon +- properly handle long paths +- kvp: configurable external scripts path +- vss: Thaw the filesystem and continue if freeze call has timed out +- vss: Skip freezing filesystems backed by loop + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.w7hB4b/_old 2018-01-16 09:30:56.925760319 +0100 +++ /var/tmp/diff_new_pack.w7hB4b/_new 2018-01-16 09:30:56.929760131 +0100 @@ -1,7 +1,7 @@ # # spec file for package hyper-v # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -87,6 +87,7 @@ -include %{hv_kvp_daemon}.h \ -DCN_KVP_IDX=0x9 \ -DCN_KVP_VAL=0x1 \ + -DKVP_SCRIPTS_PATH= \ -o %{hv_kvp_daemon} gcc \ $RPM_OPT_FLAGS \ @@ -130,7 +131,7 @@ d=$RPM_BUILD_ROOT%{_unitdir} mkdir -vp ${d} # -cat > ${d}/%{hv_kvp_daemon}.service < ${d}/%{hv_vss_daemon}.service < ${d}/%{hv_fcopy_daemon}.service < ${d}/%{hv_kvp_daemon}.rules < ${d}/%{hv_vss_daemon}.rules < ${d}/%{hv_fcopy_daemon}.rules < $RPM_BUILD_ROOT${bindir}/${helper} < -#include -#include -#include -#include #include #include #include #include -#include #include #include #include #include #include -#include #include static int target_fd; @@ -145,14 +139,17 @@ int main(int argc, char *argv[]) { - int fcopy_fd, len; + int fcopy_fd; int error; int daemonize = 1, long_index = 0, opt; int version = FCOPY_CURRENT_VERSION; - char *buffer[4096 * 2]; - struct hv_fcopy_hdr *in_msg; + union { + struct hv_fcopy_hdr hdr; + struct hv_start_fcopy start; + struct hv_do_fcopy copy; + __u32 kernel_modver; + } buffer = { }; int in_handshake = 1; - __u32 kernel_modver; static struct option long_options[] = { {"help",no_argument, 0, 'h' }, @@ -202,32 +199,31 @@ * In this loop we process fcopy messages after the * handshake is complete. */ - len = pread(fcopy_fd, buffer, (4096 * 2), 0); + ssize_t len; + + len = pread(fcopy_fd, , sizeof(buffer), 0); if (len < 0) { syslog(LOG_ERR, "pread failed: %s", strerror(errno)); exit(EXIT_FAILURE); } if (in_handshake) { - if (len != sizeof(kernel_modver)) { + if (len != sizeof(buffer.kernel_modver)) { syslog(LOG_ERR, "invalid version negotiation"); exit(EXIT_FAILURE); } - kernel_modver = *(__u32 *)buffer; in_handshake = 0; - syslog(LOG_INFO, "kernel module version: %d", - kernel_modver); + syslog(LOG_INFO, "kernel module version: %u", + buffer.kernel_modver); continue; } - in_msg = (struct hv_fcopy_hdr *)buffer; - - switch (in_msg->operation) { + switch (buffer.hdr.operation) { case START_FILE_COPY: - error = hv_start_fcopy((struct hv_start_fcopy *)in_msg); + error = hv_start_fcopy(); break; case WRITE_TO_FILE: - error = hv_copy_data((struct hv_do_fcopy *)in_msg); + error = hv_copy_data(); break; case COMPLETE_FCOPY: error =
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2017-07-02 13:37:42 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is "hyper-v" Sun Jul 2 13:37:42 2017 rev:34 rq:506781 version:7 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2017-06-07 09:50:25.725033439 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2017-07-02 13:37:43.454902586 +0200 @@ -1,0 +2,8 @@ +Wed Jun 28 12:04:38 UTC 2017 - oher...@suse.de + +- Check VSS daemon is listening before a hot backup (bnc#1029693) +- fix a compile warning in snprintf +- kvp: ensure kvp device fd is closed on exec +- lsvmbus: add pci pass-through UUID + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.wA0fDW/_old 2017-07-02 13:37:44.854705192 +0200 +++ /var/tmp/diff_new_pack.wA0fDW/_new 2017-07-02 13:37:44.858704628 +0200 @@ -1,7 +1,7 @@ # # spec file for package hyper-v # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed ++ hyper-v.lsvmbus.py ++ --- /var/tmp/diff_new_pack.wA0fDW/_old 2017-07-02 13:37:44.954691092 +0200 +++ /var/tmp/diff_new_pack.wA0fDW/_new 2017-07-02 13:37:44.954691092 +0200 @@ -35,6 +35,7 @@ '{ba6163d9-04a1-4d29-b605-72e2ffb1dc7f}' : 'Synthetic SCSI Controller', '{2f9bcc4a-0069-4af3-b76b-6fd0be528cda}' : 'Synthetic fiber channel adapter', '{8c2eaf3d-32a7-4b09-ab99-bd1f1c86b501}' : 'Synthetic RDMA adapter', + '{44c4f61d--4400-9d52-802e27ede19f}' : 'PCI Express pass-through', '{276aacf4-ac15-426c-98dd-7521ad3f01fe}' : '[Reserved system device]', '{f8e65716-3cb3-4a06-9a60-1889c5cccab5}' : '[Reserved system device]', '{3375baf4-9e15-4b30-b765-67acb10d607b}' : '[Reserved system device]', ++ hyper-v.tools.hv.hv_kvp_daemon.c ++ --- /var/tmp/diff_new_pack.wA0fDW/_old 2017-07-02 13:37:45.014682633 +0200 +++ /var/tmp/diff_new_pack.wA0fDW/_new 2017-07-02 13:37:45.014682633 +0200 @@ -702,7 +702,7 @@ if (dir == NULL) return NULL; - snprintf(dev_id, sizeof(dev_id), kvp_net_dir); + snprintf(dev_id, sizeof(dev_id), "%s", kvp_net_dir); q = dev_id + strlen(kvp_net_dir); while ((entry = readdir(dir)) != NULL) { @@ -1434,7 +1434,7 @@ openlog("KVP", 0, LOG_USER); syslog(LOG_INFO, "KVP starting; pid is:%d", getpid()); - kvp_fd = open("/dev/vmbus/hv_kvp", O_RDWR); + kvp_fd = open("/dev/vmbus/hv_kvp", O_RDWR | O_CLOEXEC); if (kvp_fd < 0) { syslog(LOG_ERR, "open /dev/vmbus/hv_kvp failed; error: %d %s", ++ hyper-v.tools.hv.hv_vss_daemon.c ++ --- /var/tmp/diff_new_pack.wA0fDW/_old 2017-07-02 13:37:45.046678121 +0200 +++ /var/tmp/diff_new_pack.wA0fDW/_new 2017-07-02 13:37:45.050677557 +0200 @@ -250,6 +250,9 @@ syslog(LOG_ERR, "/etc/fstab and /proc/mounts"); } break; + case VSS_OP_HOT_BACKUP: + syslog(LOG_INFO, "VSS: op=CHECK HOT BACKUP\n"); + break; default: syslog(LOG_ERR, "Illegal op:%d\n", op); }
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2017-06-07 09:50:24 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is "hyper-v" Wed Jun 7 09:50:24 2017 rev:33 rq:498992 version:7 Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2015-10-03 20:29:47.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2017-06-07 09:50:25.725033439 +0200 @@ -1,0 +2,12 @@ +Wed May 4 13:29:54 UTC 2016 - oher...@suse.de + +- add Conflicts with kernel < 4.2 (fate#320485) +- vss: fix the write()'s argument: error -> vss_msg +- remove repeated HV_FCOPY string +- report ENOSPC errors in hv_fcopy_daemon +- fcopy: full handshake support +- vss: full handshake support +- vss: use misc char device to communicate with kernel +- kvp: use misc char device to communicate with kernel + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.OMl4qu/_old 2017-06-07 09:50:28.780601617 +0200 +++ /var/tmp/diff_new_pack.OMl4qu/_new 2017-06-07 09:50:28.784601051 +0200 @@ -1,7 +1,7 @@ # # spec file for package hyper-v # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -36,6 +36,8 @@ PreReq: %insserv_prereq Requires(pre): coreutils %endif +# Due to usage of char device instead of netlink +Conflicts: kernel < 4.2 Summary:Microsoft Hyper-V tools License:GPL-2.0 Group: System/Kernel @@ -43,7 +45,7 @@ Supplements:modalias(pci:v1414d5353sv*sd*bc*sc*i*) Url:http://www.kernel.org # Arbitrary version number -Version:6 +Version:7 Release:0 Source0:hyper-v.lsvmbus.py Source5:hyper-v.kvptest.ps1.txt @@ -187,10 +189,10 @@ d=$RPM_BUILD_ROOT%{_udevrulesdir} mkdir -vp ${d} cat > ${d}/%{hv_kvp_daemon}.rules < ${d}/%{hv_vss_daemon}.rules < ${d}/%{hv_fcopy_daemon}.rulespath_name, (char *)smsg->file_name); @@ -98,14 +100,26 @@ static int hv_copy_data(struct hv_do_fcopy *cpmsg) { ssize_t bytes_written; + int ret = 0; bytes_written = pwrite(target_fd, cpmsg->data, cpmsg->size, cpmsg->offset); - if (bytes_written != cpmsg->size) - return HV_E_FAIL; + filesize += cpmsg->size; + if (bytes_written != cpmsg->size) { + switch (errno) { + case ENOSPC: + ret = HV_ERROR_DISK_FULL; + break; + default: + ret = HV_E_FAIL; + break; + } + syslog(LOG_ERR, "pwrite failed to write %llu bytes: %ld (%s)", + filesize, (long)bytes_written, strerror(errno)); + } - return 0; + return ret; } static int hv_copy_finished(void) @@ -137,6 +151,8 @@ int version = FCOPY_CURRENT_VERSION; char *buffer[4096 * 2]; struct hv_fcopy_hdr *in_msg; + int in_handshake = 1; + __u32 kernel_modver; static struct option long_options[] = { {"help",no_argument, 0, 'h' }, @@ -163,7 +179,7 @@ } openlog("HV_FCOPY", 0, LOG_USER); - syslog(LOG_INFO, "HV_FCOPY starting; pid is:%d", getpid()); + syslog(LOG_INFO, "starting; pid is:%d", getpid()); fcopy_fd = open("/dev/vmbus/hv_fcopy", O_RDWR); @@ -191,6 +207,19 @@ syslog(LOG_ERR, "pread failed: %s", strerror(errno)); exit(EXIT_FAILURE); } + + if (in_handshake) { + if (len != sizeof(kernel_modver)) { + syslog(LOG_ERR, "invalid version negotiation"); + exit(EXIT_FAILURE); + } + kernel_modver = *(__u32 *)buffer; + in_handshake = 0; + syslog(LOG_INFO, "kernel module version: %d", + kernel_modver); + continue; + } + in_msg = (struct hv_fcopy_hdr *)buffer; switch (in_msg->operation) { ++ hyper-v.tools.hv.hv_kvp_daemon.c ++ --- /var/tmp/diff_new_pack.OMl4qu/_old 2017-06-07
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2015-10-03 20:29:39 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is "hyper-v" Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2015-05-10 10:55:57.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2015-10-03 20:29:47.0 +0200 @@ -1,0 +2,5 @@ +Fri Sep 18 10:11:01 UTC 2015 - oher...@suse.de + +- add a python script lsvmbus to list VMBus devices (fate#315887) + +--- New: hyper-v.lsvmbus.py Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.YRnzXk/_old 2015-10-03 20:29:48.0 +0200 +++ /var/tmp/diff_new_pack.YRnzXk/_new 2015-10-03 20:29:48.0 +0200 @@ -45,6 +45,7 @@ # Arbitrary version number Version:6 Release:0 +Source0:hyper-v.lsvmbus.py Source5:hyper-v.kvptest.ps1.txt Source9:hyper-v.include.linux.hyperv.h Source10: hyper-v.tools.hv.hv_kvp_daemon.c @@ -111,13 +112,14 @@ # It is not a callable app anyway, so move it out of the way bindir=%{helper_dir}/bin %else -bindir=/usr/sbin +bindir=%{_sbindir} %endif mkdir -p $RPM_BUILD_ROOT${bindir} mkdir -p $RPM_BUILD_ROOT%{helper_dir}/bin install -m755 %{hv_kvp_daemon} $RPM_BUILD_ROOT${bindir} install -m755 %{hv_vss_daemon} $RPM_BUILD_ROOT${bindir} install -m755 %{hv_fcopy_daemon} $RPM_BUILD_ROOT${bindir} +install -D -m755 %{S:0} $RPM_BUILD_ROOT%{_sbindir}/lsvmbus cp -avL %{S:20} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_get_dhcp_info cp -avL %{S:21} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_get_dns_info cp -avL %{S:22} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_set_ifconfig @@ -241,8 +243,8 @@ %{_udevrulesdir} %else /etc/init.d/* -/usr/sbin/* %endif +%{_sbindir}/* %{helper_dir} %pre ++ hyper-v.lsvmbus.py ++ #!/usr/bin/env python import os from optparse import OptionParser parser = OptionParser() parser.add_option("-v", "--verbose", dest="verbose", help="print verbose messages. Try -vv, -vvv for \ more verbose messages", action="count") (options, args) = parser.parse_args() verbose = 0 if options.verbose is not None: verbose = options.verbose vmbus_sys_path = '/sys/bus/vmbus/devices' if not os.path.isdir(vmbus_sys_path): print "%s doesn't exist: exiting..." % vmbus_sys_path exit(-1) vmbus_dev_dict = { '{0e0b6031-5213-4934-818b-38d90ced39db}' : '[Operating system shutdown]', '{9527e630-d0ae-497b-adce-e80ab0175caf}' : '[Time Synchronization]', '{57164f39-9115-4e78-ab55-382f3bd5422d}' : '[Heartbeat]', '{a9a0f4e7-5a45-4d96-b827-8a841e8c03e6}' : '[Data Exchange]', '{35fa2e29-ea23-4236-96ae-3a6ebacba440}' : '[Backup (volume checkpoint)]', '{34d14be3-dee4-41c8-9ae7-6b174977c192}' : '[Guest services]', '{525074dc-8985-46e2-8057-a307dc18a502}' : '[Dynamic Memory]', '{cfa8b69e-5b4a-4cc0-b98b-8ba1a1f3f95a}' : 'Synthetic mouse', '{f912ad6d-2b17-48ea-bd65-f927a61c7684}' : 'Synthetic keyboard', '{da0a7802-e377-4aac-8e77-0558eb1073f8}' : 'Synthetic framebuffer adapter', '{f8615163-df3e-46c5-913f-f2d2f965ed0e}' : 'Synthetic network adapter', '{32412632-86cb-44a2-9b5c-50d1417354f5}' : 'Synthetic IDE Controller', '{ba6163d9-04a1-4d29-b605-72e2ffb1dc7f}' : 'Synthetic SCSI Controller', '{2f9bcc4a-0069-4af3-b76b-6fd0be528cda}' : 'Synthetic fiber channel adapter', '{8c2eaf3d-32a7-4b09-ab99-bd1f1c86b501}' : 'Synthetic RDMA adapter', '{276aacf4-ac15-426c-98dd-7521ad3f01fe}' : '[Reserved system device]', '{f8e65716-3cb3-4a06-9a60-1889c5cccab5}' : '[Reserved system device]', '{3375baf4-9e15-4b30-b765-67acb10d607b}' : '[Reserved system device]', } def get_vmbus_dev_attr(dev_name, attr): try: f = open('%s/%s/%s' % (vmbus_sys_path, dev_name, attr), 'r') lines = f.readlines() f.close() except IOError: lines = [] return lines class VMBus_Dev: pass vmbus_dev_list = [] for f in os.listdir(vmbus_sys_path): vmbus_id = get_vmbus_dev_attr(f, 'id')[0].strip() class_id = get_vmbus_dev_attr(f, 'class_id')[0].strip() device_id = get_vmbus_dev_attr(f, 'device_id')[0].strip() dev_desc = vmbus_dev_dict.get(class_id, 'Unknown') chn_vp_mapping = get_vmbus_dev_attr(f, 'channel_vp_mapping') chn_vp_mapping = [c.strip() for c in chn_vp_mapping] chn_vp_mapping = sorted(chn_vp_mapping, key
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2015-05-10 10:55:56 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2015-04-27 12:57:46.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2015-05-10 10:55:57.0 +0200 @@ -1,0 +2,10 @@ +Thu Apr 30 11:25:47 UTC 2015 - oher...@suse.de + +- hv: hypervvssd: call endmntent before call setmntent again +- remove unused bytes_written from kvp_update_file() +- address compiler warnings for hv_kvp_daemon.c +- kvp_daemon: make IPv6-only-injection work +- address compiler warnings for hv_fcopy_daemon.c +- do not add redundant '/' in hv_start_fcopy() + +--- Other differences: -- ++ hyper-v.tools.hv.hv_fcopy_daemon.c ++ --- /var/tmp/diff_new_pack.uqKv5q/_old 2015-05-10 10:55:58.0 +0200 +++ /var/tmp/diff_new_pack.uqKv5q/_new 2015-05-10 10:55:58.0 +0200 @@ -43,15 +43,9 @@ int error = HV_E_FAIL; char *q, *p; - /* -* If possile append a path seperator to the path. -*/ - if (strlen((char *)smsg-path_name) (W_MAX_PATH - 2)) - strcat((char *)smsg-path_name, /); - p = (char *)smsg-path_name; snprintf(target_fname, sizeof(target_fname), %s/%s, - (char *)smsg-path_name, smsg-file_name); +(char *)smsg-path_name, (char *)smsg-file_name); syslog(LOG_INFO, Target file name: %s, target_fname); /* @@ -137,7 +131,7 @@ int main(int argc, char *argv[]) { - int fd, fcopy_fd, len; + int fcopy_fd, len; int error; int daemonize = 1, long_index = 0, opt; int version = FCOPY_CURRENT_VERSION; ++ hyper-v.tools.hv.hv_kvp_daemon.c ++ --- /var/tmp/diff_new_pack.uqKv5q/_old 2015-05-10 10:55:58.0 +0200 +++ /var/tmp/diff_new_pack.uqKv5q/_new 2015-05-10 10:55:58.0 +0200 @@ -148,7 +148,6 @@ static void kvp_update_file(int pool) { FILE *filep; - size_t bytes_written; /* * We are going to write our in-memory registry out to @@ -164,8 +163,7 @@ exit(EXIT_FAILURE); } - bytes_written = fwrite(kvp_file_info[pool].records, - sizeof(struct kvp_record), + fwrite(kvp_file_info[pool].records, sizeof(struct kvp_record), kvp_file_info[pool].num_records, filep); if (ferror(filep) || fclose(filep)) { @@ -311,7 +309,7 @@ return 0; } -static int kvp_key_delete(int pool, const char *key, int key_size) +static int kvp_key_delete(int pool, const __u8 *key, int key_size) { int i; int j, k; @@ -354,8 +352,8 @@ return 1; } -static int kvp_key_add_or_modify(int pool, const char *key, int key_size, const char *value, - int value_size) +static int kvp_key_add_or_modify(int pool, const __u8 *key, int key_size, +const __u8 *value, int value_size) { int i; int num_records; @@ -408,7 +406,7 @@ return 0; } -static int kvp_get_value(int pool, const char *key, int key_size, char *value, +static int kvp_get_value(int pool, const __u8 *key, int key_size, __u8 *value, int value_size) { int i; @@ -440,8 +438,8 @@ return 1; } -static int kvp_pool_enumerate(int pool, int index, char *key, int key_size, - char *value, int value_size) +static int kvp_pool_enumerate(int pool, int index, __u8 *key, int key_size, + __u8 *value, int value_size) { struct kvp_record *record; @@ -662,7 +660,7 @@ char*p, *x; charbuf[256]; char addr_file[256]; - int i; + unsigned int i; char *mac_addr = NULL; snprintf(addr_file, sizeof(addr_file), %s%s%s, /sys/class/net/, @@ -701,7 +699,7 @@ charbuf[256]; char *kvp_net_dir = /sys/class/net/; char dev_id[256]; - int i; + unsigned int i; dir = opendir(kvp_net_dir); if (dir == NULL) @@ -751,7 +749,7 @@ static void kvp_process_ipconfig_file(char *cmd, - char *config_buf, int len, + char *config_buf, unsigned int len, int element_size, int offset) { char buf[256]; @@ -769,7 +767,7 @@ if (offset == 0) memset(config_buf, 0, len);
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2015-04-27 12:57:45 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2015-01-30 06:03:10.0 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2015-04-27 12:57:46.0 +0200 @@ -1,0 +2,5 @@ +Thu Apr 16 15:23:18 UTC 2015 - oher...@suse.de + +- Add runlevel script for fcopy daemon in SLE11 (bnc#926534) + +--- New: hyper-v.init.fcopy.sh Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.QuyUSc/_old 2015-04-27 12:57:46.0 +0200 +++ /var/tmp/diff_new_pack.QuyUSc/_new 2015-04-27 12:57:46.0 +0200 @@ -1,7 +1,7 @@ # # spec file for package hyper-v # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -52,6 +52,7 @@ Source12: hyper-v.tools.hv.hv_vss_daemon.c Source13: hyper-v.init.vss.sh Source14: hyper-v.tools.hv.hv_fcopy_daemon.c +Source15: hyper-v.init.fcopy.sh Source20: hyper-v.tools.hv.hv_get_dhcp_info.sh Source21: hyper-v.tools.hv.hv_get_dns_info.sh Source22: hyper-v.tools.hv.hv_set_ifconfig.sh @@ -227,6 +228,8 @@ ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT${bindir}/rc%{hv_kvp_daemon} install -m755 %{S:13} $RPM_BUILD_ROOT/etc/init.d/%{hv_vss_daemon} ln -sfvbn ../../etc/init.d/%{hv_vss_daemon} $RPM_BUILD_ROOT${bindir}/rc%{hv_vss_daemon} +install -m755 %{S:15} $RPM_BUILD_ROOT/etc/init.d/%{hv_fcopy_daemon} +ln -sfvbn ../../etc/init.d/%{hv_fcopy_daemon} $RPM_BUILD_ROOT${bindir}/rc%{hv_fcopy_daemon} %endif %files @@ -289,6 +292,8 @@ %{insserv_force_if_yast %{hv_kvp_daemon}} echo Enabling %{hv_vss_daemon} on '${product_name}' from '${board_vendor}' %{insserv_force_if_yast %{hv_vss_daemon}} + echo Enabling %{hv_fcopy_daemon} on '${product_name}' from '${board_vendor}' + %{insserv_force_if_yast %{hv_fcopy_daemon}} %endif fi @@ -298,6 +303,7 @@ %else %stop_on_removal %{hv_kvp_daemon} %stop_on_removal %{hv_vss_daemon} +%stop_on_removal %{hv_fcopy_daemon} %endif %postun ++ hyper-v.init.fcopy.sh ++ #!/bin/sh # # LSB compatible service control script; see http://www.linuxbase.org/spec/ # ### BEGIN INIT INFO # Provides: hv_fcopy_daemon # Required-Start:$null # Should-Start: $syslog $remote_fs $time # Required-Stop: $null # Should-Stop: $syslog $remote_fs $time # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: hv_fcopy_daemon receives files from the host # Description: Start hv_fcopy_daemon to allow the host to copy files into this guest ### END INIT INFO # Check for missing binaries (stale symlinks should not happen) # Note: Special treatment of stop for LSB conformance HV_FCOPY_BIN=/usr/sbin/hv_fcopy_daemon test -x $HV_FCOPY_BIN || { echo $HV_FCOPY_BIN not installed; if [ $1 = stop ]; then exit 0; else exit 5; fi; } . /etc/rc.status # Reset status of this service rc_reset case $1 in start) echo -n Starting Hyper-V FCOPY daemon env PATH=/usr/lib/hyper-v/bin:$PATH \ startproc $HV_FCOPY_BIN rc_status -v ;; stop) echo -n Shutting down Hyper-V FCOPY daemon killproc -TERM $HV_FCOPY_BIN rc_status -v ;; try-restart|condrestart) if test $1 = condrestart; then echo ${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm} fi $0 status if test $? = 0; then $0 restart else rc_reset# Not running is not a failure. fi # Remember status and be quiet rc_status ;; restart) ## Stop the service and regardless of whether it was ## running or not, start it again. $0 stop $0 start # Remember status and be quiet rc_status ;; force-reload) echo -n Reload service Hyper-V FCOPY daemon $0 try-restart rc_status ;; reload) rc_failed 3 rc_status -v ;; status) echo -n Checking for service Hyper-V FCOPY daemon checkproc $HV_FCOPY_BIN rc_status -v ;; *) echo Usage: $0
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2015-01-30 06:03:08 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2014-12-19 09:36:55.0 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2015-01-30 06:03:10.0 +0100 @@ -1,0 +2,9 @@ +Mon Jan 12 09:37:40 UTC 2015 - oher...@suse.de + +- Check return value of setsockopt call +- Improve error logging in VSS daemon. +- Check return value of poll call +- Properly pack the data for file copy functionality +- make struct hv_do_fcopy match Hyper-V host messages + +--- @@ -12 +21 @@ -- introduce -n/--no-daemon option (fate#317317533) +- introduce -n/--no-daemon option (fate#317533) Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.Ogtjhg/_old 2015-01-30 06:03:12.0 +0100 +++ /var/tmp/diff_new_pack.Ogtjhg/_new 2015-01-30 06:03:12.0 +0100 @@ -1,7 +1,7 @@ # # spec file for package hyper-v # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed ++ hyper-v.include.linux.hyperv.h ++ --- /var/tmp/diff_new_pack.Ogtjhg/_old 2015-01-30 06:03:12.0 +0100 +++ /var/tmp/diff_new_pack.Ogtjhg/_new 2015-01-30 06:03:12.0 +0100 @@ -128,10 +128,11 @@ struct hv_do_fcopy { struct hv_fcopy_hdr hdr; + __u32 pad; __u64 offset; __u32 size; __u8data[DATA_FRAGMENT]; -}; +} __attribute__((packed)); /* ++ hyper-v.tools.hv.hv_fcopy_daemon.c ++ --- /var/tmp/diff_new_pack.Ogtjhg/_old 2015-01-30 06:03:12.0 +0100 +++ /var/tmp/diff_new_pack.Ogtjhg/_new 2015-01-30 06:03:12.0 +0100 @@ -174,7 +174,7 @@ fcopy_fd = open(/dev/vmbus/hv_fcopy, O_RDWR); if (fcopy_fd 0) { - syslog(LOG_ERR, open /dev/hv_fcopy failed; error: %d %s, + syslog(LOG_ERR, open /dev/vmbus/hv_fcopy failed; error: %d %s, errno, strerror(errno)); exit(EXIT_FAILURE); } ++ hyper-v.tools.hv.hv_kvp_daemon.c ++ --- /var/tmp/diff_new_pack.Ogtjhg/_old 2015-01-30 06:03:12.0 +0100 +++ /var/tmp/diff_new_pack.Ogtjhg/_new 2015-01-30 06:03:12.0 +0100 @@ -1485,7 +1485,7 @@ kvp_get_os_info(); /* * Cache Fully Qualified Domain Name because getaddrinfo takes an -* unpredicatable amount of time to finish. +* unpredictable amount of time to finish. */ kvp_get_domain_name(full_domain_name, sizeof(full_domain_name)); ++ hyper-v.tools.hv.hv_vss_daemon.c ++ --- /var/tmp/diff_new_pack.Ogtjhg/_old 2015-01-30 06:03:12.0 +0100 +++ /var/tmp/diff_new_pack.Ogtjhg/_new 2015-01-30 06:03:12.0 +0100 @@ -221,7 +221,8 @@ fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); if (fd 0) { - syslog(LOG_ERR, netlink socket creation failed; error:%d, fd); + syslog(LOG_ERR, netlink socket creation failed; error:%d %s, + errno, strerror(errno)); exit(EXIT_FAILURE); } addr.nl_family = AF_NETLINK; @@ -232,12 +233,16 @@ error = bind(fd, (struct sockaddr *)addr, sizeof(addr)); if (error 0) { - syslog(LOG_ERR, bind failed; error:%d, error); + syslog(LOG_ERR, bind failed; error:%d %s, errno, strerror(errno)); close(fd); exit(EXIT_FAILURE); } nl_group = CN_VSS_IDX; - setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, nl_group, sizeof(nl_group)); + if (setsockopt(fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, nl_group, sizeof(nl_group)) 0) { + syslog(LOG_ERR, setsockopt failed; error:%d %s, errno, strerror(errno)); + close(fd); + exit(EXIT_FAILURE); + } /* * Register ourselves with the kernel. */ @@ -252,7 +257,7 @@ len = netlink_send(fd, message); if (len 0) { - syslog(LOG_ERR, netlink_send failed; error:%d, len); + syslog(LOG_ERR, netlink_send failed; error:%d %s, errno, strerror(errno)); close(fd); exit(EXIT_FAILURE); } @@ -264,7 +269,16 @@ socklen_t addr_l = sizeof(addr);
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2014-12-19 09:38:05 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2014-12-06 13:47:10.0 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2014-12-19 09:36:55.0 +0100 @@ -1,0 +2,8 @@ +Wed Dec 17 09:06:33 UTC 2014 - oher...@suse.de + +- Start hv_kvp_daemon after network-online.target (bnc#910353) +- ignore ENOBUFS and ENOMEM in the KVP daemon +- vssdaemon: skip all filesystems mounted readonly (bnc#909864) +- vssdaemon: report freeze errors + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.Kpj0bY/_old 2014-12-19 09:36:56.0 +0100 +++ /var/tmp/diff_new_pack.Kpj0bY/_new 2014-12-19 09:36:56.0 +0100 @@ -129,15 +129,17 @@ # started via %{_udevrulesdir}/%{hv_kvp_daemon}.rules [Unit] Description=Hyper-V KVP Daemon +# During startup the current hostname is cached, so start very late +Requires=network-online.target +After=network-online.target ConditionVirtualization=microsoft [Service] Environment=PATH=%{helper_dir}/bin:/usr/sbin:/usr/bin:/sbin:/bin -Type=forking # Restart appears to work, but its unsupported # Reboot required until kernel-user protocol is fixed ExecStartPre=/usr/bin/mkdir /run/%{hv_kvp_daemon} -ExecStart=${bindir}/%{hv_kvp_daemon} +ExecStart=${bindir}/%{hv_kvp_daemon} --no-daemon ExecReload=/usr/bin/false Restart=no @@ -152,11 +154,10 @@ ConditionVirtualization=microsoft [Service] -Type=forking # Restart appears to work, but its unsupported # Reboot required until kernel-user protocol is fixed ExecStartPre=/usr/bin/mkdir /run/%{hv_vss_daemon} -ExecStart=${bindir}/%{hv_vss_daemon} +ExecStart=${bindir}/%{hv_vss_daemon} --no-daemon ExecReload=/usr/bin/false Restart=no @@ -171,8 +172,7 @@ ConditionVirtualization=microsoft [Service] -Type=forking -ExecStart=${bindir}/%{hv_fcopy_daemon} +ExecStart=${bindir}/%{hv_fcopy_daemon} --no-daemon [Install] WantedBy=default.target ++ hyper-v.tools.hv.hv_kvp_daemon.c ++ --- /var/tmp/diff_new_pack.Kpj0bY/_old 2014-12-19 09:36:56.0 +0100 +++ /var/tmp/diff_new_pack.Kpj0bY/_new 2014-12-19 09:36:56.0 +0100 @@ -1561,8 +1561,15 @@ addr_p, addr_l); if (len 0) { + int saved_errno = errno; syslog(LOG_ERR, recvfrom failed; pid:%u error:%d %s, addr.nl_pid, errno, strerror(errno)); + + if (saved_errno == ENOBUFS) { + syslog(LOG_ERR, receive error: ignored); + continue; + } + close(fd); return -1; } @@ -1765,8 +1772,15 @@ len = netlink_send(fd, incoming_cn_msg); if (len 0) { + int saved_errno = errno; syslog(LOG_ERR, net_link send failed; error: %d %s, errno, strerror(errno)); + + if (saved_errno == ENOMEM || saved_errno == ENOBUFS) { + syslog(LOG_ERR, send error: ignored); + continue; + } + exit(EXIT_FAILURE); } } ++ hyper-v.tools.hv.hv_vss_daemon.c ++ --- /var/tmp/diff_new_pack.Kpj0bY/_old 2014-12-19 09:36:56.0 +0100 +++ /var/tmp/diff_new_pack.Kpj0bY/_new 2014-12-19 09:36:56.0 +0100 @@ -83,7 +83,7 @@ FILE *mounts; struct mntent *ent; unsigned int cmd; - int error = 0, root_seen = 0; + int error = 0, root_seen = 0, save_errno = 0; switch (operation) { case VSS_OP_FREEZE: @@ -103,7 +103,7 @@ while ((ent = getmntent(mounts))) { if (strncmp(ent-mnt_fsname, match, strlen(match))) continue; - if (strcmp(ent-mnt_type, iso9660) == 0) + if (hasmntopt(ent, MNTOPT_RO) != NULL) continue; if (strcmp(ent-mnt_type, vfat) == 0) continue; @@ -115,7 +115,6 @@ if (error operation == VSS_OP_FREEZE) goto err; } - endmntent(mounts); if (root_seen) { error |= vss_do_freeze(/, cmd); @@ -123,10 +122,19 @@ goto err;
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2014-12-06 13:47:21 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2014-11-13 09:21:36.0 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2014-12-06 13:47:10.0 +0100 @@ -1,0 +2,5 @@ +Tue Nov 25 17:46:30 UTC 2014 - oher...@suse.de + +- introduce -n/--no-daemon option (fate#317317533) + +--- Other differences: -- ++ hyper-v.tools.hv.hv_fcopy_daemon.c ++ --- /var/tmp/diff_new_pack.dv25IH/_old 2014-12-06 13:47:11.0 +0100 +++ /var/tmp/diff_new_pack.dv25IH/_new 2014-12-06 13:47:11.0 +0100 @@ -33,6 +33,7 @@ #include sys/stat.h #include fcntl.h #include dirent.h +#include getopt.h static int target_fd; static char target_fname[W_MAX_PATH]; @@ -126,15 +127,43 @@ } -int main(void) +void print_usage(char *argv[]) +{ + fprintf(stderr, Usage: %s [options]\n + Options are:\n + -n, --no-daemonstay in foreground, don't daemonize\n + -h, --help print this help\n, argv[0]); +} + +int main(int argc, char *argv[]) { int fd, fcopy_fd, len; int error; + int daemonize = 1, long_index = 0, opt; int version = FCOPY_CURRENT_VERSION; char *buffer[4096 * 2]; struct hv_fcopy_hdr *in_msg; - if (daemon(1, 0)) { + static struct option long_options[] = { + {help,no_argument, 0, 'h' }, + {no-daemon, no_argument, 0, 'n' }, + {0, 0, 0, 0 } + }; + + while ((opt = getopt_long(argc, argv, hn, long_options, + long_index)) != -1) { + switch (opt) { + case 'n': + daemonize = 0; + break; + case 'h': + default: + print_usage(argv); + exit(EXIT_FAILURE); + } + } + + if (daemonize daemon(1, 0)) { syslog(LOG_ERR, daemon() failed; error: %s, strerror(errno)); exit(EXIT_FAILURE); } ++ hyper-v.tools.hv.hv_kvp_daemon.c ++ --- /var/tmp/diff_new_pack.dv25IH/_old 2014-12-06 13:47:11.0 +0100 +++ /var/tmp/diff_new_pack.dv25IH/_new 2014-12-06 13:47:11.0 +0100 @@ -44,6 +44,7 @@ #include fcntl.h #include dirent.h #include net/if.h +#include getopt.h /* * KVP protocol: The user mode component first registers with the @@ -1419,7 +1420,15 @@ return sendmsg(fd, message, 0); } -int main(void) +void print_usage(char *argv[]) +{ + fprintf(stderr, Usage: %s [options]\n + Options are:\n + -n, --no-daemonstay in foreground, don't daemonize\n + -h, --help print this help\n, argv[0]); +} + +int main(int argc, char *argv[]) { int fd, len, nl_group; int error; @@ -1437,9 +1446,30 @@ struct hv_kvp_ipaddr_value *kvp_ip_val; char *kvp_recv_buffer; size_t kvp_recv_buffer_len; + int daemonize = 1, long_index = 0, opt; - if (daemon(1, 0)) + static struct option long_options[] = { + {help,no_argument, 0, 'h' }, + {no-daemon, no_argument, 0, 'n' }, + {0, 0, 0, 0 } + }; + + while ((opt = getopt_long(argc, argv, hn, long_options, + long_index)) != -1) { + switch (opt) { + case 'n': + daemonize = 0; + break; + case 'h': + default: + print_usage(argv); + exit(EXIT_FAILURE); + } + } + + if (daemonize daemon(1, 0)) return 1; + openlog(KVP, 0, LOG_USER); syslog(LOG_INFO, KVP starting; pid is:%d, getpid()); ++ hyper-v.tools.hv.hv_vss_daemon.c ++ --- /var/tmp/diff_new_pack.dv25IH/_old 2014-12-06 13:47:11.0 +0100 +++ /var/tmp/diff_new_pack.dv25IH/_new 2014-12-06 13:47:11.0 +0100 @@ -37,6 +37,7 @@ #include linux/hyperv.h #include linux/netlink.h #include syslog.h +#include getopt.h static struct sockaddr_nl addr; @@ -156,7 +157,15 @@ return sendmsg(fd, message, 0); } -int main(void) +void print_usage(char *argv[]) +{ +
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2014-11-13 09:21:35 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2014-10-08 22:13:27.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2014-11-13 09:21:36.0 +0100 @@ -1,0 +2,5 @@ +Sun Nov 09 04:39:00 UTC 2014 - Led led...@gmail.com + +- fix bashisms in pre/post scripts + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.kIy5tG/_old 2014-11-13 09:21:37.0 +0100 +++ /var/tmp/diff_new_pack.kIy5tG/_new 2014-11-13 09:21:37.0 +0100 @@ -247,8 +247,9 @@ # move them to /var/lib and remove old directory, if possible. if test -d /var/opt/hyperv then - if mkdir -p -v -m 0755 /var/lib/hyperv pushd /var/lib/hyperv /dev/null + if mkdir -p -v -m 0755 /var/lib/hyperv then + cd /var/lib/hyperv for oldfile in /var/opt/hyperv/ifcfg-* /var/opt/hyperv/.kvp_pool_* do if test -e ${oldfile} @@ -256,7 +257,7 @@ mv -vfb ${oldfile} . || : fi done - popd /dev/null + cd - /dev/null fi rmdir -v /var/opt/hyperv || : fi @@ -267,7 +268,7 @@ %post board_vendor= product_name= -if pushd /sys/class/dmi/id /dev/null 2/dev/null +if cd /sys/class/dmi/id 2/dev/null then if test -r board_vendor then @@ -277,7 +278,7 @@ then product_name=`cat product_name` fi - popd /dev/null + cd - /dev/null fi if test ${board_vendor} = Microsoft Corporation -a ${product_name} = Virtual Machine then -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2014-10-08 22:13:24 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2014-07-13 14:05:46.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2014-10-08 22:13:27.0 +0200 @@ -1,0 +2,6 @@ +Tue Sep 30 15:41:02 UTC 2014 - oher...@suse.de + +- vssdaemon: ignore the EBUSY on multiple freezing the same + partition (bnc#899204) + +--- Other differences: -- ++ hyper-v.tools.hv.hv_vss_daemon.c ++ --- /var/tmp/diff_new_pack.j9JF4P/_old 2014-10-08 22:13:28.0 +0200 +++ /var/tmp/diff_new_pack.j9JF4P/_new 2014-10-08 22:13:28.0 +0200 @@ -45,21 +45,39 @@ #endif -static int vss_do_freeze(char *dir, unsigned int cmd, char *fs_op) +/* Don't use syslog() in the function since that can cause write to disk */ +static int vss_do_freeze(char *dir, unsigned int cmd) { int ret, fd = open(dir, O_RDONLY); if (fd 0) return 1; + ret = ioctl(fd, cmd, 0); - syslog(LOG_INFO, VSS: %s of %s: %s\n, fs_op, dir, strerror(errno)); + + /* +* If a partition is mounted more than once, only the first +* FREEZE/THAW can succeed and the later ones will get +* EBUSY/EINVAL respectively: there could be 2 cases: +* 1) a user may mount the same partition to differnt directories +* by mistake or on purpose; +* 2) The subvolume of btrfs appears to have the same partition +* mounted more than once. +*/ + if (ret) { + if ((cmd == FIFREEZE errno == EBUSY) || + (cmd == FITHAW errno == EINVAL)) { + close(fd); + return 0; + } + } + close(fd); return !!ret; } static int vss_operate(int operation) { - char *fs_op; char match[] = /dev/; FILE *mounts; struct mntent *ent; @@ -69,11 +87,9 @@ switch (operation) { case VSS_OP_FREEZE: cmd = FIFREEZE; - fs_op = freeze; break; case VSS_OP_THAW: cmd = FITHAW; - fs_op = thaw; break; default: return -1; @@ -94,15 +110,23 @@ root_seen = 1; continue; } - error |= vss_do_freeze(ent-mnt_dir, cmd, fs_op); + error |= vss_do_freeze(ent-mnt_dir, cmd); + if (error operation == VSS_OP_FREEZE) + goto err; } endmntent(mounts); if (root_seen) { - error |= vss_do_freeze(/, cmd, fs_op); + error |= vss_do_freeze(/, cmd); + if (error operation == VSS_OP_FREEZE) + goto err; } return error; +err: + endmntent(mounts); + vss_operate(VSS_OP_THAW); + return error; } static int netlink_send(int fd, struct cn_msg *msg) @@ -236,8 +260,16 @@ case VSS_OP_FREEZE: case VSS_OP_THAW: error = vss_operate(op); - if (error) + syslog(LOG_INFO, VSS: op=%s: %s\n, + op == VSS_OP_FREEZE ? FREEZE : THAW, + error ? failed : succeeded); + + if (error) { error = HV_E_FAIL; + syslog(LOG_ERR, op=%d failed!, op); + syslog(LOG_ERR, report it with these files:); + syslog(LOG_ERR, /etc/fstab and /proc/mounts); + } break; default: syslog(LOG_ERR, Illegal op:%d\n, op); -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2014-07-13 14:05:45 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2014-05-27 11:51:21.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2014-07-13 14:05:46.0 +0200 @@ -1,0 +2,5 @@ +Tue Jul 1 17:32:30 CEST 2014 - oher...@suse.de + +- fix file overwriting of hv_fcopy_daemon + +--- Other differences: -- ++ hyper-v.tools.hv.hv_fcopy_daemon.c ++ --- /var/tmp/diff_new_pack.gPmdSU/_old 2014-07-13 14:05:47.0 +0200 +++ /var/tmp/diff_new_pack.gPmdSU/_new 2014-07-13 14:05:47.0 +0200 @@ -88,7 +88,8 @@ } } - target_fd = open(target_fname, O_RDWR | O_CREAT | O_CLOEXEC, 0744); + target_fd = open(target_fname, +O_RDWR | O_CREAT | O_TRUNC | O_CLOEXEC, 0744); if (target_fd == -1) { syslog(LOG_INFO, Open Failed: %s, strerror(errno)); goto done; -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2014-05-27 11:51:15 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2014-04-14 06:43:21.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2014-05-27 11:51:21.0 +0200 @@ -1,0 +2,11 @@ +Mon May 26 15:50:21 CEST 2014 - oher...@suse.de + +- copy mask2pfxlen from /etc/sysconfig/network/scripts/functions + to hv_set_ifconfig (bnc#879256) + +--- +Wed May 21 12:05:31 CEST 2014 - oher...@suse.de + +- Start hyper-v helpers manually with helper script in inst-sys + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.TuzjtY/_old 2014-05-27 11:51:22.0 +0200 +++ /var/tmp/diff_new_pack.TuzjtY/_new 2014-05-27 11:51:22.0 +0200 @@ -195,6 +195,32 @@ # head -n 42 ${d}/*.rules # +helper=inst_sys.sh +cat $RPM_BUILD_ROOT${bindir}/${helper} EOF +#!/bin/bash +# Starting daemons via RUN== in udev rules is not supported. +# In inst-sys systemd is not used, so start all daemons manually. +if test -d /sys/bus/vmbus/devices +then + export PATH=${bindir}:\$PATH + echo -n Starting hyper-v helpers: + for i in \ + %{hv_kvp_daemon} \ + %{hv_vss_daemon} \ + %{hv_fcopy_daemon} + do + if mkdir /run/\$i + then + echo -n \$i + \$i /dev/null + fi + done + echo ... done +fi +EOF +chmod 755 $RPM_BUILD_ROOT${bindir}/${helper} +head -n 123 $RPM_BUILD_ROOT${bindir}/${helper} +# %else mkdir -p $RPM_BUILD_ROOT/etc/init.d install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon} ++ hyper-v.tools.hv.hv_set_ifconfig.sh ++ --- /var/tmp/diff_new_pack.TuzjtY/_old 2014-05-27 11:51:22.0 +0200 +++ /var/tmp/diff_new_pack.TuzjtY/_new 2014-05-27 11:51:22.0 +0200 @@ -44,14 +44,37 @@ fi # send subshell output to syslog ( -f=/etc/sysconfig/network/scripts/functions -if test -f ${f} -then - . ${f} -else - echo MISSING ${f} - exit 1 -fi +# copied from /etc/sysconfig/network/scripts/functions +mask2pfxlen() { + local i octet width=0 mask=(${1//./ }) + test ${#mask[@]} -eq 4 || return 1 + for octet in 0 1 2 3 + do + test ${mask[octet]} -ge 0 -a ${mask[octet]} -le 255 || return 1 + for i in 128 192 224 240 248 252 254 255 + do + test ${mask[octet]} -ge $i ((width++)) + done + done + echo $width + return 0 +} + +pfxlen2mask() { + test -n $1 || return 1 + local o i n=0 adr=() len=$(($1)) + for o in 0 1 2 3 + do + adr[$o]=0 + for i in 128 64 32 16 8 4 2 1 + do + ((n++ len)) ((adr[$o] = ${adr[$o]} + $i)) + done + done + echo ${adr[0]}.${adr[1]}.${adr[2]}.${adr[3]} + return 0 +} + # remove known config variables from environment unset HWADDR unset BOOTPROTO -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2014-04-14 06:43:20 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2014-03-18 13:46:32.0 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2014-04-14 06:43:21.0 +0200 @@ -1,0 +2,6 @@ +Thu Apr 10 19:19:04 CEST 2014 - oher...@suse.de + +- Handle the case when the target file exists correctly in hv_fcopy_daemon +- vssdaemon: Ignore VFAT mounts during the Freeze operation + +--- Other differences: -- ++ hyper-v.include.linux.hyperv.h ++ --- /var/tmp/diff_new_pack.TVBSV9/_old 2014-04-14 06:43:22.0 +0200 +++ /var/tmp/diff_new_pack.TVBSV9/_new 2014-04-14 06:43:22.0 +0200 @@ -300,6 +300,7 @@ #define HV_ERROR_DEVICE_NOT_CONNECTED 0x8007048F #define HV_INVALIDARG 0x80070057 #define HV_GUID_NOTFOUND 0x80041002 +#define HV_ERROR_ALREADY_EXISTS0x80070050 #define ADDR_FAMILY_NONE 0x00 #define ADDR_FAMILY_IPV4 0x01 ++ hyper-v.tools.hv.hv_fcopy_daemon.c ++ --- /var/tmp/diff_new_pack.TVBSV9/_old 2014-04-14 06:43:22.0 +0200 +++ /var/tmp/diff_new_pack.TVBSV9/_new 2014-04-14 06:43:22.0 +0200 @@ -82,8 +82,10 @@ if (!access(target_fname, F_OK)) { syslog(LOG_INFO, File: %s exists, target_fname); - if (!smsg-copy_flags OVER_WRITE) + if (!(smsg-copy_flags OVER_WRITE)) { + error = HV_ERROR_ALREADY_EXISTS; goto done; + } } target_fd = open(target_fname, O_RDWR | O_CREAT | O_CLOEXEC, 0744); ++ hyper-v.tools.hv.hv_vss_daemon.c ++ --- /var/tmp/diff_new_pack.TVBSV9/_old 2014-04-14 06:43:22.0 +0200 +++ /var/tmp/diff_new_pack.TVBSV9/_new 2014-04-14 06:43:22.0 +0200 @@ -88,6 +88,8 @@ continue; if (strcmp(ent-mnt_type, iso9660) == 0) continue; + if (strcmp(ent-mnt_type, vfat) == 0) + continue; if (strcmp(ent-mnt_dir, /) == 0) { root_seen = 1; continue; -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2014-03-18 13:46:31 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2014-02-12 17:22:17.0 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2014-03-18 13:46:32.0 +0100 @@ -1,0 +2,5 @@ +Sun Mar 2 18:11:31 CET 2014 - oher...@suse.de + +- Package /usr/lib/udev to fix build error + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.WNskVW/_old 2014-03-18 13:46:33.0 +0100 +++ /var/tmp/diff_new_pack.WNskVW/_new 2014-03-18 13:46:33.0 +0100 @@ -208,6 +208,7 @@ %doc kvptest.ps1.txt %if %{use_systemd} %{_unitdir} +%dir /usr/lib/udev %{_udevrulesdir} %else /etc/init.d/* -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2014-02-12 17:22:16 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2014-01-30 11:25:42.0 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2014-02-12 17:22:17.0 +0100 @@ -1,0 +2,5 @@ +Wed Feb 12 10:32:54 CET 2014 - oher...@suse.de + +- Update hv_fcopy_daemon, kernel name changed to /dev/vmbus/hv_fcopy + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.kivVMa/_old 2014-02-12 17:22:17.0 +0100 +++ /var/tmp/diff_new_pack.kivVMa/_new 2014-02-12 17:22:17.0 +0100 @@ -190,7 +190,7 @@ SUBSYSTEM==vmbus, ACTION==add, ATTR{class_id}=={35fa2e29-ea23-4236-96ae-3a6ebacba440}, TAG+=systemd, ENV{SYSTEMD_WANTS}+=%{hv_vss_daemon}.service EOF cat ${d}/%{hv_fcopy_daemon}.rules EOF -ACTION==add, KERNEL==hv_fcopy, TAG+=systemd, ENV{SYSTEMD_WANTS}+=%{hv_fcopy_daemon}.service +ACTION==add, KERNEL==vmbus/hv_fcopy, TAG+=systemd, ENV{SYSTEMD_WANTS}+=%{hv_fcopy_daemon}.service EOF # head -n 42 ${d}/*.rules ++ hyper-v.tools.hv.hv_fcopy_daemon.c ++ --- /var/tmp/diff_new_pack.kivVMa/_old 2014-02-12 17:22:17.0 +0100 +++ /var/tmp/diff_new_pack.kivVMa/_new 2014-02-12 17:22:17.0 +0100 @@ -126,7 +126,7 @@ int main(void) { int fd, fcopy_fd, len; - int error = 0; + int error; int version = FCOPY_CURRENT_VERSION; char *buffer[4096 * 2]; struct hv_fcopy_hdr *in_msg; @@ -139,7 +139,7 @@ openlog(HV_FCOPY, 0, LOG_USER); syslog(LOG_INFO, HV_FCOPY starting; pid is:%d, getpid()); - fcopy_fd = open(/dev/hv_fcopy, O_RDWR); + fcopy_fd = open(/dev/vmbus/hv_fcopy, O_RDWR); if (fcopy_fd 0) { syslog(LOG_ERR, open /dev/hv_fcopy failed; error: %d %s, @@ -160,15 +160,10 @@ * In this loop we process fcopy messages after the * handshake is complete. */ - len = pread(fcopy_fd, buffer, (4096 * 2), 0); - if (len = 0) { - if (!error) { - syslog(LOG_ERR, Read error: %s, -strerror(errno)); - error = HV_E_FAIL; - } - continue; + if (len 0) { + syslog(LOG_ERR, pread failed: %s, strerror(errno)); + exit(EXIT_FAILURE); } in_msg = (struct hv_fcopy_hdr *)buffer; -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2014-01-30 11:25:41 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2013-12-26 17:38:10.0 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2014-01-30 11:25:42.0 +0100 @@ -1,0 +2,13 @@ +Thu Jan 23 17:00:54 CET 2014 - oher...@suse.de + +- Start daemons on demand via udev rules because the guest services + are optional. +- If systemd is used daemons live in libdir, they are not usercallable apps + +--- +Thu Jan 16 11:09:34 CET 2014 - oher...@suse.de + +- Add hv_fcopy_daemon for post 13.1 releases (fate#315887) + hyper-v.tools.hv.hv_fcopy_daemon.c + +--- New: hyper-v.tools.hv.hv_fcopy_daemon.c Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.MgTr5e/_old 2014-01-30 11:25:44.0 +0100 +++ /var/tmp/diff_new_pack.MgTr5e/_new 2014-01-30 11:25:44.0 +0100 @@ -1,7 +1,7 @@ # # spec file for package hyper-v # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,6 +18,7 @@ %define hv_kvp_daemon hv_kvp_daemon %define hv_vss_daemon hv_vss_daemon +%define hv_fcopy_daemon hv_fcopy_daemon %define helper_dir /usr/lib/%{name} Name: hyper-v @@ -50,6 +51,7 @@ Source11: hyper-v.init.sh Source12: hyper-v.tools.hv.hv_vss_daemon.c Source13: hyper-v.init.vss.sh +Source14: hyper-v.tools.hv.hv_fcopy_daemon.c Source20: hyper-v.tools.hv.hv_get_dhcp_info.sh Source21: hyper-v.tools.hv.hv_get_dns_info.sh Source22: hyper-v.tools.hv.hv_set_ifconfig.sh @@ -65,10 +67,12 @@ cp -vL %{S:9} %{hv_kvp_daemon}.h cp -vL %{S:10} %{hv_kvp_daemon}.c cp -vL %{S:12} %{hv_vss_daemon}.c +cp -vL %{S:14} %{hv_fcopy_daemon}.c %build sed -i~ '/#include linux.hyperv.h/d' %{hv_kvp_daemon}.c sed -i~ '/#include linux.hyperv.h/d' %{hv_vss_daemon}.c +sed -i~ '/#include linux.hyperv.h/d' %{hv_fcopy_daemon}.c gcc \ $RPM_OPT_FLAGS \ -Wno-unused-variable \ @@ -91,12 +95,28 @@ -DCN_VSS_IDX=0xa \ -DCN_VSS_VAL=0x1 \ -o %{hv_vss_daemon} +gcc \ + $RPM_OPT_FLAGS \ + -Wno-unused-variable \ + -Wno-pointer-sign \ + -D_GNU_SOURCE \ + -g \ + %{hv_fcopy_daemon}.c \ + -include %{hv_kvp_daemon}.h \ + -o %{hv_fcopy_daemon} %install -mkdir -p $RPM_BUILD_ROOT/usr/sbin -install -m755 %{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin -install -m755 %{hv_vss_daemon} $RPM_BUILD_ROOT/usr/sbin +%if %{use_systemd} +# It is not a callable app anyway, so move it out of the way +bindir=%{helper_dir}/bin +%else +bindir=/usr/sbin +%endif +mkdir -p $RPM_BUILD_ROOT${bindir} mkdir -p $RPM_BUILD_ROOT%{helper_dir}/bin +install -m755 %{hv_kvp_daemon} $RPM_BUILD_ROOT${bindir} +install -m755 %{hv_vss_daemon} $RPM_BUILD_ROOT${bindir} +install -m755 %{hv_fcopy_daemon} $RPM_BUILD_ROOT${bindir} cp -avL %{S:20} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_get_dhcp_info cp -avL %{S:21} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_get_dns_info cp -avL %{S:22} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_set_ifconfig @@ -105,18 +125,19 @@ d=$RPM_BUILD_ROOT%{_unitdir} mkdir -vp ${d} # -cat ${d}/%{hv_kvp_daemon}.service 'EOF' +cat ${d}/%{hv_kvp_daemon}.service EOF +# started via %{_udevrulesdir}/%{hv_kvp_daemon}.rules [Unit] Description=Hyper-V KVP Daemon ConditionVirtualization=microsoft [Service] -Environment=%{helper_dir}/bin:/usr/sbin:/usr/bin:/sbin:/bin +Environment=PATH=%{helper_dir}/bin:/usr/sbin:/usr/bin:/sbin:/bin Type=forking # Restart appears to work, but its unsupported # Reboot required until kernel-user protocol is fixed ExecStartPre=/usr/bin/mkdir /run/%{hv_kvp_daemon} -ExecStart=/usr/sbin/%{hv_kvp_daemon} +ExecStart=${bindir}/%{hv_kvp_daemon} ExecReload=/usr/bin/false Restart=no @@ -124,7 +145,8 @@ WantedBy=default.target EOF # -cat ${d}/%{hv_vss_daemon}.service 'EOF' +cat ${d}/%{hv_vss_daemon}.service EOF +# started via %{_udevrulesdir}/%{hv_vss_daemon}.rules [Unit] Description=Hyper-V VSS Daemon ConditionVirtualization=microsoft @@ -134,7 +156,7 @@ # Restart appears to work, but its unsupported # Reboot required until kernel-user protocol is fixed ExecStartPre=/usr/bin/mkdir /run/%{hv_vss_daemon}
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2013-12-26 17:38:09 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2013-09-08 15:27:35.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2013-12-26 17:38:10.0 +0100 @@ -1,0 +2,5 @@ +Wed Dec 18 14:46:37 CET 2013 - oher...@suse.de + +- Use native systemd services for post 13.1 releases + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.NjZJDM/_old 2013-12-26 17:38:11.0 +0100 +++ /var/tmp/diff_new_pack.NjZJDM/_new 2013-12-26 17:38:11.0 +0100 @@ -18,11 +18,23 @@ %define hv_kvp_daemon hv_kvp_daemon %define hv_vss_daemon hv_vss_daemon +%define helper_dir /usr/lib/%{name} Name: hyper-v ExclusiveArch: %ix86 x86_64 +# systemd for post 13.1 releases +%if 0%{?suse_version} 1310 +%define use_systemd 1 +%else +%define use_systemd 0 +%endif +%if %{use_systemd} +%{?systemd_requires} +BuildRequires: pkgconfig(systemd) +%else PreReq: %insserv_prereq Requires(pre): coreutils +%endif Summary:Microsoft Hyper-V tools License:GPL-2.0 Group: System/Kernel @@ -30,7 +42,7 @@ Supplements:modalias(pci:v1414d5353sv*sd*bc*sc*i*) Url:http://www.kernel.org # Arbitrary version number -Version:5 +Version:6 Release:0 Source5:hyper-v.kvptest.ps1.txt Source9:hyper-v.include.linux.hyperv.h @@ -84,23 +96,71 @@ mkdir -p $RPM_BUILD_ROOT/usr/sbin install -m755 %{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin install -m755 %{hv_vss_daemon} $RPM_BUILD_ROOT/usr/sbin -mkdir -p $RPM_BUILD_ROOT/usr/lib/%{name}/bin -cp -avL %{S:20} $RPM_BUILD_ROOT/usr/lib/%{name}/bin/hv_get_dhcp_info -cp -avL %{S:21} $RPM_BUILD_ROOT/usr/lib/%{name}/bin/hv_get_dns_info -cp -avL %{S:22} $RPM_BUILD_ROOT/usr/lib/%{name}/bin/hv_set_ifconfig -chmod 755 $RPM_BUILD_ROOT/usr/lib/%{name}/bin/* +mkdir -p $RPM_BUILD_ROOT%{helper_dir}/bin +cp -avL %{S:20} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_get_dhcp_info +cp -avL %{S:21} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_get_dns_info +cp -avL %{S:22} $RPM_BUILD_ROOT%{helper_dir}/bin/hv_set_ifconfig +chmod 755 $RPM_BUILD_ROOT%{helper_dir}/bin/* +%if %{use_systemd} +d=$RPM_BUILD_ROOT%{_unitdir} +mkdir -vp ${d} +# +cat ${d}/%{hv_kvp_daemon}.service 'EOF' +[Unit] +Description=Hyper-V KVP Daemon +ConditionVirtualization=microsoft + +[Service] +Environment=%{helper_dir}/bin:/usr/sbin:/usr/bin:/sbin:/bin +Type=forking +# Restart appears to work, but its unsupported +# Reboot required until kernel-user protocol is fixed +ExecStartPre=/usr/bin/mkdir /run/%{hv_kvp_daemon} +ExecStart=/usr/sbin/%{hv_kvp_daemon} +ExecReload=/usr/bin/false +Restart=no + +[Install] +WantedBy=default.target +EOF +# +cat ${d}/%{hv_vss_daemon}.service 'EOF' +[Unit] +Description=Hyper-V VSS Daemon +ConditionVirtualization=microsoft + +[Service] +Type=forking +# Restart appears to work, but its unsupported +# Reboot required until kernel-user protocol is fixed +ExecStartPre=/usr/bin/mkdir /run/%{hv_vss_daemon} +ExecStart=/usr/sbin/%{hv_vss_daemon} +ExecReload=/usr/bin/false +Restart=no + +[Install] +WantedBy=default.target +EOF +# +head -n 42 ${d}/*.service +%else mkdir -p $RPM_BUILD_ROOT/etc/init.d install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon} ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin/rc%{hv_kvp_daemon} install -m755 %{S:13} $RPM_BUILD_ROOT/etc/init.d/%{hv_vss_daemon} ln -sfvbn ../../etc/init.d/%{hv_vss_daemon} $RPM_BUILD_ROOT/usr/sbin/rc%{hv_vss_daemon} +%endif %files %defattr (-,root,root) %doc kvptest.ps1.txt +%if %{use_systemd} +%{_unitdir} +%else /etc/init.d/* +%endif /usr/sbin/* -/usr/lib/%{name} +%{helper_dir} %pre # hv_kvp_daemon in SLES11 SP2 stored temporary state files in /var/opt @@ -120,6 +180,10 @@ fi rmdir -v /var/opt/hyperv || : fi +%if %{use_systemd} +%{service_add_pre %{hv_kvp_daemon}.service} +%{service_add_pre %{hv_vss_daemon}.service} +%endif %post board_vendor= @@ -138,18 +202,33 @@ fi if test ${board_vendor} = Microsoft Corporation -a ${product_name} = Virtual Machine then +%if %{use_systemd} +%{service_add_post %{hv_kvp_daemon}.service} +%{service_add_post %{hv_vss_daemon}.service} +%else echo Enabling %{hv_kvp_daemon} on '${product_name}' from '${board_vendor}' %{insserv_force_if_yast %{hv_kvp_daemon}} echo Enabling %{hv_vss_daemon} on '${product_name}' from '${board_vendor}'
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2013-09-08 15:27:34 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2013-08-23 11:06:19.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2013-09-08 15:27:35.0 +0200 @@ -1,0 +2,5 @@ +Sun Sep 8 10:36:29 CEST 2013 - oher...@suse.de + +- Update Supplements: modalias(dmi:*) + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.RvCsoN/_old 2013-09-08 15:27:36.0 +0200 +++ /var/tmp/diff_new_pack.RvCsoN/_new 2013-09-08 15:27:36.0 +0200 @@ -26,7 +26,7 @@ Summary:Microsoft Hyper-V tools License:GPL-2.0 Group: System/Kernel -Supplements: modalias(dmi*:svn*MicrosoftCorporation*:pn*VirtualMachine*:rn*VirtualMachine*) +Supplements: modalias(dmi:*svnMicrosoftCorporation*pnVirtualMachine*rnVirtualMachine*) Supplements:modalias(pci:v1414d5353sv*sd*bc*sc*i*) Url:http://www.kernel.org # Arbitrary version number -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2013-08-23 11:06:18 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2013-08-07 20:44:13.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2013-08-23 11:06:19.0 +0200 @@ -1,0 +2,6 @@ +Mon Aug 12 16:56:08 CEST 2013 - oher...@suse.de + +- Skip restart_on_update with old hyper-v.rpms while old + kernel is running (bnc#770763) + +--- Other differences: -- ++ hyper-v.init.sh ++ --- /var/tmp/diff_new_pack.IyRuiR/_old 2013-08-23 11:06:19.0 +0200 +++ /var/tmp/diff_new_pack.IyRuiR/_new 2013-08-23 11:06:19.0 +0200 @@ -29,8 +29,27 @@ case $1 in start) echo -n Starting Hyper-V KVP daemon - env PATH=/usr/lib/hyper-v/bin:$PATH \ - startproc $HV_KVP_BIN + # The service can not be restarted + # IF the currently running kernel is too old, the new daemon is started + # anyway. Due to a flaw in the old kernel-user protocol the kernel + # will flood /var/log/messages with messages like: + # hv_utils: KVP: user-mode registering done. + # This is also caused by old hyper-v.rpms which have a restart command + # in their post install script. Catch those old kernels and avoid the + # flood, which will easily fill the root partition during an upgrade. + case `uname -r` in + 2.*) rc_failed 3 ;; + 3.0.13-*) rc_failed 3 ;; + 3.0.26-*) rc_failed 3 ;; + 3.0.31-*) rc_failed 3 ;; + 3.0.34-*) rc_failed 3 ;; + 3.0.38-*) rc_failed 3 ;; + 3.0.42-*) rc_failed 3 ;; + *) + env PATH=/usr/lib/hyper-v/bin:$PATH \ + startproc $HV_KVP_BIN + ;; + esac rc_status -v ;; stop) -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2013-08-07 20:44:11 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2013-08-01 17:55:18.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2013-08-07 20:44:13.0 +0200 @@ -1,0 +2,12 @@ +Wed Aug 7 19:04:35 CEST 2013 - oher...@suse.de + +- cache FQDN in kvp_daemon to avoid timeouts (bnc#828714) +- use full nlmsghdr in netlink_send +- correct payload size in netlink_send +- use single send+recv buffer +- log errors to syslog in kvp_set_ip_info +- check return value of system in hv_kvp_daemon +- in kvp_set_ip_info free mac_addr right after usage +- check return value of daemon to fix compiler warning. + +--- Other differences: -- ++ hyper-v.tools.hv.hv_kvp_daemon.c ++ --- /var/tmp/diff_new_pack.FO8BhY/_old 2013-08-07 20:44:13.0 +0200 +++ /var/tmp/diff_new_pack.FO8BhY/_new 2013-08-07 20:44:13.0 +0200 @@ -89,6 +89,7 @@ static char *os_build; static char *os_version; static char *lic_version = Unknown version; +static char full_domain_name[HV_KVP_EXCHANGE_MAX_VALUE_SIZE]; static struct utsname uts_buf; /* @@ -1299,6 +1300,7 @@ } error = kvp_write_file(file, HWADDR, , mac_addr); + free(mac_addr); if (error) goto setval_error; @@ -1344,7 +1346,6 @@ goto setval_error; setval_done: - free(mac_addr); fclose(file); /* @@ -1353,18 +1354,22 @@ */ snprintf(cmd, sizeof(cmd), %s %s, hv_set_ifconfig, if_file); - system(cmd); + if (system(cmd)) { + syslog(LOG_ERR, Failed to execute cmd '%s'; error: %d %s, + cmd, errno, strerror(errno)); + return HV_E_FAIL; + } return 0; setval_error: - syslog(LOG_ERR, Failed to write config file); - free(mac_addr); + syslog(LOG_ERR, Failed to write config file. error: %d %s, + errno, strerror(errno)); fclose(file); return error; } -static int +static void kvp_get_domain_name(char *buffer, int length) { struct addrinfo hints, *info ; @@ -1378,34 +1383,29 @@ error = getaddrinfo(buffer, NULL, hints, info); if (error != 0) { - strcpy(buffer, getaddrinfo failed\n); - return error; + snprintf(buffer, length, getaddrinfo failed: 0x%x %s, + error, gai_strerror(error)); + return; } - strcpy(buffer, info-ai_canonname); + snprintf(buffer, length, %s, info-ai_canonname); freeaddrinfo(info); - return error; } static int netlink_send(int fd, struct cn_msg *msg) { - struct nlmsghdr *nlh; + struct nlmsghdr nlh = { .nlmsg_type = NLMSG_DONE }; unsigned int size; struct msghdr message; - char buffer[64]; struct iovec iov[2]; - size = NLMSG_SPACE(sizeof(struct cn_msg) + msg-len); + size = sizeof(struct cn_msg) + msg-len; - nlh = (struct nlmsghdr *)buffer; - nlh-nlmsg_seq = 0; - nlh-nlmsg_pid = getpid(); - nlh-nlmsg_type = NLMSG_DONE; - nlh-nlmsg_len = NLMSG_LENGTH(size - sizeof(*nlh)); - nlh-nlmsg_flags = 0; + nlh.nlmsg_pid = getpid(); + nlh.nlmsg_len = NLMSG_LENGTH(size); - iov[0].iov_base = nlh; - iov[0].iov_len = sizeof(*nlh); + iov[0].iov_base = nlh; + iov[0].iov_len = sizeof(nlh); iov[1].iov_base = msg; iov[1].iov_len = size; @@ -1435,25 +1435,29 @@ int pool; char*if_name; struct hv_kvp_ipaddr_value *kvp_ip_val; - char *kvp_send_buffer; char *kvp_recv_buffer; size_t kvp_recv_buffer_len; - daemon(1, 0); + if (daemon(1, 0)) + return 1; openlog(KVP, 0, LOG_USER); syslog(LOG_INFO, KVP starting; pid is:%d, getpid()); - kvp_recv_buffer_len = NLMSG_HDRLEN + sizeof(struct cn_msg) + sizeof(struct hv_kvp_msg); - kvp_send_buffer = calloc(1, kvp_recv_buffer_len); + kvp_recv_buffer_len = NLMSG_LENGTH(0) + sizeof(struct cn_msg) + sizeof(struct hv_kvp_msg); kvp_recv_buffer = calloc(1, kvp_recv_buffer_len); - if (!(kvp_send_buffer kvp_recv_buffer)) { - syslog(LOG_ERR, Failed to allocate netlink buffers); + if (!kvp_recv_buffer) { + syslog(LOG_ERR, Failed to allocate netlink buffer);
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2013-08-01 17:55:17 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2013-08-01 06:54:38.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2013-08-01 17:55:18.0 +0200 @@ -1,0 +2,5 @@ +Thu Aug 1 14:21:57 CEST 2013 - oher...@suse.de + +- Fix send/recv buffer allocation (bnc#828714) + +--- Other differences: -- ++ hyper-v.tools.hv.hv_kvp_daemon.c ++ --- /var/tmp/diff_new_pack.Ho4sx4/_old 2013-08-01 17:55:18.0 +0200 +++ /var/tmp/diff_new_pack.Ho4sx4/_new 2013-08-01 17:55:18.0 +0200 @@ -79,8 +79,6 @@ DNS }; -static char kvp_send_buffer[4096]; -static char kvp_recv_buffer[4096 * 2]; static struct sockaddr_nl addr; static int in_hand_shake = 1; @@ -1437,10 +1435,21 @@ int pool; char*if_name; struct hv_kvp_ipaddr_value *kvp_ip_val; + char *kvp_send_buffer; + char *kvp_recv_buffer; + size_t kvp_recv_buffer_len; daemon(1, 0); openlog(KVP, 0, LOG_USER); syslog(LOG_INFO, KVP starting; pid is:%d, getpid()); + + kvp_recv_buffer_len = NLMSG_HDRLEN + sizeof(struct cn_msg) + sizeof(struct hv_kvp_msg); + kvp_send_buffer = calloc(1, kvp_recv_buffer_len); + kvp_recv_buffer = calloc(1, kvp_recv_buffer_len); + if (!(kvp_send_buffer kvp_recv_buffer)) { + syslog(LOG_ERR, Failed to allocate netlink buffers); + exit(EXIT_FAILURE); + } /* * Retrieve OS release information. */ @@ -1514,7 +1523,7 @@ continue; } - len = recvfrom(fd, kvp_recv_buffer, sizeof(kvp_recv_buffer), 0, + len = recvfrom(fd, kvp_recv_buffer, kvp_recv_buffer_len, 0, addr_p, addr_l); if (len 0) { ++ hyper-v.tools.hv.hv_vss_daemon.c ++ --- /var/tmp/diff_new_pack.Ho4sx4/_old 2013-08-01 17:55:18.0 +0200 +++ /var/tmp/diff_new_pack.Ho4sx4/_new 2013-08-01 17:55:18.0 +0200 @@ -38,8 +38,6 @@ #include linux/netlink.h #include syslog.h -static char vss_recv_buffer[4096]; -static char vss_send_buffer[4096]; static struct sockaddr_nl addr; #ifndef SOL_NETLINK @@ -52,7 +50,7 @@ int ret, fd = open(dir, O_RDONLY); if (fd 0) - return -1; + return 1; ret = ioctl(fd, cmd, 0); syslog(LOG_INFO, VSS: %s of %s: %s\n, fs_op, dir, strerror(errno)); close(fd); @@ -85,9 +83,11 @@ if (mounts == NULL) return -1; - while((ent = getmntent(mounts))) { + while ((ent = getmntent(mounts))) { if (strncmp(ent-mnt_fsname, match, strlen(match))) continue; + if (strcmp(ent-mnt_type, iso9660) == 0) + continue; if (strcmp(ent-mnt_dir, /) == 0) { root_seen = 1; continue; @@ -145,6 +145,9 @@ struct cn_msg *incoming_cn_msg; int op; struct hv_vss_msg *vss_msg; + char *vss_send_buffer; + char *vss_recv_buffer; + size_t vss_recv_buffer_len; if (daemon(1, 0)) return 1; @@ -152,6 +155,14 @@ openlog(Hyper-V VSS, 0, LOG_USER); syslog(LOG_INFO, VSS starting; pid is:%d, getpid()); + vss_recv_buffer_len = NLMSG_HDRLEN + sizeof(struct cn_msg) + sizeof(struct hv_vss_msg); + vss_send_buffer = calloc(1, vss_recv_buffer_len); + vss_recv_buffer = calloc(1, vss_recv_buffer_len); + if (!(vss_send_buffer vss_recv_buffer)) { + syslog(LOG_ERR, Failed to allocate netlink buffers); + exit(EXIT_FAILURE); + } + fd = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); if (fd 0) { syslog(LOG_ERR, netlink socket creation failed; error:%d, fd); @@ -199,7 +210,7 @@ pfd.revents = 0; poll(pfd, 1, -1); - len = recvfrom(fd, vss_recv_buffer, sizeof(vss_recv_buffer), 0, + len = recvfrom(fd, vss_recv_buffer, vss_recv_buffer_len, 0, addr_p, addr_l); if (len 0) { @@ -210,8 +221,9 @@ } if (addr.nl_pid) { - syslog(LOG_WARNING, Received packet from untrusted pid:%u, -
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2013-08-01 06:54:37 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2013-07-16 15:33:00.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2013-08-01 06:54:38.0 +0200 @@ -1,0 +2,6 @@ +Wed Jul 24 10:18:34 CEST 2013 - oher...@suse.de + +- set BOOTPROTO=static if any IPADDR/IP6ADDR was passed to + hv_set_ifconfig and dhcp is disabled + +--- Other differences: -- ++ hyper-v.tools.hv.hv_set_ifconfig.sh ++ --- /var/tmp/diff_new_pack.ArruOv/_old 2013-08-01 06:54:38.0 +0200 +++ /var/tmp/diff_new_pack.ArruOv/_new 2013-08-01 06:54:38.0 +0200 @@ -95,6 +95,9 @@ if test ${BOOTPROTO} = dhcp then echo BOOTPROTO=dhcp + elif test -n ${!IPADDR*}${!IPV6ADDR*} + then + echo BOOTPROTO=static fi # single index for all ipv4 and ipv6 adresses in final ifcfg file i=0 -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2013-07-16 15:32:58 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2012-11-30 12:25:40.0 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2013-07-16 15:33:00.0 +0200 @@ -1,0 +2,49 @@ +Mon Jul 15 16:16:06 CEST 2013 - oher...@suse.de + +- update hv_kvp_daemon (merge 0783d72fa from v3.9-rc1) + Fix how ifcfg-* file is created + +--- +Mon Jul 15 15:24:00 CEST 2013 - oher...@suse.de + +- update hv_kvp_daemon (changes up to 3.11-rc1): + Improve error logging in KVP daemon. + Fix file descriptor leaks + Check retrun value of strchr call + Check return value of poll call + Check return value of setsockopt call + daemon should check type of received Netlink msg + daemon setsockopt should use options macros + daemon should subscribe only to CN_KVP_IDX group + +--- +Mon Jul 15 12:04:05 CEST 2013 - oher...@suse.de + +- Fix a bug in IPV6 subnet enumeration (bnc#828714) + +--- +Tue Mar 26 18:03:47 CET 2013 - oher...@suse.de + +- Update hv_vss_daemon (bnc#811033) + +--- +Fri Mar 22 17:23:36 CET 2013 - oher...@suse.de + +- add hv_vss_daemon (fate#314921) + helper to support host initiated backup + +--- +Fri Mar 22 16:56:57 CET 2013 - oher...@suse.de + +- build hv_kvp_daemon with -D_GNU_SOURCE to get O_CLOEXEC + +--- +Fri Mar 22 16:19:38 CET 2013 - oher...@suse.de + +- update hv_kvp_daemon + Use CLOEXEC when opening kvp_pool files + Fix permissions of created directory and files + Fix /var subdirectory (move state files from /var/opt to /var/lib) + Fix string types + +--- New: hyper-v.init.vss.sh hyper-v.tools.hv.hv_vss_daemon.c Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.XcST14/_old 2013-07-16 15:33:01.0 +0200 +++ /var/tmp/diff_new_pack.XcST14/_new 2013-07-16 15:33:01.0 +0200 @@ -1,7 +1,7 @@ # # spec file for package hyper-v # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,22 +17,27 @@ %define hv_kvp_daemon hv_kvp_daemon +%define hv_vss_daemon hv_vss_daemon Name: hyper-v ExclusiveArch: %ix86 x86_64 PreReq: %insserv_prereq +Requires(pre): coreutils Summary:Microsoft Hyper-V tools License:GPL-2.0 Group: System/Kernel Supplements: modalias(dmi*:svn*MicrosoftCorporation*:pn*VirtualMachine*:rn*VirtualMachine*) Supplements:modalias(pci:v1414d5353sv*sd*bc*sc*i*) Url:http://www.kernel.org -Version:4 +# Arbitrary version number +Version:5 Release:0 Source5:hyper-v.kvptest.ps1.txt Source9:hyper-v.include.linux.hyperv.h Source10: hyper-v.tools.hv.hv_kvp_daemon.c Source11: hyper-v.init.sh +Source12: hyper-v.tools.hv.hv_vss_daemon.c +Source13: hyper-v.init.vss.sh Source20: hyper-v.tools.hv.hv_get_dhcp_info.sh Source21: hyper-v.tools.hv.hv_get_dns_info.sh Source22: hyper-v.tools.hv.hv_set_ifconfig.sh @@ -47,23 +52,38 @@ cp -avL %{S:5} kvptest.ps1.txt cp -vL %{S:9} %{hv_kvp_daemon}.h cp -vL %{S:10} %{hv_kvp_daemon}.c +cp -vL %{S:12} %{hv_vss_daemon}.c %build sed -i~ '/#include linux.hyperv.h/d' %{hv_kvp_daemon}.c +sed -i~ '/#include linux.hyperv.h/d' %{hv_vss_daemon}.c gcc \ $RPM_OPT_FLAGS \ -Wno-unused-variable \ -Wno-pointer-sign \ + -D_GNU_SOURCE \ -g \ %{hv_kvp_daemon}.c \ -include %{hv_kvp_daemon}.h \ -DCN_KVP_IDX=0x9 \ -DCN_KVP_VAL=0x1 \ -o %{hv_kvp_daemon} +gcc \ + $RPM_OPT_FLAGS \ + -Wno-unused-variable \ + -Wno-pointer-sign \ + -D_GNU_SOURCE \ + -g \ + %{hv_vss_daemon}.c \ + -include %{hv_kvp_daemon}.h \ + -DCN_VSS_IDX=0xa \ + -DCN_VSS_VAL=0x1 \ + -o %{hv_vss_daemon} %install mkdir -p $RPM_BUILD_ROOT/usr/sbin install
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2012-11-30 12:21:43 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v, Maintainer is oher...@suse.com Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2012-11-02 17:36:59.0 +0100 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2012-11-30 12:25:40.0 +0100 @@ -1,0 +2,29 @@ +Tue Nov 27 11:19:32 CET 2012 - oher...@suse.de + +- update hv_set_ifconfig, use single index for static ipv4/ipv6 [bnc#790469] + +--- +Sun Nov 25 17:50:40 CET 2012 - oher...@suse.de + +- update hv_set_ifconfig further to work with our ifcfg [bnc#790469] + +--- +Thu Nov 22 18:14:12 CET 2012 - oher...@suse.de + +- update hv_get_dhcp_info to work with our ifcfg [bnc#790469] +- remove cat usage from hv_get_dns_info +- add quoting to hv_set_ifconfig to make it more robust + +--- +Mon Nov 12 17:18:25 CET 2012 - oher...@suse.de + +- remove code to build kmp, it was not enabled because the + drivers are now in kernel since a long time. [bnc#676890] + +--- +Thu Nov 8 14:30:05 CET 2012 - oher...@suse.de + +- Netlink source address validation allows DoS [bnc#791605, CVE-2012-5532] + bugfix for recvfrom check from bnc#761200 + +--- @@ -33 +62 @@ -- check origin of netlink messages, use recvfrom() [bnc#761200] +- check origin of netlink messages, use recvfrom() [bnc#761200, CVE-2012-2669] Old: Module.supported full-kernel-version.patch hyper-v.dummy_ko.c hyper-v.supplements.txt hyperv_pvdrivers.conf kmp_filelist no-loopback.patch Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.27S5S3/_old 2012-11-30 12:25:41.0 +0100 +++ /var/tmp/diff_new_pack.27S5S3/_new 2012-11-30 12:25:41.0 +0100 @@ -16,21 +16,9 @@ # -%define with_kmp 0 -%define with_modprobe 0 -%if %{with_kmp} -%define with_drivers_in_kmp 0 -%endif %define hv_kvp_daemon hv_kvp_daemon Name: hyper-v -%if %{with_kmp} -BuildRequires: kernel-default-devel -BuildRequires: module-init-tools -%ifarch %ix86 -BuildRequires: kernel-pae-devel -%endif -%endif ExclusiveArch: %ix86 x86_64 PreReq: %insserv_prereq Summary:Microsoft Hyper-V tools @@ -41,11 +29,6 @@ Url:http://www.kernel.org Version:4 Release:0 -Source: Module.supported -Source1:hyperv_pvdrivers.conf -Source2:kmp_filelist -Source3:hyper-v.supplements.txt -Source4:hyper-v.dummy_ko.c Source5:hyper-v.kvptest.ps1.txt Source9:hyper-v.include.linux.hyperv.h Source10: hyper-v.tools.hv.hv_kvp_daemon.c @@ -53,44 +36,17 @@ Source20: hyper-v.tools.hv.hv_get_dhcp_info.sh Source21: hyper-v.tools.hv.hv_get_dns_info.sh Source22: hyper-v.tools.hv.hv_set_ifconfig.sh -Patch0: full-kernel-version.patch -Patch1: no-loopback.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if %{with_kmp} -%if %{with_drivers_in_kmp} -%suse_kernel_module_package -n hyper-v um xen -f kmp_filelist -%else -%suse_kernel_module_package -n hyper-v um xen -f kmp_filelist -p hyper-v.supplements.txt -%endif -%endif %description This package contains the Microsoft Hyper-V tools. - - -%if %{with_kmp} - -%package KMP - -Summary:Microsoft Hyper-V drivers -Group: System/Kernel - -%description KMP -This package contains the Microsoft Hyper-V drivers. - - - -%endif - %prep %setup -Tc cp -avL %{S:5} kvptest.ps1.txt cp -vL %{S:9} %{hv_kvp_daemon}.h cp -vL %{S:10} %{hv_kvp_daemon}.c -%patch0 -p3 -%patch1 -p3 %build sed -i~ '/#include linux.hyperv.h/d' %{hv_kvp_daemon}.c @@ -104,31 +60,8 @@ -DCN_KVP_IDX=0x9 \ -DCN_KVP_VAL=0x1 \ -o %{hv_kvp_daemon} -%if %{with_kmp} -for flavor in %flavors_to_build; do -%if %{with_drivers_in_kmp} -krel=$(make -s -C %{kernel_source $flavor} kernelrelease) -cp -a /lib/modules/$krel/source/drivers/staging/hv $flavor -%else -rm -rfv $flavor -mkdir -p $flavor -cp %_sourcedir/hyper-v.dummy_ko.c $flavor/hyper-v.suse_kmp_dummy.c -cat $flavor/Makefile -EOF -obj-m += hyper-v.suse_kmp_dummy.o -EOF -%endif -cp %_sourcedir/Module.supported $flavor -make -C %{kernel_source $flavor} modules M=$PWD/$flavor -done -%endif %install -%if %{with_kmp} -export
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2012-11-02 17:36:58 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v, Maintainer is oher...@suse.com Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2012-10-23 19:37:43.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2012-11-02 17:36:59.0 +0100 @@ -1,0 +2,5 @@ +Fri Oct 26 17:13:40 CEST 2012 - oher...@suse.de + +- update hv_set_ifconfig to work with our ifcfg + +--- @@ -12 +17 @@ -- update kv_kvp_daemon to 3.7-rc1 state [fate#31441] +- update kv_kvp_daemon to 3.7-rc1 state [fate#314441] Other differences: -- ++ hyper-v.tools.hv.hv_set_ifconfig.sh ++ --- /var/tmp/diff_new_pack.bIqpxw/_old 2012-11-02 17:37:00.0 +0100 +++ /var/tmp/diff_new_pack.bIqpxw/_new 2012-11-02 17:37:00.0 +0100 @@ -1,7 +1,4 @@ #!/bin/bash - -# This example script activates an interface based on the specified -# configuration. # # In the interest of keeping the KVP daemon code free of distro specific # information; the kvp daemon code invokes this external script to configure @@ -10,13 +7,6 @@ # The only argument to this script is the configuration file that is to # be used to configure the interface. # -# Each Distro is expected to implement this script in a distro specific -# fashion. For instance on Distros that ship with Network Manager enabled, -# this script can be based on the Network Manager APIs for configuring the -# interface. -# -# This example script is based on a RHEL environment. -# # Here is the format of the ip configuration file: # # HWADDR=macaddr @@ -45,24 +35,49 @@ # is expected to return the configuration that is set via the SET # call. # - - - -echo IPV6INIT=yes $1 -echo NM_CONTROLLED=no $1 -echo PEERDNS=yes $1 -echo ONBOOT=yes $1 - -dhcp=$(grep DHCP $1 2/dev/null) -if [ $dhcp != ]; +cfg=$1 +if ! test -f ${cfg} then -echo BOOTPROTO=dhcp $1; + : expect configuration datafile as first argument + exit 1 +fi +# +( +unset DHCP +unset IF_NAME +. $1 +if test -z ${IF_NAME} +then + echo Missing IF_NAME= in ${cfg} + exit 1 +fi +# +t=`mktemp` +if test -z ${t} +then + exit 1 fi -cp $1 /etc/sysconfig/network-scripts/ - +_exit() { + rm -f ${t} +} +trap _exit EXIT +# +cat ${t} _EOF_ +# contents from $0 $* +`cat ${cfg}` +# +# additional options: +STARTMODE=auto +_EOF_ -interface=$(echo $1 | awk -F - '{ print $2 }') +if test ${DHCP} = yes +then + echo BOOTPROTO=dhcp ${t}; +fi -/sbin/ifdown $interface 2/dev/null -/sbin/ifup $interfac 2/dev/null +echo $0: working on network interface ifcfg-${IF_NAME} +cp -b ${t} /etc/sysconfig/network/ifcfg-${IF_NAME} +ifdown ${IF_NAME} -o hotplug +ifup ${IF_NAME} -o hotplug +) 21 | logger -t ${0##*/}[$PPID / $$] -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2012-10-23 19:37:42 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v, Maintainer is oher...@suse.com Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2012-09-05 09:17:13.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2012-10-23 19:37:43.0 +0200 @@ -1,0 +2,16 @@ +Sat Oct 13 11:40:30 CEST 2012 - oher...@suse.de + +- update hv_kvp_daemon + Return the full kernel version + Don't return loopback addresses + +--- +Thu Oct 4 15:14:05 CEST 2012 - oher...@suse.de + +- bump to version 4 +- update kv_kvp_daemon to 3.7-rc1 state [fate#31441] + support KVP IP Injection, helper scripts go to /usr/lib/hyper-v/bin: + hv_get_dhcp_info, hv_get_dns_info, hv_set_ifconfig +- remove usage of absolute paths in runlevel script + +--- @@ -7 +23 @@ - kernel + kernel [bnc#770763] Old: hyper-v.tools.hv.hv_kvp_daemon.c.patch New: full-kernel-version.patch hyper-v.tools.hv.hv_get_dhcp_info.sh hyper-v.tools.hv.hv_get_dns_info.sh hyper-v.tools.hv.hv_set_ifconfig.sh no-loopback.patch Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.dojl7T/_old 2012-10-23 19:37:46.0 +0200 +++ /var/tmp/diff_new_pack.dojl7T/_new 2012-10-23 19:37:46.0 +0200 @@ -39,7 +39,7 @@ Supplements: modalias(dmi*:svn*MicrosoftCorporation*:pn*VirtualMachine*:rn*VirtualMachine*) Supplements:modalias(pci:v1414d5353sv*sd*bc*sc*i*) Url:http://www.kernel.org -Version:3 +Version:4 Release:0 Source: Module.supported Source1:hyperv_pvdrivers.conf @@ -50,7 +50,12 @@ Source9:hyper-v.include.linux.hyperv.h Source10: hyper-v.tools.hv.hv_kvp_daemon.c Source11: hyper-v.init.sh -Patch761200:hyper-v.tools.hv.hv_kvp_daemon.c.patch +Source20: hyper-v.tools.hv.hv_get_dhcp_info.sh +Source21: hyper-v.tools.hv.hv_get_dns_info.sh +Source22: hyper-v.tools.hv.hv_set_ifconfig.sh +Patch0: full-kernel-version.patch +Patch1: no-loopback.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{with_kmp} %if %{with_drivers_in_kmp} @@ -84,7 +89,8 @@ cp -avL %{S:5} kvptest.ps1.txt cp -vL %{S:9} %{hv_kvp_daemon}.h cp -vL %{S:10} %{hv_kvp_daemon}.c -%patch761200 -p0 +%patch0 -p3 +%patch1 -p3 %build sed -i~ '/#include linux.hyperv.h/d' %{hv_kvp_daemon}.c @@ -125,6 +131,11 @@ %endif mkdir -p $RPM_BUILD_ROOT/usr/sbin install -m755 %{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin +mkdir -p $RPM_BUILD_ROOT/usr/lib/%{name}/bin +cp -avL %{S:20} $RPM_BUILD_ROOT/usr/lib/%{name}/bin/hv_get_dhcp_info +cp -avL %{S:21} $RPM_BUILD_ROOT/usr/lib/%{name}/bin/hv_get_dns_info +cp -avL %{S:22} $RPM_BUILD_ROOT/usr/lib/%{name}/bin/hv_set_ifconfig +chmod 755 $RPM_BUILD_ROOT/usr/lib/%{name}/bin/* mkdir -p $RPM_BUILD_ROOT/etc/init.d install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon} ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin/rc%{hv_kvp_daemon} @@ -145,6 +156,7 @@ /etc/init.d/%{hv_kvp_daemon} /usr/sbin/rc%{hv_kvp_daemon} /usr/sbin/%{hv_kvp_daemon} +/usr/lib/%{name} %post board_vendor= ++ full-kernel-version.patch ++ From: K. Y. Srinivasan k...@microsoft.com Subject: [PATCH 1/1] tools: hv: Return the full kernel version Date: Fri, 12 Oct 2012 16:40:10 -0700 Message-Id: 1350085210-11108-1-git-send-email-...@microsoft.com Currently, we are returning the same string for both OSBuildNumber and OSVersion keys. Return the full uts string for the OSBuild key since Windows does not impose any restrictions on this. Signed-off-by: K. Y. Srinivasan k...@microsoft.com Reviewed-by: Haiyang Zhang haiya...@microsoft.com Reported-by: Claudio Latini claudio.lat...@live.com --- tools/hv/hv_kvp_daemon.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c index 5959aff..6c7bcb9 100644 --- a/tools/hv/hv_kvp_daemon.c +++ b/tools/hv/hv_kvp_daemon.c @@ -88,6 +88,7 @@ static char *os_major = ; static char *os_minor = ; static char *processor_arch; static char *os_build; +static char *os_version; static char *lic_version = Unknown version; static struct utsname uts_buf; @@ -453,7 +454,9 @@ void kvp_get_os_info(void) char*p, buf[512]; uname(uts_buf); - os_build = uts_buf.release; + os_version = uts_buf.release; + os_build =
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2012-09-05 09:17:09 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v, Maintainer is oher...@suse.com Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2012-05-22 08:15:55.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2012-09-05 09:17:13.0 +0200 @@ -1,0 +2,8 @@ +Tue Sep 4 14:55:38 CEST 2012 - oher...@suse.de + +- remove restart_on_update in postun section + the daemon can not be restarted at this point, and the new daemon + may not be 100 percent compatible with the currently running + kernel + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.4HqSWH/_old 2012-09-05 09:17:15.0 +0200 +++ /var/tmp/diff_new_pack.4HqSWH/_new 2012-09-05 09:17:15.0 +0200 @@ -171,7 +171,7 @@ %stop_on_removal %{hv_kvp_daemon} %postun -%restart_on_update %{hv_kvp_daemon} +# no restart on update because the daemon can not be restarted %insserv_cleanup %changelog -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2012-05-22 08:15:53 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v, Maintainer is oher...@suse.com Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2012-05-08 11:14:45.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2012-05-22 08:15:55.0 +0200 @@ -1,0 +2,5 @@ +Wed May 16 20:44:36 CEST 2012 - oher...@suse.de + +- check origin of netlink messages, use recvfrom() [bnc#761200] + +--- @@ -15,0 +21,6 @@ + +--- +Thu Dec 8 17:46:21 CET 2011 - oher...@suse.de + +- do not package modprobe.conf rule in main package + prevents loading of ata_piix which is required for cdrom access New: hyper-v.tools.hv.hv_kvp_daemon.c.patch Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.EbAgvQ/_old 2012-05-22 08:15:57.0 +0200 +++ /var/tmp/diff_new_pack.EbAgvQ/_new 2012-05-22 08:15:57.0 +0200 @@ -17,6 +17,7 @@ %define with_kmp 0 +%define with_modprobe 0 %if %{with_kmp} %define with_drivers_in_kmp 0 %endif @@ -49,6 +50,7 @@ Source9:hyper-v.include.linux.hyperv.h Source10: hyper-v.tools.hv.hv_kvp_daemon.c Source11: hyper-v.init.sh +Patch761200:hyper-v.tools.hv.hv_kvp_daemon.c.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{with_kmp} %if %{with_drivers_in_kmp} @@ -82,11 +84,14 @@ cp -avL %{S:5} kvptest.ps1.txt cp -vL %{S:9} %{hv_kvp_daemon}.h cp -vL %{S:10} %{hv_kvp_daemon}.c -sed -i~ '/#include linux.hyperv.h/d' %{hv_kvp_daemon}.c +%patch761200 -p0 %build +sed -i~ '/#include linux.hyperv.h/d' %{hv_kvp_daemon}.c gcc \ $RPM_OPT_FLAGS \ + -Wno-unused-variable \ + -Wno-pointer-sign \ -g \ %{hv_kvp_daemon}.c \ -include %{hv_kvp_daemon}.h \ @@ -123,16 +128,20 @@ mkdir -p $RPM_BUILD_ROOT/etc/init.d install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon} ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin/rc%{hv_kvp_daemon} +%if %{with_modprobe} mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d install -m644 %SOURCE1 $RPM_BUILD_ROOT/etc/modprobe.d/hyperv_pvdrivers.conf +%endif %files %defattr (-,root,root) %doc kvptest.ps1.txt +%if %{with_modprobe} %if !%{with_kmp} %dir /etc/modprobe.d %config /etc/modprobe.d/hyperv_pvdrivers.conf %endif +%endif /etc/init.d/%{hv_kvp_daemon} /usr/sbin/rc%{hv_kvp_daemon} /usr/sbin/%{hv_kvp_daemon} ++ hyper-v.tools.hv.hv_kvp_daemon.c.patch ++ --- hv_kvp_daemon.c.orig2012-05-16 20:11:10.0 +0200 +++ hv_kvp_daemon.c 2012-05-16 20:40:08.0 +0200 @@ -701,14 +701,16 @@ int main(void) pfd.fd = fd; while (1) { + struct sockaddr *addr_p = (struct sockaddr *) addr; + socklen_t addr_l = sizeof(addr); pfd.events = POLLIN; pfd.revents = 0; poll(pfd, 1, -1); - len = recv(fd, kvp_recv_buffer, sizeof(kvp_recv_buffer), 0); + len = recvfrom(fd, kvp_recv_buffer, sizeof(kvp_recv_buffer), 0, addr_p, addr_l); - if (len 0) { - syslog(LOG_ERR, recv failed; error:%d, len); + if (len 0 || addr.nl_pid) { + syslog(LOG_ERR, recvfrom failed; pid:%u error:%d %s, addr.nl_pid, errno, strerror(errno)); close(fd); return -1; } -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org
commit hyper-v for openSUSE:Factory
Hello community, here is the log from the commit of package hyper-v for openSUSE:Factory checked in at 2012-05-08 11:14:44 Comparing /work/SRC/openSUSE:Factory/hyper-v (Old) and /work/SRC/openSUSE:Factory/.hyper-v.new (New) Package is hyper-v, Maintainer is oher...@suse.com Changes: --- /work/SRC/openSUSE:Factory/hyper-v/hyper-v.changes 2012-03-29 07:45:30.0 +0200 +++ /work/SRC/openSUSE:Factory/.hyper-v.new/hyper-v.changes 2012-05-08 11:14:45.0 +0200 @@ -1,0 +2,5 @@ +Wed May 2 12:13:03 CEST 2012 - oher...@suse.de + +- update insserv part, see comments in OBS submit request #112701 + +--- Other differences: -- ++ hyper-v.spec ++ --- /var/tmp/diff_new_pack.nEZuwj/_old 2012-05-08 11:14:46.0 +0200 +++ /var/tmp/diff_new_pack.nEZuwj/_new 2012-05-08 11:14:46.0 +0200 @@ -1,7 +1,7 @@ # # spec file for package hyper-v # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild %define with_kmp 0 %if %{with_kmp} @@ -25,15 +24,17 @@ Name: hyper-v %if %{with_kmp} -BuildRequires: kernel-default-devel module-init-tools +BuildRequires: kernel-default-devel +BuildRequires: module-init-tools %ifarch %ix86 BuildRequires: kernel-pae-devel %endif %endif ExclusiveArch: %ix86 x86_64 PreReq: %insserv_prereq -Group: System/Kernel Summary:Microsoft Hyper-V tools +License:GPL-2.0 +Group: System/Kernel Supplements: modalias(dmi*:svn*MicrosoftCorporation*:pn*VirtualMachine*:rn*VirtualMachine*) Supplements:modalias(pci:v1414d5353sv*sd*bc*sc*i*) Url:http://www.kernel.org @@ -48,7 +49,6 @@ Source9:hyper-v.include.linux.hyperv.h Source10: hyper-v.tools.hv.hv_kvp_daemon.c Source11: hyper-v.init.sh -License:GPL-2.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build %if %{with_kmp} %if %{with_drivers_in_kmp} @@ -67,9 +67,8 @@ %package KMP - -Group: System/Kernel Summary:Microsoft Hyper-V drivers +Group: System/Kernel %description KMP This package contains the Microsoft Hyper-V drivers. @@ -156,9 +155,7 @@ if test ${board_vendor} = Microsoft Corporation -a ${product_name} = Virtual Machine then echo Enabling %{hv_kvp_daemon} on '${product_name}' from '${board_vendor}' - %{fillup_and_insserv -Y %{hv_kvp_daemon}} -else - %{fillup_and_insserv %{hv_kvp_daemon}} + %{insserv_force_if_yast %{hv_kvp_daemon}} fi %preun -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org