Thursday, March 31, 2005

Pro Apache 3rd Edition Peter Wainwright

This is an awesome book.
Better than the oreilly books and they
are usually pretty good.

notes from the book

<Limit> restricts scope of the directives.

<Directory >
Directives inside a <Directory > container apply
only to that directory and its subdirectories.
<Directory> containers can't be nested

<VirtualHost>

<VirtualHost> allows additional hosts and web sites to be
defined alongside the main server host site. Each
virtual host can have its own name, IP address, and
error and accesss logs

ok i had to wipe the gentoo box i was working on.
i had tried everything with this box. when ever
i built/ran apache in a chroot it worked great.

served pages like a charm when i tried to unmerge
emerge back apache the same problems.
during the rebuild process i disabled pam

i have stopped and restarted apache it seems
to serve up the index page
fine. another item is i disabled ssl.
I need to do more research about what ssl does
(i know what it does) but rather i need it caused
the problem before where pages just would
not be served up. personally i think it was pam.

Wednesday, March 30, 2005

MC (midnight commander on uclibc gentoo)

finally got this to build.
this probably works because the tarball has
been tainted with the x11 4.3.0 i have been
working with also the libtermcap.

but here are the steps i took.
build the following
1) libiconv-1.9.1.tar.gz
2) gettext-0.14.tar.gz
3) glib-2.4.0.tar.gz

the built mc (mc-4.6.1-pre1.tar.gz)

i will trash this tarball and rebuild
the project from scratch.

more stupid tar tricks

( cd "$SRC"; tar -cf- --exclude=.svn --exclude=CVS . ) | ( cd $DST; tar -xf- )

Tuesday, March 29, 2005

Startx

1. startx is a script.
2. startx looks for .xinitrc in the user's home directory, and if it is not found then proceeds to use the contents of /usr/lib/X11/xinit/xinitrc, which is a a symbolic link to /etc/X11/xinit/xinitrc.

Monday, March 28, 2005

Finite statemachine class

nice state machine implementation.
simple no gpl.
the other statemachine implementations i have found
are predicated on table generation. i would
create a table would be a pain because it
would not be human (this human) readable
once it was created. and because the
grammer that i dealing with is ll(k)
flex will not be of use. and flex script
is relative readable.
http://www.isd.mel.nist.gov/projects/omacapi/Software/FiniteStateMachine/FSMIntroPage.html

Friday, March 25, 2005

remote debugging with gdbserver

i may actually be able to use gdbserver
i tried this a couple of weeks ago with no success no
after more expermentation i think
i have something that works.

first on the host machine i downloaded and compiled
gdb version 6.0.

then i created a do nothing project that would
illustrate what i was looking for.


there is a main the opens a file and writes to it.
initall i wanted to write something to console
but it seems gdb server was eating the stderr
output. but opening a file and writting data
to it would show that program was be controlled
remotely.

------------------------------ main.c ---------------------
#ifdef HAVE_CONFIG_H
#include
#endif
#include
#include "foo.h"

int main(int argc, char * argv[])
{
int i = 0;
FILE *pFile;
pFile = fopen("/tmp/out.txt","w");
for(;;)
{
i++;
fprintf(pFile,"%d\n",foo(i));
fflush(pFile);
}
return 0;
}
----------------------------------------------
i wanted to see of the insight debugger
could automatically load source that
was being remotely debugged.
----------------------- foo.c ----------------
#ifdef HAVE_CONFIG_H
#include
#endif
#include

#include "foo.h"

int foo(int i)
{
return i-1;
}

-----------------------------------------------

procedure.
1) compile and link the program then tar
all of it and ftp it to the remote machine.
untar this and run gdbserver as follows:
./gdbserver 192.168.0.10:1234 ./stubs
the name of program executeable is stubs
the ip of this remote machine 192.168.0.10
i selected a port address of 1234.

2) on the host side start the insight debugger
and open the console window and type
file /path/to/stubs
then
target extended-remote 192.168.0.10:1234
the following should echo back
0x40000c90 in ?? ()

