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?

mikemorrison 2008-10-08 20:21

Re: Uploading to Extras-Devel with no source?
 
It should. Just check in your app manager that the extra-devel repository has both free and non-free in the components field.

Quote:

Originally Posted by qole (Post 231787)
Does the non-free stuff show up in the "normal" Application Manager or does the user have to change their repositories?


Matan 2008-10-08 20:42

Re: Uploading to Extras-Devel with no source?
 
See the source of the packages culmus or locale-resolver-extra (in extras repository) for two examples of packages that the autobuilder accepts.

jolouis 2008-10-09 18:59

Re: Uploading to Extras-Devel with no source?
 
I'm very interested in this thread as I'm in basically the same situation as qole: I've got a package right now that consists of some shell scripts and a few pre-compiled kernel modules. Unfortunately I don't have access to a full debian system (I'm running Fedora boxes), but the lack of a proper makefile/etc is also a hinderance, so the non-free looks like a good way to go at the moment. The only catch is whenever I try to upload the package to my garage page using SCP I keep getting this error:

Permission denied (publickey,keyboard-interactive).
lost connection

Perhaps I'm missing something... do you have to sign the deb itself or anything in order to upload it? (All the information I've found says you only ever sign the .changes file, which obviously in this case doesn't apply), but surely there's some form of authentication or passphrase checking/etc that I'm missing...

Jaffa 2008-10-11 11:34

Re: Uploading to Extras-Devel with no source?
 
[QUOTE=jolouis;232193]The only catch is whenever I try to upload the package to my garage page using SCP I keep getting this error:

Permission denied (publickey,keyboard-interactive).
lost connection[/WUOTE]

This sounds like #3354 which, if it is, needs re-opening with the issue.

It's worth clarifying, however, that you're not uploading anything to "your garage page". Garage != Extras(-devel), and what you're doing is uploading your package to the incoming queue of packages for the Extras repository.

Quote:

Perhaps I'm missing something... do you have to sign the deb itself or anything in order to upload it? (All the information I've found says you only ever sign the .changes file, which obviously in this case doesn't apply), but surely there's some form of authentication or passphrase checking/etc that I'm missing...
*Something*'ll need to be signed, the dsc and/or changes file should contain an index of the things you're uploading, and that'll include the deb. The text file contains a hash of the larger file and that's then signed (to prevent signing potentially large files).

qole 2008-10-11 16:36

Re: Uploading to Extras-Devel with no source?
 
OK, not much time at the moment, but I got things working, so I'll post a quick how-to with no links or anything; if someone finds my technique useful, I'll gladly expand it to include detail where needed.

1. Make a GPG key on my desktop Ubuntu machine.

2. Copy the ~/.gnupg directory on my Ubuntu machine to my tablet: /home/user/.gnupg

3. In my tablet's Debian chroot (as root),
Code:

apt-get install devscripts dput
cd /etc
mv dput.cf dput.cf.orig
wget http://qole.maemobox.org/dput.cf

4. Build the package with PyPackager. It is very important to have at least one dependency; if you don't have a dependency, you will break the repository :o . Also, the "package revision" field from PyPackager is ignored (0.9-1, 0.9-2), so you'll need to indicate minor revisions like so: 0.9.1, 0.9.2, etc. Just leave the package revision set to 1.

5. Use the "debbie" command to go into the Debian chroot as "user" (rather than root). Go to the PyPackager project directory.

6. Find my key ID:
Code:

gpg --list-keys
7. Using my key ID (e.g. 123X4567) and the package name created by PyPackager (e.g. : my-package-name-0.3.2-1_armel)
Code:

debsign -k123X4567  my-package-name-0.3.2-1_armel.changes
I'm asked for my password. Enter it and the file is signed.
Code:

dput -f diablo-extras-devel-non-free my-package-name-0.3.2-1_armel*.changes
The package should be uploaded! Then I just wait until 23 minutes past the hour for my package to show up in the repository.

EDIT: I have also created an rsa ssh key on my tablet, so I have the /home/user/.ssh/id_rsa file. I have also copied the contents of /home/user/.ssh/id_rsa.pub to the ssh key field on my garage profile page. These steps are explained in the wiki.

qwerty12 2008-10-22 18:42

Re: Uploading to Extras-Devel with no source?
 
Nice tutorial (though I'm biased as I upload anything I debianise to free, naturally :p) but due to a recent improvement by X-Fade, it is no longer required to sign packages.

P.S I use scratchbox in hardy fine, install and leave the burden that is on device compiling! :P :)

qole 2008-10-22 18:54

Re: Uploading to Extras-Devel with no source?
 
I'd like to upload to free as well, but I'm just not capable enough with this stuff to do it. I really hope Khertan releases a new version of PyPackager that makes it possible to upload packages like mine again.

qole 2009-03-14 22:48

Re: Uploading to Extras-Devel with no source?
 
I mentioned our new Debmaster, Jeremiah, in the Tear 0.3 thread, and he appeared.

Let's see if he'll do it again...

Jeremiah! Jeremiah! Jeremiah!

BrentDC 2009-03-15 04:21

Re: Uploading to Extras-Devel with no source?
 
I'm glad you bumped this thread qole; today I just started working on getting something uploaded to Extras/[-devel] e.g. just the dh_make step, and I think this'll come in quite handy. Thanks!

jeremiah 2009-04-08 22:55

Re: Uploading to Extras-Devel with no source?
 
Sorry to be so absent, I am trying to be more active in ITt. :-/

Just for the record, there is no _requirement_ that a deb package be accompanied with source. Debian _requires_ it, but the Maemo packaging policy does not, though that might change in the future.

jeremiah 2009-04-08 22:58

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

Originally Posted by qole (Post 235770)
I'd like to upload to free as well, but I'm just not capable enough with this stuff to do it. I really hope Khertan releases a new version of PyPackager that makes it possible to upload packages like mine again.

Since your package is GPL, there is no reason it should not get into free. I will look at PyPackager and try to come up to speed to answer some of the question you raised qole.

qole 2009-04-08 23:40

Re: Uploading to Extras-Devel with no source?
 
It turns out, that despite the name of this thread, the problem is not a source requirement; it is the autobuilder. It would be wonderful to have a program like PyPackager that would make complete packages that are able to be fed to the autobuilder, even though they don't need compiling. That is, the autobuilder will simply take the package and build the deb without attempting to compile anything.

But this is a cheat, and mainly why I decided to go to the non-free repository. The whole point of a free repository with source code that is guarded by an autobuilder is that the packages can be rebuilt for new versions of the OS. If you cheat the system and upload packages like mine (with binary bits), it defeats the purpose.

The ideal situation would be to re-package the binary bits from my package as separate packages. For instance, Matan's dmloop kernel modules could be packaged separately, as could his patched Matchbox window manager. Bundyo's hostwin app, written in Vala, is another tricky bit.

Most of these binary bits have been moved to my easy-chroot package, by the way, if you're looking for them.

And even though I'm uploading to non-free, I'm uploading source packages which include all of my scripts and any source code for other bits that I can get, like the hostwin app.

Jaffa 2009-04-09 13:08

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

Originally Posted by qole (Post 278468)
It turns out, that despite the name of this thread, the problem is not a source requirement; it is the autobuilder. It would be wonderful to have a program like PyPackager that would make complete packages that are able to be fed to the autobuilder, even though they don't need compiling. That is, the autobuilder will simply take the package and build the deb without attempting to compile anything.

Indeed.

Quote:

But this is a cheat, and mainly why I decided to go to the non-free repository. The whole point of a free repository with source code that is guarded by an autobuilder is that the packages can be rebuilt for new versions of the OS. If you cheat the system and upload packages like mine (with binary bits), it defeats the purpose.
Agreed.

Quote:

Bundyo's hostwin app, written in Vala, is another tricky bit.
FWIW, extras & extras-devel both contain the Vala compiler, and I've proved that Vala applications can be built by the auto-builder (see "Vala Sample" in extras-devel).

qwerty12 2009-04-09 13:50

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

Originally Posted by qole (Post 278468)
It turns out, that despite the name of this thread, the problem is not a source requirement; it is the autobuilder. It would be wonderful to have a program like PyPackager that would make complete packages that are able to be fed to the autobuilder, even though they don't need compiling. That is, the autobuilder will simply take the package and build the deb without attempting to compile anything.

Isn't that basically Khertan's py2deb? He uses it to upload his python stuff (which does not need compiling, as you already know (unless you count the optional byte-compiling...)). But src packages made with dh_make are notoriously easy to modify not to do any compiling. Just remove the make lines, and add rules to the install section (something like: mkdir -p $(CURDIR)/debian/package/usr/bin <\n> cp $(CURDIR)/1 $(CURDIR)/debian/package/usr/bin or install -D -m755 $(CURDIR)/1 $(CURDIR)/debian/package/usr/bin/1 or even dh_install 1 /usr/bin).


All times are GMT. The time now is 17:50.

vBulletin® Version 3.8.8