File: TWDT.html

package info (click to toggle)
lg-issue75 2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,100 kB
  • ctags: 212
  • sloc: perl: 228; makefile: 62; sh: 34
file content (6437 lines) | stat: -rw-r--r-- 256,278 bytes parent folder | download | duplicates (2)
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> Linux Gazette Table of Contents LG #75</TITLE>
</HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000" >
<center>
<!-- A HREF="http://www.linuxgazette.com/">
<H1><IMG SRC="../gx/newlogo.jpg" ALT="LINUX GAZETTE" border="0"></H1></A> --> 
<A HREF="http://www.linuxgazette.com/">
<H1><IMG ALT="LINUX GAZETTE" SRC="../gx/lglogo.png" 
	WIDTH="600" HEIGHT="124" border="0"></H1></A> 
<H2>February 2002, Issue 75 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Published by <I>Linux Journal</I></H2> 

<A HREF=../index.html>Front Page</A> &nbsp;|&nbsp;
<A HREF=../index.html>Back Issues</A> &nbsp;|&nbsp;
<A HREF=../faq/index.html>FAQ</A> &nbsp;|&nbsp;
<A HREF=../mirrors.html>Mirrors</A> &nbsp;|&nbsp;
<A HREF="http://www.linuxgazette.com/search.html">Search (www.linuxgazette.com)</A> 
<!-- *** BEGIN mirror site search link *** -->
<!-- &nbsp; <A HREF="http://www.linuxgazette.com/search.html">(SITE.COM
mirror)</A> -->
<!-- *** END mirror site search link *** -->

</CENTER>

<HR NOSHADE>
<!--=================================================================-->

<H1><font color="#BB0000">Table of Contents:</font></H1>




<!-- *** BEGIN toc *** -->
<UL>
	<LI>  <a HREF="lg_mail.html">The MailBag</A> 
	<LI>  <a HREF="lg_tips.html">More 2-Cent Tips</A> 
	<LI>  <a HREF="lg_answer.html">The Answer Gang</A> 
	<LI>  <a HREF="lg_bytes.html">News Bytes</A> 
	<LI>  <a HREF="jenkins.html">Secure Printing with PGP</A> , <EM>by Graham Jenkins</EM>
	<LI>  <a HREF="jones.html">A Pioneer for a New Century -- Alan Turing, part 1</A> , <EM>by G James Jones</EM>
	<LI>  <a HREF="maiorano.html">Installing and using AIDE</A> , <EM>by Ariel Maiorano</EM>
	<LI>  <a HREF="nielsen.html">GPL or BSD? Yes</A> , <EM>by Mark Nielsen</EM>
	<LI>  <a HREF="orr.html">The Foolish Things We Do With Our Computers</A> , <EM>by Mike "Iron" Orr</EM>
	<LI>  <a HREF="peda.html">Simple Package Management With Stow</A> , <EM>by Allan Peda</EM>
	<LI>  <a HREF="piszcz.html">Why I wrote Install Kernel (ik) and How It Works</A> , <EM>by Justin Piszcz</EM>
	<LI>  <a HREF="spiel.html">Writing Documentation, Part III: DocBook/XML</A> , <EM>by Christoph Spiel</EM>
	<LI>  <a HREF="williamson.html">The Adventures of Little Linus In GNU/Wonderland</A> , <EM>by D Clyde Williamson</EM>
	<LI>  <a HREF="zhaoway.html">Modest Home on the Web</A> , <EM>by zhaoway</EM>
	<LI>  <a HREF="lg_backpage.html">The Back Page</A> 
</UL>

<!-- *** END toc *** -->




<HR NOSHADE>
<!--=================================================================-->

<H3 ALIGN="center"><EM>Linux Gazette</EM> Staff and The Answer Gang</H3>
<BLOCKQUOTE>
<STRONG>Editor:</STRONG> Michael Orr<BR>
<STRONG>Technical Editor:</STRONG> Heather Stern<BR>
<STRONG>Senior Contributing Editor:</STRONG> Jim Dennis<BR>
<STRONG>Contributing Editors:</STRONG>
Ben Okopnik, Dan Wilder, Don Marti
</BLOCKQUOTE>

<HR NOSHADE>
<!--=================================================================-->

<A HREF="issue75.txt.gz">TWDT 1 (gzipped text file)</A><BR>
<A HREF="issue75.html">TWDT 2 (HTML file)</A><BR>
are files containing the entire issue: one in text format, one in HTML. 
They are provided 
strictly as a way to save the contents as one file for later printing in
the format of your choice; 
there is no guarantee of working links in the HTML version.
<HR NOSHADE>
<!--=================================================================-->

<center>
<I>Linux Gazette</I><img alt="[tm]" src="../gx/tm.gif">, 
<A HREF="http://www.linuxgazette.com/">http://www.linuxgazette.com/</A><BR> 
This page maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com"> gazette@ssc.com</A>
<P> 
<H5>Copyright &copy; 1996-2002 Specialized Systems Consultants, Inc.</H5>
</center>

<HR NOSHADE>
<!--=================================================================-->

<a name=""></a>
<P> <hr> <P>
<!-- =================================================================== -->
<center><H3><font color="maroon"></font></H3></center>
<P> <HR> <P>
<!--====================================================================-->

<!-- BEGIN  -->

<UL>
<!-- index_text begins -->
<li><A HREF="#/1"
	><strong>Comments on: Play with the Lovely NetCat</strong></a>
<li><A HREF="#/3"
	><strong>LLG #74 Mailbag: Desktop Support</strong></a>
<li><A HREF="#/5"
	><strong>Good attitude!</strong></a>
<li><A HREF="#/6"
	><strong>Mountpoint permissions</strong></a>
<li><A HREF="#/8"
	><strong>Sorry / Saludos</strong></a>
<li><A HREF="#/10"
	><strong>attn: Ben Okopnik et al</strong></a>
<li><A HREF="#/11"
	><strong>Tux' Gender</strong></a>
<!-- index_text ends -->
</UL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Comments on: Play with the lovely netcat</FONT></H3>
Fri, 11 Jan 2002 19:11:53 +0800
<BR>zhaoway (<a href="mailto:gazette@ssc.com?cc=zw@debian.org"
	>zw from debian.org</a>)

<P>I've forwarded these comments about my Jan article in Linux Gazette: 
<em>Play with the lovely netcat</em>. 
Could you post it in your Mailbag? Thanks!
</P>
<P>
zw
</P>
<hr width="40%" align="center">

<h3>The purpose of yes</h3>
<p><strong>Date:</strong> Thu, 3 Jan 2002 16:05:19 -0700 (MST)
<br><strong>From:</strong> Bruno Melli &lt;<A HREF="mailto:gazette@ssc.com?cc=bruno@fc.hp.com?cc=zw@debian.org"
	>bruno from fc.hp.com</A>&gt;
</P>
<P>
Hi zhaoway,
</P>
<P>
I was enjoying your column in the latest Linux Gazette and came upon
your description of <TT>/usr/bin/yes</TT>. I'm by no mean a Unix historian, but
from what I understand the yes command had a very basic purpose:
</P>
<P><BLOCKQuote>
The original rm command didn't have a -f option.
So if you did
<tt>rm -r /some/dir</TT>  (or rm * where the current dir had lots of files)
and if the permissions weren't set right you ended up having to
type in a bunch of 'y' because rm asked you if you wanted to overwrite
the permission.
</BLOCKQuote></P>
<P>
Try it:</p>
<pre>
touch /tmp/haha
chmod 000 /tmp/haha
rm /tmp/haha
</Pre>
<P>
Imagine how annoying that becomes if you tried to rm hundreds of files
at once.
</P>
<P>
The solution, if you didn't have access to the rm source, (or took the
basic philosophy of Unix to the extreme):
</P>
<P><CODE>
yes | rm -r
</CODE></P>
<P>
bruno.
</P>

<P><HR WIDTH="40%" ALIGN="center"></A> <P>
<h3>Author of Netcat</h3>
<p><strong>Date:</strong> Wed, 2 Jan 2002 16:21:27 -0800
<br><strong>From:</strong> "Golden_Eternity" 
	&lt;<A HREF="mailto:gazette@ssc.com?cc=zw@debian.org?cc=bhodi_jabir@yahoo.com"
	>bhodi_jabir from yahoo.com</A>&gt;
</P>
<P>
In your article "Play with the Lovely Netcat: Reinvent <TT>/usr/bin/yes</TT>" you
comment on the anonymity of the author of Netcat.
</P>
<P>
I could be wrong, but I'm fairly certain that the author is Hobbit of the
l0pht (currently @stake). There's a Win32 version by Chris Wysopal, as well.
</P>
<P>
<A HREF="http://www.atstake.com/research/tools/index.html#network_utilities"
	>http://www.atstake.com/research/tools/index.html#network_utilities</A>
</P>

<!-- end 2 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="/3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">LG #74 Mailbag: Desktop support</FONT></H3>

<p>We got two messages on this topic.</p>

<P> <HR WIDTH="40%" ALIGN="center"> <P>
<H3>pls pass this onto Dennis Field - his email doesn't work</H3>
<p><strong>Date:</strong> Fri, 28 Dec 2001 20:23:50 +0000
<BR>Luke Worthy (<a href="mailto:gazette@ssc.com?cc=lukew@linuxmail.org">lukew from linuxmail.org</a>)

<P>
re: Winning the Battle for the Desktop
</P>
<P>
Dude - quit you're Linux laptop whining...heh - jk 
<IMG SRC="../gx/dennis/smily.gif" ALT=";)" 
		height="24" width="20" align="middle">
</P>
<P>
<A HREF="http://www.linux-laptop.net"
	>http://www.linux-laptop.net</A>
</P>
<P>
and btw: try Mandrake, it has excellent PnP - they at least have a chat-style site for support, and it's all pretty good - just make sure you're winmodem is supported:
</P>
<P><BLOCKQuote>
<A HREF="http://www.linmodems.org"
	>http://www.linmodems.org</A>
</BLOCKQuote></P>
<P>
That's usually the most important thing.
</P>
<P>
Luke
</P>


<!-- end 9 -->
<hr width="40%" align="center">
<h3>
Regarding all these comments about desktop support ---
</h3>
<p><strong>Date:</strong> Thu, 17 Jan 2002 02:54:19 -0800
<BR>Iron (<a href="mailto:gazette@ssc.com">LG Editor</a>)
</p>

<P>
There are two major classes of desktop: home and office.  The former is
novices and hobbyists (who help the novices).  The latter has help desks.
</P>
<P>
Linux's economics have little chance of winning over novice desktops.
That's because the cost of tech support for the few is borne by everyone
who buys the software.  Thus, a $50 package can afford to bear a 15 minute
tech support phone call, and still turn a profit.
</p>
<em>
<P>
Actually, they cannot.  The retailer and distributor will take 20-50% off
the top.  That leaves $25.  Even with low-paid support staff, a 15-minute
call can't cost less than $5 unless it's a simple answer (in which case
the call would have taken one minute) and all the infrastructure costs
to main the help desk and its resources are externalized as overhead.
If they sell one copy, they would not have enough profit to take the call,
unless the company was tiny and had a tiny customer base (in which case
the customer-service staff or other staff would double as tech-support
staff, so they would have to be employed anyway).
</P>
<P>
If they sell a hundred copies (or whatever the number is), they can take
that 15-minute call.  If the person calls back, they will have lost all
of their profit on those hundred copies.  If another of those hundred
customers also calls in, the company will lose money.
</P>
<P>
That's why unlimited free tech support has disappeared, why limited
free tech support has long been in danger, and why so many companies have
put their knowledge bases online and run product newsgroups.  It's much
cheaper to have support staff monitor a newsgroup two hours a day than to
wait by the phone, in terms of the number of customers that will be helped
during that time, because others with the same question (or who may have the
same question in the future), will see the answer.  Actually, that's how The
Answer Gang works too....
</P>
<P>
There are exceptions.  The author of MetaKit
(<A HREF="http://http"
	>http://http</A>://www.equi4.com/metakit/index.html), a non-SQL database server,
offered unlimited free technical support, although I assume it was e-mail
support rather than phone support.  He did it because he wanted to hear
how clients were using the product and what kinds of problems they encountered:
he considered that his payment because it helped him improve the product.
I'm not sure whether he still offers this--the web page now points users with
questions to a mailing list.  But there's obviously an upper limit on the number
of customers you can offer "free unlimited support" to.
</P>
</em>
<p>
  Linux is complex enough
that the price really needs to be higher to support all the included
software.
</P>
<em>
<BR>John Kawakami (<a href="mailto:gazette@ssc.com?cc=johnkk@woodstock.com">johnk from woodstock.com</a>)
<P>
True, although this is more a responsibility of the distributions that market
to newbies than a responsibility of the Linux community as a whole.
</P></em>
<P>
On the other hand, Linux could do okay in the corporate desktop, where
in-house helpdesks keep people away from the "free" tech support you get
from the vendors.  (It's not free if you're paying someone to wait on tech
support.)  The simpler Linux apps are easier to "fix" when errant users
make mistakes, and with VNC, the service can be done remotely.  Plus,
overall stability pays off with fewer internal support staff.
</P>
<P>
----
John Kawakami
</P>

<em>
<P>
If the in-house help desks know Linux.  Often, the only people who know Linux
are the IT staff who run the servers.  -- Iron
</P></em>

<!-- end 4 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="/5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Good attitude!</FONT></H3>
Tue, 1 Jan 2002 14:50:04 -0500
<BR>mike (<a href="mailto:gazette@ssc.com">mike from toadwart.darktech.org</a>)
<BR>linux-questions-only (linux-questions-only@ssc.com)

<p>
Regarding: LG 74, 2c Tips #26</p>
<P>
I really like the attitude expressed by the whole answer gang, and a subtle rtfm after the
question is answered is a good thing, I think. Before the answer it's a provocation, afterwards it
becomes good advice.
Happy New Year,
</P>
<P>
Mike List
</P>

<!-- sig -->


<!-- end 5 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="/6"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Mountpoint permissions</FONT></H3>
Thu, 03 Jan 2002 21:42:34 -0500
<BR>Rick Holbert (<a href="mailto:gazette@ssc.com?cc=holbert.13@osu.edu">holbert.13 from osu.edu</a>)

<P>
Use chown, chgrp and chmod to change the owner, group and permissions on
the mount point.
</P>

<em>
<P>
Err, no. The querent actually stated that he tried those; I'm willing to
believe him (the same situation obtains when you mount a VFAT partition;
the owner/perms of the mount point are irrelevant.) I don't have a Samba
setup at hand right now, and it's been a while since I had to do one, but
I'm pretty certain that Mike Martin's suggestion - setting the "uid/gid"
parameters in the conffile - is the right thing to do. -- Ben
</P>
</em>

<!-- end 7 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="/8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Sorry / Saludos</FONT></H3>
Tue, 8 Jan 2002 08:44:56 +0100
<BR>Andres Legarra (<a href="mailto:gazette@ssc.com?cc=alegarra@ikt.es">alegarra from ikt.es</a>)

<P>
Perdon!!
</p>
<p>
Me he confundido al pinchar el mensaje que queria responder.
</p<p>
Sorry, I mispelled when I picked the message to reply (This awful M$ Outllok
Express...)
By the way, I found some things on Linux Gazette very useful.
<br>Congratulations
</P>
<P>
Usted escribe un buen espa&ntilde;ol!!
<br>Saludos
</P>
<P>
Andres Legarra Albizu
</P>


<!-- end 8 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="/10"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">attn: Ben Okopnik et al</FONT></H3>
Fri, 11 Jan 2002 22:33:00 -0800 (PST)
<BR>Mather Cotton (<a href="mailto:gazette@ssc.com?cc=mathercotton@yahoo.com">mathercotton from yahoo.com</a>)

<P>
<A HREF="../issue63/okopnik.html"
	>http://www.linuxgazette.com/issue63/okopnik.html</A>
</P>
<P>
That url saved my ass.  Thank you so much!
</P>
<P>
Cotton
</P>

<!-- end 10 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="/11"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Tux' Gender</FONT></H3>

<p>We got two messages on this topic.</p>

<hr width="40%" align="center">
<h3>re: Lady Penguins</h3>
<p><strong>Date:</strong> Wed, 02 Jan 2002 04:50:22 -0500
<BR>Rachel Rawlings (<a href="mailto:gazette@ssc.com?cc=rrawlingsw@nyc.rr.com">rrawlingsw from nyc.rr.com</a>)
</p>

<P><em><font color="navy">
That might refer to Linus' original comment that penguins are happy
because they have just stuffed themselves full of herring or have been
hanging out with lady penguins. We only <strong>/know/</strong> that Tux is stuffed full
of herring, but we can assume Tux hangs out with lady penguins. -- Heather
</font></em></P>
<P>
Which actually doesn't get say definitively whether Tux is male. Tux
could hang out with lady penguins cf. Marlena Dietrich, or be a
high-class drag king. 
<img src="../gx/dennis/smily.gif" alt=";&gt;" align="top">
</P>
<P>
However, speaking as a dyke with a largish stuffed animal collection
(one of whom is a female Peter Rabbit named Katja) my Tux is male. Other
users' Tuxen may vary according to the needs of the user, much like
their kernel configurations.
</P>

<em>
<P>
Interesting.  I wonder if Eric Raymond's enhanced kernel configurator
will have a question for which sex your kernel should be built as.  -- Mike
</P></em>

<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<HR WIDTH="40%" ALIGN="center">
<h3>All the Girls like him</h3>
<p><strong>Date:</strong> Fri, 18 Jan 2002 11:26:17 +0100
<BR>patrick.op.de.beeck (<a href="mailto:gazette@ssc.com?cc=patrick.op.de.beeck@belgacom.be">patrick.op.de.beeck from belgacom.be</a>)
</p>

<p><em>
But, we couldn't publish his very cute note because it was marked confidential.  Sorry folks! -- Heather</em></p>


<!-- end 13 -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
	of <I>Linux Gazette</I> 
<a href="http://www.linuxgazette.com/copying.html"
	>Copyright &copy;</a> 2002
<BR>Published in issue 75 of <I>Linux Gazette</I> February 2002</H5>
<H6 ALIGN="center">HTML script maintained by
	<A HREF="mailto:star@starshine.org">Heather Stern</a> of
	Starshine Technical Services,
	<A HREF="http://www.starshine.org/">http://www.starshine.org/</A> 
</H6>
<!-- *** END copyright *** -->
<center>
<H1><A NAME="tips"><IMG ALIGN=MIDDLE ALT="" SRC="../gx/twocent.jpg">
More 2&cent; Tips!</A></H1> <BR>
<!-- BEGIN tips -->

Send Linux Tips and Tricks to <A HREF="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</A></center>
</center>
<UL>
<!-- index_text begins -->
<li><A HREF="#tips/1"
	><strong>pseudo-chroot</strong></a>
<li><A HREF="#tips/2"
	><strong>See LILO only when you need it</strong></a>
<li><A HREF="#tips/3"
	><strong>Active Directory...</strong></a>
<li><A HREF="#tips/4"
	><strong>CSS2? Try XML and its kin instead</strong></a>
<li><A HREF="#tips/5"
	><strong>Linux with win2000</strong></a>
<li><A HREF="#tips/6"
	><strong>Cable Modem Setup</strong></a>
<li><A HREF="#tips/8"
	><strong>read a timestamp... the EASY way</strong></a>
<li><A HREF="#tips/11"
	><strong>How to manually label a tape in linux</strong></a>
<li><A HREF="#tips/14"
	><strong>Problem faced while using script to backup</strong></a>
<li><A HREF="#tips/15"
	><strong>Posters for [LG 72] help wanted #7</strong></a>
<!-- index_text ends -->
</UL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">pseudo-chroot</FONT></H3>
Fri, 4 Jan 2002 09:34:18 -0500
<BR>trevor (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%231%20pseudo%20chroot">tlist from vtnet.ca</a>)

<P>
hi,
</P>
<P>
in issue 74 there's a question from Faber Fedor asking about how to
setup an environment so that a user can't wander from their home
directory.
</P>
<P>
i believe the person asking the question was looking for something
along the lines of a restricted shell. tell the person asking the
question to look at the "-r" option to bash, smrsh, and/or do a google
search for "restricted shell".
</P>
<P>
best regards,
<br>trevor
</P>


<!-- end 1 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">See LILO only when you need it</FONT></H3>
Fri, 04 Jan 2002 13:21:36 -0800
<BR>John R. Jones (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%232%20lilo%20when%20needed">jonejr from gat.com</a>)

<P>
Hello gazette,
</P>
<P>
Being a new Linux administrator, I had "hardened" down my install by implementing
a "protected" and "password=&lt;pass&gt; entry in my <TT>/etc/lilo.conf</TT> file to keep people
just as dangerous as myself out of single mode.
</P>
<P>
I also rem'd out the timeout= value so my install would always boot straight into
Linux.
</P>
<P>
My question for the day was "how could I boot Linux Single if I had to?
a Boot and Root set would work, but I discovered this...
</P>
<P>
After the BIOS Mem check, hold down either control key and the LILO boot "screen" is
displayed! And of course, you'd need the password=&lt;value&gt; to use it...
</P>
<P>
Wow, Now I am scary on 2 platforms. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":)" 
		height="24" width="20" align="middle">
</P>
<P>
--
Thank you,
</P>
<P>
John R. Jones
</P>

<p><em>3, if you count that he's an Oracle DBA. -- Heather</em></p>


<!-- end 2 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Active Directory...</FONT></H3>
Fri, 04 Jan 2002 01:38:57 -0600
<BR>John Lederer (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%233%20active%20directory">john from jhml.org</a>)

<P>
OpenLDAP is the Linux equivalent of Active Directory.
</P>
<P>
Regards.
<br>John
</P>

<p><em>There's been enough small-comment interest in this, it would probably
be good to see an article on the subject of setting up this sort of environment
the Linux way. -- Heather</em></p>

<!-- end 3 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">CSS2? Try XML and its kin instead</FONT></H3>
Sun, 30 Dec 2001 22:18:56 -0500
<BR>XunDog (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%234%20CSS2%20equivs">dwight1 from attcanada.ca</a>)

<P>
Ok,
</P>
<P>
If the feature is unique to CSS2 then
you won't replicate it with CSS1 and cross-platform
browser support for either is restrictive ...
</P>
<P>
so .... I would suggest using Xml, xsl, xslt
and either DTD or xsd schema formats ...
</P>
<P>
this is more completely supported ... just a
little (mabye a lot) more work ... Check out
the books by Benoit Marchal ...
</P>
<P>
regards
<br>XunDog
</P>

<!-- end 4 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Linux with win2000</FONT></H3>
Mon, 14 Jan 2002 13:56:00 -0500 (COT)
<BR>nadeem (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%235%20Linux%20with%20win2000">abc from studiosmile.com</a>)
<br>answered by John Karns (The Answer Gang)

<P><STRONG>
Anybody please tell me about installation of linux with win2000.
I already installed linux 7 on my pc.
now i want that without format my system i install win2000 on my pc.
</STRONG></P>
<P><STRONG>
any body pls give me any utility. don't tell me FAQ.
this is boring for me. if anybody wants help me out than pls provide me
utility.
</STRONG></P>
<P>
If you find reading FAQ's boring, I don't think you're going to like Linux
too much.
</P>
<P>
Three recommendations:
</P>
<P>
For disk partition manipulation:
<ol>
<li> fips or
<li> Partition Magic (there are others, but these are two I've used)
</ol></P>
<P>
For installing and running Windows (MSW) with Linux.
<br>3) VMWare
</P>
<P>
It would be nice to be able to avoid MSW entirely, but since my work
demands it, using VMWare allows me to run it without having to reboot and
leave the Linux environment.
</P>
<P>
-- John Karns
</P>

<!-- end 5 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/6"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Cable Modem Setup</FONT></H3>
Wed, 2 Jan 2002 10:26:11 +0100
<BR> Eugene Poole
(<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%236%20cablemodem">etpoole from attglobal.net</a>)
<br>answered by Yann Vernier and Mike Orr (The Answer Gang)

<P><STRONG>
On January 3, 2002 I'm having a external cable modem installed. I've
been looking around for some simple suggestions on what needs to be
done, confuguration wise, to my Linux machine. Can you help? Naturally,
the normal statement has been made - "We don't support Linux". The Linux
machine that it's being connected to has a second NIC installed and I've
accessed the machine via the second NIC to that's all set up. Where do I
go from there?
</STRONG></P>
<P>
We can't know the next step until you have the instructions for how to
connect using the cable modem. If you are using <A HREF="http://www.debian.org/">Debian</A> GNU/Linux, a
simple way to prepare for running a masquerading gateway is to install
the ipmasq package, but we don't know if you need PPPOE, DHCP, or some
special login methods. A useful resource may be
<A HREF="http://www.cablemodeminfo.com/LinuxCableModem.html"
	>http://www.cablemodeminfo.com/LinuxCableModem.html</A>
</P>
<P>
Good luck! -- Yann
</P>

<em>
<P>
The extra Ethernet card should be all you need.  Beyond that, just follow
the Windows dialogs in the manual and see whether it's dhcp or a static IP,
which nameservers to put in <TT>/etc/resolv.conf</TT>, etc.
</P>
<P>
Yann is right about setting up masquerading if you have a local
network.  I don't think of that as "setting up a cable modem" though.
That's another step, connecting a local network to the Internet.
</P>
<P>
Be glad you have an external modem.  It would be much harder to set up
if it were internal, because it would probably require some
proprietary DLL that isn't available for Linux.  -- Mike
</P>
</em>

<!-- end 7 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">read a timestamp... the EASY way</FONT></H3>
Wed, 2 Jan 2002 23:19:54 -0500
<BR>Joe Smith (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%238%20date">jes from martnet.com</a>)

<P><font color="navy"><em>
I was looking for a solution to extract the timestamp of a file with
plain shell methods.
</em></font></P>
<P>
...
(Lots of all-too-complicated suggestions followed)
</P>
<strong>
<P>
What's wrong with
</P>
<P><CODE>
date -r file
</CODE></P>
<P>
Which only goes to show that we <EM>really</EM> need a friendly way to query the
vast obscurity which is Unix documentation... sigh.
</P>
<P>
&lt;Joe
</P>
</strong>

<em>
<P>
&lt;laugh&gt; Bravo! Well done, sir!
</P>
<P>
This illustrates the point that I often make to folks just learning Unix:
the tools are in there, <EM>somewhere</EM>. It's <EM>finding</EM> them that's the
problem. -- Ben
</P>
</em>

<p>......... the original querent replies .........</p>

<P>
Indeed.
</P>
<P>
Especially when some of your man pages are out of date. In my case,
</P>
<P><CODE>
date --help
</CODE></P>
<P>
would have given the solution, while
</P>
<P><CODE>
man date
</CODE></P>
<P>
just keeps this secret. Sob.
</p>

<P>
--
Regards, Fakir
</P>

<!-- end 10 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/11"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">How to manually label a tape in linux</FONT></H3>
Wed, 9 Jan 2002 10:18:29 +0530
<BR>FRANCO FERNANDES (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%2311%20date&20label&20tapes">franco from lauren.co.in</a>)
<br>Answered by Jay Ashworth (The Answer Gang)

<P><STRONG>
I manually backup my linux server every day for that i need to put a label
on my tape according to the date, I backup my server. Does anyone know how
to manually label a tape in linux is there any command for doing that.
</STRONG></P>
<P><STRONG>
Please help
<br>Thanks in Advance
<br>Franco.F
</STRONG></P>

<P>
Well, <EM>my</EM> approach to this is to create a directory called
<TT>/tmp/TIMESTAMP</TT>, and, just before you make a backup, clear out all the
files, then use
</P>
<P><CODE>
touch /tmp/TIMESTAMP/`date +%Y%m%d-%a%H%M%S`
</CODE></P>
<P>
This wlil give you a label for the backup which you can read without
having to actually load any data.
</P>
<P>
Cheers,
 jra
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/14"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Problem faced while using script to backup</FONT></H3>
Wed, 9 Jan 2002 10:26:14 +0530
<BR>FRANCO FERNANDES (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%2314%20log%20backups">franco from lauren.co.in</a>)
<BR>answered by Dan Wilder (The Answer Gang)

<STRONG>
<P>
I have created a automated script to backup my server for that i want my
log file to display the date it backsup my server every day.
My script has this line ,
</P>
<pre>
echo " BACKUP OF fileserver STARTED " &gt;&gt;
/var/log/bkuplogs/fileserver/mainlog
</pre>

<P>
Is there any parameter which has to be put like %m %h %d.
Any kind of help will be highly appreciated
</p>
</STRONG>
<P>
Try
</P>
<P><CODE>
echo " BACKUP OF fileserver STARTED $(date +'%c') " &gt;&gt; whatever
</CODE></P>
<P>
See
</P>
<P><CODE>
man date
</CODE></P>
<P>
for other format strings.
--
Dan Wilder
</P>

<!-- end 14 -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <A NAME="tips/15"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Posters for [LG 72] help wanted #7</FONT></H3>
Fri, 28 Dec 2001 11:36:12 +0100
<BR>Yann Vernier, Chris Gianakopoulos, Jim Dennis (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%2315%20posters">The Answer Gang</a>)
<p>Brian Keyse (<a href="mailto:linux-questions-only@ssc.com?subject=%20Re%3A%20%5BLG%2075%5D%202c%20Tips%20%2316">bkeyse2 from yahoo.com</a>)

<P>
I feel I must recommend O'Reilly's "Anatomy of a Linux System" poster.
It is a large, colourful poster giving a rough overview of how things
fit together and recommending (O'Reilly, of course) books.
</P>
<P>
Their address is <A HREF="http://www.ora.com"
	>http://www.ora.com</A> but I didn't find the poster in
their product list; it is probably promotional material which you'll
have to ask them for. -- Yann
</P>


<P><BLOCKQuote>It's available as a PDF file:
<br><A HREF="ftp://ftp.oreilly.com/pub/poster/oreilly_linux_poster.pdf"
	>ftp://ftp.oreilly.com/pub/poster/oreilly_linux_poster.pdf</A>
<br>-- Brian Koyse
</BLOCKQuote></P>

<P>
I saw some sort of a thing like that for Linux.  Is it 3 or 4 feet
in diameter and it shows the ring structure of the operating system?
You know..., the kernel in the middle, with the applications at the
outer ring?  If that's the thing, it's kinda cool.  I think that I
am gonna get one of those. -- Chris G.
</P>

<P><em>
Hmmm.  The one I saw was just of the Linux kernel sources.
Core memory management and scheduler in the center and VFS
and core networking support forming a second tier, with
filesystems and specific device drivers on the periphery.
That one was a sort of a fractal star or "peacock." -- JimD
</em></P>

<P>
I'll have to look at the chart when I go back to work next week.  There's a
book entitled "The Design of the Unix Operating System" by Maurice Bach.
The poster that I saw, for Linux, looks like the structure on the cover of
that book.
</P>
<P>
Regards,
Chris G.
</P>

<!-- end 19 -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
	of <I>Linux Gazette</I> 
<a href="http://www.linuxgazette.com/copying.html"
	>Copyright &copy;</a> 2002
<BR>Published in issue 75 of <I>Linux Gazette</I> February 2002</H5>
<H6 ALIGN="center">HTML script maintained by
	<A HREF="mailto:star@starshine.org">Heather Stern</a> of
	Starshine Technical Services,
	<A HREF="http://www.starshine.org/">http://www.starshine.org/</A> 
</H6>
<!-- *** END copyright *** -->
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
	<img src="../gx/dennis/qbubble.gif" alt="(?)" 
		border="0" align="middle">
	<font color="#B03060">The Answer Gang</font>
	<img src="../gx/dennis/bbubble.gif" alt="(!)" 
		border="0" align="middle">
</A></H1> 
<BR>
<H4>By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and...
	(<a href="tag/bios.html">meet the Gang</a>) ...
	the Editors of Linux Gazette... 
	and You!
<br>Send questions (or interesting answers) to
	<a href="tag/ask-the-gang.html">the Answer Gang</a> for
		possible publication 
</H4>
</center>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<p><hr><p>
<H3>Contents:</H3>
<dl>
<dt><a href="#tag/greeting"
	><strong>&para;: Greetings From Heather Stern</strong></A></dl>

<DL>
<!-- index_text begins -->
<dt><A HREF="#tag/1"
	><img src="../gx/dennis/qbub.gif" height="28" width="50"
	  alt="(?)" border="0"
	><strong>How does one examine a core file</strong></a>
<!-- index_text ends -->
</DL>
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/greeting"><HR WIDTH="75%" ALIGN="center"></A>
<H3 align="left"><img src="../gx/dennis/hbubble.gif" 
	height="50" width="60" alt="(&para;) " border="0"
	>Greetings from Heather Stern</H3>
<!-- begin hgreeting -->
<p><em>... you stand there waiting for Heather to look up from her keyboard...</em></p>
<p>Oh!  Hi everybody!  It's certainly been an active month here with The Answer
Gang.   We had almost 700 slices of Gazette related mail come past my inbox.
The longest thread (not pubbed this month, look forward to it next time) was
over 50 messages long.  Less than 20 people got no answer whatsoever (not 
counting the occasional spammer) and the top reason for not getting a post
answered, appeared to be simply a lack of interest in that message.   Crazy
attachments are down a LOT since our sysadmin improved the filters.  Ben did
a bit more cleanup on the <a href="../tag/members-faq.html"
	>TAG FAQ</a> and <a href="../tag/kb.html">Knowledgebase</a> and we
	have a new <a href="tag/ask-the-gang.html">posting guidelines page</a>
	which I hope you find easy to read.
<p>In the land of Linux I'm pleased to note that the 2.4 series kernel is
resembling stable since 2.4.17 is over a month old now.  A lot of work is being
done in 2.5.
<p>Flu struck my area and melted my mind back down to a mere single CPU when I'm
used to being an SMP system.  Bleh!  And before you ask ... yes,
I'm feeling better.  Lots of liquids, chicken soup, all that.
<p>It appears as though Ghostscript is my evil nemesis of the month.  
I haven't had time to finish compiling support for that new color
printer of mine.  In a moment of foolishness I upgraded my Dad-in-law's box
and the next few days were completely nuts since kword and gs refused to
agree on what fonts to print, or even to get the metrics right so margins
would work.  They're happy again since I forced ghostscript to uninstall
completely and then reinstall.   And we still wonder what the heck happened
to gnucash in Debian/Woody, though I admit, I haven't looked very hard.
<p>Cheerfully for my mortgage I've had a lot of consulting work this month.
Between 600 plus messages and all that, though, there wasn't time for me to
fit the usual ten pack (this blurb and nine of the juiciest TAG threads) in
under a tighter than usual deadline.  
Mike will be enjoying a Python conference much of this next month.  I hope it
counts for a well deserved vacation on his part.  
<p>I've not left you completely wanting, though.  Here's a few days in the 
life of The Answer Gang, troubleshooting one of those day to day things that
drives everybody nuts once in a while -- segfaults.
<p>Core files are a mess.  Good thing we have a dustbin around here.
<!-- end hgreeting -->
<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<A NAME="tag/1"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 1 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif" 
	height="50" width="60" alt="(?) " border="0"
	>How does one examine a core file</H3>


<p><strong>From Faber Fedor 
</strong></p> 
<p align="right"><em>Answered By Jim Dennis, Dan Wilder, John Karns,
	<br>with side comments from Ben Okopnik and Heather Stern
</em></p>

<strong>
<p>
I've got a problem with a RH7.1 machine and no error messages to look at, so
I'm wondering how does one debug a problem like this?
</p>
<p>
Moved a machine from NY to NJ yesterdy.  When I left it last night,
everything was running, esp. <A HREF="http://www.apache.org/">Apache</A>.  This morning, normal maintanence
occurred at 4:02 AM, and when the system (syslog?) went to restart
httpd, the restart failed.  It's been failing ever since too!
</p>
<p>
The only http related message in <TT>/var/log/messages</TT> is
</p>
<pre>
Dec 22 12:27:13 www httpd: httpd startup failed
</pre>
<p>
Access and error logs for httpd are empty.
</p>
<p>
Running <TT>/usr/sbin/httpd</TT> (with and without command line parms) generates
the message
</p>
<pre>
Segmentation fault (core dumped)
</pre>
<p>
and the requisite core file:
</p>
<pre>
core: ELF 32-bit LSB core file of 'httpd' (signal 11), Intel 80386,
version 1, from 'httpd'
</pre>
<p>
File size and date of <TT>/usr/sbin/httpd</TT> matches my local copy.
</p>
<p>
Any ideas where to look next?
</p>
--
Regards,
Faber
</p>
</strong>

<!-- sig -->
<p><em>Jim Dennis pontificates about troubleshooting apache's startup... -- Heather</em></p>

<!-- end 2 -->
<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [JimD]
First, I would run <TT>/etc/init.d/httpd</TT> or <TT>/etc/init.d/apache</TT>,
or whatever it is on your system.  Run it with the "start"
option.
</blockQuote>
<blockQuote>
(Actually I'd <EM>read</EM> the <TT>/etc/init.d/</TT> start script for that
service, and probably I'd manually go through it to figure
out what I needed to do in order to run this particular installation
of Apache correctly).
</blockQuote>

<strong>
<p><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
Did that.  That's what I meant by "it crashed at the command line with
and wothout parameters.
</p>
</strong>

<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [JimD]
To dig further I might replace the httpd with a short
"strace wrapper" script:
</blockQuote>

<blockquote><pre>#!/bin/bash
exec strace -f -o /tmp/apache/strace.out /usr/sbin/httpd.real "$@"
</pre></blockquote>
<strong>
<p><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
This <EM>definitely</EM> goes into my bag of tricks (once I 
<a href="#strace-trick">decode it</a>
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)" 
		height="24" width="20" align="middle">)
</p>
</strong>
<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [JimD]
(be sure to mkdir <TT>/tmp/apache</TT>, and make it writable to the
appropriate UID/GID --- whatever the webserver runs as).
</blockQuote>
<blockQuote>
I'd look through the strace.out file for clues.
Don't leave this running in this fashion for too long.  The
strace.out files will get <EM>huge</EM> very quickly; and your performance
should suffer a bit.
</blockQuote>
<blockQuote>
Considering that it used to work, you did a shutdown, moved the
system, brought it back up,  and then, presumably, CONFIGURED IT
FOR A NEW NETWORK, I'd look very carefully at network masks, routes
and related settings.
</blockQuote>
<strong>
<p><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
Very close!  The problem turned out to be that the name server the box
was using is no longer accessible (the box is there, but dig returns "no
name servers were found") and there were no backup name servers in
<TT>/etc/resolv.conf</TT> (mea culpa).
</p>
<p>
I wouldn't have expected apache to segfault under those conditions, but
it did.
</p></strong>
<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [JimD]
Also, consider upgrading to RH7.2 if you can.
</blockquote>
<strong>
<p><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber]
I just got my hands on it earlier this week so I'm still evaluating it.
</p>
</strong>
<blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
  <A HREF="http://www.redhat.com/">Red Hat</A>'s distribution
has been very consistent in it's release history: avoid the .0,
skip the .1, and wait for the .2; that's been the rule since 4.2!
</blockQuote>

<strong>
<p><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber]
Normally, that's what I do, but we needed to upgrade to PHP4 ASAP and it
was alot easier to upgrade the whole system to 7.1 (from 6.2).
</p>
<p>
thanks again!
<br>Regards,
Faber
</p>
</strong>

<blockQuote>
<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [JimD]
You're welcome.
</blockQuote>
</blockQuote>

<hr width="40%" align="center">
<p><em>... while Dan took a different approach, considering the core file itself. -- Heather</em></p>

<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dan]
0) Start by making sure there's no error in your httpd.conf by
running
</blockQuote>
<blockQuote><code>
apachectl configtest
</code></blockQuote>
<blockQuote>
No doubt there's nothing there.  But if there is, you are not
apt to find it by examining core files, etc.
</blockQuote>
<blockQuote>
If you're an expert C developer
</blockQuote>
<strong>
<p><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber]
At one point in my life, I might have said that, but then only to
impress women like Heather. 
<IMG SRC="../gx/dennis/smily.gif" ALT=";-)" 
		height="24" width="20" align="middle">
</p></strong>
<blockquote>
<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dan]
I don't expect Heather's that easily impressed.  Especially by guys
like me that mistype "developer".
</blockQuote>
<blockquote><em>That's ok, I fixed it.  That's what editors are for,
	at least sometimes.  I'm more impressed by how people solve
	problems than by whether they're an expert in everything around
	them.  It's nice if they can solve <strong>my</strong>
	problems, though. -- Heather
</em>
</blockQuote>
</blockQuote>
<blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dan]
 and have the source tree to your
apache handy, examining the core file might yield you something.
</blockQuote>
<strong>
<p><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Faber]
IOW, no, I don't want to do that. 
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)" 
		height="24" width="20" align="middle">
</p>
</strong>
<blockquote>
<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dan]
Naah, me neither.  Last resort.
</blockQuote>
</blockquote>
<blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
Mostly it's pretty indirect.  Segfaults are typically caused by
out-of-bounds pointers or array references, references to allocated
memory since freed, confusion about number or type of parameters
passed to a function, and the like.
  The error happens earlier,
when the bad pointer is parked someplace, memory is erroneously
freed, etc.  The fault happens later, when something is dereferenced.
</blockQuote>
<blockQuote>
I've spent many a happy and well-paid hour trying, sometimes
without success, to track backwards from fault to error.
And when you find the error, you may still a long and
winding road back to the defect which caused the error.
</blockQuote>
<blockQuote><pre>
Defect    ---------&gt;  Error  -------------&gt; Fault

(Improper          (Something bad       (Result becomes
code construct)     happens)             observable as
                                         unexpected result)
</pre></blockQuote>
<blockQuote>
Unless you're an expert C developer, and patient and lucky
as well, it's more likely you'll find the problem by a process
of elimination.
</blockQuote>
<blockQuote>
1) What's changed recently?  New application?  Change in httpd.conf?
New module installed?  Try backing out any recent changes,
one by one.  Restart apache after each thing you back out.
</blockQuote>
<blockQuote>
2) Is it possible there's filesystem corruption?  Corrupted binaries
often fail to run well.  Take the machine down and run
</blockQuote>
<blockQuote><CODE>
fsck -f
</CODE></blockQuote>
<blockQuote>
on all filesystems.  If you find anything amiss, determine
what files were affected.
</blockQuote>
<blockQuote>
3) Reinstall apache just in case, anyway.
</blockQuote>
<blockQuote>
4) Could the machine have other hardware problems?  If you have
the kernel development packages installed, build the kernel
eight or ten times.  If you get "died with signal 11" or other
abnormal termination, proceed with hardware troubleshooting
procedures.
</blockQuote>
<blockQuote>
5) Figure out what area of apache is affected.  Save your httpd.conf
and start with a default one.  Will apache start?  If so,
re-introduce features from the running copy of httpd.conf
a few at a time until apache begins dying at startup.
</blockQuote>
<blockQuote>
Let us know how you do.  Depending on where you find trouble,
the gang can offer further advice.
--
Dan Wilder
</blockQuote>

