Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: How to build a project on Build Service

  1. #1
    Join Date
    Jun 2008
    Location
    Australia
    Posts
    439

    Default How to build a project on Build Service

    I have developed a program in Python (PyQt) which, at the moment, is just a folder with all those source, icon, xml etc. files. I zipped it in a *.tar.gz. Then I created a project in the OBS, uploaded the *.tar.gz in the Sources, selected repositories. And it shows the build status is broken.

    Has anyone built an rpm on OBS before? I just want to make an rpm of my program and make it available from my project repository. Please help me build it. What else do I need to do? I've read the OBS tutorial and guidelines but they don't really tell you step by step what you need to do after you add repositories and how to fix the broken build errors.

    The only dependencies for my program are Python and Qt.

    I've also uploaded a spec file:
    $ osc mkpac qt-test
    $ cd qt-test
    $ osc build
    $ osc vc
    $ osc commit
    not sure if it's correct though.

    Thank you.
    Desktop: openSUSE Leap 15 | KDE 5 | Intel i-7500 | Asus ROG STRIX Z270H GAMING | Asus EX-GTX1050TI-O4G nVidia
    Laptop Asus UL30A: openSUSE Leap 15 | KDE 5 | Intel SU7300

  2. #2
    Join Date
    Jun 2008
    Location
    Australia
    Posts
    439

    Default Re: How to build a project on Build Service

    I don't know what that spec file was doing but after some more research I came up with this:
    Summary: Test Program
    Name: qt-test
    Version: 1.0.0
    Release: 1
    Source:
    URL:
    License: GPL3
    Group: Utilities/Engineering
    %description
    Qt-based program.
    %prep
    %setup
    %build
    %install
    rm -rf $RPM_BUILD_ROOT
    make DESTDIR=$RPM_BUILD_ROOT install
    %clean
    rm -rf $RPM_BUILD_ROOT
    %files
    %defattr(-,root,root)
    %doc AUTHORS BUGS ChangeLog COPYING INSTALL NEWS README THANKS TODO
    %{_prefix}/bin/qt-test
    %{_prefix}/info/qt-test.info
    %{_prefix}/lib/charset.alias
    %{_prefix}/man/man1/*
    %{_prefix}/share/locale/*/LC_MESSAGES/qt-test.mo
    %{_prefix}/share/locale/locale.alias
    %changelog
    * Fri Apr 1 2011 Linuxoidoz
    - First draft of the spec file
    Is it correct to build an rpm from my Python program?

    Thank you.
    Desktop: openSUSE Leap 15 | KDE 5 | Intel i-7500 | Asus ROG STRIX Z270H GAMING | Asus EX-GTX1050TI-O4G nVidia
    Laptop Asus UL30A: openSUSE Leap 15 | KDE 5 | Intel SU7300

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,339
    Blog Entries
    15

    Default Re: How to build a project on Build Service

    On Wed, 2011-03-30 at 00:06 +0000, linuxoidoz wrote:
    > I have developed a program in Python (PyQt) which, at the moment, is
    > just a folder with all those source, icon, xml etc. files. I zipped it
    > in a *.tar.gz. Then I created a project in the OBS, uploaded the
    > *.tar.gz in the Sources, selected repositories. And it shows the build
    > status is broken.
    >
    > Has anyone built an rpm on OBS before? I just want to make an rpm of my
    > program and make it available from my project repository. Please help me
    > build it. What else do I need to do? I've read the OBS tutorial and
    > guidelines but they don't really tell you step by step what you need to
    > do after you add repositories and how to fix the broken build errors.
    >
    > The only dependencies for my program are Python and Qt.
    >
    > Thank you.
    >
    >

    Hi
    You need to make a spec file as well as add a setup.py to build your
    application in your sources, the setup file will place the individual
    files into the respective directories of the linux FHS.

    What's your home directory on OBS and I will branch and have a look for
    you.

    --
    Cheers Malcolm (Linux Counter #276890)
    SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.29-0.3-default
    up 9 days 2:03, 2 users, load average: 0.15, 0.18, 0.18
    GPU GeForce 8600 GTS Silent - Driver Version: 260.19.26


  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to build a project on Build Service

    On 2011-03-30 02:06, linuxoidoz wrote:

    Please move this to the build-service subforum.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  5. #5
    Join Date
    Jun 2008
    Location
    Australia
    Posts
    439

    Default Re: How to build a project on Build Service

    malcolmlewis, I've sent you a PM

    Where is the Build sub-forum?
    Desktop: openSUSE Leap 15 | KDE 5 | Intel i-7500 | Asus ROG STRIX Z270H GAMING | Asus EX-GTX1050TI-O4G nVidia
    Laptop Asus UL30A: openSUSE Leap 15 | KDE 5 | Intel SU7300

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,339
    Blog Entries
    15

    Default Re: How to build a project on Build Service

    Quote Originally Posted by linuxoidoz View Post
    malcolmlewis, I've sent you a PM

    Where is the Build sub-forum?
    Hi
    It's here; openSUSE Build Service (OBS)

    Locking thread until it syncs, then will move and reopen on the build service forum.
    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!

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,339
    Blog Entries
    15

    Default Re: How to build a project on Build Service

    Thread has been moved.
    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!

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,339
    Blog Entries
    15

    Default Re: How to build a project on Build Service

    Hi linuxoidoz
    So it looks like you need to create a setup/build routine so the files get put in the correct place (as in the python site lib) because when you run the application it creates files... I'm no python expert, but I think you need to take a step back and investigate how to compile it? You would also want to look at changing the license file to be called COPYING (which is the norm), add an AUTHOR, ChangeLog etc...

    I will help as much as I can, just tell me what you need help with
    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!

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    32,339
    Blog Entries
    15

    Default Re: How to build a project on Build Service

    Hi
    OK, did a test build for you. I also added a setup.py, a start script for /usr/bin. Now the README file has wrong end of line encoding and all the files in the icon directory need the permissions changed to 0644. I did this manually and created a new tarball called 2.0.3.

    Have a look here;
    https://build.opensuse.org/package/s...e%3Alinuxoidoz

    I can SR the files to you if your want?
    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!

  10. #10
    Join Date
    Jun 2008
    Location
    Australia
    Posts
    439

    Default Re: How to build a project on Build Service

    Thank you very much for your help.

    When you have a few spare minutes, could you please tell me what exactly you have done?

    All I want is to make my program installable as an rpm. And when it installs, I want it to appear in the KDE menu. Is it what you have done? Do you know of any good howto to do that? I followed the OBS one and obviously it's useless because it's very generic.

    If I have a folder which has all my files, what do I have to do before I build it? My program runs by just running the main script file. It doesn't need to be compiled, Python is interpreted. My program only creates config files.

    - what is setup.py for?
    - what permissions do I have to assign to my files?
    - what are COPYING and AUTHOR and ChangeLog for? Are these mandatory?
    - how can I download your built rpm and try to install it?

    I've also noticed, my program requires PyQt, I think it must be part of python-qt or python-qt-devel or something like that.

    Thanks again.
    Desktop: openSUSE Leap 15 | KDE 5 | Intel i-7500 | Asus ROG STRIX Z270H GAMING | Asus EX-GTX1050TI-O4G nVidia
    Laptop Asus UL30A: openSUSE Leap 15 | KDE 5 | Intel SU7300

Page 1 of 3 123 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
  •