[packages/ploop] - up to 8.0.55

baggins baggins at pld-linux.org
Thu Oct 14 21:18:39 CEST 2021


commit 5d7a81e0df547318d0de33cc7797cf0c87a9fd1e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Oct 14 21:18:20 2021 +0200

    - up to 8.0.55

 no-Werror.patch   |  11 +++
 ploop-gcc.patch   |  53 ------------
 ploop-types.patch | 249 ------------------------------------------------------
 ploop.spec        |  13 ++-
 4 files changed, 17 insertions(+), 309 deletions(-)
---
diff --git a/ploop.spec b/ploop.spec
index dc77aad..237c2be 100644
--- a/ploop.spec
+++ b/ploop.spec
@@ -1,16 +1,15 @@
 Summary:	Tools for ploop devices and images
 Summary(pl.UTF-8):	Narzędzia do urządzeń i obrazów ploop
 Name:		ploop
-Version:	8.0.14
-Release:	2
+Version:	8.0.55
+Release:	1
 License:	GPL v2+
 Group:		Applications/System
 #Source0Download: https://github.com/OpenVZ/ploop/releases
 Source0:	https://github.com/OpenVZ/ploop/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	76bc12dd67ed9201d02bc156fbb6a17a
-Patch0:		%{name}-types.patch
-Patch1:		%{name}-python.patch
-Patch2:		%{name}-gcc.patch
+# Source0-md5:	02b49c7cc117d3181e1cd109a34d3afc
+Patch0:		%{name}-python.patch
+Patch1:		no-Werror.patch
 URL:		https://wiki.openvz.org/Ploop
 BuildRequires:	libxml2-devel >= 2.0
 BuildRequires:	python3-devel >= 1:3.2
@@ -95,7 +94,6 @@ Interfejs Pythona 3 do biblioteki ploop.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 # honour %{_libexecdir} whatever it's set to
 %{__sed} -i -e '/exe = / s,/usr/libexec,%{_libexecdir},' scripts/crypthelper
@@ -146,6 +144,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_sbindir}/ploop-balloon
 %attr(755,root,root) %{_sbindir}/ploop-cbt
 %attr(755,root,root) %{_sbindir}/ploop-volume
+%attr(755,root,root) %{_sbindir}/ploop-e4defrag
 %dir %{_libexecdir}/ploop
 %attr(755,root,root) %{_libexecdir}/ploop/crypthelper
 /etc/modules-load.d/ploop.conf
