Skip to content

Commit

Permalink
[Build] Build ARM64 for deb and rpm
Browse files Browse the repository at this point in the history
Build ARM64 for deb with the following commands:
yarn build --deb --skip-archives
yarn build --deb --skip-archives --release

Build ARM64 for rpm with the following commands:
yarn build --rpm --skip-archives
yarn build --rpm --skip-archives --release

Issue partially resolved:
opensearch-project#1259

Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Feb 22, 2022
1 parent 18f8f13 commit d714bb5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
18 changes: 16 additions & 2 deletions src/dev/build/tasks/os_packages/create_os_package_tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,34 @@ export const CreateDebPackage: Task = {
description: 'Creating deb package',

async run(config, log, build) {
await runFpm(config, log, build, 'deb', [
await runFpm(config, log, build, 'deb', 'x64', [
'--architecture',
'amd64',
'--deb-priority',
'optional',
]);

await runFpm(config, log, build, 'deb', 'arm64', [
'--architecture',
'arm64',
'--deb-priority',
'optional',
]);
},
};

export const CreateRpmPackage: Task = {
description: 'Creating rpm package',

async run(config, log, build) {
await runFpm(config, log, build, 'rpm', ['--architecture', 'x64', '--rpm-os', 'linux']);
await runFpm(config, log, build, 'rpm', 'x64', ['--architecture', 'x64', '--rpm-os', 'linux']);

await runFpm(config, log, build, 'rpm', 'arm64', [
'--architecture',
'arm64',
'--rpm-os',
'linux',
]);
},
};

Expand Down
3 changes: 2 additions & 1 deletion src/dev/build/tasks/os_packages/run_fpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ export async function runFpm(
log: ToolingLog,
build: Build,
type: 'rpm' | 'deb',
arch: 'x64' | 'arm64',
pkgSpecificFlags: string[]
) {
const linux = config.getPlatform('linux', 'x64');
const linux = config.getPlatform('linux', arch);
const version = config.getBuildVersion();

const resolveWithTrailingSlash = (...paths: string[]) => `${resolve(...paths)}/`;
Expand Down

0 comments on commit d714bb5

Please sign in to comment.