{"record":{"id":"5655163aac444d44","repo":"can1357/oh-my-pi","slug":"rpm-package-identity-uses-unsupported-payload-565516","errorCode":null,"errorMessage":"RPM package '${identity}' uses unsupported payload compressor '${method}'","messagePattern":"RPM package '(.+?)' uses unsupported payload compressor '(.+?)'","errorType":"validation","errorClass":"ArchiveError","httpStatus":null,"severity":"error","filePath":"packages/utils/src/ar/rpm.ts","lineNumber":241,"sourceCode":"\t\tcase \"gz\":\n\t\t\treturn gzipDecompress(payload, maxOutput);\n\t\tcase \"bzip2\":\n\t\tcase \"bzip\":\n\t\t\treturn bzip2Decompress(payload, maxOutput);\n\t\tcase \"xz\":\n\t\t\treturn xzDecompress(payload, maxOutput);\n\t\tcase \"zstd\":\n\t\tcase \"zstdio\":\n\t\t\treturn zstdDecompress(payload, maxOutput);\n\t\tcase \"lzma\":\n\t\t\tif (!sniffLzmaAlone(payload)) throw new ArchiveError(`RPM package '${identity}' has a malformed LZMA payload`);\n\t\t\treturn lzmaAloneDecompress(payload, maxOutput);\n\t\tcase \"none\":\n\t\t\tif (!sniffCpio(payload))\n\t\t\t\tthrow new ArchiveError(`RPM package '${identity}' has an invalid uncompressed CPIO payload`);\n\t\t\treturn payload;\n\t\tdefault:\n\t\t\tthrow new ArchiveError(`RPM package '${identity}' uses unsupported payload compressor '${method}'`);\n\t}\n}\n\nasync function readRpmArchive(source: ByteSource, options: FormatReadOptions): Promise<ArchiveIndexEntry[]> {\n\tconst initial = await readExact(source, 0, RPM_LEAD_SIZE + RPM_HEADER_INTRO_SIZE, \"lead and signature header\");\n\tif (!sniffRpm(initial)) throw new ArchiveError(\"Invalid RPM package: bad lead magic\");\n\tconst major = initial[4]!;\n\tconst packageType = (initial[6]! << 8) | initial[7]!;\n\tif (major < 3 || packageType > 1) throw new ArchiveError(\"Unsupported RPM package lead version or type\");\n\tconst signatureType = (initial[78]! << 8) | initial[79]!;\n\tif (signatureType !== RPM_SIGNATURE_TYPE_HEADER) {\n\t\tthrow new ArchiveError(`Unsupported RPM signature type ${signatureType}; only header signatures are supported`);\n\t}\n\tconst leadNameEnd = initial.subarray(10, 76).indexOf(0);\n\tconst leadNameBytes = initial.subarray(10, leadNameEnd < 0 ? 76 : 10 + leadNameEnd);\n\tlet leadName = \"unknown package\";\n\ttry {\n\t\tconst decoded = new TextDecoder(\"utf-8\", { fatal: true }).decode(leadNameBytes);","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/utils/src/ar/rpm.ts#L223-L259","documentation":"decompressPayload's switch reached the default arm: the resolved method string (from sniffing or the declared payload compressor) is not one of gzip/bzip2/xz/zstd/zstdio/lzma/none. The library has no decompressor registered for it and throws with the package identity and the offending method.","triggerScenarios":"The declared PayloadCompressor tag or sniffed method yields a value outside the supported switch set (e.g. 'zck', an empty/whitespace string, or an unexpected custom value) and it survives the sniff chain; raised at the switch default.","commonSituations":"Fedora/openSUSE packages using zchunk compression, vendor-patched rpms with experimental payload formats, or packages where the compressor tag holds an unexpected value the sniff chain did not intercept.","solutions":["Identify the actual payload format (hexdump the payload region) and confirm it is one the library supports (gzip/bzip2/xz/zstd/lzma/plain cpio).","Convert the package first: rpm2archive or repack with a supported compressor (rpmbuild --define '%_binary_payload w.bzdio' etc.).","Use system rpm2cpio | cpio -id to extract contents outside this library.","If you control packaging, switch CI builds to gzip or xz payloads."],"exampleFix":"// before: readArchive directly on a zck payload\nconst entries = await readArchive(zckRpm);\n// after: normalize via system tooling when compressor is unsupported\nif (!SUPPORTED_COMPRESSORS.includes(declaredCompressor)) rpmBuffer = await rpm2archiveConvert(file);","handlingStrategy":"try-catch","validationCode":"const meta = await metadata(path);\nconst supported = new Set(['gzip','bzip2','xz','zstd','zstdio','lzma','none']);\nif (meta.payloadCompressor && !supported.has(meta.payloadCompressor)) {\n  console.warn(`compressor ${meta.payloadCompressor} unsupported; converting via rpm2archive`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  return await readRpm(path);\n} catch (err) {\n  if (err instanceof ArchiveError && err.message.includes('unsupported payload compressor')) {\n    return await extractWithRpm2cpio(path); // system-tool fallback\n  }\n  throw err;\n}","preventionTips":["Screen repository packages for exotic payload formats (zck) during ingestion.","Standardize internal builds on gzip or xz payloads.","Keep an rpm2cpio/rpm2archive fallback path for external packages."],"tags":["rpm","compression","unsupported-codec","archive"],"backgroundTag":"unsupported-compression-format","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}