[Solved] Manually Tweak packages, how?

I'd like to manipulate a package with a changed script. I don't want to set up a complete development and build environment.
As ipk are archives, I wonder if I can extract and archive back changed files on my OpenWrt WRT 3200ACM and then install with opkg install .
I haven't found a manual for doing so. Can anyone help and provide me with the correct tar usage?

I believe an archive manager like file-roller allows you to edit archive contents in-place.

I thought about using tar on the WRT 3200ACM. I can defalte the archive and the archive within, but I don't get them packed again correctly. opkg install says 'segment fault'.

Sorry. File-roller is a GNOME app, and I shouldn't assume people are running Linux on their desktops in these forums (although a lot of them do). I said in-place, you're doing the opposite. I'm sure there's some Windows app that allows you to do the same, maybe 7zip.

I tried with file-roller (which is standard on Mint). It did not work. Opening the ipk lists a single file with its same name which can't be opened.
Seems ipk uses some kind of special format.

OK. The ipk is a gzipped tarball. Do this:

  • Rename your ipk to .ipk.gz
  • Gunzip it
  • Rename the unzipped .ipk to .tar
  • Run file-roller on the .tar (which will work)
  • You'll see a data.tar.gz and a control.tar.gz tarball. The former contains the script you're after. You should be able to open this in file-roller still, then edit the script and save it into the archive.

It looks like file-roller relies on filename suffixes, Windows style. Seems like some silly GNOME fixation again. I'm not sure if opkg has some kind of built-in hash check (I thought that was only performed when pulling in packages remotely).

thanks :slight_smile:
That's it

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.