Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package parti for openSUSE:Factory checked in at 2026-03-27 16:51:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/parti (Old) and /work/SRC/openSUSE:Factory/.parti.new.8177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "parti" Fri Mar 27 16:51:42 2026 rev:21 rq:1343162 version:2.12 Changes: -------- --- /work/SRC/openSUSE:Factory/parti/parti.changes 2026-03-19 17:39:15.322478383 +0100 +++ /work/SRC/openSUSE:Factory/.parti.new.8177/parti.changes 2026-03-27 16:54:29.599971151 +0100 @@ -1,0 +2,7 @@ +Fri Mar 27 11:13:08 UTC 2026 - [email protected] + +- merge gh#wfeldt/parti#25 +- adapt parti to work also with xorriso (bsc#1260860) +- 2.12 + +-------------------------------------------------------------------- Old: ---- parti-2.11.tar.xz New: ---- parti-2.12.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ parti.spec ++++++ --- /var/tmp/diff_new_pack.NFQ9lt/_old 2026-03-27 16:54:30.624014018 +0100 +++ /var/tmp/diff_new_pack.NFQ9lt/_new 2026-03-27 16:54:30.636014521 +0100 @@ -18,7 +18,7 @@ Name: parti -Version: 2.11 +Version: 2.12 Release: 0 Summary: Show partition table information License: GPL-3.0-only @@ -32,11 +32,7 @@ BuildRequires: pkgconfig(blkid) BuildRequires: pkgconfig(json-c) BuildRequires: pkgconfig(uuid) -%if 0%{?suse_version} >= 1500 -Requires: mkisofs -%else -Requires: cdrkit-cdrtools-compat -%endif +Requires: (mkisofs or xorriso) %description Show partition table information for ++++++ parti-2.11.tar.xz -> parti-2.12.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parti-2.11/Makefile new/parti-2.12/Makefile --- old/parti-2.11/Makefile 2026-03-18 18:49:42.000000000 +0100 +++ new/parti-2.12/Makefile 2026-03-27 12:13:08.000000000 +0100 @@ -1,7 +1,9 @@ +WITH_MEDIA_CHECK = 1 + CC = gcc CFLAGS = -g -O2 -fomit-frame-pointer -Wall XFLAGS = -Wno-pointer-sign -Wsign-conversion -Wsign-compare -LDFLAGS = -ljson-c -luuid -lblkid -lmediacheck +LDFLAGS = -ljson-c -luuid -lblkid BINDIR = /usr/bin MANDIR = /usr/share/man @@ -13,6 +15,11 @@ CFLAGS += -DVERSION=\"$(VERSION)\" +ifdef WITH_MEDIA_CHECK +CFLAGS += -D__WITH_MEDIA_CHECK__ +LDFLAGS += -lmediacheck +endif + PARTI_SRC = disk.c util.c eltorito.c filesystem.c json.c ptable_apple.c ptable_gpt.c ptable_mbr.c zipl.c PARTI_OBJ = $(PARTI_SRC:.c=.o) PARTI_H = $(PARTI_SRC:.c=.h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parti-2.11/VERSION new/parti-2.12/VERSION --- old/parti-2.11/VERSION 2026-03-18 18:49:42.000000000 +0100 +++ new/parti-2.12/VERSION 2026-03-27 12:13:08.000000000 +0100 @@ -1 +1 @@ -2.11 +2.12 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parti-2.11/changelog new/parti-2.12/changelog --- old/parti-2.11/changelog 2026-03-18 18:49:42.000000000 +0100 +++ new/parti-2.12/changelog 2026-03-27 12:13:08.000000000 +0100 @@ -1,3 +1,7 @@ +2026-03-27: 2.12 + - merge gh#wfeldt/parti#25 + - adapt parti to work also with xorriso (bsc#1260860) + 2026-03-18: 2.11 - merge gh#wfeldt/parti#24 - greatly speed up internal disk data handling diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parti-2.11/filesystem.c new/parti-2.12/filesystem.c --- old/parti-2.11/filesystem.c 2026-03-18 18:49:42.000000000 +0100 +++ new/parti-2.12/filesystem.c 2026-03-27 12:13:08.000000000 +0100 @@ -14,7 +14,10 @@ #include <uuid/uuid.h> #include <blkid/blkid.h> #include <json-c/json.h> + +#ifdef __WITH_MEDIA_CHECK__ #include <mediacheck.h> +#endif #include "disk.h" #include "filesystem.h" @@ -36,7 +39,9 @@ int fs_probe(fs_detail_t *fs, disk_t *disk, uint64_t offset); int fs_detail_fat(disk_t *disk, int indent, uint64_t sector); int fs_detail_iso9660(json_object *json_fs, disk_t *disk, int indent, uint64_t sector); +void read_iso_detail(disk_t *disk); void read_isoinfo(disk_t *disk); +void read_xorriso(disk_t *disk); file_start_t *iso_offsets = NULL; int iso_read = 0; @@ -234,6 +239,7 @@ { if(sector || disk->block_size < 0x200) return 0; +#ifdef __WITH_MEDIA_CHECK__ mediacheck_t *media = mediacheck_init(disk->name, 0); if(!media->err && media->signature.start) { uint64_t sig_block = media->signature.start; @@ -261,6 +267,7 @@ } mediacheck_done(media); +#endif return 1; } @@ -327,7 +334,7 @@ file_start_t *fs; char *name = NULL; - if(!iso_read) read_isoinfo(disk); + if(!iso_read) read_iso_detail(disk); for(fs = iso_offsets; fs; fs = fs->next) { if(block >= fs->block && block < fs->block + (((fs->len + 2047) >> 11) << 2)) break; @@ -349,6 +356,17 @@ } +void read_iso_detail(disk_t *disk) +{ + if(opt.xorriso) { + read_xorriso(disk); + } + else { + read_isoinfo(disk); + } +} + + void read_isoinfo(disk_t *disk) { FILE *p; @@ -414,6 +432,8 @@ FILE *f = fdopen(tmp_fd, "r+"); + // isoinfo reads 2 kiB blocks after each lseek + unsigned current_block_size = disk->block_size; disk->block_size = 2048; unsigned char tmp_buffer[2048]; @@ -426,6 +446,77 @@ } } + free(line); + + disk->block_size = current_block_size; +} + + +void read_xorriso(disk_t *disk) +{ + FILE *p; + char *cmd, *line = NULL, *dir = NULL; + size_t line_len = 0; + unsigned u1, u2; + file_start_t *fs; + fs_detail_t fs_detail; + + iso_read = 1; + + if(!fs_probe(&fs_detail, disk, 0)) return; + + int tmp_fd = open("/tmp", O_TMPFILE | O_RDWR, S_IRUSR | S_IWUSR); + + if(tmp_fd == -1) return; + + int disk_fd = disk->fd; + + if(disk_fd == -1) disk_fd = disk_to_fd(disk, 0); + + if(disk_fd == -1) return; + + asprintf(&cmd, "/usr/bin/strace -e lseek -o /proc/self/fd/%d /usr/bin/xorriso -indev /proc/self/fd/%d -find / -exec report_lba 2>/dev/null", tmp_fd, disk_fd); + + if((p = popen(cmd, "r"))) { + while(getline(&line, &line_len, p) != -1) { + char *s, *line_start = line; + + if(sscanf(line_start, "File data lba: %*u , %u , %*u , %u , '%m[^\n]", &u1, &u2, &s) == 3) { + fs = calloc(1, sizeof *fs); + fs->next = iso_offsets; + iso_offsets = fs; + fs->block = u1 << 2; + fs->len = u2; + size_t s_len = strlen(s); + if(s_len > 0) s[s_len - 1] = 0; + fs->name = s; + } + } + + pclose(p); + } + + free(cmd); + free(dir); + + if(disk->fd == -1) close(disk_fd); + + FILE *f = fdopen(tmp_fd, "r+"); + + // xorriso reads 64 kiB blocks after each lseek + + unsigned current_block_size = disk->block_size; + disk->block_size = 2048; + unsigned char tmp_buffer[2048 * 32]; + + while(getline(&line, &line_len, f) != -1) { + char *s; + if((s = strchr(line, '='))) { + int64_t ofs = strtoll(s + 1, NULL, 10); + disk_read(disk, tmp_buffer, ofs / 2048, 32); + } + } + free(line); disk->block_size = current_block_size; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parti-2.11/obs/parti.spec new/parti-2.12/obs/parti.spec --- old/parti-2.11/obs/parti.spec 2026-03-18 18:49:42.000000000 +0100 +++ new/parti-2.12/obs/parti.spec 2026-03-27 12:13:08.000000000 +0100 @@ -32,11 +32,7 @@ BuildRequires: pkgconfig(blkid) BuildRequires: pkgconfig(json-c) BuildRequires: pkgconfig(uuid) -%if 0%{?suse_version} >= 1500 -Requires: mkisofs -%else -Requires: cdrkit-cdrtools-compat -%endif +Requires: (mkisofs or xorriso) %description Show partition table information for diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parti-2.11/parti.c new/parti-2.12/parti.c --- old/parti-2.11/parti.c 2026-03-18 18:49:42.000000000 +0100 +++ new/parti-2.12/parti.c 2026-03-27 12:13:08.000000000 +0100 @@ -23,11 +23,15 @@ struct option options[] = { { "help", 0, NULL, 'h' }, { "verbose", 0, NULL, 'v' }, + { "mkisofs", 0, NULL, 1006 }, + { "xorriso", 0, NULL, 1007 }, { "raw", 0, NULL, 1001 }, { "version", 0, NULL, 1002 }, { "export-disk", 1, NULL, 1003 }, { "import-disk", 1, NULL, 1004 }, { "json", 0, NULL, 1005 }, + { "mkisofs", 0, NULL, 1006 }, + { "xorriso", 0, NULL, 1007 }, { } }; @@ -69,6 +73,14 @@ opt.json = 1; break; + case 1006: + opt.mkisofs = 1; + break; + + case 1007: + opt.xorriso = 1; + break; + default: help(); return i == 'h' ? 0 : 1; @@ -78,6 +90,15 @@ argc -= optind; argv += optind; + if(!opt.xorriso && !opt.mkisofs) { + if(access("/usr/bin/isoinfo", X_OK)) { + opt.mkisofs = 1; + } + else if(access("/usr/bin/xorriso", X_OK)) { + opt.xorriso = 1; + } + } + while(*argv) disk_init(*argv++); if(!disk_list_size) { @@ -124,6 +145,8 @@ " --export-disk FILE Export all relevant disk data to FILE. FILE can then be used\n" " with --import-disk to reproduce the results.\n" " --import-disk FILE Import relevant disk data from FILE.\n" + " --mkisofs Use isoinfo to read ISO9660 fs info (default).\n" + " --xorriso Use xorriso to read ISO9660 fs info.\n" " --verbose Report more details.\n" " --version Show version.\n" " --help Print this help text.\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parti-2.11/util.h new/parti-2.12/util.h --- old/parti-2.11/util.h 2026-03-18 18:49:42.000000000 +0100 +++ new/parti-2.12/util.h 2026-03-27 12:13:08.000000000 +0100 @@ -19,6 +19,8 @@ } show; char *export_file; unsigned json:1; + unsigned mkisofs:1; + unsigned xorriso:1; } opt_t; extern opt_t opt;
