Go Back   webOS Nation Forums > webOS apps and software > webOS development

Reply
 
LinkBack Thread Tools Display Modes
Old 06/20/2009, 02:21 PM   #21 (permalink)
Member
 
Join Date: Jun 2009
Posts: 82
Likes: 0
Thanks: 0
Thanked 32 Times in 17 Posts

Default

Yes. We just need to make Debian packages in IPK format and host them somewhere and email the links. Use the package linked earlier as a reference point for file format and structure. Let the application deployment begin.... Hello world.
simplyflipflops is offline   Reply With Quote
Old 06/20/2009, 02:42 PM     Thread Author   #22 (permalink)
Member
 
Join Date: Jun 2009
Location: kansas city, mo
Posts: 633
Likes: 0
Thanks: 85
Thanked 303 Times in 146 Posts

Default

Great job ssf. I was on the right track but you hit the home run.

This should be worth of a sticky and Pre Central article.
xorg is offline   Reply With Quote
Thanked by Drybonz, whatisntseen
Old 06/20/2009, 02:46 PM   #23 (permalink)
Member
 
Join Date: Jun 2009
Posts: 82
Likes: 0
Thanks: 0
Thanked 32 Times in 17 Posts

Default

The only burning question that remains is whether the signatures inside the packages are needed or at least re-creatable.


All of the packages I see now have all been signed. A few of the packages from before were not signed which may explain why the applications in the app catalog are updated so often. Perhaps palm is forcing the apps to be "signed" to protect the end user and/or the installation process itself.

Last edited by simplyflipflops; 06/20/2009 at 02:56 PM.
simplyflipflops is offline   Reply With Quote
Old 06/20/2009, 03:08 PM     Thread Author   #24 (permalink)
Member
 
Join Date: Jun 2009
Location: kansas city, mo
Posts: 633
Likes: 0
Thanks: 85
Thanked 303 Times in 146 Posts

Default

Well you hit 3rd base for now, a good start. When I get a chance, I'm going to create a Debian package and see what happens.

Here are instructions for creating packages...
http://www.ibm.com/developerworks/li.../l-debpkg.html

I haven't tested it yet on Pre.

If someone can find easier instructions, please post.

Last edited by xorg; 06/20/2009 at 03:19 PM.
xorg is offline   Reply With Quote
Old 06/20/2009, 04:30 PM   #25 (permalink)
Member
 
Join Date: Jun 2009
Posts: 82
Likes: 0
Thanks: 0
Thanked 32 Times in 17 Posts

Default

Quote:
Originally Posted by xorg View Post
Well you hit 3rd base for now, a good start. When I get a chance, I'm going to create a Debian package and see what happens.

Here are instructions for creating packages...
Create Debian Linux packages

I haven't tested it yet on Pre.

If someone can find easier instructions, please post.
This could be the ticket for signing....

Signing .deb packages « PurpleFloyd’s Blog
simplyflipflops is offline   Reply With Quote
Old 06/20/2009, 05:43 PM     Thread Author   #26 (permalink)
Member
 
Join Date: Jun 2009
Location: kansas city, mo
Posts: 633
Likes: 0
Thanks: 85
Thanked 303 Times in 146 Posts

Default

I've made some ground...

A debian package is simply an archive file with tarballs. Here is what a stock webOS package looks like...

# ar tv packagename.ipk

rw-r--r-- 0/0 6582 Jun 18 00:44 2009 cert.pem
rw-r--r-- 0/0 265 Jun 18 00:44 2009 control.tar.gz
rw-r--r-- 0/0 877233 Jun 18 00:44 2009 data.tar.gz
rw-r--r-- 0/0 4 Jun 18 00:44 2009 debian-binary
rw-r--r-- 0/0 800 Jun 18 00:44 2009 pubkey.pem
rw-r--r-- 0/0 512 Jun 18 00:44 2009 signature.sha1

The control file looks like this...

Package: com.lumoslabs.speed-brain
Version: 0.9.13
Section: misc
Priority: optional
Architecture: all
Maintainer: lumoslabs <palm@palm.com>
Description: Speed Brain
Installed-Size: 943

The data.tar.gz file has an _absolute_ path of /usr/palm/applications/com.whateverprogram

So to create a webos package...

edit the control file and tarball it
also tarball /usr/palm/applications/com.appname to data.tar.gz

not sure about the signature yet, probably can't steal from another app, or once you create the key...

archive the whole thing..

ar -r (package name).ipk files


I'm stuck on getting an absolute path because the data tarball wants the /usr/palm/applications with absolute path (with a leading slash, not a leading dot). The default to create with tar is relative paths. The tar command included with webOS doesn't appear to allow the -P flag to do absolute paths. I need to load a full feature tar or tar on a linux box. Have run out of time, need to get going for dinner tonite. Maybe someone will beat me to this by the time I can work on this tomorrow. I challenge all devheads out there to waste your Saturday night and beat me to it.

