Compare commits
10 Commits
a92c5ed22e
...
3be5612c65
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3be5612c65 | ||
|
|
68ce991e4b | ||
|
|
665b010d3d | ||
|
|
d4656e1edf | ||
|
|
ce7782b1d2 | ||
|
|
ea47f8efe1 | ||
|
|
ef02b79fd6 | ||
|
|
45251feea1 | ||
|
|
4c03b37d13 | ||
|
|
2e21144d16 |
@ -0,0 +1,12 @@
|
||||
diff -Nur a/src/partclone.c b/src/partclone.c
|
||||
--- a/src/partclone.c 2022-03-10 18:54:27.177629520 +0800
|
||||
+++ b/src/partclone.c 2022-03-10 18:54:05.473272293 +0800
|
||||
@@ -839,7 +839,7 @@
|
||||
if (log_exit)
|
||||
wattron(log_win, A_STANDOUT);
|
||||
|
||||
- wprintw(log_win, tmp_str);
|
||||
+ wprintw(log_win, "%s", tmp_str);
|
||||
|
||||
if (log_exit) {
|
||||
wattroff(log_win, A_STANDOUT);
|
||||
@ -1,27 +0,0 @@
|
||||
Backported patch by Robert Scheck <robert@fedoraproject.org> for partclone >= 0.3.12 which removes
|
||||
C99 syntax in for loop.
|
||||
|
||||
Upstream: https://github.com/Thomas-Tsai/partclone/commit/2cab14ef0c05fde5ef2daaf917ab31d5350e5635
|
||||
|
||||
--- partclone-0.3.12/src/main.c 2018-10-28 14:46:38.000000000 +0100
|
||||
+++ partclone-0.3.12/src/main.c.c99-for-loop 2019-07-23 01:02:45.280856010 +0200
|
||||
@@ -766,7 +766,8 @@
|
||||
// finish a piece
|
||||
SHA1_Final(hash, &ctx);
|
||||
dprintf(tinfo, "sha1: ");
|
||||
- for (int x = 0; x < SHA_DIGEST_LENGTH; x++) {
|
||||
+ int x = 0;
|
||||
+ for (x = 0; x < SHA_DIGEST_LENGTH; x++) {
|
||||
dprintf(tinfo, "%02x", hash[x]);
|
||||
}
|
||||
dprintf(tinfo, "\n");
|
||||
@@ -818,7 +819,8 @@
|
||||
if (sha_length) {
|
||||
SHA1_Final(hash, &ctx);
|
||||
dprintf(tinfo, "sha1: ");
|
||||
- for (int x = 0; x < SHA_DIGEST_LENGTH; x++) {
|
||||
+ int x = 0;
|
||||
+ for (x = 0; x < SHA_DIGEST_LENGTH; x++) {
|
||||
dprintf(tinfo, "%02x", hash[x]);
|
||||
}
|
||||
dprintf(tinfo, "\n");
|
||||
56
partclone-0.3.12-gcc10.patch
Normal file
56
partclone-0.3.12-gcc10.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 7638e1937083f6da076e5c469c14acc32f65ba49 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Scheck <robert@fedoraproject.org>
|
||||
Date: Sun, 2 Feb 2020 23:13:06 +0100
|
||||
Subject: [PATCH] Declare variables as extern in headers (fixes #136)
|
||||
|
||||
GCC 10 compatibility as per https://gcc.gnu.org/gcc-10/porting_to.html
|
||||
|
||||
See also:
|
||||
- https://github.com/Thomas-Tsai/partclone/issues/136
|
||||
- https://github.com/Thomas-Tsai/partclone/pull/137
|
||||
---
|
||||
src/partclone.c | 1 +
|
||||
src/partclone.h | 4 ++--
|
||||
src/xfsclone.c | 2 +-
|
||||
3 files changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/partclone.c b/src/partclone.c
|
||||
index 98365043..e264cbb1 100644
|
||||
--- a/src/partclone.c
|
||||
+++ b/src/partclone.c
|
||||
@@ -55,6 +55,7 @@
|
||||
|
||||
|
||||
FILE* msg = NULL;
|
||||
+unsigned long long rescue_write_size;
|
||||
#ifdef HAVE_LIBNCURSESW
|
||||
#include <ncurses.h>
|
||||
WINDOW *log_win;
|
||||
diff --git a/src/partclone.h b/src/partclone.h
|
||||
index 5188e290..3dc2ef1b 100644
|
||||
--- a/src/partclone.h
|
||||
+++ b/src/partclone.h
|
||||
@@ -80,8 +80,8 @@ const char* get_exec_name();
|
||||
#undef crc32
|
||||
#endif
|
||||
|
||||
-char *EXECNAME;
|
||||
-unsigned long long rescue_write_size;
|
||||
+extern char *EXECNAME;
|
||||
+extern unsigned long long rescue_write_size;
|
||||
|
||||
/**
|
||||
* option
|
||||
diff --git a/src/xfsclone.c b/src/xfsclone.c
|
||||
index 522431ab..6f807e90 100644
|
||||
--- a/src/xfsclone.c
|
||||
+++ b/src/xfsclone.c
|
||||
@@ -24,7 +24,7 @@
|
||||
#undef crc32
|
||||
int source_fd = -1;
|
||||
int first_residue;
|
||||
-progress_bar prog;
|
||||
+extern progress_bar prog;
|
||||
unsigned long long checked;
|
||||
unsigned long long total_block;
|
||||
int bitmap_done = 0;
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: Utility to clone and restore a partition
|
||||
Name: partclone
|
||||
Version: 0.3.12
|
||||
Release: 1
|
||||
Release: 4
|
||||
# Partclone itself is GPLv2+ but uses other source codes, breakdown:
|
||||
# GPLv3+: fail-mbr/fail-mbr.S
|
||||
# GPLv2 and GPLv2+: src/btrfs*
|
||||
@ -17,7 +17,9 @@ Release: 1
|
||||
License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2 and LGPLv2+
|
||||
URL: http://partclone.org/
|
||||
Source0: https://github.com/Thomas-Tsai/partclone/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
Patch0: partclone-0.3.12-c99-for-loop.patch
|
||||
Patch0: partclone-0.3.12-gcc10.patch
|
||||
#https://github.com/Thomas-Tsai/partclone/commit/5c2f2fc71e6d4569bc94c4d6c265a01a5ef6bf1a
|
||||
Patch1: Apply-suggestoin-about-wprintw-and-autoupdate-from-Geroges.pacth
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: fuse-devel
|
||||
@ -30,6 +32,7 @@ BuildRequires: libblkid-devel
|
||||
BuildRequires: e2fsprogs
|
||||
BuildRequires: ntfsprogs
|
||||
BuildRequires: dosfstools
|
||||
BuildRequires: hfsplus-tools
|
||||
%endif
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@ -41,8 +44,7 @@ and is designed for higher compatibility of the file system by using existing
|
||||
libraries, e.g. e2fslibs is used to read and write the ext2 partition.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .c99-for-loop
|
||||
%autosetup -p1
|
||||
autoreconf -i -f
|
||||
|
||||
%build
|
||||
@ -67,6 +69,9 @@ autoreconf -i -f
|
||||
--enable-minix \
|
||||
--enable-ncursesw \
|
||||
--enable-fs-test
|
||||
# https://forum.slitaz.org/topic/parclone-needs-to-be-rebuilded
|
||||
sed -i 's|exit 1|exit 0|' fail-mbr/compile-mbr.sh
|
||||
|
||||
%make_build
|
||||
|
||||
%install
|
||||
@ -116,5 +121,14 @@ make check || (cat tests/test-suite.log; exit 1)
|
||||
%{_mandir}/man8/%{name}*.8*
|
||||
|
||||
%changelog
|
||||
* Thu Mar 10 2022 liyanan <liyanan32@huawei.com> - 0.3.12-4
|
||||
- Fix build error
|
||||
|
||||
* Tue Aug 3 2021 weidong <weidong@uniontech.com> - 0.3.12-3
|
||||
- Fix link failuer with gcc-10
|
||||
|
||||
* Fri Nov 6 2020 weidong <weidong@uniontech.com> - 0.3.12-2
|
||||
- Modify buildrequires
|
||||
|
||||
* Fri Aug 7 2020 weidong <weidong@uniontech.com> - 0.3.12-1
|
||||
- Initial release for OpenEuler
|
||||
|
||||
4
partclone.yaml
Normal file
4
partclone.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: Thomas-Tsai/partclone
|
||||
tag_prefix: ""
|
||||
seperator: "."
|
||||
Loading…
x
Reference in New Issue
Block a user