3) start debugging or should start debugging.
b main should put a breakpoint at main.
then
c or continute will run till main and stop
execute here
after that i started type s and as came to line

fprintf(pFile,"%d\n",foo(i));

the source file for foo.c was load automatically.

i telneted over to the remote machine and examined
the file /tmp/out.txt and the output was
0
1
2
3
as it should be.

Sunday, March 20, 2005

MySQL revisited

Notes: From O'reilly book.
As with the binary install, the first step is to create a uer
who will run the MySql server:

$> su - root
$> groupadd mysql
$> useradd -g mysql mysql

......

The software is now installed. We have few set-up
taskes left do. Run mysql_install_deb to create
the MySql grant tables

$> cd /usr/local/mysql
$> cd scripts/mysql_install_db

Setup the ownership of the binaries so they are
owned by root and in the MySQL administrator
group

Wednesday, March 16, 2005

building kdrive on uclibc

i did finaly figure out how to build kdrive aka tinyx.

dont use uclibc build root system.
instead i used gentoo uclibc stage.

first of all uclibc stage can be
downloaded from one of the mirrors.
then i made a chroot. using the
stage and portage mirror.

tada i build system that works.

1) emerged kdrive this produced
/usr/X11R6/bin/Xvesa
/usr/X11R6/startxkd
I stopped x11
and re-ran he chroot sans x11
and tada xvesa ran the mouse work
correctly and ctrl-alt-backspace termed
the whole thing correctly.

how to place the thing on a bootable
cdrom?


------------------------------------------
xvesa i need to get
x/xvesa when the cd boots.
also what about an
ideas startx/xinit?
and a window manager (blackbox/fluxbox)

startx is a script
xinit is prog from c source xinitr.c

how does xinit start

here is what the man page says:
http://www.xfree86.org/current/xinit.1.html

The xinit program is used to start the X Window System server and a first client program on systems that cannot start X directly from /etc/init or in environments that use multiple window systems. When this first client exits, xinit will kill the X server and then terminate.

If no specific client program is given on the command line, xinit will look for a file in the user's home directory called .xinitrc to run as a shell script to start up client programs. If no such file exists, xinit will use the following as a default:

xterm -geometry +1+1 -n login -display :0

If no specific server program is given on the command line, xinit will look for a file in the user's home directory called .xserverrc to run as a shell script to start up the server. If no such file exists, xinit will use the following as a default:

X :0

Note that this assumes that there is a program named X in the current search path. However, servers are usually named Xdisplaytype where displaytype is the type of graphics display which is driven by this server. The site administrator should, therefore, make a link to the appropriate type of server on the machine, or create a shell script that runs xinit with the appropriate server.

Note, when using a .xserverrc script be sure to ``exec'' the real X server. Failing to do this can make the X server slow to start and exit. For example:

exec Xdisplaytype

An important point is that programs which are run by .xinitrc should be run in the background if they do not exit right away, so that they don't prevent other programs from starting up. However, the last long-lived program started (usually a window manager or terminal emulator) should be left in the foreground so that the script won't exit (which indicates that the user is done and that xinit should exit).

An alternate client and/or server may be specified on the command line. The desired client program and its arguments should be given as the first command line arguments to xinit. To specify a particular server command line, append a double dash (--) to the xinit command line (after any client and arguments) followed by the desired server command.

Both the client program name and the server program name must begin with a slash (/) or a period (.). Otherwise, they are treated as an arguments to be appended to their respective startup lines. This makes it possible to add arguments (for example, foreground and background colors) without having to retype the whole command line.

If an explicit server name is not given and the first argument following the double dash (--) is a colon followed by a digit, xinit will use that number as the display number instead of zero. All remaining arguments are appended to the server command line.

Checking MySql

ok my first attempt at starting mysql /etc/init.d/mysql start:

ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

