Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package partclone for openSUSE:Factory checked in at 2026-11-11 16:30:22 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/partclone (Old) and /work/SRC/openSUSE:Factory/.partclone.new.3759290 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "partclone" Wed Nov 11 16:30:22 2026 rev:34 rq:1396885 version:0.3.53 Changes: -------- --- /work/SRC/openSUSE:Factory/partclone/partclone.changes 2026-10-30 18:23:29.659383554 +0100 +++ /work/SRC/openSUSE:Factory/.partclone.new.3759290/partclone.changes 2026-11-11 16:31:46.758106553 +0100 @@ -1,0 +2,9 @@ +Wed Nov 11 12:59:39 UTC 2026 - Martin Pluskal <[email protected]> + +- Update to 0.3.53: + * clone: fix read/write mismatch on partial last block, affecting + NTFS tail restores + * tests: fix exFAT last-cluster test on big-endian architectures + * build: fix undefined reference to pthread_join on RHEL 8 + +------------------------------------------------------------------- Old: ---- partclone-0.3.52.tar.gz New: ---- partclone-0.3.53.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ partclone.spec ++++++ --- /var/tmp/diff_new_pack.oqBX4p/_old 2026-11-11 16:31:47.954156734 +0100 +++ /var/tmp/diff_new_pack.oqBX4p/_new 2026-11-11 16:31:47.959156944 +0100 @@ -18,7 +18,7 @@ Name: partclone -Version: 0.3.52 +Version: 0.3.53 Release: 0 Summary: File System Clone Utilities License: GPL-2.0-or-later ++++++ partclone-0.3.52.tar.gz -> partclone-0.3.53.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/.github/workflows/c-cpp.yml new/partclone-0.3.53/.github/workflows/c-cpp.yml --- old/partclone-0.3.52/.github/workflows/c-cpp.yml 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/.github/workflows/c-cpp.yml 2026-11-11 04:41:11.000000000 +0100 @@ -21,7 +21,7 @@ sudo apt-get update sudo apt-get build-dep partclone sudo apt-get install build-essential autoconf automake autotools-dev libtool libtool-bin gettext intltool pkg-config - sudo apt-get install ntfs-3g f2fs-tools hfsprogs exfatprogs gddrescue reiser4progs libxxhash-dev libisal-dev liburcu-dev btrfs-progs liblz4-dev libzfslinux-dev libudev-dev libtirpc-dev + sudo apt-get install ntfs-3g f2fs-tools hfsprogs exfatprogs gddrescue libxxhash-dev libisal-dev liburcu-dev btrfs-progs liblz4-dev libzfslinux-dev libudev-dev libtirpc-dev - name: automake run: ./autogen - name: configure @@ -58,7 +58,9 @@ sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources sudo apt-get update sudo apt-get build-dep partclone - sudo apt-get install ntfs-3g f2fs-tools hfsprogs exfatprogs gddrescue reiser4progs libxxhash-dev libisal-dev liburcu-dev btrfs-progs + sudo apt-get install ntfs-3g f2fs-tools hfsprogs exfatprogs gddrescue libxxhash-dev libisal-dev liburcu-dev btrfs-progs + # optional: Ubuntu 26.04 static libcrypto references jitterentropy symbols + sudo apt-get install libjitterentropy3-dev || echo "::warning::libjitterentropy3-dev not available, static build may fail" - name: automake run: ./autogen - name: configure @@ -90,7 +92,7 @@ sudo apt-get update sudo apt-get build-dep partclone sudo apt-get install build-essential autoconf automake autotools-dev libtool libtool-bin gettext intltool pkg-config - sudo apt-get install ntfs-3g f2fs-tools hfsprogs exfatprogs gddrescue reiser4progs libisal-dev liburcu-dev btrfs-progs liblz4-dev libzfslinux-dev libudev-dev libtirpc-dev + sudo apt-get install ntfs-3g f2fs-tools hfsprogs exfatprogs gddrescue libisal-dev liburcu-dev btrfs-progs liblz4-dev libzfslinux-dev libudev-dev libtirpc-dev - name: automake run: ./autogen - name: configure @@ -127,7 +129,9 @@ sudo sed -i 's/^Types: deb$/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources sudo apt-get update sudo apt-get build-dep partclone - sudo apt-get install ntfs-3g f2fs-tools hfsprogs exfatprogs gddrescue reiser4progs libisal-dev liburcu-dev btrfs-progs + sudo apt-get install ntfs-3g f2fs-tools hfsprogs exfatprogs gddrescue libisal-dev liburcu-dev btrfs-progs + # optional: Ubuntu 26.04 static libcrypto references jitterentropy symbols + sudo apt-get install libjitterentropy3-dev || echo "::warning::libjitterentropy3-dev not available, static build may fail" - name: automake run: ./autogen - name: configure diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/.github/workflows/manual-on-host.yml new/partclone-0.3.53/.github/workflows/manual-on-host.yml --- old/partclone-0.3.52/.github/workflows/manual-on-host.yml 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/.github/workflows/manual-on-host.yml 2026-11-11 04:41:11.000000000 +0100 @@ -15,7 +15,7 @@ sudo apt-get update sudo apt-get build-dep -y partclone sudo apt-get install -y build-essential autoconf automake autotools-dev libtool libtool-bin gettext intltool pkg-config - sudo apt-get install -y f2fs-tools hfsprogs exfatprogs gddrescue libfuse3-dev fuse3 jfsutils reiser4progs hfsprogs hfsplus reiserfsprogs libxxhash-dev libisal-dev jfsutils libjfs-dev libufs2 ufsutils vmfs-tools libvmfs liburcu-dev btrfs-progs valgrind liblz4-dev libzfslinux-dev libudev-dev libtirpc-dev zfsutils-linux + sudo apt-get install -y f2fs-tools hfsprogs exfatprogs gddrescue libfuse3-dev fuse3 jfsutils hfsprogs hfsplus reiserfsprogs libxxhash-dev libisal-dev jfsutils libjfs-dev libufs2 ufsutils vmfs-tools libvmfs liburcu-dev btrfs-progs valgrind liblz4-dev libzfslinux-dev libudev-dev libtirpc-dev zfsutils-linux - name: automake run: ./autogen - name: configure diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/CONTRIBUTORS new/partclone-0.3.53/CONTRIBUTORS --- old/partclone-0.3.52/CONTRIBUTORS 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/CONTRIBUTORS 2026-11-11 04:41:11.000000000 +0100 @@ -1,10 +1,10 @@ - 1003 Thomas Tsai + 1010 Thomas Tsai 257 thomas 59 Patryck Rouleau 54 Kenji Okimoto 50 steven 47 c00jhs00 - 21 Robert Scheck + 23 Robert Scheck 21 tjjh89017 18 Leslie Zhai 17 Anton Samsonov diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/ChangeLog new/partclone-0.3.53/ChangeLog --- old/partclone-0.3.52/ChangeLog 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/ChangeLog 2026-11-11 04:41:11.000000000 +0100 @@ -1,5 +1,91 @@ +2026-11-05 Thomas Tsai <[email protected]> + + Merge pull request #324 from Thomas-Tsai/fix-321-rw-mismatch-partial-tail + clone: fix read/write mismatch on partial last block (NTFS tail) + + clone: fix read/write mismatch on partial last block (NTFS tail) + Since the fix for #310 (d39589a, 0.3.51) the clone loop clamps the read + of the last block at the device boundary and zero-fills the padded + remainder, but r_size kept the clamped length while the full padded + block is written to the image. The end-of-loop consistency check then + aborted the clone with "read(1536) and write(4096) different" whenever + the source device size was not a multiple of the 4096-byte block size, + leaving the image without its trailing checksum. + + Once the clamped read succeeds, account for the zero-filled padding by + reporting the whole block size in r_size. The rescue path already covers + the full padded buffer and is unchanged. + + Add tests/ntfs_partial_tail.test (no root needed): mkntfs on an image + of 64 MiB + 1536 bytes, clone (without -F so log_mesg really aborts on + error), restore, then compare the last sector and whole-image sha256. + + Fixes #321 + +2026-11-02 Thomas Tsai <[email protected]> + + build: link jitterentropy for static libcrypto on Ubuntu 26.04 + Static builds on ubuntu-latest (now Ubuntu 26.04) fail to link + partclone.info: OpenSSL 3.5's libcrypto.a references jent_* symbols + from libjitterentropy, which pkg-config --libs openssl does not emit. + + When --enable-static-linking is requested, probe for libjitterentropy + in configure and append -ljitterentropy to OPENSSL_LIBS if found, with + a warning otherwise (older distros neither have nor need the library). + Install libjitterentropy3-dev non-fatally in the CI static jobs; the + package exists in Ubuntu 26.04 universe and only Debian unstable/testing, + so the configure-side probe is the graceful fallback for other distros. + + build: auto-detect reiser4, drop unavailable reiser4progs from CI + Debian/Ubuntu no longer ship the reiser4progs package, breaking CI at + apt-get install and breaking default configure on systems without the + reiser4 headers. Turn the hard configure error into a warning that + disables reiser4 support when headers or libaal are missing, and stop + installing reiser4progs in the GitHub workflows. + + Merge pull request #323 from robert-scheck/s390x + tests: fix exFAT last-cluster test on big-endian architectures + +2026-11-02 Robert Scheck <[email protected]> + + tests: fix exFAT last-cluster test on big-endian architectures + Explicitly specify `--endian=little` for `od -t u4` when reading the exFAT cluster + count and cluster heap offset. Otherwise, `od` uses the host's native byte order, + resulting in incorrect offset calculations on s390x and causing the test to hang. + +2026-10-31 Thomas Tsai <[email protected]> + + Merge pull request #322 from robert-scheck/pthread + Fix undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' on RHEL 8 + +2026-10-31 Robert Scheck <[email protected]> + + Fix undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' on RHEL 8 + Commit b9f9a6e39b0c67fbe80aa2e1d524da24641a386e introduced a build-time failure on + CentOS/RHEL/Rocky Linux 8, because it ships glibc 2.28, where -lpthread is needed. + https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread + provides more information in general. + + /usr/bin/ld: partclone_dd-main.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' + //usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line + collect2: error: ld returned 1 exit status + + /usr/bin/ld: partclone_chkimg-main.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' + //usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line + collect2: error: ld returned 1 exit status + + /usr/bin/ld: partclone_imager-main.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' + //usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line + collect2: error: ld returned 1 exit status + + /usr/bin/ld: partclone_hfsp-main.o: undefined reference to symbol 'pthread_join@@GLIBC_2.2.5' + //usr/lib64/libpthread.so.0: error adding symbols: DSO missing from command line + collect2: error: ld returned 1 exit status + 2026-10-28 Thomas Tsai <[email protected]> + Bump version to 0.3.52 + Merge pull request #319 from Thomas-Tsai/fix/btrfs-bitmap-dedup fix(btrfs): deduplicate extents scanned more than once when building the bitmap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/configure.ac new/partclone-0.3.53/configure.ac --- old/partclone-0.3.52/configure.ac 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/configure.ac 2026-11-11 04:41:11.000000000 +0100 @@ -1,4 +1,4 @@ -AC_INIT([Partclone],[0.3.52],[[email protected]]) +AC_INIT([Partclone],[0.3.53],[[email protected]]) #condition for CPU target AC_CANONICAL_TARGET @@ -144,7 +144,7 @@ AC_MSG_RESULT([$fuse_version]) fi -AC_CHECK_LIB([pthread], [pthread_create], [:], AC_MSG_ERROR([*** pthread library (libpthread) not found])) +AC_CHECK_LIB([pthread], [pthread_create], [], AC_MSG_ERROR([*** pthread library (libpthread) not found])) ##ext2/3## AC_ARG_ENABLE([extfs], @@ -219,18 +219,23 @@ [--enable-reiser4], [enable Reiser4 file system]) ) -AM_CONDITIONAL(ENABLE_REISER4, test "$enable_reiser4" = yes) - if test "$enable_reiser4" = "yes"; then dnl Check for REISER4 dnl Check uuid library which depended by REISER4 AS_MESSAGE([checking for Reiser4 Library and Header files ... ...]) -AC_CHECK_HEADERS([reiser4/libreiser4.h], , - AC_MSG_ERROR([*** reiser4 header files (reiser4/libreiser4.h) not found]) +AC_CHECK_HEADERS([reiser4/libreiser4.h], [], + [AC_MSG_WARN([*** reiser4 header files (reiser4/libreiser4.h) not found, disabling reiser4 support]) + enable_reiser4="no"] ) +if test "$enable_reiser4" = "yes"; then AC_CHECK_LIB([aal], [aal_device_open], [:], - AC_MSG_ERROR([*** Reiser4 depend library (libaal) not found])) + [AC_MSG_WARN([*** Reiser4 depend library (libaal) not found, disabling reiser4 support]) + enable_reiser4="no"]) +fi +fi +AM_CONDITIONAL(ENABLE_REISER4, test "$enable_reiser4" = yes) +if test "$enable_reiser4" = "yes"; then supported_fs=$supported_fs" reiser4" reiser4_version="unknown, suggest 1.0.6" fi @@ -589,6 +594,12 @@ ##libcrypto## PKG_CHECK_MODULES([OPENSSL], [openssl],, [AC_MSG_ERROR([openssl not found])]) +dnl Static libcrypto from OpenSSL 3.5 (Ubuntu 26.04) references jitterentropy symbols +if test "$enable_static_linking" = yes; then + AC_CHECK_LIB([jitterentropy], [jent_entropy_collector_alloc], + [OPENSSL_LIBS="$OPENSSL_LIBS -ljitterentropy"], + [AC_MSG_WARN([static build: libjitterentropy not found - install libjitterentropy3-dev if libcrypto.a needs it])]) +fi save_LIBS="$LIBS" LIBS="$LIBS $OPENSSL_LIBS" AC_CHECK_FUNCS([EVP_MD_CTX_new EVP_MD_CTX_create EVP_MD_CTX_reset]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/po/de.po new/partclone-0.3.53/po/de.po --- old/partclone-0.3.52/po/de.po 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/po/de.po 2026-11-11 04:41:11.000000000 +0100 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Partclone 0.3.3\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2026-10-27 10:21+0800\n" +"POT-Creation-Date: 2026-11-11 11:40+0800\n" "PO-Revision-Date: 2023-05-15 18:40+0300\n" "Last-Translator: Stanislav Bolshakov <[email protected]>\n" "Language-Team: Deutsch\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/po/fr_FR.po new/partclone-0.3.53/po/fr_FR.po --- old/partclone-0.3.52/po/fr_FR.po 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/po/fr_FR.po 2026-11-11 04:41:11.000000000 +0100 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Partclone 0.2.9\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2026-10-27 10:21+0800\n" +"POT-Creation-Date: 2026-11-11 11:40+0800\n" "PO-Revision-Date: 2010-11-01 10:13+0100\n" "Last-Translator: \n" "Language-Team: French <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/po/ka.po new/partclone-0.3.53/po/ka.po --- old/partclone-0.3.52/po/ka.po 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/po/ka.po 2026-11-11 04:41:11.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: partclone 0.3.46\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2026-10-27 10:21+0800\n" +"POT-Creation-Date: 2026-11-11 11:40+0800\n" "PO-Revision-Date: 2026-03-22 08:16+0100\n" "Last-Translator: Ekaterine Papava <[email protected]>\n" "Language-Team: Georgian <(nothing)>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/po/partclone.pot new/partclone-0.3.53/po/partclone.pot --- old/partclone-0.3.52/po/partclone.pot 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/po/partclone.pot 2026-11-11 04:41:11.000000000 +0100 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: partclone 0.3.51\n" +"Project-Id-Version: partclone 0.3.52\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2026-10-27 10:21+0800\n" +"POT-Creation-Date: 2026-11-11 11:40+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/po/pt_BR.po new/partclone-0.3.53/po/pt_BR.po --- old/partclone-0.3.52/po/pt_BR.po 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/po/pt_BR.po 2026-11-11 04:41:11.000000000 +0100 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Partclone 0.3.44\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2026-10-27 10:21+0800\n" +"POT-Creation-Date: 2026-11-11 11:40+0800\n" "PO-Revision-Date: 2026-02-17 23:28-0300\n" "Last-Translator: Rafael Fontenelle <[email protected]>\n" "Language-Team: Brazilian Portuguese\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/po/ru.po new/partclone-0.3.53/po/ru.po --- old/partclone-0.3.52/po/ru.po 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/po/ru.po 2026-11-11 04:41:11.000000000 +0100 @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: Partclone 0.3.3\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2026-10-27 10:21+0800\n" +"POT-Creation-Date: 2026-11-11 11:40+0800\n" "PO-Revision-Date: 2023-05-15 18:47+0300\n" "Last-Translator: Stanislav Bolshakov <[email protected]>\n" "Language-Team: Russian\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/po/vi.po new/partclone-0.3.53/po/vi.po --- old/partclone-0.3.52/po/vi.po 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/po/vi.po 2026-11-11 04:41:11.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: partclone-0.2.61\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2026-10-27 10:21+0800\n" +"POT-Creation-Date: 2026-11-11 11:40+0800\n" "PO-Revision-Date: 2013-06-13 09:03+0700\n" "Last-Translator: Trần Ngọc Quân <[email protected]>\n" "Language-Team: Vietnamese <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/po/zh_CN.po new/partclone-0.3.53/po/zh_CN.po --- old/partclone-0.3.52/po/zh_CN.po 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/po/zh_CN.po 2026-11-11 04:41:11.000000000 +0100 @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Partclone 0.2.51\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2026-10-27 10:21+0800\n" +"POT-Creation-Date: 2026-11-11 11:40+0800\n" "PO-Revision-Date: 2007-11-01 11:35+0800\n" "Last-Translator: Peter Dave Hello\n" "Language-Team: Peter Dave Hello\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/po/zh_TW.po new/partclone-0.3.53/po/zh_TW.po --- old/partclone-0.3.52/po/zh_TW.po 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/po/zh_TW.po 2026-11-11 04:41:11.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Partclone 0.2.51\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2026-10-27 10:21+0800\n" +"POT-Creation-Date: 2026-11-11 11:40+0800\n" "PO-Revision-Date: 2007-11-01 11:35+0800\n" "Last-Translator: Yu-Chin Tsai <[email protected]>\n" "Language-Team: Chinese (traditional) <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/src/main.c new/partclone-0.3.53/src/main.c --- old/partclone-0.3.52/src/main.c 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/src/main.c 2026-11-11 04:41:11.000000000 +0100 @@ -543,9 +543,14 @@ log_mesg(0, 1, 1, debug, "%s", bad_sectors_warning_msg); } else log_mesg(0, 1, 1, debug, "read error: %s\n", strerror(errno)); - } + } else if (read_size < blocks_read * block_size) { + /* The last block was zero-filled past the device boundary; + * account for the padding so the r_size/w_size check below + * compares the whole block actually written to the image. */ + r_size = blocks_read * block_size; + } - log_mesg(2, 0, 0, debug, "blocks_read = %i\n", blocks_read); + log_mesg(2, 0, 0, debug, "blocks_read = %i\n", blocks_read); /// calculate checksum if (opt.blockfile == 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/src/version.h new/partclone-0.3.53/src/version.h --- old/partclone-0.3.52/src/version.h 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/src/version.h 2026-11-11 04:41:11.000000000 +0100 @@ -3,5 +3,5 @@ * WHETHER THEY ARE BUILT BY OTHERS OR DURING DEVELOPMENT OR FOR THE * OFFICIAL PARTCLONE RELEASES. */ -#define git_version "60c1a1f8" +#define git_version "a3d8b518" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/tests/Makefile.am new/partclone-0.3.53/tests/Makefile.am --- old/partclone-0.3.52/tests/Makefile.am 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/tests/Makefile.am 2026-11-11 04:41:11.000000000 +0100 @@ -56,6 +56,7 @@ if ENABLE_NTFS TESTS += ntfs.test TESTS += ntfs_backup_bootsector.test +TESTS += ntfs_partial_tail.test endif #if ENABLE_UFS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/tests/exfat_last_clusters.test new/partclone-0.3.53/tests/exfat_last_clusters.test --- old/partclone-0.3.52/tests/exfat_last_clusters.test 2026-10-28 08:13:32.000000000 +0100 +++ new/partclone-0.3.53/tests/exfat_last_clusters.test 2026-11-11 04:41:11.000000000 +0100 @@ -85,8 +85,8 @@ EOF echo -e "fill the last two clusters with a random pattern\n" -ccount=$(od -An -j 0x5C -N 4 -t u4 "$raw") -heap=$(od -An -j 0x58 -N 4 -t u4 "$raw") +ccount=$(od --endian=little -An -j 0x5C -N 4 -t u4 "$raw") +heap=$(od --endian=little -An -j 0x58 -N 4 -t u4 "$raw") bps=$((1 << $(od -An -j 0x6C -N 1 -t u1 "$raw"))) spcs=$((1 << $(od -An -j 0x6D -N 1 -t u1 "$raw"))) off=$(( heap*bps + (ccount-2)*bps*spcs )) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/partclone-0.3.52/tests/ntfs_partial_tail.test new/partclone-0.3.53/tests/ntfs_partial_tail.test --- old/partclone-0.3.52/tests/ntfs_partial_tail.test 1970-01-01 01:00:00.000000000 +0100 +++ new/partclone-0.3.53/tests/ntfs_partial_tail.test 2026-11-11 04:41:11.000000000 +0100 @@ -0,0 +1,56 @@ +#!/bin/bash +# Regression test for https://github.com/Thomas-Tsai/partclone/issues/321 +# +# Since the fix for issue #310 (commit d39589a, 0.3.51) the clone loop +# clamps the read of the last block at the device boundary and zero-fills +# the padded remainder, but the end-of-loop consistency check compared the +# clamped read length with the padded write length and aborted the clone: +# read(1536) and write(4096) different +# whenever the source device size was not a multiple of the 4096-byte block +# size. +# +# This test needs no root and no loop mount: it creates an NTFS image whose +# size is not a multiple of 4096 (64 MiB + 1536), clones it (must exit 0; +# note: no -F, otherwise log_mesg would not abort on error), restores it, +# and compares the last sector and the whole-image sha256. + +set -e + +. "$(dirname "$0")"/_common + +[ -n "$(command -v mkntfs)" ] || { echo "mkntfs not found, skip"; exit 77; } + +ptlfs=$(_ptlname ntfs) + +img_size=$((64*1024*1024 + 1536)) + +echo -e "create $img_size bytes raw file $raw and format as NTFS\n" +rm -f "$raw" "$img" "$raw_restore" +dd if=/dev/zero of="$raw" bs=$img_size count=1 status=none +mkntfs -F -Q "$raw" >/dev/null + +sum_src=$(sha256sum "$raw" | cut -d' ' -f1) +alt_src=$(tail -c 512 "$raw" | sha256sum | cut -d' ' -f1) + +echo -e "\nclone $raw to $img" +"$ptlfs" -q -c -s "$raw" -O "$img" -L "$logfile" + +echo -e "restore $img to $raw_restore" +dd if=/dev/zero of="$raw_restore" bs=$img_size count=1 status=none +"$ptlrestore" -q -s "$img" -O "$raw_restore" -C -F -L "$logfile" + +sum_dst=$(sha256sum "$raw_restore" | cut -d' ' -f1) +alt_dst=$(tail -c 512 "$raw_restore" | sha256sum | cut -d' ' -f1) + +rm -f "$img" "$raw" "$raw_restore" "$logfile" + +echo -e "\nsrc $sum_src\nrest $sum_dst" +if [ "$alt_src" != "$alt_dst" ]; then + echo "FAIL: the alternate boot sector was not cloned" + exit 1 +fi +if [ "$sum_src" != "$sum_dst" ]; then + echo "FAIL: restored image differs from source" + exit 1 +fi +echo "ntfs partial tail test ok"
