惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
Microsoft Security Blog
Microsoft Security Blog
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Vercel News
Vercel News
F
Fortinet All Blogs
B
Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
C
Check Point Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
月光博客
月光博客

AUR Newest Packages

AUR (en) - linuxqq-clipsync-git AUR (en) - libtslitex-git AUR (en) - libtslitex-git AUR (en) - carton-appimage AUR (en) - veila-git AUR (en) - veila-bin AUR (en) - vigil-baseline AUR (en) - byedroid AUR (en) - neovim-base16-git AUR (en) - pirata AUR (en) - rpi-imager-git-non-root AUR (en) - python-fastapi-sso AUR (en) - tmux-ai-titles AUR (en) - zeed-bin AUR (en) - bclone-bin AUR (en) - dwl-git-azerty AUR (en) - auggie-bin AUR (en) - libspatialaudio-git AUR (en) - libspatialaudio AUR (en) - miniupnpd-iptables-legacy AUR (en) - miniupnpd-nft AUR (en) - jeeves-bin AUR (en) - opennow AUR (en) - rotki AUR (en) - kapi-bin AUR (en) - classfi-bin AUR (en) - classfi-git AUR (en) - classfi AUR (en) - giff-git AUR (en) - budget-tracker-bin
AUR (en) - onekey-wallet-bin
2026-06-15 · via AUR Newest Packages

@olwig Thanks for your feedback , fixed it .

makepkg leads to this error:

==> ERROR: Integrity checks (sha256) differ in size from the source array.

You missed to remove the first entry of the sha256sums array:

97ff33f11c405f38a6f53311eb2bac193d9de4ed84fdbd52bbb4eddec63744d6 safe_extract_asar.js

@colazcy Thanks for your feedback, fixed it.@homocomputeris Can you try again?

It does not launch:

Error launching app
Unable to find Electron app at /usr/lib/onekey-wallet/app.asar

Cannot find module '/usr/lib/onekey-wallet/app.asar'

and, when reinstalling, it outputs:

Downloading PKGBUILDs...
 PKGBUILDs up to date
 nothing new to review
fetching devel info...
==> Making package: onekey-wallet-bin 6.1.0-2 (Вс 29 мар 2026 22:59:13)
==> Retrieving sources...
  -> Found safe_extract_asar.js
  -> Found onekey-wallet.sh
  -> Found onekey-wallet-6.1.0-x86_64.AppImage
==> Validating source files with sha256sums...
    safe_extract_asar.js ... Passed
    onekey-wallet.sh ... Passed
==> Validating source_x86_64 files with sha256sums...
    onekey-wallet-6.1.0-x86_64.AppImage ... Passed
==> Making package: onekey-wallet-bin 6.1.0-2 (Вс 29 мар 2026 22:59:14)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found safe_extract_asar.js
  -> Found onekey-wallet.sh
  -> Found onekey-wallet-6.1.0-x86_64.AppImage
==> Validating source files with sha256sums...
    safe_extract_asar.js ... Passed
    onekey-wallet.sh ... Passed
==> Validating source_x86_64 files with sha256sums...
    onekey-wallet-6.1.0-x86_64.AppImage ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
==> Starting prepare()...
The electron version is: 39
📂 创建输出目录:/home/user/.cache/paru/clone/onekey-wallet-bin/src/app.asar.unpacked
🔍 读取asar包文件列表...
📄 检测到 3475 个文件,开始过滤解压...

@zxp19821005

Thanks for your great work on this package! Unfortunately, this version of "safe_extract_asar.js" still does not work because the CLI arguments are wrong. It uses the "-o" flag, but the correct syntax is "asar extract-file|ef <archive> <filename> ".

Additionally, this way of extracting files from asar archives is quite inefficient. I suggest using the native asar module for better performance. Here's an updated version of "safe_extract_asar.js".

NOTE: This script is generated by Google Gemini, and reviewed by Claude and ChatGPT. I've reviewed and tested it manually (and it works well on my machine), but I would appreciate your review since I’m not very familiar with JavaScript and Node.js.

const fs = require('fs');
const path = require('path');

const SRC_DIR = process.env.SRC_DIR || process.cwd();
const ASAR_FILE_PATH = path.join(SRC_DIR, 'squashfs-root/resources/app.asar');
const OUTPUT_DIR = path.join(SRC_DIR, 'app.asar.unpacked');

// Exclude non-Linux prebuilds
const EXCLUDE_PATTERNS = [
  /\/prebuilds\/android-/,
  /\/prebuilds\/darwin-/,
  /\/prebuilds\/win32-/
];

async function nativeExtract() {
  try {
    // Clean up previous extraction to avoid ENOTDIR conflicts from cached builds
    if (fs.existsSync(OUTPUT_DIR)) {
      fs.rmSync(OUTPUT_DIR, { recursive: true, force: true });
    }
    fs.mkdirSync(OUTPUT_DIR, { recursive: true });

    console.log('=> Loading system-level @electron/asar module...');
    let asar;
    try {
      const asarModule = await import('file:///usr/lib/node_modules/@electron/asar/lib/asar.js');
      asar = asarModule.default || asarModule;
    } catch (e) {
      console.error(`Error: Failed to load asar module. ${e.message}`);
      process.exit(1);
    }

    console.log('=> Reading flat file index...');
    const rawFileList = asar.listPackage(ASAR_FILE_PATH);

    // Normalize paths and filter out empty ones
    const fileList = rawFileList
      .map(f => f.startsWith('/') ? f.substring(1) : f)
      .filter(f => f && f !== '.');

    // Build a set of all directories to prevent file/directory name collisions
    const dirSet = new Set();
    for (const file of fileList) {
      let currentDir = path.dirname(file);
      while (currentDir !== '.' && currentDir !== '') {
        dirSet.add(currentDir);
        currentDir = path.dirname(currentDir);
      }
    }

    console.log('=> Extracting files to memory and writing to disk...');
    let extractedCount = 0;
    let skippedCount = 0;

    for (const file of fileList) {
      // Skip directories
      if (dirSet.has(file)) {
        continue;
      }

      // Skip cross-platform prebuilds
      if (EXCLUDE_PATTERNS.some(regex => regex.test(file))) {
        skippedCount++;
        continue;
      }

      try {
        // extractFile throws if the file is a directory or physically missing
        const buffer = asar.extractFile(ASAR_FILE_PATH, file);

        const destPath = path.join(OUTPUT_DIR, file);
        const destDir = path.dirname(destPath);

        if (!fs.existsSync(destDir)) {
          fs.mkdirSync(destDir, { recursive: true });
        }

        fs.writeFileSync(destPath, buffer);
        extractedCount++;
      } catch (err) {
        // Silently ignore directories and ghost files
        skippedCount++;
      }
    }

    if (extractedCount === 0) {
      console.error('Error: No files were extracted. Check safe_extract_asar.js!');
      process.exit(1);
    }

    console.log('=> Extraction complete.');
    console.log(`   Successfully extracted: ${extractedCount} files`);
    console.log(`   Skipped (dirs/missing/ignored): ${skippedCount} items`);

  } catch (err) {
    console.error(`Fatal error during extraction: ${err.message}`);
    process.exit(1);
  }
}

nativeExtract();

@colazcy Thanks for your feedback, fixed it.

The new script safe_extract_asar.js has hardcoded absolute paths /home/zxp-endeavouros/... on lines 6 and 7. This causes installation to fail for all other users.