Skip to content

redumper: init at build_657#364796

Merged
SuperSandro2000 merged 4 commits into
NixOS:masterfrom
hughobrien:redumper
Nov 12, 2025
Merged

redumper: init at build_657#364796
SuperSandro2000 merged 4 commits into
NixOS:masterfrom
hughobrien:redumper

Conversation

@hughobrien

@hughobrien hughobrien commented Dec 13, 2024

Copy link
Copy Markdown
Contributor

Introduce Redumper, a low level CD dumper utility used for the preservation of optical media.

Redumper is a low-level byte perfect CD disc dumper. It supports incremental dumps, advanced SCSI/C2 repair, intelligent audio CD offset detection and a lot of other features.

Co-authored-by: leo60228 leo@60228.dev

Example usage

shell ❯ sudo redumper --drive=/dev/sr0
Please touch the device.
redumper v1980.01.01 build_438 [Jan  1 1980, 00:00:00]

arguments: --drive=/dev/sr0

drive path: /dev/sr0
drive: PLEXTOR - DVDR PX-716A (revision level: 1.11, vendor specific: 03/23/07 15:10)
drive configuration: PLEXTOR (read offset: +30, C2 shift: 295, pre-gap start: -75, read method: D8, sector order: DATA_C2_SUB)
drive read speed: <optimal>

current profile: CD-ROM

image path: .
image name: dump_241213_002239_sr0

*** DUMP

disc TOC:
  track 1 {  data }
    index 01 { LBA:      0, MSF: 00:02:00 }
  track A {  data, dcp }
    index 01 { LBA: 358329, MSF: 79:39:54 }

PLEXTOR: reading lead-in (retry: 1)
PLEXTOR: lead-in found (session: 1, sectors: 1651)
PLEXTOR: reading lead-in (retry: 2)
PLEXTOR: lead-in found (session: 1, sectors: 2786)
PLEXTOR: storing lead-in (session: 1, verified: yes)
                                                                 
media errors: 
  SCSI: 0
  C2: 577
  Q: 476

*** PROTECTION (time check: 475s)

protection: SafeDisc 00000001.TMP, C2: 577, gap range: 51-10050

*** REFINE


*** SPLIT

correcting P... done
correcting Q... done

final TOC:
  track 1 {  data }
    index 00 { LBA: [  -150 ..     -1], length:    150, MSF: 00:00:00-00:01:74 }
    index 01 { LBA: [     0 .. 358328], length: 358329, MSF: 00:02:00-79:39:53 }
  track A {  data, dcp }
    index 01 { LBA: [358329 .. 358426], length:     98, MSF: 79:39:54-79:41:01 }

analyzing... done (time: 13s)

data disc detected, offset configuration: 
  LBA:  -1726 -> 461128, MSF: A2:30:28, count:   1576, offset: -272158164
  LBA:   -150 ->   -150, MSF: 00:00:00, count: 358577, offset: -12

non-zero  TOC sample range: [   -88200 .. +210697452]
non-zero data sample range: [   -43524 .. +210755046]
warning: non-zero data range is not continuous, skipping Universal Hash calculation

disc write offset: -12

warning: lead-in contains non-zero data (session: 1, sectors: 74/74)
checking tracks
done

writing tracks
done

CUE [dump_241213_002239_sr0.cue]:
FILE "dump_241213_002239_sr0.bin" BINARY
  TRACK 01 MODE1/2352
    INDEX 01 00:00:00


*** HASH (time check: 23s)

dat:
<rom name="dump_241213_002239_sr0 (Track 0).bin" size="174048" crc="03006b01" md5="8bd9fb5920bea70c460f149dbd89236c" sha1="9f2f75cee21421f6d51348f4424bdc0430aff917" />
<rom name="dump_241213_002239_sr0.bin" size="842789808" crc="3eba0fb1" md5="5adcf306b0de169dc332d8427e79245a" sha1="485e756abf57d8bf45a1b04f04712e049c51b9b2" />

*** INFO

CD-ROM [dump_241213_002239_sr0.bin]:
  sectors count: 358329
  mode1 sectors: 358329
  ECC errors: 577
  EDC errors: 577

  REDUMP.ORG errors: 577

ISO9660 [dump_241213_002239_sr0.bin]:
  volume identifier: Max Payne
  PVD:
