summaryrefslogtreecommitdiffstats
path: root/docs/HACKING
blob: b3582544918e6a15c74e664d18ab8fc33bb9ff29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
-=-=--
DrakX is a very big project, and it needs special setups to work.
The purpose of this file is to explain how you can setup your box to make it
compile and run.
-=-=--

Beware, don't try this on a production machine with important data.


--------------------------------------------------------------------------
Sources installation:

  First grab the gi.tar.bz2 archive and untar it in your home directory,
for example from DrakX-*.src.rpm on your Linux-Mandrake distribution.

cd to gi
for i in `du -a | grep CVS/Root | cut -f 2`
do
  sed -e 's/prigaux/anoncvs/' $i > $i.tmp
  mv $i.tmp $i
done

Then, log yourself into the cvs:
% export CVSROOT=:pserver:anoncvs@mandrakesoft.com:/home/cvs/cooker
% cvs login
% Passwd: cvs
% cvs checkout gi

And update the gi package:
cvs update -P


--------------------------------------------------------------------------
Preparing the compilation process:

(1) target directory

create a /export directory and copy a recent Mandrake-Linux CD in there.
(You don't have to put have all the RPMS...) ; you'll need roughly 1.5
Gbytes for a full install.

[gc@obiwan ~/cvs/gi] su -c "mkdir /export"


(2) devel packages

you need quite a few devel packages to run the stuff; roughly: gcc, make,
glibc-devel, perl-devel, XFree86-devel, libglib-devel, libgtk+-devel,
perl-GTK, ldetect*, libslang-devel, libnewt-devel, e2fsprogs, dosfstools,
rpm-devel, popt-devel, rpmtools.


(3) sudo

never build or run DrakX as root; install package sudo, and set up
relevant permissions; the following should be enough: (in your
/etc/sudoers)

gc ALL=(root) NOPASSWD:/usr/bin/patch,NOPASSWD:/bin/rpm,NOPASSWD:/bin/mount,NOPASSWD:/bin/cp,NOPASSWD:/bin/umount,NOPASSWD:/usr/bin/install,NOPASSWD:/bin/rm,NOPASSWD:/bin/mv,NOPASSWD:/bin/tar,NOPASSWD:/bin/cpio,NOPASSWD:/bin/chown,NOPASSWD:/bin/mkdir,NOPASSWD:/usr/bin/strip


(4) boot kernel

you need a boot kernel and some kind of modules for each boot floppy. it's
located in subdirectory "kernel" in DrakX-*.src.rpm ; if you ever grab (or
build) another boot kernel, re-do following step (c).

	(a) build the packager software for stage1 (read README file to know what's stage1)
	[gc@obiwan ~/cvs/gi] cd mdk-stage1/mar
	[gc@obiwan ~/cvs/gi/mdk-stage1/mar] make

	(b) build the perl stuff for stage2
	[gc@obiwan ~/cvs/gi] cd perl-install
	[gc@obiwan ~/cvs/gi/perl-install] make

	(c) build kernel/modules stuff for stage1 and stage2
	[gc@obiwan ~/cvs/gi] ./update_kernel


(5) pray

[gc@obiwan ~/cvs/gi] make


---------------------------------------------------------------------------
The comments written with #- are automatically stripped out at install.


---------------------------------------------------------------------------
testing all:

  go to the perl-install directory and execute ./g_auto_install --test

  You should be able to test the whole thing in a non-destructive way.

NEVER compile and/or execute DrakX as root!




Here is how I (dams) made it work on my computer.
-------------------------------------------------

- get the sources
- install the librairies needed included newt-devel gtk+-devel popt-devel popt gtk-engines
- cd path/to/gi
- make
- mkdir /usr/share/gtk
- ln -s path/to/gi/perl-install/share/themes /usr/share/gtk
- ln -s path/to/gi/perl-install/share/step-* /usr/share
- ln -s path/to/gi/perl-install/share/help.xpm /usr/share
- ln -s path/to/gi/perl-install/share/isdn* /etc/sysconfdir/network-scripts
- have a cd architecture linked on /export
- ln -s /export /tmp/rhimage
- export PERL_INSTALL_TEST=1
- cd path/to/gi/perl-install
- gendistrib --noclean --distrib /export
- ./install2 in root (dangerous) or chmod a+r /dev/hd* and ./install2 in user



address all bugreports to dave@null.com