Group :: Sistema/Servidores
RPM: vzmigrate
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: vzmigrate-7.0.150.patch
Download
Download
.gear/rules | 2 +
.../tags/e838c1ce8033d2922cba6bab7bec792b1297054a | 6 +
.gear/tags/list | 1 +
Makefile | 10 +-
Makefile.inc | 8 +-
bin/bincom.cpp | 2 +-
bin/migchannel.cpp | 4 +-
bin/migratecom.cpp | 4 +-
bin/migsrclocal.cpp | 2 +-
bin/migsrcremote.cpp | 1 +
bin/migssh.cpp | 1 +
bin/vzmd.cpp | 2 +-
bin/vzmigrate.c | 4 +-
vzmigrate.spec | 156 +++++++++++++++++++++
14 files changed, 185 insertions(+), 18 deletions(-)
diff --git a/.gear/rules b/.gear/rules
new file mode 100644
index 0000000..26340af
--- /dev/null
+++ b/.gear/rules
@@ -0,0 +1,2 @@
+tar: v@version@:.
+diff: v@version@:. . name=@name@-@version@.patch
diff --git a/.gear/tags/e838c1ce8033d2922cba6bab7bec792b1297054a b/.gear/tags/e838c1ce8033d2922cba6bab7bec792b1297054a
new file mode 100644
index 0000000..f9d1232
--- /dev/null
+++ b/.gear/tags/e838c1ce8033d2922cba6bab7bec792b1297054a
@@ -0,0 +1,6 @@
+object f7379d3dd5ad0063c03a69a8efadc9f4753de410
+type commit
+tag v7.0.150
+tagger Apache <apache@kojihub.eng.sw.ru> 1680639165 +0300
+
+AUTO v7.0.150 tag
diff --git a/.gear/tags/list b/.gear/tags/list
new file mode 100644
index 0000000..b2001db
--- /dev/null
+++ b/.gear/tags/list
@@ -0,0 +1 @@
+e838c1ce8033d2922cba6bab7bec792b1297054a v7.0.150
diff --git a/Makefile b/Makefile
index c1c3994..c909f01 100644
--- a/Makefile
+++ b/Makefile
@@ -27,11 +27,11 @@ clean::
find . -name "*.depend" | xargs rm -f
#version ?= 2.5.0
-sbindir ?= /usr/sbin/
-mandir ?= /usr/share/man/
-#migdir ?= /usr/share/vzmigrate-${version}/
-datadir ?= /usr/share/pmigrate/
-logrotatedir ?= /etc/logrotate.d/
+sbindir ?= /usr/sbin
+mandir ?= /usr/share/man
+#migdir ?= /usr/share/vzmigrate-${version}
+datadir ?= /usr/share/pmigrate
+logrotatedir ?= /etc/logrotate.d
include ${VZMROOT}/Makefile.inc
diff --git a/Makefile.inc b/Makefile.inc
index 9d5763f..18e30d9 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -9,10 +9,10 @@ __ia64__=true
endif
LIBVZM = libvzm.a
-LIBVZ_SRC = -Wl,-Bstatic -lvzsock -Wl,-Bdynamic -luuid -lvzctl2 -ldl \
+LIBVZ_SRC = -Wl,-Bdynamic -lvzsock -luuid -lvzctl2 -ldl \
-lploop -lboost_system -lboost_thread -lzstd
LIBVZ_TEMPL = ${LIBVZ_SRC} -lvztt
-LIBVZ_DST = -Wl,-Bstatic -lvzsock -Wl,-Bdynamic -luuid -lvzctl2 -ldl -lvztt \
+LIBVZ_DST = -Wl,-Bdynamic -lvzsock -luuid -lvzctl2 -ldl -lvztt \
-lploop -lboost_system -lboost_thread -lzstd
LIBDIR = ${VZMROOT}/lib
@@ -42,7 +42,7 @@ INCFLAGS += -I/usr/kerberos/include
CC = gcc
-MFLAGS = -pthread -Werror -Wall -W -Wformat -g ${INCFLAGS} ${VZFS} -Wno-unused-parameter -Wno-missing-field-initializers
+MFLAGS = -pthread -Wall -W -Wformat -g ${INCFLAGS} ${VZFS} -Wno-unused-parameter -Wno-missing-field-initializers -Wno-error=cpp -Wno-error=format-truncation
MFLAGS += -D_FILE_OFFSET_BITS=64 -DNDEBUG -D_VZLIN_ -DBOOST_BIND_GLOBAL_PLACEHOLDERS
# -pg
@@ -83,4 +83,4 @@ install::
DEPEND_FILE ?= .depend
-include ${DEPEND_FILE}
+-include ${DEPEND_FILE}
diff --git a/bin/bincom.cpp b/bin/bincom.cpp
index cbca9e1..95f471e 100644
--- a/bin/bincom.cpp
+++ b/bin/bincom.cpp
@@ -143,7 +143,7 @@ ctid_t g_keeperCTID = "\0";
" -r, --remove-area yes|no Remove/Don't Remove private area on source node for\n"\
" successfully migrated CT. Command-line option\n"\
" overrides configuration parameter REMOVEMIGRATED\n"\
-" in @PRODUCT_NAME_LONG@ config file (see vz(5)).\n" \
+" in OpenVZ config file (see vz(5)).\n" \
" -s, --nostart Do not attempt to restore CT state (start/mount\n" \
" CT) after successful migration on destination node,\n" \
" when it was running/mounted on source node. It means\n" \
diff --git a/bin/migchannel.cpp b/bin/migchannel.cpp
index 28ff02d..7138aa6 100644
--- a/bin/migchannel.cpp
+++ b/bin/migchannel.cpp
@@ -392,6 +392,8 @@ int MigrateChannel::sendPkt(char separator, const char * str, va_list ap)
"can't send : too long message");
buffer[rc] = separator;
+ logger(LOG_DEBUG, "Send command: %s", buffer);
+
return sendBuf(buffer, rc + 1);
}
@@ -518,7 +520,7 @@ int MigrateChannel::sendCommand(const char * str, ...)
{
va_list ap;
va_start(ap, str);
- logger(LOG_DEBUG, "Send command: %s", str);
+ // logger(LOG_DEBUG, "Send command: %s", str, ap);
int rc = sendPkt(PACKET_SEPARATOR, str, ap);
va_end(ap);
if (rc != 0)
diff --git a/bin/migratecom.cpp b/bin/migratecom.cpp
index e220f36..056f6ac 100644
--- a/bin/migratecom.cpp
+++ b/bin/migratecom.cpp
@@ -271,7 +271,7 @@ void MigrateStateCommon::addCleanerRename(const char * src, const char * dest, i
addCleaner(clean_rename, src_path, dst_path, success);
logger(LOG_DEBUG, "add '%s' rename cleaner : %s -> %s",
- success ? "on success" : "on failure", src_path, dst_path);
+ success ? "on success" : "on failure", src_path ? src_path : "", dst_path);
}
int MigrateStateCommon::clean_delVeobj(const void * arg, const void *)
@@ -360,7 +360,7 @@ const char ** MigrateStateCommon::getRsyncArgs()
static char sIOLimitKBPS[32];
int i = 0;
- rsync_args[i++] = "rsync";
+ rsync_args[i++] = "rsync-ovz";
rsync_args[i++] = "-q";
rsync_args[i++] = "-a";
rsync_args[i++] = "-H";
diff --git a/bin/migsrclocal.cpp b/bin/migsrclocal.cpp
index 9d82bc3..10ed165 100644
--- a/bin/migsrclocal.cpp
+++ b/bin/migsrclocal.cpp
@@ -812,7 +812,7 @@ static int copy_local(const char *src, const char *dst,
logger(LOG_ERR, "Copy %s %s", src, dst);
string_list_init(&args);
- string_list_add(&args, (char *)"rsync");
+ string_list_add(&args, (char *)"rsync-ovz");
string_list_add(&args, (char *)"-aHS");
if (exclude) {
struct string_list_el *elem;
diff --git a/bin/migsrcremote.cpp b/bin/migsrcremote.cpp
index fde041b..f70bfb8 100644
--- a/bin/migsrcremote.cpp
+++ b/bin/migsrcremote.cpp
@@ -38,6 +38,7 @@
#include <sys/ioctl.h>
#include <linux/fs.h>
#include <linux/types.h>
+#include <sys/sysmacros.h>
#include <vzctl/libvzctl.h>
diff --git a/bin/migssh.cpp b/bin/migssh.cpp
index 0be7e92..4cbf239 100644
--- a/bin/migssh.cpp
+++ b/bin/migssh.cpp
@@ -35,6 +35,7 @@
#include "util.h"
#include "channel.h"
#include "migssh.h"
+#include <ctime>
#include "common.h"
#include "bincom.h"
diff --git a/bin/vzmd.cpp b/bin/vzmd.cpp
index a101583..2fcbaeb 100644
--- a/bin/vzmd.cpp
+++ b/bin/vzmd.cpp
@@ -278,7 +278,7 @@ cleanup_0:
static void usage()
{
- fprintf(stderr, "@PRODUCT_NAME_LONG@ vzmigrate daemon\n");
+ fprintf(stderr, "OpenVZ vzmigrate daemon\n");
fprintf(stderr, "Usage:\n");
fprintf(stderr, "%s [-v] [-t]\n", progname);
fprintf(stderr, "%s -h\n", progname);
diff --git a/bin/vzmigrate.c b/bin/vzmigrate.c
index f558274..adec18f 100644
--- a/bin/vzmigrate.c
+++ b/bin/vzmigrate.c
@@ -148,7 +148,7 @@ static int call_pmigrate(char *src_ct, char *dst_hn, char *dst_ct, char **narg)
" -r, --remove-area yes|no Remove/Don't Remove private area on source node for\n"\
" successfully migrated CT. Command-line option\n"\
" overrides configuration parameter REMOVEMIGRATED\n"\
-" in @PRODUCT_NAME_LONG@ config file (see vz(5)).\n" \
+" in OpenVZ config file (see vz(5)).\n" \
" -h, --help Get usage info.\n" \
" -s, --nostart Do not attempt to restore CT state (start/mount\n" \
" CT) after successful migration on destination node,\n" \
@@ -206,8 +206,6 @@ static int call_pmigrate(char *src_ct, char *dst_hn, char *dst_ct, char **narg)
static void usage(void)
{
fprintf(stderr, VZMIGRATE_USAGE, "vzmigrate");
- fprintf(stderr, "The vzmigrate utility is deprecated.\n");
- fprintf(stderr, "Please, consider switching to the prlctl utility.\n");
exit(1);
}
diff --git a/vzmigrate.spec b/vzmigrate.spec
new file mode 100644
index 0000000..0c8f55d
--- /dev/null
+++ b/vzmigrate.spec
@@ -0,0 +1,156 @@
+%define _libexecdir /usr/libexec
+%define vzdir /etc/vz
+%define confdir %vzdir/conf
+%define namesdir %vzdir/names
+%define lockdir /var/lib/vz/lock
+%define vzctl_lockdir /var/lock/vzctl
+%define spooldir /var/lib/vz
+%define netdir /etc/sysconfig/network-scripts
+%define bashcompldir /etc/bash_completion.d
+
+Name: vzmigrate
+Version: 7.0.150
+Release: alt1
+
+Summary: Virtuozzo migration tool
+License: GPLv2+
+Group: System/Servers
+Url: https://src.openvz.org/scm/ovz/vzmigrate.git
+
+Source: %name-%version.tar
+Patch: %name-%version.patch
+
+ExclusiveArch: x86_64
+
+Requires: ploop >= 7.0.160
+# Requires: network-config-subsystem
+Requires: libvzctl >= 7.0.645
+Requires: tar
+Requires: rsync-ovz
+Requires: phaul-ovz
+Requires: vztt
+
+Provides: pmigrate.c2c = %EVR
+
+BuildRequires: gcc-c++
+BuildRequires: glibc-devel libuuid-devel
+BuildRequires: systemd-devel libudev-devel
+BuildRequires: libvzctl-devel >= 7.0.535
+BuildRequires: libvzsock-devel
+BuildRequires: libssl-devel openssl libkrb5-devel
+BuildRequires: libploop-devel >= 7.0.160
+BuildRequires: libvztt-devel
+BuildRequires: libzstd-devel
+BuildRequires: kernel-headers-ovz-el7 >= 3.10.0
+BuildRequires: boost-asio-devel boost-devel boost-devel-headers
+
+%description
+%summary
+
+%prep
+%setup
+%patch -p1
+
+%build
+%make_build
+
+%install
+make install \
+ DESTDIR=%buildroot \
+ SBINDIR=%_sbindir \
+ MANDIR=%_mandir \
+ SYSTEMDDIR=%_unitdir \
+ NETSCRIPTDIR=%netdir \
+ VZDIR=%vzdir \
+ CONFDIR=%confdir \
+ VZLOCKDIR=%lockdir \
+ VZCTLLOCKDIR=%vzctl_lockdir \
+ VZSPOOLDIR=%spooldir \
+ BASHCOMPLDIR=%bashcompldir \
+ LOGRDIR=%_logrotatedir
+
+%files
+%_sbindir/*
+%_man8dir/*
+%_datadir/%name/
+%_datadir/pmigrate/
+%config(noreplace) %_logrotatedir/%name
+%doc *.md
+
+%changelog
+* Wed Apr 05 2023 Andrew A. Vasilyev <andy@altlinux.org> 7.0.150-alt1
+- 7.0.150
+
+* Fri Mar 24 2023 Andrew A. Vasilyev <andy@altlinux.org> 7.0.149-alt3
+- FTBFS: add ctime prototype for GCC 12
+
+* Wed Nov 09 2022 Andrew A. Vasilyev <andy@altlinux.org> 7.0.149-alt2
+- use rsync-ovz with redirected descriptors
+- several logging and build fixes
+
+* Mon Jan 17 2022 Andrew A. Vasilyev <andy@altlinux.org> 7.0.149-alt1
+- 7.0.149
+
+* Fri Aug 06 2021 Andrew A. Vasilyev <andy@altlinux.org> 7.0.147-alt1
+- 7.0.147
+
+* Fri Jul 16 2021 Andrew A. Vasilyev <andy@altlinux.org> 7.0.145-alt1
+- 7.0.145
+
+* Tue May 04 2021 Andrew A. Vasilyev <andy@altlinux.org> 7.0.144-alt1
+- 7.0.144
+
+* Mon Mar 08 2021 Andrew A. Vasilyev <andy@altlinux.org> 7.0.143-alt1
+- 7.0.143
+
+* Sat Dec 19 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.139-alt1
+- 7.0.139
+
+* Tue Nov 03 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.138-alt1
+- 7.0.138
+
+* Mon Oct 05 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.135-alt1
+- 7.0.135
+
+* Mon Aug 03 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.133-alt1
+- 7.0.133
+
+* Thu Jul 23 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.131-alt1
+- 7.0.131
+
+* Wed Jun 24 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.129-alt1
+- 7.0.129
+
+* Thu Apr 30 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.128-alt1
+- 7.0.128
+
+* Thu Apr 23 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.126-alt1
+- 7.0.126
+
+* Fri Jan 10 2020 Andrew A. Vasilyev <andy@altlinux.org> 7.0.125-alt1
+- 7.0.125
+
+* Mon Nov 11 2019 Andrew A. Vasilyev <andy@altlinux.org> 7.0.124-alt6
+- fix FTB and C++11 warning
+
+* Tue Oct 01 2019 Andrew A. Vasilyev <andy@altlinux.org> 7.0.124-alt5
+- fix branding
+
+* Wed Sep 18 2019 Andrew A. Vasilyev <andy@altlinux.org> 7.0.124-alt4
+- fix double slashes in symlinks
+
+* Tue Sep 17 2019 Andrew A. Vasilyev <andy@altlinux.org> 7.0.124-alt3
+- remove deprecated cipher and message
+
+* Mon Aug 26 2019 Andrew A. Vasilyev <andy@altlinux.org> 7.0.124-alt2
+- fix build with static vzsock
+
+* Fri Aug 23 2019 Andrew A. Vasilyev <andy@altlinux.org> 7.0.124-alt1
+- 7.0.124
+
+* Mon Aug 19 2019 Andrew A. Vasilyev <andy@altlinux.org> 7.0.123-alt2
+- more specific requirements
+- revert define macros patch
+
+* Fri Aug 16 2019 Andrew A. Vasilyev <andy@altlinux.org> 7.0.123-alt1
+- Initial build for Sisyphus