ok check the conf file.
----------------------------- here is the conf file -------------------------
# /etc/mysql/my.cnf: The global mysql configuration file.
# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/files/my.cnf-4.0.14-r1,v 1.2 2004/07/18 02:47:43 dragonheart Exp $
#
# This file can be simultaneously placed in three places:
# 1. /etc/mysql/my.cnf to set global options.
# 2. /var/lib/mysql/my.cnf to set server-specific options.
# 3. ~/.my.cnf to set user-specific options.
#
# One can use all long options that the program supports.
# Run the program with --help to get a list of them.
#
# The following values assume you have at least 32M RAM!

[client]
#password = my_password
port = 3306
socket = /var/run/mysqld/mysqld.sock

[safe_mysqld]
err-log = /var/log/mysql/mysql.err

[mysqld]
skip-innodb
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
log-error = /var/log/mysql/mysqld.err
# If set, mysql logs all queries(general query log). This will be deprecated in
# 5.0. This logs all queries, even error queries and is slow.
# log = /var/log/mysql/mysql.log
#
# If you really need logging, use rather binary logging. Especially when doing
# replication. Read
# file:/usr/share/doc/mysql-*/manual.html.gz#Replication
# You can use PURGE MASTER LOGS TO '$hostname-bin.010' to get rid of old logs
# from $hostname-bin.01 up to $hostname-bin.09 while the slave server is
# running.
# Before doing that, check which logfile slave curently uses by running
# mysql> SHOW SLAVE STATUS
# To list logfiles on master do:
# mysql> SHOW MASTER LOGS
# Then use PURGE for those not needed anymore only! Never remove the files
# manually!
#
# Also consult RESET MASTER and RESET SLAVE commands before doing any changes
# mysql> RESET MASTER - Deletes all binary logs listed in the index
# file, resetting the binlog index file to be empty.
# mysql> RESET SLAVE - Makes the slave forget its replication position in
# the master logs.
# mysql> SET SQL_LOG_BIN=0 - this turns off logging (execute on MASTER only)
# mysql> SET SQL_LOG_BIN=1 - this turns on logging (execute on MASTER only)
#
# log-bin
# set-variable = binlog-do-db=non_existant
# set-variable = binlog-ignore-db=database_name
#
# server-id has to unique for each master or slave in your network,
# lets use last number from IP address
# server-id = 207
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-locking
set-variable = key_buffer=16M
set-variable = max_allowed_packet=1M
set-variable = thread_stack=128K
# keep secure by default!
bind-address = 127.0.0.1
port = 3306
# this can make it even more secure:
#skip-networking

[mysqldump]
quick
set-variable = max_allowed_packet=1M

[mysql]
#no-auto-rehash # faster start of mysql but no tab completition

[isamchk]
set-variable = key_buffer=16M
------------------------------------------------------------------------------
i chanched the entry for the pasword
and re-ran the start script
/etc/init.d/mysql start
no more error but new message to run the script /usr/bin/mysql_install_db
i ran the script and here is the following.
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, issue the following commands to start the server
and change the applicable passwords:
/etc/init.d/mysql start
/usr/bin/mysqladmin -u root -h gentoo password 'new-password'
/usr/bin/mysqladmin -u root password 'new-password'
Depending on your configuration, a -p option may be needed
in the last command. See the manual for more details.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

so here is the up-shot.
$> emerge mysql
$> edit the /etc/mysql/mycnf file
$> /usr/bin/mysql_install_db
edit /etc/my.cnf
change the passworld entry
/etc/init.d/mysql start
run /usr/bin/mysql_install_db

add the mysql to the default startup.

Slowly Fixing Bugzilla

The issue was that the index.cgi directory would never be show index.cgi
I hemmed and hawed around and then tried to use the check script
that comes with bugzilla and I check the user groups.
Finally I just tried trial and error.

I unmerged the buzilla and remerged apache

first things first. you have to resart apache for
options in the conf directory to take affect.
So remember to make a change and then to run/etc/init.d/apache2 restart repeat

I then figured out that I got and index.cgi to work
in a subdirectory of the main installed then I
could get bugzilla to install.

I created index.cgi script:

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, World.";
and placed it in the directory
/var/www/localhost/htdocs/zilla
then attempted to run the script
http://192.168.0.10/zilla

