Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

extracting and creating ipk files

Tags:

packages

ipk packages are the intallation packages used by opkg.

I'm trying to extract the contents of one of them and also create my own ipk.

I've read that I should be able to untar them but that is not true.

I've tried:

tar -zxvf mypack.ipk 

and I get:

zip: stdin: not in gzip format

I've also tried:

tar -xvf mypack.ipk 

and I get:

tar: This does not look like a tar archive

I've found that most of the information on the internet regarding ipk's are inaccurate.

My ipk was generated by bitbake. I'm having a hard time with bitbake and want to avoid using it.

Any ideas on how to extract and how to create ipk files? A simple template with a single package would be useful to have.

like image 954
max Avatar asked Jun 28 '13 16:06

max


People also ask

What is an IPK file?

An IPK file is an application that can be installed and run on an LG webOS smart TV. Developers create IPK files using the webOS TV IDE. To run the app an IPK file contains, enable Developer Mode on your webOS TV and use the webOS TV IDE or command-line interface to install the app.

What is IPK yocto?

ipk packages are used by a variety of embedded linux systems, like routers running OpenWRT and appliances running on OpenEmbedded (Yocto). The opkg command installs these packages and OpenEmbedded comes with a set of tools to build .


2 Answers

I figured it out.

You can extract the main package with the ar x command, then extract the control.tar.gz with the tar -zxf command.

like image 161
max Avatar answered Sep 17 '22 08:09

max


You need to create a control file, and then do some archiving using tar and ar. In my case, I was distributing just python scripts, so there was no architecture dependency. You should check the control and Makefile into version control, and delete all the other intermediate files.

Here are the contents of control

 Package: my-thing-python Version: 1.0 Description: python scripts for MyCompany Section: extras Priority: optional Maintainer: John  License: CLOSED Architecture: all OE: my-thing-python Homepage: unknown Depends: python python-distutils python-pyserial python-curses python-mmap python-ctypes Source:  N/A 

Here is my Makefile which sits in the same directory as all my python scripts.

 all: my-thing-python.ipk   my-thing-python.ipk:         rm -rf ipk         mkdir -p ipk/opt/my-thing-python         cp *.py ipk/opt/my-thing-python         tar czvf control.tar.gz control         cd ipk; tar czvf ../data.tar.gz .; cd ..         echo 2.0 > debian-binary         ar r my-thing-python.ipk control.tar.gz data.tar.gz  debian-binary  clean: FORCE         rm -rf ipk         rm -f control.tar.gz         rm -f data.tar.gz         rm -f my-thing-python.ipk  FORCE:  
like image 36
Mark Lakata Avatar answered Sep 18 '22 08:09

Mark Lakata