Skip to content
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

RPM build failed #1368

Open
halshar opened this issue Jan 10, 2024 · 5 comments
Open

RPM build failed #1368

halshar opened this issue Jan 10, 2024 · 5 comments

Comments

@halshar
Copy link

halshar commented Jan 10, 2024

Greetings,

Followed the below instructions by user manoj to build the rpm package

git clone https://github.com/usebruno/bruno.git
cd bruno
npm install
npm run build:electron:rpm
cd packages/bruno-electron/out
dnf install bruno_0.24.0_x86_64_linux.rpm

Originally posted by @manojbaishya in #541 (comment)

but the build is failing with following errors

❯ npm run build:electron:rpm

> build:electron:rpm
> ./scripts/build-electron.sh rpm

cp: cannot stat 'packages/bruno-app/out/*': No such file or directory
sed: can't read packages/bruno-electron/web/**.html: No such file or directory
Building rpm distribution

> [email protected] dist:rpm
> electron-builder --linux rpm --config electron-builder-config.js

  • electron-builder  version=23.0.2 os=6.6.9-200.fc39.x86_64
  • loaded configuration  file=/home/samshal/projects/github/javascript/bruno/packages/bruno-electron/electron-builder-config.js
  • writing effective config  file=out/builder-effective-config.yaml
  • packaging       platform=linux arch=x64 electron=21.1.1 appOutDir=out/linux-unpacked
  • building        target=rpm arch=x64 file=out/bruno_1.6.1_x86_64_linux.rpm
  ⨯ to build rpm, executable rpmbuild is required, please install: sudo apt-get install rpm
  ⨯ /home/samshal/projects/github/javascript/bruno/node_modules/app-builder-bin/linux/x64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1  failedTask=build stackTrace=Error: /home/samshal/projects/github/javascript/bruno/node_modules/app-builder-bin/linux/x64/app-builder process failed ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
Exit code:
1
    at ChildProcess.<anonymous> (/home/samshal/projects/github/javascript/bruno/node_modules/builder-util/src/util.ts:250:14)
    at Object.onceWrapper (node:events:628:26)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1091:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! Lifecycle script `dist:rpm` failed with error:
npm ERR! Error: command failed
npm ERR!   in workspace: [email protected]
npm ERR!   at location: /home/samshal/projects/github/javascript/bruno/packages/bruno-electron

from the script scripts/build-electron.sh lines 12-16 are failing as the directories packages/bruno-app/out/ and packages/bruno-electron/web are not present

# Copy build
cp -r packages/bruno-app/out/* packages/bruno-electron/web

# Change paths in next
sed -i'' -e 's@/_next/@_next/@g' packages/bruno-electron/web/**.html

# Errors
cp: cannot stat 'packages/bruno-app/out/*': No such file or directory
sed: can't read packages/bruno-electron/web/**.html: No such file or directory

the same error occurs while building for latest commit as well as source code for v1.6.1

Am I missing some intermediate build steps where the files inside packages/bruno-app/out/ will be created?

@helloanoop
Copy link
Contributor

@halshar

While we await the fix for the rpm build, just letting you know that we recently released support for installing Bruno via flatpak #623

@halshar
Copy link
Author

halshar commented Jan 10, 2024

Thank you, I was not aware of the flatpak support; I had assumed that only snaps support was available.

Will this issue be closed, or will it be used to update progress on the RPM build and eventually be closed once the issue is fixed?

@helloanoop
Copy link
Contributor

Lets keep this open until we have rpm builds available.

@brunohpaiva
Copy link
Contributor

Right now the build system is a bit confusing, I got the same error some time ago.

To build the RPM package first you need to build the NextJS app in packages/bruno-app, you can use the build:web NPM script in the root package.json for that.

I usually use this shell script:

git clone https://github.com/usebruno/bruno.git usebruno-monorepo
cd usebruno-monorepo

# checkouts the latest stable version (at the time of writing).
# you can skip this following command to build directly from the `main` branch
git checkout v1.7.0

# ensure you are using the required Node version defined in the `.nvmrc` file
# at the time of writing it is Node v18.13.0
node --version

# installs dependencies from the lockfile, you can use `npm install` too
npm ci

# these three following commands are documented in the `contributing.md` file
npm run build:graphql-docs
npm run build:bruno-query
npm run build:bruno-common

# builds the NextJS app
# the ENV environment variable:
# prod - telemetry enabled, redux debug middleware disabled
# dev  - telemetry disabled, redux debug middleware enabled
ENV=prod npm run build:web

# builds the RPM package
npm run build:electron:rpm

# installs the RPM package, you may need to use `sudo` here
dnf install packages/bruno-electron/out/*.rpm

@guzman109
Copy link

unfortunately its not working

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

No branches or pull requests

5 participants