users@httpd.apache.org### /etc/apache2/conf/apache2.conf
### $Id: apache2.conf,v 1.1 2004/03/22 21:17:57 stuart Exp $
###
### Main Configuration Section
### You really shouldn't change these settings unless you're a guru
###
ServerRoot /usr/lib/apache2
ServerName 192.168.0.10
#LockFile /etc/apache2/apache2.lock
PidFile /var/run/apache2.pid
ErrorLog logs/error_log
LogLevel warn
DocumentRoot /var/www/localhost/htdocs
#the following had now affect on getting
#index.cgi to work
#DirectoryIndex index.html index.shtml index.cgi

### Dynamic Shared Object (DSO) Support
###
### You should always leave these three, as they are needed for normal use.
### mod_access (Order, Allow, etc..)
### mod_log_config (Transferlog, etc..)
### mod_mime (AddType, etc...)
###
LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule mime_module modules/mod_mime.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so

###
### New Modules for 2.0 (some are experimental)
###
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule echo_module modules/mod_echo.so
LoadModule charset_lite_module modules/mod_charset_lite.so
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule case_filter_module modules/mod_case_filter.so
LoadModule case_filter_in_module modules/mod_case_filter_in.so
LoadModule deflate_module modules/mod_deflate.so
#LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
#LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
#LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
#LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
#LoadModule bucketeer_module modules/mod_bucketeer.so
LoadModule logio_module modules/mod_logio.so

