Publish your Software
From openSUSE
Contents |
Publishing Software for openSUSE and other Distributions
The first step to determine how to publish your software for openSUSE is to see your software distribution terms.
Free software
Free software sources and build recipes can be hosted on the openSUSE Build Service.
This gives you the following features:
- Build for most popular distribution and architectures including openSUSE, Debian, Ubuntu, Fedora, Mandriva. ( See here for more information about cross distribution packaging )
- Repositories for built distributions are generated and updated automatically
- Software hosted there will appear automatically in the Software Catalog, with One Click Install (more info) icons ready for easy installation.
- Automatic mirroring
- Update, edit and rebuild your packages using a nice AJAX web client, or a nice subversion like command line client, or use the WebService API!
See here for more info about using the openSUSE build service.
Non Free, Restricted Distribution Software
If your software is not free software, it can't be hosted in the openSUSE build service. You still have the following alternatives:
Make it distributable, you will be famous.
Not as famous and trusted as if the software is free software, but why to restrict people giving it to each other?
You can make it distributable, so the distribution can carry it in the Non Free section of their repositories, then you only need to setup the one-click-install information, but you don't need to care about packaging. This requires that the distribution license of the binaries gives enough freedom for distributors to repackage and adapt the binary package to run on the system.
Run your own instance of the build service
Yes, the Build Service is an open source project, which you can install in your own network to build Linux software for the most popular distributions. You won't enjoy the automatic mirroring and the build power of the openSUSE build service, but you will be able to keep the instance internally and publish the resulting repositories to the outside. At the same time you will be able to use the client applications to simplify Linux packaging and distribution to a level never seen before.
Instructions on how to deploy your own instance of the Build Service are here.
Build manually, create a repository and publish!
If you don't want to run your own instance of the build service, or you are already publishing rpm files for distributions in your own way, this is how you can make them accessible and installable by just one mouse click:
Lets assume your software is called "foo"
Put:
- foo.spec (Don't have a spec file yet? There are templates here and here, see also here too make them cross distribution enabled.)
- foo.diff (some patch needed to build, or last minute fix?)
- foo-1.0.tar.gz (your source)
I find rpm default of putting the sources in one directory, and the spec files in another is annoying. I like to have all related files sorted per package in a folder.
I keep all my spec source files together in /space/packages/$packagename using the following ~/.rpmmacros
%topdir /space/packages
%_builddir %{topdir}/build
%_rpmdir %{topdir}/rpms
%_sourcedir %(echo $PWD)
%_specdir %(echo $PWD)
%_srcrpmdir %{topdir}/rpms
then I just go to /space/packages/foo and do:
rpmbuild -bb foo.spec
The resulting rpm is now in /space/packages/rpms/$architecture
You can also use the openSUSE Build Service command line tool, osc to perform the local builds:
osc build <platform> <arch> <specfile> [--clean|--noinit|...]
Create a One Click Install .ymp file.
See Meta_Packages/ISV for a HOWTO
This is basically:
- List of repositories needed for the package installation. Usually the distribution base one, plus your repository.
- The name of the package items to install with the mouse click. No need to put the package dependencies here, those are installed automatically by the package manager. But if your software has one or more components, you would like to offer the user the possibility to install only some of them.
Move the foo-1.0-1-i586.rpm and foo.ymp together to some folder accessible via the web.
Go to that folder and generate rpm meta data (createrepo is part of yum and dstributed as package createrepo): createrepo . (a repodata/ directory should appear in the folder)
Edit foo.ymp and change your repository URL for the URL where foo.ymp, the rpm file and the repodata/ directories are accessible from the outside.
Sign
Optional, you can also sign the repository.
Go to repodata/ and sign the repomd.xml file with your private gpg key
gpg -s -u yourid@foo.com -b --armor repomd.xml
(you should get a repomd.xml.asc )
Export the public key as repomd.xml.key
gpg --export -u yourid@foo.com --armor > repomd.xml.key
Publish
| Version: 10.3
| Linking a one-click-install file will only work for users with the one-click handler installed. This is included by default since 10.3. For other cases, you can provide the repository URL. |
Place some nice icon like
on your website, and link it to foo.ymp.
User clicking on the icon will get a wizard to install your software in a few clicks.
Non Free, Distributable binaries
Some non free packages like Acrobat reader and Flash, have explicit permission for some Linux Distributors to ship them. In that case they will be available in the Non Free repository of the distribution, so you don't need to build the package your self.
In this case you only need to setup the one click install.
Create a One Click Install .ymp file.
See Meta_Packages/ISV for a HOWTO
This is basically:
- List of repositories needed for the package installation. Usually the distribution base one, plus your repository, which in this case is the non-free repository of openSUSE.
- The name of the package items to install with the mouse click. No need to put the package dependencies here, those are installed automatically by the package manager. But if your software has one or more components, you would like to offer the user the possibility to install only some of them.
Publish
| Version: 10.3
| Linking a one-click-install file will only work for users with the one-click handler installed. This is included by default since 10.3. For other cases, you can provide the repository URL. |
Place some nice icon like
on your website, and link it to foo.ymp.
User clicking on the icon will get a wizard to install your software in a few clicks.

