johnrw
04-09-2008, 06:03 AM
One thing you can do now that Knoppix is new again...
(you will not fail any dependancies when you try, at present)
is to build a debug version of KDE 4.
I had tried this earlier a few months back, and Knoppix 5.1.1 was too old and started failing dependancies... the exact list I can't remember at present. There are many howto's out there... and even on kde's site I found them to be at times even contradictory. I could not find a specific set of instructions that I could call a reference.
I would like to see a vm of a reference platform. I made a 15GB persistent home, a knoppix.img file, and since it is possible to do... I may post a knoppix.img you can just download and begin exploring KDE building.
I won't get into setting up the Knoppix 5.3.1 DVD iso booting except to say I use grub4dos... and it boots the same iso file I downloaded to make the dvd with... using Gilles Van Ruymbeke's minirt_531.gz. Here is my kernel cmdline from the C:\menu.lst file.
ramdisk_size=100000 init=/etc/init knoppix bootfrom=/dev/hda1/KNOPPIX_V5.3.1/knoppix.iso home=/media/hda8/knoppix.img myconfig=/media/hda8 lang=us apm=power-off nomce dma vga=791 loglevel=0 libata.atapi_enabled=1 SELINUX_INIT=NO nmi_watchdog=0 ro ntfs_rw=
Notice the chopped off ntfs_rw= which should have said ntfs_rw=1 but it didn't need the =1 part. But there is a limit to the line length somewhere. I'd think it would be in grub4dos. I had to remove the quiet cheatcode though.
Using kdesvn-build I was able to build (without any fatal errors!) kde4. I have not tried to run it yet... and it may not even run at all. That all depends on what is in the repository at the time you do this. (I have seen suggestions to avoid the early part of the week, as weekend checkins are more likely to break something.) I did mine on monday night.
Here is the main kdesvn-build webpage
http://kdesvn-build.kde.org
Here I grabbed the latest version...
http://websvn.kde.org/trunk/KDE/kdesdk/scripts/kdesvn-build?view=log
Here is what you'll see somewhere close to the top of the page...
(click download, and then save that as ~/kdesvn-build)
Revision 791962 - (view) (download) (annotate) - [select for diffs]
Modified Sun Mar 30 20:48:52 2008 UTC (8 days, 22 hours ago) by dfaure
File length: 199501 byte(s)
Then you'll need a config file. I used the default one provided here.
http://websvn.kde.org/trunk/KDE/kdesdk/scripts/kdesvn-buildrc-sample?view=log
(click download, and then save that as ~/.kdesvn-buildrc)
Next, add a new user named kde-devel by opening a Konsole and entering
sudo useradd -m kde-devel -s /bin/bash
sudo passwd kde-devel
Next, we add this user to the /etc/sudoers which must be done using visudo.
In the same terminal you can do this with sudo visudo
Once inside... cursor down to the bottom of the file... and enter exactly these keystrokes. <> are not literal keystrokes... but editing directives.
:i<press enter>
kde-devel ALL=NOPASSWD: ALL
<press enter>
<press Esc>
:wq<press enter>
Then we edit /etc/group and duplicate this account's rights to be the same as the knoppix account.
Here is my edited /etc/group which you should be able to copy directly.
Ya know... ... ... instead of typing on and on about how to do this... I decided it might be better to just make a knoppix.img you can download... ready to run.
That would be here, http://home.comcast.net/~johnrw/knoppix.img.bz2
I made an image file, and compressed it. It compressed down to 8 MB, from 256 MB.
So for you... you will need to put it on a drive with at least 10 GB free. After you do that, you expand it to it's 250 MB size... then boot Knoppix 5.3.1 without mounting it.
Once you are in Knoppix you open a root terminal... and resize it to 10GB+(mine was 15GB) by using resize2fs.
For example, if you have booted the DVD, and now only have your Windows XP drive C: available... and have put the uncompressed knoppix.img on it as C:\knoppix.img... you would first mount drive c as read/write in the usual manner... and then in the root terminal type:
resize2fs /media/hda1/knoppix.img 10000M
and follow the instructions.
Now you are ready to boot Knoppix 5.3.1 and use this persistent home image to build kde from svn trunk.
You would use the
knoppix home=/media/hda1/knoppix.img 2 cheatcode in the above example.
The 2 means to not go to the kde gui... but instead go to runlevel 2 like booting to Dos.
Once you are in the root console... you should set some passwords up by typing
passwd kde-devel and setting one for the root user as well with just passwd.
Now you can login to kde-devel by typing
su kde-devel
Then you start up kde for your kde-devel user by typing
startx
Once inside kde... opening an ordinary Konsole window and typing
./kdesvn-build and you are off to the races. When it finishes, you will have a few new directories...
~/kdesvn/ and ~/kde and ~/qt4
There are some errors you can expect to see... since you are not using snapshots.
Next I'll try and put some info on how to set this up to use.
http://home.comcast.net/~johnrw/kdesvn-build/snapshot1.png
and more building...
http://home.comcast.net/~johnrw/kdesvn-build/snapshot2.png
and waddya know... it finally finished.
Of course I did this on a slow machine :)
Notice this built and patched a special qt-copy...
http://home.comcast.net/~johnrw/kdesvn-build/snapshot3.png
I did add some Firefox extensions and even installed the Google Toolbar but you will still have to click
I accept...
I also added lmsensors but you will need to run sensors-detect in a terminal... and just keep pressing enter until
you get to the summary... where it tells you what kernel module you need to load before using it. It will offer to write a /etc/sysconfig/lm_sensors which is a .conf file without the .conf name ending. I suggest you let it.
I put a knoppix.sh in the image you can set to your module by editing it as root. Ie,
sudo kwrite /KNOPPIX.IMG/knoppix.sh and change the line that reads MODULE=it87
Once you have the correct lmsensors kernel module loaded, you can use kima to show you how hot your cpu is and if your fans are turning. Since building kde will peg your cpu on 100% for the duration... that is a good thing to know. I included kima's deb file, forgot if I installed it, but you can if I forgot to.
When done building... ~/kde and ~/qt4 contains the binaries...
and both the sources and the build are in ~/kdesvn.
The build will be in ~/kdesvn/build
That's all for now. Now I get to see if this build even runs!
Again that is at http://home.comcast.net/~johnrw/knoppix.img.bz2
Here you will find some interesting stuff but they are not setup to build with this method. Mainly
the sources and the resulting build output will vary. I will post some versions tailored to the locations we are using here.
http://websvn.kde.org/trunk/KDE/kdesdk/scripts/
http://techbase.kde.org/index.php?title=Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc
http://techbase.kde.org/index.php?title=Getting_Started/Build/KDE4/Prerequisites
yup... it runs. Here I have dolphin showing hidden dirs in the left pane.
http://home.comcast.net/~johnrw/kdesvn-build/snapshot4.png
and about dolphin
http://home.comcast.net/~johnrw/kdesvn-build/snapshot5.png
I'll post my .bashrc next.
(you will not fail any dependancies when you try, at present)
is to build a debug version of KDE 4.
I had tried this earlier a few months back, and Knoppix 5.1.1 was too old and started failing dependancies... the exact list I can't remember at present. There are many howto's out there... and even on kde's site I found them to be at times even contradictory. I could not find a specific set of instructions that I could call a reference.
I would like to see a vm of a reference platform. I made a 15GB persistent home, a knoppix.img file, and since it is possible to do... I may post a knoppix.img you can just download and begin exploring KDE building.
I won't get into setting up the Knoppix 5.3.1 DVD iso booting except to say I use grub4dos... and it boots the same iso file I downloaded to make the dvd with... using Gilles Van Ruymbeke's minirt_531.gz. Here is my kernel cmdline from the C:\menu.lst file.
ramdisk_size=100000 init=/etc/init knoppix bootfrom=/dev/hda1/KNOPPIX_V5.3.1/knoppix.iso home=/media/hda8/knoppix.img myconfig=/media/hda8 lang=us apm=power-off nomce dma vga=791 loglevel=0 libata.atapi_enabled=1 SELINUX_INIT=NO nmi_watchdog=0 ro ntfs_rw=
Notice the chopped off ntfs_rw= which should have said ntfs_rw=1 but it didn't need the =1 part. But there is a limit to the line length somewhere. I'd think it would be in grub4dos. I had to remove the quiet cheatcode though.
Using kdesvn-build I was able to build (without any fatal errors!) kde4. I have not tried to run it yet... and it may not even run at all. That all depends on what is in the repository at the time you do this. (I have seen suggestions to avoid the early part of the week, as weekend checkins are more likely to break something.) I did mine on monday night.
Here is the main kdesvn-build webpage
http://kdesvn-build.kde.org
Here I grabbed the latest version...
http://websvn.kde.org/trunk/KDE/kdesdk/scripts/kdesvn-build?view=log
Here is what you'll see somewhere close to the top of the page...
(click download, and then save that as ~/kdesvn-build)
Revision 791962 - (view) (download) (annotate) - [select for diffs]
Modified Sun Mar 30 20:48:52 2008 UTC (8 days, 22 hours ago) by dfaure
File length: 199501 byte(s)
Then you'll need a config file. I used the default one provided here.
http://websvn.kde.org/trunk/KDE/kdesdk/scripts/kdesvn-buildrc-sample?view=log
(click download, and then save that as ~/.kdesvn-buildrc)
Next, add a new user named kde-devel by opening a Konsole and entering
sudo useradd -m kde-devel -s /bin/bash
sudo passwd kde-devel
Next, we add this user to the /etc/sudoers which must be done using visudo.
In the same terminal you can do this with sudo visudo
Once inside... cursor down to the bottom of the file... and enter exactly these keystrokes. <> are not literal keystrokes... but editing directives.
:i<press enter>
kde-devel ALL=NOPASSWD: ALL
<press enter>
<press Esc>
:wq<press enter>
Then we edit /etc/group and duplicate this account's rights to be the same as the knoppix account.
Here is my edited /etc/group which you should be able to copy directly.
Ya know... ... ... instead of typing on and on about how to do this... I decided it might be better to just make a knoppix.img you can download... ready to run.
That would be here, http://home.comcast.net/~johnrw/knoppix.img.bz2
I made an image file, and compressed it. It compressed down to 8 MB, from 256 MB.
So for you... you will need to put it on a drive with at least 10 GB free. After you do that, you expand it to it's 250 MB size... then boot Knoppix 5.3.1 without mounting it.
Once you are in Knoppix you open a root terminal... and resize it to 10GB+(mine was 15GB) by using resize2fs.
For example, if you have booted the DVD, and now only have your Windows XP drive C: available... and have put the uncompressed knoppix.img on it as C:\knoppix.img... you would first mount drive c as read/write in the usual manner... and then in the root terminal type:
resize2fs /media/hda1/knoppix.img 10000M
and follow the instructions.
Now you are ready to boot Knoppix 5.3.1 and use this persistent home image to build kde from svn trunk.
You would use the
knoppix home=/media/hda1/knoppix.img 2 cheatcode in the above example.
The 2 means to not go to the kde gui... but instead go to runlevel 2 like booting to Dos.
Once you are in the root console... you should set some passwords up by typing
passwd kde-devel and setting one for the root user as well with just passwd.
Now you can login to kde-devel by typing
su kde-devel
Then you start up kde for your kde-devel user by typing
startx
Once inside kde... opening an ordinary Konsole window and typing
./kdesvn-build and you are off to the races. When it finishes, you will have a few new directories...
~/kdesvn/ and ~/kde and ~/qt4
There are some errors you can expect to see... since you are not using snapshots.
Next I'll try and put some info on how to set this up to use.
http://home.comcast.net/~johnrw/kdesvn-build/snapshot1.png
and more building...
http://home.comcast.net/~johnrw/kdesvn-build/snapshot2.png
and waddya know... it finally finished.
Of course I did this on a slow machine :)
Notice this built and patched a special qt-copy...
http://home.comcast.net/~johnrw/kdesvn-build/snapshot3.png
I did add some Firefox extensions and even installed the Google Toolbar but you will still have to click
I accept...
I also added lmsensors but you will need to run sensors-detect in a terminal... and just keep pressing enter until
you get to the summary... where it tells you what kernel module you need to load before using it. It will offer to write a /etc/sysconfig/lm_sensors which is a .conf file without the .conf name ending. I suggest you let it.
I put a knoppix.sh in the image you can set to your module by editing it as root. Ie,
sudo kwrite /KNOPPIX.IMG/knoppix.sh and change the line that reads MODULE=it87
Once you have the correct lmsensors kernel module loaded, you can use kima to show you how hot your cpu is and if your fans are turning. Since building kde will peg your cpu on 100% for the duration... that is a good thing to know. I included kima's deb file, forgot if I installed it, but you can if I forgot to.
When done building... ~/kde and ~/qt4 contains the binaries...
and both the sources and the build are in ~/kdesvn.
The build will be in ~/kdesvn/build
That's all for now. Now I get to see if this build even runs!
Again that is at http://home.comcast.net/~johnrw/knoppix.img.bz2
Here you will find some interesting stuff but they are not setup to build with this method. Mainly
the sources and the resulting build output will vary. I will post some versions tailored to the locations we are using here.
http://websvn.kde.org/trunk/KDE/kdesdk/scripts/
http://techbase.kde.org/index.php?title=Getting_Started/Increased_Productivity_in_KDE4_with_Scripts/.bashrc
http://techbase.kde.org/index.php?title=Getting_Started/Build/KDE4/Prerequisites
yup... it runs. Here I have dolphin showing hidden dirs in the left pane.
http://home.comcast.net/~johnrw/kdesvn-build/snapshot4.png
and about dolphin
http://home.comcast.net/~johnrw/kdesvn-build/snapshot5.png
I'll post my .bashrc next.