###
### Global Configuration
###
# Splitting up apache2.conf into two files makes it easier to support
# multiple configurations on the same serer. In commonapache2.conf
# you keep directives that apply to all implementations and in this
# file you keep server-specific directives. While we don't yet have
# multiple configurations out-of-the-box, this allows us to do that
# in the future easily. (PERLPROXIED *ahem*)
#
# For Apache2 we load all conf files in conf/modules.d
Include conf/modules.d/*.conf
Include conf/commonapache2.conf

###
### IP Address/Port
###
#BindAddress *
Listen 80

###
### Log configuration Section
###

#Single logfile with access, agent and referer information
#This is the default, if vlogs are not defined for the main server
CustomLog logs/access_log combined env=!VLOG
#If VLOG is defined in conf/vhosts/vhosts.conf, we use this entry
#CustomLog "|/usr/sbin/apache2splitlogfile" vhost env=VLOG


###
### Virtual Hosts
###
# We include different templates for Virtual Hosting. Have a look in the
# vhosts directory and modify to suit your needs.
#Include conf/vhosts/vhosts.conf
#Include conf/vhosts/dynamic-vhosts.conf
#Include conf/vhosts/virtual-homepages.conf

###
### Performance settings Section
###
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

# prefork MPM [THIS IS THE DEFAULT]
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0


# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves

StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0


# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# MaxThreadsPerChild: maximum number of worker threads in each server process
# MaxRequestsPerChild: maximum number of connections per server process

NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0


#the follow doesnt fix or disable the issue
#AddHandler cgi-script .cgi
#The following kills the working index.cgi why?
#ScriptAlias /zilla/ /var/www/localhost/htdocs/zilla/
#the follow doesnt fix or disable the issue
#DirectoryIndex index.cgi
#the following lets me

AddHandler cgi-script .cgi
Options +Indexes +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi
AllowOverride None


------------------------------------------------------------------------------------
the next thing to try is the actually install bugzilla

the machine i am working against will be remote
i may try the following once i get bugzilla and
subversion to work.


i came back and now emerge bugzilla.
this seemed to work a bit better this time.
i saw a post stating that it was better
to have a working mysql install or maybe
i just answered better questions to the
start up script.
anyway i added the following:

<Directory /var/www/localhost/htdocs/bugzilla/>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI +FollowSymLinks
DirectoryIndex index.cgi
AllowOverride None
</Directory>
to the conf file and restarted.
and tried to run http://192.168.0.10/bugzilla
in the browser ... no good i get a 500 error
this is different.
i then chmod +x index.cgi and then reload the url
and this is what i get.
Software error:
-------------------------------------------------------------------------------
No value for param loginmethod (try running checksetup.pl again) at Bugzilla/Config.pm line 161.
BEGIN failed--compilation aborted at Bugzilla/Auth.pm line 42.
Compilation failed in require at Bugzilla.pm line 27.
BEGIN failed--compilation aborted at Bugzilla.pm line 27.
Compilation failed in require at CGI.pl line 411.
BEGIN failed--compilation aborted at CGI.pl line 411.

For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error.
Software error:

[Wed Mar 16 12:50:13 2005] index.cgi: No value for param loginmethod (try running checksetup.pl again) at Bugzilla/Config.pm line 161.
[Wed Mar 16 12:50:13 2005] index.cgi: BEGIN failed--compilation aborted at Bugzilla/Auth.pm line 42.
[Wed Mar 16 12:50:13 2005] index.cgi: Compilation failed in require at Bugzilla.pm line 27.
[Wed Mar 16 12:50:13 2005] index.cgi: BEGIN failed--compilation aborted at Bugzilla.pm line 27.
[Wed Mar 16 12:50:13 2005] index.cgi: Compilation failed in require at CGI.pl line 411.
[Wed Mar 16 12:50:13 2005] index.cgi: BEGIN failed--compilation aborted at CGI.pl line 411.
Compilation failed in require at /var/www/localhost/htdocs/bugzilla/index.cgi line 33.

For help, please send mail to the webmaster
------------------------------------------------------------------------------------

couple of things to try:
1) is msql running? i dont know i havent check.
all i did was emerge the exes
2) are the permissions all the files correct?

Sunday, March 13, 2005

SSH

OpenSSH wasinstalled when i installed everything else
subversion and bugzilla.

attempted logining into the gentoo box via
ssh -l user_name 192.168.0.x

a nogo.

ok is the sever started most likely not.
nope its not.
rc-update add /etc/init.d/sshd default

then i edited the /etc/ssh/sshd_config file
eventually i want to be able to ssh into this machine
and work remotely
i need to edit this file again.
/etc/ssh/sshd_config

skip will not skip it i found the gentoo wiki.
most excellent.
http://gentoo-wiki.com/HOWTO_setup_a_home-server#Configuring_ssh

i did the following

# ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N ""
# ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ""
# ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ""

and the following actually worked.

# /etc/init.d/sshd start

and it ran!

then i tried loging infrom another machine on the local network
ssh -l user_name 192.168.0.x

this was a no go ... it kept asking
for a password
ill come back to it later

The importance of taking notes

About 2 years ago i did a ton of mysql/java programming
All of the cuff i didnt take notes man i wish i had
written down how i got things to work. i wont do
that again (not take notes) because now id dont
have the time to fuck around with small details.

Friday, March 11, 2005

MYSQL For Bugzilla

I have apache serving up simple web pages.
But what do i need to do for bugzilla?

the manual states that
need to place the following entry
in the apache.conf file.

<Directory /var/www/html/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit
</Directory>

but on the the gentoo distro the correct
location is at:

at /var/www/localhost/htdocs/bugzilla

The labours of hercules

the build up to bugzilla.

I) Built a gentoo box.
The box has a 3com 3c59x class card.
modified the file /etc/modules.autoload.d/kernel-2.4
with the single line
3c59x

II) next set up the net work to have a static ip address.
change file /etc/conf.d/net to have the entry.

iface_eth0="192.168.0.x broadcast 192.168.0.255 netmask 255.255.255.0"
gateway="eth0/192.168.0.1"

III) emerge xorg and check that this works.
I was lucky xorg worked without a hitch.
Then installed mc tightvnc blackbox.

IV) emerge subversion and bugzilla with in turn emerges subversion.

ACCEPT_KEYWORDS="~x86" emerge bugzilla subversion

why accept keywords bugzilla is a masked ebuild
this can be found in the bugzilla ebuild file.

next steps will be to test the mysql database.

1) what has been place in the etc directories.
2) mysqldmin to test or mysqlcc?

after that will be to setup the ssh tunnel layer.

after that will be to setup rsync to do regular backups.

* Subversion Server Notes
* -----------------------
*
* If you intend to run a server, a repository needs to be created using
* svnadmin (see man svnadmin) or the following command to create it in
* /var/svn:
*
* ebuild /path/to/ebuild/subversion-1.1.3-r1.ebuild config
*
* If you upgraded from an older version of berkely db and experience
* problems with your repository then run the following commands as root:
* db4_recover -h /var/svn/repos
* chown -Rf apache:apache /var/svn/repos
*
* Subversion has multiple server types, take your pick:
*
* - svnserve daemon:
* 1. edit /etc/conf.d/svnserve
* 2. start daemon: /etc/init.d/svnserve start
* 3. make persistent: rc-update add svnserve default
*
* - svnserve via xinetd:
* 1. edit /etc/xinetd.d/svnserve (remove disable line)
* 2. restart xinetd.d: /etc/init.d/xinetd restart
*
* - svn over ssh:
* 1. create an svnserve wrapper in /usr/local/bin to set the umask you
* want, for example:
* #!/bin/bash
* umask 002
* exec /usr/bin/svnserve "$@"
*
>>> Regenerating /etc/ld.so.cache...
* Caching service dependencies...
>>> dev-util/subversion-1.1.3-r1 merged.
>>> Recording dev-util/subversion in "world" favorites file...

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.


* Regenerating GNU info directory index...
* Processed 115 info files.

Wednesday, March 09, 2005

Debootstrap and uwoody

building debootstrap
the ebuilds in gentoo are damned helpful.
followed instructions on debootrap ebuild
goto link:
http://packages.qa.debian.org/dpkg
and get source:
dpkg_1.10.26.tar.gz
untar it and make and install.

then
http://packages.qa.debian.org/d/debootstrap.html
and get source:
http://http.us.debian.org/debian/pool/main/d/debootstrap/debootstrap_0.2.45-0.2.tar.gz
un-tared this into tmp
then copied devices.tar.gz into the
this came from the directory
/tmp/debootstrap-0.2.45
then make all install


http://www.underhanded.org/papers/debian-conversion/remotedeb.html

Tuesday, March 08, 2005

uwoody

I finlay started to understand uwoody provided by
eric anderson. not that i have it working.
I have to download the package debootstrap

given:
devel for this is on a redhat 7.3 machine
yes 7.3 so it would probably work on mandrake
9.x or 10.x or gentoo

tricks to creating a uwoody chroot.

1. find the source pack for debootstrap:
i my case i used:
debootstrap_0.2.45-0.2.tar.gz
un-tar the file in an appropriate area
and inside the directory created
run make and make install.
make install will create a directory called.
/usr/lib/debootstrap/scripts
to this directory you will add the file
uwoody which you have downloaded from:
http://people.debian.org/~andersee/debootstrap/
you will then run the following:
debootstrap --arch i386 uwoody /target http://people.debian.org/~andersee

this will create a directory called target that
should have the basic uclibc debian binaries

i chrooted into the /target directory:
$> chroot /target /bin/bash
and updated the apt system as follows.
1. added the file sources.list directory /etc/apt
and
2. added the line
deb http://people.debian.org/~andersee uwoody main


i wanted to check if the compiler was working correctly
did the following
echo "int main() { return 0; } " > dummy.c
gcc dummy.c
this produced a.out
i ray a.out as
$> a.out
no problems
the did the following
ldd a.out
libc.so.0 => /lib/libc.so.0 (0x40007000)
libintl.so.1 => /usr/lib/libintl.so.1 (0x40053000)
libiconv.so.2 => /usr/lib/libiconv.so.2 (0x40059000)
ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x40000000)

Adding busybox To an existing boot cd

Why would you want todo this?
(long story here is how to do it).

The bootable cd was/is essentially all
binary. I am able to add new things to
it but chaning how the system boot
scripts work would be a long process
I dont wish to undertake.
In a script I added the followning:

#This kernel level module was present and
#did match the hardware I could obtain.
modprobe 3c59x
#Manually configure the network
ifconfig eth0 inet 192.168.0.x netmask 255.255.255.0 broadcast 192.168.0.255 u
#Also manually set up the loopback device
ifconfig lo 127.0.0.1 broadcast 255.0.0.0 up
#These are the busybox based telnet daemon
mkdir /dev/pts
mknod /dev/ptmx c 5 2
mount -t devpts none /dev/pts
#I had to copy the pam directories off of redhat cd
#as the bootable cdrom is redhat based.
#also I had to remove the securytty entry from the
#file login.
ln -s /cdrom/etc/pam.d /etc/pam.d
#next I created a derivated of the busybox
#passwd program that would just change
#passwd to predefined value. this util was called passwd1
/cdrom/busybox/adduser foobar
/cdrom/busybox/passwd1 foobar
/cdrom/busybox/telnetd
#note busybox was compiled static
#a nice feature not dependence on the binaries
#found on the cd.
#copy my entry into passwd file
/cdrom/bin/mini_httpd -u root -d /

Saturday, March 05, 2005

The conundrum.

The conundrum is I simple can't
build something as thorough and
complete as buildroot, and really
don't want to just wanted to build
a bootable cd that had x11 and sdl.
But have said that I like my build
system so i have opted for a trade
off. Use the buildroot system to
make a uclibc chroot and my build
system lives inside that chroot.
I wouldn't have to loose all
settings and file moves and init files
that i had created and after soem
investigation i realized
what i wanted base coreutils less
and so forth could be build
and laid down on what would
become my own rootfile system.

Friday, March 04, 2005

Built XF4.2.0 but ...

Build XFree 4.2.0 but dont jump and down yet.

Actually this isnt XFree 4.2.0 but closer to XFree
4.1.0 or something in between it is the
derivative that comes from uclibc buildroot.
I have modified the host.def file to build
the Xvesa server and is build.
Then I tried running the thing inside of
uclibc root/chroot ... the X11 cross comes
up and so does the herringbone pattern but
the mouse is froze and ctrl+alt+backspace
is frozen, so, i have to hit the power/reset.

Ok how did I get the thing to build? Its more
of question of what I wasnt doing? I wasnt
paying attention to the sed command in the
Makefile script. The
cross.def file contains the locations of the
cross compiler and cross linker
if these are fubar-ed then nothing
will work.

look at cross.def:
/* $XFree86: xc/config/cf/cross.def,v 1.2 2001/03/30 02:15:17 keithp Exp $ */
/*
* This file contains redefinitions of some symbols to enable
* cross compilation: e.g. paths for include files and paths to
* compiler images. It will have to be edited to reflect these
* given your local configuration.
*/
#undef i386Architecture
#define Arm32Architecture

