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

What belongs in bpkg? #14

Open
brock opened this issue Mar 11, 2015 · 14 comments
Open

What belongs in bpkg? #14

brock opened this issue Mar 11, 2015 · 14 comments

Comments

@brock
Copy link
Member

brock commented Mar 11, 2015

I'm looking for your feedback, and would welcome a dialog on what types of packages belong in bpkg. While I don't think a heavy-handed approach is ideal, some guidelines might be in order to help those coming in and to prevent "package spam".

Some thoughts:

  • aliases probably don't belong in bpkg
  • anything that you currently run from your ~/bin would probably be a good candidate
  • bash functions that must be sourced and run in the current shell might be good candidates, but I'd want some level of scrutiny that those are being evaluated for security.

Here's an example of a function I source in my profile:

function mcd() {
    mkdir $1
    cd $1
}

And here's an example of a function I wouldn't want in my profile:

curl http://some-ad-site.com > /dev/null 2>&1
@brock
Copy link
Member Author

brock commented Mar 11, 2015

Once there is some consensus, I'd propose we add it here: http://www.bpkg.io/guidelines/

@yorkie
Copy link
Member

yorkie commented Mar 11, 2015

added the 2 following:

  1. it should be a package, it shouldn't depend on any logics for business
  2. it should depends on basic GUN/Linux softwares, in other words, be lightweight, it actually just like clibs to clang project

This is my thoughts, and wow, we in fact need to achieve the guidelines page :)

/cc @jwerle @alexdantas

@yorkie
Copy link
Member

yorkie commented Mar 11, 2015

Btw, actually bpkg should detect if the name exists in /usr/bin, usr/local/bin and etc., then we would give a warning to users?

@jwerle
Copy link
Member

jwerle commented Mar 11, 2015

+1 to all of this. I'd love to see a draft of a guidelines page too

@brock
Copy link
Member Author

brock commented Mar 11, 2015

Another thing I noticed when creating node-reinstall is that I forgot to make the file executable, and bpkg didn't do this for me during the installation. Probably worth opening an issue on that, and providing it in the guide here.

@jwerle
Copy link
Member

jwerle commented Mar 11, 2015

I'm not sure bpkg should be responsible for changing the permissions on a file. It is up to the creator of the package to explicitly modify the permissions or handle it in the "install" directive of the package.json file. See https://github.com/jwerle/assert.sh/commit/51d7a0ad7bf1042b07a86de81c90b042e5aa8873#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R6

@brock
Copy link
Member Author

brock commented Mar 12, 2015

I can see the reasoning behind that. We should probably add that to the package guidelines in that case.

The issue I ran into after I'd added node-reinstall to bpkg was that it was being installed globally into /usr/local/bin, and since I hadn't set it to +x, when I did which node-reinstall I got nothing back.

@yorkie
Copy link
Member

yorkie commented Mar 12, 2015

@jwerle @brock How about just adding the bin field like NPM:

{
  "bin": {
    "doCMD": "cmd.sh"
  }
}

In this case we can do the modification on permission because the bpkg user specified it.

@brock
Copy link
Member Author

brock commented Mar 12, 2015

@yorkie where would you add that?

@yorkie
Copy link
Member

yorkie commented Mar 12, 2015

Should be package.json @brock :)

@yorkie
Copy link
Member

yorkie commented Mar 12, 2015

Ouch! @brock I'm unsure if the current bpkg has implemented this feature, just propose to you guys, if lgty, i'm interested in doing introduce this.

@brock
Copy link
Member Author

brock commented Mar 12, 2015

thanks @yorkie

ya I need to spend some more time to dig through the bpkg source because I'm not familiar enough with how all of it works. Can you expand a bit on what that would do? Sounds interesting...

@yorkie
Copy link
Member

yorkie commented Mar 12, 2015

haha, i'm waiting for @jwerle, he is my commander 🎏

@jwerle
Copy link
Member

jwerle commented Mar 12, 2015

Haha go for it. This will enable a lot of bash packages in npm to just work
with bpkg

On Wed, Mar 11, 2015, 10:57 PM Yorkie Liu notifications@github.com wrote:

haha, i'm waiting for @jwerle https://github.com/jwerle, they are my
commander [image: 🎏]


Reply to this email directly or view it on GitHub
#14 (comment).

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

No branches or pull requests

3 participants