Last edited by xorg; 06/22/2009 at 09:41 AM.
xorg is offline   Reply With Quote
Thanked By: Drybonz
Old 06/20/2009, 06:02 PM   #27 (permalink)
Member
 
Join Date: Jun 2009
Posts: 82
Likes: 0
Thanks: 0
Thanked 32 Times in 17 Posts

Default

I've been making serious progress too.. Should have a "hello world" package top share along with step by steps momentarily.
simplyflipflops is offline   Reply With Quote
Thanked by antonio3, OSU0034
Old 06/20/2009, 06:07 PM     Thread Author   #28 (permalink)
Member
 
Join Date: Jun 2009
Location: kansas city, mo
Posts: 633
Likes: 0
Thanks: 85
Thanked 303 Times in 146 Posts

Default

I'm wondering if a key/signature is even needed...

Gotta go for dinner at friends, will be watching for your hello world browsing on my Pre tonite.
xorg is offline   Reply With Quote
Old 06/20/2009, 07:31 PM   #29 (permalink)
Member
 
Join Date: Jun 2009
Posts: 38
Likes: 0
Thanks: 25
Thanked 2 Times in 2 Posts

Default

Awesome work that you guys are doing. This is a great step forward.
Drybonz is offline   Reply With Quote
Old 06/20/2009, 07:40 PM   #30 (permalink)
Member
 
Join Date: Jun 2009
Posts: 10
Likes: 0
Thanks: 8
Thanked 1 Time in 1 Post

Default

I'm excited as well. My question is why won't this work in the browser. What is it about the email client that allows us to do this?
Bales is offline   Reply With Quote
Old 06/20/2009, 07:41 PM   #31 (permalink)
Member
 
Join Date: Sep 2008
Location: Naval Station Norfolk
Posts: 211
Likes: 0
Thanks: 6
Thanked 11 Times in 8 Posts

Default holy!!

awesome job... my mouth is drooling with anticipation!!! will be watching this post very closely
knightflores is offline   Reply With Quote
Old 06/20/2009, 07:44 PM   #32 (permalink)
Member
 
Join Date: Jun 2009
Posts: 18
Likes: 0
Thanks: 2
Thanked 2 Times in 1 Post

Default

Quote:
Originally Posted by Bales View Post
I'm excited as well. My question is why won't this work in the browser. What is it about the email client that allows us to do this?
Probably has to do with being able to save files from email and not from the browser. For whatever reason, we can save photos and .pdf files (the only ones that I've tried) from either email or mms, but not the web browser.


wtb opera mini for the pre. D=
Issu is offline   Reply With Quote
Old 06/20/2009, 07:59 PM   #33 (permalink)
Member
 
Join Date: Jun 2009
Posts: 82
Likes: 0
Thanks: 0
Thanked 32 Times in 17 Posts

Default

Ok. I'm having problems getting the package installed into /var/usr/palm. I can get it installed via command line ipkg install but not through the email link....

Here is the setup for creating IPKs:

I am working from /media/internal/package as my package root and working directory.

I've created a folder called CONTROL
I make a file CONTROL/control.

and I've populated it with the following info:

Package: com.simplyflipflops
Version: 0.9.99
Section: misc
Priority: optional
Architecture: all
Maintainer: Simplyflipflops <palm@palm.com>
Description: Deployment IPK Package Test
Installed-Size: 350


------------------------------------------------------
I've created a folder called: var/usr/palm/applications/com.simplyflipflops/
(no slash as it is in /media/internal/package)


I put my WebOS Hello world code in here and modify the appinfo.json to match the version and id name in my control file listed above....

Here's my ipk "make" script called buildipkg.sh that sits in the package root (/media/internal/package) I run, courtesy of another dev:

#!/bin/sh
#buildipkg.sh
#ipk building script by Steve Redler IV, steve at sr-tech.com 5-21-2001
#Thanks for the head start Steve!

# get the package info out of the CONTROL/control file
name=`cat CONTROL/control | grep "Package:" | cut -d" " -f2`
arch=`cat CONTROL/control | grep "Architecture:" | cut -d" " -f2`
vers=`cat CONTROL/control | grep "Version:" | cut -d" " -f2`


#make the application package that gets installed to /var/usr/palm/applications
#note the . before the /var to ensure we are working from /media/internal/package/
tar -zcf data.tar.gz ./var/

#make the control package
cd CONTROL ; tar -zcf ../control.tar.gz .

# I dont know if the debian-binary is really needed but I left it in.
cd ../ ; echo "2.0" > debian-binary

#bundle the entire IPK up
tar -zcf package.tar.gz ./control.tar.gz ./data.tar.gz ./debian-binary
mv package.tar.gz $name\_$vers\_$arch.ipk

#cleanup
rm *.gz ; rm debian-binary



-------------------------------------------------------
An viola! You have a working IPK file that is named from your control file variables. If you run from the command line "ipkg install com.simplyflipflops*ipk" it will install the app. but LunaSysMgr will need to be burped and rebooted.

NOTE: I am having problems deploying it via email like the previous example. I get the feeling that palm wants to see the signature before uploading anything into the /var/usr/palm/application area. I've been experimenting with using /usr/palm/applications as the directory structure instead of /var/usr/palm/applications and the app gets installed via the command line but so far I have had no luck getting it installed via a link in an email. I'm definitely thinking it needs to be signed. I've tried copying over the signature files from other applications and it looks like those signature files actually point the files to the /var/usr folder.

Funny thing is that if you install the ipk from the command line, the pre needs to be rebooted.

Almost there.... Someone want to help with the signature portion? Or if someone wants to check running a non signed IPK on the original webOS before the updates that would also be great.

Last edited by simplyflipflops; 06/20/2009 at 08:31 PM.
simplyflipflops is offline   Reply With Quote
Thanked By: Drybonz
Old 06/20/2009, 08:30 PM     Thread Author   #34 (permalink)
Member
 
Join Date: Jun 2009
Location: kansas city, mo
Posts: 633
Likes: 0
Thanks: 85
Thanked 303 Times in 146 Posts

Default

Did you get absolute paths resolved?

If app tar is relative path, won't work.
xorg is offline   Reply With Quote
Old 06/20/2009, 08:43 PM   #35 (permalink)
Member
 
Join Date: Jun 2009
Posts: 82
Likes: 0
Thanks: 0
Thanked 32 Times in 17 Posts

Default

It's working for me. modify the shell script as you see fit for your pre.
simplyflipflops is offline   Reply With Quote
Old 06/20/2009, 08:47 PM   #36 (permalink)
Member
 
Join Date: Jun 2009
Posts: 82
Likes: 0
Thanks: 0
Thanked 32 Times in 17 Posts

Default

Quote:
Originally Posted by Bales View Post
I'm excited as well. My question is why won't this work in the browser. What is it about the email client that allows us to do this?
My logic would assume this restriction would be for a support type initiative from palm. They could email the helpless end user a package to install for help but they want to filter out the possibility of joe-phisher-looking-to-install-a-nefarious-app-on-your-pre from hosting a file out in cyberspace that a helpless pre user clicks on by mistake while they are browsing the world and installs that app without their knowledge. Makes sense to me.
simplyflipflops is offline   Reply With Quote
Old 06/20/2009, 09:05 PM   #37 (permalink)
Member
 
Join Date: Jun 2009
Posts: 82
Likes: 0
Thanks: 0
Thanked 32 Times in 17 Posts

Default

I've attached my IPK file. The application itself does nothing, merely proves IPK deployment and IPK creation logic.
Attached Files
File Type: zip simplyflipflops_ipk.zip (82.2 KB, 35 views) Email Attachment
simplyflipflops is offline   Reply With Quote
Thanked By: knightflores
Old 06/20/2009, 09:09 PM   #38 (permalink)
Member
 
Join Date: Sep 2008
Location: Naval Station Norfolk
Posts: 211
Likes: 0
Thanks: 6
Thanked 11 Times in 8 Posts

Default

Quote:
Originally Posted by simplyflipflops View Post
My logic would assume this restriction would be for a support type initiative from palm. They could email the helpless end user a package to install for help but they want to filter out the possibility of joe-phisher-looking-to-install-a-nefarious-app-on-your-pre from hosting a file out in cyberspace that a helpless pre user clicks on by mistake while they are browsing the world and installs that app without their knowledge. Makes sense to me.
i agree and is also why a sig might be required for the app
knightflores is offline   Reply With Quote
Old 06/20/2009, 11:09 PM   #39 (permalink)
Member
 
Join Date: Jan 2009
Location: Philadelphia
Posts: 73
Likes: 0
Thanks: 6
Thanked 6 Times in 6 Posts

Default

simply, that did not work for me, I changed the file .ipk and hosted it, emailed it to myself, clicked, but it did not work like brain challenge, did it work for you? what else did you do?
Khidr is offline   Reply With Quote
Old 06/20/2009, 11:54 PM   #40 (permalink)
Member
 
Join Date: Jun 2009
Posts: 82
Likes: 0
Thanks: 0
Thanked 32 Times in 17 Posts

Default

Quote:
Originally Posted by simplyflipflops View Post
I've attached my IPK file. The application itself does nothing, merely proves IPK deployment and IPK creation logic.
Not this only works from the command line until it can be signed...

Command line is:

Ipkg install com.simply*ipk

(and yes, you have to unzip it first)
simplyflipflops is offline   Reply With Quote

 

Content Relevant URLs by vBSEO 3.6.0