[opensuse] Packaging my first programme
Hi everyone. I have written a programme in bash. :) It is working great but I would like to package and distribute the script as a programme and I have never done this before. At the moment I have to call it like this: bash /home/paul/backup_prog.sh --some_arg --some_value 123 I would like to call it like this: backup_prog --some_arg --some_value 123 and also be able to install from a repository e.g. sudo zypper in backup_prog or sudo apt install backup_prog for ubuntu So I guess what I am asking is how to make a repository to distribute to multiple distros and how to package a bash script as an executable programme. Can anyone point me in the right direction or give me and advice on what to search for? Thanks Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi Paul,
So I guess what I am asking is how to make a repository to distribute to multiple distros and how to package a bash script as an executable programme.
two things helped me to learn packaging: 1) Reading the wiki. No, really! It might be too obvious but the packaging guidelines and tutorials to be found oS wike are really helpful and quite easy to understand. See https://en.opensuse.org/Portal:Packaging 2) OBS I cannot emphasise enough how useful OBS is. Imho it's one, if not *the*, outstanding thing of openSUSE. There is an easy tutorial available on the wiki: https://en.opensuse.org/openSUSE:Build_Service_Tutorial Bonus points: If you get your script packaged and successfully built, upload it to OBS and you don't have to take care for it's distribution. OBS will give you a personal repository. vinz. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/06/2018 04:49 PM, vinz@vinzv.de wrote:
Bonus points: If you get your script packaged and successfully built, upload it to OBS and you don't have to take care for it's distribution. OBS will give you a personal repository.
But be warned, the opensuse build service web interface can be a bit "quirky" to deal with. Using osc from the command line is quite a bit more flexible, but equally "quirky" to learn. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/12/2018 08:45, David C. Rankin wrote:
On 12/06/2018 04:49 PM, vinz@vinzv.de wrote:
Bonus points: If you get your script packaged and successfully built, upload it to OBS and you don't have to take care for it's distribution. OBS will give you a personal repository.
But be warned, the opensuse build service web interface can be a bit "quirky" to deal with. Using osc from the command line is quite a bit more flexible, but equally "quirky" to learn.
I wish to run my on repository as a learning exercise but I will bear this in mind if I ever do use the opensuse build service. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/07/2018 10:57 AM, Paul Groves wrote:
I wish to run my on repository as a learning exercise but I will bear this in mind if I ever do use the opensuse build service.
When you create you build service account, you will automatically get your own repository at download.opensuse.org/repositories/home:/you/, e.g. http://download.opensuse.org/repositories/home:/drankinatty/ When you build packages (e.g. package your script), you will designate what distributions it should be packaged for. Those subdirectories will automatically be created beneath your home repo. That part of the process isn't hard to handle (once you make friends with where all the links are within the build service interface) Well worth the effort and learning involved. Much of it is automated (including .spec file checks, etc..) The automation is where things can get a bit "challenging", but the opensuse-packaging@opensuse.org list is a great resource for help with what the current automation is wanting you to do :) -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
David C. Rankin
-
Paul Groves
-
vinz@vinzv.de