0320 : 20 20 20 20 20 20 20 20  20 20 20 20 20 32 30 30                200
0330 : 31 30 37 31 34 31 36 33  37 30 34 30 30 00 32 30   1071416370400.20
0340 : 30 31 30 37 31 34 31 36  33 37 30 34 30 30 00 30   01071416370400.0
0350 : 30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 00   000000000000000.
0360 : 30 30 30 30 30 30 30 30  30 30 30 30 30 30 30 30   0000000000000000
0370 : 00 01 00 00 00 00 00 00  00 00 00 00 00 00 00 00   ................

*** END (time check: 3s)

Matches Max Payne disc on http://redump.org

Closes #354494

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Dec 13, 2024
@hughobrien hughobrien force-pushed the redumper branch 3 times, most recently from 6764f94 to a283092 Compare December 13, 2024 05:44
@ofborg ofborg Bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Dec 13, 2024
@github-actions github-actions Bot removed the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Dec 14, 2024
@ofborg ofborg Bot added the 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. label Dec 15, 2024

@FliegendeWurst FliegendeWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall.

Comment thread pkgs/by-name/re/redumper/package.nix
Comment thread pkgs/by-name/re/redumper/package.nix
@keenanweaver

Copy link
Copy Markdown
Member

Closes #354494

@github-actions github-actions Bot removed the 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. label May 28, 2025

@keenanweaver keenanweaver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 364796
Commit: 76fbedc2e1c5c9d99cdef3dd039023e2acc7985b


x86_64-linux

✅ 1 package built:
  • redumper

@keenanweaver keenanweaver added the 12.approvals: 1 This PR was reviewed and approved by one person. label May 28, 2025
@hughobrien hughobrien changed the title redumper: init at build_438 redumper: init at build_651 Sep 1, 2025
Comment thread pkgs/by-name/re/redumper/package.nix
@hughobrien

Copy link
Copy Markdown
Contributor Author

politely bumping

@FliegendeWurst

Copy link
Copy Markdown
Member

ofborg failed to build the package

       > utils.xbox.pcm:(.text+0xb0b): undefined reference to `memcpy.inline'
       > /nix/store/xrwdb41dqi2ia6lr2s61w5bzfg2m71pi-binutils-2.44/bin/ld: utils.xbox.pcm:(.text+0xb10): undefined reference to `memcpy.inline'
       > /nix/store/xrwdb41dqi2ia6lr2s61w5bzfg2m71pi-binutils-2.44/bin/ld: utils.xbox.pcm:(.text+0xb15): undefined reference to `memcpy.inline'
       > /nix/store/xrwdb41dqi2ia6lr2s61w5bzfg2m71pi-binutils-2.44/bin/ld: utils.xbox.pcm:(.text+0xb1a): undefined reference to `memcpy.inline'
       > /nix/store/xrwdb41dqi2ia6lr2s61w5bzfg2m71pi-binutils-2.44/bin/ld: utils.xbox.pcm:(.text+0xb1f): undefined reference to `memcpy.inline'
       > /nix/store/xrwdb41dqi2ia6lr2s61w5bzfg2m71pi-binutils-2.44/bin/ld: CMakeFiles/redumper.dir/utils/xbox.ixx.o:utils.xbox.pcm:(.text+0xb24): more undefined references to `memcpy.inline' follow
       > clang++: error: linker command failed with exit code 1 (use -v to see invocation)
       > ninja: build stopped: subcommand failed.

@hughobrien hughobrien changed the title redumper: init at build_651 redumper: init at build_655 Oct 9, 2025
@hughobrien hughobrien force-pushed the redumper branch 2 times, most recently from 1c3dd43 to dc59375 Compare October 9, 2025 07:22

@keenanweaver keenanweaver left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading and ripping!

redumper (build: 655)
[print usage: --help,-h]

drive path: /dev/sg1
drive: PLEXTOR - DVDR PX-716A (revision level: 1.11, vendor specific: 03/23/07 15:10)
drive configuration: PLEXTOR (read offset: +30, C2 shift: 295, pre-gap start: -75, read method: D8, sector order: DATA_C2_SUB)
drive read speed: <optimal>

current profile: CD-ROM
disc type: CD

image path: .
image name: dump_251009_164836_sg1

*** DUMP

