| 1 |
AUTHOR: Randy Blythe [rblythe] <rblythe714 at comcast dot net> |
|---|
| 2 |
|
|---|
| 3 |
DATE: 2006-08-16 |
|---|
| 4 |
|
|---|
| 5 |
LICENSE: GNU Free Documentation License v 1.2 |
|---|
| 6 |
|
|---|
| 7 |
SYNOPSIS: Building BLFS from newly installed LFS system |
|---|
| 8 |
|
|---|
| 9 |
PRIMARY URI: none |
|---|
| 10 |
|
|---|
| 11 |
DESCRIPTION: |
|---|
| 12 |
This hint is designed to detail a way to build your BLFS |
|---|
| 13 |
system from within your newly created LFS system. It is a help to |
|---|
| 14 |
lessen and possibly eliminate typographical errors while building the |
|---|
| 15 |
system. |
|---|
| 16 |
|
|---|
| 17 |
This hint was used by me to build BLFS-SVN from within LFS-SVN. |
|---|
| 18 |
|
|---|
| 19 |
ATTACHMENTS: |
|---|
| 20 |
None |
|---|
| 21 |
|
|---|
| 22 |
PREREQUISITES: |
|---|
| 23 |
This hint requires that you have a working LFS or LFS-SVN build |
|---|
| 24 |
completed and able to boot successfully. |
|---|
| 25 |
|
|---|
| 26 |
You have already set up your (unpriviledged) user account |
|---|
| 27 |
|
|---|
| 28 |
Working Internet connection (able to ping your ISP or favorite website |
|---|
| 29 |
successfully) |
|---|
| 30 |
|
|---|
| 31 |
Required packages (these should be downloaded BEFORE you start building |
|---|
| 32 |
your new BLFS system): |
|---|
| 33 |
* unhtml-2.3.8.tar.gz - http://linux.maruhn.com/sec/unhtml.html |
|---|
| 34 |
(also located in the debian repositories) |
|---|
| 35 |
|
|---|
| 36 |
* BLFS{-SVN} bootscripts |
|---|
| 37 |
|
|---|
| 38 |
* GPM (see BLFS{-SVN} for installation instructions) |
|---|
| 39 |
(this is vital for your build to go smoothly) |
|---|
| 40 |
|
|---|
| 41 |
For BLFS (standard build) - |
|---|
| 42 |
* BLFS book (HTML Format, multiple pages) |
|---|
| 43 |
(see download section at |
|---|
| 44 |
http://www.linuxfromscratch.org/blfs/download.html) |
|---|
| 45 |
|
|---|
| 46 |
For BLFS-SVN |
|---|
| 47 |
* blfs-book-cvs-html-*.tar.bz2 (see download section at |
|---|
| 48 |
http://www.linuxfromscratch.org/blfs/downloads/svn/) |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
Suggested Packages: |
|---|
| 52 |
During non-X Window phase of the build - |
|---|
| 53 |
|
|---|
| 54 |
* Screen (see BLFS{-SVN} for installation instructions) |
|---|
| 55 |
|
|---|
| 56 |
* Lynx or your favorite text web browser |
|---|
| 57 |
(see BLFS{-SVN} for installation instructions) |
|---|
| 58 |
|
|---|
| 59 |
* Vi(m) installed during LFS{-SVN}, not linked to the X window |
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 |
HINT: |
|---|
| 63 |
|
|---|
| 64 |
* Boot into your newly installed LFS{-SVN} system |
|---|
| 65 |
|
|---|
| 66 |
* unpack unhtml |
|---|
| 67 |
|
|---|
| 68 |
* edit the Makefile (optional) - The make file puts everything |
|---|
| 69 |
(executable, man pages) in places that may not be consistent with your |
|---|
| 70 |
system. Change it accordingly. I did not do this because I didn't |
|---|
| 71 |
realize this until after it was installed, but the install portion of the |
|---|
| 72 |
Makefile copies what is compiled to directories specified in the |
|---|
| 73 |
Makefile and changing those destinations should not affect the |
|---|
| 74 |
performance of the program. |
|---|
| 75 |
|
|---|
| 76 |
* install unhtml (as root): make && make install |
|---|
| 77 |
|
|---|
| 78 |
* install GPM-*, GPM bootscript, configure the mouse, and start the |
|---|
| 79 |
daemon, according to the BLFS{-SVN} instructions |
|---|
| 80 |
|
|---|
| 81 |
* create a directory (i.e. $HOME/blfsbook) and unpack the BLFS book |
|---|
| 82 |
tar.bz2 into it |
|---|
| 83 |
|
|---|
| 84 |
* create a directory (i.e. $HOME/blfsbook-text) to hold the text file |
|---|
| 85 |
versions of each BLFS html page |
|---|
| 86 |
|
|---|
| 87 |
* copy and edit the script (see below) accordingly. chmod +x script and |
|---|
| 88 |
execute (this will make a text page for each BLFS html page) |
|---|
| 89 |
|
|---|
| 90 |
Here's the beauty of this hint. From here to the end of your system |
|---|
| 91 |
installation, you can simply use vi(m) to read each one of your newly |
|---|
| 92 |
created .txt files for each package of the complete BLFS{-SVN} install |
|---|
| 93 |
and use your mouse to copy/paste build instructiona accordingly. You |
|---|
| 94 |
can also edit the instructions as necessary for your specific build |
|---|
| 95 |
parameters (flags, optimizations, etc.) and check them before copy/paste |
|---|
| 96 |
to lessen (if not eliminate) your typing errors. |
|---|
| 97 |
|
|---|
| 98 |
* install Lynx or your favorite text based web browser according to the |
|---|
| 99 |
BLFS{-SVN} instructions. This will be needed to access this hint |
|---|
| 100 |
online as well other BLFS instructions or other pages of interest. |
|---|
| 101 |
Also lynx can be used to save html pages in text format so you can use |
|---|
| 102 |
the copy/paste method to install programs outside of BLFS{-SVN}. |
|---|
| 103 |
|
|---|
| 104 |
* install other Suggested packages as needed. |
|---|
| 105 |
|
|---|
| 106 |
* use Lynx or your favorite text based web browser to download other |
|---|
| 107 |
programs and patches according to your needs. |
|---|
| 108 |
|
|---|
| 109 |
* Enjoy your (possibly error free) build of BLFS{-SVN}!!! |
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 |
copy this and edit according to your needs: |
|---|
| 113 |
|
|---|
| 114 |
cat > $HOME/convert.sh << "EOF" |
|---|
| 115 |
#!/bin/bash |
|---|
| 116 |
# Begin convert.sh |
|---|
| 117 |
# Created by rblythe <Randy Blythe> <rblythe714 at comcast dot net> |
|---|
| 118 |
# Note: |
|---|
| 119 |
# images and stylesheets directories ommitted because they |
|---|
| 120 |
# do not have any HTML pages within them. |
|---|
| 121 |
|
|---|
| 122 |
cd $HOME/blfsbook |
|---|
| 123 |
for DIR in "appendices" "basicnet" "connect" "general" "gnome" \ |
|---|
| 124 |
"introduction" "kde" "multimedia" "postlfs" \ |
|---|
| 125 |
"preface" "pst" "server" "x" "xsoft" |
|---|
| 126 |
do |
|---|
| 127 |
cd $DIR |
|---|
| 128 |
for i in $(ls *.html); do |
|---|
| 129 |
export v=$(echo $i | sed 's/.html/.txt/') |
|---|
| 130 |
# if you did not edit the Makefile then change this to |
|---|
| 131 |
# /usr/local/bin/unhtml $i > $HOME/blfsbook-text/$v |
|---|
| 132 |
/usr/bin/unhtml $i > $HOME/blfsbook-text/$v |
|---|
| 133 |
done |
|---|
| 134 |
cd .. |
|---|
| 135 |
done |
|---|
| 136 |
|
|---|
| 137 |
# End of convert.sh |
|---|
| 138 |
EOF |
|---|
| 139 |
|
|---|
| 140 |
|
|---|
| 141 |
And make it executable: chmod +x $HOME/convert.sh |
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 |
How I used the information in this hint: |
|---|
| 145 |
|
|---|
| 146 |
I created three (3) screens (see man screen for details) |
|---|
| 147 |
screen 0 was for my build. screen 1 was for my txt files. Screen 2 was |
|---|
| 148 |
for lynx (in case I needed to get to the internet). I would open a file in |
|---|
| 149 |
screen 1 and copy/paste the supplied build instructions to the command |
|---|
| 150 |
line in screen 0 and the system did the rest. I did this until X was built |
|---|
| 151 |
and then I used multiple xterms instead of screen and repeated the process. |
|---|
| 152 |
Screen 2 was used to download some of the optional dependencies as |
|---|
| 153 |
needed (wanted). |
|---|
| 154 |
|
|---|
| 155 |
It should be noted that some html files (and their txt equivalents) are not |
|---|
| 156 |
named after the package, i.e. the file known as printing.html (which |
|---|
| 157 |
will be converted to printing.txt if using the above script) is actually |
|---|
| 158 |
the page for CUPS. |
|---|
| 159 |
|
|---|
| 160 |
unhtml can also be used from the command line for other html files that |
|---|
| 161 |
you want to convert to txt by simply issuing: |
|---|
| 162 |
unhtml nameoffile.html > anynameyouwant.txt |
|---|
| 163 |
Also see man unhtml for more details. |
|---|
| 164 |
|
|---|
| 165 |
The only drawback to this method is the large amounts of whitespace that |
|---|
| 166 |
are created in the converted text file. I am not sure why that happens, |
|---|
| 167 |
but you files will have whitespace. |
|---|
| 168 |
|
|---|
| 169 |
|
|---|
| 170 |
ACKNOWLEDGEMENTS: |
|---|
| 171 |
|
|---|
| 172 |
Everyone on the LFS/BLFS mailing list(s) who encouraged me to do a |
|---|
| 173 |
little research and try to find the answers myself before performing |
|---|
| 174 |
"fishing expeditions" on the list(s). :) |
|---|
| 175 |
|
|---|
| 176 |
Kevin Swan <013639s at dragon dot acadiau at ca> for creating unhtml |
|---|
| 177 |
|
|---|
| 178 |
|
|---|
| 179 |
CHANGELOG: |
|---|
| 180 |
[2006-08-16] |
|---|
| 181 |
* Initial hint |
|---|