maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Uploading to Extras-Devel with no source? (https://talk.maemo.org/showthread.php?t=24161)

qole 2008-10-08 17:37

Uploading to Extras-Devel with no source?
 
Hey guys,

I want to upload my Easy Debian package to Extras Devel.

It is a bunch of shell scripts, config files, and a couple of binaries (kernel modules, etc) contributed by others (I don't have the source code for them).

I have built the package with Khertan's PyPackager, and the resulting .deb installs well. However, it seems that I can't just upload the .deb to Extras-Devel; I have to make a "source package" that Autobuilder will like. I don't have such a thing; does this mean I can't upload to Extras-Devel?

Is there some way I can disassemble my .deb package into a file structure and then re-assemble it in a way that can be uploaded to Extras-Devel?

Stskeeps 2008-10-08 17:40

Re: Uploading to Extras-Devel with no source?
 
I usually build my packages by in scratchbox or whereever, make a directory <name>-<version>with files in, make a Makefile that copies into ${DESTDIR}, dh_make in the directory, edit the needed files in debian/, and dpkg-buildpackage has one for building a source package.

See http://trac.tspre.org/projects/deble...-kdm-autologin for an example package i've built like that.

qole 2008-10-08 17:45

Re: Uploading to Extras-Devel with no source?
 
I don't use scratchbox, I do everything on-tablet. I don't compile. I have no source.

I have a pre-assembled .deb that I'd like to upload, and so this means I need to "explode" it back to a directory structure (including control info, postinst and postrm scripts) and assemble it into a "source" package using
Code:

dpkg-buildpackage -rfakeroot -sa -S
How do I explode the package and tweak it so that the dpkg-buildpackage command produces an acceptable blob that can be uploaded?

Stskeeps 2008-10-08 18:00

Re: Uploading to Extras-Devel with no source?
 
If you don't mind doing it in Debian (chroot, apt-get install dpkg-dev) [because Maemo's dpkg-buildpackage on tablet isn't exactly noteworthy or properly operational last i checked].

Trust me, you're much better off making a debian source package from scratch with dh_make and write a small Makefile for installation into right paths, and then assembling it with dpkg-buildpackage (i know you don't have sources to compile, but installation into a directory is still a build process item).

I did this with 60+ packages from Deblet which was in same form as your constructed deb, and having to maintain it afterwards, release new versions, etc., is just so much easier, and it does a lot of work for you that you had to do by hand before :P

qole 2008-10-08 18:01

Re: Uploading to Extras-Devel with no source?
 
Using Stskeeps example, it looks like I need to make a directory that has all of the folders, and then another folder named "debian" with the control files...

So I did this:
Code:

mkdir mypackage
cd mypackage
dpkg-deb -X /other/place/mypackage.deb .
dpkg-deb -e /other/place/mypackage.deb debian

So now I have a directory, mypackage, with my root directory tree, and a debian directory with all my control files.

Now what do I do about the "Makefile" that I see in the Stskeeps example? Do I need it? What should it contain?

EDIT: "If you don't mind doing it in Debian.." Hee hee, of course I don't! :D

Code:

/mypackage/
  debian/
      control
      postinst
      postrm
      preinst
      prerm
  etc/
  home/
  lib/
  sbin/
  usr/


Stskeeps 2008-10-08 18:14

Re: Uploading to Extras-Devel with no source?
 
Quote:

Originally Posted by qole (Post 231740)
Code:

mkdir mypackage
cd mypackage
dpkg-deb -X /other/place/mypackage.deb .
dpkg-deb -e /other/place/mypackage.deb debian


First mistake is, - a source package is actually not a package, it's a tar.gz :)

If you want to hop on IRC, i'll guide you through getting a proper debian package going from bottom up, if you want to.

qole 2008-10-08 18:19

Re: Uploading to Extras-Devel with no source?
 
those dpkg-deb commands explode my assembled deb into the directory structure I list in my post. Now that I have everything all unpacked, I want to know:
  1. Do I need a Makefile? If so, what should it contain?
  2. Should "dpkg-buildpackage -rfakeroot -sa -S" in this directory build the proper tar.gz?

I would prefer to hack this out in the forums, so other people can use these posts to do this themselves...

mikemorrison 2008-10-08 18:46

Re: Uploading to Extras-Devel with no source?
 
You can upload it. See the section on non-free (binary only) packages here:

http://wiki.maemo.org/Uploading_to_Extras

Quote:

Originally Posted by qole (Post 231728)
Hey guys,

I have built the package with Khertan's PyPackager, and the resulting .deb installs well. However, it seems that I can't just upload the .deb to Extras-Devel; I have to make a "source package" that Autobuilder will like. I don't have such a thing; does this mean I can't upload to Extras-Devel?


yerga 2008-10-08 19:08

Re: Uploading to Extras-Devel with no source?
 
Quote:

Originally Posted by qole (Post 231728)
Hey guys,

I want to upload my Easy Debian package to Extras Devel.

It is a bunch of shell scripts, config files, and a couple of binaries (kernel modules, etc) contributed by others (I don't have the source code for them).

I have built the package with Khertan's PyPackager, and the resulting .deb installs well. However, it seems that I can't just upload the .deb to Extras-Devel; I have to make a "source package" that Autobuilder will like. I don't have such a thing; does this mean I can't upload to Extras-Devel?

Is there some way I can disassemble my .deb package into a file structure and then re-assemble it in a way that can be uploaded to Extras-Devel?

Qole, you can to use py2deb from Khertan too. Twaelti has written a good tutorial in the wiki: http://wiki.maemo.org/Py2deb

qole 2008-10-08 19:23

Re: Uploading to Extras-Devel with no source?
 
Quote:

Originally Posted by mikemorrison (Post 231771)
You can upload it. See the section on non-free (binary only) packages here:

http://wiki.maemo.org/Uploading_to_Extras

That might do for the time being, even though my stuff actually is GPL.

Does the non-free stuff show up in the "normal" Application Manager or does the user have to change their repositories?


All times are GMT. The time now is 04:56.

vBulletin® Version 3.8.8