[opensuse-buildservice] How to make a debian package ?
Hi, I am trying to see how to build packages for both rpm and deb based distribution: I am familiar with deb packaging (I am a debian and the ubuntu user for more than 5 years), but do not know much about rpm. I managed to get opensuse build system to make rpm packages for openSuse 10.2 and Fedora 6 (I am using GNU hello as a simple software to package), but I don't see how to build deb package: for now, the build system produces rpm for debian etch and ubuntu, which is not really what I want. As osc is itself built with the build system, I thought I could take a look at the project to see how both deb and rpm are built, but the file organization is totally different than the debian Policy, and I am bit lost. I found this http://en.opensuse.org/Build_Service/Deb_builds, which explains the different naming convention, but does not tell how to build debian packages. Is there any more documentation for how to build debian packages ? As I understand, it is possible to share some package related meta data (changelog, patches, etc...) between rpm and deb ? cheers, David --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
David Cournapeau wrote: > Hi, > > I am trying to see how to build packages for both rpm and deb based > distribution: I am familiar with deb packaging (I am a debian and the > ubuntu user for more than 5 years), but do not know much about rpm. I > managed to get opensuse build system to make rpm packages for openSuse > 10.2 and Fedora 6 (I am using GNU hello as a simple software to > package), but I don't see how to build deb package: for now, the build > system produces rpm for debian etch and ubuntu, which is not really > what I want. > As osc is itself built with the build system, I thought I could > take a look at the project to see how both deb and rpm are built, but > the file organization is totally different than the debian Policy, and > I am bit lost. I found this > http://en.opensuse.org/Build_Service/Deb_builds, which explains the > different naming convention, but does not tell how to build debian > packages. > Is there any more documentation for how to build debian packages ? > As I understand, it is possible to share some package related meta > data (changelog, patches, etc...) between rpm and deb ? Ok, I managed to build a deb package, but failed to build it locally, because osc cannot find the debian files necessary for a chrooted build: - Is it possible to use standard debian mirrors for that (using urllist option in .oscrc) ? - I found that the names of the deb files that build was looking for were not standard (for example, the separator between name and version, as well as between revision and arch, is _ and not - for debian, so we do not have libncurses5-5.5-5.i386.deb, but libncurses5_5.5-5_i386.deb). Am I missing something, or is this a bug ? cheers, David --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tue, Apr 03, 2007 at 05:30:00PM +0900, David Cournapeau wrote:
- I found that the names of the deb files that build was looking for were not standard (for example, the separator between name and version, as well as between revision and arch, is _ and not - for debian, so we do not have libncurses5-5.5-5.i386.deb, but libncurses5_5.5-5_i386.deb). Am I missing something, or is this a bug ?
(CC Peter Poeml, the author of osc) Looks like a bug in osc. Peter, you have to use '_' for deb packages when reconstructing the package name. Also, some deb packages have no release, so make sure not to add a trailing "_" when there is no release entry. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michael Schroeder wrote:
On Tue, Apr 03, 2007 at 05:30:00PM +0900, David Cournapeau wrote:
- I found that the names of the deb files that build was looking for were not standard (for example, the separator between name and version, as well as between revision and arch, is _ and not - for debian, so we do not have libncurses5-5.5-5.i386.deb, but libncurses5_5.5-5_i386.deb). Am I missing something, or is this a bug ?
(CC Peter Poeml, the author of osc)
Looks like a bug in osc. Peter, you have to use '_' for deb packages when reconstructing the package name. Also, some deb packages have no release, so make sure not to add a trailing "_" when there is no release entry.
Another problem when downloading packages (I modified naming convention for deb pkgs in osc sources to see how far I would go) is that all files are not in the same directory as it seems to be for rpm-based distributions: bash would be in http://jp.archive.ubuntu.com/ubuntu/pool/main/b/bash/ instead of http://download.fedora.redhat.com/pub/fedora/linux/core/development/i386/os/.... As far as I can see from the osc sources, I don't see how fetching the sources would work for debian-based distributions, but again, I may just missing something, as I am just starting using the service. I don't know how the build system works on the server side: does it use deboostrap and pbuilder, which are similar to build for Suse AFAIK (build a chroot env for building/testing packages) ? Or is the build environment built differently ? I couldn't get this information from the log of a successfull build. Thanks, David --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tue, Apr 03, 2007 at 07:37:04PM +0900, David Cournapeau wrote:
I don't know how the build system works on the server side: does it use deboostrap and pbuilder, which are similar to build for Suse AFAIK (build a chroot env for building/testing packages) ? Or is the build environment built differently ? I couldn't get this information from the log of a successfull build.
Actually it uses neither. It calls dpkg to install the needed packages and dpkg-source/dpkg-buildpackage to build the packages. It's basically the same code used for rpms with just different command calls. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michael Schroeder wrote:
On Tue, Apr 03, 2007 at 07:37:04PM +0900, David Cournapeau wrote:
I don't know how the build system works on the server side: does it use deboostrap and pbuilder, which are similar to build for Suse AFAIK (build a chroot env for building/testing packages) ? Or is the build environment built differently ? I couldn't get this information from the log of a successfull build.
Actually it uses neither. It calls dpkg to install the needed packages and dpkg-source/dpkg-buildpackage to build the packages. It's basically the same code used for rpms with just different command calls.
In this case, how are the files retrieved by the build service ? Is there a reason for not using deboostrap/pbuilder ? As they exist for this exact purpose (building/testing pkgs in clean environments), and can retrieve sources directly from mirrors, this would make things easier, no ? cheers, David --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tue, Apr 03, 2007 at 08:00:33PM +0900, David Cournapeau wrote:
Michael Schroeder wrote:
Actually it uses neither. It calls dpkg to install the needed packages and dpkg-source/dpkg-buildpackage to build the packages. It's basically the same code used for rpms with just different command calls.
In this case, how are the files retrieved by the build service ?
The build clients asks the repository server for the packages. There are no mirrors involved at all. Local building with osc is a different issue, of course. osc asks software.opensuse.org for a package, software.opensuse.org redirects to a mirror. If software.opensuse.org doesnt know about the package osc falls back to retrieving the package from the buildservice.
Is there a reason for not using deboostrap/pbuilder ? As they exist for this exact purpose (building/testing pkgs in clean environments), and can retrieve sources directly from mirrors, this would make things easier, no ?
Not really. You would have to teach debootstrap/pbuilder about the project structure and layering used in the buildservice. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michael Schroeder wrote:
On Tue, Apr 03, 2007 at 08:00:33PM +0900, David Cournapeau wrote:
Michael Schroeder wrote:
Actually it uses neither. It calls dpkg to install the needed packages and dpkg-source/dpkg-buildpackage to build the packages. It's basically the same code used for rpms with just different command calls.
In this case, how are the files retrieved by the build service ?
The build clients asks the repository server for the packages. There are no mirrors involved at all. Local building with osc is a different issue, of course. osc asks software.opensuse.org for a package, software.opensuse.org redirects to a mirror. If software.opensuse.org doesnt know about the package osc falls back to retrieving the package from the buildservice. But software.opensuse.org does not have debian packages, right ? So if I want to build locally, I would need to translate the list of packages into their typical location on a debian/ubuntu server ?
cheers, David --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tue, Apr 03, 2007 at 10:49:14PM +0900, David Cournapeau wrote:
But software.opensuse.org does not have debian packages, right ?
Sure it has, in the projects that build for debian. It just doesn't have the "base" distributions.
So if I want to build locally, I would need to translate the list of packages into their typical location on a debian/ubuntu server ?
Dunno, I'm not an osc expert. But the fallback mechanism that uses the build service repositories should always work. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michael Schroeder wrote:
On Tue, Apr 03, 2007 at 10:49:14PM +0900, David Cournapeau wrote:
But software.opensuse.org does not have debian packages, right ?
Sure it has, in the projects that build for debian. It just doesn't have the "base" distributions.
So if I want to build locally, I would need to translate the list of packages into their typical location on a debian/ubuntu server ?
Dunno, I'm not an osc expert. But the fallback mechanism that uses the build service repositories should always work.
Cheers, Michael.
Well, when going back to home, I tested a local debian build, and everything was OK. It seems this one is also related to problems with https proxy I mentionned in an earlier thread. Sorry for the noise, cheers, David --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (2)
-
David Cournapeau
-
Michael Schroeder