Help!

[CMake] Producing deb package with 'ar'


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Development RSS
Next:  Current Policy change proposals  
Author Message
Mathieu Malaterre
External


Since: Jun 02, 2006
Posts: 10



PostPosted: Mon Aug 06, 2007 12:40 pm    Post subject: [CMake] Producing deb package with 'ar'
Archived from groups: linux>debian>devel (more info?)

Hi,

I am currently working on integrating debian packaging system in
cpack (part of CMake, see cmake.org). Basically cpack used to have a
simple tarball system for creating package on *NIX. I simply had to
encapsulate this tarball within an 'ar'ball, with a control and a
md5sums file (*)

I am now wondering if I should also create some sort of debian
'source' package. As far as I understand there is no such thing, but
instead your are distributing a copy of the original tarball of the
package and a diff file. Is this correct ? If so I need to generate a
diff file wich contains a minial 'debian/rules' file, correct ?


thanks for comment,
--
Mathieu

(*) I have been searching quite a lot the web for creating binary
debian package using 'ar'. Since CMake is a cross platform tool, I
thought this would make sense to use the most common tool on *NIX:
'ar' instead of asking cmake user to install specific dpkg build tool.
In an ideal world I should be able to cross compile using cmake under
windows to generate debian package...


--
To UNSUBSCRIBE, email to debian-devel-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Mathieu Malaterre
External


Since: Jun 02, 2006
Posts: 10



