Skip to content

What belongs in bpkg? #14

Open
Open

Description

@brock

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

Activity

  1. brock commented on Mar 11, 2015

    @brock
    MemberAuthor

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

  2. yorkie commented on Mar 11, 2015

    @yorkie
    Member

    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

  3. yorkie commented on Mar 11, 2015

    @yorkie
    Member

    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?

  4. jwerle commented on Mar 11, 2015

    @jwerle
    Member

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

  5. brock commented on Mar 11, 2015

    @brock
    MemberAuthor

    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.

  6. jwerle commented on Mar 11, 2015

    @jwerle
    Member

    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

  7. brock commented on Mar 12, 2015

    @brock
    MemberAuthor

    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.

  8. yorkie commented on Mar 12, 2015

    @yorkie
    Member

    @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.

  9. brock commented on Mar 12, 2015

    @brock
    MemberAuthor

    @yorkie where would you add that?

  10. yorkie commented on Mar 12, 2015

    @yorkie
    Member

    Should be package.json @brock :)

  11. yorkie commented on Mar 12, 2015

    @yorkie
    Member

    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.

  12. brock commented on Mar 12, 2015

    @brock
    MemberAuthor

    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...

  13. yorkie commented on Mar 12, 2015

    @yorkie
    Member

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

  14. jwerle commented on Mar 12, 2015

    @jwerle
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions