summaryrefslogtreecommitdiffstats
path: root/README
blob: 2f550fb595b4ad8a60a68456d89ea19ce6bfa1d3 (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
    The LinHES development  is divided into two different git repositories.
The first repository is linhes-pkgbuild, and it contains all the PKGBUILD
files that make up LinHES.  The second repository is called linhes-dev and is
intended to create a chroot for all development to occur within.  By using a
chroot development work can be done on non-LinHES machines.  The reason for
the split is so that the PKGBUILD's may be downloaded and modified by
non-developers without requiring them to download the entire development
environment.
 
------ linhes-pkgbuild -----------
 
The layout of the linhes-pkgbuild repository is as follows.
-- abs
    |-- core
    |-- core-testing
    |-- extra
    |-- extra-testing
 
Core is the  set of packages that make up the "core" of LinHES, or in other
words all the packages needed to create a fully functioning system.
 
Extra contains all the packages used by LinHES, but not necessarily needed
to create a fully functioning system.  For example this would include
mplayer, xine and mozilla.  
 
The difference between core and core-testing is that core is intended to be
used for public iso releases, where as core-testing is intended for developers
or beta testing.  The same applies to extra and extra-testing.
 
-----------  linhes-dev -------------------
 
     linhes-dev  contains the tools and scripts  for a  working development
environment, but it is not a working development by itself.  The script
setup-env.sh will do all the work in creating a working development
environment.  The script will download and install the required packages
(from the current stable release) into a directory called build_root and
create a script that can be used to enter the chroot. 
     Because LinHES will support multiple architectures, setup-env.sh
requires an argument telling it which architecture to work with.  Currently
i686 is the only working option, so that is the one I recommend you use.
For example running "setup-env.sh i686" will create a working i686 LinHES
development environment named build_root.i686.  Setup-env.sh also creates an
empty directory structure called pkg_repo, this is used by kmsync.sh
(which will be discussed later).
 
     To enter the build root run  (as root) the newly created script called
enter_build_root.i686.  The script will take care of the following things:
        a) mounting proc,sys,dev/pts
        b) bind mounting linhes-dev/build_tools to  build_root/build_tools
        c) bind mounting linhes-pkgbuild to build_root/data/linhes-pkgbuild
        d) bind mounting pkg_repo to build_root/data/pkg_repo.
        e) unmount the above directories  when leaving the chroot
 
The following is a list of tools available to you inside the chroot.
 
a) mp.py
        Python script to replace mp. Must be called from the same directory
        that contains the PKGBUILD.

b) mp
        Small script to compile a package, copy it to the local testing repo
        and update the local database using the repo-add function. Must
        be called from the same directory that contains the PKGBUILD.
        This script takes all the same arguments that makepkg takes.
 
c) mpr | mpl
        mpr)  Symlink to mp that does the same thing as mp except it copies the
            package to the release repo
 
        mpl)  Symlink to mp that does the same thing as mp except it copies the
              package to a local repo
 
d) update_db_repo 
        Used to completely regenerate the the local package database.
        Takes two arguments  the directory with packages, and the name of
        the repository.  Example:
        update_db_repo  /data/pkg_repo/i686/core-testing core-testing
 
e) kmsync.sh (testing|release|chroot-devel|source[testing|release|chroot-devel]
        This script is used to synchronize the contents of the compiled
        packages on knoppmyth.net and the ones on your local machine. 
        The script takes 1 or 2 arguments telling it which repository with which
        to sync up.  The first time it's run with any given option the local
        directory (/data/pkg_repo/i686/core|extra|chroot-devel)
                MUST MUST MUST be empty.   
        Please use this script with care, any changes that are made in the
        local mirror will be copied to the knoppmyth server.
        This includes the possibility to completely erase all the packages.
        Normally the source packages are synced when the binary packages are synced.  The 
        source option is present to force an update, and isn't not normally required to be run.
 
        Finally this script uses a shared user account on knoppmyth.net that
        is a locked account.  SSH  keys must be setup for this script to work.

f) build_tools/go.sh
        Menu driven fronted to create an ISO with selected profile
        The following profiles are available to create an iso.
    a ) i686-RELEASE-REMOTE
        Create an iso from the release repo using packages from knoppmyth.net
    b ) i686-testing-REMOTE
        Create an ISO from the testing repo using packages from knoppmyth.net
    c) i686-testing-local
        Create an ISO from the testing repo using packages from the local mirror
    d ) i686-testing-local-httpdir-structure
        Create an ISO from the testing repo using packages from a local web
        server name "localmirror"
 
        After the process finishes it will let you know the final name and
location of the resulting ISO.  For any of the local profiles to work, it
requires that kmsync be run at least once to populate the local mirror.
 
Quick start showing typical process to create the chroot and build an ISO.
############
Create the chroot for i686
 
If you are using an R6 install as your dev box, you will need to install git. 
Make sure you have the following entries in /etc/pacman.conf:
 
[core-testing]
Server = http://linhes.org/repo/i686/core-testing
 
[extra-testing]
Server = http://linhes.org/repo/i686/extra-testing
 
[chroot-devel]
Server = http://linhes.org/repo/i686/chroot-devel
 
Then run:
        pacman -Syu
        pacman -S git
 
Then checkout the repo. You will need to have been given a dev account on 
knoppmyth.net. This involves creating a public ssh key and supplying it to
one of the knoppmyth.net admins. The key is created using ssh-keygen. The 
resulting public key will be stored in .ssh/id_rsa.pub.
 
The recommended location for the checkout is /myth/dev.
        cd /myth/dev
 
- Restricted dev accounts should use
        git clone $USER@knoppmyth.net:linhes-pkgbuild
        git clone $USER@knoppmyth.net:linhes-dev
 
- Unresticted dev account should use
        git clone ssh://$USER@knoppmyth.net/mount/repository/linhes-dev
        git clone ssh://$USER@knoppmyth.net/mount/repository/linhes-pkgbuild
 
- Edit linhes-dev/templates/pacman.conf.chroot. Comment out the core and 
extra lines and uncomment the core-testing and extra-testing.
 
- Run these commands:
        cd linhes-dev/
        sudo ./setup_env.sh i686
        cd ..
 
- Set up the ssh keys inside the build root. If the ssh public key you 
provided to the knoppmyth.net admin was created by root on an r6 install:
        cp -R /root/.ssh build_root.i686/root/.ssh
 
- Then to enter the chroot:
        sudo ./enter_dev_chroot.i686
 
-- To Build an ISO from knoppmyth.net:
        cdb <= alias
        ./go.sh
         (select i686-testing-REMOTE)
 
-- To build an ISO locally:
Before running kmsync.sh for the first time, for reasons explained above, 
ensure the local directories (/data/pkg_repo/i686/core|extra|chroot-devel) 
are empty. Then run:
 
        kmsync.sh testing
        ./go.sh
          (Select i686-testing-local)
 
#---------
Commands used to build a package (tar in this example), and update knoppmyth.net
Before building ANY packages you __MUST__ run "kmsync.sh testing" at least once 
while the local package directories are still empty. Doing this step now will avoid 
sync headaches down the road.
 
cdl  <= alias that takes you the the top level PKGBUILD directory
cd core-testing
cd tar
vi PKGBUILD  <= edit and increment pkgrel by 1; remove md5sums
mp.py <= builds the package and all dependencies

# At this point you should test the package, either by building
# a new iso or installing the package).

# In order to make your source change(s) available to others, you will have
# to commit your change(s) to your local copy of the linhes-pkgbuild repo.
# If this is your first time using the git command, set up your user name
# and email address (You only need to do this once, not every time):

  git config --global user.name "Your Name"
  git config --global user.email "you@yourdomain.com"

# Next, commit your changes to your local linhes-pkgbuild repo:

  git commit -a -m "commit message"

# and then push the change(s) to the public repo:

  git push

# In order to make your new package(s) available to others, you will need to
# upload changed packages using kmsync.sh:

kmsync.sh testing  <= this will pull down all new packages from knoppmyth.net
                      and upload the new tar package. This will also sync up 
                            the src packages.
 
-----------------------
Misc.
Directory structure after a functioning chroot is created for i686
|-- linhes-pkgbuild
|-- linhes-dev
|-- build_root.i686
|-- enter_dev_chroot.i686.sh
`-- pkg_repo
 
-----------------------
# End