#undef OptimizedCDebugFlags
#define OptimizedCDebugFlags -O2
#define ServerCDebugFlags -O2
#undef StandardDefines
#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
#undef CcCmd
#define StdIncDir REPLACE_STAGING_DIR/include
#define PreIncDir
#undef PostIncDir
#define PostIncDir REPLACE_STAGING_DIR/lib/gcc-lib/arm-linux/3.2/include
#define CcCmd REPLACE_STAGING_DIR/bin/arm-uclibc-gcc
#undef CplusplusCmd
#define HasCplusplus NO
#define CplusplusCmd NO
#define DoRanlibCmd YES
#define RanlibCmd REPLACE_STAGING_DIR/bin/arm-uclibc-ranlib
#undef ExtraLoadFlags
#define ExtraLoadFlags
#define FbNoPixelAddrCode
#undef TermcapLibrary
#define TermcapLibrary NO

#undef LdPostLib
#define LdPostLib
#undef LdCmd
#define LdCmd REPLACE_STAGING_DIR/bin/arm-uclibc-ld

#undef ExtensionOSDefines
#define ExtensionOSDefines

#define ServerXdmcpDefines /**/

#include

REPLACE_STAGING_DIR needs to be sed-ed
with the staging directory
and arm-uclibc- needs to be
replaced with i386-uclibc-linux-gcc

then tada it compiles and builds.
getting it to work is another thing.
my best guess is that i am missing
and entry in the dev filesystem