diff --git a/no-Werror.patch b/no-Werror.patch
new file mode 100644
index 0000000..cd6278d
--- /dev/null
+++ b/no-Werror.patch
@@ -0,0 +1,11 @@
+--- ploop-8.0.55/Makefile.inc~	2021-07-30 15:50:27.000000000 +0200
++++ ploop-8.0.55/Makefile.inc	2021-10-14 21:13:59.483057578 +0200
+@@ -36,7 +36,7 @@
+ 
+ CFLAGS := $(if $(DEBUG),-g -O0 -DDEBUG,-O2) $(CFLAGS)
+ CFLAGS += -I. -I../include -fno-strict-aliasing \
+-	-Wall -Wstrict-prototypes -Werror -Wformat-security -Werror=format-truncation=0 \
++	-Wall -Wstrict-prototypes -Wformat-security -Werror=format-truncation=0 \
+ 	-D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
+ 	-DPRODUCT_NAME_SHORT=\"$(PRODUCT_NAME_SHORT)\"
+ CFLAGS += $(RPM_OPT_FLAGS) $(CPPFLAGS)
diff --git a/ploop-gcc.patch b/ploop-gcc.patch
deleted file mode 100644
index 62391ed..0000000
--- a/ploop-gcc.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-#--- ploop-8.0.14/lib/xml.c.orig	2020-06-19 13:24:40.000000000 +0200
-#+++ ploop-8.0.14/lib/xml.c	2020-06-28 14:39:06.351261541 +0200
-#@@ -554,7 +554,15 @@
-# 	}
-# 	root_element = xmlDocGetRootElement(doc);
-# 
-#+#if __GNUC__ >= 8
-#+#  pragma GCC diagnostic push
-#+#  pragma GCC diagnostic ignored "-Wstringop-truncation"
-#+	/* disable "specified bound ... equals destination size", which is OK here */
-#+#endif
-# 	get_basedir(fname, basedir, sizeof(basedir));
-#+#if __GNUC__ >= 8
-#+#  pragma GCC diagnostic pop
-#+#endif
-# 	ret = parse_xml(basedir, root_element, di);
-# 	if (ret == 0)
-# 		ret = validate_disk_descriptor(di);
-#@@ -697,7 +697,16 @@
-# 	if (di->runtime->xml_fname == NULL)
-# 		di->runtime->xml_fname = strdup(fname);
-# 
-#+#if __GNUC__ >= 8
-#+#  pragma GCC diagnostic push
-#+#  pragma GCC diagnostic ignored "-Wstringop-truncation"
-#+	/* disable "specified bound ... equals destination size", which is OK here */
-#+#endif
-# 	get_basedir(fname, tmp, sizeof(tmp));
-#+#if __GNUC__ >= 8
-#+#  pragma GCC diagnostic pop
-#+#endif
-#+
-# 	if (tmp[0] == '\0')
-# 		strcpy(tmp, "./");
-# 
---- ploop-8.0.14/lib/xml.c.orig	2020-06-28 15:30:04.941218766 +0200
-+++ ploop-8.0.14/lib/xml.c	2020-06-28 20:57:50.857172796 +0200
-@@ -433,7 +433,15 @@
- {
- 	char *p;
- 
-+#if __GNUC__ >= 8
-+#  pragma GCC diagnostic push
-+#  pragma GCC diagnostic ignored "-Wstringop-truncation"
-+	/* disable "specified bound ... equals destination size", which is OK here */
-+#endif
- 	strncpy(out, fname, len);
-+#if __GNUC__ >= 8
-+#  pragma GCC diagnostic pop
-+#endif
- 
- 	p = strrchr(out, '/');
- 	if (p != NULL)
diff --git a/ploop-types.patch b/ploop-types.patch
deleted file mode 100644
index b77af9a..0000000
--- a/ploop-types.patch
+++ /dev/null
@@ -1,249 +0,0 @@
---- ploop-8.0.14/lib/dm.c.orig	2020-06-19 13:24:40.000000000 +0200
-+++ ploop-8.0.14/lib/dm.c	2020-06-21 20:59:55.705329702 +0200
-@@ -234,7 +234,7 @@
- 	int rc;
- 	char m[64];
- 
--	snprintf(m, sizeof(m), "resize %lu", size);
-+	snprintf(m, sizeof(m), "resize %lld", (long long)size);
- 	rc = ploop_dm_message(devname, m, NULL);
- 	if (rc)
- 		ploop_err(errno, "Cann not resize %s", devname);
-@@ -718,8 +718,8 @@
- 	fds = alloca(n * sizeof(int));
- 	p = t;
- 	e = p + sizeof(t);
--	p += snprintf(p, e-p, "0 %lu ploop %d %s",
--			new_size, ffs(blocksize)-1, ldev);
-+	p += snprintf(p, e-p, "0 %lld ploop %d %s",
-+			(long long)new_size, ffs(blocksize)-1, ldev);
- 	for (i = 0; i < n-1; i++) {
- 		ploop_log(0, "Add delta %s (ro)", images[i]);
- 		fds[i] = open(images[i], O_DIRECT | O_RDONLY);
---- ploop-8.0.14/lib/check.c.orig	2020-06-19 13:24:40.000000000 +0200
-+++ ploop-8.0.14/lib/check.c	2020-06-21 21:05:55.003383218 +0200
-@@ -248,15 +248,15 @@
- 				return ret;
- 		}
- 
--		ploop_log(0, "Filling hole at start=%lu len=%lu",
--				(long unsigned)offset, (long unsigned)len);
-+		ploop_log(0, "Filling hole at start=%lld len=%lld",
-+				(long long)offset, (long long)len);
- 
- 		n = pwrite(*fd, buf, len, offset);
- 		if (n != len) {
- 			if (n >= 0)
- 				errno = EIO;
--			ploop_err(errno, "Failed to write offset=%lu len=%lu",
--					offset, len);
-+			ploop_err(errno, "Failed to write offset=%lld len=%lld",
-+					(long long)offset, (long long)len);
- 			return SYSEXIT_WRITE;
- 		}
- 	}
-@@ -282,8 +282,8 @@
- 		if (id >= rmap_size)
- 			continue;
- 		if (offset > data_offset && rmap[id] == PLOOP_ZERO_INDEX) {
--			ploop_log(0, "Restore the hole at offset=%lu len=%lu ID=%d",
--					offset, len, id);
-+			ploop_log(0, "Restore the hole at offset=%lld len=%lld ID=%d",
-+					(long long)offset, (long long)len, id);
- 			if (*log == 0) {
- 				*log = 1;
- 				print_output(0, "filefrag -vs", image);
-@@ -293,8 +293,8 @@
- 			}
- 
- 			if (fallocate(*fd, FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE, offset, len) == -1 ) {
--				ploop_err(errno, "Failed to fallocate offset=%lu len=%lu",
--						offset, len);
-+				ploop_err(errno, "Failed to fallocate offset=%lld len=%lld",
-+						(long long)offset, (long long)len);
- 				return SYSEXIT_WRITE;
- 			}
- 		}
-@@ -643,8 +643,8 @@
- 
- 	if ((off_t)alloc_head * cluster < stb.st_size) {
- 		if (!ro) {
--			ploop_log(0, "Max cluster: %d (image size %lu) trimming tail",
--					alloc_head, stb.st_size);
-+			ploop_log(0, "Max cluster: %d (image size %llu) trimming tail",
-+					alloc_head, (unsigned long long)stb.st_size);
- 			if (ftruncate(fd, (off_t)alloc_head * cluster)) {
- 				ploop_err(errno, "ftruncate");
- 				ret = SYSEXIT_FTRUNCATE;
---- ploop-8.0.14/lib/ploop.c.orig	2020-06-19 13:24:40.000000000 +0200
-+++ ploop-8.0.14/lib/ploop.c	2020-06-21 21:07:51.186087135 +0200
-@@ -227,7 +227,7 @@
- 		return 0;
- 	if (res >= 0)
- 		errno = EIO;
--	ploop_err(errno, "pread off=%lu size=%d", off, size);
-+	ploop_err(errno, "pread off=%lld size=%d", (long long)off, size);
- 
- 	return -1;
- }
-@@ -584,7 +584,7 @@
- 
- 	if (size_sec == 0) {
- 		ploop_err(0, "Incorrect block device size specified: "
--				"%lu sectors", (long)size_sec);
-+				"%lld sectors", (long long)size_sec);
- 		return SYSEXIT_PARAM;
- 	}
- 
-@@ -2662,7 +2662,7 @@
- 	if (ret)
- 		return ret;
- 
--	ploop_log(0, "Truncate %s %lu",	di->images[0]->file, S2B(new_end));
-+	ploop_log(0, "Truncate %s %lld", di->images[0]->file, (long long)S2B(new_end));
- 	if (truncate(di->images[0]->file, S2B(new_end))) {
- 		ploop_err(errno, "Failed to truncate %s",
- 				di->images[0]->file);
---- ploop-8.0.14/lib/fsutils.c.orig	2020-06-19 13:24:40.000000000 +0200
-+++ ploop-8.0.14/lib/fsutils.c	2020-06-21 21:08:15.102624235 +0200
-@@ -79,7 +79,7 @@
- 
- 	snprintf(partname, sizeof(partname), "%sp1",
- 			get_basename(devname));
--	snprintf(t, sizeof(t), "0 %lu linear %s 2048", size, devname);
-+	snprintf(t, sizeof(t), "0 %lld linear %s 2048", (long long)size, devname);
- 
- 	return run_prg(a);
- }
---- ploop-8.0.14/lib/ploop-copy.c.orig	2020-06-19 13:24:40.000000000 +0200
-+++ ploop-8.0.14/lib/ploop-copy.c	2020-06-21 21:08:46.532453965 +0200
-@@ -490,8 +490,8 @@
- 	if (h->stage == PLOOP_COPY_START &&
- 			(pos % (__u64)h->cluster) == 0 && (n % (size_t)h->cluster) == 0 &&
- 			is_zero_block(iobuf, n)) {
--		ploop_dbg(4, "Skip zero cluster block at offset %llu size %lu",
--				pos, n);
-+		ploop_dbg(4, "Skip zero cluster block at offset %llu size %lld",
-+				pos, (long long)n);
- 		return 0;
- 	}
- 
---- ploop-8.0.14/lib/cbt.c.orig	2020-06-19 13:24:40.000000000 +0200
-+++ ploop-8.0.14/lib/cbt.c	2020-06-22 22:09:31.217973374 +0200
-@@ -149,7 +149,7 @@
- 
- 		for (p = raw->m_L1; p < raw->m_L1 + raw->m_L1Size; ++p) {
- 			if (*p > 1)
--				free((void *) *p);
-+				free((void *)(intptr_t) *p);
- 		}
- 	}
- 
-@@ -623,7 +623,7 @@
- 		} else {
- 			*p = offset / SECTOR_SIZE;
- 			/// TODO: truncate instead of less write (blk size to cur_size)
--			if (PWRITE(delta, (void *)*in_p, block_size, offset)) {
-+			if (PWRITE(delta, (void *)(intptr_t)*in_p, block_size, offset)) {
- 				ploop_err(errno, "Can't write dirty_bitmap block");
- 				return SYSEXIT_WRITE;
- 			}
-@@ -752,7 +752,7 @@
- 				goto err;
- 			}
- 
--			*p = (__u64)block;
-+			*p = (__u64)(intptr_t)block;
- 		}
- 	}
- 
-@@ -887,9 +887,9 @@
- 				goto out;
- 		} else {
- 			if ((ret = cbt_set_dirty_bitmap_part(
--					devfd, raw->m_Id, (void *)*p, cur_size * 8, offset * 8, byte_granularity)))
-+					devfd, raw->m_Id, (void *)(intptr_t)*p, cur_size * 8, offset * 8, byte_granularity)))
- 				goto out;
--			free((void *)*p);
-+			free((void *)(intptr_t)*p);
- 			*p = 0;
- 		}
- 	}
-@@ -931,7 +931,7 @@
- 	if (PREAD(delta, block, block_size, vh->m_FormatExtensionOffset * SECTOR_SIZE)) {
- 		ploop_err(errno,  "Can't read optional header block, "
- 				  "offset: 0x%llx, size: 0x%lx",
--				  vh->m_FormatExtensionOffset, block_size);
-+				  vh->m_FormatExtensionOffset, (long)block_size);
- 		ret = SYSEXIT_READ;
- 		goto drop_optional_hdr;
- 	}
-@@ -1132,7 +1132,7 @@
- 		if (*p == 1)
- 			printf("1\n");
- 		else
--			dump_L1(p -  ctx->raw->m_L1, (__u64 *)*p, cur_size / sizeof(__u64));
-+			dump_L1(p -  ctx->raw->m_L1, (__u64 *)(intptr_t)*p, cur_size / sizeof(__u64));
- 	}
- }
- 
-@@ -1199,7 +1199,7 @@
- 		if (is_const_bit(block, cur_size, (int *)p))
- 			continue;
- 
--		*p = (__u64)block;
-+		*p = (__u64)(intptr_t)block;
- 		block = NULL;
- 	 }
- 
-@@ -1575,7 +1575,7 @@
- 
- 	for (i = 0; i < bmap->l1_size; ++i) {
- 		if (bmap->map[i] > 1)
--			free((void *)bmap->map[i]);
-+			free((void *)(intptr_t)bmap->map[i]);
- 	}
- 
- 	free(bmap);
-@@ -1632,7 +1632,7 @@
- 			}
- 
- 			pid = clu / clu_per_block;
--			bmap->map[pid] = (__u64)block;
-+			bmap->map[pid] = (__u64)(intptr_t)block;
- 			block = NULL;
- 		}
- 
-@@ -1640,7 +1640,7 @@
- 			continue;
- 
- 		__u32 x = clu % clu_per_block; 
--		BMAP_SET((void *)bmap->map[pid], x);
-+		BMAP_SET((void *)(intptr_t)bmap->map[pid], x);
- 	}
- 
- out:
---- ploop-8.0.14/lib/defrag.c.orig	2020-06-19 13:24:40.000000000 +0200
-+++ ploop-8.0.14/lib/defrag.c	2020-06-22 22:11:18.690724478 +0200
-@@ -47,8 +47,8 @@
- {
- 	off_t off = sizeof(struct ploop_pvd_header) + (clu * sizeof(__u32));
- 
--	ploop_log(0, "Update BAT cluster: %d off: %lu %d->%d",
--			clu, off, old, new);
-+	ploop_log(0, "Update BAT cluster: %d off: %lld %d->%d",
-+			clu, (long long)off, old, new);
- 	new <<= ploop_fmt_log(delta->version);
- 	return write_safe(delta->fd, &new, sizeof(new), off,
- 			"Cannot update BAT");
-@@ -65,8 +65,8 @@
- 	s = (off_t)src * cluster;
- 	d = (off_t)dst * cluster;
- 
--	ploop_log(0, "Reallocate cluster #%d data from %u/off: %lu to %u/off: %lu",
--			clu, src, s, dst, d);
-+	ploop_log(0, "Reallocate cluster #%d data from %u/off: %lld to %u/off: %lld",
-+			clu, src, (long long)s, dst, (long long)d);
- 	while (len) {
- 		int r = copy_file_range(delta->fd, &s, delta->fd, &d, len, 0);
- 		if (r <= 0) {
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ploop.git/commitdiff/5d7a81e0df547318d0de33cc7797cf0c87a9fd1e



More information about the pld-cvs-commit mailing list