PostPosted: Mon Aug 06, 2007 1:40 pm    Post subject: Re: [CMake] Producing deb package with 'ar' [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Antti-Juhani

On 8/6/07, Antti-Juhani Kaijanaho <antti-juhani DeleteThis @kaijanaho.fi> wrote:
> On Mon, Aug 06, 2007 at 12:34:40PM +0200, Mathieu Malaterre wrote:
> > I am currently working on integrating debian packaging system in
> > cpack (part of CMake, see cmake.org). Basically cpack used to have a
> > simple tarball system for creating package on *NIX. I simply had to
> > encapsulate this tarball within an 'ar'ball, with a control and a
> > md5sums file (*)
>
> I recommend reading the deb(5) man page; there may be surprises.

Hum... I don't see anything surprising (debian oldstable). I have been
listing the file in the correct order:

$ ar -r bla.deb debian-binary control.tar.gz data.tar.gz


And the magic number seems to be ok (!<arch>)

>
> > I am now wondering if I should also create some sort of debian
> > 'source' package. As far as I understand there is no such thing, but
> > instead your are distributing a copy of the original tarball of the
> > package and a diff file. Is this correct ?
>
> It's not. A Debian source package consists of two to three files. The
> main file has the suffix .dsc; it specifies source package metadata and
> what other files are needed. The other files are a tarball and an
> optional diff. See
> http://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html#s-pkg-so...earchiv
> .
>
sweet !
thanks for the link. So according to this page I might even be able to
generate a single tarball:

If there is no original source code - for example, if the package is
specially prepared for Debian or the Debian maintainer is the same as
the upstream maintainer - the format is slightly different: then there
is no diff, and the tarfile is named package_version.tar.gz, and
preferably contains a directory named package-version


Thanks for the link.


> Also note that packages intended for installation in a Debian system
> should follow Debian policy. This may be nontrivial to achieve using an
> automated system like (I assume) cmake.
> See http://www.debian.org/doc/debian-policy/
>

That's a completely separate issue. I believe that once a package has
been approved, any minor modification will not impact this initial
decision. So this will be up to the maintainer to follow the debian
policy IMHO. My initial plan is simply to have the whole process of
generating a debian package of cmake using cmake...

Thanks
-Mathieu


--
To UNSUBSCRIBE, email to debian-devel-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Antti-Juhani Kaijanaho
External


Since: Feb 07, 2007
Posts: 19



PostPosted: Mon Aug 06, 2007 2:40 pm    Post subject: Re: [CMake] Producing deb package with 'ar' [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Please don't CC me, I read the list.

On Mon, Aug 06, 2007 at 01:38:33PM +0200, Mathieu Malaterre wrote:
> thanks for the link. So according to this page I might even be able to
> generate a single tarball:

You do need the .dsc too Smile

--
Antti-Juhani Kaijanaho, Jyväskylä
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST.DeleteThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.DeleteThis@lists.debian.org
Back to top
Ron Johnson
External


Since: Nov 17, 2004
Posts: 136



PostPosted: Mon Aug 06, 2007 3:10 pm    Post subject: Re: [CMake] Producing deb package with 'ar' [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/06/07 07:32, Marc 'HE' Brockschmidt wrote:
[snip]
>
> That will not work. ar(1) is GNU ar on most systems, while dpkg uses
> ar-as-in-BSD-ar. The diffeences are subtle, but lead to problems in
> some applications.

That's interesting. Why?

- --
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGtx1ES9HxQb37XmcRAor4AKC+jVZfxTAN5PRSL5a8UFqTEhZdCwCfS99D
XT91sSgOD7RE6i54lRGjYWY=
=UXSA
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-devel-REQUEST.DeleteThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.DeleteThis@lists.debian.org
Back to top
Ben Finney
External


Since: Jun 02, 2006
Posts: 125



PostPosted: Mon Aug 06, 2007 4:10 pm    Post subject: Packaging source code and Debian diffs (was: [CMake] Producing deb package with 'ar') [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Mathieu Malaterre" <mathieu.malaterre RemoveThis @gmail.com> writes:

> If there is no original source code - for example, if the package is
> specially prepared for Debian or the Debian maintainer is the same
> as the upstream maintainer - the format is slightly different: then
> there is no diff, and the tarfile is named package_version.tar.gz,
> and preferably contains a directory named package-version

Even if the same person shares both "upstream author" and "Debian
packager" roles, it is highly recommended that you generate a
'foo_1.0.orig.tar.gz' containing the source code that is not
Debian-specific, and a 'foo_1.0-1.diff.gz' patch file that applies the
Debian-specific changes to make it a package.

This way, the source code can more easily be used and tracked on
non-Debian distributions, and transformed simply into a non-Debian
package.

The lack of a 'foo_1.0-1.diff.gz' implies that the package is *only*
ever of use on a Debian system, and is of no purpose outside a Debian
system. If that's not true for your package, you should make it like
any other non-native package.

<URL:http://people.debian.org/~mpalmer/debian-mentors_FAQ.html#packaging>

--
\ "Compulsory unification of opinion achieves only the unanimity |
`\ of the graveyard." -- Justice Roberts in 319 U.S. 624 (1943) |
_o__) |
Ben Finney


--
To UNSUBSCRIBE, email to debian-devel-REQUEST RemoveThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster RemoveThis @lists.debian.org
Back to top
mathieu
External


Since: Aug 06, 2007
Posts: 3



PostPosted: Mon Aug 06, 2007 5:50 pm    Post subject: Re: Packaging source code and Debian diffs (was: [CMake] Producing deb package with 'ar') [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Aug 6, 4:10 pm, Ben Finney <bignose+hates-s...@benfinney.id.au>
wrote:
> "Mathieu Malaterre" <mathieu.malate....RemoveThis@gmail.com> writes:
> > If there is no original source code - for example, if the package is
> > specially prepared for Debian or the Debian maintainer is the same
> > as the upstream maintainer - the format is slightly different: then
> > there is no diff, and the tarfile is named package_version.tar.gz,
> > and preferably contains a directory named package-version
>
> Even if the same person shares both "upstream author" and "Debian
> packager" roles, it is highly recommended that you generate a
> 'foo_1.0.orig.tar.gz' containing the source code that is not
> Debian-specific, and a 'foo_1.0-1.diff.gz' patch file that applies the
> Debian-specific changes to make it a package.
>
> This way, the source code can more easily be used and tracked on
> non-Debian distributions, and transformed simply into a non-Debian
> package.
>
> The lack of a 'foo_1.0-1.diff.gz' implies that the package is *only*
> ever of use on a Debian system, and is of no purpose outside a Debian
> system. If that's not true for your package, you should make it like
> any other non-native package.
>
> <URL:http://people.debian.org/~mpalmer/debian-mentors_FAQ.html#packaging>

Ok thanks a bunch for the reference !
This will require yet another dependency to create debian: a diff
executable (hopefully this time there is no difference between GNU-
diff and BSD-diff)

-Mathieu


--
To UNSUBSCRIBE, email to debian-devel-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
mathieu
External


Since: Aug 06, 2007
Posts: 3



PostPosted: Mon Aug 06, 2007 5:50 pm    Post subject: Re: Packaging source code and Debian diffs (was: [CMake] Producing deb package with 'ar') [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Aug 6, 4:10 pm, Ben Finney <bignose+hates-s...@benfinney.id.au>
wrote:
> "Mathieu Malaterre" <mathieu.malate....TakeThisOut@gmail.com> writes:
> > If there is no original source code - for example, if the package is
> > specially prepared for Debian or the Debian maintainer is the same
> > as the upstream maintainer - the format is slightly different: then
> > there is no diff, and the tarfile is named package_version.tar.gz,
> > and preferably contains a directory named package-version
>
> Even if the same person shares both "upstream author" and "Debian
> packager" roles, it is highly recommended that you generate a
> 'foo_1.0.orig.tar.gz' containing the source code that is not
> Debian-specific, and a 'foo_1.0-1.diff.gz' patch file that applies the
> Debian-specific changes to make it a package.
>
> This way, the source code can more easily be used and tracked on
> non-Debian distributions, and transformed simply into a non-Debian
> package.
>
> The lack of a 'foo_1.0-1.diff.gz' implies that the package is *only*
> ever of use on a Debian system, and is of no purpose outside a Debian
> system. If that's not true for your package, you should make it like
> any other non-native package.
>
> <URL:http://people.debian.org/~mpalmer/debian-mentors_FAQ.html#packaging>

Ok thanks !
This will require yet another dependency to create debia


--
To UNSUBSCRIBE, email to debian-devel-REQUEST.TakeThisOut@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.TakeThisOut@lists.debian.org
Back to top
mathieu
External


Since: Aug 06, 2007
Posts: 3



PostPosted: Mon Aug 06, 2007 5:50 pm    Post subject: GNU ar versus BSD ar (was: Re: Producing deb package with 'ar') [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Aug 6, 3:10 pm, Ron Johnson <ron.l.john... RemoveThis @cox.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 08/06/07 07:32, Marc 'HE' Brockschmidt wrote:
> [snip]
>
>
>
> > That will not work. ar(1) is GNU ar on most systems, while dpkg uses
> > ar-as-in-BSD-ar. The diffeences are subtle, but lead to problems in
> > some applications.
>
> That's interesting. Why?

Could anyone please comment on issues when using GNU ar versus BSD
ar ?

As a side note I cannot see any 'ar' executable in the debhelper
package.

Thanks
-Mathieu


--
To UNSUBSCRIBE, email to debian-devel-REQUEST RemoveThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster RemoveThis @lists.debian.org
Back to top
Hendrik Sattler
External


Since: Jul 01, 2005
Posts: 58



PostPosted: Mon Aug 06, 2007 7:20 pm    Post subject: Re: [CMake] Producing deb package with 'ar' [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Am Montag 06 August 2007 12:34 schrieb Mathieu Malaterre:
> I am currently working on integrating debian packaging system in
> cpack (part of CMake, see cmake.org). Basically cpack used to have a
> simple tarball system for creating package on *NIX. I simply had to
> encapsulate this tarball within an 'ar'ball, with a control and a
> md5sums file (*)
>
> I am now wondering if I should also create some sort of debian
> 'source' package. As far as I understand there is no such thing, but
> instead your are distributing a copy of the original tarball of the
> package and a diff file. Is this correct ? If so I need to generate a
> diff file wich contains a minial 'debian/rules' file, correct ?

I looked at it but didn't want to comment on that on the cmake mailing list.
The debs created by CMake really cannot be used for inclusion in an official
debian repository:

1. The "This package was created by CMake" is not really necessary.

2. If the prefix is set to something other than /usr, e.g. /usr/local, it is
not made sure that the package is installed to /usr instead of to the prefix
location, thus dpkg will write to /usr/local. Surely not wanted.

3. Different optimisation defaults.

4. The CMake default is to use rpath.

5. No automatic stripping of binaries.

6. Currently no split of big packages (e.g. lib, devel and bin packages)
although the COMPONENT stuff may work as such but needs adjustment to
properly name such packages.

7. Currently not possible to Provide Conflicts, Recommends, Suggests and
Replaces. It is also rather hard as the Debian architecture is not filled in
automatically. This should be provided by a CMake variable.

8. There is no equivalent for debian/copyright, /usr/share/doc/<package> is
usually not populated by upstream packages.

It kind of reminds me of the difference between the formerly upstream "cups"
package and the cupsys packages in Debian.
Currently, cpack's capability to create .deb packages is a possibility to
install und uninstall program files in some way, and not more.

HS

PS: Definitely not meant as flaming!


--
To UNSUBSCRIBE, email to debian-devel-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
Lionel Elie Mamane
External


Since: Nov 12, 2004
Posts: 368



PostPosted: Mon Aug 06, 2007 9:50 pm    Post subject: Re: Packaging source code and Debian diffs (was: [CMake] Producing deb package with 'ar') [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, Aug 06, 2007 at 07:58:22PM +0200, Josselin Mouette wrote:
> Le lundi 06 août 2007 à 15:34 +0000, mathieu a écrit :

>> This will require yet another dependency to create debian: a diff
>> executable (hopefully this time there is no difference between GNU-
>> diff and BSD-diff)

> I don't understand what you are trying to do, but you are doing it
> the very wrong way.

> The one and only thing you need to create a Debian source package is
> to call "dpkg-source -b", from the dpkg-dev package. Anything else
> is doomed to produce ugly results.

I guess he wants to do it on a non-Debian machine without having to
install dpkg-dev, dpkg, ...

--
Lionel


--
To UNSUBSCRIBE, email to debian-devel-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Development All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum