Author Topic: Patch files  (Read 7692 times)

mainlime

  • Newbie
  • *
  • Posts: 5
Patch files
« on: October 04, 2008, 01:59:00 PM »
How do I create the patch files that the Onet software installer uses? Is there an article somewhere which explains them?

rmotters

  • Newbie
  • *
  • Posts: 43
    • My blog on the things I am doing with the ONEt
Re: Patch files
« Reply #1 on: October 06, 2008, 09:00:23 PM »
From what I have learnt this is the format

.info file
----------
1st line - Filename of archive
2nd line - Program and version
3rd line - OS Version (I think, currently R3-01) and packaging date in brackets (in YYYYMMDD format)
4th line - optional Comment line can be left out (I believe)
5th line - number of files and packaging date (in YYYY-MM-DD format)
6th line (onwards) - Size and name of files

The .patch or .xap file is a tar.gz of the patch.

An example of one my info files I am working on is:

Quote
libSDL_ttf-2.0.9-R3-01(20080920).xap
libSDL_ttf-2.0.9
R3-01(20080920)
I made this....
12:2008-09-20
12K   include/SDL/SDL_ttf.h
16K   include/SDL
20K   include
4.0K   lib/libSDL_ttf.la
0   lib/libSDL_ttf.so
96K   lib/libSDL_ttf.a
0   lib/libSDL_ttf-2.0.so.0
84K   lib/libSDL_ttf-2.0.so.0.6.3
188K   lib
0   share/info/libSDL_ttf-2.0.9-R3-01(20080920).info
4.0K   share/info
8.0K   share

A script to help you get started producing them is http://www.xs4all.nl/~jostht/epc/ called mkxap.




mainlime

  • Newbie
  • *
  • Posts: 5
Re: Patch files
« Reply #2 on: October 08, 2008, 05:22:16 PM »
Cheers for the info

Looking at the script though it seems they are Bzip2 files rather than tar.gz

It seems a fairly simple format. Presumably one package could easily overwrite another's files if, for example, they use different versions of the same library. Anyone know if a more comprehensive package manager such as Apt or RPM would be possible?

rmotters

  • Newbie
  • *
  • Posts: 43
    • My blog on the things I am doing with the ONEt
Re: Patch files
« Reply #3 on: October 08, 2008, 06:42:48 PM »
Cheers for the info

Looking at the script though it seems they are Bzip2 files rather than tar.gz

It seems a fairly simple format. Presumably one package could easily overwrite another's files if, for example, they use different versions of the same library. Anyone know if a more comprehensive package manager such as Apt or RPM would be possible?

There is no bzip2 installed on my Elonex ONEt, so I have to modify the script to use gzip.

With regards to apt or rpm, coming from a fedora background. I wish. This distro is seriously lacking a proper package management.

Hopefully, something like this could be added to something like this, or we could get a bog standard debian (already been ported) etch installation running on board. Here's hoping.

Jay Turner

  • Full Member
  • ***
  • Posts: 239
Re: Patch files
« Reply #4 on: December 22, 2008, 03:21:29 PM »
From what I have learnt this is the format

.info file
----------
1st line - Filename of archive
2nd line - Program and version
3rd line - OS Version (I think, currently R3-01) and packaging date in brackets (in YYYYMMDD format)
4th line - optional Comment line can be left out (I believe)
5th line - number of files and packaging date (in YYYY-MM-DD format)
6th line (onwards) - Size and name of files

The .patch or .xap file is a tar.gz of the patch.

An example of one my info files I am working on is:

Quote
libSDL_ttf-2.0.9-R3-01(20080920).xap
libSDL_ttf-2.0.9
R3-01(20080920)
I made this....
12:2008-09-20
12K   include/SDL/SDL_ttf.h
16K   include/SDL
20K   include
4.0K   lib/libSDL_ttf.la
0   lib/libSDL_ttf.so
96K   lib/libSDL_ttf.a
0   lib/libSDL_ttf-2.0.so.0
84K   lib/libSDL_ttf-2.0.so.0.6.3
188K   lib
0   share/info/libSDL_ttf-2.0.9-R3-01(20080920).info
4.0K   share/info
8.0K   share

A script to help you get started producing them is http://www.xs4all.nl/~jostht/epc/ called mkxap.




How do I run this script????
Elonex OneT + Software hacks + 4Gig SD card

Unhban

  • Sr. Member
  • ****
  • Posts: 322
  • Thinks....
Re: Patch files
« Reply #5 on: December 23, 2008, 10:59:00 AM »
Don't you go into the Software Installer and run it from there?

Jay Turner

  • Full Member
  • ***
  • Posts: 239
Re: Patch files
« Reply #6 on: December 23, 2008, 01:23:48 PM »
no, its not an .info file
Elonex OneT + Software hacks + 4Gig SD card

Jay Turner

  • Full Member
  • ***
  • Posts: 239
Re: Patch files
« Reply #7 on: January 17, 2009, 09:04:19 PM »
hello, any help?
Elonex OneT + Software hacks + 4Gig SD card

Tinkerer

  • Newbie
  • *
  • Posts: 20
Re: Patch files
« Reply #8 on: January 18, 2009, 01:33:38 PM »
Save it to /bin/mkxap
At the command line (Xterm or ctl+alt+f3), type "mkxap" followed by the name of the output file and the list of all files to include in the xap file.

So
mkxap SpaceInvaders xinvaders
would take the file "xinvaders" and would produce .xap and .info files with SpaceInvaders at the start of their name (plus OS and date information).

Jay Turner

  • Full Member
  • ***
  • Posts: 239
Re: Patch files
« Reply #9 on: January 18, 2009, 04:17:07 PM »
ok bit more explanation needed
Elonex OneT + Software hacks + 4Gig SD card

Tinkerer

  • Newbie
  • *
  • Posts: 20
Re: Patch files
« Reply #10 on: January 18, 2009, 04:46:51 PM »
ok bit more explanation needed
On your part as well -- what don't you understand?

Jay Turner

  • Full Member
  • ***
  • Posts: 239
Re: Patch files
« Reply #11 on: January 18, 2009, 09:18:58 PM »
ok bit more explanation needed
what this script actually does? what the second part of the command and the third means.
On your part as well -- what don't you understand?
Elonex OneT + Software hacks + 4Gig SD card

Tinkerer

  • Newbie
  • *
  • Posts: 20
Re: Patch files
« Reply #12 on: January 21, 2009, 05:12:10 PM »
Right, this may sound cheeky, but do you know how to compile stuff? Because if you don't, this script won't be all that much use anyhow, as all it does is package up a compiled program into an installer file....

Jay Turner

  • Full Member
  • ***
  • Posts: 239
Re: Patch files
« Reply #13 on: January 21, 2009, 07:00:39 PM »
got no clue how to compile stuff
Elonex OneT + Software hacks + 4Gig SD card

Unhban

  • Sr. Member
  • ****
  • Posts: 322
  • Thinks....
Re: Patch files
« Reply #14 on: January 22, 2009, 11:15:47 AM »
Perhaps in the How Tos we should have a topic on how to compile programs, it's really quite easy. I'd write it but off away for two weeks to sunny climes :)

Basically, you get a program called a compiler, for your PC. For the program you want to compile you set up how you want it to come out, in the case of the 1T and 1T+ it's mipsel or mips (cos that's the type of processor used in them), possibly another couple of things to set up like, do you want the compiled program to be zipped or tarred or just an 'exe', and hit go.

That's it in a nutshell, but I'm sure there's a wiki or help site that takes you through it, so why not look there and try it?