<hr width="40%" align="center">
<p><em>Jim has quite a bit to say about 
<a name="strace-trick">using strace</a> -- Heather</em></p>

<blockquote><pre>#!/bin/bash
exec strace -f -o /tmp/apache/strace.out /usr/sbin/httpd.real "$@"
</pre></blockquote>
<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [JimD]
In runs a shell (bash) which then exec()s (becomes) a copy of
the strace command.  That strace command is told to "follow forks"
(so we can trace the system call of child processes) and writes
its output to a file in our <TT>/tmp/apache</TT> directory.  strace then
runs (fork()s then exec()s) a copy of the "real" httpd with a
set of arguments that matches those that were passed to to
our script.
</blockQuote>
<blockQuote>
The distinction between <TT> exec()</TT>'ing a command and invoking it in
the normal way is pretty important.  Normal command invocation
from a UNIX shell involves a <TT> fork()</TT> (creating a clone process
which is a subshell) and then an exec*() by that shell to transform
that subprocess into one which is running the target command.
</blockQuote>
<blockQuote>
Meanwhile the parent shell process normally does a wait*()
on the child.  In other words, it sits there, blocked
until the child exits, or until a signal is received.
</blockQuote>
<blockQuote>
When we use the shell exec command, it prevents the <TT> fork()</TT>
(there's no creation of a subprocess).  The "text" (executable
binary code) of the process that was running a copy of your
shell (<TT>/bin/bash</TT> in our case) is overwritten by the "text"
of the new program; all of the heap and stack segments (memory
blocks) of the old process are freed and/or clear) and the only
traces of the old memory image that remain available are the
contents of the process' environment.  In other words, the
exec command is a wrapper around the one of the exec*() system
calls (there are several different versions of the exec*() system
call which differ in the format of their arguments, and the
preservation/inheritance versus creation of environments).
</blockQuote>
<blockQuote>
Actually I think that Linux kernel implements <TT> execve()</TT> as a
wrapper around its <TT> clone()</TT> system call, and that libc/glibc
provides the handling for all of the variations on that.  The
three "variables" on these exec variations are:
</blockQuote>
<blockQuote>
<dl><dt>
format of the command argument list: <dd>(which is either
done through C varargs --- like <TT> printf()</TT> and friends,
or is a pointer to an array of NUL terminated strings),
(execv* vs. execl*)
<br>&nbsp;
<dt>
environment handling: <dd>whether the process keeps its
current environment or overwrites it.  The <TT> execle()</TT>
and <TT> execve()</TT> versions have an extra parameter pointing
at an NUL terminated of NUL terminated strings.
<br>&nbsp;
<dt>
path searching: <dd>The first argument of the <TT> execvp()</TT> and
 <TT>execlp()</TT> functions can be a simple command basename
--- while all other variations require a qualified
path.  The "p" versions will search the PATH as a
shell would.
</dl>
</blockQuote>
<blockQuote>
It appears that you can either search the PATH or create a
new environment, but not both.  Of course you can use a simple
 <TT>execl()</TT> or <TT> execv()</TT> to do neither.  Of course you can read the
man exec(3) manual pages in the library functions section of
your online docs to read even more details about this.
</blockQuote>
<blockQuote>
When I'm teaching shell scripting I spend a considerable
amount of time clarifying this worm's eye view of how UNIX
and the shell handles fork()s and exec*()s.  I draw diagrams
representing the memory space and environment of a process,
and another of a child process (connected by dotted lines
labeled  <TT>"fork()</TT>").  The I crosshatch most of the memory space
--- leaving the environment section, and label that exec*().
</blockQuote>
<blockQuote>
When I do this, people understand how the environment really
works.  The "export" shell command moves a shell variable
and its value from the local heap "out" to the environment region
of memory.  Once they really understand that, then they won't
get too confused when a child process sets a shell variable,
exports, and then their original process can't see the new
value.  ("export" is more of a memory management operator than
an inter-process communications mechanism; at best it is a
one-way IPC, <EM>copying</EM> from parent to children children).
</blockQuote>
<blockQuote>
After than I generally have to explain about some implicit
forms of sub-process creation (forking) that most people
miss.  In particular I remind them that pipes are an
*inter-process* communications channel.  So, any time you
see or use a | operator in the shell, you are implicitly
creating sub process.  That's why a command like:
</blockQuote>
<blockQuote><CODE>
unset bar; echo foo | read bar; echo $bar
</CODE></blockQuote>
<blockQuote><blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Ben]
Oh, <em>that's</em> cute. I go through pretty much the same spiel - some of it
admittedly cribbed from your description of this, because I liked it the
first time I heard it - but the way I've been demonstrating it is with a
</blockQuote>
<blockQuote><code>
while read bar; do echo $bar; done &lt; file
</code></blockQuote>
<blockQuote>
loop. This nails down the other end. <EM>Very</EM> cool.
</blockQuote>
<blockQuote>
(Scribbling notes in newly acquired Palm Pilot)
</blockQuote></blockQuote>

