-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting deb's compression type #272
Comments
1 task
3 tasks
Closed
3 tasks
Please, merge a PR! Workaround, while we're waiting: forge.config.js const { exec } = require('child_process')
function run(cmd) {
return new Promise((resolve, reject) => {
exec(cmd, (error, stdout, stderr) => {
if (error) return reject(error)
if (stderr) return reject(stderr)
resolve(stdout)
})
})
}
...
hooks: {
postMake: async (config, makeResults) => {
console.log("==postMake", makeResults);
let deb = makeResults.filter(x => x.platform === 'linux' && x.artifacts.some(y => y.endsWith('.deb')));
console.log("== found ", deb);
if (deb.length === 1) {
let file = deb[0].artifacts[0];
console.warn("will repack file", file);
let cmdTemplates = ['ar x some-package.deb',
'zstd -d < control.tar.zst | xz > control.tar.xz',
'zstd -d < data.tar.zst | xz > data.tar.xz',
'mv some-package.deb some-package.deb.bkp',
'ar -v -m -c -a sdsd some-package.deb debian-binary control.tar.xz data.tar.xz',
'rm debian-binary control.tar.xz data.tar.xz control.tar.zst data.tar.zst'
];
for (const cmdT of cmdTemplates) {
let cmd = cmdT.replaceAll('some-package.deb', file);
console.log('run', cmd);
await run(cmd);
}
}
return makeResults;
}
}
|
This should be available in 3.2.0 and higher 🙂 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On Ubuntu 21.10 (and later), the default compression type of deb packages created using
dpkg-deb
is ZStandard (previously it was XZ).However, Debian doesn't support installing ZStandard compressed packages:
This means that when you use electron-installer-debian to build packages on Ubuntu 21.10 or later, these packages are unusable in debian.
When using dpkg-deb directly it's possible to change the compression type via
-Zxz
flag but this is not exposed in electron-installer-debian configuration.The text was updated successfully, but these errors were encountered: