Automatic inst package generation

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
whiter
Posts: 972
Joined: Tue Apr 29, 2003 2:02 pm
Location: Winterthur, Switzerland
Contact:

Automatic inst package generation

Unread postby whiter » Thu Mar 18, 2004 2:33 pm

I am working on a commandline tool to automaticaly generate inst packages / tardists. But I'd like to get some input on how to improve it.

current status:

Code: Select all

bash-2.05b# ./mkpkg /opt/finished/make-3.80 gmake
bash-2.05b# ./mkpkg /opt/finished/pkgconfig-0.15.0 pkgconfig
bash-2.05b# ./mkpkg /opt/finished/readline-4.3 readline
bash-2.05b# ./mkpkg /opt/finished/render-0.8 render
bash-2.05b# ./mkpkg /opt/finished/m4-1.4 m4
bash-2.05b# ./mkpkg /opt/finished/gettext-0.13.1 gettext
bash-2.05b# ./mkpkg /opt/finished/tcl8.4.5 tcl
bash-2.05b# ls -la /tmp/mkpkgtempdir/dist/
total 26040
drwxr-xr-x    2 root     sys          4096 Mar 18 22:24 .
drwxr-xr-x    3 root     sys          4096 Mar 18 22:24 ..
-rw-r--r--    1 root     sys           786 Mar 18 22:22 gettext
-rw-r--r--    1 root     sys        176077 Mar 18 22:22 gettext.idb
-rw-r--r--    1 root     sys       4512506 Mar 18 22:22 gettext.sw
-rw-r--r--    1 root     sys           299 Mar 18 22:19 gmake
-rw-r--r--    1 root     sys          1991 Mar 18 22:19 gmake.idb
-rw-r--r--    1 root     sys        340877 Mar 18 22:19 gmake.sw
-rw-r--r--    1 root     sys           279 Mar 18 22:20 m4
-rw-r--r--    1 root     sys           687 Mar 18 22:20 m4.idb
-rw-r--r--    1 root     sys        173884 Mar 18 22:20 m4.sw
-rw-r--r--    1 root     sys           320 Mar 18 22:19 pkgconfig
-rw-r--r--    1 root     sys           724 Mar 18 22:19 pkgconfig.idb
-rw-r--r--    1 root     sys         70020 Mar 18 22:19 pkgconfig.sw
-rw-r--r--    1 root     sys           420 Mar 18 22:20 readline
-rw-r--r--    1 root     sys          3111 Mar 18 22:20 readline.idb
-rw-r--r--    1 root     sys       1724326 Mar 18 22:20 readline.sw
-rw-r--r--    1 root     sys           300 Mar 18 22:20 render
-rw-r--r--    1 root     sys          1304 Mar 18 22:20 render.idb
-rw-r--r--    1 root     sys         32326 Mar 18 22:20 render.sw
-rw-r--r--    1 root     sys           500 Mar 18 22:24 tcl
-rw-r--r--    1 root     sys        119909 Mar 18 22:24 tcl.idb
-rw-r--r--    1 root     sys       6109518 Mar 18 22:24 tcl.sw
bash-2.05b#


The program takes the location of a completely compiled and installed program as first parameter and the basename for the package as the second.
It will generate a package that installs the program in a predefined $prefix (effectively replacing $1 with $prefix).

At the moment the packages only contain 1 subsystem: $2.sw.complete

I would like it to be able to determine which parts of the tree go in which specific subsystem. But how should I do that?
Possibilities to pass the required data to the program include a specific config file, commandline parameters, and/or environment variables. The program is meant to be called from within other tools (wrappers), so it doesn't need to be 'handy to use for the enduser'.

I would also like to be able to set dependencies for subsystems and more stuff like that. I know how to do it by hand, but now automated .... :)

Any input is VERY VERY welcome.

The way the script is rightnow already saves me shitloads of time! I'm sure others could use it too.
Shall I describe it to you? Or do you want me to get you a box?

User avatar
whiter
Posts: 972
Joined: Tue Apr 29, 2003 2:02 pm
Location: Winterthur, Switzerland
Contact:

Unread postby whiter » Thu Mar 18, 2004 3:28 pm

For the record:

http://www.graphicscave.com/

My website for ages. First time I actualy start to use it realy :-)

I'll update that with anything I'm building. When something is realy done, a tardists will go to my contrib folder here on nekochan (as soon as it's ready)
Shall I describe it to you? Or do you want me to get you a box?

LoWeN
Posts: 256
Joined: Thu Aug 28, 2003 11:45 am
Location: Belgium

Unread postby LoWeN » Fri Mar 19, 2004 1:50 am

Hello,

Whiter I would be really happy...
Because for the moment the things that stop me is how to properly package my devs.

Actually is there any one to teach me the art of packaging properly under irix?

@+

LoWeN
UX powered

User avatar
dexter1
Moderator
Moderator
Posts: 2062
Joined: Thu Feb 20, 2003 7:57 am
Location: Voorburg, The Netherlands
Contact:

Unread postby dexter1 » Fri Mar 19, 2004 2:21 am

Things like man pages still needs to be done apparently. Dependencies you can collect using ldd on the result and calling versions to see which package they are in.

Sounds like a good job for an awk script :) or even perl, though i don't speak it.

User avatar
whiter
Posts: 972
Joined: Tue Apr 29, 2003 2:02 pm
Location: Winterthur, Switzerland
Contact:

Unread postby whiter » Fri Mar 19, 2004 2:29 am

dexter1 wrote:Dependencies you can collect using ldd on the result and calling versions to see which package they are in.


Great tip! Why didn't I think of that myself? (doh)
I'll start ksh-ing on that tonight :)

Now for the 'which part of the filetree goes in which subsystem' part ... still no clue about that.
Shall I describe it to you? Or do you want me to get you a box?

User avatar
whiter
Posts: 972
Joined: Tue Apr 29, 2003 2:02 pm
Location: Winterthur, Switzerland
Contact:

Unread postby whiter » Fri Mar 19, 2004 3:41 pm

multiple subsystem support is now integrated:

Code: Select all

miriel 1608# /mnt/work/dev/mkpkg bash-2.05b
mkpkg - automatic inst package generation
(c) 2004 by Steffen M. Boelaars

==> generating dist from /mnt/work/relnotes/bash-2.05b
---> bash
---> bash.sw
---> bash.sw.base
---> bash.man
---> bash.man.man
---> bash.man
---> bash.man.info
---> bash.opt
---> bash.opt.sources
---> bash.opt.patches
---> bash.opt.relnotes
==> generating dist
==> dist stored in /opt/dist
miriel 1609# ls -la /opt/dist/
total 5376
drwxr-xr-x    2 root     sys            76 Mar 20 00:27 .
drwxr-xr-x   11 root     sys           124 Mar 19 23:36 ..
-rw-r--r--    1 root     sys          1216 Mar 20 00:27 bash
-rw-r--r--    1 root     sys          2268 Mar 20 00:27 bash.idb
-rw-r--r--    1 root     sys        119826 Mar 20 00:27 bash.man
-rw-r--r--    1 root     sys       1964780 Mar 20 00:27 bash.opt
-rw-r--r--    1 root     sys        652052 Mar 20 00:27 bash.sw
miriel 1610#


The program uses a config file for initial pathnames ofcourse. It determines where the completely compiled and installed program resides, and looks through an 'idbspec' file to determine which file goes in which subsystem. A simple example (for bash) looks like this:

Code: Select all

sw.base bin
man.man man
man.info info

but lines may be longer ofcourse (example: "sw.base bin lib32 lib").

Now on with the dependencies ...
Last edited by whiter on Fri Mar 19, 2004 4:30 pm, edited 1 time in total.
Shall I describe it to you? Or do you want me to get you a box?

User avatar
nekonoko
Site Admin
Site Admin
Posts: 8015
Joined: Thu Jan 23, 2003 2:31 am
Location: Pleasanton, California
Contact:

Unread postby nekonoko » Fri Mar 19, 2004 4:28 pm

Looking good! Any tool that will help automate some the process is welcome in my book.

I did a little HOW-TO a while back on determining tardist interdependencies/prereqs:

viewtopic.php?t=851

Maybe some of that will help out here.
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.

User avatar
whiter
Posts: 972
Joined: Tue Apr 29, 2003 2:02 pm
Location: Winterthur, Switzerland
Contact:

Unread postby whiter » Fri Mar 19, 2004 4:40 pm

added the .opt.* subsystems. (And updated my previous post accordingly)
$package.opt.sources, $package.opt.patches, $package.opt.relnotes are more or les staticaly defined. They are being generated from the sources/patches/relnotes subdirectories of the dir you are generating the package from.

A typical base-dir looks like this:

Code: Select all

bash-2.05b
 |- idbspec (config/hints file for mkpkg)
 |- installed (dir containing the installed program)
 |   |- bin
 |   |   |- bash
 |   |   `- bashbug
 |   |- info
 |   |   `- bash.info
 |   `- man
 |       `- man1
 |           |- bash
 |           `- bashbug
 |- patches (dir containing all used patch files)
 |   |- bash-2.05b.postconfig.patch
 |   |- bash-2.05b.preconfig.patch
 |   |- bash205b-001
 |   |- bash205b-002
 |   |- bash205b-003
 |   |- bash205b-004
 |   |- bash205b-005
 |   |- bash205b-006
 |   `- bash205b-007
 |- relnotes (dir containing release note files. (can/should there be multiple?)
 |   `- bash-2.05b.txt
 `- sources (dir containing the original source code archives/files)
     `- bash-2.05b.tar.gz
Shall I describe it to you? Or do you want me to get you a box?

User avatar
whiter
Posts: 972
Joined: Tue Apr 29, 2003 2:02 pm
Location: Winterthur, Switzerland
Contact:

Unread postby whiter » Sat Mar 20, 2004 2:13 pm

Who's the man ?!??

Code: Select all

bash-2.05b# /mnt/work/dev/mkpkg gettext-0.13.1
mkpkg - automatic inst package generation
(c) 2004 by Steffen M. Boelaars

==> generating dist from /mnt/work/relnotes/gettext-0.13.1
---> gettext
---> gettext.man
---> gettext.man.books
---> gettext.man.info
---> gettext.man.man
---> gettext.sw
---> gettext.sw.base
----> Dependencies found:
       - c++_eoe.sw.lib
       - compiler_eoe.sw.lib
       - eoe.sw.base
---> gettext.sw.dev
---> gettext.opt
---> gettext.opt.sources
---> gettext.opt.patches
---> gettext.opt.relnotes
==> generating dist
==> dist stored in /opt/dist
bash-2.05b#


:-D
Shall I describe it to you? Or do you want me to get you a box?

User avatar
whiter
Posts: 972
Joined: Tue Apr 29, 2003 2:02 pm
Location: Winterthur, Switzerland
Contact:

Unread postby whiter » Sat Mar 20, 2004 4:25 pm

First version is available for download:

http://www.graphicscave.com/

Please test and let me know any problems/bugs/wishes etcetera.

EDIT: updated the package a bit. (autopkg-0.1.1 yahoo! :) ) to support userdefinable package prefixes ("neko_" ? :) ) and package.image version numbers
Shall I describe it to you? Or do you want me to get you a box?


Return to “SGI: Development”

Who is online

Users browsing this forum: Google [Bot] and 1 guest