disc TOC:
  track 1 {  data }
    index 01 { LBA:      0, MSF: 00:02:00 }
  track A {  data }
    index 01 { LBA: 151190, MSF: 33:37:65 }

[LBA:   9123] forced stop

nixpkgs-review result for #364796

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 364796
Commit: dc593751bdf9fe4925eb892444cb2c5512b9f5cc (subsequent changes)
Merge: df601fd64d7686a4852b98ab0795223b890bd6c2

Logs: https://github.com/keenanweaver/nixpkgs-review-gha/actions/runs/18384713979


x86_64-linux

✅ 1 package built:
  • redumper

aarch64-linux

✅ 1 package built:
  • redumper

@hughobrien

Copy link
Copy Markdown
Contributor Author

@FliegendeWurst I believe it has passed now, though some ofborg checks seem to be stuck in a queued state - anything I can do to unblock those?

@FliegendeWurst

Copy link
Copy Markdown
Member

though some ofborg checks seem to be stuck in a queued state - anything I can do to unblock those?

The Darwin builders are simply overloaded, not much you can do there. But it is good to see that the Linux builds are passing.

@hughobrien hughobrien changed the title redumper: init at build_655 redumper: init at build_657 Oct 27, 2025
@SuperSandro2000 SuperSandro2000 added this pull request to the merge queue Nov 12, 2025
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Nov 12, 2025
Merged via the queue into NixOS:master with commit 97d257e Nov 12, 2025
31 of 33 checks passed
@hughobrien hughobrien deleted the redumper branch November 16, 2025 07:30
@hughobrien

hughobrien commented Nov 17, 2025

Copy link
Copy Markdown
Contributor Author

Thank you for merging! I'm attempting to use this package from nixpkgs now but it seems to have some issue finding the standard headers. Has someone seen this before - I'll dig in if not.

Also wondering why it didn't seem to be a problem at the PR stage.

nix run nixpkgs#redumper

nix log /nix/store/pryfcs2y844ybmhka3hf5h5j6cfyc4w6-redumper-657.drv

-- Build files have been written to: /build/source/build
cmake: enabled parallel building
cmake: enabled parallel installing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: -j12
[1/206] Scanning /build/source/analyzers/analyzer.ixx for CXX dependencies
FAILED: [code=1] CMakeFiles/redumper.dir/analyzers/analyzer.ixx.o.ddi
"/nix/store/lqid6cx4881bgyqryajikxlv66509zj4-clang-tools-21.1.2/bin/clang-scan-deps" -format=p1689 -- /nix/stor>
Error while scanning dependencies for /build/source/analyzers/analyzer.ixx:
/build/source/analyzers/analyzer.ixx:2:10: fatal error: 'cstdint' file not found

@keenanweaver

Copy link
Copy Markdown
Member

Thank you for merging! I'm attempting to use this package from nixpkgs now but it seems to have some issue finding the standard headers. Has someone seen this before - I'll dig in if not.

Strange, I'm seeing the same.

Working fine in the game preservation flake, might need to integrate some changes from that. LLVM18? nix run github:Whovian9369/nix-game-preservation#redumper

@Whovian9369

Whovian9369 commented Nov 17, 2025

Copy link
Copy Markdown

It's slightly scary to see a nixpkgs email mentioning flakes that I maintain myself! I can replicate that issue with a copy of the Nixpkgs package, and with an updated flake.lock on nix-game-preservation.

After doing some testing on my end with the Nixpkgs version of the package, I updated the flake.lock for my nix-game-preservation flake linked by Keenan. Based on the repo's git diff, the issue seems to have begun between ae814fd and c5ae371. (At least that's "only" 1 week of Nixpkgs commits to sort through, though I do not envy the person doing that.)

Edit: It appears that de21549 / #457894 breaks it, which means I need to dig deeper here.

@SuperSandro2000

Copy link
Copy Markdown
Member

This is probably due to a compiler update.

Random fix from a random package facebook/rocksdb@88edfbf

@hughobrien

hughobrien commented Nov 17, 2025

Copy link
Copy Markdown
Contributor Author

Adding

env.NIX_CFLAGS_COMPILE = "-isystem ${llvmPackages.libcxx.dev}/include/c++/v1";

seems to allow it to continue, does anyone have a cleaner way or will I go ahead with a PR?

@hughobrien

Copy link
Copy Markdown
Contributor Author

#463291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package request: redumper

5 participants