<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [JimD]
... will return an empty value in most shells.  The read
command is executed in a subprocess which promptly exits,
freeing the memory that held <EM>its</EM> copy of the bar
variable/value pair.  (I say <EM>most</EM> shells because ksh '93
and zsh, create their subprocesses on the left hand side
of their pipe operators.  That's one of those subtle differences
among shells.  Personally I think bash and others do it wrong,
the ksh/zsh semantics are superior and I hope bash 2.x or 3.x
will adopt them, or offer a shopt, shell option, to select the
desired semantics).
</blockQuote>
<blockQuote>
The "<tt>$@</tt>" ensures that the arguments that were passed to us wil be
preserved in count and contents.  If we used "<tt>$*</tt>" we'd be passing
a single argument to our command.  That single argument would
contain the text of all of the orginal arguments, concatenated
as one string, separated by spaces (or by the first character from
IFS if you believe the docs).  If we used <tt>$*</tt> (no soft quotes)
we'd be having the current shell resplit the number of arguments
--- they'd have the same contents, but any arguments that had
previously had embedded spaces (or other IFS characters) would
be separated accordingly.
</blockQuote>
<blockQuote>
The "<tt>$@</tt>" handling is the most subtle part of this script.
An unquoted <tt>$@</tt> would be be the same as an unquoted <tt>$*</tt> (as far
as I can tell).  It is just the "<tt>$@</tt>" that gets the special
handling. (<tt>$*</tt> and "<tt>$*</tt>" aren't special cases, they 
are expanded and split in the normal way; "<tt>$@</tt>" is expanded and 
sort of "internally requoted" to preserve the <tt>$#</tt> --- argument count).
</blockQuote>
<blockQuote>
If you were going to need to do this frequently we might
write a "strace.wrapper.sh" shell script which would work
a bit like this:
</blockQuote>

<blockquote><pre> #!/bin/bash
 OLDMASK=$(umask)
 umask 077
 TMPDIR=/tmp/$(basename $1)$$
 mkdir "$TMPDIR" || exit 1
  ## make a temporary directory or die
 umask $OLDMASK
 TARGETCMD="$1"
 shift
 exec strace -f -o "$TMPDIR/strace.out" "$TARGETCMD" "$@"
</pre></blockquote>
<blockQuote>
In this example we call strace.wrapper.sh with an extra
argument, the name of he command to be "wrapped."  We then
fuss a little with umask (to insure that our process' output
will have some privacy from prying eyes, and doing an atomic
"make a private dir or die trying" (This is the safest temp
file handling that can be managed from sh, as far as I know).
</blockQuote>
<blockQuote>
Then we restore our umask, (so we don't create a Heisenbug by
challenging one of our target command's hidden assumptions about
the permissions of files <EM>it</EM> creates).  We than grab our target
command, shift it off our argument list (which does NOT disturb
the quoting of the remaining arguments) and call our strace
command as before --- with variables interpolated as necessary.
</blockQuote>
<blockQuote>
Mind you I don't use this script.  I don't bother since I can
do it about as easily by hand.  Also this script wouldn't be
the best choice for CGI, inetd launched, or similar cases.
In those cases we're better renaming the original binary.
</blockQuote>

<hr width="40%" align="center">
<p><em>Of course we were all happy when Faber found what it was!  We encouraged
	him to send in his bug report -- Heather</em></p>

<strong>
<p>
I wouldn't have expected apache to segfault under those conditions, but
it did.
</p></strong>
<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [JimD]
Report it as a bug (after upgrading to the latest stable release).
Try to isolate the .conf directive(s) that are involved, if possible.
</blockQuote>

<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dan] ...  The error happens earlier,
when the bad pointer is parked someplace, memory is erroneously
freed, etc.  The fault happens later, when something is dereferenced.
</blockQuote>
<strong><p><IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	>
Well, as I told Jim, the fact that it couldn't find a name server
caused it to segfault.  Weird; you would have thought it would have
exited wih a message at least.
</p></strong>
<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [John K]
It sounds like there's a bug or some abnormality with apache's handling of
a situation which is doesn't expect in normal operation.  IOW, a problem
with error handling.  If the apache version is not the latest stable
version, you might want to consider upgrading.  If it is the latest, then
you may want to consider reporting it to the apache developers.
</blockQuote>

<hr width="40%" align="center">
<p><em>...and of course we congratulated him on his success, with some extra
	thoughts on general troubleshooting. -- Heather</em></p>

<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [Dan]
Congradulations on solving the problem.
</blockQuote>
<blockQuote>
That's what I call the "natural history approach".  Examine carefully the
behavior and habitat of the creature in question, and think carefully
about what you've observed.
</blockQuote>
<blockQuote>
I've probably fixed a lot more bugs in my life by the natural history
method, than I have by the method of examining core files, or for that
matter running under a debugger or emulator.
</blockQuote>
<blockQuote>
Strace, mentioned separately in this thread, is a little harder to classify.
A program that attaches itself to a running process and dumps out information
about system calls, it affords a level of information about a program
that may sometimes come close to what you'd see using a debugger.
</blockQuote>
<blockQuote>
Mostly it doesn't, but sometimes it provides that key observation not
available by other means which allows us to finally come to grips with
a bug.  I'd group it with natural history tools, perhaps as an analog
to a radio collar.  You know where the animal's been, but maybe not why,
or what it did there.
--
Dan Wilder
</blockQuote>
<blockQuote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
	HEIGHT="28" WIDTH="50" BORDER="0"
	> [JimD]
I like to use the classic "OSI reference model" as a rough
troubleshooting sequence.  Keep going down the stack (from
application, down through network and to the physical layers
until you isolate the problem, then proceed back upwards
correcting each problem until the application works).
</blockQuote>

<!--     .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.     -->
<P> <hr> </p>
<!-- *** BEGIN copyright *** -->
<H5 align="center">This page edited and maintained by the Editors
        of <I>Linux Gazette</I>
<a href="http://www.linuxgazette.com/copying.html"
        >Copyright &copy;</a> 2002
<BR>Published in issue 75 of <I>Linux Gazette</I> February 2002</H5>
<H6 ALIGN="center">HTML script maintained by
        <A HREF="mailto:star@starshine.org">Heather Stern</a> of
        Starshine Technical Services,
        <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6>
<!-- *** END copyright *** -->
<H4 ALIGN="center">"Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
<HR>

<center>
<table cellpadding=7><tr><td>
<IMG SRC="../gx/bytes.gif" border=1  ALT="News Bytes">
</td><td>
<H3>Contents:</H3>
<ul>
<li><a HREF="#leg">Legislation and More Legislation</a>
<li><a HREF="#links">Linux Links</a>
<li><a HREF="#conferences">Conferences and Events</a>
<li><a HREF="#general">News in General</a>
<li><a HREF="#distro">Distro News</A>
<li><a HREF="#commercial">Software and Product News</a>
</ul>
</td></tr></table>

<STRONG>Selected and formatted by  <A HREF="mailto:michael.conry@softhome.net">Michael Conry</A></STRONG>
</center>


<P> Submitters, send your News Bytes items in 
<FONT SIZE="+2"><STRONG>PLAIN TEXT</STRONG></FONT>
format.  Other formats may be rejected without reading.  You have been
warned!  A one- or two-paragraph summary plus URL gets you a better
announcement than an entire press release.


<P> <hr> <P> 
<!-- =================================================================== -->

<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<font color="green">
February 2002 <I>Linux Journal</I>
</font>
</H3>

<IMG ALT="[issue 94 cover image]"   SRC="misc/bytes/lj-cover94.png" WIDTH=200 HEIGHT=268 
ALIGN="left" HSPACE="20">

The February issue of <A HREF="http://www.linuxjournal.com/"><I>Linux
Journal</I></A> is on newsstands now.
This issue focuses on Small Office/Home Office (SOHO).  Click 
<A HREF="http://www.linuxjournal.com/modules.php?op=modload&name=NS-lj-issues/issue94&file=index">here</A>
to view the table of contents, or 
<A HREF="http://www.linuxjournal.com/subscribe/">here</A> 
to subscribe.

<P>
<FONT COLOR="green">All articles through October 2001 are available for
public reading at 
<A HREF="http://www.linuxjournal.com/magazine.php">http://www.linuxjournal.com/magazine.php</A></FONT>.  
Recent articles are available on-line for subscribers only at 
<A HREF="http://interactive.linuxjournal.com">http://interactive.linuxjournal.com/</A>.  

<BR CLEAR="all">




<a name="leg"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Legislation and More Legislation</font></H3></center>


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Jon Johansen Indicted by Norwegian Authorities
Regarding DeCSS
</FONT>
</H3> 

Unhappy news this month, as it emerged that Jon Johansen has been 
<a href="http://www.securityfocus.com/news/306">
indicted</a>
by Norwegian authorities for his part in creating and distributing the
DeCSS code.  This comes two years after he and his father were 
<a href="http://www.2600.com/news/display.shtml?id=343">
first</a> taken from their home in connection with the same software.
The initial report is available
<a href="http://www.nettavisen.no/servlets/page?section=9&item=194062">
in Norwegian</a>, and a 
<a href="http://slashdot.org/comments.pl?sid=25975&cid=2816391">
translation</a> was posted in the Slashdot
<a href="http://slashdot.org/yro/02/01/10/1433237.shtml">
discussion</a> of the story. 
<p>
It appears that the case against Jon is unusual in that he is being charged
under laws which are generally applied in cases involving breaking into
computers and theft of electronic records or company files.  Pressure from
the MPAA and the US entertainment industry appears to have encouraged the
Norwegian authorities to try this experimental attempt to secure a
conviction.
<p>
The 
<a href="http://www.eff.org">Electronic Frontier Foundation</a>
have extensive resources on 
<a href="http://www.eff.org/IP/DeCSS_prosecutions/Johansen_DeCSS_case/">
this case</a>.
Particularly interesting are
<a href="http://www.eff.org/IP/Video/DVDCCA_case/20000118_bing_norway_law_decl.html">
some legal arguments</a>
as to why no offence has been committed
under Norwegian law
and
<a href="http://www.eff.org/IP/Video/MPAA_DVD_cases/20000720_ny_trial_transcript.html">
transcripts</a>
including Jon Johansen's testimony at the 2600 Magazine trial in New
York under the DMCA (July 20, 2000).
<p>
A
<a href="https://www.eff.org/mailman/listinfo/free-jon">
mailing list</a>
has also been set up to discuss issues concerning the case, including how
to support Jon and how to protest against the indictment.

<p>
The sorry truth is that cases like this are likely to become more common in
the future.  Governments internationally are harmonising their intellectual
property laws through measures such as
<a href="http://www.ifpi.org/site-content/press/20011206.html">
the WIPO copyright treaty</a>
which will come into force in March (having recently secured its 30th
signatory).  The result will be that all countries might eventually enact
legislation akin to the DMCA to protect the media multinationals'
intellectual property and access-control technologies.  Countries
attempting to resist this trend will not be well received.  Slashdot 
<a href="http://slashdot.org/articles/02/01/03/1621205.shtml">
reported recently</a>
that Ukraine is subject to US trade sanctions for not using an "optical
media licensing regime" for blank CDs and CD recorders.  The best
way to resist at an individual level is to make your voice heard and start
lobbying and writing letters.  Your local LUG could form a focus for this
activity.



<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Support From Washington
</FONT>
</H3> 

<a href="http://www.house.gov/boucher/">
Congressman Rick Boucher</a>
has been receiving a lot of press lately for the
position he has taken with regard to issues such as digital rights
management and the DMCA.
<a href="http://www.dotcomscoop.com/">
Dotcom Scoop</a>
recently
<a href="http://www.dotcomscoop.com/article.php?sid=81">
reported</a>
that Congressman Boucher has 
<a href="http://www.dotcomscoop.com/article.php?sid=80">
written</a>
to the RIAA expressing his
concern at the introduction of copy-protected compact discs.  He feels that
such developments "...may prevent or inhibit consumer home recording using
recorders and media covered by the Audio Home Recording Act of 1992". A
<a href="http://www.theregister.co.uk/content/6/23587.html">
report</a>
on the same story in The Register, however, indicated that the copy
protection measures probably are legal.  It seems that though the record
label cannot sue you for making a legitimate personal copy of your new CD,
they are not obliged to make it easy for you!
ZDNet has
<a href="http://zdnet.com.com/2100-1106-802646.html?legacy=zdnn&chkpt=zdnnp1tp02">
reported</a> [<a href="http://www.reuters.com/">Reuters</a>]
that Boucher is planning to introduce a bill that would eliminate the
"anti-circumvention" clause of the DMCA.  It is certainly encouraging to
see an elected representative taking an overtly pro-consumer line on these
issues.
<p>
Another elected representative who seems to understand a thing or two is
Rep. Darrell Issa, a member of the US House of Representatives' Judiciary
Committee.  
<a href="http://www.linuxjournal.com/article.php?sid=5714">
Speaking</a>
to <EM>Linux Journal's</EM> Don Marti, he indicated that the SSSCA was "dead on arrival".
Though this is encouraging,  it might be foolish to get too relaxed until
the grave is actually occupied.  Don comments that Issa also seemed
well informed on other issues in this area (DMCA, etc.,).
<p>
Perhaps when campaigning on issues of concern, it would be wise to be alert
to good as well as bad news.  Elected representatives careers are
based on achieving public support and they can be very sensitive to public
opinion.  It could not hurt to mail guys like Boucher and Issa to tell
them if you like what they are doing.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">UCITA
</FONT>
</H3> 

<P>
LWN reported that
<a href="http://lwn.net/2002/0103/">
UCITA is back again</a>.
The main issue for the free software community would be that the UCITA, if
it came into US law in its current form, would prohibit the distribution of
software to consumers without warranty.  This would mean that by
distributing a free software utility, you could be held responsible by
consumers for any flaws in the product (even though you have disclaimed all
warranties, etc.,).  This story was also
<a href="http://www.theregister.co.uk/content/4/23675.html">reported</a>
by TheRegister, who linked to
<a href="http://www.eff.org/IP/DRM/UCITA_UCC2B/20000131_fight_ucita_stallman_paper.html">
this article</a>
by Richard Stallman on "Why We Must Fight UCITA".


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Legislative Links
</FONT>
</H3> 

<P>
Indianapolis' 
<a href="http://www.starnews.com/article.php?legalfees04.html,news">
attempt</A>
to keep minors from playing violent video games in public arcades was ruled
unconstitutional, at a cost of $318,000 to taxpayers.
<P> 
NY Times
<a href="http://www.nytimes.com/2001/12/28/technology/28CYBERLAW.html">
review</A>
of the year in tech law, which makes a nice lead in to their
<A href="http://www.nytimes.com/2002/01/11/technology/11CYBERLAW.html">
preview</A>
of what might be to come.  Both articles feature the input of various
experts from the field, and both require registration.
<P>
<A href="http://cryptome.org/mpaa-v-net-mg.htm">
Essay</A> on cryptome.org
by Mike Godwin on digital rights management and the battle 
between computer companies and entertainment companies. (Courtesy
Crypto-Gram)



<A name="links"></A>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Linux Links</font></H3></center>

<p>

Jun Jungho mailed to announce a LG Korean translation site at
<a href="http://www.whiterabbitpress.com/lg/">
http://www.whiterabbitpress.com/lg/</a>.
He and fellow volunteers have tested this site for
5 months, and would now like to inform others. "I wish
that this site gives more fun & infomation to Korean Linuxers."

<P>

<a href="http://www.wps.com/texts/codes/">
ASCII: American Standard Code for Information <EM>Infiltration</EM></a>
by Tom Jennings. A very interesting, and in-depth
article. Covers history of ASCII, and its various developments over
almost half a century.

<P>

Courtesy 
<a href="http://www.counterpane.com/crypto-gram.html">
crypto-gram</a> is a link to a
<a href="http://www.nipc.gov/cybernotes/2001/cyberissue2001-26.pdf">
review</a> [pdf]
of the year in vulnerabilities.  This contains a list  of all the operating
systems and applications with vulnerabilities.

<P>

Newsforge has a
<a href="http://www.newsforge.com/article.pl?sid=02/01/15/1939255&mode=nocomment">
story</a>
on one person's experiences with 
<a href="http://www.gentoo.org">
Gentoo Linux</a>
, a distribution that requires
the user to start the installation by compiling new compilers.
In a similar vein, DistroWatch have a
<a href="http://www.distrowatch.com/review-sorcerer.php">
review</a>
of Sorcerer GNU Linux, which again compiles much of the system from source
during install.


<P>

ZDnet
<a href="http://news.zdnet.co.uk/story/0,,t269-s2102466,00.html">
asks</a>
`is Linux ready for the desktop?'
While
<a href="http://www.cio.com/">
Cio.com</a>
tell us
<a href="http://www.cio.com/archive/010102/shop_content.html">
how to run</a>
a Microsoft-free shop.

<P>

<EM>Linux Journal</EM> have
<a href="http://www.linuxjournal.com//article.php?sid=5672">
looked back</a>
over the problems exposed in SSH during the past year, and the solutions
which have resulted.

<P>

Some links and stories that appeared on
<a href="http://www.slashdot.org/">SlashDot</a>
over the past month:
<ul>
<li>
    Kerneltrap
    <a href="http://kerneltrap.com/article.php?sid=490">
    interview</a>
    with Alan Cox about the kernel, DMCA and more.
    Linux Today reported Alan's recent release of
    <a href="http://linuxtoday.com/news_story.php3?ltsn=2002-01-14-001-20-NW-KN">
    2.4.18PRE3-AC1</a>
    and
    <a href="http://linuxtoday.com/news_story.php3?ltsn=2002-01-14-009-20-PS">
    2.4.18PRE3-AC2</a> (due to popular demand!).
</li>
<li>
    <a href="http://linux.html.it/articoli/rik_van_riel_en1.htm">
    Interview</a>
    with Rick van Riel, kernel developer.
    Talks about virtual memory controversies (among other things).
</li>
<li>
    <a href="http://slashdot.org/articles/02/01/15/1245209.shtml">
    Kernel 2.5.2</a>
</li>
<li>
    The Linux Cookbook
    <a href="http://slashdot.org/books/02/01/02/0458242.shtml">
    book review</a>.
</li>
<li>
    <a href="http://slashdot.org/articles/02/01/18/1457208.shtml">
    Story</a>
    about flashing a mini Linux OS onto 802.11b firmware with
    <a href="http://opensource.instant802.com/screenshots.php">
    screenshots</a>.
</li>
</ul>


<P>

<a href="http://www.linuxtoday.com/">Linux Today</a> have featured the
following links which you may be interested to follow:
<ul>
<li>
LinuxSecurity.com
<a href="http://www.linuxsecurity.com/articles/cryptography_article-4229.html">
article</a> on a vulnerability in the Linux encrypted loop device.
</li>
<li>
Also from LinuxSecurity.com is an
<a href="http://www.linuxsecurity.com/articles/intrusion_detection_article-4240.html">
article</a>
on using statistical tools with the
<a href="http://www.snort.org/">Snort</a> IDS.
</li>
<li>
Caliban.org
<a href="http://www.caliban.org/bash/index.shtml">
article</a>
on getting more from Bash.
</li>
<li>
Bram Moolenaar writes about
<a href="http://www.rons.net.cn/english/FSM/vim">
Vim, an open-source text editor</a>, dealing both with technical issues and
the background to his selection of the Charityware licence.
</li>
<li>
LinuxLookup have
<a href="http://www.linuxlookup.com/html/reviews/software/vmware-3.0.html">
reviewed</a> VMWare 3.0 Workstation for Linux.
</li>
<li>
The BBC is
<a href="http://support.bbc.co.uk/ogg/">
trialing</a>
Ogg Vorbis streams for online listeners.
</li>
<li>
The Guardian
<a href="http://www.guardian.co.uk/online/story/0,3605,629939,00.html">
reports</a>
on free software's fortunes during the downturn.
</li>
</ul>

<P>

TheRegister's Thomas Greene
reported on getting
<a href="http://www.theregister.co.uk/content/4/23735.html">
superior benchmarks</a> for Quake-3 FPS on Linux as opposed to Windows.
Hardly a scientific test, but nice to see none the less.

<p>

From the
<a href="http://oreillynet.com">
O'Reilly</a> stable of websites, the following may interest you:
<ul>
<li>
<a href="http://onlamp.com/pub/a/onlamp/2002/01/10/xp.html">
An article</a> covering some of the issues in integrating WinXP into your
existing heterogeneous network.
</li>
<li>
An
<a href="http://linux.oreillynet.com/pub/a/linux/2002/01/03/cvs_intro.html">
introduction</a>
to CVS.
</li>
<li>
Automating Network Administration, 
<a href="http://onlamp.com/pub/a/onlamp/2001/12/20/sysadmin.html">
Part One</a>
and
<a href="http://onlamp.com/pub/a/onlamp/2002/01/04/sysadmin.html">
Part Two</a>.
</li>
<li>
A discussion on the
<a href="http://oreillynet.com/pub/a/network/2002/01/12/openinf.html">
question</a>
of whether
publicly funded research should result in open source code? Related to this
issue is a recent Salon
<a href="http://www.salon.com/tech/feature/2002/01/04/university_open_source/index.html">
article</a> on intellectual property and universities.  The current head of
the Berkeley department responsible for intellectual property reckons they
should have licensed the TCP/IP stack and collected royalties all the way
to the bank.
</li>
</ul>

<P>

Scientific American
<a href="http://www.sciam.com/2002/0202issue/0202patents.html">
article</a>
on really
<a href="http://www.bustpatents.com/">
bad patents</a>.
If you find those interesting, you might like to look at IBM's new 
<a href="http://www.delphion.com/details?pn=US06329919__">
patent</a>
for a toilet reservation system 
<a href="http://www.aful.org/pipermail/patents/2002-January/002581.html">
highlighted</a>
by Hartmut Pilch on the 
<a href="http://www.aful.org/pipermail/patents/">
patents mailing list</a>
at
<a href="http://www.aful.org/">
aful.org</a>.

<P>

<a href="http://staff.washington.edu/dittrich/misc/faqs/responding.faq">
What to do</a>
after a computer break-in.

<P>

Some 
<a href="http://lwn.net/">
Linux Weekly News</a> highlights:
<ul>
<li>
    LWN has
    <a href="http://lwn.net/2002/0117/">
    analysed</a>
    the controversy surrounding Eric S Raymond's kernel auto-configuration
    software. Eric has been defending the project using stories detailing
    the plight of 
<a href="http://lwn.net/2002/0117/a/aunt-tillie.php3">
    Aunt Tillie</a>
    as she tries to reconfigure her kernel. LWN has further amusing links.
</li>
<li>
    Final version of 
    <a href="http://lwn.net/2001/features/Timeline/">
    LWN 2001 timetable</a>
</li>
<li>
    Taking a 
    <a href="http://lwn.net/2002/0103/kernel.php3">
    look at</a>
    the phenomenon of people setting up multiple alternative kernel trees,
    as a demonstration and staging area for their patches.  Could other
    projects benefit from this approach?
</li>
<li>
LWN's Jonathan Corbet 
<a href="http://lwn.net/2002/0110/kernel.php3">
comments</a>
on the processes at work behind `large' Linux kernel changes, and how these
processes differ from practice in proprietary software development.
</li>
</ul>


The Washington Post have an interesting article by Lawrence Lessig entitled 
<a href="http://www.washingtonpost.com/wp-dyn/articles/A11361-2002Jan7.html">
"Who's Holding Back Broadband"</a>.
It appears issues of control loom large in this area, with media companies
loath to take any move which might loosen their grip on the "content
industry".  Embracing broadband would be just such a move.

<P>

Two 
<a href="http://www.ibm.com">
IBM</a>
whitepapers
(<a href="http://www-124.ibm.com/developerworks/oss/linux/whitepapers/security/les_summary.pdf?open&t=grl,l=927,p=LXS">here</a>
and
<a href="http://www-124.ibm.com/developerworks/oss/linux/whitepapers/security/les_whitepaper.pdf?open&t=grl,l=927,p=SR4D">here</a>)
on security issues relating to "Linux in Enterprise Systems" (and we are
not talking about Klingons off the starboard bow). Both pdf's, and quite
large.  IBM appears to be strengthening their support for Linux. Slashdot
<a href="http://slashdot.org/articles/02/01/25/1254250.shtml">reported</a>
that IBM's new $400,000 Z-series mainframe will not be sold with z/OS, but
rather with Linux.



<a name="conferences"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Upcoming conferences and events</font></H3></center>

<P> Listings courtesy <EM>Linux Journal</EM>.  See <EM>LJ</EM>'s
<A HREF="http://www.linuxjournal.com/events.php">Events</A> page for the
latest goings-on.

<!-- *** BEGIN events table [this line needed by Linux Gazette events.py *** -->

<table cellpadding=5 border=0 width=100%>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>LinuxWorld Conference & Expo (IDG)</b><BR>	
        <td valign=top>January 30 - February 1, 2002<BR>New York, NY<BR>	
        <a href="http://www.linuxworldexpo.com/" target="_blank">
	http://www.linuxworldexpo.com/</A><BR>
	</td></tr>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>The Tenth Annual Python Conference ("Python10")</b><BR>
        <td valign=top>February 4-7, 2002<BR>Alexandria, Virginia<BR>
        <a href="http://www.python10.org/" target="_blank">
        http://www.python10.com/</A><BR>
	</td></tr>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Australian Linux Conference</b><BR>
        <td valign=top>February 6-9, 2002<BR>Brisbane, Australia<BR>
        <a href="http://www.linux.org.au/conf/" target="_blank">
	http://www.linux.org.au/conf/</A><BR>
	</td></tr>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Internet Appliance Workshop</b><BR>
	<td valign=top>February 19-21, 2002<BR>San Jose, CA<BR>		
        <a href="http://www.netapplianceconf.com/" target="_blank">
	http://www.netapplianceconf.com/</A><BR>
	</td></tr>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Internet World Wireless East (Penton)</b><BR>
	<td valign=top>February 20-22, 2002<BR>New York, NY<BR>				<a href="http://www.internetworld.com/events/weast2002/" target="_blank">
	http://www.internetworld.com/events/weast2002/</A><BR>
	</td></tr>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Intel Developer Forum (Key3Media)</b><BR>
        <td valign=top>February 25-28, 2002<BR>San Francisco, CA<BR>
	<a href="http://www.intel94.com/idf/index2.asp" target="_blank">
	http://www.intel94.com/idf/index2.asp</A><BR>
	</td></tr>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>COMDEX (Key3Media)</b><BR>
	<td valign=top>March 5-7, 2002<BR>Chicago, IL<BR>
        <a href="http://www.key3media.com/comdex/chicago2002/" target="_blank">
	http://www.key3media.com/comdex/chicago2002/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>BioIT World Conference & Expo (IDG)</b><BR>
        <td valign=top>March 12-14, 2002<BR>Boston, MA<BR>
        <a href="http://www.bioitworld.com/" target="_blank">
	http://www.bioitworld.com/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Embedded Systems Conference (CMP)</b><BR>
        <td valign=top>March 12-16, 2002<BR>San Francisco, CA<BR>	
        <a href="http://www.esconline.com/sf/" target="_blank">
	http://www.esconline.com/sf/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>CeBIT (Hannover Fairs)</b><BR>
        <td valign=top>March 14-22, 2002<BR>Hannover, Germany<BR>
        <a href="http://www.cebit.de/" target="_blank">
        http://www.cebit.de/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>COMDEX (Key3Media)</b><BR>	
        <td valign=top>March 19-21, 2002<BR>Vancouver, BC<BR>		
        <a href="http://www.key3media.com/comdex/vancouver2002/" target="_blank">
	http://www.key3media.com/comdex/vancouver2002/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>FOSE</b><BR>
        <td valign=top>March 19-21, 2002<BR>Washington, DC<BR>
        <a href="http://www.fose.com/" target="_blank">
        http://www.fose.com/</A><BR>	

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Game Developers Conference (CMP)</b><BR>	
        <td valign=top>March 19-23, 2002<BR>San Jose, CA<BR>
        <a href="http://www.gdconf.com/" target="_blank">
	http://www.gdconf.com/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>LinuxWorld Conference & Expo Singapore (IDG)</b><BR>	
        <td valign=top>March 20-22, 2002<BR>Singapore<BR>					
        <a href="http://www.idgexpoasia.com/" target="_blank">
	http://www.idgexpoasia.com/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Software Solutions / eBusiness World</b><BR>
        <td valign=top>March 26-27, 2002<BR>Toronto, Canada<BR>
        <a href="http://www.softmatch.com/soln20.htm#ssebw" target="_blank">
	http://www.softmatch.com/soln20.htm#ssebw</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>SANS 2002 (SANS Institute)</b><BR>	
        <td valign=top>April 7-9, 2002<BR>Orlando, FL<BR>
        <a href="http://www.sans.org/newlook/home.htm" target="_blank">
	http://www.sans.org/newlook/home.htm</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>LinuxWorld Conference & Expo Malaysia (IDG)</b><BR>
        <td valign=top>April 9-11, 2002<BR>Malaysia<BR>
        <A HREF="http://www.idgexpoasia.com/" TARGET="_blank">
	http://www.idgexpoasia.com/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>LinuxWorld Conference & Expo Dublin (IDG)</b><BR>
        <td valign=top>April 9-11, 2002<BR>Dublin, Ireland<BR>
        <BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Internet World Spring (Penton)</b><BR>	
        <td valign=top>April 22-24, 2002<BR>Los Angeles, CA<BR>
        <a href="http://www.internetworld.com/events/spring2002/" target="_blank">
	http://www.internetworld.com/events/spring2002/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>O'Reilly Emerging Technology Conference (O'Reilly)</b><BR>
        <td valign=top>April 22-25, 2002<BR>Santa Clara, CA<BR>
        <a href="http://conferences.oreillynet.com/etcon2002/" target="_blank">
	http://conferences.oreillynet.com/etcon2002/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Software Development Conference & Expo, West (CMP)</b><BR>	
        <td valign=top>April 22-26, 2002<BR>San Jose, CA<BR>
        <a href="http://www.sdexpo.com/" target="_blank">
	http://www.sdexpo.com/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Networld + Interop (Key3Media)</b><BR>	
        <td valign=top>May 7-9, 2002<BR>Las Vegas, NV<BR>
        <a href="http://www.key3media.com/" target="_blank">
	http://www.key3media.com/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Strictly e-Business Solutions Expo (Cygnus Expositions)</b><BR>	
        <td valign=top>May 8-9, 2002<BR>Minneapolis, MN<BR>
        <a href="http://www.strictlyebusiness.net/strictlyebusiness/index.po?" target="_blank">
	http://www.strictlyebusiness.net/strictlyebusiness/index.po?</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Embedded Systems Conference (CMP)</b><BR>	
        <td valign=top>June 3-6, 2002<BR>Chicago, IL<BR>
        <a href="http://www.esconline.com/chicago/" target=_"blank">
	http://www.esconline.com/chicago/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>USENIX Annual (USENIX)</b><BR>	
        <td valign=top>June 9-14, 2002<BR>Monterey, CA<BR>
        <a href="http://www.usenix.org/events/usenix02/" target="_blank">
	http://www.usenix.org/events/usenix02/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>PC Expo (CMP)</b><BR>	
        <td valign=top>June 25-27, 2002<BR>New York, NY<BR>
        <a href="http://www.techxny.com/" target="_blank">
	http://www.techxny.com/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>O'Reilly Open Source Convention (O'Reilly)</b><BR>
        <td valign=top>July 22-26, 2002<BR>San Diego, CA<BR>
        <a href="http://conferences.oreilly.com/" target="_blank">
        http://conferences.oreilly.com/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>USENIX Securty Symposium (USENIX)</b><BR>	
        <td valign=top>August 5-9, 2002<BR>San Francisco, CA<BR>
        <a href="http://www.usenix.org/events/sec02/" target="_blank">
	http://www.usenix.org/events/sec02/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>LinuxWorld Conference & Expo (IDG)</b><BR>
        <td valign=top>August 12-15, 2002<BR>San Francisco, CA<BR>
	<a href="http://www.linuxworldexpo.com" target="_blank">
	http://www.linuxworldexpo.com</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>LinuxWorld Conference & Expo Australia (IDG)</b><BR>
        <td valign=top>August 14 - 16, 2002<BR>Australia<BR>
        <a href="http://www.idgexpoasia.com/" target="_blank">
	http://www.idgexpoasia.com/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Communications Design Conference (CMP)</b><BR>
        <td valign=top>September 23-26, 2002<BR>San Jose, California<BR>
        <a href="http://www.commdesignconference.com/" target="_blank">
	http://www.commdesignconference.com/</A><BR>

<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

<tr><td valign=top>
        <b>Software Development Conference & Expo, East (CMP)</b><BR>
        <td valign=top>November 18-22, 2002<BR>Boston, MA<BR>
        <a href="http://www.sdexpo.com/" target="_blank">
        http://www.sdexpo.com/</A><BR>
	
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>

</table>
<!-- *** END events table [this line needed by Linux Gazette events.py *** -->


<a name="general"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">News in General</font></H3></center>



<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Euro Support
</FONT>
</H3> 

As many of you have surely noticed, the euro became a real paper and coins
currency on the first of January 2002.  Being able to type the euro symbol
is now something which will be necessary for very many computer users.
<a href="http://www.debian.org/">
The Debian Project</a> 
have released the
<a href="http://www.debian.org/doc/manuals/debian-euro-support/">
Debian Euro HOWTO</a>
by Javier Fernndez-Sanguino Pea which details how to enable support for
the symbol in your Linux system.  Much of the advice will be of use to
users of distributions other than Debian.
<p>
Long-term, the best solution may be a move towards Unicode. This is
particularly the case when interoperability with Windows systems is
required.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Athlon/Duron and Linux Bug
</FONT>
</H3> 
A bug in AMD's Athlon family of processors has been
<a href="http://www.theregister.co.uk/content/3/23749.html">
reported</a>
on TheRegister, following an earlier
revelation by
<a href="http://www.gentoo.org/">Gentoo Linux</a>.  The issue relates to
extended memory paging sizes and is a bug in the processor, not the kernel.
Those using Linux 2.4 kernels, and AGP may experience problems with memory
corruption.  The fix is to pass the option "mem=nopentium" to the kernel at
boot-time (via GRUB or LILO).  Gentoo have a good description of the
situation on their main webpage at the moment, and an analysis of how this
was neglected for so long (since September 2000!).

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Linux Adoption
</FONT>
</H3> 


<P>     
<a href="http://www.theregister.co.uk/">
TheRegister.co.uk</a>
recently
<a href="http://www.theregister.co.uk/content/4/23667.html">
reported</a>
that Korea is to convert 120K civil servants to Linux desktop use.  This
appears to be as much a fightback by local favourite Haansoft (producers of
Hancom Linux, and HancomOffice) as a victory for Linux, but it is still
good news.
<p>
In a separate development, NewsForge
<a href="http://www.newsforge.com/article.pl?sid=02/01/09/1252220&mode=nocomment">
reports</a> that
Red Hat India is helping to introduce GNU/Linux as part of a scheme to meet
the software needs of the Indian education system. The program will include
not only software, but also free training to help get the scheme off the
ground.
<p>
Spinning the globe again, this time to China, we see more penguins on the
march.  Linux Today have a
<a href="http://linuxtoday.com/news_story.php3?ltsn=2002-01-08-025-20-NW-MS">
report</a>
that Linux is making an impression on many in China.  Apparently the
Chinese Academy of Sciences have published a report highlighting the
savings which could be achieved by using Linux as an alternative to
Microsoft solutions.  This follows a Gartner
<a href="http://www.gartner.com/DisplayDocument?doc_cd=103604">
report</a> that Microsoft recently lost out on a major IT investment in
China, while indigenous firms including Red Flag Linux were favoured.


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Penguin Art
</FONT>
</H3> 

<P> 
A new issue of TUX (Terminator Unit X) online comic is now available at:
<a href="http://www.thelinuxreview.com/TUX/">
http://www.thelinuxreview.com/TUX/</a>.  the reports of TUX's death have
been greatly exaggerated. 
<P>
Also in the artistic vein, 
<a href="http://www.ibm.com/">IBM</a> have updated their
<a href="http://www-1.ibm.com/servers/eserver/linux/fun/?t=gr,p=LinuxAnimation">
Linux Cartoons</a>
page. Flash or Real Player required.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Linux Trojan Found
</FONT>
</H3> 


<a href="http://www.qualys.com">
qualys.com</a>
have 
<a href="https://www.qualys.com/pr/release_01_09_02.html">
announced</a>
that they have discovered a Linux Trojan, in the wild.
This follows qualys's discovery of a very similar linux trojan 
<a href="http://slashdot.org/article.pl?sid=01/09/08/019246">
last year</a>.  This story was also
<a href="http://www.newsbytes.com/news/02/173408.html">
picked up</a> by Newsbytes.com, and from there Slashdot 
<a href="http://slashdot.org/article.pl?sid=02/01/05/230233&mode=nested">
got in on the act</a>.  To be infected, you must execute the trojan
as root, so there is likely to be a need for some sort of social
engineering in getting this one to propagate.  Main risk would be if a
binary in a Linux distribution became infected, since most people trust the
binaries on their install media.  At the very least, this is another very
good reason to be very very careful what you do as root.


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">DOSSIER, Documentation Source
</FONT>
</H3> 


<P>
<a href="http://www.ptf.com/dossier">
DOSSIER</a>
is a convenient new way to get printed
documentation for Free and Open Source software.  Current topics include
"Email", "File Systems", "Kernel", PostgreSQL", "Python", and "Text".  The
demand-printed volumes may be ordered from 
<a href="http://www.bsdmall.com">
BSDMall</a>.
The motivation and rationale for DOSSIER are covered in 
"<a href="http://www.daemonnews.org/200201/meta.html">
DOSSIER and the Meta Project (Part 1)</a>",
in 
<a href="http://www.daemonnews.org">
Daemon News</a>.



<a name="distro"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Distro News</font></H3></center>

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">BrlSpeak
</FONT>
</H3> 
BrlSpeak is a new mini-distribution of Linux that comes with support for
<STRONG>braille</STRONG> and <STRONG>speech</STRONG> built-in.  The objective
is to offer an easy-to-install solution for blind persons who wish to install a
Linux distribution on their computer without any assistance from a sighted
pereson.  BrlSpeak provides a built-in preconfigurer so that you should be able
to preconfigure the BrlTty Makefile before starting Linux.  Compilation and
automated activation of the braille device is the next step, and will be
performed when booting the distrib.  BrlSpeak was based on Matthew campbell's
ZipSpeak mini-distribution, that's why it contains the SpeakUp screen reader
for supporting speech synthesizers.  The BrlSpeak is available in many
languages.  To download it, visit the 
<a href="http://www.audiobraille.org/blinux/brlspeak.html">
BrlSpeak Projet Home Page</a>.
<p>
Author: Osvaldo La Rosa, freely distributable, UMSDOS mini-distribution,
size: 36MB, available as: zip or iso, website: 
<a href="http://www.audiobraille.org/blinux/brlspeak.html#english">
en</a>,
<a href="http://www.audiobraille.org/blinux/brlspeak.html#francais">
fr</a>,
<a href="http://www.audiobraille.org/blinux/brlspeak.html#nederlands">
nl</a>.
Any contributions welcome!



<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Debian
</FONT>
</H3> 

<a href="http://www.debian.org/">
Debian GNU/Linux</a>
2.2r5 has been released.  This fifth revision adds security updates and
some bug fixes to the stable `potato' release.  A list of FTP and HTTP
mirrors is available at
<a href="http://www.debian.org/distrib/ftplist">
http://www.debian.org/distrib/ftplist</a>.
Point apt (see the sources.list(5) manual page) at an up to date mirror and
then run apt-get update; apt-get upgrade
The complete list of all accepted and rejected packages together with
rationale is on the 
<a href="http://people.debian.org/~joey/2.2r5/">
preparation page</a>
for this revision
<P>
It is a good idea to keep an eye on
<a href="http://security.debian.org/">
http://security.debian.org/</a>
or to subscribe to the debian security announce mailing list.  There have
been quite a few security announcements in the past month.


<p>
<hr noshade width="20%">
<p>

Debian Weekly News
<a href="http://www.debian.org/News/weekly/2002/2/">
reported</a> that
new "Debian on CD" Web Pages have been 
<a href="http://www.debian.org/CD/">
launched</a>.
These replace the
old pages on 
<a href="http://cdimage.debian.org/">
cdimage.debian.org</a>,
which "were often criticised by visitors of the website". The new pages
feature improved documentation, direct download links for images, a CD
vendor list Apart from an extended FAQ, the new pages offer direct download
links for CD images, a list of CD vendors, artwork, and info on
<a href="http://atterer.net/jigdo/">
jigdo</a>,
the new distribution scheme for downloading CD images from any normal
Debian mirror.

<p>
<hr noshade width="20%">
<p>


<P>
<a href="http://www.linuxtoday.com/">Linux Today</a>
highlighted a 
<a href="http://people.debian.org/~jgb/debian-counting/">
report</a>
on the size of Debian 2.2, which includes
more than 55,000,000 physical SLOC:
The COCOMO model estimates
that its cost would be close to $1.9 billion USD to develop
Debian 2.2.


<p>
<hr noshade width="20%">
<p>


<P> 
Also highlighted by 
<a href="http://www.linuxtoday.com/">Linux Today</a>
was this
<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=129604">
bugreport</a>, which comments on vulnerability notification and the Debian
Social Contract.
"Over the past few months,
the GNU/Linux community has slowly adopted a way of dealing with
security issues which closely resembles the approach suggested by
Microsoft last year: more-or-less systematic hiding of security
problems from end users, at least for some time. Some Debian
maintainers seem to participate in this process, and hold
back security fixes, waiting for events to happen which are
external and not related to the Debian project (for example,
other distributors being ready to publish fixes)."


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Mandrake
</FONT>
</H3> 

<P>
Linux Planet have started a 'Month Later'  addition to their Distribution
Watch section.  The first distro to receive this 
<a href="http://www.linuxplanet.com/linuxplanet/reviews/4000/1/">
second look</a>
is Mandrake 8.1.
The review discusses the process of getting settled in and smoothing
out the routine bumps and curves of this distribution.


<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Red Hat
</FONT>
</H3> 

The Washington Post Washtech.com site has
<a href="http://www.washtech.com/news/media/14759-1.html">
reported</a>
that AOL Time Warner is in talks to buy Red Hat.  Everything is very vague
("fluid" appears to be the official term), so it is difficult to know what
the chances are such a deal actually coming off.  Andrew Orlowski of
TheRegister is somewhat
<a href="http://www.theregister.co.uk/content/7/23746.html">
sceptical</a>
about the rumours.  He also makes some good comments about what the
wider implications of such a deal could be.




<a name="commercial"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Software and Product News</font></H3></center>



<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">GUI Based DSSSL/XSLT DocBook Tool Released
</FONT>
</H3> 
<P>  
<a href="http://www.commandprompt.com">
Command Prompt</a> is pleased to announce the release of DocPro 0.2.0.
<a href="http://www.commandprompt.com/entry.lxp?lxpe=2">
DocPro</a>
is a tool for professional technical authors whom maintain
a large amount of SGML/XML based documentation. DocPro will take any DocBook
document and transform it into a user defined format (Postscript, HTML
etc...). 
<P>
DocPro will correctly transform multiple documents, to multiple output
formats. It includes the capability to arbitrarily set font sizes, margins,
callout definitions etc... via a GUI interface. 
<P>
DocPro currently runs on x86 Linux only, though there will be a release
for YellowDog Linux (PPC) and MacOS X shortly. The Deluxe version of DocPro
comes with the popular DocParse tools for converting HTML to DocBook.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Adobe GoLive 6 Integrates Zend PHP Debugger
</FONT>
</H3> 

<P> Adobe Systems  will include 
<a href="http://www.zend.com">
Zend</a>'s
PHP Debugger in its new release of GoLive 6, its flagship product for Web
site development. This will give GoLive developers integrated access to
advanced PHP debugging for their toughest applications and dynamic Web
sites using scripting languages.

<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">CxProtect
</FONT>
</H3> 


<P>
<a href="http://www.calibretechnologies.com/CxProtect.html">
CxProtect</a>
is an AntiVirus Solution for Linux Mail Servers.  It is a binary based
solution that using the Command AntiVirus API.  The software offers
detection and disinfection of attachments being transported via the Linux
Mail Server.  The only change required to the existing Sendmail.cf is to
register CxProject as the MDA.  Post-install configuration is done via a
web browser interface.
<P> Download available at
<a href="http://www.calibretechnologies.com/downloads/CxProtect.tar.gz">
http://www.calibretechnologies.com/downloads/CxProtect.tar.gz</a>




<P> <hr> <P> 
<!-- =================================================================== -->
<H3><IMG ALT=" "   SRC="../gx/bolt.gif">
<FONT COLOR="green">Mahogany 0.64 Released
</FONT>
</H3> 

<P>
A new release of
<a href="http://mahogany.sourceforge.net/">
Mahogany</a>,
has been made.
Mahogany is an OpenSource cross-platform mail and news client,
available for X11/Unix and MS Windows platforms. It supports many of
the internet protocols and standards, including POP3, IMAP4, SMTP and NNTP.
Mahogany also supports MIME and many common Unix mailbox formats.
<p>
Source and binaries for a of
Linux and Unix systems as well as binaries for Win32 are 
<a href="http://sourceforge.net/project/showfiles.php?group_id=3100">
now available</a>.






<!-- *** BEGIN copyright *** -->
<P> <hr> <P> 
<H5 ALIGN=center>
Copyright &copy; 2002, Michael Conry and 
the Editors of <A HREF="mailto:gazette@ssc.com"><I>Linux Gazette</I></A>.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 75 of <i>Linux Gazette</i>, February 2002</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">Secure Printing with PGP</font></H1>
<H4>By <a href="mailto:grahjenk@au1.ibm.com">Graham Jenkins</a></H4>
</center>
<P> <HR> <P>  

<!-- END header -->




<h2>The Brother Internet Print Protocol</h2>

<p>A recent article
<a href="../issue65/jenkins.html">
"Internet Printing - Another Way"</a> described a printing protocol which
can be used with some 
<a href="http://www.brother.com">Brother</a> printers. It enables users
of Windows machines to send a multi-part base-64 encoded print file via
email directly to a Brother print server.</p>

<p>The article went on to show how the functionality of the Brother print
server can be implemented in simple Perl program which periodically polls
a POP3 server to check for jobs whose parts have all arrived. When such a
job is detected, its parts are downloaded in sequence and decoded for
printing.</p>

<p>A subsequent
article <a href="../issue68/jenkins.html">
"A Linux Client for the Brother Internet Print Protocol"</a> showed a 
simple client program which can be used on Linux workstations for sending
print jobs to a Brother print server. That program was implemented as a
shell script which split an incoming stream into parts and placed them in
a scratch directory for subsequent encoding and transmission.</p>

<p>I have since developed a Perl client program which processes the incoming
stream on-the-fly and requires no temporary storage. This is, of course, a
much neater way to do things. The down-side is that there is no way of
ascertaining the total part-count until the last part is being processed. A
slight modification to the server program was therefore required to
accomodate an empty "total-parts" field on all except the final part.</p>

<h2>A Hole Big Enough to Drive a Truck Through</h2>

<p>The whole arrangement as outlined above has been in use at my place
for several months, and has saved us a whole lot of time and trouble.
However, as pointed out by one reviewer, what we really have here is a
security hole big enough to drive a truck through! Anybody in the
whole wide world can send celebrity pictures to your color printer,
and there's not a lot you can do about it.</p>

<p>Somebody else asked why we go to the trouble of splitting a large
job into parts without first trying to compress it. And indeed there
are a great number of jobs whose size can be significantly reduced through
compression.</p>

<p>Then there were the Windows (and other) users, who thought that
everything should be written in Perl for portability. And the Standards
Nazis, who thought that the job parts should be sent as 'message/partial'
entities in accordance with RFC 2046.</p>

<h2>Who's Printing Pamela Anderson Pictures?</h2>

<p>Of all the issues outlined above, the most serious is indubitably that of
client authentication. And the solution is blindingly obvious; why not
use one of the Public Key Encryption mechanisms now available?
What we need here is for the sender to digitally sign the entire message
using his private key. Upon receipt at the server, the message can then
be authenticated by application of the sender's public key. There's no
need for any secret key-entry rites at the server, so the whole server
operation can be automated.</p>

<p>A message signed in this fashion can be signed in 'clear' form; 
the message itself is then sent as is, with a digital signature appended to
its end. If you elect not to use 'clear' signing, the message will
(if usual defaults are accepted) actually be compressed and the
signature will be incorporated therein. This comes pretty close to what
we need!</p>

<p>There is a set of Perl modules (Crypt::OpenPGP) which can perform the
necessary signature and verification procedures, so we can actually write
the entire client and server programs in a portable form. I had some
difficulty with installing these, since they require that a number
of other modules be installed, and they require the 'PARI-GP' mathematics
package. I elected instead to use
<a href="http://www.pgpi.org">pgp-2.6.3ia</a>;
<a href="http://www.gnupg.org">GnuPG-v1.0.6</a> will also
work with the programs in this article.</p>

<p>There are a couple of Perl modules (Crypt::PGPSimple and PGP::Sign) which
can be used to call pgp-2.6.3ia and its equivalent executables, but each
of them creates temporary files, and that's something I try to avoid where
possible.</p>

<h2>Appeasing the Standards Nazis</h2>

<p><a href="http://www.faqs.org/rfcs/rfc3156.html">RFC 3156</a>
 ("MIME Security with OpenPGP") describes how the OpenPGP
Message Format can be used to provide privacy and authentication using
MIME security content types. In particular, it decrees that after signing
our message by encrypting it with our private key, we should send it
as a 'multipart/encrypted' message. The first part should contain an
'application/pgp-encrypted' message showing a version number in plain-text
form; the second part should contain our actual PGP message.

<p>This is a
bit over-the-top, but the overhead is small, and the whole deal is
easily done using the Perl MIME::Lite module, as shown in the
'SEPclientPGP.pl' program hereunder.</p>

<p>So how do we send a long message which needs to be broken into parts
for passage through intermediate mail servers? RFC 3156 tells us we should
use the MIME message/partial mechanism
(<a href="http://www.faqs.org/rfcs/rfc2046.html">RFC 2046</a>) instead! I
think what they actually mean is "as well". So our output from
'SEPclientPGP.pl' is actually fed into the 'SplitSend.pl' program (also
hereunder) which extracts the message "To:" and "Subject:" lines and
replicates them into each sequentially numbered 'message/partial' component
that it generates.</p>

<h2>The Client Program</h2>

<p>Here's the
<a href="misc/jenkins/SEPclientPGP.pl.txt">client program</a>.
It's pretty much self-explanatory. A pipe
to the 'SplitSend.pl' program is opened for output. If
the passphrase is supplied on the command-line (dangerous, but sometimes
necessary!), it is planted in an environment variable.</p>

<p>The multipart MIME message as previously described is then constructed,
taking its second body part from a pipe fed by the PGP executable. If the
executable doesn't find a suitable passphase in the appropriate environment
variable, it requests it in a terminal window.</p>

<pre>
#!/usr/local/bin/perl -w
# @(#) SEPclientPGP.pl	Secure Email Print client program. Ref: RFC 3156.
#			Takes incoming stream and generates PGP-signed message
#			which is piped to split-and-send program for email
#			transmission to server. Requires 'pgp' program.
#			Graham Jenkins, IBM GSA, Dec. 2001. [Rev'd 2001-12-30]

use strict;
use File::Basename;
use MIME::Lite;
use IO::File;
use Env qw(PGPPASS);

die "Usage: ".basename($0)." kb-per-part destination [passphrase]\n".
    " e.g.: ".basename($0)." 16 lp3\@pserv.acme.com \"A secret\" &lt; report.ps\n".
    "       Part-size must be &gt;= 1\n"
  if ( ($#ARGV &lt; 1) or ($#ARGV &gt; 2) or ($ARGV[0] &lt; 1) );

my $fh = new IO::File "| /usr/local/bin/SplitSend.pl $ARGV[0]";
if( defined($ARGV[2]) ) {$PGPPASS=$ARGV[2]}
if( ! defined ($PGPPASS)) {$PGPPASS=""}	# Plant passphrase in environment and
my $msg = MIME::Lite-&gt;new(		# create signed message.
                To      =&gt; $ARGV[1],
                Subject =&gt; 'Secure Email Print Job # '.time,
                Type    =&gt; 'multipart/encrypted');
$msg-&gt;attr  (   "content-type.protocol" =&gt; "pgp-encrypted");
$msg-&gt;attach(   Type    =&gt; 'application/pgp-encrypted',
                Encoding=&gt; 'binary',
                Data    =&gt; "Version: 1\n");
$msg-&gt;attach(   Type    =&gt; 'application/octet-stream',
                Encoding=&gt; 'binary',
                Path    =&gt; "/usr/local/bin/pgp -fas - |");
$msg-&gt;print($fh);			# Pipe the signed message into a
__END__					# split-and-send program.
</pre>

<h2>Split-and-Send</h2>

<p>Here's the 
<a href="misc/jenkins/SplitSend.pl.txt">split-and-send program</a>.
The main loop at the end works
just as described above - extract the destination and subject fields,
accumulate lines until we are about to exceed the message-size limit
supplied as a parameter, then feed what we have to an output routine.</p>

<p>The output routine needs to re-insert the destination and subject
fields, and also insert a message-identifier, part-number and total-part-count.
The total-part-count is only required on the final part. All fairly
easy - except we don't know whether the current part is the final part
until we look for the next part. So we get around this by using a double-buffer
arrangement, where we don't actually output a buffer's contents until we
have the next buffer.</p>

<p>Using MIME::Simple in this program is really overkill; however, what
it does accomplish is that it tries to find an appropriate mailer
program on whatever platform it executes.</p>

<pre>
#!/usr/local/bin/perl -w
# @(#) SplitSend.pl	Splits and sends an email message (Ref: RFC 1521, 2046).
#			Graham Jenkins, IBM GSA, December 2001.

use strict;
use File::Basename;
use MIME::Lite;
use Net::Domain;
my ($Id,$j,$Dest,$Subj,$part,$InpBuf,$OutBuf,$Number,$Total);

die "Usage: ".basename($0)." kb-per-part\n".
    "       Part-size must be &gt;= 1\n" if ( ($#ARGV != 0) or ($ARGV[0] &lt; 1) );

$Id=(getlogin."\@".Net::Domain::hostfqdn().time) or $Id="unknown_user".time;
$Number = 0; $Total = ""; $OutBuf=""; $InpBuf=""; print STDERR "\n";

sub do_output {				# Output subroutine.
  die basename($0)." .. destination undefined!\n" if ! defined($Dest);
  $Subj = ""                                      if ! defined($Subj);
  if ($OutBuf ne "") {			# If output buffer contains data, 
    $Number++;				# increment Number, and check whether
    $Total=$Number if $InpBuf eq "";	# it is the last buffer.
    print STDERR "Sending part: ", $Number,"/",$Total,"\n";
    $part = MIME::Lite-&gt;new(
              To      =&gt; $Dest,		# Construct a message containing the
              Subject =&gt; $Subj,		# output buffer contents.
              Type    =&gt; 'message/partial',
              Encoding=&gt; '7bit',
              Data    =&gt; $OutBuf);
    $part-&gt;attr("content-type.id"     =&gt; "$Id");
    $part-&gt;attr("content-type.number" =&gt; "$Number");
    $part-&gt;attr("content-type.total"  =&gt; "$Total") if ($Number eq $Total);
    $part-&gt;send;			# Send the message.
  }
  $OutBuf = $InpBuf;			# Move input buffer contents to
  $InpBuf = ""				# output buffer and exit.
}

while (&lt;STDIN&gt;) {			# Main loop.
  if ( (substr($_, 0, 3) eq "To:")      &amp;&amp; (! defined($Dest)) ) {
    $Dest = substr($_, 4, length($_) - 4); chomp $Dest; next }
  if ( (substr($_, 0, 8) eq "Subject:") &amp;&amp; (! defined($Subj)) ) {
    $Subj = substr($_, 9, length($_) - 9); chomp $Subj; next }
  if ( (length($InpBuf . $_)) &gt; ($ARGV[0] * 1024) ) {do_output}
  $InpBuf = $InpBuf . $_
}
foreach $j (1,2) {do_output}		# Flush both buffers and exit.
__END__
</pre>

<h2>The Art of Jigsaw Assembly</h2>

<p>There is no guarantee that the segments of our print-job will arrive
at the server in the same order as they left the client. We cannot be sure
that there will even be the same number of segments, since message-transfer
agents along the way are allowed to re-assemble message/partial entities as
they see fit.  So what we have at the server end is a set of jigsaw
puzzles, with the pieces of each puzzle being related by a common
message-identifier, and their placement within that puzzle being
determined by their part-numbers.</p>

<p>For a full listing of the 'SEPserverPGP.pl', see the attached
<a href="misc/jenkins/SEPserverPGP.pl.txt">text version</a>. I haven't
bothered to replicate all of it hereunder, since much of it is the
same as the program shown in "Internet Printing - Another Way".</p>

<p>Basically, the program is intended for invocation via an entry in
'/etc/inittab', and loops continually thereafter, with half-minute
pauses between each loop. During each loop, it visits the mailboxes
of one or more printer-entities on a POP3 server, and deletes any
stale articles therein before tabulating the message-id's and
part-numbers of the remaining articles. When it finds a full set of
message/partial entities, it sucks each of them in part-number
sequence from the server, and throws their contents into a pipe.
The program-extract hereunder shows what happens then.</p>

<p>The relevant message content is deemed to begin at the
"-----BEGIN.." line in the first part. For subsequent parts, it begins
after the first blank line once an "id=.." line has been seen.</p>

<p>Once in the pipe, the composite message content passes to the PGP
executable for validation/decryption, and thence to an appropriate printer. 
Validation output is passed to a scratch file, and then recovered from
there for logging. A validation failure results in no output to the
printer.</p>

<pre>
          for ($k=1;$k&lt;=$tp{$part[0]};$k++){	# Check if we have all parts.
            goto I if ! defined($slot{$part[0]."=".$k});
          }					
          $fh=new IO::File
           "| /usr/local/bin/pgp -f 2&gt;$tmp | lpr -P $user &gt;/dev/null" or goto I;
          for ($k=1;$k&lt;=$tp{$part[0]};$k++){	# Assemble parts into pipe. 
            $message=$pop-&gt;get($slot{$part[0]."=".$k});
            $l=0; $buffer=""; $print="N";
            while ( defined(@$message[$l]) ) {
              chomp @$message[$l]; 		# Part 1: start at "-----BEGIN",
              if( $k == 1 ) {			# stop before 2nd blank line.
                if( @$message[$l]=~m/^-----BEGIN/ ) { $m=-2;  $print="Y"}
                if( $print eq "Y" ) {
                  if( @$message[$l] eq "" ) { $m++; if( $m &gt;= 0)   {last} } 
                  $buffer=$buffer.@$message[$l]."\n"
                }
              }					# Part 2,3,..: skip 1 blank line
              else {				# after "id=", then start; stop
                if( $print eq "Y" ) {		# before next blank line.
                  if( @$message[$l] eq "" )                        {last} 
                  $buffer=$buffer.@$message[$l]."\n"
                }
                if( @$message[$l]=~m/id=/ )                  {$print="R"}
                if((@$message[$l] eq "") &amp;&amp; ($print eq "R")) {$print="Y"}
              }
              $l++;
            }
            print $fh $buffer or goto I;
          }
          $fh-&gt;close || goto I;
          open $fh, $tmp;
          while (&lt;$fh&gt;) { chomp; syslog('info', $_) }
          close $fh;
          for ($k=1;$k&lt;=$tp{$part[0]};$k++){
            $pop-&gt;delete($slot{$part[0]."=".$k})
          }
          goto I;
        }
J:    }	
    }
I:}
</pre>

<h2>Copycat Crime</h2>

<p>In the scheme outlined above, there is nothing to prevent a determined
trouble-maker replicating and replaying an entire authenticated message. To
cover this possibility, you need to retain each log entry for a week or
so, and
to reject any incoming message having a corresponding signature and
signature-date.</p>

<p>If, in addition, you wish to prevent someone from viewing the actual
data travelling to your printer as it traverses the Internet, you need
to change the PGP executable parameters at the client
end so that the data is encrypted with the server's public key as well
as signed; you will also need to feed a passphrase into the PGP executable
at the server end.</p>

<h2>GNU Privacy Guard</h2>

<p>I have a mental image of somebody reading this and saying: "How come he's
using pgp-2.6.3ia if he doesn't like un-necessary temporary files?" It's a
good question, because pgp-2.6.3ia creates temporary files both during
encryption and during decryption.</p>

<p>To get around this, or to comply with whatever laws are applicable in
your country, you may wish to use GnuPG-v1.0.6 (or later version
of the same) instead. In the client program, you will need to change the
parameters with which the executable is called. And you won't be able to
plant your passphrase in an environment variable.</p>

<p>I have attached for your interest a 'Lite'
<a href="misc/jenkins/SEPWincl.pl.txt">GPG client program</a> which will
execute on Windows machines with 'out-of-the-box' ActiveState Perl or
IndigoPerl, and requires no extra modules.</p>

<p>During decryption to a pipe, the 'gpg' executable actually outputs data
to the pipe until (and in some cases, after) it encounters a problem. So
you will need to send your output to a scratch file - then send that scratch
file to your printer if the decryption process completed satisfactorily.</p>




<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Graham Jenkins</H4>
<EM>Graham is a Unix Specialist at IBM Global Services, Australia. He lives
in Melbourne and has
built and managed many flavors of proprietary and open systems on several
hardware platforms.</EM>

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2002, Graham Jenkins.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 75 of <i>Linux Gazette</i>, February 2002</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">A Pioneer for a New Century -- Alan Turing, part 1</font></H1>
<H4>By <a href="mailto:jones@systemtoolbox.com">G James Jones</a>
<BR>Originally published at <A HREF="http://www.systemtoolbox.com/">System Toolbox</A>.  Reprinted with permission.</H4>
</center>
<P> <HR> <P>  

<!-- END header -->




<P>
Last time, we took a look at the life and some of the achievements,
and near achievements, of <A
HREF="http://www.systemtoolbox.com/article.php?articles_id=43">Charles
Babbage</A>, the Godfather of Computing.  Babbage made great leaps in
our understanding of what would become the field of computer science
by considering, and then demonstrating, that mathematical processes
could be carried out quickly, repeatedly and without error through
mechanical means.  This was such a simple idea, but it was ground
breaking in its implications.  Babbage had been frustrated by the
errors that crept into the lookup tables that serious mathematicians
used for their calculations.  His drive to create calculating machines
grew out of the desire to remove these errors from the process of
creating those tables.  Babbage was ahead of his time. He was a
pioneer of the 19th century. If his work hadn't been rediscovered, his
achievements would have been almost entirely forgotten by the time the idea
of <I>automatic calculations</I> through machines began to take hold
in the 20th century.

<P>
One of the proponents of such <I>automatic, mechanical,
calculations</I> was a mathematician in King's College, Cambridge; a
young Alan Turing.  It's almost a natural progression for this series
to move from the <I>cog wheel brains</I> of Mr. Babbage to the
<I>theoretical thought machines </I> of Alan Turing.  Out of the
necessity to answer one of the most critical mathematical questions of
his time, Turing started down the road of what would become the fields
of modern computer science and cryptography.  As one of the single men
whose achievements helped turn the tide of World War II, he is a hero.
As developer of some of the original ideas about digital computers and
for helping solve Hilbert's final question of Mathematics, he is a
genius.  Being human, his life is ultimately marked by complexity and,
unfortunately... tragedy.

<P>
This article will focus on Alan Turing's life leading up to, and
including, his invention of the "Turing Machine."  Next month, we will
tackle his achievements in cryptography during World War II, his ideas
on the digital computer, and the controversial events that led to this
hero's, one of my heros, tragic death.

<P><H3>Early Signs of a Remarkable Mind</H3>

<P>
Alan Mathison Turing was born to Julius Mathison Turing, an Indian
Civil Service officer, and Ethel Stoney on June 23, 1912 in
Paddington, England. Alan's father was still under active commission
in India and feared the risks of raising family in the remote
provinces over which he held jurisdiction.  After Alan's birth, his
father decided to leave his family in England instead of risking those
uncertainties, choosing instead to make the trip back and forth
between India and England while leaving his family with friends in
England.

<P>
Like Babbage (and many others in this field), Turing showed early
signs of, what I like to call, the "personality disorder" that leads
to a such vocations as engineering and mathematics.  Alan's natural
inquisitiveness was often confused with mischief, where "planting"
broken toys in hopes of resurrecting them was probably interpreted as
"getting rid of the evidence."  At a very early age, he is said to
have taught himself to read in only three weeks and his discovery of
numbers brought about the distracting habit of stopping at every
street light in order to find its serial number. At the age of seven,
while on a picnic in Ullapool, Scotland, Alan had the idea of
gathering wild honey for the afternoon's tea.  By plotting the flight
paths of the bees among the heather, he was able to find the
intersection point that marked their hive and provide an unexpected
treat for the family.

<P>
There's another anecdote that made an appearance in Neal Stephenson's
spectacular work of fiction, <I>The Cryptonomicon</I>, in which Turing
plays a supporting role.  It seems that Alan had a bicycle that had a
problem with its chain. He discovered that the chain would dislodge
itself from the gears after a regular, repeatable, number of
revolutions.  At first, the young Alan would count the revolutions of
the gears throughout his ride until it was time for the chain to be
forced to derail.  He would then get off his bike and re-adjust the
chain.  As this got to be cumbersome over longer treks, he finally
rigged a mechanical device that would maintain the count and readjust
the chain itself. Supposedly, it never occurred to him to just buy a
new chain to solve the problem. I believe that it is more likely that
the chain's issues presented a unique problem set for Turing's mind to
solve.  It challenged him to think in a different way.  It was
challenging and fun; buying a chain was not.


<p>
<H3>Getting an Education</H3>

<P>
At the age of six, Alan's mother enrolled him in a private day school,
St. Michael's, in order for him to learn Latin.  Thus began Alan's
introduction into the system that would shape his intellectual and
personal development for the next fourteen odd years.  The English
educational system would prove to be both a conflict and a
collaboration with Turing's sensibilities.  The collaboration is
epitomized by his early respect for rules and their relationship to
his concept of fairness.  These ideas are probably best illustrated by
an anecdote of his mother skipping part of <I>The Pilgrim's
Progress</I>. Judging one section to be too theologically weighty for
the youngster, she had skipped it while reading aloud in order to
spare him.  Alan objected and felt that the story was ruined; skipping
parts, in his sensibility, was against the rules of reading.

<P>
The conflict, in his relationship with the English school system, was
partially rooted in Alan's resolve that he was nearly always right.
Personal opinions were held as closely as fact.  He was one of those
people that <I>knows</I> something and doesn't <I>think</I>,
<I>feel</I> or have an <I>opinion</I> on them.  This type of mind set
was definitely at odds with an education system built on tradition and
firm in the belief that it <I>knew</I> what was best for its charges.

<P>
Early on, Alan was marked with the label of "genius" by the
Headmistress of St. Michael's, a proclamation that would be echoed a
few years later by a gypsy fortune teller.  Despite such
proclamations, Alan was required to follow the natural order of the
English school system and, upon finishing his studies at
St. Michael's, followed his brother's path to his next school,
Hazelhurst and then to his first <I>public school</I>,
Marlborough. Public school showed the ugly side of the English school
system and Alan had his first troubles with bullies, proclaiming that
he learned to run fast in order to "avoid the ball."

<p><H3>Brushes with Science</H3>

<P>
Alan was introduced to science through Edwin Tenney Brewster's
<I>Natural Wonders Every Child Should Know</I>.  Brewster's book
sought to introduce topics that help children understand their place
in the world and what they had in common and how they differed with
and from other living things.  This discovery, and that of
mathematics, would sustain Turing in a life-long love affair.  The
rules and discoveries of science and mathematics fit his general
sensibilities of the world; it had order and could be explored with
reason. Sense could be made of life if observed in the correct
way. Brewster's book was probably is the first to link the concept of
machine and biology in Alan's mind, explaining that the human body was
a complex <I>machine</I> with complicated processes that carried out
the duties and chores of maintaining life.

<P>
While school offered many torments, it also opened up a world of
knowledge to the young Turing.  He showed an early interest and
ability in languages, especially French, and treated it as a code that
would allow him to carry on covert communications.  Also, having
always had a fascination with various process oriented activities,
Alan was exposed to chemistry for the first time and fell instantly in
love.  Turing would go on to dabble in chemistry for the rest of his
life, often co-opting family basements and guest rooms as chemistry
labs.  His habit of concocting various chemical solutions would later
play a part in his untimely death as a adult.

<p><H3>Sherborne</H3>
<P>
At the age of 13, Alan was enrolled to attend the Sherborne boarding
school.  At the time of the school's summer term of 1926, England had
just been brought to a stand still by the first day of the general
strike.  No buses or trains were running.  Turing made something of a
stir, being reported in the local newspaper, by bicycling the sixty
miles from his home in Southampton to Sherborne, staying overnight in
an Inn at a halfway point.

<P>
Sherborne and Alan were not the best match.  Sherborne, as many
English schools of the time, was concerned with creating
<I>citizens</I> and not <I>scholars</I>.  The headmaster, at the time
of Alan's enrollment, espoused the idea that school was originally
created to be a miniature society.  Students would learn to navigate
the complexities of their later adult lives by learning to survive the
power plays of their current public school life. Authority and
obedience held more sway than the "free exchange of ideas" and the
"opening of the mind."  Not long after arriving, the already shy
Turing became even more withdrawn.

<P>
Alan sought solace in his books and course work.  In 1927, he was able
to find the infinite series of the "inverse tangent function" from the
trigonometric formula for tan1/2x (tan<SUP>-1</SUP>x = x -
x<SUP>3</SUP>/3 + x<SUP>5</SUP>/5 - x<SUP>7</SUP>/7 ...) without the
aid of elementary calculus (Alan had yet to be exposed to it).  It was
a significant enough achievement to have his mathematics instructor
include himself among the roster of people that had proclaimed the
boy's genius.  Such a proclamation didn't hold much sway with the
school.  While the accomplishment was extraordinary, Sherborne's
headmaster, not a particular fan of science, felt he was wasting his
time and was in danger of becoming a scientific specialist and
<I>not</I> an educated man.  This disrespect of science was not
uncommon at the school.  Alan's autumn form-master, a classicist who
was enthralled with Latin, called scientific subjects "low cunning"
and felt that the only reasons that the Germans lost World War I was
because they placed to much faith in science and engineering and not
enough in religious thought and observance.

<P>
Alan's dogged persistence to study such <I>low</I> subjects, finally
earned him some respite.  As long as he made a few concessions to the
formalities of the school, he was left to his own devices.  In 1928,
he became enthralled with the theory of relativity and lost himself in
the English translation of Einstein's <I>Relativity: The Special and
General Theory</I>.  Probably one of only a few, if any, sixteen year
olds who actually grasped Einstein's theories, Turing was able to
fully grasp Einstein's doubts of the veracity of Galilei-Newtonian
laws.  He was even able to deduce Einstein's Law of Motion ("the
separation between any two events in the history of a particle shall
be a maximum or minimum when measured along its world line") from his
readings alone (it wasn't specifically stated in the text). By 1929,
Alan had begun to study quantum physics.  It was a heady time as
Schroedinger and others turned what was considered a "dead" science on
its head.  Schroedinger's quantum theory of matter was only three years
old and Alan and his friend Christopher Morcum immersed themselves in
these emerging discoveries.  Alan was in his element.

<p><H3>King's College</H3>
<P>
Turing had originally planned on attending Trinity College at
Cambridge.  As far as he was concerned, it was the center of
scientific and mathematical thought in England and he wanted to
attend.  After a number of failed attempts at passing his final
examinations, more out of abstinence in engaging his "classical" work,
he finally missed a scholarship to Trinity but was able to obtain one
to King's, the college of his second choice.

<P>
King's College agreed with Alan.  Though he was still somewhat of a
social misfit, his studies and the freedom from the petty tortures of
public school life allowed him to relax and find his rhythm.  King's
also turned out to be a good fit due to the caliber of its faculty.
Turing's mathematics professor was one of the most distinguished
mathematicians of his time, G.H. Hardy, who had recently left Oxford
to take up the Sadleirian Chair at Cambridge.  He was also among 85
other students engaged in scientific study, as compared to the one or
two he had to seek out during his Sherborne days.  As happens today
with many high school geeks, college offered a chance for Alan to
emerge from his protective shell and begin to engage the world on his
own terms.

<P>
During the 20's, Cambridge had moved to establish itself as second in
the world in the field of new maths.  It had been able to stake this
claim on the developments that its faculty and students were making in
the realms of quantum theory and <I>pure</I> mathematics.  It was
widely regarded as second only to Gottingen University in Germany, a
place that supported such genius as John Von Nuemann.

<P>
Von Nuemann and Turing were to cross paths a number of times
throughout their lives.  In 1932, Turing read Von Nuemann's
<I>Mathematische Grundlagen der Quantemechanik</I> and was deeply
affected by the text.  His interest in quantum theory continued into
the studying of the works of other luminaries like Schrodinger and
Heisenberg.  This exposure to the <I>greats</I> in an emerging field
totally engaged the young Turing and set him to exploring the
questions that their discoveries raised.  It was this exposure and new
found focus that put Turing on an crash course with Hilbert's <I>Three
Questions of Mathematics</I>.

<p><H3>A Question of Mathematics and Turing Machines</H3>
<P>
In 1928, developments in <I>pure</I> mathematics seemed to be
unraveling the foundations of the field.  It seemed that the world was
on the cusp of unlocking the vary foundations of mathematics.  It
wouldn't be long before core axioms were nailed down and mathematics
would be just a set of easily applied rules that would lead directly,
inevitably to the solution of any problem.  No problem would be beyond
the reach of mathematics.  Appropriately applied, mathematics would
make the world a better place (sounds kind of like the commotion
surrounding the Internet, doesn't it?).

<P>
It was during this period, in 1928, that Hilbert, already famous for
his development of Hilbert quantum spaces, posed a number of questions
about the core of mathematics, whose unexpected answers would shake
the field and push it into new realms of discovery and reason.
Hilbert's agenda was to find a general algorithmic procedure for
answering all mathematical inquiries, or at least proving that such a
procedure existed.

<OL>Three of those questions at the heart of his agenda were:
	<LI>Was mathematics <I>complete</I>?  Meaning, could every assertion be proven or disproven with the <I>rules</I> of math?
	<LI>Was mathematics <I>consistent</I>? Meaning, could a false statement never be proven true with the <I>rules</I> of math?
	<LI>Was mathematics <I>decidable</I>? Meaning, were there definite steps that would prove or disprove an assertion?
</OL>

<P>
While nobody, including Hilbert, had been able to offer solutions to
these questions by proof in 1928, Hilbert was confident that the
answer to each was <I>yes</I>.  In his mind, there had to be a
solution for every problem, if only to prove that it was
unsolvable. This failed assertion, as bad as it sounds, would actually
save mathematicians a lot of effort spent pursuing blind alleys. So,
it was still a solution; its a <I>math</I> thing.

<P>
The issue lay in <I>proving</I> that mathematics was <I>complete</I>,
<I>consistent</I>, and <I>decidable</I>.  At the same gathering, the
young mathematician Kurt Godel dealt a serious blow to this line of
queries, by showing that math must be <I>incomplete</I> because, as he
showed, there are assertions that can be stated that can be neither
proved nor disproved.  An assertion, encoded in the form of
mathematics, that said, in effect, "this statement is unprovable"
showed this disturbing (if you are into that sort of thing)
property. An attempt to prove it true or untrue leads to
contradiction.  At least in the form of the question phrased by
Hilbert, Godel had proved that arithmetic was incomplete.  There are
nuances to this, of course, but it was still damaging.  Godel also
showed that mathematics could <I>not</I> be proven consistent
<I>and</I> complete.  However, he was not able to shake loose an
answer to Hilbert's question as to the <I>decidability</I> of
arithmetic.

<P>
Alan's professor Hardy, for one, was happy that Godel couldn't topple
Hilbert's final question.  In his view, a mechanical process that
could perform a solution to all mathematical problems would put every
serious mathematician out of a job.  Everything would have been done.

<P>
It was time for the student to instruct the teacher, at least in part.
After a day of running, an activity that Alan found to nicely clear
the mind, he stumbled onto the idea of a machine of simple, though
improbable, design that could tackle any sort of problem put to it.
The powerful machine would only understand the digits <code>0</code>
and <code>1</code>; the first binary computer.  It would move a
read/write mechanism across an infinite tape of these numbers and,
based on their particular arrangement, solve various types of
problems.  Alan's breakthrough was that he had defined, in specific
language, what a <I>general algorithm</I> actually was.  The Turing
Machine, as his construct would be called, was a thought experiment
that helped codify the features of algorithms.  During his exploration
of the wonderful ideas that this <I>machine</I> inspired, Turing found
that, despite the simple, general, nature of his algorithm, there did
exist problems that it could not solve.  This discovery <I>proved</I>
Hilbert's assertions were incorrect, the answer to Hilbert's final
question, the <I>Entscheidungsproblem</I> was "no, mathematics is not
decidable."

<P>
The young mathematician from King's College, Cambridge had bested one
of the greatest mathematicians of his time at the age of 23.  He
gained a fair measure of acclaim for his achievement and the word
"genius" began to be tossed around again.  Had he done only this, he
would be remembered in some history books and higher math students
would get acquainted with him at some point.  At any rate, a small
amount of historical immortality, as obscure as it may be, would be
granted in his memory.  However, it was what he did next that changed
the course of human history.

<P>
Next month, we will explore the workings of a Turing Machine and
follow Alan into the war effort.  We will see how a single man's true
genius can turn the tide of war, and we will shake our heads in
disbelief at a hero's humiliation and eventual death.  Stay tuned.


<P>------

<P>
<I>&copy 2002 G. James Jones is a Microcomputer Network Analyst for a
mid-sized public university in the midwest. He writes on topics
ranging from Open Source Software to privacy to the history of
technology and its social ramifications. This article originally
appeared at System Toolbox (<a
href="http://www.systemtoolbox.com">http://www.systemtoolbox.com</a>).
Please email <a href="mailto:jones@systemtoolbox.com">me</a> and let
me know where it is being used.  This article is dedicated to the
memory of Dr. Clinton Fuelling.  Verbatim copying and redistribution
of this entire article is permitted in any medium if this notice is
preserved.</font>




<!-- *** BEGIN bio *** -->

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2002, G James Jones.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 75 of <i>Linux Gazette</i>, February 2002</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">Installing and using AIDE</font></H1>
<H4>By <a href="mailto:arielm@radar.com.ar">Ariel Maiorano</a></H4>
</center>
<P> <HR> <P>  

<!-- END header -->








<H2>Introduction</H2>

<P>
If your system was compromised, chances are that the hacker, cracker,
trojan, worm or whatever replaced system files, or installed new ones,
generally backdoors or hostile code. Imagine a replaced version of the
login program, which lets someone in with root access after supplying a
magic password (like the ones included in most rootkits),
or a trojanized ssh client, which emails server, user and password
information to someone when used (something like this happened in an
important site last year).
</P>

<P>
File integrity checkers can help us by keeping checksums or hashes, and
various attributes like size, owner, permissions, etc. of files in a database
to later, and regularly, compare this information checking for changes.
So if the login binary is replaced, or a /tmp/.hidden/backdoord is installed,
you would be alerted.
</P>

<P>
This article will try to explain how to install and use an AIDE, an open
source Intrusion Detection System (IDS) of the host-based type, or
file integrity checker, if you prefer. Quoting from the AIDE website...
</P>

<P>
"AIDE (Advanced Intrusion Detection Environment) is a free replacement
for Tripwire. It does the same things as the semi-free Tripwire and more."
</P>

<P>
The installation of the whole system will be done on a floppy disk.  We'll
check for changes in various files and directories, being a little paranoid.
That will take more time and generate more false alarms or false positives, but
I think it makes things less complicated, and, hopefully, not less secure. 
When you set up your own configuration, you can start
with my example, and then after a couple of weeks of use you will know what
should be changed.

You'll mount the disk each time you're ready to do the checks.  That requires
more steps, but if an attacker gets in, he will not be able to (A) change our
database, and (B) not even notice we check our system regularly with AIDE.
</P>

<H2>Installation</H2>

<P>
First we will make the filesystem in the floppy disk...
(mine is on /dev/fd0, drive A: under DOS, if you use B: under DOS you will use /dev/fd1 here.)
<PRE>
root@pc2:~# 
root@pc2:~# mkfs /dev/fd0
mke2fs 1.22, 22-Jun-2001 for EXT2 FS 0.5b, 95/08/09
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
184 inodes, 1440 blocks
72 blocks (5.00%) reserved for the super user
First data block=1
1 block group
8192 blocks per group, 8192 fragments per group
184 inodes per group

Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root@pc2:~# 
</PRE>
mount it, and create the aide directory...
<PRE>
root@pc2:~# 
root@pc2:~# mount /dev/fd0 /mnt/floppy
root@pc2:~# 
root@pc2:~# mkdir /mnt/floppy/aide
root@pc2:~# 
</PRE>
</P>

<P>
Now we will get the sources of AIDE, compile them in a temporary directory, install
the system in the floppy disk (pay attenton to the --prefix option when running
configure), strip the aide binary before doing the make install, and finally remove
the temporary directory...
<PRE>
root@pc2:~# 
root@pc2:~# mkdir /tmp/aide
root@pc2:~# 
root@pc2:~# cd /tmp/aide
root@pc2:/tmp/aide# 
root@pc2:/tmp/aide# wget http://www.cs.tut.fi/~rammer/aide-0.7.tar.gz
--12:54:47--  http://www.cs.tut.fi/%7Erammer/aide-0.7.tar.gz
           => `aide-0.7.tar.gz'
Connecting to www.cs.tut.fi:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 219,837 [application/x-tar]

    0K .......... .......... .......... .......... .......... 23% @  34.84 KB/s
   50K .......... .......... .......... .......... .......... 46% @  50.97 KB/s
  100K .......... .......... .......... .......... .......... 69% @  65.45 KB/s
  150K .......... .......... .......... .......... .......... 93% @  46.38 KB/s
  200K .......... ....                                       100% @   7.17 MB/s

12:54:52 (50.40 KB/s) - `aide-0.7.tar.gz' saved [219837/219837]

root@pc2:/tmp/aide# 
root@pc2:/tmp/aide# tar xvfz aide-0.7.tar.gz 
aide-0.7/
aide-0.7/Makefile.in

[...]

aide-0.7/include/compare_db.h
aide-0.7/include/gnu_regex.h
root@pc2:/tmp/aide#
root@pc2:/tmp/aide# cd aide-0.7
root@pc2:/tmp/aide/aide-0.7# 
root@pc2:/tmp/aide/aide-0.7# ./configure --prefix=/mnt/floppy/aide 
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/ginstall -c

[...]

creating aide.spec
creating config.h
root@pc2:/tmp/aide/aide-0.7# 
root@pc2:/tmp/aide/aide-0.7# make
make  all-recursive
make[1]: Entering directory `/tmp/aide/aide-0.7'

[...]

make[2]: Leaving directory `/tmp/aide/aide-0.7'
make[1]: Leaving directory `/tmp/aide/aide-0.7'
root@pc2:/tmp/aide/aide-0.7# 
root@pc2:/tmp/aide/aide-0.7# strip src/aide
root@pc2:/tmp/aide/aide-0.7# 
root@pc2:/tmp/aide/aide-0.7# make install
\Making install in src
make[1]: Entering directory `/tmp/aide/aide-0.7/src'

[...]

make[2]: Leaving directory `/tmp/aide/aide-0.7'
make[1]: Leaving directory `/tmp/aide/aide-0.7'
root@pc2:/tmp/aide/aide-0.7#  
root@pc2:/tmp/aide/aide-0.7# cd ..
root@pc2:/tmp/aide# cd ..
root@pc2:/tmp# rm -r aide
root@pc2:/tmp# 
</PRE>
</P>

<P>
Finally we will create a very simple configuration file, that will check for
changes in permissions, inode number, number of links, user owner, group owner, size,
modification time, creation time and md5 checksums in various directory files (including
all files under them), and generate the database...
<PRE>
root@pc2:/tmp# 
root@pc2:/tmp# cd /mnt/floppy/aide/bin/
root@pc2:/mnt/floppy/aide/bin# 
root@pc2:/mnt/floppy/aide/bin# cat aide.conf
database=file:/mnt/floppy/aide/bin/aide.db
database_out=file:/mnt/floppy/aide/bin/aide.db.new
/vmlinuz        R
/boot           R
/etc		R
/bin            R
/usr/bin        R
/usr/local/bin  R
/sbin           R
/usr/sbin       R
/usr/local/sbin R
=/var/log       R
/tmp            R
/var/tmp        R
root@pc2:/mnt/floppy/aide/bin# 
root@pc2:/mnt/floppy/aide/bin# ./aide --config=./aide.conf --init
root@pc2:/mnt/floppy/aide/bin# 
root@pc2:/mnt/floppy/aide/bin# mv aide.db.new aide.db
root@pc2:/mnt/floppy/aide/bin# 
</PRE>
The config file is only a working example, and i use it this way, but of course you may
or should change it to suit your needs, remember the database generated must reside in the floppy disk.
Check the end of this document to download the example aide.conf. We can now umount the floppy and
are ready for regular use (checks and updates).
</P>

<H2>Regular use (checks and updates)</H2>

<P>
Now that we have the floppy disk with the generated database we can use it regularly
to check for changes in the files to be audited. I will create a file in the /tmp
directory to show an example of how AIDE tell us about it...
<PRE>
root@pc2:/# 
root@pc2:/# cat > /tmp/.hidden
hidden
root@pc2:/# 
root@pc2:/# mount /dev/fd0 /mnt/floppy/
root@pc2:/# cd /mnt/floppy/aide/bin/
root@pc2:/mnt/floppy/aide/bin# ./aide --config=./aide.conf --check
AIDE found differences between database and filesystem!!
Start timestamp: 2002-01-21 15:22:56
Summary:
Total number of files=1443,added files=1,removed files=0,changed files=1

Added files:
added:/tmp/.hidden
Changed files:
changed:/tmp
Detailed information about changes:

File: /tmp
Mtime: old = 2002-01-21 13:36:25, new = 2002-01-21 15:22:03
Ctime: old = 2002-01-21 13:36:25, new = 2002-01-21 15:22:03
root@pc2:/mnt/floppy/aide/bin# 
</PRE>
So here you see clearly what happened, of course if an existing file was modified you
would be alerted in a similar way.
</P>

<P>
Now imagine that /tmp/.hidden is a file that you placed there, you will not remove it
and wish to stop seeing it in the reports, you can update the database, like this...
<PRE>
root@pc2:/mnt/floppy/aide/bin# 
root@pc2:/mnt/floppy/aide/bin# ./aide --config=./aide.conf --update
AIDE found differences between database and filesystem!!
Start timestamp: 2002-01-21 15:28:58
Summary:
Total number of files=1443,added files=1,removed files=0,changed files=1

Added files:
added:/tmp/.hidden
Changed files:
changed:/tmp
Detailed information about changes:

File: /tmp
Mtime: old = 2002-01-21 13:36:25, new = 2002-01-21 15:22:03
Ctime: old = 2002-01-21 13:36:25, new = 2002-01-21 15:22:03
root@pc2:/mnt/floppy/aide/bin# 
root@pc2:/mnt/floppy/aide/bin# mv aide.db.new aide.db
root@pc2:/mnt/floppy/aide/bin# 
root@pc2:/mnt/floppy/aide/bin# ./aide --config=./aide.conf --check 
root@pc2:/mnt/floppy/aide/bin# 
</PRE>
</P>

<H2>Finally... conclusion, files, links, etc.</H2>

<P>
Remember to keep all the AIDE stuff in the floppy disk, umount and remove it after use,
change the example configuration file to suit your needs, try to not leave any information
in the system that may reveal to an attacker that you are using AIDE. You are encouraged to
read the manual pages and manual.html of AIDE, it's a very flexible program. And finally, quoting the 'General guidelines for security'
section of the AIDE manual:
<BR>
" Do not assume anything
<BR>
Trust no-one, nothing
<BR>
Nothing is secure
<BR>
Security is a trade-off with usability 
<BR>
Paranoia is your friend ".
</P>

<P>
The example aide.conf configuration file: <A HREF="misc/maiorano/aide.conf.txt">misc/maiorano/aide.conf.txt</A>
</P>

<P>
Home of the AIDE project: <A HREF="http://www.cs.tut.fi/~rammer/aide.html">http://www.cs.tut.fi/~rammer/aide.html</A>
<BR>
download AIDE tarball: <A HREF="http://www.cs.tut.fi/~rammer/aide-0.7.tar.gz">http://www.cs.tut.fi/~rammer/aide-0.7.tar.gz</A>
</P>

<P>
Home of the more famous alternative to AIDE, Tripwire: <A HREF="http://www.tripwire.org">http://www.tripwire.org</A>
</P>

<P>
Some papers and articles for further reading...
</P>

<P>
An interesting article at securityfocus.com titled 'You may already be hacked.': <A HREF="http://www.securityfocus.com/columnists/12">http://www.securityfocus.com/columnists/12</A>
</P>

<P>
An article at linuxsecurity.com titled 'Getting Started with Tripwire (Open Source Linux Edition)': <A HREF="http://www.linuxsecurity.com/feature_stories/feature_story-81.html">http://www.linuxsecurity.com/feature_stories/feature_story-81.html</A>
</P>

<P>
'Network- vs. Host-based Intrusion Detection - A Guide to Intrusion Detection Technology' from ISS, interesting reading also: <A HREF="http://secinf.net/info/ids/nvh_ids/">http://secinf.net/info/ids/nvh_ids/</A>
</P>

<P>
A more commercial point of view from NetworkWorldFusion, 'Getting the drop on network intruders': <A HREF="http://www.nwfusion.com/reviews/1004trends.html">http://www.nwfusion.com/reviews/1004trends.html</A>
</P>





<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Ariel Maiorano</H4>
<EM>I'm a free-lance programmer in Argentina, working mostly on web and security development.</EM>

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2002, Ariel Maiorano.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 75 of <i>Linux Gazette</i>, February 2002</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">GPL or BSD? Yes</font></H1>
<H4>By <a href="mailto:articles@gnujobs.com">Mark Nielsen</a></H4>
</center>
<P> <HR> <P>  

<!-- END header -->




<ol>
<li><a href="#GPL">What is the GPL software license?</a></li>
<li><a href="#BSD">What is the BSD software license?</a></li>
<li><a href="#both">Which is better for you?</a></li>
<li><a href="#my">Which is best for me?</a></li>
<li><a href="#conclusions">Conclusion</a></li>
<li><a href="#REF">References</a></li>
</ol>

<h3><a NAME="Introduction"></a>Introduction</h3>

<h3><a NAME="GPL"></a>What is the GPL software license?</h3>
<a href="http://www.gnu.org/licenses/licenses.html#GPL">
The GNU General Public License
</a> is a bit lengthy (in my opinion) and tries to promote a "community"
of programmers who share software freely and openly. It obfuscates the meaning
of "free" and "freedom", since it really restricts the freedoms of people
who don't want to openly share software that has the GPL license. Rick Holbert
is suggesting we use the word "liberated software" instead of "free
software". It still confuses me, because GNU software is not truly liberated,
you can't so with the software whatever you want, but the word "liberated"
is much better than the word "free". 

The GPL
license forces people who make changes to the software to openly share those
changes. Thus, it forces freedom on the "recipients" of the software, but
not to the "programmers" who make changes to the software. It can be a little
confusing, since it takes freedom away from the programmers, but strengthens
the freedoms of the "recipients" of the software. In general, for people
who wish to donate their software for the better of humanity, it seems to me
the GPL license satisfies those goals because the software becomes open
sourced and free for all people to use and to add to. 
<p>Sometimes, from a 
business perspective, you want to take software you can make proprietary 
so that  you can create a product which has hidden value. 
If you close source software
that has value, and your changes have value, then you can charge people for
the software because they can't make the software themselves or
it is too difficult and time-consuming for them to do so. You want to look
at the BSD-style licenses under those cases.
<p>
In a different scenario, if you care more about service rather 
than software products,
then the GPL license isn't something you should fear. For example, IBM
is using Linux for various servers. If you develop a business model on top
of GPLed software, you don't have anything to worry about. In addition, any
software you create from scratch or you use that as a BSD-style license you
can keep closed sourced running on top of your GPL software. There are still
plenty of ways your business can use GPL software without threatening your
business. Customers don't really care about how things are done, they just
want it done. A good example is the crappy software produced in the
most popular desktop OS. 99% of the customers who use that horrible nasty
software don't know all the garbage put into it, and most of them wouldn't 
care. Look at all the people who are very happy to get patches to their 
"most stable and reliable version" of their OS, when really the logic is
backwards. Shouldn't it have been stable and reliable from the beginning?
And if the current version is the most stable and reliable and it crashes
and has tons of bugs, then the previous versions were garbage? I keep on
trying to emphasize to people that something that is more stable and reliable
than garbage is still garbage that is only slightly more reliable and stable.
It doesn't mean much. In business, it really isn't the quality of the
product that sells, but if you meet the minimum requirements for people to use
and you can sell it cheap on a mass market --- or if you can get a monopoly
and brainwash people and congress with ads and money that your software
is the best, when you know it isn't. Bottom line, if you are scared of the
GPL license for business reasons, you probably haven't thought through your
business model hard enough. The most popular Linux OS in the US isn't the 
best in the world, and lacks many features a respectable Linux OS should have,
but it stays the most popular because it has market share and they improve
with every version, which keeps their customers happy, even though the
customers don't know how much better the software really could be. 

<h3><a NAME="BSD"></a>What are the BSD-style Licenses?</h3>
<a href="http://www.freebsd.org/copyright/">
FreeBSD Copyright Information
</a> has a variety of licenses. In general, you have freedom to do whatever
you want with the software, as long as you acknowledge it came from the
project you are working on. In some sense, you have more freedom to do whatever
you want with this software, but when you make changes, you can "restrict"
the freedom of others who receive the software you modified. 
<p>
The BSD style licenses don't have any "pass-thru" freedoms. They don't
promote "freedoms" for the recipient. This can be a beneficial if you wish
to take software other people have developed, make a few changes, and sell
the product, or just try to prevent people from understanding what you did. 
<p>
When a
non-programmer only understands what a piece of software does, but not how
it does it, then you can sell the software to that person 
with good marketing skills, even
if you really didn't do any of the work in creating the software. Take the
most popular OS for desktops and you will get a good idea of a company
which has no programming skills whatsoever, but are very good at marketing
and selling garbage for software. Having the ability to include software
from other developers (who knew what they were doing)
without revealing the changes you make can be a very
powerful if you can't program worth a darn but you are good a selling. From
a business perspective whose goal is to make money (as all businesses are
suppose to do), if you can use software that falls under the BSD-style
incenses, do it. You can have better control over your OS and prevent people
from copying a marketable product. The top two OSes for desktops have done
this. 
<p>
For the record, it seems like BSD programmers are very good at what they
do, so I don't want to sound like software that comes from BSD programmers
can be garbage. As far as I am concerned, as long as I can look at the
source code, it isn't garbage because it can always be changed, but as soon
as it does get closed sourced, then it becomes garbage, because I don't know
what it is really doing. All the open-sourced stuff from the BSD-style
licensed software it great.

<h3><a NAME="both"></a>Which is best for you?</h3>
There is one important belief you must understand: A LICENSE IS NOT BETTER
OR WORSE THAN ANY OTHER LICENSE except from your point of view involving the
goals you want to accomplish. A license is a foundation of how people
are to behave, just like a government. From a business point of view. the US
has a great government where money rules all. From a humanitarian point of view
other governments have better ideas and goals. But neither government
 is better or worse
if they accomplish the goals the people want. 
If the license does what you want 
it to do, then it is good for you, might not be good for someone else, but who 
cares about them. Thus, ONLY IDIOTS CLAIM ONE LICENSE IS BETTER THAN ANOTHER
IF THEY DON'T UNDERSTAND WHAT YOUR GOALS ARE. Once we know what your goals
are with the software you are creating, then we can determine which license
is best for your software. Even then, it is still an opinion open to debate.
<p>
Whenever I talk to BSD people, I usually get them to admit GPL is not a bad
thing. How? As I have stated, licenses are there for people to use. Nobody
is forcing you to put your software under BSD or the GPL license. Thus, 
IF YOU CHOOSE to put your software under the GPL, and don't mind people having
full rights to the source code, why is that bad? You agreed to it, you don't
mind, and you aren't looking to make profit off of it with some closed source
version, and you really don't want someone to come along and make profit 
off of a closed
source version off of something you worked really hard at doing when you
didn't get a dime. GPL levels the playing field so that everybody has equal
opportunity to make profit given the same software and they can't prevent
anybody else from having an equal opportunity as well. Looks like good
market driven competition to promote business and let the best people win.
Again, you choose to put this software on an equal basis for all to use. If 
they don't want to share like you did, fine, they can invest the millions 
of dollars needed to create their own software. 
Nobody is preventing them. 
<p>
Please license your software under more than one license. For example,
Perl is licensed under the GPL and the Artistic Licenses. If you want
your software to be used with other free software, you must license it for
more than just GPL. GPL tends to not work very well with other free software
licenses. 
<p>
One criticism of the free software community, as far as GPL goes:
they are "stealing" the word freedom. Question: Does a dictator have the
freedom to be a dictator? Yes. Freedom has nothing to do with a "community".
Freedom means you can do whatever you want whenever you want however you want.
People should have the freedom not to be free. One thing that irks me, although
I understand from a political perspective why they are doing it, but the
FSF and GPL dudes tend to redefine freedom what they want it to mean, but 
really they are only looking a very small subset of freedom, not ALL freedom.
They are interested is freedom for people to share open sourced software
and in the community, but not the freedom of an individual to do with
a piece a software however they wish -- such as making a closed source
version of a GPLed piece of software. Hence, GPL doesn't really promote
"freedom" in the true sense of the word freedom, but freedom for
a community to use software. I don't like how they are redefining the word
freedom and how some the the zealots won't even talk to you unless you
use the words "free" and "freedom" in a fashion they understand. However,
I suppose it is good from a political point of view, because it forces
people to think about freedom and most people don't have time to think
in our crazy 80 hour workweek schedules.  
<p>
Now, for BSD, it is not bad either. It is meant for the programmers who
like to create closed sourced programs. I understand why this is so 
attractive. I understand why this is important for some people, but let me
raise a very important point about BSD which doesn't make sense from
a philosophical point of view:
<p>
If people create software under the BSD license, somebody can take
all the work created under that license and create a closed source version
where they don't have to tell people what changes they made. Thus a whole
group of developers can work for years creating a cool piece of software 
where 
a single person or company can "steal" the software by creating a
slightly different closed source version, promoting it as the standard, 
and ruining any chance of the real programmers for the software
from ever benefiting from it. I just don't understand why so many people
want to work so hard to make others millionaires. GPL prevents this. It 
levels the playing field for all who wish to use the software. Everybody
has a fair shot. 
<p>
A clear case of how dangerous the BSD license is and how it promotes a virus
from spreading around (that nasty operating system from a first-rate
marketing but 2-bit programming company) around the world. 
Take a look at this disaster 
<a href="http://www.linuxtoday.com/news_story.php3?ltsn=2000-05-01-005-04-NW">
with Kerberos</a>. What a horrible thing to do. For myself, when an evil
nasty company corrupts a piece of software and there is no legal way to force
them to be cooperative with the rest of society, I will boycott all versions
of that software. I cannot afford to worry about different versions that
are incompatible popping up all over the place. Kerberos is ruined, and I 
will never use it. Why is it ruined? The corrupted version has too much 
influence in the world, that is isn't worth my time using similar software
knowing one day future versions can be completely closed sourced
ruining any chance of the versions I use being compatible with the closed
sourced versions. The threat of not being compatible with other businesses
who don't care about politics is too great for me for me to use this type
of software. It is on my banned list if I can avoid using it (hopefully).
<p>
With all the benefits and complaints I have about GPL and BSD, which is best
to use? Either, neither, both. Just understand what the licenses do, and if
you don't mind the consequences, great! Even though I really don't like the 
BSD-style licenses for my uses, if you don't mind other people taking your
software and making closed sourced versions they can sell, then the BSD-style
licenses might be good for you. 

<h3><a NAME="my"></a>Which is best for me?</h3>
Which license is best for me? The answer is yes, both. However, I only
use GPL. Why? I am so grateful for all the free software, I don't really
create any software that can be sold (I usually create web scripts in Python),
and anything I produce for the world I would want someone to take up after
I am done with it, it makes sense for me to use GPL. I really don't ever
see myself using the BSD-style licenses because I don't want the evil empire
from taking my software and using it to make profit without revealing
that they did to give other people the same shot at business. The reason
why the BSD-licenses are also good for me, is because, it is an option
for the future. I don't use the BSD-style licenses, but I am glad they
are an option. 

<h3><a NAME="conclusions"></a>Conclusion</h3>

<a href="http://slashdot.org/articles/99/06/23/1313224.shtml">
Anonymous Coward</a> made a good point:
<pre>
 I was all set to write a long essay in response, but most of the readers here would probably just appreciate a summary:

The GPL license is conducive to liberating software.

The BSD license is conducive to liberating people.

With the GPL license, the software maintains more of the freedom than the programmers who work on it.

With the BSD licenses, the programmers maintain more of the freedom with what they are allowed to do with derivative code.
</pre>

I prefer to think of it as the following:
<ul>
<li>GPL promotes freedom for the end-user.</li>
<li>BSD promotes freedom for the programmer.</li>
</ul>
<p>
In conclusion, anybody who says one license if better than another is a
simple-minded troll who doesn't understand that they can only make a judgment
for themselves and not others. I really want to emphasize that these people
need to be sterilized so that their DNA doesn't spread and create politicians,
generals, and judges who like to make decisions for people in other subjects
in life. 
I have complete disrespect and contempt for anybody who makes a decision
for other people about software licenses, 
and limited disrespect and contempt for anybody who
lets people make their decision for them. I don't mind theories about how
licenses affect society, BUT DON'T CLAIM ONE IS BETTER THAN ANOTHER, because
that is an opinion based on certain values, not a fact. I will accept as
fact what you think is the best license for you, but not your opinion about
what you think is best for other people -- that is just an opinion and 
theory.  
<p>
There seems to be 10 times the amount of BSD people who hate GPL.
I imagine that is because Linux is tens time more popular, but I really 
don't know. If FreeBSD was ten times more popular then Linux, I imagine
you would have 10 times more GPL guys 
moaning than the BSD guys. For me personally,
I am unaware of BSD software on a daily basis, and so, I have no reason
to voice my opinions actively. I suppose I really don't like people
who complain about the other licenses for two reasons:
<ul>
<li> They haven't thought through the situation carefully enough to realize
there is nothing wrong with licenses. </li>
<li>It reminds me of when I was a little younger making outrageous statements
because I didn't think through problems. However, the older
you get, the more boring you become, so making outrageous statements should
still be a daily occurrence to prevent yourself from becoming an old fart,
as long your statements are harmless.</li>
</ul>

<p>
Nuff said.

<h3>
<a NAME="REF"></a>References</h3>
Thanks to Rick Holbert for suggesting how I can improve the
article and for letting me know that "liberated" is a better term
than "free" to use when talking about "free software" in the GNU sense.

<ol>
<li><a href="http://slashdot.org/articles/99/06/23/1313224.shtml">
Slashdot</a> discussion which contains a lot of good points and I think
makes a good case for BSD people not to hate GPL.
</li>
<li>
If this article
changes, it will be available here
<a href="http://www.gnujobs.com/Articles/25/nielsen.html">
http://www.gnujobs.com/Articles/24/nielsen.html</a></li>
</ol>




<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<p> 
<h4><img align=bottom alt="" src="../gx/note.gif">Mark Nielsen</h4>
Mark works as an independent consultant donating time to causes like
GNUJobs.com, writing articles, writing free software, and working
as a volunteer at <a href="http://www.eastmont.net">eastmont.net</a>.

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2002, Mark Nielsen.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 75 of <i>Linux Gazette</i>, February 2002</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">The Foolish Things We Do With Our Computers</font></H1>
<H4>By <a href="mailto:gazette@ssc.com">Mike "Iron" Orr</a></H4>
</center>
<P> <HR> <P>  

<!-- END header -->




<H2>Drill</H2>

By <A HREF="mailto:apepin@pepinsrv.pepinhome.org">Tony Pepin</A>

<P> This happened a long time ago, when a 20-megabyte hard disk was a
giant, both in capacity and size.
My friend had a Corvus 20 meg drive that was shared among five PCs
which were used to run the accounting department of a small manufacturing
business.  The owner of the company was extremely pleased with my
friend and the efficiency of the computerized accounting group.

<P> One day, in the middle of month-end processing, the electric motor on
the Corvus burned out.
Payroll and Accounts Receivable needed to be done by the end of
the day, and there were no backups of the data files.  Since the Corvus
had never failed, my friend had not bothered making backups.

<P> Not having anything to lose, he opened up the case and removed the
burned out motor.  He then took an old electric hand drill with a
variable speed motor and chucked it directly to the hard disk.

<P> I wrote a quick and dirty program that read one sector of data and
displayed a message when the read was successful.  He ran this 
program while squeezing the trigger on the drill until it reported
successful reads.

<P> Once he had the speed right, he used black tape and taped the trigger
so that it would not move.

<P> The accounting group finished their month-end processing using the 
drill as the hard disk motor.  He continued to use the drive with
the drill for several weeks, after carefully making backups of the
data however.


<HR NOSHADE WIDTH="80%%"> <!--*********************** -->


<H2>Zap</H2>

By <A HREF="mailto:ogre@sirinet.net">John J Tobin</A>

<P> Here is a foolish story of what I did to a computer I was building.

<P> Back before I had a lot of money to buy new hardware and such I had to
make due with the few parts that I had lying around. One was an old XT
case with a working power supply, I had enough money to get a motherboard
and a DX4-100 chip, however cases and power supplies were expensive back
then so I decided to use the XT case that I had. Since the XT
motherboards were non-standard as far as mounting holes go and the new
board wouldn't line up I had the great brainstorm to mount the board on
the anti-static bag, I though "Sure it's anti-static it'll be safe." I
ran it and it would boot up but the keyboard controller was failing. I
took it back to the place that I bought and and I was explained to how
the anti-static bag will actually conduct electricity and that I fried
the board. Luckily he was willing to refund me half of my money, I then
had to shell out for another board and a case this time. The lesson I
learned was that if I am going to mount a board on anything but the pegs
of the case I better use wood, something that is definitely and
insulator.



<HR NOSHADE WIDTH="80%%"> <!--*********************** -->


<H2></H2>

By <A HREF="mailto:kirk@innocent.com">Kirk</A>

<P>  Here follows the story of 
the geekiest use I've ever put my Palm III to.

<P> I bought a Used Sparc Classic and it came with a hard drive, RAM, 
keyboard and mouse.  It did <EM>not</EM> come with a monitor.  Since I planned 
for it to be a server, the lack of a monitor wasn't a big deal except 
that I couldn't install Linux on it (or anything else for that matter) 
without being able to see what I was doing.

<P> Palm III to the rescue!  I had a serial cable that plugged into the 
bottom of the Palmpilot connected to a gender bender, connected to a 
DB25 &lt;-&gt; DB9 cable to plug into the serial port of the Sparc.  The 
serial port on the Sparc actually has the wiring for both /dev/ttyS0 
<EM>and</EM> /dev/ttyS1, but the first serial port has the same wiring as a PC, 
so it worked fine.  Last but not least, I unplugged the keyboard.

<P> Now that the hardware side was figured out, I downloaded a freeware 
vt100 program for my Palmpilot and configured it for the proper baud 
rate, stop bits and such.  When I turned on the Sparc, it tried to find 
a keyboard and failed.  Then it found a vt100 terminal on the serial 
port and used the Pilot as a console.  I installed RedHat 6.2 to my 
Sparc using that tiny little screen.

<P> After the install was done, I rebooted and telnetted in from my PC.  
Everything worked perfectly.


<BLOCKQUOTE><EM>
	[If you have a story about something foolish or ingenious you
	did to your computer, send it to
	<A HREF="mailto:gazette@ssc.com">gazette@ssc.com</A>-Iron.]
	</EM></BLOCKQUOTE>




<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P>
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Mike Orr</H4>
<EM> Mike ("Iron") is the Editor of <I>Linux Gazette</I>.  You can read what he
has to say in the Back Page column in this issue.  He has been a Linux
enthusiast since 1991 and a Debian user since 1995.  He is SSC's web technical
coordinator, which means he gets to write a lot of Python scripts.
Non-computer interests include Ska/Oi! music and the international language
Esperanto.  The nickname Iron was given to him in college--short for Iron Orr,
hahaha. </EM>

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2002, Mike "Iron" Orr.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 75 of <i>Linux Gazette</i>, February 2002</H5>
<!-- *** END copyright *** -->

  
<h4 align="center"> "Linux Gazette...<i>making Linux just a little more fun!</i>
" </h4>
  
<p> </p>
<hr> 
<p>  <!--===================================================================-->
  </p>
<center> 
<h1><font color="maroon">Simple Package Management With Stow</font></h1>
 
<h4>By <a href="mailto:pedaa@rockefeller.edu">Allan Peda</a></h4>
 </center>
 
<p> </p>
<hr> 
<p>    <!-- END header -->     </p>
<p>When running a single box with tried and true software, tracking the versions
 of software that you use may be a no-brainer. That is to say, you use whatever
Red Hat, Debian, or Sun provided (yes, I will touch on non-Linux issues here)
if you could find or build the necessary package. But wait: what if you have
been running the same machine for years and you simply must have the latest
Emacs?  What if you are developing your <i>own</i>  software and don't want
to create RPMs, or Debian dpkg each time you pause  at a version? What if
you don't trust that software package written by a 14 year old in that far
away country with an unstable government? In short, what if you are heeding 
Obi-Wan Kenobe's advice, and <i>using the source</i>? How do you make it
easy to rip out those configuration files, man pages, binaries, and libraries
that you may want to replace in the future? </p>
                       
<p>  Well, when you think about it a little bit, Unix has sort of provided
 the raw materials to do that, in the form of a symbolic link or <i>symlink</i>
. Symlinks are a powerful tool because they allow you to configure software
 so that its <i>implementation</i> does not necessarily connect directly
 to it's <i>interface</i> (sound familiar?). I might be playing a  little
loose with the definitions, but that really is what is being done  when,
for  example, postfix mimics sendmail. The implementation, that is postfix,
 is presenting the same interface as sendmail, which has become a de facto standard  interface to
the Unix mail transport agent (<a href="http://www.nightflight.com/foldoc-bin/foldoc.cgi?Message+Transfer+Agent">MTA</a>).</p>
                       
<p>In the case of symlinks, you might have a program <code>/opt/bin/new_cat</code>
linked  to <code>/opt/bin/cat</code>.  So if you looked at the link, you'd know
right away what version was being run, but it would still seem to be the same familiar
program. In this way the actual program being run can change as a better
implementation (algorithm, etc.) is developed.  Yes, environmental variables,
as used in scripts, allow this, but try retrofitting all the variables that
point to a program after the fact.  It might not be so easy.  Symlinks may
be the answer. For example symlinks are typically used to ease the
building of <a
href="http://www.pcwebopedia.com/TERM/m/motif.html">motif</a> from
source via the <code>lndir</code> utility.  Of course this symlinking stuff
could get out of hand, and should not be abused, but you get  the
idea. What the folks at the GNU project did was write a little  Perl
script that automates  that entire process of symlinking the  code you
are using to the interface that you want to present to the user.  Note
that <i>hard links</i> are subtly different, because there is no
differentiation  between the original file and the link (really a
second name since they share inodes, and hence <em> are</em>
identical). I find hard links to be of minimal  use, because it
becomes too easy to lose track of which filename should be deleted
and which should be kept.</p> 
                       
<h2>Introducing Stow</h2>
                       
<p>Right away I want to emphasize that <a href="#gnu_stow">stow</a> is not
a replacement for a full package management database, but it does allow one
to get many of the  benefits of a complex package management system
from a humble Perl script. As an aside, there is a package that  will
allow source to be entered into a Slackware, RPM, or Debian package
database, called  <a href="#checkinstall">checkinstall</a> 
. As an example I will go through the steps to install stow, then the steps
to install a mail (<a
href="http://www.nightflight.com/foldoc-bin/foldoc.cgi?query=MUA&action=Search">MUA</a>)
 replacement called <i><a href="#nail">nail</a></i> 
. This is a good example because it includes multiple files so that you can see
how one might encounter inadvertant collisions with previous versions. 
Also, nail a great enhancement to standard Berkeley mail, since it allows sending 
binary attachments on the command line, while offering the same base
functionality. 
</p>
  
<p>Stow is so simple to install that really no in depth discussion is needed. 
It should work if you have Perl 5.005 or later (this version is stock on
Solaris 8 AFAIK). Simply download the source from the GNU website or a local
<a href="http://www.gnu.org/server/list-mirrors.html">mirror</a>, extract
to a source directory with tar xzf and repeat the familiar <code>./configure</code>
, <code>make</code>, and <code>make install</code> sequence.  Despite
appearances, 
nothing is compiled, but a few things like the manual still need to get built.
 The <code>make install</code> step will place <code>stow</code> into the
 <code>/usr/local/bin</code> directory.  This is the default location, and
 I chose this setting to simplify this discussion.  The reasons
 will hopefully become apparent by the end of this article. The
 location of the installed <code>stow</code> executable is shown on the last line of the
 sample output below. I used 
 the <code>type</code> command, but you could also use <code>which</code> or perhaps
<code>whereis</code>. </p>  

<table class="sourcecode">
    <caption>Unpacking and installing stow</caption>    <tbody>
    <tr>
       <th></th>
    </tr>
    <tr>
       <td>                                                          
      <pre>[zippy@mybox zippy]$ cd src/<br>[zippy@mybox src]$ gunzip -c ../stow-1.3.3.tar.gz | tar xf -<br>[zippy@mybox src]$ ll<br>total 8<br>drwxrwxr-x    2 zippy   zippy       4096 Jan  6 06:19 stow-1.3.3<br>[zippy@mybox stow-1.3.3]$ ./configure <br>creating cache ./config.cache<br>checking for a BSD compatible install... /usr/bin/install -c<br>checking whether build environment is sane... yes<br>checking for mawk... no<br>checking for gawk... gawk<br>checking whether make sets ${MAKE}... yes<br>checking for a BSD compatible install... /usr/bin/install -c<br>checking for perl... /usr/bin/perl<br>updating cache ./config.cache<br>creating ./config.status<br>creating Makefile<br>creating stow<br>[zippy@mybox stow-1.3.3]$ make<br>make: Nothing to be done for `all'.<br>[zippy@mybox stow-1.3.3]$ sudo make install<br>make[1]: Entering directory `/home/zippy/src/stow-1.3.3'<br>/bin/sh ./mkinstalldirs /usr/local/bin<br> /usr/bin/install -c stow /usr/local/bin/stow<br>/bin/sh ./mkinstalldirs /usr/local/info<br> /usr/bin/install -c -m 644 ./stow.info /usr/local/info/stow.info<br>/bin/sh ./mkinstalldirs /usr/local/man/man8<br> /usr/bin/install -c -m 644 ./stow.8 /usr/local/man/man8/stow.8<br>make[1]: Leaving directory `/home/zippy/src/stow-1.3.3'<br>[zippy@mybox stow-1.3.3]$ type stow<br>stow is /usr/local/bin/stow<br>      </pre>
       </td>
    </tr>
   
  </tbody>            
</table>
  
<p>At this point <i>stow</i> is installed under /usr/local/bin. Make
sure to include this directory your <code>$PATH</code></p>

<h2>Under The Hood</h2>
<p>
To describe <code>stow</code>, one first needs to understand the
<code>configure</code> script, because these two scripts work
together, with <code>configure</code> building all the software
components, and <em>install</em>ing them on your machine.  The
configure script is a marvelous convenience.  It sniffs 
the system, checking for various prerequisite software.  The results
of these tests are used to design a set of <a
href="http://www.nightflight.com/foldoc-bin/foldoc.cgi?query=Makefile&action=Search">Makefile</a>s 
which will build and install your software to fit your system
configuration. There are many options to configure, in fact there are
alternate versions of this script as well, but for our purposes the
options of greatest interest is the <em>--prefix</em> argument.  Note
a second argument, the <code>--exec-prefix</code> allows some finer tuning 
of the actual installation process, but this option will not be
discussed in much detail.
</p>

<p>So now we understand that <code>configure</code> builds the scripts
that build the code, and that the location of the installed code may
be specified via <code>configure</code>'s <em>--prefix</em> command--
line argument.  It turns out that if you pick a single special spot to
install all source code, <code>stow</code> can then cleanly automate
the creation of symlinks to the installed code in such a way that the
source tree is readily evident, and can be replaced and removed.  For
example, invoking the configure script as 
<code>./configure --prefix=/opt/stow/foo-1.2.1</code>  
will install your package under <code>/opt/stow/foo-1.2.1</code>
</p>  

<h2>I'm Still Confused. What is this prefix and exec-prefix stuff?</h2>
<p>
Feel free to skip this section, and come back to it later, after you
have digested the rest of this article. Once you are comfortable
with the notion of an <em>actual</em> install location being separate
from the <em>apparent</em> location of a program you can consider the
parts of the puzzle that don't fit the this ideal scenario.  Imagine
the case of installing software across multiple machines where
<em>everything</em> is installed in a symlinked directory tree
isolated from the apparent location (found in the <code>$PATH</code>, or
<code>$MANPATH</code>).  Depending on your intentions, this might not be
what you want.   Consider the situation where an application might be
built for multiple architectures, for example source code could be
built for Solaris and linux systems as follows (assuming an identical
cross mounted source trees, but separate build directories): 

<pre>
sun$ cd sunsparc<br>sun$ ../foolib-1.1/configure --prefix=/usr/local \<br>> --exec-prefix=/usr/local/sunsparc<br>sun$ make<br>sun$ make install<br>
</pre>
Then from another xterm:
<pre>
sun$ ssh pengie
pengie$ cd linux<br>pengie$ ../foolib-1.1/configure --prefix=/usr/local \<br>> --exec-prefix=/usr/local/linux<br>pengie$ make<br>pengie$ make install<br>
</pre>
<p>
The bottom line is that the developer has to decide which files are
architecture dependant, and which are not, and you might not agree
with her.  Obviously documentation, and possibly configuration files
could be considered architecture independent.  Still, if you use stow,
you are free to remove symlinks by "unstowing" files. Since this does 
upgrading will not overwrite the old source, instead it will only 
break the links, and you can hand copy configuration files back.  Just
"restow" the package and try again you get the upgrade 
right. Personally, I don't use the <code>--exec-prefix</code> option 
much, preferring instead to manually link the (hopefully) few
configuration files that I want to treat specially, fixing broken
links after upgrading. So far I think it's been a good approach for
the simple situations I've encountered.
</p>

 
<h2>Installing Software With Stow</h2>
<p>
When I first started using <code>stow</code> a few years ago, I had some
frustration with it because I had already started setting up the
system (an HP-UX server) without it.  There were frequent collisions
with info files and manpages, ironically this was encountered the most
with emacs.  Naturally, following what is going on is easier for
simple packages.  The MUA software <code>nail</code>, is about as simple as you can get, since it
consists of the executable, the documentation, and the config files
(while you might want to link to <code>/etc</code> BTW).
</p>

<table class="sourcecode">
    <caption>Configuring for alternate locations</caption>    <tbody>
    <tr>
       <th></th>
    </tr>
    <tr>
       <td>                                                          
      <pre>[zippy@mybox src]$ gunzip -c ../nail-9.29.tar.gz  | tar xf -<br>[zippy@mybox src]$ cd nail-9.29/<br>[zippy@mybox nail-9.29]$ ./configure --prefix=/opt/stow/nail-9.29<br>creating cache ./config.cache<br>checking for a BSD compatible install... /usr/bin/install -c<br>checking for iswprint... yes<br>...<br>..... lots of stuff ...<br>updating cache ./config.cache<br>creating ./config.status<br>creating Makefile<br>creating config.h<br>[zippy@mybox nail-9.29]$ <br>      </pre>
       </td>
    </tr>
   
  </tbody>            
</table>

<p>What we are doing here is telling <code>configure</code> to put the
files under <code>/opt/stow/nail-9.29</code> 
but (implicit as far as stow is concerned) that the installed package will
appear to be under /opt for run time files. ( If you're
curious, you can look at the generated <code>Makefile</code> to see
that the <code>prefix</code> variable is set via the
<code>--prefix</code> option). 
</p>
  
  
<table class="sourcecode">
    <caption>Building the source code</caption>    <tbody>
    <tr>
       <th></th>
    </tr>
    <tr>
       <td>                                                          
      <pre>[zippy@mybox nail-9.29]$ <br>[zippy@mybox nail-9.29]$ make             <br>gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c version.c<br>gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c aux.c<br>... more stuff ...<br>gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c tty.c<br>gcc -DHAVE_CONFIG_H -I. -I. -I.     -g -O2 -c vars.c<br>gcc  -g -O2  -o nail  version.o aux.o base64.o cmd1.o cmd2.o \<br>cmd3.o cmdtab.o collect.o dotlock.o edit.o fio.o getname.o \<br>head.o v7.local.o lex.o list.o main.o mime.o names.o popen.o \<br>quit.o send.o sendout.o smtp.o strings.o temp.o tty.o vars.o  <br>[zippy@mybox nail-9.29]$<br>      </pre>
       </td>
    </tr>
   
  </tbody>            
</table>
  
<p> Now that we have compiled everything, we can install the software. </p>
                   
<table class="sourcecode">
    <caption>Running the Install</caption>    <tbody>
    <tr>
       <th></th>
    </tr>
    <tr>
       <td>                                                          
      <pre>[zippy@mybox nail-9.29]$ sudo make install<br>make[1]: Entering directory `/home/zippy/src/nail-9.29'<br>/bin/sh ./mkinstalldirs /opt/stow/nail-9.29/bin<br>mkdir /opt/stow<br>mkdir /opt/stow/nail-9.29<br>mkdir /opt/stow/nail-9.29/bin<br>  /usr/bin/install -c  nail /opt/stow/nail-9.29/bin/nail<br>/bin/sh ./mkinstalldirs /opt/stow/nail-9.29/man/man1<br>mkdir /opt/stow/nail-9.29/man<br>mkdir /opt/stow/nail-9.29/man/man1<br> /usr/bin/install -c -m 644 ./nail.1 /opt/stow/nail-9.29/man/man1/nail.1<br>test -f /etc/nail.rc || \<br>        { /bin/sh ./mkinstalldirs /etc; \<br>        /usr/bin/install -c -m 644 ./nail.rc /etc/nail.rc; }<br>make[1]: Leaving directory `/home/zippy/src/nail-9.29'<br>[zippy@mybox nail-9.29]$<br>      </pre>
       </td>
    </tr>
   
  </tbody>            
</table>
  
<p>So it's apparent from the previous listing that the file was  tucked under
/opt/stow/nail-9.29 as desired.  Stow then assumes that all the subdirectories
of the package are to be symlinked to their corresponding locations
under <code>--prefix</code> 
(or <code>${prefix}</code> if you look in the Makefile), so that
<code>/opt/stow/nail-9.29/bin</code>
becomes <code>/opt/bin</code>  Similarly
<code>/opt/stow/nail-9.29/man/man1</code> becomes <code>/opt/man/man1</code>
etc. This convention makes it very easy to isolate files 
used from the install locations.  The only step left is to actually
create the symlinks by running stow. </p>
  
<table class="sourcecode">
    <caption><i>Stow</i>ing the binaries</caption>    <tbody>
    <tr>
       <th></th>
    </tr>
    <tr>
       <td>                                                          
      <pre>[zippy@mybox nail-9.29]$ cd /opt/stow/<br>[zippy@mybox stow]$ sudo stow -vv nail-9.29/<br>Stowing package nail-9.29...<br>Stowing contents of nail-9.29<br>Stowing directory nail-9.29/bin<br>LINK /opt/bin to stow/nail-9.29/bin<br>Stowing directory nail-9.29/man<br>LINK /opt/man to stow/nail-9.29/man<br>[zippy@mybox stow]$ ls -ltr /opt/ <br>[zippy@mybox stow]$ ls -ltr /opt <br>total 4<br>drwxr-xr-x    3 root     root         4096 Jan  9 16:33 stow<br>lrwxrwxrwx    1 root     root           18 Jan  9 16:33 man -&gt; stow/nail-9.29/man<br>lrwxrwxrwx    1 root     root           18 Jan  9 16:33 bin -&gt; stow/nail-9.29/bin<br>stow/nail-9.29/bin<br>[zippy@mybox stow]$ PATH=/opt/bin:$PATH type nail<br>nail is /opt/bin/nail<br>      </pre>
       </td>
    </tr>
   
  </tbody>            
</table>
  
<p>Some explanation may be in order here, I cd'd to the stow directory
(<code>${prefix}/stow</code> by default), and simply typed <code>stow
-vv</code> plus the name of the subdirectory 
to recursively symlink.  The -vv simply adds verbose output for illustrative
purposes.  So now all that needs to be done is to modify the $PATH variable,
 and your files are installed. Stow has created all the necessary links.
Note that to uninstall the files (thus breaking the links) simply
<em>unstow</em> them. This will disconnect (unlink) the installed binaries, but
will <em>not</em> delete any files, so it's really quite a useful
safety net.
</p>
                
<p>             
<table class="sourcecode">
             <caption>Unstowing a directory</caption><tbody>
             <tr>
               <td> 
      <pre>[zippy@mybox stow]$ pwd<br>/opt/stow<br>[zippy@mybox stow]$ ls -l<br>total 4<br>drwxr-xr-x    4 root     root         4096 Jan  9 16:33 nail-9.29<br>[zippy@mybox stow]$ sudo stow -Dvv nail-9.29/<br>Unstowing in /opt<br>UNLINK /opt/bin<br>UNLINK /opt/man<br>[zippy@mybox stow]$<br></pre>
 	      </td>
             </tr>
   
  </tbody>            
</table>
 </p>
<p>And all the installed files are neatly out of the way.  Of course to <em>
restow</em> the files you simply repeat the previous commands. This may seem
like a lot of extra work, but once you get in the habit of using it, and
experience the convenience of being able to unlink and entire package you'll
find it's worth it.  Finally, you might want to install nail yourself, and
use it, possibly via an alias or shell function, as a mail
replacement. But that could be an entire article in itself.   <br>
 <br>
 Happy hacking!  </p>
                        
<h3>References</h3>
 
<ol>
 	<li><a name="gnu_stow">GNU stow</a><br>
             Maintained by Guillaume Morin<br>
 	    <a href="http://www.gnu.org/software/stow/stow.html">             http://www.gnu.org/software/stow/stow.html</a><br>
 	    <a name="stow_savannah">GNU stow entry on Savannah</a><br>
 	    <a href="http://savannah.gnu.org/projects/stow">             http://savannah.gnu.org/projects/stow</a>
         </li>
 	<li><a name="checkinstall">Checkinstall</a><br>
             by Itzo <a href="http://freshmeat.net/projects/checkinstall/">
             http://freshmeat.net/projects/checkinstall/</a>         </li>
 	<li><a name="nail">Nail, a replacement for the mail MUA</a><br>
             by Gunnar Ritter<a href="http://omnibus.ruf.uni-freiburg.de/%7Egritter/">
             http://omnibus.ruf.uni-freiburg.de/~gritter/</a>         </li>
 	<li><a name="lfhs">Linux Filesystem Hierarchy Standard, (FHS)</a><br>
             Maintained by freestandards.org<a href="http://www.pathname.com/fhs/">
 	    http://www.pathname.com/fhs/</a>         </li>
 	<li><a name="autoconf_book">GNU Autoconf, Automake, and libtool</a><br>
             By Gary V. Vaughan, Ben Elliston, Tom Tromey, and Ian Lance
Taylor<br>
 	    offers an excellent review of the concepts behind exec-prefix options 
	    to the <em>configure</em> script.<br>
             <a href="http://sources.redhat.com/autobook/">http://sources.redhat.com/autobook/</a>
 	    ISBN 1-57870-190-2<br>
         </li>
   
</ol>
                             <!-- *** BEGIN bio *** --> <spacer type="vertical" size="30">
 
<p>  </p>
<h4><img align="baseline" alt="" src="peda_files/note">
Allan Peda</h4>
 Allan has been enjoying Linux since about 1995, discovering Perl shortly 
thereafter. Currently he works as a programmer analyst at Rockefeller University,
and does part time Linux consulting work in the NYC area.  He enjoys surfing
and sailing, and dreams of owning a charter boat in <em>tranquilo</em> Costa
Rica.  <!-- *** END bio *** -->  <!-- *** BEGIN copyright *** --> 
<p> </p>
<hr> <!-- P -->  
<h5 align="center">  Copyright  2002, Allan Peda.<br>
 Copying license <a href="file:///V:/workarea/copying.html">http://www.linuxgazette.com/copying.html</a><br>
  Published in Issue 75 of <i>Linux Gazette</i>, February 2002</h5>
 <!-- *** END copyright *** -->  
<center>
<h4>
"Linux Gazette...<i>making Linux just a little more fun!</i>"</h4></center>

<hr>
<p><!--===================================================================-->
<center>
<h1>
<font color="#800000">Why I wrote Install Kernel (ik) and How It Works</font></h1></center>

<center>
<h4>
By <a href="mailto:war@starband.net">Justin Piszcz</a></h4></center>

<hr>
<p><!-- END header -->
<p>ik (Install Kernel) is available at
<a href="http://freshmeat.net/projects/ik">http://freshmeat.net/projects/ik</a>
and <a href="http://www.ramdown.com/war/ik">http://www.ramdown.com/war/ik</a>.
<p>In December 2000, after four years of using Linux, compiling and installing
kernels became a waste of my time. I chose to write my own kernel installation
and setup script called Install Kernel, because no other scripts existed
at the time, and I needed something that would install the Linux kernel
and automatically setup my bootloader configuration file with no user intervention.
Install Kernel interfaces with the Linux operating system by moving and
editing files. When not using ik, the majority of time consumed when updating
a kernel mainly consists of moving files around and setting up configuration
files. The ik script has three basic parts: dependency checks, compiling
the kernel and moving the files to their proper locations, and editing
boot loader configuration files. Install Kernel aims to help&nbsp; people
who are either new to installing the kernel or people who choose to use
their time efficiently.
<p>Every operating system has some type of kernel; the kernel is the core
of the operating system. The current kernel version as of this writing
is Linux 2.4.17. Most users either recompile or upgrade their kernels.
One may choose to upgrade his or her kernel in order to add support for
a certain device attached to his or her computer. For instance, if one
bought a Universal Serial Bus (USB) scanner, he or she would have to make
the appropriate changes to the kernel configuration file, and recompile
and install the new kernel. Reasons for upgrading the kernel may include
a better virtual memory subsystem, or important security fixes. An example
would be Linux kernel version 2.4.11. This kernel was vulnerable to a symlink
denial of service attack, prompting users running 2.4.11 to immediately
upgrade to 2.4.12 when it became available due to this vulnerability. These
are the fundamental reasons of why one may want to either recompile or
upgrade his or her kernel.
<p>Install Kernel interfaces with the Linux operating system by running
a series of functions or groups of commands that automate the compiling
or recompiling and installation process. It consists of three groups of
functions: checking dependencies, building the kernel and moving files,
and editing the boot loader configuration file. Grouping all of the functions
in these three groups makes maintaining and altering the script much easier.
Install Kernel can also be considered a program, because a program does
checking and makes choices accordingly. A script is usually a file, which
contains a certain number of commands with no logic in mind. Therefore,
while ik is technically a script, it can also be called a program.
<p>Dependency checks are to make sure the current system configuration
and settings are properly setup before proceeding with the kernel build.
There are seven dependency checks, they are: a root check, space check,
link check, boot check, boot loader check, configuration check, and a module
check. First, the root check makes sure the user is a super user; which
means they are capable of editing important system files only accessible
to the root account. The space check makes sure there is at least 200 megabytes
available. The kernel source these days is around 150 megabytes just for
the source code. When one compiles the kernel, it may increase the size
to 50 megabytes or more. Therefore, ik checks for at least 200MB available
in order to successfully compile the kernel without running out of space.
Next, it is not required, but it is standard to have a symbolic link of
/usr/src/linux pointing to /usr/src/linux-x.y.z. The fourth check makes
sure the user has a /boot directory, this is where the Linux kernel files
will be installed to. The fifth check determines the bootloader that will
be used. There are two main boot loaders in Linux. LILO and GRUB are the
two most popular for booting the operating system. This check accurately
finds whether the kernel was booted from either LILO or GRUB by checking
which bootloader was used last. It then tells the rest of the script to
edit the correct one accordingly. The sixth configuration check is to make
sure users have created a proper kernel configuration file, which is used
in the process of building the Linux kernel. The final check is a module
check, if modules are turned off, the script will determine this and alter
the installation process to install with no module support. The main idea
behind the depdency checks is to make sure the user cannot damage his or
her system if they do not do something right.
<p>The installation process also contains seven functions. The installation
process is usually several commands. However, because of the differences
that can occur in a user's configuration file, each part of the building
process must be checked and the building process may need to be altered.
The first function makes sure the dependencies are setup correctly for
all files in the kernel source tree. The second function deletes stale
object files and or old kernel files. Next, the third function is the kernel
build function; this function runs a command to build the Linux kernel.
Next, functions four and five make and install modules if the user had
specified module support in his or her kernel configuration file. The sixth
function moves the Linux kernel and its System dependency map to the boot
partition. The last function of the build process sets up module dependencies
for the new kernel if modules were defined. The installation process also
includes a small error check for each part of the kernel build process.
If any part of the kernel build process fails; the script will abort, not
modifying any boot loader configuration files. This is important; because
if it did not abort, it may alter the boot loader configuration files,
thus rendering the system unbootable. It is important to support every
Linux configuration possible because of the wide use of this script.
<p>The boot loader configuration and setup process is probably the most
important aspect of installing a new kernel. An improper boot loader configuration
may leave one with system that does not boot; or simply does not boot the
new kernel. It is also important, as some systems may have two or more
boot loaders installed. There are four functions defined for this process.
The first function uses the boot loader, which was defined during the configuration
checks. The second function defines where the LILO or GRUB configuration
files are located. Next, depending on which boot loader is found, either
LILO or GRUB configuration files are edited automatically by sed. Sed is
a stream editor, which edits a file with no user intervention. If user
intervention were required, the user would have to be present between certain
parts of the kernel installation. With ik, it makes efficient use of a
user's time because only one command needs to be entered to complete the
entire installation and setup process.
<p>Install Kernel is a useful tool for those who are new to Linux, rebuild
their kernel often, or value their time. It reduces the commands for installing
the kernel from about thirteen to one. Users new to Linux may find this
attractive. This is because the entire process is automated; and if something
is not correct, in most cases ik will notify the user what is incorrect,
and how to fix the error. On the other side, for experienced users who
do not wish to spend valuable time installing a new kernel, this is also
very handy. Install Kernel is efficient by requiring no user intervention
and reducing time spent on kernel installs, and effective by giving new
to Linux the option for an easy kernel upgrade.&nbsp;<!-- *** BEGIN bio *** --><!-- *** END bio *** --><!-- *** BEGIN copyright *** -->
<p>
<hr><!-- P -->
<center>
<h5>
Copyright &copy; 2002, Justin Piszcz.<br>
Copying license <a href="../copying.html">http://www.linuxgazette.com/copying.html<br>
</a>Published in Issue 75 of <i>Linux Gazette</i>, February 2002</h5></center>
<!-- *** END copyright *** -->

<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">Writing Documentation, Part III: DocBook/XML</font></H1>
<H4>By <a href="mailto:cspiel@hammersmith-consulting.com">Christoph Spiel</a></H4>
</center>
<P> <HR> <P>  

<!-- END header -->




<p>To cite from ``DocBook -- The Definitive Guide'' (see <a href="#further 
reading">Further Reading</a> at the end of this section), <em>DocBook provides
a system for writing structured documents using SGML or XML</em>. In the
following, I shall focus on the XML-variant of DocBook, because the
SGML-variant is being phased out.</p>

<p>DocBook has been developed with a slightly different mindset than the 
systems I discussed in the two previous articles  
(<A HREF="../issue73/spiel.html">POD article</A>, 
<A HREF="../issue74/spiel.html">LaTeX/latex2html article</A>).
</p>

<ul>
<li>``Text'' in a DocBook document is better understood as ``textual data''.
Along the same lines, a DocBook document is better thought of as a
human-readable database.</li>

<li>DocBook, as a standard, prescribes how valid documents must be formed and
how the output produced from a DocBook document has to ``look''. I put quotes
around ``look'', because DocBook documents are not restricted to being viewed on
a screen, but can also be transformed into speech, for example in a car
navigation system. (Imagine your SUV asking you: ``Do you want to install KDE
version 3 now?'')</li>

<li>When transformed into any output format, DocBook documents are rigidly
verified whether they conform to a given structure. This structure is defined
in so-called document type descriptions, or DTDs for short. 

<blockquote>By changing the DTD, almost arbitrary constraints can be imposed on
a DocBook document. For example, an organizing committee of a conference
might adapt the DocBook DTD in such way that all the article of the conference's
proceedings will have a uniform look and all the necessary author
information.</blockquote>
</li>
</ul>

<p>The particular features of DocBook mentioned, imply uses of DocBook
documents that are not possible, at least not easily, with POD or LaTeX
documents.</p>

<ul>
<li>Because of their structure, DocBook documents are easily created,
modified, or queried programmatically. 

<p>For example, we load the <code>XML::DOM</code> module into Perl to access
XML compliant documents, and Python ships with the <code>xml.dom</code>
module, which has been designed for the same purpose.</p>

<p>The World Wide Web Consortium (W3C, <a href="http://www.w3c.org)">
http://www.w3c.org)</a> has even defined a language for XML translations,
called XSLT (see for example <a href="http://www.w3.org/TR/xslt">
http://www.w3.org/TR/xslt</a> and <a href= 
"http://www.oasis-open.org/cover/xsl.html).">
http://www.oasis-open.org/cover/xsl.html).</a> XSLT itself is a language
defined within the SGML framework, which makes XML and XSL look quite similar:
loads of angle brackets.</p>
</li>

<li>Various tools transform DocBook sources into HTML, TeX, GNU Texinfo and
many other -- including audio -- formats. This is again different to the
source formats we looked at before, where only a single application does the
transformation. 

<p>Popular transformation tools are:</p>

<ul>
<li>OpenJade (http://openjade.sourceforge.net/), which uses DSSSL (see for
example <a href="http://www.jclark.com/dsssl/">
http://www.jclark.com/dsssl/</a> and <a href= 
"http://www.oasis-open.org/cover/dsssl.html),">
http://www.oasis-open.org/cover/dsssl.html),</a> as a Lisp-like language to
describe the transformations from XML-DocBook to HTML, TeX, and so on and</li>

<li>Saxon (http://saxon.sourceforge.net/), which uses XSL to do the job.</li>
</ul>

<p>The installation of both tools including the necessary <a href= 
"http://sourceforge.net/projects/docbook">DSSSL stylesheets</a> or <a href= 
"http://sourceforge.net/projects/docbook">XSL stylesheets</a> is quite tricky,
thus I would like to recommend to beginners the installation from <em>
.deb</em> or <em>.rpm</em> packages.</p>
</li>
</ul>

<p>Being general purpose translators, both tools are not restricted to
transforming DocBook documents. If you feed them the right style sheets, they
will do other translations, too.</p>

<h3><a name="syntax">Syntax</a></h3>

<p>The DocBook/XML syntax resembles HTML. The fundamental difference between
the two being the strictness with which the syntax is enforced. Many HTML
browsers are extremely forgiving about unterminated elements, and they often
silently ignore unknown elements or attributes. DocBook/XML translators reject
non-DTD complying input with detailed error messages, and refuse to produce
any output in such cases.
</p>

<p>DocBook/XML is spoken in several variants, where the variants differ in
interpreting the closing tag of an element. The most verbose dialect always
closes <code>&lt;tag&gt;</code> with <code>&lt;/tag&gt;</code>. Another
variant allows for abbreviating the closing tag to <code>&lt;/&gt;</code>, yet
another allows dropping the closing tag for empty elements all together. I
prefer writing out every end tag, a style that has proven advantageous in
deeply nested structures such as nested lists. So, in this article only the
form <code>&lt;tag&gt; ... &lt;/tag&gt;</code> will appear.</p>

<p>Special characters are written with the ampersand-semicolon convention as
they are in HTML. The most frequently used special characters are</p>

<ul>
<li>Ampersand, ``<code>&amp;amp;</code>''</li>

<li>Less-Than Sign, ``<code>&amp;lt;</code>'' and</li>

<li>Greater-Than Sign, ``<code>&amp;gt;</code>''.</li>
</ul>

<p>Comments are bracketed between ``<code>&lt;!--</code>'' and
``<code>--</code>&gt;''.</p>

<h3><a name="document structure">Document Structure</a></h3>

<p>As already mentioned, DocBook documents must adhere to the structure that
is defined in a DTD. Every document starts with selecting a particular
DTD:</p>

<pre>
    &lt;!DOCTYPE                                       (1)
     book                                           (2)
     PUBLIC "-//OASIS//DTD DocBook XML V4.1//EN"    (3)
     "/usr/share/sgml/db41xml/docbookx.dtd"         (4)
     [ ]                                            (5)
    &gt;
</pre>

<p>where I have broken the expression (from ``&lt;'' to ``&gt;'') into several
lines for easier analysis, and added numbers in parentheses for reference.</p>

<p>Part&nbsp;(1) tells the system that we are about to choose our DTD.
Part&nbsp;(2) defines element <a href="#item_book"><code>book</code></a> to be
the root element of our document. part&nbsp;(3), the public identifier selects
the DTD to use. The public identifier is the string in quotes. The system
identifier, part&nbsp;(4) tells the translation tools where to find the DTD on
the local computer system. Within the square brackets, part&nbsp;(5), we could
place so called entity definitions, but I do not want go into detail on
entities in this introduction, so we leave this space empty.</p>

<p>Now, we start the text with the root element, in our case <a href= 
"#item_book"><code>book</code></a>. What elements go into <a href=
"#item_book"><code>book</code></a> is defined in the DocBook DTD. These are,
for example, <code>bookinfo</code> or <code>chapter</code>. For a
comprehensive list of allowed elements, consult ``The Definitive Guide''. The
elements allowed within <code>bookinfo</code> or <code>chapter</code> are also
defined in the DocBook DTD as are all elements. The only way constructing a
valid document is by obeying all the rules prescribed by the DTD.</p>

<p>What might look like a drag on first sight -- Rules? Rules suck! -- is the
key to open up the document to programmatic access. As the document complies
to the DTD, all post-processing can rely on that very fact. Good for the
programmers of the post-processors! I have to admit that the number of
elements and the elements' mutual relationships is tough to pick up. However,
the relations are logical: a chapter contains one ore more (introductory)
paragraphs and one or more Level&nbsp;1 sections. No section, on the other
hand, contains a chapter, that would be nonsense. Having a copy of ``The
Definitive Guide'' right next to the keyboard also helps to learn DocBook.
Further down, there is a short compilation of commonly used tags.</p>

<p>Here comes a very short, but complete DocBook document.</p>

<pre>
    &lt;!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1//EN"
                          "/usr/share/sgml/db41xml/docbookx.dtd" []&gt;
</pre>

<pre>
    &lt;book&gt;
        &lt;bookinfo&gt;
            &lt;title&gt;XYZ (version 0.8.15) User's Manual&lt;/title&gt;
        &lt;/bookinfo&gt;
</pre>

<pre>
        &lt;chapter id = "chapter-introduction"&gt;
            &lt;title&gt;Introduction&lt;/title&gt;
</pre>

<pre>
            &lt;para&gt;
                This chapter provides a quick introduction to XYZ.
            &lt;/para&gt;
</pre>

<pre>
            &lt;sect1 id = "section-syntax"&gt;
                &lt;title&gt;Syntax&lt;/title&gt;
</pre>

<pre>
                &lt;para&gt;
                    In this section we present an outline of the
                    syntax of the XYZ language.
                &lt;/para&gt;
            &lt;/sect1&gt;
</pre>

<pre>
            &lt;sect1 id = "section-core-library"&gt;
                &lt;title&gt;Core Library&lt;/title&gt;
</pre>

<pre>
                &lt;para&gt;
                    Even if no additional libraries are loaded to a
                    XYZ program, it has access to some core library
                    functions.
                &lt;/para&gt;
            &lt;/sect1&gt;
        &lt;/chapter&gt;
</pre>

<pre>
        &lt;chapter id = "chapter-commands"&gt;
            &lt;title&gt;Commands&lt;/title&gt;
</pre>

<pre>
            &lt;sect1 id = "section-interactive-commands"&gt;
                &lt;title&gt;Interactive Commands&lt;/title&gt;
</pre>

<pre>
                &lt;para&gt;
                    ...
                &lt;/para&gt;
</pre>

<pre>
                &lt;sect2 id = "section-interactive-commands-argumentless"&gt;
                    &lt;title&gt;Argumentless Commands&lt;/title&gt;
</pre>

<pre>
                    &lt;para&gt;
                        ...
                    &lt;/para&gt;
                &lt;/sect2&gt;
            &lt;/sect1&gt;
</pre>

<pre>
            &lt;sect1 id = "section-non-interactive-commands"&gt;
                &lt;title&gt;Non-Interactive Commands&lt;/title&gt;
</pre>

<pre>
                &lt;para&gt;
                    ...
                &lt;/para&gt;
</pre>

<pre>
                &lt;sect2 id = "section-non-interactive-commands-argumentless"&gt;
                    &lt;title&gt;Argumentless Commands&lt;/title&gt;
</pre>

<pre>
                    &lt;para&gt;
                        ...
                    &lt;/para&gt;
                &lt;/sect2&gt;
            &lt;/sect1&gt;
        &lt;/chapter&gt;
    &lt;/book&gt;
</pre>

<h3><a name="useful tags">Useful Tags</a></h3>

<p>To help the aspiring DocBook writer making sense of the loads of elements,
the DocBook standard defines, I have compiled a bunch of useful tags, which
are used often.</p>

<h4><a name="root section tags">Root Section Tags</a></h4>

<p>Root section tags define the outermost element of any document.</p>

<dl>
<dt><strong><a name="item_book"><code>book</code></a></strong><br>
</dt>

<dd>&lt;book&gt; 

<pre>
  I&lt;paragraphs or chapters&gt;
</pre>

<p>&lt;/book&gt;</p>
</dd>

<dt><strong><a name="item_article"><code>article</code></a></strong><br>
</dt>

<dd>&lt;article&gt; 

<pre>
  I&lt;paragraphs or level 1 sections&gt;
</pre>

<p>&lt;/article&gt;</p>
</dd>
</dl>

<h4><a name="sectioning tags">Sectioning Tags</a></h4>

<p>Sectioning elements divide the document into logical parts like chapters,
sections, paragraphs, and so on.</p>

<dl>
<dt><strong><a name="item_chapter%2C_sect1%2C_%2E%2E%2E%2C_sect6"><code>
chapter</code>, <code>sect1</code>, ..., <code>sect6</code></a></strong><br>
</dt>

<dd>&lt;chapter id = "<em>label</em>"&gt; 

<p><em>title</em></p>

<p>followed by</p>

<p><em>paragraphs or level N+1 sections</em></p>

<p>&lt;/chapter&gt;</p>

<p>Define a section. Commonly, chapter and section elements carry the <code>
id</code> attribute, which allows for referencing the elements with, for
example, &lt;xref linkend = "label"&gt;&lt;/xref&gt;.</p>
</dd>

<dt><strong><a name="item_para"><code>para</code></a></strong><br>
</dt>

<dd>&lt;para&gt; 

<p><em>paragraph text</em></p>

<p>&lt;/para&gt;</p>

<p>Group several lines of text together to form a paragraph. This is the
workhorse element in many documents.</p>
</dd>

<dt><strong><a name="item_programlisting"><code>
programlisting</code></a></strong><br>
</dt>

<dd>&lt;programlisting role = "<em>language</em>"&gt; 

<p><em>program text</em></p>

<p>&lt;/programlisting&gt;</p>

<p>Render a longish piece of program text -- preserving the line breaks.
The program is assumed to be written in the language specified in the
<code>role</code> attribute. Note
that within <a href="#item_programlisting"><code>programlisting</code></a> all
special characters retain their meaning!</p>

<p>This means in particular that you cannot use the control characters
``<code>&lt;</code>'', ``<code>&gt;</code>'', and ``<code>&amp;</code>'' inside
of it.  The several workarounds for this problem.  Either you replace all 
control characters with their mnemonic equivalents (``<code>&amp;lt;</code>'',
``<code>&amp;gt;</code>'', and ``<code>&amp;amp;</code>'' in our example), or
you wrap the program code in a <code>CDATA</code>, like, for example,</p>

<pre>
    &lt;programlisting&gt;
        &lt;![CDATA[
            cout &lt;&lt; "value = &lt;" &lt;&lt; &amp;p &lt;&lt; "&gt;\n";
        ]]&gt;
    &lt;/programlisting&gt;
</pre>

<p>or, if the program is stored in file&nbsp;<EM>my-program.pl</EM>, pull in
the whole file with</p>

<pre>
    &lt;programlisting&gt;
        &lt;inlinemediaobject&gt;
            &lt;imageobject&gt;
                &lt;imagedata format = "linespecific"
                           fileref = "my-program.pl"&gt;&lt;/imagedata&gt;
            &lt;/imageobject&gt;
        &lt;/inlinemediaobject&gt;
    &lt;/programlisting&gt;
</pre>
</dd>
</dl>

<h4><a name="list making tags">List-Making Tags</a></h4>

<p>Generate the three typical types of lists.</p>

<p>The <em>item</em>s or <em>definition</em>s are typically formed by one or
more paragraphs, but they are allowed to contain program listings, too. The
<em>term</em>s usually are one or more words, not paragraphs.</p>

<ul>
<li>Itemized List 

<p>&lt;itemizedlist&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;listitem&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>first item</em></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/listitem&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;listitem&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>second item</em></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/listitem&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;...</p>

<p>&lt;/itemizedlist&gt;</p>
</li>

<li>Enumerated List 

<p>&lt;enumeratedlist&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;listitem&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>first item</em></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/listitem&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;listitem&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>second item</em></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/listitem&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;...</p>

<p>&lt;/enumeratedlist&gt;</p>
</li>

<li>Description List 

<p>&lt;variablelist&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;varlistentry&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;term&gt;<em>first
term</em>&lt;/term&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;listitem&gt;</p>

<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>
first definition</em></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/listitem&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/varlistentry&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;varlistentry&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;term&gt;<em>second
term</em>&lt;/term&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;listitem&gt;</p>

<p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<em>
second definition</em></p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/listitem&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/varlistentry&gt;</p>

<p>&nbsp;&nbsp;&nbsp;&nbsp;...</p>

<p>&lt;/variablelist&gt;</p>
</li>
</ul>

<h4><a name="inline markup tags">Inline Markup Tags</a></h4>

<dl>
<dt><strong><a name="item_emphasis"><code>emphasis</code></a></strong><br>
</dt>

<dd>&lt;emphasis&gt;<em>text to be emphasized</em>&lt;/emphasis&gt; 

<p>Highlight a short part of the document; usually a single word.</p>
</dd>

<dt><strong><a name="item_filename"><code>filename</code></a></strong><br>
</dt>

<dd>&lt;filename&gt;<em>filename or directory name</em>&lt;/filename&gt; 

<p>Mark word as filename.</p>
</dd>

<dt><strong><a name="item_literal"><code>literal</code></a></strong><br>
</dt>

<dd>&lt;literal&gt;<em>literal something</em>&lt;/literal&gt; 

<p>&lt;literal role = "<em>classification</em>"&gt;<em>literal
something</em>&lt;/literal&gt;</p>

<p>Mark a word as being a literal expression. Use this tag only as last
possibility, if no other more specific tag matches. To calm one's bad
conscience, <a href="#item_literal"><code>literal</code></a> often gets
decorated with a <code>role</code> attribute, which describes more precisely
the kind of literal.</p>
</dd>

<dt><strong><a name="item_replaceable"><code>
replaceable</code></a></strong><br>
</dt>

<dd>&lt;replaceable&gt;<em>placeholder name</em>&lt;/replaceable&gt; 

<p>Mark a meta-variable.</p>
</dd>

<dt><strong><a name="item_title"><code>title</code></a></strong><br>
</dt>

<dd>&lt;title&gt;<em>title</em>&lt;/title&gt; 

<p>Give a name to a section or a formal element, like a table.</p>
</dd>
</dl>

<h4><a name="cross references">Cross References</a></h4>

<p>Cross references refer to other parts of the same DocBook document or to
other documents on the World Wide Web. Targets of the former are all elements
that carry an <code>id</code> attribute, targets of the latter are selected
with universal resource locators (URLs).</p>

<dl>
<dt><strong><a name="item_link"><code>link</code></a></strong><br>
</dt>

<dd>&lt;link linkend = "<em>target</em>"&gt;<em>item</em>&lt;/link&gt; 

<p>Install a (hyper-)link to the spot identified via <em>target</em> within
the current document.</p>
</dd>

<dt><strong><a name="item_ulink"><code>ulink</code></a></strong><br>
</dt>

<dd>&lt;ulink url = "<em>complete URL</em>"&gt;<em>item</em>&lt;/ulink&gt; 

<p>Install a hyper-link to a WWW-accessible document identified by a <em>
complete URL</em>. A complete URL includes the protocol, for example, <code>
http://</code>.</p>
</dd>

<dt><strong><a name="item_xref"><code>xref</code></a></strong><br>
</dt>

<dd>&lt;xref linkend = "<em>target</em>"&gt;&lt;/xref&gt; 

<p>Install a (hyper-)link to the spot identified via <em>target</em> within
the current document. A translator will add text around an <a href=
"#item_xref"><code>xref</code></a> element. For example, a <a href=
"#item_xref"><code>xref</code></a> to a section might be decorated with the
text ``<code>see section</code>''.</p>
</dd>
</dl>

<h3><a name="what i have left out">What I Have Left Out</a></h3>

<p>Ugh, I left out tons of stuff, but only to give you a smooth, 
non-frightening introduction. Some great things DocBook handles that I have not
discussed are</p>

<ul>
<li>Tables,</li>

<li>Graphics (with automatic selection of the ``appropriate'' format),
and</li>

<li>Automated index generation.</li>
</ul>

<p>Also left out is everything related to changing the DTD or changing the
style sheets.</p>

<h3><a name="pros and cons">Pros and Cons</a></h3>

<dl>
<dt><strong><a name="item_Pros">Pros</a></strong><br>
</dt>

<dd>
<ul>
<li>DocBook is an official W3C standard</li>

<li>Access to text via (user-defined) programs</li>

<li>Texts carry a rich marked up</li>
</ul>
</dd>

<dt><strong><a name="item_Cons">Cons</a></strong><br>
</dt>

<dd>
<ul>
<li>Slow transformation</li>

<li>The DocBook format is very verbose. Unless the writer uses a special
editor, a lot of typing is required.</li>
</ul>
</dd>
</dl>

<h3><a name="further reading">Further Reading</a></h3>

<ul>
<li>
Norman Walsh and Leonard Muellner, <em>DocBook: The Definitive Guide</em>,
O'Reilly&nbsp;&amp;&nbsp;Associates, first edition, ISBN:&nbsp;156592-580-7 at
<a href= 
"http://www.amazon.com/exec/obidos/ASIN/1565925807/qid%3D1010861150/ref%3Dsr%5F11%5F0%5F1/104-6293324-1789547">
Amazon</a>. It is also available <a href="http://www.docbook.org/tdg/en/">
online</a> (as second edition)
</li>

<li>
<a href="http://www.docbook.org">DocBook website</a>
</li>

<li>
Norman Walsh's (chairman of the DocBook steering committee) <a href= 
"http://nwalsh.com/">website</a>
</li>

<li>
<a href="http://www.oasis-open.org/committees/docbook/">DocBook Steering
Committee</a>
</li>
</ul>

<p>Next month: Texinfo</p>





<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">Christoph Spiel</H4>
<EM>Chris runs an Open Source Software consulting company in Upper Bavaria, Germany.
Despite being trained as a physicist -- he holds a PhD in physics from Munich
University of Technology -- his main interests revolve around numerics,
heterogenous programming environments, and software engineering.  He can be
reached at 
<A HREF="mailto:cspiel@hammersmith-consulting.com">cspiel@hammersmith-consulting.com</A>.</EM>

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2002, Christoph Spiel.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 75 of <i>Linux Gazette</i>, February 2002</H5>
<!-- *** END copyright *** -->


<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <HR> <P> 
<!--===================================================================-->

<center>
<H1><font color="maroon">The Adventures of Little Linus In GNU/Wonderland</font></H1>
<H4>By <a href="mailto:dclydew@binaryfreedom.com">D Clyde Williamson</a>
<BR>Originally published at <A HREF="http://www.systemtoolbox.com/">System Toolbox</A>.  Reprinted with permission.</H4>
</center>
<P> <HR> <P>  

<!-- END header -->




<h3>In Which Little Linus Finds GNU/Wonderland</h3>

<p>
It was a sunny afternoon, and Linus was happily playing in his
backyard.  He was busy with all the things that little Linuses do on
sunny days in their backyards. He was sitting in the shade of a large
tree when he noticed something very out of place in a Linuses
backyard. Waddling across the yard was a penguin! Every few yards,
this penguin would pull out a Compaq Itsy, consult it, put it back in
his pocket and say, "I'm late, I'm late, I'm late for my release
date!"

<p>
Little Linus had never seen a penguin this close before. He had also
never seen an Itsy. And he was rather sure that penguins shouldn't be
talking or consulting Itsys. So as any curious Linus would do, he
followed the penguin. No matter how quickly Linus walked, the penguin
seemed to be the same distance away. The penguin didn't waddle any
faster, Linus just couldn't seem to get any closer.

<p>
Suddenly, the penguin stopped at the very tree Linus had been sitting
under. "Ah, here's what I was looking for... root access!" the
penguin muttered. Then he popped into a small hole in one of the roots
of the tree.

<p>
Linus decided to follow. He squeezed into the hole, and suddenly
realized that he was falling. Everything below him was dark, so he
couldn't see the bottom. He continued to fall wondering what was next.
He began to look at his surroundings and noticed that there was a
brick wall on one side of the hole. As he looked closer he could make
out a set of eyes in the wall, falling at the same speed as he
was. One of the eyes winked at him. Linus was slightly startled, but
remembered his manners. "Hello, umm, Mr. Wall," Linus began
cautiously, not quite sure how one should address walls.

<p>
To his surprise, a nose, mustache and mouth formed below the eyes and
the entire face continued to slide down the wall at the same speed as
Linus. "Hello young man! How are you this fine day?" the wall asked
Linus.

<p>
"Well", Linus replied, "I'd feel much better if I knew how to stop
falling."

<p>
"Ah", the wall nodded sagely, "Usually, one stops when they hit the
bottom. But, as the camel says, 'there's more than one way to do
it'."

<p>
Linus didn't quite understand the bit about the camel. However, he was
sure that hitting the ground wasn't the best way to stop. He looked at
the wall. "Ummm, I'd really rather stop in a way that didn't hurt
me..."

<p>
The wall looked at him a bit then said, "Well, I suppose I can ask
the camel to catch you."  The face disappeared.

<p>
Linus continued to fall and realized that he hadn't looked down for
awhile. Indeed it seemed that there was a light coming up from below.
As he looked down, he saw the ground about thirty feet away. There
directly under him stood a camel. Before he knew it, he had landed
quite softly and safely between the camels humps. The camel turned and
smiled at him, flashing his perly white teeth.

<p>
The wall spoke again. "The camel will help you get started here. He's
quite user friendly."  Then the face was gone again.

<p>
Linus looked at the camel, then remembered why he was here to begin
with, "I was following a penguin, but I seemed to have lost his
trail." The camel nodded and began walking towards a nearby wood.

<p>
<h3>In Which Linus Meets Several Strange Inhabitants of GNU/Wonderland</h3>

<p>
As they approached the wood, Linus noticed a taco walking up the road
towards him. The taco appeared to be carrying several newspapers under
his arm. "News for Nerds!" he was calling, "Get your News for Nerds
here."

<p>
Linus stopped the camel and walked over to get a newspaper. However,
before he could reach the taco, he heard a loud noise. Several
thousand creatures, boys, girls, rabbits, unicorns, trolls and all
other sorts of animals came rushing toward the taco. They all hit the
taco at once, grabbing for the newspapers. Linus watched as wave after
wave of things rushed across the poor taco. Then as suddenly as they
had come, they were gone. Linus ran over to the taco, "Are you hurt?"
He asked with concern.

<p>
"Not bad, at least this time no one dumped any breakfast cereal on
me," the taco replied getting up and brushing himself off. [1]

<p>
Linus thought about querying further on the subject of breakfast
cereal, however, he decided to skip it. After making sure the taco
was OK he climbed back on the camel and set off again.

<p>
He had not traveled far when he heard a strange noise in the forest
beside the path. "Perhaps it is a bear," he thought. However, before
he could urge the camel to pick up the pace a man stepped out of the
woods onto the path. He was an odd looking man, with hair that pointed
anywhere except where hair usually points. Linus figured the man must
have forgotten he owned a beard, since it looked like the beard had
wandered off on its own quite awhile ago.

<p>
"Hullo, boy!" the man waved at Linus. "I am GNUman. Who are you?"

<p>
"My name is Linus, and it's nice to meet you, Neuman." Linus got down
to shake the man's hand.

<p>
"Not Neuman, it's GNUman. Say it right!"  The man said loudly.

<p>
Linus looked at the man carefully, then deciding he wasn't dangerous,
shook his hand and said, "It's nice to meet you GNUman."

<p>
"Well, of course I'm more than happy to meet anyone around these
parts.  By the way, here's the rules to my game," GNUman said
solemnly, handing Linus a scroll. "The rules are, that anyone can
change the rules, as long as they tell everyone what rules they
changed. That way everyone can make the rules fit their needs."

<p>
Linus wasn't quite sure what GNUman was talking about. However, he
politely took the scroll and promised to read it. GNUman smiled and
wandered off into the woods.

<p>
After a few hours of riding around on the camel, Linus noticed party
sounds emanating from a nearby clearing. The camel noticed his
interest and moved in that direction.

<p>
As they broke into the clearing there was an amazing sight. A long
table set with coffee, doughnuts, pizza, as well as Chinese, Indian,
and Mexican food. At one end was a keg of Guinness. At the head of the
table was a man with a bushy black beard, long black hair, sunglasses
and a red fedora. He motioned Linus over to a chair.

<p>
"I've been waitin' a bloody long time on you," the man said with a
British accent. "Do you know how hard it is to keep all this food
hot?"

<p>
Linus, beginning to get used to the odd people of this land, smiled
and apologized for taking so long. Of course he had no idea that he
was even expected, let alone late.

<p>
"Oh, not to worry," the English fellow said in a nicer tone, "I'm sure
you were busy."

<p>
They began to eat, and Linus was amazed at the energy that this special
food gave him. After eating in silence for awhile, he noticed that
other creatures were sitting at the table enjoying the food as
well. Oddly, he hadn't seen any of them sit down. Indeed, the large
dog sitting next to him had appeared from nowhere. Linus had seen many
canines before, but this was the first dog that he had seen with a big
white beard.

<p>
The dog noticed Linus and flashed him a very big smile. He paused to
wipe some white foam from his mouth and began eating again. Linus was
a bit concerned that the dog may be 'mad'... Excusing himself, he got
up to leave.

<p>
The Englishman at the head of the table motioned for him. "You can't
leave yet," he exclaimed, "You have to do what you came for."

<p>
Linus had no idea what the man was talking about, so he waited
patiently while the Englishman fiddled around in a big black box.

<p>
"Ah here it is," the man said, pulling out a single kernel of corn. "We
need your blessing on this... ummm, here!"

<p>
With that the man handed Linus the piece of corn, and a crystal
container filled with a yellow liquid. the bottle was labeled
"Warning, contains hP2."

<p>
Linus stood there for a minute, everyone at the table had stopped
eating and was watching him closely. He opened the stopper and
sprinkled some of the 'hP2' on the corn. Everyone cheered and the
kernel began to shake and jump. It bounced out of Linus' hand and fell
onto the ground. It began to sprout and grow, a huge green plant came
out of it and grew and grew, all the time the diners at the table were
laughing, saying things like "Now that's scalability" or "Look at that,
40 feet high and still standing... How stable can you get!!"

<p>
Linus began to worry that he was expected to do something. But, before
he could figure it out, the Dog that had sat next to him was again
beside him.

<p>
"Well, what are you waiting for?" the dog asked. "You should already
be climbing it."

<p>
"Ummm, why would I climb it?" Linus asked.

<p>
"No time for questions, I'll meet you up there," the dog replied, and
promptly disappeared. The only thing left was the bushy, white beard
which slowly faded.

<p>
<h3>Linus And The Cornstalk</h3>

<p>
Linus had been climbing the cornstalk for what seemed like hours when
he finally found himself at the top. There before him was a giant
building with a sign outside that read "Warning, Home of The RedMond
Giant...  all trespassers will be 'Embraced and Extended'."

<p>
Linus wasn't sure what that meant, but it didn't sound like something
he wanted to have done to him. He began to look around, when he
noticed fading into existence, a white bushy beard. Following the
beard was the rest of the Dog, which he had seen down below.

<p>
"Hey again!" the dog said, smiling, "I see you made it."

<p>
"Yes, though I have no idea why you wanted me to climb up here. I
really don't want to be embraced and extended by a giant."

<p>
"Oh, its ok, you have GNUman's rules, don't you? They're the only
magic strong enough to defeat the giant."

<p>
Linus pulled out the scroll and looked at it carefully. "It doesn't
look very magical to me," he said.

<p>
The dog smiled and began walking to the castle. Linus shrugged and
followed him. As they got closer, he began to hear a loud voice
singing, "Biddle, Bidele, Boddle, Bandard, I smell the smell of an
Open Standard.  Be it old or be it new, I'll make it part of my
proprietary brew!"

<p>
Linus stopped, the voice was very loud, and a voice that loud had to
come from a mouth that was very big. However, the dog continued to
trot toward the castle, without a moments pause, so Linus
followed. Finally he reached the formidable gates of the
building. "There's no way in," Linus said relieved. "There is an awful
lot of security around this place."

<p>
The dog laughed, "The only thing worse that the giant's silly rhyme,
is his security! Trust me, there are many, many ways to get past it."

<p>
Sure enough, with just a slight bit of poking, a whole section of the
fencing fell apart, leaving a gaping hole. The dog led Linus into the
compound. As they walked across the yard toward the front door...
several security people rushed to the point where they broke in. One
of them, apparently the leader stood up on a podium and began to speak
loudly.

<p>
"This is only a theoretical way of breaking into the giants compound.
Anyone who is concerned about this is just being paranoid. Besides,
only bad people would break into the compound, and we all know that
bad people are stupid. So they wouldn't know about this hole."

<p>
As he spoke, several kiddies began knocking holes in other parts of
the fence, following the example of Linus and the dog. The security
people ignored them.

<p>
"Furthermore, there is very little likelihood that anyone will be able
to duplicate this hole. In fact, if this fence were upgraded to
version 2.000 then we wouldn't need to be concerned at all."

<p>
Immediately, all the other workers began putting up the next version
of the fence. It looked bigger and stronger than the earlier
fence. Linus looked at the dog. "It will be hard to get back out."

<p>
"Nonsense, I told you their security is hopeless. This new fence will
likely be even worse than the first."

<p>
So Linus and the dog continued into the building, completely unnoticed
by the security people. Within a few moments they were inside the
building. The dog looked at Linus. "Ok, open the scroll and read the
magic words of GNUman," he whispered.

<p>
Linus opened the scroll and read, "The GNU General Public License,
Preamble..."

<p>
Linus read and read and read. Finally, as he reached the end of the
very long magic incantation, he heard a noise. He looked up from the
scroll, and saw huge cracks forming in the walls and ceiling.  The
building began to shake and shudder. The dog looked at Linus and said,
"Let's get out of here. You've done what you came to do!"

<p>
They ran to the door and into the courtyard. Behind them they could
hear the giant bellowing for his people to fix the holes and
cracks, but it was too late, the home of the RedMond Giant was
collapsing. Linus and the dog reached the brand-new fence, and to
Linus' surprise, they realized that the entire fence was made of Swiss
cheese, they climbed through the holes in the fence, and ran for the
cornstalk.

<p>
The dog began to fade, he looked around at Linus, "Thank you so
much...  we all thank you. Have a nice life..."

<p>
"Wait," Linus shouted, "What am I supposed to do now?"

<p>
The dog was gone again, except for the beard. "Just get to the
cornstalk.  That new kernel will take care of you."

<p>
Linus reached the cornstalk, and began climbing down as fast as he
could, but he lost his footing and before he knew it he had begun to
fall. The ground was getting closer and closer, and suddenly, he found
himself, laying on his back, on the ground. He blinked his eyes, and
looked up at the Corn Stalk. He rubbed his eyes and looked again. It
wasn't a cornstalk at all.  It was the old tree in his back yard!

<p>
Linus got up, rubbed his eyes and walked toward the house. Once
inside, he noticed a package sitting on the table, there was a card
that read "To Our Dear Son".  He opened the package, and to his delight
there was a brand new 386 computer, just for him.

<p>
The End (or is it?)

<p>
<small><b><u>Footnotes</u></b>

<p>
[1] The author doesn't condone the abuse of any forum by trolls. This
includes comments about hot grits. However, this small joke just
couldn't be resisted.</small>
</font>







<!-- *** BEGIN bio *** -->
<SPACER TYPE="vertical" SIZE="30">
<P> 
<H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">D Clyde Williamson</H4>
<EM>Clyde is a network security specialist for a large corporation in the
US. He writes articles on Technology, Open Source Advocacy and History
(pre-1600). After writing the above article, he lives in prepetual fear
of Lewis Carrol's ghost seeking revenge.</EM>

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <!-- P --> 
<H5 ALIGN=center>

Copyright &copy; 2002, D Clyde Williamson.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR> 
Published in Issue 75 of <i>Linux Gazette</i>, February 2002</H5>
<!-- *** END copyright *** -->


<P> <HR> <P>
<center>
<H1><font color="maroon">Modest home on the web</font></H1>
<H4>By <a href="mailto:zw@debian.org">zhaoway</a></H4>
</center>
<P> <HR> <P>

<!-- END header -->

<h2>Introduction</h2>

<p> We will build a small homepage site without server side
scripts. This is suitable for people who do not run their own web
servers or have no priviledge to use server side facilities. We will
use JavaScript and Lex to simulate some effects of template files to
ease the maintaining tasks. We will use Makefile to automate the
uploading, and use CSS to provide fancy formatting effects. We will
use only standard HTML in our main content file, thus provide a good
chance for any browsers to surf our web site easily.

<p> The weird choice of using Lex to present a template effect is
because I want to pretend that I am a guru. And gurus often use
complicated or even brain damaged tools to fulfil simple and sometime
stupid tasks. Of course, if I am a true guru, I'd rather write a
similar tool by myself from scratch using LISP or C. But since I am
only pretending I am one, so forget about it.

<h2>HTML and CSS</h2>

<p> There is a wonderful <a href="http://www.debian.org">Debian</a>
package which provides great documentation on standard CSS and HTML
practice. That is <code>wdg-html-reference</code> package. If you are
serious into HTML 4 and CSS, then you'd better <code>apt-get</code>
into that package, and read the documents there. They're easy to
follow. Only remember one thing though, a good understanding on CSS
does NOT mean that you should use every possible effects on your
homepage. A good taste is more important than a good technique. At the
end of this article, I presented some <a href="#example">example
files</a>, you could keep them handy when reading through.

<p> I will not duplicate those excellent documentation on HTML and CSS
here, and there are many more high quality documents outside on the
web and in the bookstore. Even better, you could use your browser's
"View Source" menu item to sneak in every webpage that you're
interested to learn from. I will provide you one advice though, that
is you should keep it simple, keep your homepage simple unless you
have a big team of webmasters and webmistress work for you, or you
have a lot and a lot of free time to work on your homepage.

<p> Simple does not necessarily mean ugly, sometime simple is
considered beauty, expecially when the CSS is available to nearly
everyone now. So your best practice (pretending that I am an
expert. heh) is to use standard HTML in your content file, and use the
HTML tags as logically as you can.

<p> For example, you may want to use <code>&lt;i&gt;</code> to
empasize a sentence or a word, DON'T, use <code>&lt;em&gt;</code>
instead. Then use CSS to provide the desired effects. That's the whole
point. And not to forget to appreciate the <a
href="http://www.mozilla.org">Mozilla</a> web browser which is nearly
the most standard compliant one out there. (Hint, use it to test your
webpage!)

<h2>Using JavaScript</h2>

<p> Why using JavaScript? Since we are only building a modest
homepage, we won't need those fancy features, not to mention those
annoying pop-ups. The reason we are using JavaScript is that it could
present us some template like features which could ease our task
maintaining big bunch of webpages. Modest homepage does NOT mean that
we cannot put many files there. ;)

<p> For example, if we want to present a navigation menu for our
webpage, we will have to copy and paste our menu paragraph in HTML
into every content file (as mentioned above, we do not have enough
priviledges to use any server side facilities.), and what if we want
to change the style used for our menu? That's a big nightmare to
adjust each webpages for that.

<p> Instead we could write our menu in a JavaScript, and include the
following in each of our webpages:

<p>
<code>
&lt;script type="text/javascript" src="header.js" charset="iso-8859-1"&gt;
&lt;/script&gt;
</code>

<p> When we want to add an item to our menu, we only need to change
the <code>header.js</code> file, then viola, every webpages are
changed accordingly.

<p> The syntax of JavaScript is very easy to learn, by reading some <a
href="#example">examples</a>, you could get nearly the whole
idea. Since we are using JavaScript to present navigation menus, we
could even ease the task of generating menus by hand too. Go check out
the example <code>header.js</code> at the end of this article.

<h2>Using Lex</h2>

<p> Lex is presented in the Debian package <code>flex</code>. It is a
GNU tool. What lex do is to scan the input file, and whenever a
regular expression is met, execute some C code. So we can use it to
scan our templates then generate the HTML files. Lex could turn your
dull project of maitaining a stupid personal homepage into an exciting
C programming journey. Isn't it wonderful?

<p> Lex is a scanner generator, which means, we use lex to generate
our scanner, then using our scanner to scan our template files to
generate HTML files. How could lex generate a scanner? It does this by
reading a rules file written by us. Basically, we design some set of
rules, then using this rules in our content files. And we write a
rules file for Lex, then we use lex to read our rules file and
generate a scanner, then we use the scanner to scan our content file
to get the desired HTML file. And, it's very simple! Gurus R Us!

<p> What makes a rule? A rule is made of two parts. The first part is
a regular expression (regex) similar to that you found in
<code>perl</code> or <code>egrep</code>. The second part is a small
part of C code. Whenever a regex is found met, then the C code will be
executed. The following is a sample rule from our example rules file:

<pre>
\"header\" {
  if (flag_lex == 1 && flag_key == 1 && current_key == HERE)
    {
      fprintf(yyout,
	      "&lt;!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\""
	      "\"http://www.w3.org/TR/REC-html40/strict.dtd\"&gt;"
	      "&lt;html&gt;&lt;head&gt;&lt;title&gt;{zhaoway} %s&lt;/title&gt;"
	      "&lt;link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\"&gt;"
	      "&lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"&gt;"
	      "&lt;meta name=\"description\" content=%s&gt;"
	      "&lt;meta name=\"keywords\" content=%s&gt;&lt;/head&gt;&lt;body&gt;"
	      "&lt;script type=\"text/javascript\" src=\"header.js\" charset=\"iso-8859-1\"&gt;"
	      "&lt;/script&gt;\n",
	      keys[TITLE], keys[DESCRIPTION], keys[KEYWORDS]
	      );

      flag_key = 0;
    }
  else ECHO;
}
</pre>

<p> The above code means that, when "header" is appeared in the input
file, and some conditions are satisfied, then we will replace it with
a big bunch of HTML codes. The corresonding example content file is as
the following:

<pre>
&lt;lex title="home page" description="zhaoway's homepage." /&gt;
&lt;lex keywords="zhaoway, personal, homepage, diary, curriculum, vitae, resume" /&gt;
&lt;lex here="header" /&gt;
</pre>

<h2>Making the upload</h2>

<p> When doing the upload, to decide which file on the server needs to
be updated is difficult, and that task should be automated indeed. So
we use Make to do it. The basic idea is to touch a blank
<code>some.html.upload</code> file whenever <code>some.html</code> is
uploaded. When <code>some.html</code> is newer than
<code>some.html.upload</code> that means it needs to be uploaded to
the server again. The following <code>Makefile</code> rule shows that:

<pre>
%.upload: %
	lftp -c "open -u \"$(USER),$(PASS)\" $(SITE); put $<"
	touch $@
</pre>

<h2>Conclusion</h2>

<p> Makefile and Lex themselves warrantize lengthy articles. They are
very traditional Unix tools for C development. But could be very
useful in maintaining webpages. We cannot explore the details of them
very carefully. This article is just mean to raise your imagination
with these traditional Unix tools.

<h2><a name="example">Example files available</a></h2>

<ul>
  <li><a href="misc/zhaoway/Makefile.txt">Makefile</a></li>  
  <li><a href="misc/zhaoway/scan.l.txt">scan.l</a> Lex rules file</li>  
  <li><a href="misc/zhaoway/index.scan.txt">index.scan</a> Template file for index.html</li>  
  <li><a href="misc/zhaoway/header.js.txt">header.js</a></li>  
  <li><a href="misc/zhaoway/footer.js.txt">footer.js</a></li>  
  <li><a href="misc/zhaoway/style.css.txt">style.css</a></li>  
</ul>

<p> You could visit <a href="http://www.zhaoway.com">my homepage</a>
for the resulted effects. Have fun and good luck!

<!-- *** BEGIN bio *** -->

<P> <H4><IMG ALIGN=BOTTOM ALT="" SRC="../gx/note.gif">zhaoway</H4>

<EM>zhaoway lives in Nanjing, China. He divides his time among his
beautiful girlfriend, his old Pentium computer, and pure
mathematics. He wants to marry now, which means he needs money, ie., a
job. Feel free to help him come into the sweet cage of marriage by
providing him a job opportunity. He would be very thankful! His <a
href="http://www.zhaoway.com/cv.html">curriculum vitae</a> is at his
<a href="http://www.zhaoway.com">homepage</a>. He is also another
volunteer member of the <a href="http://www.debian.org">Debian
GNU/Linux</a> project.</EM>

<!-- *** END bio *** -->

<!-- *** BEGIN copyright *** -->

<P><hr>

<H5 ALIGN=center> Copyright &copy; 2002, zhaoway.<BR> Copying license
<A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A>
<BR> </H5> <HR>

<!-- *** END copyright *** -->

</BODY></HTML>

<H4 ALIGN="center">
"Linux Gazette...<I>making Linux just a little more fun!</I>"
</H4>

<P> <hr> <P> 

<H1><font color="maroon">The Back Page</font></H1>

The back Page is short this month because Your Editor is similtaneously
(A) working on another project,
(B) going on vacation, and (C) preparing a talk for the 
<A HREF="http://www.python10.org/">Python conference</A>, all at the same time.  I'll
be writing an article about the conference for <I>Linux Journal</I>, and presenting a
paper called <A HREF="http://www.cheetahtemplate.org/">Cheetah: the Python-Powered
Template Engine</A>, and leading a BOF (Birds of a Feather) discussion on Cheetah, a
project I'm a volunteer developer for.

<P> There will be more Esperanto announcements next month.  Meanwhile, baibilu pri
Linukson on a new mailing list, linux-esperanto
(<A HREF="http://www.ssc.com/mailman/listinfo/linux-esperanto/">http://www.ssc.com/mailman/listinfo/linux-esperanto/</A>).
(If you missed the Esperanto grammar discussion from January's LG, 
<A HREF="../issue74/lg_backpage.html">here it is</A>.)



<HR> <!-- ************************************************************** -->

<P> Happy Linuxing!

<P> Mike ("Iron") Orr<br>
Editor, <A HREF="http://www.linuxgazette.com/"><i>Linux Gazette</i></A>, <A
HREF="mailto:gazette@ssc.com">gazette@ssc.com</a>
<BR CLEAR="all">

<!-- *** END Not Linux *** -->

<!-- *** BEGIN copyright *** -->
<P> <hr> <P> 
<H5 ALIGN=center>
Copyright &copy; 2002, the Editors of <I>Linux Gazette</I>.<BR>
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 75 of <i>Linux Gazette</i>, February 2002</H5>
<!-- *** END copyright *** -->


</BODY></HTML>