GithubHelp home page GithubHelp logo

node-rpm-builder's People

Contributors

csi-lk avatar damiendube avatar dependabot[bot] avatar jbesta avatar kvnify avatar nick-khm avatar rictorres avatar sparkleholic avatar tameraydin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

node-rpm-builder's Issues

Verbose option

It will print debug info to the console.

{
  verbose: true || false
}

stderr maxBuffer exceeded

Hi, I was getting this to work, and I ran into this glitch. I'd run my little rpmbuilder.js program and after maybe a minute i'd get this:

Error: stderr maxBuffer exceeded

this came from child-process. At first I tried passing in an option:

  execOpts: {maxBuffer: 1e6},

but that wasn't even big enough. Finally I commended out this line in index.js:

var cmd = [
  'rpmbuild',
  '-bb',
  //'-vv',          <<<====****
  '--buildroot',
  buildRoot,
  specFile
].join(' ');

The -vv was generating gobs and gobs of output into stderr. Since it seems to be dropped anyway, you probably don't need it.

BUT, after that the program wouldn't quit. Generated the rpm file, i just have to ^C. could be my problem, but just fyi.

Add "command prefix" parameter or similar

Hi! I've the next problem: I want to build i386 packages in a x86_64 machine. After some tests, the only good solution that I've found is to prepend setarch i386 to the command, so the command:

rpmbuild -bb -vv --buildroot ... behaves setarch i386 rpmbuild -bb -vv --buildroot...

Can you add some new option to your library that lets prepend "something" to the command? Or if you have a better solution it will be great.

Thanks for your library!!

error: No compatible architectures found for build

I'm trying to build a node application rpm using your npm package. I've filled out all the options concerning arch with x86_64 as that's the platform I'm currently running. I get the following error when I run the npm start.

[root@unknown0800277ccd0f node-app]# uname -m
x86_64
[root@unknown0800277ccd0f node-app]# npm start

> [email protected] start /root/node-app
> node index.js

Creating RPM directory structure at: /root/node-app/tmp-2zFExTn9V
SPEC file created: tmp-2zFExTn9V/SPECS/node-app-0.0.1-1.x86-64.spec
Executing: rpmbuild -bb -vv --buildroot /root/node-app/tmp-2zFExTn9V/BUILDROOT/ tmp-2zFExTn9V/SPECS/node-app-0.0.1-1.x86-64.spec
/root/node-app/index.js:40
    throw err;
    ^

Error: Command failed: rpmbuild -bb -vv --buildroot /root/node-app/tmp-2zFExTn9V/BUILDROOT/ tmp-2zFExTn9V/SPECS/node-app-0.0.1-1.x86-64.spec
error: No compatible architectures found for build

OS I'm build on.

platform:linux
distro:CentOS Linux
release:7
codename:Core
kernel:3.10.0-957.12.2.el7.x86_64
arch:x64
hostname:unknown0800277ccd0f.attlocal.net
codepage:UTF-8
logofile:centos
serial:f5438d6c4f924545873e64ebe3d743a4
build:N/A
servicepack:N/A

Also, I noticed that the keepTemp option has no logic. Whether I set it or not, it still keeps the temp directory. Not sure if that's happening because the builds are failing before it can complete.

ExcludeFiles doesn't check against contents of included subdirectory.

For the config:

const rpmOptions = {
  name: packageName,
  version: gitVersion.GitVersion,
  release: 1,
  buildArch: 'noarch',
  keepTemp: false,
  files: [{ cwd: './dist', src: '*', dest: `/opt/${packageName}/` }],
  excludeFiles: ['./dist/static/js/*.js.map']
};

My expected output would be that all files inside the ./dist directory and subdirectories should be checked against the exclude paths.

What actually happens is that the check stops at the level of the first subdirectory, i.e. the paths checked includes ./dist/static, and since that path is not itself in the excludeFiles the entire static subdirectory is included without checking any of the files within that directory against the excludeFiles list. i.e. all the *.js.map files inside the static/js subdirectory end up being added to the rpm instead of being excluded because those file paths never get tested against the excludeFiles list.

Tested on rpm_builder v1.1.0

huntr.dev - Command Injection

This issue has been generated on-behalf of Mik317 (https://huntr.dev/app/users/Mik317)

Vulnerability Description

Affected versions execute arbitrary commands remotely inside the victim's PC. The issue occurs because user input is formatted inside a command that will be executed without any checks. The cmd list is stringed and executed inside the exec function without checking the buildRoot and specFile variables, which are controlled by the user, leading to RCE.

The issue arises here:

https://github.com/rictorres/node-rpm-builder/blob/master/index.js#L119

Bug Bounty

We have opened up a bounty for this issue on our bug bounty platform. Want to solve this vulnerability and get rewarded ๐Ÿ’ฐ? Go to https://huntr.dev/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.