Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Need help in building a package

  1. #1

    Default Need help in building a package

    Greetings,

    I am trying to build a package (oomox) via https://build.opensuse.org. It has a succeeded status but I cannot install it via YAST, I get /bin/env dependency error. I know that it should be /usr/bin/env, but how can I fix this?

    Here you may see my spec and source files:

    https://build.opensuse.org/package/s...HidDeNeR/oomox


    I would appreciate any help.

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,278
    Blog Entries
    15

    Default Re: Need help in building a package

    Quote Originally Posted by HidDeNeR View Post
    Greetings,

    I am trying to build a package (oomox) via https://build.opensuse.org. It has a succeeded status but I cannot install it via YAST, I get /bin/env dependency error. I know that it should be /usr/bin/env, but how can I fix this?

    Here you may see my spec and source files:

    https://build.opensuse.org/package/s...HidDeNeR/oomox


    I would appreciate any help.
    Hi
    So why not use the makefile to install etc? I'm guessing all those requires, plus if you look at the rpmlint report for clues.

    Desktop files need you to run %suse_update_desktop_file macro and well as %post and %postun routines..

    I'm assuming this is your first foray into packaging?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3

    Default Re: Need help in building a package

    Yep, one of my first packages. Still bin/env dependency error when installing via YAST. The shebangs from source (python) files are #!bin/env and I guess that causes the problem after build? Should read more documentation, I've just used the info from Arch pkgbuild

    P.S. Package deleted. Ignore the link.

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,278
    Blog Entries
    15

    Default Re: Need help in building a package

    Quote Originally Posted by HidDeNeR View Post
    Yep, one of my first packages. Still bin/env dependency error when installing via YAST. The shebangs from source (python) files are #!bin/env and I guess that causes the problem after build? Should read more documentation, I've just used the info from Arch pkgbuild

    P.S. Package deleted. Ignore the link.
    Hi
    Happy to help you work through building it if you want..?

    Best place to start is looking at the spec files on packages similar to what your wanting, eg a icon theme package would have a few things you need...

    If there something else you want to try building, just post back and ask
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5

    Default Re: Need help in building a package

    Thanks for your time. I really appreciate it. I have updated my spec, could you have a look and tell me what else should be included?

    https://build.opensuse.org/package/s...HidDeNeR/oomox

  6. #6

    Default Re: Need help in building a package

    I get a bunch of warnings in the log file. How to mark a folder as %config? I can't find it in documentation. For duplicate files I use %fdupes, but I still get the warnings (I guess it is not used correctly).

    And how to tell the build process to change all #!/bin/env to #!/usr/bin/env. I am not sure, but I guess it should be built with #!/usr/bin/env (otherwise I get that dependency error in YAST).

    Thank you in advance.

  7. #7

    Default AW: Re: Need help in building a package

    Quote Originally Posted by HidDeNeR View Post
    How to mark a folder as %config?
    Before:

    Code:
    %files
    .............
    /foo/bar
    After:

    Code:
    %files
    ............
    %config /foo/bar
    AK

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,278
    Blog Entries
    15

    Default Re: Need help in building a package

    On Tue 08 Nov 2016 07:46:03 AM CST, HidDeNeR wrote:

    I get a bunch of warnings in the log file. How to mark a folder as
    %config? I can't find it in documentation. For duplicate files I use
    %fdupes, but I still get the warnings (I guess it is not used
    correctly).

    Thank you in advance.


    Hi
    If you have a look at some of the python package specs they use perl to
    change the shebang...

    For example in the %prep section;
    Code:
    Get rid of non-executable-script python warnings
    find src/freeseer/ -type f -name '*.py' | while read f; do
    perl -n -i -e 'print unless $.==1 && m/^#!/' "$f"
    done
    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE Leap 42.1|GNOME 3.16.2|4.1.34-33-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


  9. #9

    Default Re: Need help in building a package

    Thanks!

    I have just found a sed/grep way:

    Code:
    # fix shebangs - convert /usr/local/bin/python and /usr/bin/env/python to /usr/bin/python3
    for dir in Lib Tools; do
        # find *.py, filter to files that contain bad shebangs
        find $dir -name '*.py' -type f -print0 \
            | xargs -0 grep -lE '^#! *(/usr/.*bin/(env +)?)?python' \
            | xargs sed -r -i -e '1s@^#![[:space:]]*(/usr/(local/)?bin/(env +)?)?python([0-9]+(\.[0-9]+)?)?@#!/usr/bin/python3@'
    done
    So I need to convert #!/bin/env python3 to #!/usr/bin/env python3, or even better to !#/usr/bin/python3 (as in the example above). I changed it to

    Code:
    # fix shebangs - convert /usr/local/bin/python and /usr/bin/env/python to /usr/bin/python3
    for dir in gui; do
        # find *.py, filter to files that contain bad shebangs
        find $dir -name '*.py' -type f -print0 \
            | xargs -0 grep -lE '^#! *(/bin/(env +)?)?python3@' \
            | xargs sed -r -i -e '1s@^#![[:space:]]*(/bin/(env +)?)?python3@?@#!/usr/bin/python3@'
    done
    However, I get a "sed: no input files" error I have no experience with it, need help!

  10. #10
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,278
    Blog Entries
    15

    Default Re: Need help in building a package

    On Tue 08 Nov 2016 04:46:01 PM CST, HidDeNeR wrote:

    Thanks!

    I have just found a sed/grep way:


    Code:
    --------------------
    # fix shebangs - convert /usr/local/bin/python
    and /usr/bin/env/python to /usr/bin/python3 for dir in Lib Tools; do
    # find *.py, filter to files that contain bad shebangs
    find $dir -name '*.py' -type f -print0 \
    | xargs -0 grep -lE '^#! *(/usr/.*bin/(env +)?)?python' \
    | xargs sed -r -i -e '1s@^#![[:space:]]*(/usr/(local/)?bin/(env
    +)?)?python([0-9]+(\.[0-9]+)?)?@#!/usr/bin/python3@' done
    --------------------


    So I need to convert #!/bin/env python3 to #!/usr/bin/env python3, or
    even better to !#/usr/bin/python3 (as in the example above). I changed
    it to


    Code:
    --------------------
    # fix shebangs - convert /usr/local/bin/python
    and /usr/bin/env/python to /usr/bin/python3 for dir in gui; do
    # find *.py, filter to files that contain bad shebangs
    find $dir -name '*.py' -type f -print0 \
    | xargs -0 grep -lE '^#! *(/bin/(env +)?)?python3@' \
    | xargs sed -r -i -e '1s@^#![[:space:]]*(/bin/(env
    +)?)?python3@?@#!/usr/bin/python3@' done
    --------------------


    However, I get a "sed: no input files" error I have no experience
    with it, need help!


    Hi
    In your case I thought it was the /bin/env shebang?

    Yes, all you would need to do is find /bin/env with /usr/bin/env

    --
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    openSUSE Leap 42.1|GNOME 3.16.2|4.1.34-33-default
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!


Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •