[opensuse-factory] simple packaging

may be this is already done somewhere, but is it possible to have a very simple documentation of how to make a openSUSE rpm. All what I have seen is very intimidating (for me, say for many others!). in short, given I have already compiled and running an application on my openSUSE computer, how could I make the others use it? for example, I use daily "makethumb.sh". As it's name say, it's a sh script, GPL and AFAIK not included in openSUSE and it should be, very nice. how can I make it part of the packages? thanks jdd -- http://www.dodin.net http://dodin.org/galerie_photo_web/expo/index.html http://lucien.dodin.net http://fr.susewiki.org/index.php?title=Gérer_ses_photos --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

On Friday 18 August 2006 12:05, jdd wrote:
http://en.opensuse.org/SUSE_Build_Tutorial Skip the first part as it deals with setting up a local build environment, you just need the spec file part. There are some templates there. Also when creating a package in the build service, I think it offers to you to create a template .spec file. Duncan --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

Duncan Mac-Vicar Prett a écrit :
I hope so, because the " Step Five - Create the spec file Now that you have the source you follow the usual RPM creation process. Create a specfile for the package. You can find specific SUSE related information about spec files in the spec file chapter 59494. " is what stops me :-(. I have no previous idea of the rpm creation process it's probably a step by step tutorial for the creation of spec file that I miss :-() jdd -- http://www.dodin.net http://dodin.org/galerie_photo_web/expo/index.html http://lucien.dodin.net http://fr.susewiki.org/index.php?title=Gérer_ses_photos --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

On Friday 18 August 2006 14:54, jdd wrote:
you are over-scared a .spec fle is all you need, it is basically a recipe it has some metadata about the package,all the source tarballs, all the patches (optional), what packages are requred to build it (mandatory, as thell the build enviroment what to install appart of the base system)) and what packages are required to run it (most of this can be exacted automatically) The only difference with building it in the specfile, is that you configure it to be in /usr (--prefix=/usr) but at install time you install to a jail directory %{_buildroot} to no screw up the system where you create the rpm There are some macros to learn like buildroot, libdir lib which automatically get assigned lib or lib64 depending on the case, there are ruby and perl macros, etc. Then you have sections for unpacking (%setup), configure (%configure), compiling, and installing at the end you have the list of files the package installed. and the changelog Upload the specfile and the listed source tarballs, and done, you will get an rpm package when it notifies you uploaded something. The best way to learn is to steal some .spec file from a simple configure; make ; make install package, and learn from there. You can find those in the same build service. Duncan --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

Duncan Mac-Vicar Prett a écrit :
you are over-scared
howver I nearly don't understand anyhting of your mail. :-(- let me be more precise. I start from a tarball. I go there as root. 1) extremely simple example for makethumb.sh there are no other files and the script asks only for bash. I already wrote a wiki page about it that could be made a man page if necessary. I add of my own a small companion script that needs jhead, so jhead could be seen as an optional dependency what is the .spec file in a such situation? the rpm is quite unusefull, it's only needed as consistency through the distribution. is it necessary to have a build system account for that? (I can do if necessary) 2) less simple, but... most tarbals I use have a .configure/make/makeinstall sheme. don't these utilities already do the job of creating the spec? or may be the job was done for them by the author? some lines? thanks jdd -- http://www.dodin.net http://dodin.org/galerie_photo_web/expo/index.html http://lucien.dodin.net http://fr.susewiki.org/index.php?title=Gérer_ses_photos --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

El Viernes, 18 de Agosto de 2006 06:23, Duncan Mac-Vicar Prett escribió: [...]
How would I get the info about the needed packages (the Requires and BuildRequires tags)? Right now I am trying to figure out what packages are needed by reading the README/INSTALL files in the tarball, check the web and finally look at the output of the configure script. Very time consuming and error-prone. -- TIA Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

Hi, On Saturday, August 19, 2006 at 22:20:28, Andreas wrote:
For Requires you usually done have to do anything. Autoreqprov is on by default and that means that RPM compiles the list of Requires from the binarys/scripts. For BuildRequires you have to do exactly what you are doing.. Henne -- Henne Vogelsang, http://hennevogel.de "To die. In the rain. Alone." Ernest Hemingway --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

Thank you! It's nice to know that I'm on the right path :) -- Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

On Fri, 18 Aug 2006, jdd <jdd@dodin.org> wrote:-
This would probably be better answered on the opensuse-packaging list but, since you asked here...
in short, given I have already compiled and running an application on my openSUSE computer, how could I make the others use it?
A gun to the head? ;) Seriously, you'll need to write a spec file for it, build the RPM[0], find somewhere to host the RPMs you've built, and then either hope someone stumbles or advertise the fact that you've done so.
Write your spec file[0], create a .tar.gz or .tar.bz2 archive[1] containing the script, spec file and any other bits and pieces that are required[2] and, if you wish to use the build service, upload it and then build it. If you don't wish to use the build service, build it yourself and copy the resultant RPMs to wherever you're hosting them. [0] Here's an example that you might use as a basis <URL:http://www.davjam.org/~davjam/linux/thumbnail/makethumb.spec> [1] Generally, for small archives (30KB or less) using gzip compresses a little better than bzip2. However, once the archive grows beyond about 80KB, bzip2 seems to compress much better than gzip. [2] Since it's being released under the GPL, you might like to include a copy of the GPL license. Maybe a README and INSTALL document could be included as well. Regards, David Bolt -- Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/ AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11 AMD2400(32) 768Mb SUSE 10.0 | Falcon 14Mb TOS 4.02 | A4000 4Mb RISCOS 3.11 AMD2600(64) 512Mb SUSE 10.0 | | RPC600 129Mb RISCOS 3.6 --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

David Bolt a écrit :
Write your spec file[0]
right now, this is the first problem to solve. I beg after the first try, things will go better :-) , create a .tar.gz or .tar.bz2 archive[1]
containing the script, spec file and any other bits and pieces that are required[2]
well, I have already a tgz with all the files - that is all the files of the application a want a rpm for (here makethumb.sh) and, if you wish to use the build service, upload it and
then build it.
well... what does this mean? right now I have no access to the build service (remember, only available for experienced programmers, what I'm certainly not :-( If you don't wish to use the build service, build it
yourself
what mean "build it"? is it running the ym2.. (don't rember exactly the name)? if so, probably no problem. and copy the resultant RPMs to wherever you're hosting them. hosting and advertising is not a problem.
[0] Here's an example that you might use as a basis
<URL:http://www.davjam.org/~davjam/linux/thumbnail/makethumb.spec>
thanks, I will study this (tomorrow :-) but how may I know if the rpm is valid? I can't test it on my own computer (of course, there it runs) thanks jdd -- http://www.dodin.net http://dodin.org/galerie_photo_web/expo/index.html http://lucien.dodin.net http://fr.susewiki.org/index.php?title=Gérer_ses_photos --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

this thread become more specific, so I move it to the packaging list jdd -- http://www.dodin.net http://dodin.org/galerie_photo_web/expo/index.html http://lucien.dodin.net http://fr.susewiki.org/index.php?title=Gérer_ses_photos --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

On Friday 18 August 2006 12:05, jdd wrote:
http://en.opensuse.org/SUSE_Build_Tutorial Skip the first part as it deals with setting up a local build environment, you just need the spec file part. There are some templates there. Also when creating a package in the build service, I think it offers to you to create a template .spec file. Duncan --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

Duncan Mac-Vicar Prett a écrit :
I hope so, because the " Step Five - Create the spec file Now that you have the source you follow the usual RPM creation process. Create a specfile for the package. You can find specific SUSE related information about spec files in the spec file chapter 59494. " is what stops me :-(. I have no previous idea of the rpm creation process it's probably a step by step tutorial for the creation of spec file that I miss :-() jdd -- http://www.dodin.net http://dodin.org/galerie_photo_web/expo/index.html http://lucien.dodin.net http://fr.susewiki.org/index.php?title=Gérer_ses_photos --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

On Friday 18 August 2006 14:54, jdd wrote:
you are over-scared a .spec fle is all you need, it is basically a recipe it has some metadata about the package,all the source tarballs, all the patches (optional), what packages are requred to build it (mandatory, as thell the build enviroment what to install appart of the base system)) and what packages are required to run it (most of this can be exacted automatically) The only difference with building it in the specfile, is that you configure it to be in /usr (--prefix=/usr) but at install time you install to a jail directory %{_buildroot} to no screw up the system where you create the rpm There are some macros to learn like buildroot, libdir lib which automatically get assigned lib or lib64 depending on the case, there are ruby and perl macros, etc. Then you have sections for unpacking (%setup), configure (%configure), compiling, and installing at the end you have the list of files the package installed. and the changelog Upload the specfile and the listed source tarballs, and done, you will get an rpm package when it notifies you uploaded something. The best way to learn is to steal some .spec file from a simple configure; make ; make install package, and learn from there. You can find those in the same build service. Duncan --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

Duncan Mac-Vicar Prett a écrit :
you are over-scared
howver I nearly don't understand anyhting of your mail. :-(- let me be more precise. I start from a tarball. I go there as root. 1) extremely simple example for makethumb.sh there are no other files and the script asks only for bash. I already wrote a wiki page about it that could be made a man page if necessary. I add of my own a small companion script that needs jhead, so jhead could be seen as an optional dependency what is the .spec file in a such situation? the rpm is quite unusefull, it's only needed as consistency through the distribution. is it necessary to have a build system account for that? (I can do if necessary) 2) less simple, but... most tarbals I use have a .configure/make/makeinstall sheme. don't these utilities already do the job of creating the spec? or may be the job was done for them by the author? some lines? thanks jdd -- http://www.dodin.net http://dodin.org/galerie_photo_web/expo/index.html http://lucien.dodin.net http://fr.susewiki.org/index.php?title=Gérer_ses_photos --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

El Viernes, 18 de Agosto de 2006 06:23, Duncan Mac-Vicar Prett escribió: [...]
How would I get the info about the needed packages (the Requires and BuildRequires tags)? Right now I am trying to figure out what packages are needed by reading the README/INSTALL files in the tarball, check the web and finally look at the output of the configure script. Very time consuming and error-prone. -- TIA Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org

Hi, On Saturday, August 19, 2006 at 22:20:28, Andreas wrote:
For Requires you usually done have to do anything. Autoreqprov is on by default and that means that RPM compiles the list of Requires from the binarys/scripts. For BuildRequires you have to do exactly what you are doing.. Henne -- Henne Vogelsang, http://hennevogel.de "To die. In the rain. Alone." Ernest Hemingway --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org
participants (5)
-
Andreas
-
David Bolt
-
Duncan Mac-Vicar Prett
-
Henne Vogelsang
-
jdd