Creating .ipk file for Yun

Has anyone here ever bundled their project into an ipk file? I have an Arduino project that contains some custom C code and some PHP/Python scripts. I want to install the project on several Yuns, so I would like to bundle the whole thing into a .ipk file then install it via opkg (my Yun is running v0.1.8).

I followed the guide here: Jiang Yio to create the ipk file. I created a project folder in Debian then compressed it and renamed the .tar.gz extension to .ipk.

Here are the contents of the folder:

  • debian-binary - a text file containing the string 2.0
  • control.tar.gz - an archive of a folder named "control" containing the Debian control file
  • data.tar.gz - an archive containing usr/bin/myexecutable and my PHP/Python files in var/

When I try to install the package, however, I get this error:

>> opkg install myproject.ipk -V 4
opkg_conf_parse_file: Loading conf file /etc/opkg.conf.
pkg_hash_load_feeds: 
pkg_hash_load_status_files: 
Collected errors:
 * pkg_init_from_file: Malformed package file myproject.ipk.

Even with verbosity level 4, there's not much information to go by. Is there any way to get more information on what specifically is wrong with my archive?

Thanks,
Zach

Hi Zach, double-check your opkg verbose syntax (your example shows a space between -V and 4):

opkg install myproject.ipk -V4
or
opkg install myproject.ipk --verbosity=4

Also, make sure your control.tar.gz does not contain any paths to its file(s)...

Wrong - control.tar.gz will contain paths:

myproject$  tar czvf control.tar.gz ./control/*
myproject$  ar -r myproject.ipk debian-binary control.tar.gz data.tar.gz

Correct - control.tar.gz will not contain paths:

myproject$  cd control && tar czvf ../control.tar.gz * && cd ..
myproject$  ar -r myproject.ipk debian-binary control.tar.gz data.tar.gz

Thanks! This solved my problem.