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
|
2007-12-31 Jim Meyering <jim@meyering.net>
* doc/coreutils.texi (Block size): Put braces around multi-digit
exponents. Reported by Darrel Francis.
Add a syntax check, so this doesn't recur. Reorganize existing checks.
* doc/Makefile.am (sc-exponent-grouping):
(syntax_checks): New variable.
(sc-avoid-io, sc-avoid-non-zero, sc-avoid-timezone):
(sc-avoid-zeroes, sc-use-small-caps-NUL): New rules, extracted
from check-texinfo.
(check-texinfo): Depend on $(syntax_checks).
2007-12-30 Mike Frysinger <vapier@gentoo.org>
* src/dircolors.hin (TERM): Add gnome-256color.
2007-12-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/coreutils.texi: Fix a typo. Avoid the term `relationals'.
2007-12-20 Jim Meyering <meyering@redhat.com>
Use comma-separated list in ./configure --help output.
* configure.ac: Map commas to spaces in excluded-program list.
Use a comma-separated list, not a space-separated one.
* m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG):
Expect list of program names to be comma-separated.
Reported by Jan Bauke Douma.
Avoid another "make check" failure due to omitted programs.
* tests/test-lib.sh (require_built_): New function.
* tests/misc/groups-version: Use it to skip this test if
either groups or id is not built.
Avoid spurious "make check" failures due to omitted programs.
* man/Makefile.am (distcheck-hook): Make check rules dependents of
this target, not of check-local, so that people aren't distracted by
failures due to programs omitted via --enable-no-install-program=...
2007-12-19 Paul Eggert <eggert@cs.ucla.edu>
* src/uniq.c (usage): Improve wording in --help "Note".
2007-12-18 Jim Meyering <meyering@redhat.com>
* src/uniq.c (usage): Note that sorting uniq's input is often useful.
Suggested by Eric Blake.
(usage): Say "key-selection", not "field-selection".
Quote example commands consistently.
2007-12-15 Jim Meyering <meyering@redhat.com>
Version 6.9.91.
* Makefile.cfg (gpg_key_ID): Use new, longer signing subkey.
2007-12-12 Jim Meyering <meyering@redhat.com>
* tests/mv/part-symlink: Redirect diff output to stderr.
2007-12-11 Jim Meyering <meyering@redhat.com>
Add a test to exercise today's bug fix.
* tests/misc/selinux: Test for today's bug fix.
* NEWS: Mention the SELinux "ls -l" fix.
2007-12-11 Paul Eggert <eggert@cs.ucla.edu>
"ls -l" wouldn't output "+" on SELinux hosts unless -Z was also given.
* src/ls.c (gobble_file): Also get the file context if -l is specified.
Treat getfilecon failures like file_has_acl failures.
(UNKNOWN_SECURITY_CONTEXT): New constant.
(clear_files): Don't free it.
(gobble_file): Set unknown security contexts to it; that way, we
don't have to have special cases for unknown contexts.
(print_long_format, print_file_name_and_frills): Don't worry
about scontext being null, since it's always some string now.
2007-12-11 Jim Meyering <meyering@redhat.com>
* NEWS: Add the "Bug fixes" heading.
2007-12-09 Jim Meyering <meyering@redhat.com>
"rm" as root would fail to unlink a non-directory on OS X 10.4.x
* src/remove.c (remove_entry) ["can unlink directories"]: Fix a
mistakenly reversed condition.
* NEWS: Mention this bug fix.
Reported by Pieter Bowman.
2007-12-08 Jim Meyering <meyering@redhat.com>
* src/c99-to-c89.diff: Adjust shred.c offsets.
2007-12-04 Jim Meyering <meyering@rho.meyering.net>
Reflect change in gnulib: don't include getpagesize.h,
now that it's provided by unistd.h.
* src/cat.c: Don't include getpagesize.h.
* src/copy.c: Likewise.
* src/dd.c: Likewise.
* src/shred.c: Likewise.
* src/split.c: Likewise.
2007-12-02 Jim Meyering <meyering@redhat.com>
Copy a .po file into place also when the target doesn't exist.
* bootstrap (gnulib_tool): ... not just when the checksum differs.
So now, if I manually remove po/xx.po, rerunning bootstrap will
copy the latest into place.
Make my-distcheck depend on "check".
* Makefile.maint (my-distcheck): Also depend on "check", so I can't tag
and release something that fails "make check" (however harmless) when
run in a checked-out-from-git dir, but not in the distributed tarball.
* NEWS: Add the usual "Noteworthy changes in release 6.9.91..." line.
Remove just-installed su, if unable to make it set-UID root.
Normally, su isn't even installed. However, if you configure with
--enable-install-program=su, and then install with insufficient
privileges, we now make sure to remove the just-installed binary.
* src/Makefile.am (install-exec-hook): Rename from install-exec-local,
so that this rule is guaranteed to be run *after* installation.
If unable to chown and chmod the installed "su" program, remove it.
Reported by Greg Schaefer.
2007-12-01 Bob Proulx <bob@proulx.com>
Make existing-perm-race executable.
* tests/cp/existing-perm-race: Update file mode.
2007-12-01 Jim Meyering <meyering@redhat.com>
Version 6.9.90.
* NEWS: Remove the now-untrue statement about cp vs. dangling symlinks
Change release procedure: tag *before* running e.g., "make stable".
* Makefile.maint (vc-dist): Don't tag. Now, you must apply the tag
before running "make beta", "make stable", etc.
(vc-tag-check): Remove rule. No longer makes sense.
* Makefile.maint (vc-tag-check): Correct check for existing git tag.
Defer NEWS and ChangeLog checks until after the version-changing tag.
* Makefile.maint (alpha beta major): Don't depend on the
news-date-check changelog-check targets. They must fail before
applying the version-changing tag. Instead, run them after "vc-dist".
* NEWS: Record release date and new version number.
Mention some of the SELinux changes.
* src/stat.c (main): Adjust a comment.
* TODO: Add some entries (documentation needed),
and remove the one for mktemp.
Add "extern" keyword to declaration of cp_options_default.
* src/copy.c (cp_options_default): Mark as "extern", so the
"sc_tight_scope" part of "make distcheck" passes.
2007-12-01 Jim Meyering <meyering@redhat.com>
Change comments: say bug present up to coreutils-6.9, not fixed in 6.10.
* tests/cut/Test.pm: Adjust comment.
* tests/misc/cut: Likewise.
* tests/misc/ls-misc: Likewise.
* tests/misc/od: Likewise.
* tests/misc/stty-invalid: Likewise.
* tests/tr/Test.pm: Likewise.
2007-11-29 Paul Eggert <eggert@cs.ucla.edu>
Add a test for cp -p and existing file permissions.
* tests/cp/Makefile.am (TESTS): Add existing-perm-race.
* tests/cp/existing-perm-race: New test. It isn't much of a
test yet, since it's hard to catch the race, but it has a FIXME
that will let us do a better test later.
2007-11-28 Paul Eggert <eggert@cs.ucla.edu>
Fix a security race with "cp -p A B" when B already exists.
* src/copy.h (struct cp_options): New member owner_privileges.
* src/copy.c (USE_ACL): Define to 0 if not defined, for convenience.
(owner_failure_ok): New function.
(set_owner): Avoid a security-related race by doing an extra chmod
first if it looks like there might be trouble right after a chown.
Accept a source struct stat rather than a uid and gid, and
accept a boolean NEW_DST and destination struct stat.
All callers changed.
* src/copy.h (cp_options_default): New function, replacing the
old chown_privileges.
* src/copy.c (cp_options_default): Likewise.
* src/cp.c (cp_option_init): Use it.
* src/install.c (cp_option_init): Likewise.
* src/mv.c (cp_option_init): Likewise.
2007-11-30 Jim Meyering <meyering@redhat.com>
Move the very-expensive file into test-lib.sh.
* tests/very-expensive: Remove file.
* tests/test-lib.sh (very_expensive_): New function.
* tests/Makefile.am (EXTRA_DIST): Remove very-expensive.
* tests/cp/perm: Call the new function, rather than sourcing the file.
* tests/tail-2/assert: Likewise.
* tests/tail-2/assert-2: Likewise.
* tests/du/2g: Likewise.
Avoid a spurious test failure when build directory is set-GID.
* tests/cp/fail-perm: Ensure that '.'s set-GID bit is off.
Be extra careful to quote $abs_top_builddir-derived names.
* tests/misc/ls-misc (shell_quote): New function.
Use it to quote file names derived from $abs_top_builddir,
in case it contains shell meta-characters. This is not currently
needed, since CuTmpdir detects the fishy name and skips the test.
But it's important enough to add the extra protection.
Reported by Ralf Wildenhues.
Include test name in the "unsafe working directory name" diagnostic.
* tests/CuTmpdir.pm (import): If $ME is '-', use $prefix.
2007-11-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Add quotes to protect against white space in build dir name.
* tests/check.mk (TESTS_ENVIRONMENT): Quote $(abs_srcdir).
* tests/chmod/setgid: Quote absolute names.
* tests/misc/help-version: Likewise.
* tests/misc/pwd-unreadable-parent: Likewise.
* tests/rmdir/ignore: Likewise.
* tests/test-lib.sh: Likewise.
Define `tst', for CU_TEST_NAME.
* build-aux/check.mk (am__check_pre): Set `tst', for
CU_TEST_NAME in tests/check.mk.
* tests/CuTmpdir.pm (END): Do not do the cleanup if $dir is not
defined, because it then goes wild and changes the mode of all
directories below $HOME. Undefined $dir can happen if the test
is to be skipped because of an unsafe working directory name.
2007-11-28 Paul Eggert <eggert@cs.ucla.edu>
Close a file descriptor leak when cp --preserve=context fails.
* src/copy.c (copy_reg): Close dest_desc too, if getfscreatecon
or fsetfilecon fail.
2007-11-28 Jim Meyering <meyering@redhat.com>
* README: Document the known problem with gettext <= 0.17.
2007-11-28 Paul Eggert <eggert@cs.ucla.edu>
* gl/modules/randread (Depends-on): Remove nonexistent rand-isaac.
2007-11-27 Jim Meyering <meyering@redhat.com>
Don't block use of 'cat' or 'wc' in "make check".
* Makefile.maint (my-distcheck): Add "cat" and "wc" to the list
of programs that we can't blacklist.
Fix md5sum+sha*sum on sparc: regenerate files with latest autoconf.
* configure et al: Regenerate with very latest version of autoconf
(v2.61a-312-gb524b0f), to fix md5sum and sha*sum miscompilation
on big-endian systems (like sparc) due to lack of the required
definition in of WORDS_BIGENDIAN in lib/config.h.
2007-11-26 Jim Meyering <meyering@redhat.com>
setuidgid.c: more cleanup
* src/setuidgid.c: Include "mgetgroups.h".
(main): Don't presume there's a fixed limit on the maximum number
of group IDs. Don't use NGROUPS; it's artificially low.
Change the name of a local: s/gids_count/n_gids/.
Remove non-portable "const": s/const int tmp =.../int tmp =.../
2007-11-25 Jim Meyering <meyering@redhat.com>
Document install's -D option.
* doc/coreutils.texi (install invocation): Document -D.
Reported by Akim Demialle.
setuidgid: Update --help output.
* src/setuidgid.c (usage): Describe -g GID[,GID1...] option.
Mention that USER may be a numeric ID or a user name.
2007-11-24 Jim Meyering <meyering@redhat.com>
Tweak new test.
* tests/cp/preserve-gid: Split some long lines.
Prepend "+" to numeric uid and gid chown arguments, on principle.
Use skip_test_.
setuidgid: minor clean-up.
* setuidgid.c: Include "xstrtoul.h".
(main): Detect overflow in string-to-gid_t and -to-uid_t conversions.
Improve diagnostics.
* src/setuidgid.c: Normalize leading white space: no more TABs.
Test the new feature: cp -p preserves the GID whenever possible.
* tests/cp/preserve-gid: New file. Test for today's change.
* tests/cp/Makefile.am (TESTS): Add preserve-gid.
* tests/Makefile.am (all_t): Add tc.
(tc): New target.
setuidgid: accept numeric UID, and new option -g GID,GID1,GID2,...
* src/setuidgid.c: Add functionality for the new test above.
"cp -p" tries to preserve GID even if preserving the UID fails.
* NEWS: Mention this new feature.
* src/copy.c (set_owner): Try to preserve just the GID,
when initial fchown/lchown fails.
* src/cp.c (re_protect): Likewise.
2007-11-23 Jim Meyering <meyering@redhat.com>
* src/runcon.c (main): Remove unused parameter, "envp".
Add tests to show new class of strings accepted by date -d.
* tests/misc/date (rel-1day, rel-plus1): New tests for the recent
change in gnulib's getdate.y.
* NEWS: Mention the fix.
2007-11-22 Jim Meyering <meyering@redhat.com>
Quiet warnings about unused parameters.
* src/copy.c (set_author) [!HAVE_STRUCT_STAT_ST_AUTHOR]:
"Use" each of the parameters.
* GNUmakefile: Correct the "rerunning..." diagnostic.
Make it easier to diagnose PATH-induced "make distcheck" failures.
* Makefile.maint (write_loser): Define.
(my-distcheck): Use an always-failing wrapper script, that gives
a diagnostic, not "false".
Run only "make -C tests check" with the restrictive PATH.
Run the new gnulib-tests/ with the usual PATH.
cp: by default, refuse to copy through a dangling destination symlink
* NEWS: Mention this change.
* doc/coreutils.texi (cp invocation): Describe the new behavior.
* src/copy.c: No longer include "canonicalize.h".
(copy_reg): Upon failure to open a dangling destination symlink,
don't canonicalize the name, but rather fail (default) or, with
POSIXLY_CORRECT, repeat the open call without O_EXCL (potentially
dangerous).
* src/copy.h (struct cp_options) [open_dangling_dest_symlink]:
New member. Reorder the others, grouping "bool" and "enum"
members together.
* tests/cp/thru-dangling: Test for changed and new behavior.
* src/cp.c (cp_option_init): Initialize new member.
* src/install.c (cp_option_init): Likewise.
* src/mv.c (cp_option_init): Likewise.
2007-11-21 Pádraig Brady <P@draigBrady.com>
* doc/coreutils.texi (split invocation): Improve the
descriptions of the split command options.
2007-11-21 Jim Meyering <meyering@redhat.com>
* src/c99-to-c89.diff: Adjust seq.c offsets.
2007-11-18 Paul Eggert <eggert@cs.ucla.edu>
* src/seq.c (print_numbers): Rewrite in an attempt to avoid the
more-general rounding issues exposed by the previous patch.
2007-11-18 Jim Meyering <meyering@redhat.com>
* src/c99-to-c89.diff: Adjust seq.c offsets.
Remove unused parameter in remove.c.
* src/remove.c (fd_to_subdirp): Remove unused parameter.
(remove_cwd_entries, remove_dir): Update callers.
bootstrap: work also with 4-argument variant of AC_INIT (from gnulib)
2007-11-18 Sergey Poznyakoff <gray@gnu.org.ua>
* bootstrap (gnulib_extra_files): Adjust sed command.
2007-11-17 Jim Meyering <meyering@redhat.com>
Correct preceding patch.
* src/seq.c (print_numbers): Also handle first < last && step < 0.
* tests/misc/seq [empty-rev]: New test for this case.
"seq .1 .1" would mistakenly generate no output on some systems
* NEWS: Say this.
* src/seq.c (print_numbers): Handle another floating point corner case.
This avoids failure of seq's eq-wid-7 test on FreeBSD 6.1.
2007-11-16 Paul Eggert <eggert@cs.ucla.edu>
Port tests/rmdir/ignore away from GNU/Linux.
* tests/rmdir/ignore: Don't assume that rmdir($PWD) will fail
with errno==ENOTEMPTY when $PWD is not empty; Posix also allows
rmdir to fail with errno==EBUSY.
2007-11-16 Jim Meyering <meyering@redhat.com>
Avoid an obscure new "make distcheck" failure.
* Makefile.maint (my-distcheck): Also allow 'mv', for its use
in gnulib-tests/Makefile.
2007-11-16 Paul Eggert <eggert@cs.ucla.edu>
Port readlink-fp-loop to Solaris.
* tests/misc/readlink-fp-loop (symlink_loop_msg): New var,
which records the symlink-loop message, whose wording is
not standardized by Posix. Do not rely on "echo x > p/1"
to work when p/1 has a lot of indirect symlinks. (I'm surprised
that it works on Linux. Perhaps a Linux bug?)
2007-11-15 Paul Eggert <eggert@cs.ucla.edu>
Port to Solaris 'make' and use a Posixish shell on Solaris.
* bootstrap.conf (gnulib_modules): Add gnu-make, posix-shell.
* build-aux/check.mk (SHELL): Set to $(PREFERABLY_POSIX_SHELL),
so that commands can assume Posix syntax.
(ENABLE_HARD_ERRORS, TEST_LOGS): Don't use GNU Make's "?=" syntax.
(SH_E_WORKAROUND): New macro.
(am__check_pre, $(TEST_SUITE_LOG)): Use it.
(am__check_pre): Fail if "mkdir" fails. Use $(SHELL)
rather than relying on the "#!/bin/sh" in the file, so that tests
can use Posix syntax.
(am__check_pre, am__tty_colors): Use $$src rather than $$<, to
support the Posix-make $(TEST_LOGS) rule.
(%.log: %.test, %.log: %$(EXEEXT)): Remove unused inference rules
that rely on a GNU Make extension and cause Solaris 'make' to fail.
(SUFFIXES): New macro, so that we can use Posix style inference rules.
(%.log: %): Use this rule only if GNU_MAKE.
Set $$src so that macros can use $$src rather than $$<.
(CHECK-FORCE, DEPENDENCY, $(TEST_LOGS)): New macros and rules,
which rely only on Posix 'make' semantics, and are used only with
non-GNU 'make' implementations. $(TEST_LOGS) invokes 'make'
recursively (and a bit inefficiently) to simulate the GNU 'make'
rules.
(.log.html): Renamed from "%.html: %.log", so that it relies only
on Posix 'make' semantics.
(check-clean, .PHONY): Do not depend on check-clean-local, since
Solaris 'make' complains about nonexistent rules like that.
* src/Makefile.am (SUFFIXES): Remove; no longer needed.
(groups): Use a specific rule rather than an inference rule that
is only instantiated once. The inference-rule approach does not
work with Solaris 'make', which gets confused by the "groups:
Makefile" line. It's not clear from the Posix spec that Solaris
'make' is buggy here, so instead of worrying about it, rewrite
the makefile so that it clearly conforms to Posix.
* tests/check.mk (TESTS_ENVIRONMENT): Export PACKAGE_BUGREPORT.
GNU 'make' does this automatically for us, but Solaris 'make'
doesn't.
2007-11-15 Paul Eggert <eggert@cs.ucla.edu>
Port to Solaris 8 perl, which does not support "use warnings;".
* tests/dd/skip-seek: Skip test if "use warnings;" fails.
* tests/du/files0-from: Likewise.
* tests/misc/base64: Likewise.
* tests/misc/basename: Likewise.
* tests/misc/cut: Likewise.
* tests/misc/date: Likewise.
* tests/misc/dircolors: Likewise.
* tests/misc/dirname: Likewise.
* tests/misc/expand: Likewise.
* tests/misc/expr: Likewise.
* tests/misc/factor: Likewise.
* tests/misc/fmt: Likewise.
* tests/misc/fold: Likewise.
* tests/misc/head-elide-tail: Likewise.
* tests/misc/ls-misc: Likewise.
* tests/misc/md5sum: Likewise.
* tests/misc/md5sum-newline: Likewise.
* tests/misc/mktemp: Likewise.
* tests/misc/od: Likewise.
* tests/misc/paste-no-nl: Likewise.
* tests/misc/pr: Likewise.
* tests/misc/seq: Likewise.
* tests/misc/sha1sum: Likewise.
* tests/misc/sha1sum-vec: Likewise.
* tests/misc/sha224sum: Likewise.
* tests/misc/sha256sum: Likewise.
* tests/misc/sha384sum: Likewise.
* tests/misc/sha512sum: Likewise.
* tests/misc/sort-merge: Likewise.
* tests/misc/stat-printf: Likewise.
* tests/misc/sum: Likewise.
* tests/misc/test-diag: Likewise.
* tests/misc/tsort: Likewise.
* tests/misc/unexpand: Likewise.
* tests/misc/wc-files0-from: Likewise.
* tests/misc/xstrtol: Likewise.
* tests/mv/i-1: Likewise.
* tests/rm/empty-name: Likewise.
* tests/rm/unreadable: Likewise.
2007-11-15 Andreas Schwab <schwab@suse.de>
* m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix syntax error.
Remove trailing space from result.
2007-11-15 Jim Meyering <meyering@redhat.com>
Avoid misbehavior of a cross-device "mv" or "install".
Those programs must not dereference a destination symlink.
* src/copy.c (copy_reg): Don't treat a dangling destination symlink
differently in move mode. In move mode, the only way the added
O_EXCL can cause failure is when some other process has recreated
the file this code unlinked a few instructions before.
2007-11-14 Jim Meyering <meyering@redhat.com>
Another bootstrap kludge.
* bootstrap: Ensure gnulib-tests/test-*.sh are executable
#ifdef-out matchpathcon-related code, for now.
* src/install.c (setdefaultfilecon): #ifdef-out all of the
matchpathcon-related code, until it's more efficient.
(setdefaultfilecon): Instead of the above, stub-out the entire function.
Use gnulib's stpncpy module, now required by install.c
* bootstrap.conf (gnulib_modules): Add stpncpy.
Enable gnulib-tool's --with-tests option.
* bootstrap: After all is done, transform the generated
gnulib-tests/gnulib.mk.
* bootstrap.conf (gnulib_tool_option_extras): Set it here.
* gnulib-tests/Makefile.am: New file.
* Makefile.am (SUBDIRS): Add gnulib-tests.
* configure.ac (AC_CONFIG_FILES): Add gnulib-tests/Makefile.
* m4/jm-macros.m4 (coreutils_MACROS) [ARGMATCH_DIE_DECL]: Omit the
"extern " prefix to "void usage ()", so that the macro string value can
be used to construct a function definition in gnulib's test-argmatch.c.
2007-11-12 Benno Schulenberg <bensberg@justemail.net>
Clarify description of cp's -a option.
* src/cp.c (usage) [-a]: Remove unnecessary 'P'.
Since option -d of 'cp' includes the function of -P, mentioning the
latter in the description of option -a is redundant and therefore
slightly confusing, as the reader tries to figure out what it adds.
* doc/coreutils.texi (cp invocation): Likewise: s/-dpPR/-dpR/.
2007-11-09 Jim Meyering <meyering@redhat.com>
bootstrap: fix typo to enable use of $gnulib_tool_option_extras.
* bootstrap (gnulib_tool_options): Add a space before the use
of $gnulib_tool_option_extras, so that it's separated from the
preceding argument.
install+SELinux: reduce a 12x performance hit to ~1.5x
* src/install.c (setdefaultfilecon): Call matchpathcon_init_prefix,
to mitigate what would otherwise be a large performance hit due to
the use of matchpathcon.
Dan Walsh suggested the use of matchpathcon_init_prefix.
* gl/lib/se-selinux.in.h (matchpathcon_init_prefix): Define.
2007-11-08 Jim Meyering <meyering@redhat.com>
Adapt to gnulib's s/jm_/gl_/ cache variable renaming.
* configure.ac: Change the cache variable name prefix "jm_" to "gl_",
to match today's change in gnulib.
2007-11-05 Jim Meyering <meyering@redhat.com>
Fix bootstrap failure to handle files like lib/uniwidth/cjk.h.
* bootstrap (cp_mark_as_generated): Create any required parent
destination directories before copying a file into place.
* src/c99-to-c89.diff: Adjust offsets.
Don't use GNU-sed-specific \< \> operators here, either.
* m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Use a loop, as below.
Use tighter regexps when performing name substitution.
* man/Makefile.am (mapped_name): Add ^ and $$ anchors.
Don't use GNU-sed-specific \< \> operators.
* configure.ac (MAN): Transform ginstall.1 to install.1 using
a loop, rather than sed with \<...\>.
Problem reported by Bruno Haible.
Andreas Schwab reminded me that \< and \> are not portable.
Get git-version-gen from gnulib.
* build-aux/git-version-gen: Remove file.
* build-aux/.gitignore: Add git-version-gen.
* bootstrap.conf (gnulib_modules): Add git-version-gen.
2007-11-03 Jim Meyering <meyering@redhat.com>
git-version-gen: Sync from autoconf's version.
* build-aux/git-version-gen: Run git-status
Sync copyright and scriptversion bits from gnulib.
* build-aux/git-version-gen: No semantic change.
Change the first '-' to '.' in the snapshot version string,
e.g., 6.9-377-08144 -> 6.9.377-08144
* build-aux/git-version-gen: ... and add comments.
seq: add another test for the %% bug.
* tests/misc/seq (fmt-c): Test the other fixed case, too.
2007-11-03 Paul Eggert <eggert@cs.ucla.edu>
Fix bug with "seq 10.8 0.1 10.95", plus another bug with %% in format.
* NEWS: Mention the %%-in-format bug fix.
* src/seq.c (struct layout): New type.
(long_double_format): New arg LAYOUT. Fill it in. Fix mishandling
of %% in formats.
(print_numbers): New arg LAYOUT. Don't convert LAST to output format
when deciding whether to go slightly past LAST. Instead, convert
X to output format and back. This fixes a bug reported by
Andreas Schwab in
<http://lists.gnu.org/archive/html/bug-coreutils/2007-10/msg00237.html>
where "seq 10.8 0.1 10.95" would output 11.0 on platforms where
10.95 rounds to a value that prints as 11.0 when only one digit
past the decimal point is asked for.
(main): Compute layout, for benefit of print_numbers.
* tests/misc/seq (float-3): Undo previous change, since the bug
should be fixed now.
(fmt-b): New test, for the %% bug.
2007-11-01 Jim Meyering <meyering@redhat.com>
* tests/misc/printf-surprise: Correct sed transform.
Reported by Bob Proulx.
Add example inspired by "make dist" running gzip and lzma in sequence.
* doc/coreutils.texi (tee invocation): Show how to run tar just
once, compressing the tee'd output streams in parallel.
Say that the first process substitution example is contrived.
* doc/coreutils.texi (tee invocation): ... and show how to do
it properly. Pointed out by James Antill.
Use mktemp, not mkdtemp, to create test directories.
* tests/test-lib.sh: Use the mktemp binary we've just built,
not the mkdtemp script.
* tests/mkdtemp: Remove file.
* tests/Makefile.am (EXTRA_DIST): Remove mkdtemp.
Adjust a seq subtest not to depend on the vagaries of floating point.
* tests/misc/seq (float-3): Use 10.94 as the endpoint, not 10.95,
since 10.95 was precisely in the middle of the interval, and with
a %.1f format could map to either 10.9 or 11.0.
Reported by Mike Frysinger
Make the new printf-surprise test more precise.
* tests/test-lib.sh (require_ulimit_): New function.
* tests/misc/printf-surprise: Use ulimit -v to trigger the fixed bug,
and rather than checking printf's exit status (which would go wrong
on FreeBSD 6.1, since their printf(3) function doesn't require
lots of memory in this case) simply test whether it outputs
the first 10 bytes.
Accommodate FreeBSD 6.1 hard-link-to-symlink differences.
* tests/cp/same-file: Detect when linking to a symlink links to
the target of the symlink (FreeBSD 6.1 does this, Linux does not),
and skip the few tests that would otherwise fail.
Redirect output of final comparison to stderr, since all stdout
is already redirected.
2007-10-31 Jim Meyering <meyering@redhat.com>
Fix a "make distcheck" failure.
* Makefile.maint (my-distcheck): Don't stub-out dirname,
since build-aux/check.mk now uses it.
* bootstrap.conf (gnulib_modules): Add xprintf-posix.
2007-10-30 Jim Meyering <meyering@redhat.com>
Avoid seq floating-point test failure on FreeBSD 6.1.
* tests/misc/seq (float-4): Also accept -0.0.
2007-10-29 Jim Meyering <meyering@redhat.com>
Change a "make dist" diagnostic.
* GNUmakefile: Don't imply that $(_curr-ver) is the new version string.
2007-10-29 Bob Proulx <bob@proulx.com>
Improve color terminal escape usage.
* build-aux/check.mk (am__tty_colors): Use 'tput' to deduce
terminal color capabilities.
2007-10-29 Jim Meyering <meyering@redhat.com>
Don't try to colorize a dumb terminal.
* build-aux/check.mk (am__tty_colors): Skip colors if $TERM is "dumb".
Thanks to Bob Proulx.
Remove gnulib's printf-posix module, for now.
* bootstrap.conf (gnulib_modules): It caused too many test failures.
Remove spurious semicolon after "else".
* build-aux/check.mk (am__tty_colors): Fix syntax error.
If $TERM is empty, don't use colors. This helps the buildbot,
since it produces its result in an environment with a tty, but
we don't want color codes in that case.
* build-aux/check.mk (am__tty_colors): Test for nonempty $TERM.
Suggestion from Bob Proulx.
Always initialize terminal colorization string variables.
* build-aux/check.mk (am__tty_colors): Always initialize red, grn, etc.,
In case they're defined in the environment.
Avoid test failure in non-srcdir build vs. the git tree.
* tests/check.mk (vc_exe_in_TESTS): Run this test only in a
srcdir build directory. Reported by Andreas Schwab.
2007-10-28 Jim Meyering <meyering@redhat.com>
Define ENOTSUP, not ENOSYS. Needed on OpenBSD 3.9.
* gl/lib/se-context.in.h (ENOTSUP): Define if missing.
* gl/lib/se-selinux.in.h: Likewise.
Define ENODATA, for FreeBSD 5.0 and 6.1.
* src/system.h (ENODATA): Define, if missing.
Run autoreconf, not just autoconf, to avoid warnings.
* GNUmakefile (dummy): Otherwise, we'd sometimes get a warning
about autoconf version mismatch between what was used to generate
aclocal.m4 and the currently-running autoconf.
Require gnulib's printf-posix module, to support Interix.
* bootstrap.conf (gnulib_modules): Add printf-posix.
Help xgettext recognize more printf-style format strings.
* bootstrap.conf (XGETTEXT_OPTIONS): Add directives for
error, error_at_line, xasprintf, xfprintf and xprintf.
2007-10-27 Jim Meyering <meyering@redhat.com>
Adjust format string so msgfmt doesn't object.
* src/df.c (main): Use "%s%s" (not %smsg) to print "msg" with or
without a "Warning: " prefix. Reported by Clytie Siddall.
Clean up tests/Makefile.am.
* tests/Makefile.am (EXTRA_DIST): Remove $(TESTS). No longer defined.
(TESTS_ENVIRONMENT): Remove definition.
2007-10-26 Jim Meyering <meyering@redhat.com>
* build-aux/check.mk: Merge with latest from Akim.
Add a test for the printf fix of 2007-10-21.
* tests/misc/printf-surprise: New file. Test for 2007-10-21's fix.
* tests/misc/Makefile.am (TESTS): Add printf-surprise.
2007-10-24 Micah Cowan <micah@cowan.name>
Remove vestiges of cvs-gnulib-checkout process. Now we use git.
* bootstrap: Remove support for now-unnecessary option, --cvs-user,
and envvars CVS_USER, CVS_RSH.
2007-10-24 Micah Cowan <micah@cowan.name>
Tell xgettext that "ARG1 % ARG2" is not a C format string.
* src/expr.c (usage): Add a comment to override xgettext's default
behavior, which would classify "ARG1 % ARG2" as a fprintf-style
format string. Reported by Clytie Siddall.
2007-10-24 Jim Meyering <meyering@redhat.com>
Avoid diagnostics from sha1sum when there is no cached checksum.
* bootstrap (update_po_files): Skip the sha1sum check if the po.s1
file hasn't been created yet.
Get gnulib from the git repository, not from an obsolete cvs one.
* bootstrap: Suggestion from Micah Cowan.
Doc improvements.
* README-hacking: Prefer the no-hyphen variant of git commands,
e.g., use "git pull" not "git-pull".
Don't presume that the only way to read this document is via a
prior git clone: provide instructions for cloning coreutils, too.
* README-hacking: Add "cd automake" in build instructions.
From Bob Proulx.
Don't fail part 2 of tests/rm/unreadable when run as root.
* tests/rm/unreadable: With UID == 0, expect different results.
Reported by Mike Frysinger.
2007-10-23 Jim Meyering <meyering@redhat.com>
* README-hacking: Refer to LZMA Utils <http://tukaani.org/lzma/>.
2007-10-22 Paul Eggert <eggert@cs.ucla.edu>
* README-hacking: Describe how to build with LZMA.
2007-10-22 Jim Meyering <meyering@redhat.com>
Remove git-version-gen's first parameter.
* build-aux/git-version-gen: Add comments.
Remove first command-line parameter.
* configure.ac: Remove corresponding first argument.
* GNUmakefile (_curr-ver): Likewise.
2007-10-21 Jim Meyering <meyering@redhat.com>
* NEWS: Mention the printf fix.
Reorder tests to run more basic ones earlier.
* tests/misc/Makefile.am (TESTS): Reorder.
* tests/Makefile.am (SUBDIRS): Reorder.
tr: do not reject an unmatched [:lower:] or [:upper:] in SET1.
* NEWS: Mention this.
* src/tr.c (get_next) [RE_CHAR_CLASS]: Don't skip the loop when
processing [:lower:] and [:upper:].
(main): Require [:lower:] or [:upper:] in SET1 only when
when one of those is specified in SET2.
* tests/tr/Test.pm: Add tests for this fix.
Reported by Per Starbäck.
2007-10-20 Jim Meyering <meyering@redhat.com>
* tests/misc/help-version: Add a comment.
Detect printf(3) failure due to ENOMEM.
* src/printf.c: Include "xprintf.h"
(print_direc): Use xprintf, rather than printf.
* bootstrap.conf (gnulib_modules): Add xprintf.
* po/POTFILES.in: Add lib/xprintf.c.
Reported by Bruno Haible.
Put always-failing programs first in PATH, so tests cannot mistakenly
run installed versions.
* Makefile.maint (my-distcheck): Set up a bogus bin/ dir, to be used
for "make check".
* doc/coreutils.texi (tee invocation): Fix typo. Add a little.
Add a cross-reference to bashref's Process Substitution node.
Adjust tests to pass, now that Test.pm ones use check.mk.
* tests/check.mk (vc_exe_in_TESTS): Adjust regexp not to match the
"TESTS = $x-tests" line in each Test.pm-derived Makefile.am file.
* tests/sort/main: Remove this unused file.
Ensure that Test.pm-derived tests use the right $PATH.
* tests/Makefile.am.in: Include $(top_srcdir)/tests/check.mk.
2007-10-20 Bob Proulx <bob@proulx.com>
Prevent "make check" from leaving mktemp /tmp/tmp.* files behind.
* tests/misc/help-version (mktemp_args): Tell mktemp to create
its temporary file in the current directory.
2007-10-16 Jim Meyering <meyering@redhat.com>
Show how to make tee redirect to multiple processes.
* doc/coreutils.texi (tee invocation): Tee can redirect output
to multiple _processes_, too.
2007-10-14 Jim Meyering <meyering@redhat.com>
Pull all TESTS_ENVIRONMENT settings "up" into tests/check.mk.
* tests/Makefile.am.in (TESTS_ENVIRONMENT): Remove definition.
* tests/chgrp/Makefile.am: Likewise.
* tests/chmod/Makefile.am: Likewise.
* tests/chown/Makefile.am: Likewise.
* tests/cp/Makefile.am: Likewise.
* tests/dd/Makefile.am: Likewise.
* tests/du/Makefile.am: Likewise.
* tests/install/Makefile.am: Likewise.
* tests/ln/Makefile.am: Likewise.
* tests/ls/Makefile.am: Likewise.
* tests/misc/Makefile.am: Likewise.
* tests/mkdir/Makefile.am: Likewise.
* tests/mv/Makefile.am: Likewise.
* tests/readlink/Makefile.am: Likewise.
* tests/rm/Makefile.am: Likewise.
* tests/rmdir/Makefile.am: Likewise.
* tests/tail-2/Makefile.am: Likewise.
* tests/touch/Makefile.am: Likewise.
* tests/check.mk (TESTS_ENVIRONMENT) [EXEEXT, EGREP, MAKE, PERL]:
[CONFIG_HEADER, build_programs, host_os, host_triplet, PATH]:
[REPLACE_GETCWD, CU_TEST_NAME]: Add definitions here.
* tests/misc/pwd-long: Use $abs_top_builddir/src, not $BUILD_SRC_DIR.
* tests/dd/skip-seek: Don't use $ENV{PROG}.
* tests/rm/empty-name: Likewise.
* tests/rm/unreadable: Likewise.
* tests/mv/i-1: Likewise.
Fix a minor typo.
* configure.ac (AC_INIT): Fix a typo (s/9.6/6.9/) that makes a
difference only when running "make dist" without a .git/ subdir.
2007-10-09 Jim Meyering <meyering@redhat.com>
Move the help-version test into misc/.
* tests/help-version: Move to...
* tests/misc/help-version: ...here.
Source test-lib.sh, as usual.
Use $abs_top_builddir, rather than ".." and "../..".
Make the runcon-no-reorder test slightly more general.
* tests/misc/runcon-no-reorder: Don't hard-code "unconstrained_t".
Use slightly more general "runcon $(id -Z)".
Suggestion from Stephen Smalley.
Skip the chcon test on a system with no SELinux support.
* tests/test-lib.sh (require_selinux_): New function.
* tests/misc/chcon: Use it.
* tests/misc/selinux: Use it here, too.
* tests/cp/cp-a-selinux: and here.
* tests/selinux: Remove file.
* tests/Makefile.am (EXTRA_DIST): Remove selinux.
Reported by Mike Frysinger and Bauke Jan Douma.
* src/dircolors.hin: Recognize .lzma as a compressed-file suffix.
* configure.ac (AM_INIT_AUTOMAKE): Use dist-lzma, rather than dist-bzip2.
Now that we don't install su, don't make misleading suggestions.
* src/Makefile.am (install-exec-local) [$(INSTALL_SU) != yes]:
Don't suggest running "make install-root".
(uninstall-local) [$(INSTALL_SU) != yes]: Don't even check
the installed binary.
2007-10-08 Jim Meyering <meyering@redhat.com>
When forming a truncated name, use the "[...]" prefix even for
an extremely long name in the current directory
* src/remove.c (full_filename_): Rename a local variable.
Use two separate "truncated" variables, in case the second
call to right_justify does not indicate any truncation -- which
would happen only if the single component FILENAME were longer
than 511 bytes and DIR_NAME were empty.
rm could malfunction under unusual circumstances:
When operating on a relative name longer than 511 bytes,
and (when either processing a directory that is neither writable
nor readable (but still searchable) or when determining whether
to prompt), and encountering an ENOMEM error while forming the
file name, rm would operate on a truncated-to-511-byte name
starting with "[...]" rather than the intended one.
* NEWS: Describe the bugs.
* src/remove.c: Correct two misuses of full_filename:
(full_filename0, xfull_filename): New functions.
(full_filename_): Rewrite to use full_filename0.
(AD_pop_and_chdir): Use xfull_filename, not full_filename.
(write_protected_non_symlink): Likewise.
2007-10-07 Jim Meyering <meyering@redhat.com>
Don't let a helper function modify errno.
* src/remove.c (full_filename_): Save and restore errno.
Spotted by Bruno Haible.
Reflect 2->3 GPL copyright version update in gnulib.
* gl/lib/tempname.h: Update copyright from gnulib.
* gl/lib/tempname.c: Likewise.
* .x-sc_GPL_version: Don't make an exception for those two files.
* configure.ac (AM_INIT_AUTOMAKE): Don't use dist-lzma just yet.
New program: mktemp.
* NEWS: Mention this.
* README: Add mktemp to the list.
* AUTHORS: Add this: mktemp: Jim Meyering
* src/mktemp.c: New file.
* src/Makefile.am (bin_PROGRAMS): Add mktemp.
(mktemp_LDADD): Add $(LIB_GETHRXTIME).
* man/mktemp.x: New file.
* man/Makefile.am (dist_man_MANS): Add mktemp.1.
(mktemp.1): New dependency.
* man/.cvsignore: Add mktemp.1.
* man/.gitignore: New file.
* src/.cvsignore, src/.gitignore: Add mktemp.
* tests/misc/mktemp: New file.
* tests/misc/Makefile.am (TESTS): Add mktemp.
* tests/Coreutils.pm (run_tests): Give the POST-test function
access to stdout and stderr contents, so it can verify that
the named-on-stdout file/dir does indeed exist and has proper
permissions, etc.
[po/ChangeLog]
* POTFILES.in: Add src/mktemp.c.
Make tempname more random, via the randint module.
* gl/modules/tempname (Depends-on): Add randint and stdbool.
* gl/lib/tempname.c: Include randint.h and stdbool.h.
(uint64_t): Remove definition. Not needed.
[_LIBC] (RANDOM_BITS): Remove this block, now that we have proper
random bits.
(check_x_suffix): New function.
(gen_tempname_len): Rename from __gen_tempname.
Add a parameter, x_suffix_len, telling how many X's there must be at
the end of the template.
Use pseudo-random numbers all the way, rather than adding 7777
from one iteration to the next.
(__gen_tempname): New function, to call gen_tempname_len, requiring a
suffix length of 6.
* gl/lib/tempname.h: Add prototype for gen_tempname_len.
Convert coreutils' rand*.{c,h,m4} into modules.
First step: move these files to gl/lib:
* lib/rand-isaac.c, lib/rand-isaac.h
* lib/randint.c, lib/randint.h
* lib/randperm.c, lib/randperm.h
* lib/randread.c, lib/randread.h
Step 2: add modules/rand* and remove now-unneeded .m4 files.
* gl/modules/randint: New file.
* gl/modules/randperm: New file.
* gl/modules/randread: New file.
* m4/randint.m4: Remove file.
* m4/randperm.m4: Remove file.
* m4/randread.m4: Remove file.
Step 3: use the new modules
* bootstrap.conf (gnulib_modules): Add randint and randperm.
* m4/prereq.m4 (gl_RANDINT, gl_RANDREAD, gl_RANDPERM): Don't require;
These have been removed.
(gl_ROOT_DEV_INO): Don't require; already handled via bootstrap.conf.
Copy from gnulib the parts of tempname that we'll modify.
* gl/lib/tempname.c: Copy from gnulib.
* gl/lib/tempname.h: Likewise.
* gl/modules/tempname: Likewise.
Allow GPLv2 on temporarily(?)-imported file from gnulib/libc.
* .x-sc_GPL_version: New file.
* Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version
2007-10-07 Jim Meyering <meyering@redhat.com>
Avoid a pseudo-leak in sort.
* src/sort.c (main) [lint]: Avoid a nominal leak.
Use puts, rather than printf ("%s\n". Slightly cleaner.
* src/tsort.c (tsort): ...and more efficient.
Avoid seq malfunction on non-POSIX systems: mingw, BeOS, Interix.
* bootstrap.conf (gnulib_modules): Add vasprintf-posix.
Suggestion from Bruno Haible.
Avoid a used-uninitialized error.
* src/copy.c (copy_internal): Don't overload "use_stat".
2007-10-05 Jim Meyering <meyering@redhat.com>
Make a failing cross-partition mv give a sensible diagnostic.
A cross-partition move of a file in a sticky tmpdir and owned by
another user would evoke an invalid diagnostic after copying it:
mv: cannot remove `x': Operation not permitted
Either of the following (mv.c, remove.c) changes would fix the bug by
itself. I think it's slightly better to use both; the added cost is
minimal: mv: an extra lstat-per-mv-cmdline-arg-that-goes-cross-partition,
rm: an extra lstat-per-unlink-that-fails-w/EPERM.
* src/remove.c (remove_entry): Also lstat the file upon EPERM.
* src/mv.c (rm_option_init): Initialize root_dev_ino just as is done
in rm, so that a cross-partition invoked remove.c:rm call works the
same way as one invoked from the command-line use of "rm". That
setting of root_dev_ino makes rm() do the equivalent of an additional
lstat for each argument, which in turn gives rm enough information to
issue the right diagnostic.
* tests/mv/sticky-to-xpart (version): New file. Test for the above.
* tests/mv/Makefile.am (TESTS): Add sticky-to-xpart.
Arrange for "make check-root" to run the new root-only test.
* tests/Makefile.am (tb): New target, to run the new root-only test.
(all_t): Add tb.
* src/c99-to-c89.diff: Adjust offsets.
Add PACKAGE_VERSION to TESTS_ENVIRONMENT via check.mk.
* tests/check.mk (TESTS_ENVIRONMENT): Add PACKAGE_VERSION here,
rather than in every Makefile.am that needs it.
* tests/rm/Makefile.am (TESTS_ENVIRONMENT): Remove PACKAGE_VERSION.
* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
2007-10-04 Jim Meyering <jim@meyering.net>
Adapt to new gnulib naming scheme.
* gl/lib/se-context.in.h: Rename from gl/lib/se-context_.h.
* gl/lib/se-selinux.in.h: Rename from gl/lib/se-selinux_.h.
* gl/m4/selinux-context-h.m4: Remove use of AC_LIBSOURCES.
* gl/m4/selinux-selinux-h.m4: Likewise.
* gl/modules/selinux-h (Files, Makefile.am): Reflect renaming.
(Makefile.am) [lib_SOURCES]: Add se-context.in.h and se-selinux.in.h.
* lib/search_.h: Remove unused file.
* bootstrap (slurp): Adapt to _.h -> .in.h name change.
(update_po_files): Work also when there are no .po files in po/.
Remove test program: lib/t-fpending.c.
* lib/t-fpending.c: Remove file. Now, this test is in gnulib.
* lib/Makefile.am: Remove associated rules.
* .gitignore: Remove lib/t-fpending.
2007-10-03 Jim Meyering <jim@meyering.net>
* tests/misc/selinux: Skip this test if the initial chcon fails.
2007-10-02 Jim Meyering <jim@meyering.net>
Never copy through a symlink that cp has just created.
* src/copy.c (copy_internal): When same-file detection requires
'stat'ing the destination file, also 'lstat' it and ensure that
it wasn't the destination of a preceding copy operation.
This bug was introduced on 2007-06-18.
* tests/cp/abuse: New test for the above.
* tests/cp/Makefile.am (TESTS): Add abuse.
2007-09-30 Jim Meyering <jim@meyering.net>
cp: do not abbreviate in --help output.
* src/cp.c (usage): Don't abbreviate: s/=link/=links/.
Reported by Géraud Meyer in <http://bugs.debian.org/444137>.
2007-09-29 Eric Blake <ebb9@byu.net>
Test previous patch.
* tests/misc/groups-dash: New test.
* tests/misc/Makefile.am (TESTS): Add it.
2007-09-28 Eric Blake <ebb9@byu.net>
* src/groups.sh: Don't ignore first argument if later argument is --.
2007-09-27 Jim Meyering <jim@meyering.net>
Avoid spurious test failure when SELinux stats "selinux/class".
* tests/ls/stat-free-symlinks: Grep for more precise /^stat("x"/.
Move file-set and hash-triple modules to gnulib.
* bootstrap.conf (gnulib_modules): Remove file-set, now that
it's in gnulib, and the canonicalize module requires it there.
* gl/lib/file-set.c, gl/lib/file-set.h, gl/modules/hash-triple: Remove.
* gl/lib/hash-triple.c, gl/lib/hash-triple.h, gl/modules/file-set:
Remove.
Add a test to exercise a readlink bug.
* tests/misc/readlink-fp-loop: New file. Test for the readlink bug
fixed through today's change to Gnulib's canonicalize module.
* tests/misc/Makefile.am (TESTS): Add readlink-fp-loop.
Bug report and a test case from mpb.mail@gmail.com.
2007-09-25 Pádraig Brady <P@draigBrady.com>
* doc/coreutils.texi (date invocation):
Make "Date input formats" easier to navigate to.
2007-09-25 Jim Meyering <jim@meyering.net>
Use XOR, not OR to combine bits.
* gl/lib/hash-triple.c (triple_hash): Use XOR (^), not OR (|), to
combine the bits from hashing the name and those of the inode number.
Add a few comments and remove out-of-context ones.
2007-09-24 Jim Meyering <jim@meyering.net>
* NEWS: The recent rm-diagnostic fix also affects cross-partition "mv".
copy.c: Remove definitions of factored-out functions.
* src/copy.c: Include "file-set.h".
(seen_file, record_file): Remove functions that I factored
out on 2007-08-23.
2007-09-22 Jim Meyering <jim@meyering.net>
Don't print the commands of a 10-line script that's run in each subdir.
* tests/check.mk (vc_exe_in_TESTS): Add a leading "@", to reduce noise.
rm: give a sensible diagnostic when failing to remove a symlink
On some systems (those with openat et al), when rm would fail to
remove a symlink, it would fail with the misleading diagnostic,
"Too many levels of symbolic links".
* NEWS: Mention the bug fix.
* src/remove.c (is_nondir_lstat): New function.
(remove_entry): Use it to catch failed-to-remove symlink (and any
other non-dir) here so that we don't fall through and try to treat
it as directory, which -- with a symlink -- would provoke the bogus
ELOOP failure.
* tests/rm/fail-eacces: Add a test for the above.
* src/c99-to-c89.diff: Adjust offsets.
rm: fix a tiny, nearly inconsequential bug.
Don't perform a "."-relative lstat, when the file in question
may well not be in ".". Although this is a bug, a few attempts
to exercise it on a linux-2.6.22 system failed. You probably need
a pre-openat system to trigger the failure. The consequence of this
bug would be a lower-quality diagnostic upon failed dir removal.
* src/remove.c (is_dir_lstat): Add a parameter, fd_cwd.
Use it instead of hard-coding AT_FDCWD.
(remove_entry): Call is_dir_lstat with fd_cwd.
2007-09-22 Karl Berry <karl@freefriends.org>
* TODO: It'd be nice to add renice.
2007-09-21 Jim Meyering <jim@meyering.net>
Avoid test failure due to now-parallelized tests.
* tests/du/two-args: Run "du .." from a sub-directory one level deeper.
2007-09-16 Jim Meyering <jim@meyering.net>
* tests/misc/tac-continue: Arrange to remove a temporary file.
* tests/check.mk (vc_exe_in_TESTS): Don't rely on the value of
$(TESTS), so that "make check TESTS=test-name" works once again.
* tests/CuTmpdir.pm: Use File::Find + chmod syscall, not chmod -R.
Revamp most test scripts.
* tests/rm/v-slash: Avoid test failure with non-C locale.
Reported by Michael Stone.
Enable some previously omitted test scripts. Add a test cross-check.
* tests/rm/Makefile.am (TESTS): Add empty-name and unreadable.
* tests/rm/empty-name: Likewise.
* tests/rm/unreadable: Reenable this test. Adjust for new rm.
* tests/mkdir/Makefile.am: Add writable-under-readonly.
* tests/mkdir/writable-under-readonly: Add some comments.
This test is always skipped, for now.
* tests/Makefile.am (ta): Hook up the new root-only script.
* tests/tail-2/infloop-1: Make this test pass.
* tests/tail-2/Makefile.am (TESTS): Add infloop-1.
* tests/tail-2/fflush: Remove unused file.
* tests/check.mk (vc_executable_is_in_TESTS): More portable.
* tests/check.mk (check): Depend on the above.
* build-aux/check.mk: Remove comment mentioning AUTHORS file.
Factor out definitions in TESTS_ENVIRONMENT of srcdir, top_srcdir, etc.
tests/check.mk (top_srcdir): Define.
tests/*/Makefile.am: Remove definitions of $(srcdir), $(top_srcdir),
$(abs_top_srcdir), and $(abs_top_builddir), since they're
defined via the included tests/check.mk.
tests/general: Remove from VC, this long-unused directory and contents.
Adapt tests/tail-2/ to use test-lib.sh.
Adapt tests/readlink/ to use test-lib.sh.
Move the sole test in tests/ls-2/ to tests/misc/.
* tests/ls-2/basic-1: Move this file to ...
* tests/misc/ls-misc: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add ls-misc.
* tests/Makefile.am (SUBDIRS): Remove ls-2.
* tests/ls-2: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/ls-2/Makefile.
More misc, test-related changes. (some to allow running tests as root)
Move all tests from test/{od,sha1sum,shred,stty} to tests/misc/.
Reflect these renamings:
od/od-N misc/od-N
od/x8 misc/od-x8
sha1sum/basic-1 misc/sha1sum
sha1sum/sample-vec misc/sha1sum-vec
shred/exact misc/shred-exact
shred/remove misc/shred-remove
stty/basic-1 misc/stty
stty/invalid misc/stty-invalid
stty/row-col-1 misc/stty-row-col
* tests/misc/Makefile.am (TESTS): Add the new files.
* tests/Makefile.am (SUBDIRS): Remove the dir names.
* tests/od, tests/sha1sum, tests/shred, tests/stty: Remove the
directories.
* configure.ac (AC_CONFIG_FILES): Remove the corresponding Makefile
names.
Move the two tests in tests/tee to tests/misc/.
* tests/tee/basic: Move this file to ...
* tests/misc/tee: ...here. Don't rely on $PROG in env.
* tests/tee/dash: Move this file to ...
* tests/misc/tee-dash: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add tee.
* tests/Makefile.am (SUBDIRS): Remove tee.
* tests/tee: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/tee/Makefile
Move the two tests in tests/sum/ to tests/misc/.
* tests/sum/basic-1: Move this file to ...
* tests/misc/sum: ...here. Don't rely on $PROG in env.
* tests/sum/sysv: Move this file to ...
* tests/misc/sum-sysv: ...here. Adapt it to use test-lib.sh.
* tests/misc/Makefile.am (TESTS): Add sum and sum-sysv.
* tests/Makefile.am (SUBDIRS): Remove sum.
* tests/sum: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/sum/Makefile.
Move the sole test in tests/tsort/ to tests/misc/tsort.
* tests/tsort/basic-1: Move this file to ...
* tests/misc/tsort: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add tsort.
* tests/Makefile.am (SUBDIRS): Remove tsort.
* tests/tsort: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/tsort/Makefile.
Move the sole test in tests/unexpand to tests/misc/unexpand.
* tests/unexpand/basic-1: Move this file to ...
* tests/misc/unexpand: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add unexpand.
* tests/Makefile.am (SUBDIRS): Remove unexpand.
* tests/unexpand: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/unexpand/Makefile.
Move the sole test in tests/seq to tests/misc/seq.
* tests/seq/basic: Move this file to ...
* tests/misc/seq: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add seq.
* tests/Makefile.am (SUBDIRS): Remove seq.
* tests/seq: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/seq/Makefile
Convert tests/mkdir/ to use test-lib.sh.
Move the two tests in tests/md5sum to tests/misc/md5sum.
* tests/md5sum/basic-1: Move this file to ...
* tests/misc/md5sum: ...here. Don't rely on $PROG in env.
* tests/md5sum/newline-1: Move this file to ...
* tests/misc/md5sum-newline: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add md5sum.
* tests/Makefile.am (SUBDIRS): Remove md5sum.
* tests/md5sum: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/md5sum/Makefile
tests/sample-test: Update to use test-lib.sh.
Convert tests/misc/ to use test-lib.sh, too.
Convert tests/ls/, too.
Convert tests/ln/, too.
Convert tests/install/, too.
Move the two tests in tests/fmt to tests/misc/fmt.
* tests/fmt/basic: Move this file to ...
* tests/misc/fmt: ...here. Don't rely on $PROG in env.
* tests/fmt/long-line: Move this file to ...
* tests/misc/fmt-long-line: ...here.
* tests/misc/Makefile.am (TESTS): Add fmt.
* tests/Makefile.am (SUBDIRS): Remove fmt.
* tests/fmt: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/fmt/Makefile
Move the sole test in tests/factor to tests/misc/factor.
* tests/factor/basic: Move this file to ...
* tests/misc/factor: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add factor.
* tests/Makefile.am (SUBDIRS): Remove factor.
* tests/factor: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/factor/Makefile
Move the sole test in tests/expr to tests/misc/expr.
* tests/expr/basic: Move this file to ...
* tests/misc/expr: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add expr.
* tests/Makefile.am (SUBDIRS): Remove expr.
* tests/expr: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/expr/Makefile
Convert tests/du/*, too.
Move the sole test in tests/dircolors to tests/misc/dircolors.
* tests/dircolors/simple: Move this file to...
* tests/misc/dircolors: ...here. Don't rely on $PROG in env.
* tests/misc/Makefile.am (TESTS): Add dircolors.
* tests/Makefile.am (SUBDIRS): Remove dircolors.
* tests/dircolors: Remove the directory.
* configure.ac (AC_CONFIG_FILES): Remove tests/dircolors/Makefile
Convert tests/dd/*, too.
Convert tests/mv, too.
* tests/other-fs-tmpdir: Before, all callers would exit 77 upon
failure to find the required dir. Now, exit 77 in this script so
callers don't have to. Adjust callers.
Adjust chgrp, chmod, chown, cp tests to use test-lib.sh.
* tests/check.mk: Also define abs_top_builddir.
Parallel "make check" support.
* build-aux/check.mk: New file, from The Vaucanson Group.
* .x-sc_GPL_version: New file, to allow "version 2 or later"
in build-aux/check.mk.
* Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
* tests/check.mk: New file.
* tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.
Begin factoring "sample-test" out of test scripts.
* tests/test-lib.sh: New file, to be sourced by all tests that
were previously derived from the "sample-test" template.
* tests/mkdtemp: New file.
* tests/touch/dir-1: Use test-lib.sh.
* tests/touch/empty-file: Likewise.
* tests/touch/fail-diag: Likewise.
* tests/touch/fifo: Likewise.
* tests/touch/no-create-missing: Likewise.
* tests/touch/no-rights: Likewise. Also, don't sleep.
* tests/touch/not-owner: Likewise.
* tests/touch/obsolescent: Likewise.
* tests/touch/read-only: Likewise.
* tests/touch/relative: Likewise.
* tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
to get the parallel-"make check" bits.
Move a slow test into tests/misc.
* tests/check.mk: Wrapper.
* tests/ls/time-1: Move this file to tests/misc/ls-time.
* tests/misc/ls-time: New file. From tests/ls/time-1.
* tests/ls/Makefile.am (TESTS): Remove time-1.
* tests/misc/Makefile.am (TESTS): Add ls-time.
Add support for parallel "make check" (in tests/misc, for now)
2007-09-08 Jim Meyering <jim@meyering.net>
Accommodate gnulib's renaming: __fpending.h -> fpending.h.
* lib/t-fpending.c: Include "fpending.h", not "__fpending.h".
2007-09-07 Jim Meyering <jim@meyering.net>
chmod: don't ignore a dangling symlink
* NEWS: Mention the bug fix.
* src/chmod.c (process_file): Handle the case of FTS_SLNONE,
i.e., give a diagnostic saying we cannot operate on such a file.
* tests/chmod/thru-dangling: Compare new stderr output with expected.
2007-09-07 Bob Proulx <bob@proulx.com>
Add a test: demonstrate that chmod ignores a dangling symlink
* tests/chmod/thru-dangling: New test. Fails.
* tests/chmod/Makefile.am (TESTS): Add thru-dangling.
2007-09-05 Jim Meyering <jim@meyering.net>
Adapt to new SELinux behavior: "?" vs. new "unlabeled"
* src/ls.c (gobble_file): Interpret the new "unlabeled" indicator
from getfilecon/lgetfilecon the same way we interpret a negative
return value: no security context. So we don't print the "+".
* tests/selinux: Recognize that "unlabeled" means insufficient
support for SELinux, just like "?".
2007-09-03 Jim Meyering <jim@meyering.net>
Invoke $(AUTOCONF) manually, if needed to get an updated version string.
* GNUmakefile: Don't actually touch configure.ac.
That would make git-version-gen always print "...-dirty".
Don't change '-'s to '.'s in the string from git-describe.
* build-aux/git-version-gen: Leave '-'s in the string from git-describe.
Otherwise, s/-/./g would make it too hard to distinguish the base
version number from the appended .DD suffixes.
2007-09-03 Jim Meyering <jim@meyering.net>
* README-hacking: Require rsync, rather than wget.
2007-09-02 Jim Meyering <jim@meyering.net>
* bootstrap (WGET_COMMAND): Remove code to set this variable.
Ensure that $(VERSION) is up to date for dist-related targets.
* GNUmakefile: Arrange to rerun autoconf, if the version reported by
git-version-gen doesn't match $(VERSION), but only for dist targets.
bootstrap: uses rsync to download the .po files
* bootstrap (po_download_command_format): New global.
(download_po_files): Use rsync.
(update_po_files): Don't remove .po files after download,
so future rsync runs can take advantage of the copies.
2007-09-01 Jim Meyering <jim@meyering.net>
* bootstrap (gnulib_tool): Make sha1sum check quietly.
Ensure that snapshot version changes make it to groups, too.
* src/Makefile.am (groups): Depend on Makefile.
Make groups-version executable,
* tests/misc/groups-version: ... as it was in the patch.
2007-08-31 Eric Blake <ebb9@byu.net>
Test yesterday's change to groups.
* tests/misc/groups-version: New test.
* tests/misc/Makefile.am (TESTS): Add groups-version.
2007-08-31 Jim Meyering <jim@meyering.net>
Solve the unnecessary-.po-file-regeneration problem once and for all.
* bootstrap (download_po_files): New function, renamed from
get_translations. Now, downloads, but doesn't update LINGUAS.
(update_po_files): New function.
2007-08-30 Jim Meyering <jim@meyering.net>
Shorten the snapshot version string by removing the "g".
* build-aux/git-version-gen: Remove git-describe's "g" that would
always precede the abbreviated SHA1. Suggestion from Dmitry V. Levin.
Perform the s,rm,/bin/rm, fix-up properly. No more kludge.
* Makefile.am (EXTRA_DIST): Remove .kludge-stamp.
(.kludge-stamp): Remove rule. Instead, ...
(dist-hook): Do the job here, operating on the file in $(distdir).
(rm_subst): Adjust regexp to match "rm -f rm$(EXEEXT)", not "rm -f rm".
(MAINTAINERCLEANFILES): s/+=/=/, now that this is the sole use.
(dist-hook): Remove the legacy-from-cvs install-sh is-executable check.
* .gitignore: Remove .kludge-stamp.
Make inter-release --version output more useful.
Now, each snapshot has a version "number" like 6.9-219-g58ddd,
which indicates that it is built using the 219th change set
(in _some_ repository) following the "v6.9" tag, and that 58ddd
is a prefix of the commit SHA1.
* build-aux/git-version-gen: New file.
* configure.ac: Run it to set the version.
* Makefile.am (dist-hook): Arrange so that .version appears only
in distribution tarballs, never in a checked-out repository.
* .gitignore: Add .version here, too. Just in case.
2007-08-30 Eric Blake <ebb9@byu.net>
* src/.gitignore: Ignore *.exe for platforms with non-empty $(EXEEXT).
2007-08-30 Eric Blake <ebb9@byu.net>
Use PACKAGE_NAME instead of GNU_PACKAGE.
* src/Makefile.am (.sh, uninstall-local): Adjust all users of
hand-rolled GNU_PACKAGE to instead use autoconf-provided
PACKAGE_NAME.
* src/basename.c (main): Likewise.
* src/chroot.c (main): Likewise.
* src/dirname.c (main): Likewise.
* src/echo.c (main): Likewise.
* src/expr.c (main): Likewise.
* src/factor.c (main): Likewise.
* src/groups.sh (version): Likewise. Also, reflect change in
--version output due to GPLv3.
* src/hostid.c (main): Likewise.
* src/hostname.c (main): Likewise.
* src/link.c (main): Likewise.
* src/logname.c (main): Likewise.
* src/nice.c (main): Likewise.
* src/nohup.c (main): Likewise.
* src/printenv.c (main): Likewise.
* src/printf.c (main): Likewise.
* src/pwd.c (main): Likewise.
* src/setuidgid.c (main): Likewise.
* src/sleep.c (main): Likewise.
* src/system.h (case_GETOPT_VERSION_CHAR): Likewise.
* src/test.c (main): Likewise.
* src/true.c (main): Likewise.
* src/unlink.c (main): Likewise.
* src/uptime.c (main): Likewise.
* src/users.c (main): Likewise.
* src/whoami.c (main): Likewise.
* src/yes.c (main): Likewise.
* configure.ac (AC_CHECK_DECLS): No need to check strtoimax,
strtoumax, since gnulib does this.
2007-08-30 Jim Meyering <jim@meyering.net>
Ensure that TMPDIR is valid. Otherwise, it would cause test failures.
* tests/misc/tty-eof: Set TMPDIR=.
* tests/misc/sort-compress: Likewise.
Use EXIT_FAILURE, not EXIT_FAIL, now that EXIT_FAILURE is always 1.
* src/system.h (EXIT_FAIL): Remove definition.
* src/chroot.c (main): EXIT_FAIL -> EXIT_FAILURE.
* src/env.c (main): Likewise.
* src/nice.c (main): Likewise.
* src/su.c (change_identity, main): Likewise.
* src/tty.c (main): Likewise.
Suggestion from Eric Blake.
2007-08-28 Jim Meyering <jim@meyering.net>
* src/test.c (usage): Note that [ honors --help and --version,
but that test does not. Suggestion from Dan Jacobson.
By default, do not install hostname anymore; no kidding, this time.
* src/Makefile.am (EXTRA_PROGRAMS): Remove hostname from this list,
now that it's no longer being installed by default. This should
have been part of the 2007-08-21 change.
(check-duplicate-no-install): New rule to ensure this doesn't
happen again.
(check): Depend on it.
Reflect renaming: mreadlink-with-size -> areadlink-with-size.
* bootstrap.conf: Update module name.
* src/copy.c (copy_internal): Update header and function names.
* src/ls.c (get_link_name): Likewise.
* src/readlink.c (main): Likewise.
* src/stat.c (print_stat): Likewise.
Add file system type names and magic numbers from "man 2 statfs".
* src/stat.c (human_fstype): Also handle BEFS, BFS, BINFMT_MISC,
FUSECTL, HUGETLBFS, NFSD and OPENPROM.
2007-08-27 Jim Meyering <jim@meyering.net>
Add some file system type names and magic numbers from glibc.
* src/stat.c (human_fstype): Add any file system names and values
present in glibc's linux_fsinfo.h but not in this list.
Alphabetize the S_* names and capitalize the hexadecimal constants.
2007-08-26 Jim Meyering <jim@meyering.net>
* tests/misc/fold: Fix a typo: missing \ in a diagnostic
no one is likely ever to see.
2007-08-25 Jim Meyering <jim@meyering.net>
* src/dircolors.hin: Add .dz and .svgz as archive suffixes.
Remove all .cvsignore files from version control.
2007-08-24 Jim Meyering <jim@meyering.net>
bootstrap: Ignore more.
* bootstrap (symlink_to_dir): Add a directory name like
uniwidth to e.g., lib/.gitignore.
(slurp): Handle the sys_stat_.h -> sys mapping, too.
* .hgignore: Remove this file, too.
* Makefile.am (EXTRA_DIST): Remove .gitignore and .hgignore.
No longer version-control .???ignore files in lib/, m4/, and po/.
* .gitignore: Ignore a few files in lib/, m4/, and po/ that are not
picked up automatically.
* lib/.gitignore, lib/.cvsignore: Remove files.
* m4/.gitignore, m4/.cvsignore: Remove files.
* po/.gitignore, po/.cvsignore: Remove files.
bootstrap: when fetching .po files, do not remove .gmo files.
* bootstrap (get_translations): Don't remove *.gmo files!
They can be expensive to regenerate.
Create .gitignore and/or .cvsignore from scratch, if absent.
This is in preparation for my removing those files from version
control in the directories managed by gnulib-tool.
* bootstrap: New setting: vc_ignore.
(insert_sorted_if_absent): Create $file if absent.
Adapt to new, possibly empty, list: $vc_ignore.
* src/system.h (fseeko, ftello): Remove now-unneeded definitions.
* src/od.c (LDBL_DIG): Remove now-unneeded definition.
Arrange to use tag names like vM.N, rather than COREUTILS-M_N.
* Makefile.maint (this-vc-tag) [git]: Simply use v$(VERSION).
(this-vc-tag-regexp): New variable.
(vc-tag-check): Use it, rather than $(this-vc-tag).
2007-08-23 Jim Meyering <jim@meyering.net>
* src/dircolors.hin: Add xterm-16color, xterm-88color and eterm-color.
Suggestion from Dan Nicolaescu.
Don't let ln be a party to destroying user data.
* src/ln.c: Include "file-set.h", "hash.h" and "hash-triple.h".
(dest_set, DEST_INFO_INITIAL_CAPACITY): New globals.
(do_link): Refuse to remove a just-created link.
Record a name,dev,ino triple for each link we create.
(main): Initialize dest_set, if needed.
* tests/mv/childproof: Test for the above fix.
* NEWS: Document this.
Reported by Eric Blake.
Move functions from copy.c into new modules, since ln needs them, too.
* bootstrap.conf (gnulib_modules): Add file-set.
* gl/lib/file-set.c (record_file, seen_file): Functions from copy.c.
* gl/lib/file-set.h: Add prototypes.
* gl/lib/hash-triple.c (triple_hash, triple_hash_no_name):
(triple_compare, triple_free): Functions from copy.c.
* gl/lib/hash-triple.h (struct F_triple): Define. From copy.c.
Add prototypes.
* gl/modules/file-set: New module.
* gl/modules/hash-triple: New module.
* src/Makefile.am (copy_sources): New variable.
(ginstall_SOURCES, cp_SOURCES, mv_SOURCES): Use it.
* src/copy.c: Include hash-triple.h.
No longer include hash-pjw.h.
(copy_internal): Don't pass a NULL third argument to record_file,
since that function no longer accepts that.
(record_file): Move this function to file-set.c.
Along the way, remove the code to allow a NULL stat-buffer pointer.
Adjust sole caller.
(seen_file): Move this function to file-set.c.
(struct F_triple): Move declaration to hash-triple.h.
(triple_compare, triple_free, triple_hash, triple_hash_no_name):
Move these functions to hash-triple.c.
bootstrap: generate more ignorable names
* bootstrap (slurp): When generating ignorable names, also map
.sin to .sed, .gperf to .c, and .y to .c.
* Makefile.maint (patch-check): Don't remove temporaries upon failure.
2007-08-22 Jim Meyering <jim@meyering.net>
* src/c99-to-c89.diff: Adjust offsets.
Change "rm --verbose -r a//" not to print extra slashes in a///b
* src/remove.c (push_dir): Don't copy trailing slashes onto the stack.
Reported by François Pinard.
* tests/rm/v-slash: New file. Test for the above change.
* tests/rm/Makefile.am (TESTS): Add v-slash.
* src/date.c: Don't include "getline.h", now removed from gnulib;
its declarations are now in <stdio.h>.
* src/md5sum.c: Likewise.
* src/dircolors.c: Likewise.
* src/copy.c (DEST_INFO_INITIAL_CAPACITY): Correct a comment.
2007-08-21 Jim Meyering <jim@meyering.net>
By default, do not install hostname anymore.
* configure.ac: Add "hostname" to the list of not-installed programs.
* src/Makefile.am (no_install__progs): Add "hostname" here, too.
* NEWS: Mention this.
2007-08-20 Bob Proulx <bob@proulx.com>
Clarify touch documentation of file arguments.
* src/touch.c (usage): Improve wording of documentation regarding
file argument handling and special handling of - argument.
* doc/coreutils.texi (touch invocation): Likewise.
Documentation problem reported by Vincent Lefevre.
2007-08-20 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: The old cp -p bug affected coreutils releases before 6.0.
Problem reported by Soren Spies in
<http://lists.gnu.org/archive/html/bug-coreutils/2007-08/msg00106.html>.
To be conservative, just say the bug was in all versions through 6.6.
2007-08-19 Eric Blake <ebb9@byu.net>
Avoid consuming too much seekable input when yesno is used.
* bootstrap.conf (gnulib_modules): Add closein.
* src/system.h (includes): Also include closein.h.
* src/mv.c (main): Use close_stdin, not close_stdout.
* src/cp.c (main): Likewise.
* src/ln.c (main): Likewise.
* src/rm.c (main): Likewise.
* src/install.c (main): Likewise.
* NEWS: Document the fix.
2007-08-20 Jim Meyering <jim@meyering.net>
Parallel "make check" support.
* build-aux/check.mk: New file, from The Vaucanson Group.
* .x-sc_GPL_version: New file, to allow "version 2 or later"
in build-aux/check.mk.
* Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version.
* tests/check.mk: New file.
* tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh.
Begin factoring "sample-test" out of test scripts.
* tests/test-lib.sh: New file, to be sourced by all tests that
were previously derived from the "sample-test" template.
* tests/mkdtemp: New file.
* tests/touch/dir-1: Use test-lib.sh.
* tests/touch/empty-file: Likewise.
* tests/touch/fail-diag: Likewise.
* tests/touch/fifo: Likewise.
* tests/touch/no-create-missing: Likewise.
* tests/touch/no-rights: Likewise. Also, don't sleep.
* tests/touch/not-owner: Likewise.
* tests/touch/obsolescent: Likewise.
* tests/touch/read-only: Likewise.
* tests/touch/relative: Likewise.
* tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk,
to get the parallel-"make check" bits.
2007-08-18 Jim Meyering <jim@meyering.net>
Use new "idcache.h" header.
* src/ls.c: Remove ancient declarations of getuser and getgroup.
Include "idcache.h", instead.
Run each Coreutils.pm-based test in its own subdirectory.
* tests/CuTmpdir.pm: New file.
* tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm.
* tests/misc/od, tests/misc/base64, tests/misc/basename:
* tests/misc/cut, tests/misc/date, tests/misc/dirname:
* tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail:
* tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum:
* tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum:
* tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag:
* tests/misc/wc-files0-from, tests/misc/xstrtol:
* tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from:
* tests/expr/basic, tests/factor/basic, tests/fmt/basic:
* tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1:
* tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec:
* tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1:
* tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it.
* tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test",
not "../../src/test", so it works when run from a subdirectory.
* tests/ls-2/tests: Create temp files and dirs from within the perl
script, so that they're removed, when run from a subdirectory.
* tests/ls-2/Makefile.am (TESTS_ENVIRONMENT): Define abs_top_builddir,
so we can use "$ENV{abs_top_builddir}/src/test" in a test script.
2007-08-16 Jim Meyering <jim@meyering.net>
Consolidate od tests.
* tests/misc/od: Perform od-zero-len's test here.
Include boilerplate code, so tests run in a subdirectory.
* tests/misc/od-zero-len: Remove this file.
* tests/ls/time-1: Include sample-test boilerplate code.
Remove the then-unnecessary, hard-coded envvar "unset" commands.
2007-08-15 Jim Meyering <jim@meyering.net>
Move a slow test into tests/misc.
* tests/ls/time-1: Move this file to tests/misc/ls-time.
* tests/misc/ls-time: New file. From tests/ls/time-1.
* tests/ls/Makefile.am (TESTS): Remove time-1.
* tests/misc/Makefile.am (TESTS): Add ls-time.
od --skip (-j) works even on files in /proc, when the kernel lies
* src/od.c (skip): Don't let kernel misinformation (nonempty files
in /proc with stat.st_size == 0) make "od -j N" misbehave.
Patch by Paul Eggert.
* NEWS: Document this work-around.
* tests/misc/od-zero-len: New file, test for the above.
* src/printf.c (usage): Adjust summary to also mention OPTIONs.
From Karl Berry.
2007-08-14 Jim Meyering <jim@meyering.net>
od: fix a bug that arises when skipping exact length of file
* NEWS: Document the bug fix.
* src/od.c (skip): Call fseek even when n_skip is exactly the
same as the length of the current file. Otherwise, the next
iteration would use unadjusted input stream pointer, thus ignoring
the desired "skip". Report and patch by Paul GHALEB.
* tests/misc/od: New file, test for the above.
* tests/misc/Makefile.am (TESTS): Add od.
2007-08-10 Paul Eggert <eggert@cs.ucla.edu>
Accommodate more xstrtol changes.
* src/df.c (long_options): Don't bother prepending "--" to long
options that OPT_STR might decode, as that hack is no longer needed.
(main): Invoke xstrtol_fatal rather than STRTOL_FATAL_ERROR.
* src/du.c (long_options, main): Likewise.
* src/ls.c (decode_switches): Likewise.
* src/od.c (long_options, main): Likewise.
* src/pr.c (first_last_page, main): Likewise.
* src/sort.c (long_options, specify_sort_size): Likewise.
* src/pr.c (first_last_page): Accept option index and option char
instead of an assembled option string. All callers changed.
* src/sort.c (specify_sort_size): Likewise.
* src/system.h (OPT_STR, LONG_OPT_STR, short_opt_str, OPT_STR_INIT):
Remove.
2007-08-05 Jim Meyering <jim@meyering.net>
Encapsulate a static variable.
* src/system.h (opt_str_storage): Move static var into...
(short_opt_str): ... new static inline function.
(OPT_STR): Use the new function.
2007-08-04 Jim Meyering <jim@meyering.net>
Exercise xstrtol's diagnostics via pr's --pages option.
* tests/misc/xstrtol: New file.
* tests/misc/Makefile.am (TESTS): Add xstrtol.
2007-08-04 Paul Eggert <eggert@cs.ucla.edu>
Adapt to new human and xstrtol API.
* src/df.c (long_options): Prepend "--" to long options that
OPT_STR might decode.
* src/du.c (long_options): Likewise.
* src/od.c (long_options): Likewise.
* src/sort.c (long_options): Likewise.
* src/df.c (main): Adjust to new human and xstrtol API.
* src/du.c (main): Likewise.
* src/ls.c (decode_switches): Likewise.
* src/od.c (main): Likewise.
* src/pr.c (first_last_page): Likewise. New argument OPTION.
All callers changed.
* src/sort.c (specify_sort_size): New arg OPTION. All callers
changed. Adjust to new xstrtol API.
* src/system.h (opt_str_storage): New static var.
(OPT_STR, LONG_OPT_STR, OPT_STR_INIT): New macros.
2007-08-02 Jim Meyering <jim@meyering.net>
Adjust one more test to accommodate the recent fts change.
This matters only on systems with insufficient openat support.
* tests/du/inacc-dest: Adjust expected diagnostic.
Adjust the other two "no-x" tests and unify all three.
* tests/du/no-x: Factor out du-specific bits.
* tests/chmod/no-x: Use the same code.
* tests/chgrp/no-x: Use the same code.
Adapt du's no-x test not to fail on older Linux systems.
* tests/du/no-x: Accept a third variant of the diagnostic.
2007-07-31 Jim Meyering <jim@meyering.net>
du: print size (probably incomplete) of each inaccessible directory
* src/du.c (process_file): Print what we know of the size of a
directory even when it is inaccessible. What we print is just the
size of the directory itself, not counting any of its contents.
* tests/du/inacc-dir: Test for this.
* NEWS: Mention this change.
Add a test for du not counting size of inaccessible directories.
* tests/du/inacc-dir: New file. Test for fts.c bug fixed yesterday.
* tests/du/Makefile.am (TESTS): Add inacc-dir.
* NEWS: Mention the bug fix.
2007-07-28 Jim Meyering <jim@meyering.net>
Attempt to copy a regular file, even if stat says it is empty.
* NEWS: Document this bug fix.
* src/copy.c (copy_reg): Read from a regular file, even if it
appears (stat.st_size == 0) to be empty. This reverts an
optimization introduced on 2005-11-23 for coreutils-6.0.
Otherwise, "cp /proc/cpuinfo /tmp" creates an empty file,
on e.g., linux-2.6.20.
* tests/cp/proc-zero-len: New file. Test for the above.
* tests/cp/Makefile.am (TESTS): Add proc-zero-len.
Reported by Dan Berrangé.
2007-07-26 Bob Proulx <bob@proulx.com>
sort: Improve sort --random-sort test.
* tests/misc/sort-rand: If "locale" is available pick a random
non-C locale and check "sort --random-sort" behavior using it.
2007-07-24 Jim Meyering <jim@meyering.net>
sort: add a test to exercise the affected code.
* tests/sort/Test.pm (realloc-buf): Exercise the code that changed
yesterday. No other test in all of "make check" does this.
* NEWS: Mention the fix.
2007-07-23 Paul Eggert <eggert@cs.ucla.edu>
sort: avoid unaligned access.
* src/sort.c (fillbuf): When enlarging the line buffer, ensure that
the new size is a multiple of "sizeof (struct line)". This avoids
alignment problems when indexing from the end of the buffer.
Problem reported by Andreas Schwab in
<http://lists.gnu.org/archive/html/bug-coreutils/2007-07/msg00158.html>.
2007-07-23 Jim Meyering <jim@meyering.net>
Update all copyright notices to use the newer form (e.g., remove
the postal address, and add the 'licenses' URL).
* COPYING: Update to Version 3.
Update c99/c89 patch for new, copyright-change-induced offsets.
* Makefile.maint (patch-check): Filter out '^Only in...' lines.
* src/c99-to-c89.diff: Handle new c99'isms in seq.c.
2007-07-22 Jim Meyering <jim@meyering.net>
* configure.ac: Arrange to rerun configure whenever src/Makefile.am
changes. That file contains the list of program names that must be
substituted into files like man/Makefile.
Add quotes around AC_SUBST arguments.
2007-07-21 Paul Eggert <eggert@cs.ucla.edu>
* bootstrap (slurp): Work even in environments where "ls" defaults
to "ls -A". Put in a FIXME, though, since the current code does
not slurp files whose names start with ".", and this looks like
it might be a troublesome area.
2007-07-20 Jim Meyering <jim@meyering.net>
Document and add a test for today's sort bug fix.
* NEWS: Describe the bug fix.
* tests/sort/Test.pm (obs-inval): Add a test for today's fix.
2007-07-20 Andreas Schwab <schwab@suse.de>
* src/sort.c (main): Don't free a pointer to non-malloc'd memory.
2007-07-19 Jim Meyering <jim@meyering.net>
Fix a portability bug in the new ls-color test.
* tests/ls/stat-free-symlinks: Don't rely on the ability of
a built-in printf to interpolate '\e'. Use '\033' instead.
2007-07-18 Jim Meyering <jim@meyering.net>
"cp -i --update older newer" no longer prompts; same for mv
* src/copy.c (copy_internal): Perform "update" check before the
possible interactive prompt. Reported by zeno_AT_biyg_DOT_org
in <http://bugzilla.redhat.com/248591>
* tests/mv/update: Add tests for the above.
* NEWS: Mention the bug fix.
2007-07-15 Jim Meyering <jim@meyering.net>
ls --color: Don't stat symlinks when neither ORPHAN nor MISSING
attribute has a color.
* src/ls.c (main): Don't set check_symlink_color when C_EXEC is
colored, unless ln=target (aka color_symlink_as_referent) is set.
(gobble_file): Set f->linkok = true also when !check_symlink_color.
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10608/focus=10927
Reported by Jeremy Maitin-Shepard.
* tests/strace: New file, contents extracted from...
* tests/mv/atomic: ...here. Source strace.
* tests/ls/stat-free-symlinks: New file. Test for the above.
Use strace to ensure that in this corner case, ls does not call stat.
* tests/ls/Makefile.am (TESTS): Add stat-free-symlinks.
* tests/Makefile.am (EXTRA_DIST): Add strace.
2007-07-14 Jim Meyering <jim@meyering.net>
Remove long-deprecated options.
* NEWS: Mention this.
* src/df.c, src/ls.c: Remove --kilobytes option.
* src/du.c: Remove --kilobytes and --megabytes options.
* src/who.c: Remove -i and --idle options.
* src/ptx.c: Remove --copyright option.
Change interface: make 2nd param _space_-separated, not comma-separated
* m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Remove now-
unnecessary use of tr.
Improve comments.
* configure.ac: Adjust caller, as well as the code that ensures the
2nd parameter stays in sync with the list in src/Makefile.am.
2007-07-14 Karel Zak <kzak@redhat.com>
* m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Fix typo: s/$2/$1/.
(gl_INCLUDE_EXCLUDE_PROG): Quote first use of $2 parameter.
Don't mix comma- and space-separated lists.
Patch from Karel Zak.
2007-07-13 Jim Meyering <jim@meyering.net>
Warn about non-portable use of unescaped backslash at end of string,
and treat it as if it were escaped.
* src/tr.c (unquote): Considering that such usage would make GNU tr
from coreutils-5.2.1 and earlier *fail*, the least we can do now is
to warn about it. Solaris' tr ignores it.
* NEWS: Mention this.
Use proper backslash-quoting inside backticks.
* configure.ac: Otherwise we run afoul of strict GNU tr:
a string ending in a lone backslash would provoke a failure.
2007-07-12 Jim Meyering <jim@meyering.net>
Expand default-no-install prog list in ./configure --help output,
and fix some []-quoting bugs in sed expressions.
* configure.ac: Hard-code the list, "arch,su" here as well
as in src/Makefile.am, and ensure the two stay in sync.
* m4/include-exclude-prog.m4 (gl_INCLUDE_EXCLUDE_PROG): Use $2,
rather than the nearly-equivalent shell variable.
Karel Zak reported that ./configure --help's output included
the literal string, $gl_no_install_progs_default.
Clean up include-exclude-prog.m4.
* m4/include-exclude-prog.m4 (gl_ADD_PROG): Don't modify MAN.
(gl_REMOVE_PROG): Likewise.
Add omitted "\>" in sed regexp.
Remove any leading or trailing spaces.
(gl_ADD_PROG): Remove any leading space.
* configure.ac: Instead, derive $MAN from $optional_bin_progs.
Append $(EXEEXT) to *all* names, not just the first one.
2007-07-11 Jim Meyering <jim@meyering.net>
If there's a GPL vN copyright comment, require that N == 3.
* Makefile.maint (sc_GPL_version): New rule.
* tests/misc/arch: Fix the sole violation.
2007-07-10 Jim Meyering <jim@meyering.net>
Skip "arch" test if it's not built.
* tests/misc/Makefile.am (built_programs): Define.
(TESTS_ENVIRONMENT): Add $(built_programs), for...
* tests/misc/arch: ...this: skip the test if arch is not built.
* src/Makefile.am (built_programs.list): New rule.
* tests/Makefile.am (built_programs): Rename from all_programs.
(TESTS_ENVIRONMENT): Use built_programs, not all_programs.
* tests/help-version: Likewise.
* NEWS: Mention that using --enable-no-install-program=X may
cause "make check" to fail.
Add support for enabling/disabling installation of specified programs.
* NEWS: Mention new configure-time options.
Mention that neither arch nor su is built/installed, by default.
* m4/include-exclude-prog.m4: New file.
* configure.ac: Use new macro, gl_ADD_PROG, rather than
manually appending to OPTIONAL_BIN_PROGS and MAN.
Move the code that adds "df" to the list of programs to build from
m4/jm-macros into this file.
Use gl_INCLUDE_EXCLUDE_PROG, then handle special cases: ginstall, [.
(NO_INSTALL_PROGS_DEFAULT): AC_SUBST it. Used by man/Makefile.am.
* man/Makefile.am (dist_man_MANS): Remove from this list all man pages
corresponding to "bin" programs. Add $(MAN) instead.
(optional_mans): Remove all uses.
(check-x-vs-1): Adapt to work even though arch and su are typically
no longer built (and neither are their .1 files).
* src/Makefile.am (install_su): Rename from INSTALL_SU, now that
INSTALL_SU has a different meaning. Use the new $(INSTALL_SU) value.
2007-07-10 Karel Zak <kzak@redhat.com>
New program: arch
* NEWS: Mention arch.
* README: Add arch to the list of programs.
* AUTHORS: Add arch.
* src/uname.c: Include "uname.h".
(PROGRAM_NAME): Handle arch, too.
(ARCH_AUTHORS): Define.
(uname_long_options, arch_long_options): Renamed and new globals.
(usage): Handle arch-mode as well as uname-mode.
(decode_switches): New function, extracted from main,
to handle arch-mode as well as uname-mode.
(main): Handle both modes.
* src/uname-arch.c: New program, alias for "uname -m".
* src/uname-uname.c: New file, default uname mode.
* src/uname.h: New file, uname modes.
* src/Makefile.am (EXTRA_PROGRAMS): Add arch.
(uname_SOURCES, arch_SOURCES): Define.
* man/arch.x: New file.
* man/Makefile.am (dist_man_MANS): Add arch.1.
(arch.1): New dependency.
* tests/misc/arch: New test, compare "arch" with "uname -m"
* configure.ac (OPTIONAL_BIN_PROGS): Add arch.
(MAN): Add arch.1.
* .x-sc_require_config_h: Exempt uname-arch.c and uname-uname.c
from the always-include-<config.h> rule.
2007-07-10 Jim Meyering <jim@meyering.net>
Change "version 2" to "version 3" in all copyright notices.
2007-07-09 Jim Meyering <jim@meyering.net>
Compensate for new c99'isms in seq.c.
* Makefile.maint (patch-check): Use -p1, not -p2, so a patch
generated via "make patch-check REGEN=1" actually works.
* src/c99-to-c89.diff: Handle new c99'isms in seq.c.
2007-07-09 Pádraig Brady <P@draigBrady.com>
Fix the automatic number width formatting in seq.
* src/seq.c: Fix the -w logic. Ignore spaces and '+'
characters of input numbers when determining width.
Set format correctly for input numbers in scientific notation.
* tests/seq/basic: Add various number width tests.
Details: <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10903>
2007-07-08 Jim Meyering <jim@meyering.net>
Run the coreutils-specific code only if tests/Makefile.am.in exists.
* bootstrap (mam_template): Move definition out of loop.
Create symlinks for gl/{lib,m4}/*, just as for gnulib/{lib,m4}/*.
* bootstrap (symlink_to_dir): Rename function from symlink_to_gnulib.
Add a directory parameter. Update all callers.
(cp_mark_as_generated): Also check for -- and link to -- files in gl/.
* THANKS: Add Pádraig Brady.
2007-07-08 Jim Meyering <jim@meyering.net>
Adapt to deeper hierarchy in gnulib.
* bootstrap (symlink_to_dir): If the destination directory doesn't
exist, create it. This is required at least for "lib/uniwidth/cjk.h".
Use <wchar.h>, not "wcwidth.h".
* src/wc.c: Now that gnulib provides the POSIX-specified <wchar.h>,
include it and <wctype.h>, rather than "wcwidth.h".
* src/ls.c: Include <wchar.h>, rather than "wcwidth.h".
2007-07-05 Jim Meyering <jim@meyering.net>
setuidgid: set all groups, not just the primary one.
I wanted to use the xgetgroups function from id.c, so factored
it out and made it into a non-exiting function (hence the "m"
prefix rather than "x").
* src/setuidgid.c (main): Use mgetgroups.
Include "mgetgroups.h".
* src/id.c (xgetgroups): Remove function.
Include "mgetgroups.h".
(print_group_list): Use mgetgroups, not xgetgroups.
* gl/modules/mgetgroups: New module.
* gl/lib/mgetgroups.c: New file. mgetgroups is derived from
id.c's xgetgroups function.
* bootstrap.conf (gnulib_modules): Add mgetgroups.
* gl/m4/mgetgroups.m4: New file.
* gl/lib/mgetgroups.h: New file.
* bootstrap: Merge in changes from gnulib.
* src/id.c: Include "getugroups.h" rather than declaring manually.
2007-07-04 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: pr -F no longer suppresses the footer or the first two blank
lines in the header.
* doc/coreutils.texi (pr invocation): Likewise. Also, a too-short
page length implies -t, not -T.
* src/pr.c (lines_per_header, lines_per_footer): Now constants.
(init_parameters): Don't try to change them.
(print_header): Use the same header and footer format regardless of
wither form feeds are being used.
(usage): Adjust to above change when describing too-short page length.
Too-short page length impliesy -t, not -T.
* tests/pr/2-S_f-t_notab: Adjust to the fact that -F now affects
only formfeed handling; it does not change the header.
* tests/pr/2-Sf-t_notab: Likewise.
* tests/pr/2f-t_notab: Likewise.
* tests/pr/2s_f-t_notab: Likewise.
* tests/pr/2s_w60f-t_nota: Likewise.
* tests/pr/2sf-t_notab: Likewise.
* tests/pr/2sw60f-t_notab: Likewise.
* tests/pr/2w60f-t_notab: Likewise.
* tests/pr/3a3f-0F: Likewise.
* tests/pr/3b3f-0F: Likewise.
* tests/pr/3b3f-0FF: Likewise.
* tests/pr/3b3f-FF: Likewise.
* tests/pr/3f-0F: Likewise.
* tests/pr/3f-FF: Likewise.
* tests/pr/Test.pm: Likewise.
* tests/pr/a3f-0F: Likewise.
* tests/pr/a3f-0FF: Likewise.
* tests/pr/a3f-FF: Likewise.
* tests/pr/b3f-0F: Likewise.
* tests/pr/b3f-0FF: Likewise.
* tests/pr/b3f-FF: Likewise.
* tests/pr/3-5l17f-t: Remove, since it's been renamed to another
file whose name has a line count 7 larger,
reflecting the new line count needed for this behavior.
* tests/pr/3a3l8f-t: Likewise.
* tests/pr/3b3l8f-t: Likewise.
* tests/pr/3l17f-t: Likewise.
* tests/pr/3ml17f-t: Likewise.
* tests/pr/Ja3l17f-lm: Likewise.
* tests/pr/Jb3l17f-lm: Likewise.
* tests/pr/Jml17f-lm-lo: Likewise.
* tests/pr/W-72l17f-ll: Likewise.
* tests/pr/W20l17f-ll: Likewise.
* tests/pr/W26l17f-ll: Likewise.
* tests/pr/W27l17f-ll: Likewise.
* tests/pr/W28l17f-ll: Likewise.
* tests/pr/W35Ja3l17f-lm: Likewise.
* tests/pr/W35Jb3l17f-lm: Likewise.
* tests/pr/W35Jml17f-lmlo: Likewise.
* tests/pr/W35a3l17f-lm: Likewise.
* tests/pr/W35b3l17f-lm: Likewise.
* tests/pr/W35ml17f-lm-lo: Likewise.
* tests/pr/W72Jl17f-ll: Likewise.
* tests/pr/a3l17f-lm: Likewise.
* tests/pr/a3l8f-t: Likewise.
* tests/pr/b3l17f-lm: Likewise.
* tests/pr/b3l8f-t: Likewise.
* tests/pr/l17f-t: Likewise.
* tests/pr/ml17f-0F: Likewise.
* tests/pr/ml17f-lm-lo: Likewise.
* tests/pr/ml17f-t: Likewise.
* tests/pr/ml17f-t-0F: Likewise.
* tests/pr/n+2-5l17f-0FF: Likewise.
* tests/pr/n+2l17f-0FF: Likewise.
* tests/pr/n+2l17f-bl: Likewise.
* tests/pr/n+3l17f-0FF: Likewise.
* tests/pr/n+3l17f-bl: Likewise.
* tests/pr/n+3ml13f-bl-FF: Likewise.
* tests/pr/n+3ml17f-bl-tn: Likewise.
* tests/pr/n+3ml17f-tn-bl: Likewise.
* tests/pr/n+4b2l10f-0FF: Likewise.
* tests/pr/n+5-8b3l10f-FF: Likewise.
* tests/pr/n+5a3l6f-0FF: Likewise.
* tests/pr/n+6b3l6f-FF: Likewise.
* tests/pr/nJml17f-lmlmlo: Likewise.
* tests/pr/nJml17f-lmlolm: Likewise.
* tests/pr/nN1+3l17f-bl: Likewise.
* tests/pr/nN15l17f-bl: Likewise.
* tests/pr/nSml13-bl-FF: Likewise.
* tests/pr/nSml13-t-t-FF: Likewise.
* tests/pr/nSml13-t-tFFFF: Likewise.
* tests/pr/nSml17-bl-FF: Likewise.
* tests/pr/nSml17-t-t-FF: Likewise.
* tests/pr/nSml17-t-tFFFF: Likewise.
* tests/pr/nl17f-bl: Likewise.
* tests/pr/o3Jml17f-lm-lo: Likewise.
* tests/pr/o3a3Sl17f-tn: Likewise.
* tests/pr/o3a3Snl17f-tn: Likewise.
* tests/pr/o3a3l17f-tn: Likewise.
* tests/pr/o3b3Sl17f-tn: Likewise.
* tests/pr/o3b3Snl17f-tn: Likewise.
* tests/pr/o3b3l17f-tn: Likewise.
* tests/pr/o3mSl17f-bl-tn: Likewise.
* tests/pr/o3mSnl17fbltn: Likewise.
* tests/pr/o3ml17f-bl-tn: Likewise.
* tests/pr/w72l17f-ll: Likewise.
* tests/pr/3-5l24f-t: New file, containing the contents of the
file with the same name but with the line count smaller by 7,
reflecting the new behavior with -F.
* tests/pr/3a3l15f-t: Likewise.
* tests/pr/3b3l15f-t: Likewise.
* tests/pr/3l24f-t: Likewise.
* tests/pr/3ml24f-t: Likewise.
* tests/pr/Ja3l24f-lm: Likewise.
* tests/pr/Jb3l24f-lm: Likewise.
* tests/pr/Jml24f-lm-lo: Likewise.
* tests/pr/W-72l24f-ll: Likewise.
* tests/pr/W20l24f-ll: Likewise.
* tests/pr/W26l24f-ll: Likewise.
* tests/pr/W27l24f-ll: Likewise.
* tests/pr/W28l24f-ll: Likewise.
* tests/pr/W35Ja3l24f-lm: Likewise.
* tests/pr/W35Jb3l24f-lm: Likewise.
* tests/pr/W35Jml24f-lmlo: Likewise.
* tests/pr/W35a3l24f-lm: Likewise.
* tests/pr/W35b3l24f-lm: Likewise.
* tests/pr/W35ml24f-lm-lo: Likewise.
* tests/pr/W72Jl24f-ll: Likewise.
* tests/pr/a3l15f-t: Likewise.
* tests/pr/a3l24f-lm: Likewise.
* tests/pr/b3l15f-t: Likewise.
* tests/pr/b3l24f-lm: Likewise.
* tests/pr/l24f-t: Likewise.
* tests/pr/ml24f-0F: Likewise.
* tests/pr/ml24f-lm-lo: Likewise.
* tests/pr/ml24f-t: Likewise.
* tests/pr/ml24f-t-0F: Likewise.
* tests/pr/n+2-5l24f-0FF: Likewise.
* tests/pr/n+2l24f-0FF: Likewise.
* tests/pr/n+2l24f-bl: Likewise.
* tests/pr/n+3l24f-0FF: Likewise.
* tests/pr/n+3l24f-bl: Likewise.
* tests/pr/n+3ml20f-bl-FF: Likewise.
* tests/pr/n+3ml24f-bl-tn: Likewise.
* tests/pr/n+3ml24f-tn-bl: Likewise.
* tests/pr/n+4b2l17f-0FF: Likewise.
* tests/pr/n+5-8b3l17f-FF: Likewise.
* tests/pr/n+5a3l13f-0FF: Likewise.
* tests/pr/n+6b3l13f-FF: Likewise.
* tests/pr/nJml24f-lmlmlo: Likewise.
* tests/pr/nJml24f-lmlolm: Likewise.
* tests/pr/nN1+3l24f-bl: Likewise.
* tests/pr/nN15l24f-bl: Likewise.
* tests/pr/nSml20-bl-FF: Likewise.
* tests/pr/nSml20-t-t-FF: Likewise.
* tests/pr/nSml20-t-tFFFF: Likewise.
* tests/pr/nSml24-bl-FF: Likewise.
* tests/pr/nSml24-t-t-FF: Likewise.
* tests/pr/nSml24-t-tFFFF: Likewise.
* tests/pr/nl24f-bl: Likewise.
* tests/pr/o3Jml24f-lm-lo: Likewise.
* tests/pr/o3a3Sl24f-tn: Likewise.
* tests/pr/o3a3Snl24f-tn: Likewise.
* tests/pr/o3a3l24f-tn: Likewise.
* tests/pr/o3b3Sl24f-tn: Likewise.
* tests/pr/o3b3Snl24f-tn: Likewise.
* tests/pr/o3b3l24f-tn: Likewise.
* tests/pr/o3mSl24f-bl-tn: Likewise.
* tests/pr/o3mSnl24fbltn: Likewise.
* tests/pr/o3ml24f-bl-tn: Likewise.
* tests/pr/w72l24f-ll: Likewise.
2007-06-23 Jim Meyering <jim@meyering.net>
Prefer "STREQ (a, b)" over "strcmp (a, b) == 0"; similar for != 0.
* src/base64.c (main): Likewise.
* src/install.c (setdefaultfilecon): Likewise.
* src/sort.c (main): Likewise.
* Makefile.maint (sc_prohibit_strcmp): New rule.
* .x-sc_prohibit_strcmp: New file, to list the few exceptions.
* Makefile.am (EXTRA_DIST): Add .x-sc_prohibit_strcmp.
2007-06-22 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: seq no longer mishandles obvious cases like
"seq 0 0.000001 0.000003" by omitting the last output number.
* doc/coreutils.texi (seq invocation): Remove advice about workaround
for seq off-by-one problem, since the bug is fixed now. Replace
it with more-generic advice about rounding errors.
* src/seq.c (long_double_format, print_numbers):
New arg NUMERIC_FORMAT. All uses changed.
2007-06-22 Pádraig Brady <P@draigBrady.com> (trivial change)
* tests/seq/basic: Add test cases for seq off-by-one problem.
2007-06-22 Jim Meyering <jim@meyering.net>
* src/stat.c (long_options): Add a FIXME comment to help ensure
that the deprecated and undocumented "--filesystem" option is
removed someday.
2007-06-18 Paul Eggert <eggert@cs.ucla.edu>
A few more symlink-related fixes. Fix a bug triggered by cp
--parents and symlinks. Close some race conditions possible when
the destination replaces a newly-created file with a symlink.
* NEWS: Document that 'cp --parents' no longer mishandles
symlinks in file name components of source.
* src/copy.c (HAVE_LCHOWN): Default to false.
(lchown) [!defined HAVE_LCHOWN]: Define to chown, for convenience.
* src/cp.c (lchown) [!HAVE_LCHOWN]: Likewise.
* src/install.c (lchown [!HAVE_LCHOWN]: Likewise.
* src/copy.c (set_owner): Use lchown instead of chown, for safety
in case the file got replaced by a symlink in the meantime.
* src/cp.c (re_protect): Likewise.
* src/install.c (change_attributes): Likewise.
* src/copy.c (copy_internal): Use ordinary C rather than an #if.
* src/cp.c (lchown) [!HAVE_LCHOWN]: Define to chown, for convenience.
(struct dir_attr): Cache the entire struct stat of the directory,
rather than just its mode, so that we needn't stat the directory
twice (which can lead to races).
(re_protect): Don't use XSTAT as that's not appropriate in
this context (symlinks should be followed here). Instead, use
the cached stat value.
(make_dir_parents_private): Save dir's entire struct stat, not
just its mode.
* tests/cp/cp-parents: Add test to check against bug with
cp --parents and symlinks.
2007-06-18 Jim Meyering <jim@meyering.net>
Use mreadlink_with_size (doesn't exit), not xreadlink_with_size.
* bootstrap.conf (gnulib_modules): Add readlink-with-size.
Remove xreadlink and xreadlink-with-size.
* src/copy.c (copy_internal): Use mreadlink_with_size,
not xreadlink_with_size.
* src/ls.c (get_link_name): Likewise.
* src/readlink.c (main): Likewise.
* src/stat.c (print_stat): Likewise.
* README-hacking: Don't mention Gzip 1.2.4, now that 1.3.12 is out.
2007-06-16 Jim Meyering <jim@meyering.net>
Make chgrp and chown diagnostics consistent.
* src/chown.c (main): Emit the diagnostic before the file name,
not after it, to be consistent with chgrp's diagnostic.
* src/chgrp.c (parse_group): Emit a ":" between the diagnostic
and the file name.
Reported by Egmont Koblinger.
* THANKS: Add Egmont Koblinger.
2007-06-15 Paul Eggert <eggert@cs.ucla.edu>
Correct cp's handling of destination symlinks in some cases.
* NEWS: "cp" no longer considers a destination symlink to be the
same as the referenced file when copying links or making backups.
* src/copy.c (copy_reg): When following a symlink, use the
followed name in later chown etc. requests, so that the created
file is affected, rather than the symlink. Use O_NOFOLLOW on
source when not dereferencing symlinks; this avoids a race.
Preserve errno correctly when doing multiple open attempts on the
destination.
(copy_internal): Follow destination symlinks only when copying a
regular file and only when we don't intend to remove or rename the
destination first, regardless of whether following source
symlinks; this is because since POSIX and tradition (e.g.,
FreeBSD) say we should ordinarily follow destination symlinks if
the system calls would ordinarily do so.
* src/copy.h (struct cp_options): Add comment that 'dereference'
is only for source files.
* src/cp.c (usage): Note that --derereference etc. are only for
source files.
(make_dir_parents_private): Follow symlinks, regardless of whether
--dereference is specified, because these are destination symlinks.
* tests/cp/same-file: Adjust tests to match revised behavior.
Filter out perror output since it might vary from host to host.
Use sed alone instead of also using echo.
* doc/coreutils.texi (cp invocation): Document the behavior better when
the destination is a symlink. Clarify source versus destination
symlinks. Describe the new behavior for destination symlinks.
2007-06-15 Jim Meyering <jim@meyering.net>
* src/copy.c: Include "canonicalize.h".
(copy_reg): Use canonicalize_filename_mode to follow the symlink,
so that we can always open with O_EXCL and avoid a race.
2007-06-15 Jim Meyering <jim@meyering.net>
Don't include "quote.h" when it is not used.
* src/md5sum.c: Remove unnecessary inclusion of "quote.h".
* src/expr.c: Likewise.
* src/shred.c: Likewise.
* Makefile.maint (sc_prohibit_quote_without_use): New rule.
* src/c99-to-c89.diff: Adjust offsets.
2007-06-14 Paul Eggert <eggert@cs.ucla.edu>
Clarify what "cat" documentation means by "blank" lines.
* doc/coreutils.texi (cat invocation): "Blank" lines actually mean
empty lines.
* src/cat.c (usage): Say that "nonblank" means nonempty. Clarify
--squeeze-blank.
2007-06-13 Jim Meyering <jim@meyering.net>
rmdir: give better diagnostics
* src/rmdir.c (remove_parents): Give a more descriptive/consistent
diagnostic upon failure.
(main): Likewise.
Suggestion from Joey Hess.
* THANKS: Add Joey Hess.
Don't include "quotearg.h" when it is not used.
* Makefile.maint (sc_prohibit_quotearg_without_use): New rule.
* src/cp.c: Don't include "quotearg.h". It wasn't used.
* README-hacking: List Gperf as a build-requirement, too.
Reported by Steve Ward.
2007-06-11 Jim Meyering <jim@meyering.net>
* README: Mention README-hacking, for whose who start from
cloned/checked-out sources rather than from a distribution tarball.
Reported by Steve Ward.
* THANKS: Add Steve Ward.
2007-06-10 Jim Meyering <jim@meyering.net>
bug-fix: cp would fail to write through a dangling symlink
* NEWS: Mention the bug fix.
* src/copy.c (copy_reg): When open fails with EEXIST, the destination
is lstat'able, and a symlink, call open again, but now without O_EXCL.
* tests/cp/thru-dangling: New file, to test for the above fix.
* tests/cp/Makefile.am (TESTS): Add thru-dangling.
* THANKS: Add Michael McLagan.
Bug report from Michael McLagan in <http://bugzilla.redhat.com/243588>.
2007-06-04 Paul Eggert <eggert@cs.ucla.edu>
* doc/coreutils.texi (Common options): Mention that -h and
--human-readable are equivalent to --block-size=human-readable.
Documentation problem reported by Steve Ward in
<http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00007.html>.
(du invocation): Use optSi rather than duplicating the macro's
contents (incorrectly, since we claimed a "B" was output).
2007-05-31 Jim Meyering <jim@meyering.net>
Pull printf-related code from gnulib, rather than using forked copy.
* bootstrap.conf (gnulib_modules): Don't avoid size_max and xsize
modules. While I dislike xsize-style overflow avoidance, maintaining
a forked version of e.g., vasnprintf.c was too much work.
2007-05-29 Jim Meyering <jim@meyering.net>
* src/dircolors.hin: Add screen-256color.
Suggested by sdl.web@gmail.com in <http://bugzilla.redhat.com/239266>.
2007-05-26 Jim Meyering <jim@meyering.net>
* TODO: Add an entry for comm --output-delimiter=STR
2007-05-25 James Youngman <jay@gnu.org>
wc: ignore multibyte-character decoding errors
* src/wc.c (wc): Don't issue an error message when mbrtowc
indicates that we have seen an invalid byte sequence. This
makes "wc /bin/sh" bearable (though the word and line counts
are likely not to be useful).
* NEWS: Mention the change.
2007-05-22 Jim Meyering <jim@meyering.net>
Check for an up-to-date copyright year in coreutils.texi.
* Makefile.maint (copyright-check): Also check for an up-to-date
copyright year in doc/$().texi, if that file exists.
* doc/coreutils.texi: Add 2007 to list of Copyright years.
Reported by Karl Berry.
cut: diagnose a range starting with 0 (-f 0-2) as invalid, and
give a better diagnostic for a field-number/offset of 0.
* NEWS: Mention the fix.
* src/cut.c (ADD_RANGE_PAIR): Add an explicit check.
Based on a patch from James Youngman.
* tests/misc/cut: Add tests for the above.
"cut -f 2-0" now fails; before, it was equivalent to "cut -f 2-"
Also, diagnose the '-' in "cut -f -" as an invalid range, rather
than interpreting it as the unlimited range, "1-".
* NEWS: Mention these changes.
* src/cut.c (set_fields): Don't interpret an accumulator "value"
of 0 as an unspecified range endpoint.
Give better diagnostics.
Adjust a comment so that it is true also for 64-bit size_t.
* tests/cut/Test.pm: Add tests for the above.
stty: fix a harmless syntax nit
* src/stty.c (visible): Use ";" as the statement terminator
between two assignments, not ",".
(integer_arg): Join an unnecessarily wrapped line.
2007-05-20 Jim Meyering <jim@meyering.net>
stty: diagnose an invalid hex value in 35-colon command-line argument
* NEWS: Mention this.
* src/stty.c (strtoul_tcflag_t, strtoul_cc_t): New functions.
(recover_mode): Use those functions (not sscanf), to parse the
string robustly.
* tests/stty/invalid: New file. Test for the above.
* tests/stty/Makefile.am (TESTS): Add invalid.
* .x-sc_prohibit_atoi_atof: Don't exempt stty.c from this check.
Add tests/stty/invalid so we don't have to obfuscate the comment
about sscanf therein.
* Makefile.maint (sc_prohibit_atoi_atof): Mention sscanf in the
diagnostic, too.
* TODO: Remove some now-completed or no longer relevant items.
2007-05-19 Jim Meyering <jim@meyering.net>
Rename uses of futimens -> gl_futimens; glibc now declares the former.
* src/copy.c (copy_reg): Reflect renaming: futimens -> gl_futimens.
* src/touch.c (touch): Likewise.
2007-05-18 Jim Meyering <jim@meyering.net>
* Makefile.maint (my-distcheck): Remove -pedantic from $(CFLAGS)
for now, to avoid c89-check failure due to use of #include_next.
2007-05-15 Jim Meyering <jim@meyering.net>
Generate a dozen test-related Makefile.am files at bootstrap-time.
* README-hacking: Build-from-checkout now require Perl, too.
* bootstrap: Now that these generated Makefile.am files are no longer
under version control, they must be created at bootstrap time.
2007-05-14 Paul Eggert <eggert@cs.ucla.edu>
* man/chmod.x: Document chmod's behavior with setuid and setgid bits.
Remove misleading implication about leading zero. Problem
reported by Jan Engelhardt in
<http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00134.html>.
2007-05-13 Jim Meyering <jim@meyering.net>
Remove the generated tests/*/Makefile.am files from version control.
* tests/cut/Makefile.am: git-remove this generated file.
* tests/head/Makefile.am: Likewise.
* tests/join/Makefile.am: Likewise.
* tests/pr/Makefile.am: Likewise.
* tests/sort/Makefile.am: Likewise.
* tests/tac/Makefile.am: Likewise.
* tests/tail/Makefile.am: Likewise.
* tests/test/Makefile.am: Likewise.
* tests/tr/Makefile.am: Likewise.
* tests/uniq/Makefile.am: Likewise.
* tests/wc/Makefile.am: Likewise.
* .cvsignore, .gitignore: Ignore these generated files.
* src/.cvsignore, src/.gitignore: Add chcon here, ...
* .cvsignore, .gitignore: ... not here.
Test uniq's new --zero-terminated (-z) option.
* tests/uniq/Test.pm: When possible, create a "-z"-testing variant
of each existing test.
(2z, 3z, 4z, 5z, 20z, 122, 123): New tests from James Youngman.
2007-05-12 James Youngman <jay@gnu.org>
Add -z option to uniq. Originally proposed by Egmont Koblinger.
* NEWS: Mention uniq's new option: --zero-terminated (-z).
* src/uniq.c: Add new option, --zero-terminated (-z), to make
uniq use the NUL byte as separator/delimiter rather than newline.
(check_file): Add a parameter: delimiter. Update caller.
Use readlinebuffer_delim in place of readlinebuffer everywhere.
(main): Handle the new option.
(usage): Describe new option the same way sort does.
* doc/coreutils.texi (uniq invocation): Describe the new option.
2007-05-07 Jim Meyering <jim@meyering.net>
* NEWS: Mention that last week's tr bug dates back to 1992.
2007-05-04 Jim Meyering <jim@meyering.net>
Avoid test failure when run with an unusual umask.
* tests/ls/color-dtype-dir: Set umask to 022.
Suggestion from AIDA Shinra.
Avoid failure of root-only test when run with a restrictive umask.
* tests/rm/no-give-up: Ensure that non-root can access "d/" through
root-owned ".". Reported by AIDA Shinra.
tr -c: don't abort when translating with S2 larger than complement of S1
* src/tr.c (main): Remove invalid assertion triggered by e.g.,
tr -c a '[b*256]'. There's nothing wrong with having Set2 larger
than Set1. Reported by Guntram Blohm.
* tests/tr/Test.pm (no-abort-1): Test for the above.
* NEWS: Mention this bug fix.
* THANKS: Add Guntram Blohm.
2007-05-03 Jim Meyering <jim@meyering.net>
Avoid test failure when run with a permissive umask.
* tests/rm/no-give-up: Set permissions of test directory properly,
i.e., not depending on umask prohibiting go=w.
Reported by AIDA Shinra.
2007-05-02 Paul Eggert <eggert@cs.ucla.edu>
The following commands and options now support the standard size
suffixes kB, M, MB, G, GB, and so on for T, P, Y, Z, and Y:
head -c, head -n, od -j, od -N, od -S, split -b, split -C,
tail -c, tail -n.
* doc/coreutils.texi (od invocation, head invocation, tail invocation):
Document support for new size suffixes.
(head invocation, tail invocation):
Document that -n uses the same suffixes as -c.
(tail invocation): More-clearly document what leading "+" does.
* src/head.c (usage, string_to_integer): Support new suffixes.
* src/od.c (usage, main): Likewise.
* src/split.c (usage, main): Likewise.
* src/tail.c (usage, parse_options): Likewise.
Prompted by a patch from Evan Hunt.
2007-05-02 Jim Meyering <jim@meyering.net>
* src/du.c (usage): Tweak description of --dereference-args (-D) again.
Prompted by another request for clarification from Justin Pryzby.
Invoke rm via 'setuidgid ... env PATH="$PATH" ...', as in fail-eperm.
* tests/rm/fail-2eperm: Patch from AIDA Shinra.
Reported by Peter Dyballa.
* THANKS: Add AIDA Shinra and Peter Dyballa.
2007-04-28 Paul Eggert <eggert@cs.ucla.edu>
* src/nohup.c (usage): Describe how standard input and output
are redirected.
2007-04-25 Jim Meyering <jim@meyering.net>
* src/du.c (usage): Clarify description of --dereference-args (-D).
Prompted by a report from Justin Pryzby.
* bootstrap.conf (gnulib_modules): Add fseeko and ftello.
(gnulib_modules): Add autobuild.
2007-04-24 Jim Meyering <jim@meyering.net>
* THANKS: Add Andreas Frische.
* NEWS: Mention today's ls --color fix.
* tests/ls-2/tests (sl-dangle): Add a test for today's fix.
2007-04-24 Eric Blake <ebb9@byu.net>
ls --color once again colors dangling symlinks correctly
* src/ls.c (gobble_file): Much like the 2007-04-07 fix,
add a term to the expression that decides whether we need
stat and/or lstat calls. Reported by Andreas Frische.
2007-04-16 Jim Meyering <jim@meyering.net>
* src/cut.c (usage): Adjust synopsis to show that an OPTION is required.
Reported by Rudolf Kastl.
* THANKS: Add Rudolf Kastl.
2007-04-11 Paul Eggert <eggert@cs.ucla.edu>
split --line-bytes=N (-C N): don't create an empty file.
* src/split.c (line_bytes_split): Don't create an empty line
afterwards if the last buffer happens to be exactly full.
* tests/misc/split-fail: Add a test case for this.
* NEWS: mention this.
2007-04-10 Jim Meyering <jim@meyering.net>
ls: don't form or compute the length of strings that won't be used.
* src/ls.c (gobble_file): Form and compute length of strings for
block size, owner, group, author, major+minor numbers and file size
only if they'll actually be used. I.e., don't form most of them
when not producing long format output.
2007-04-07 Jim Meyering <jim@meyering.net>
Add a test for, and document, today's fix.
* NEWS: Mention today's ls --color fix.
* tests/ls-2/tests (sl-target): Add a test for today's fix.
* THANKS: Add Kirk Kelsey.
2007-04-07 Eric Blake <ebb9@byu.net>
Fix a bug in how the LS_COLORS ln=target attribute is handled.
* src/ls.c (gobble_file): Use "stat" (not lstat) also when the
ln=target attribute applies. Reported by Kirk Kelsey.
2007-04-02 Jim Meyering <jim@meyering.net>
* src/copy.c (copy_reg): Initialize local "con", before calling
getfscreatecon, in case that function (or its inline stub) does
not set it.
2007-04-01 Paul Eggert <eggert@cs.ucla.edu>
* src/ls.c (print_horizontal): Fix bug reported by Mike Frysinger:
ls -x DIR would sometimes output the wrong string in place of the
first entry.
* NEWS: Mention the bug fix.
* tests/ls/x-option: New file.
* tests/ls/Makefile.am (TESTS): Add x-option.
gnulib moved md5 and sha1 modules into a new crypt/ directory; adapt
* bootstrap.conf (gnulib_modules): Adjust to gnulib's renaming of
md5 to crypt/md5 and sha1 to crypt/sha1.
2007-03-30 Jim Meyering <jim@meyering.net>
* NEWS: Mention these SELinux changes.
* ChangeLog-selinux: Remove file.
Move its contents into this file, removing old dates.
* src/runcon.c (main): Don't reorder arguments. Reported by
Ulrich Drepper in <http://bugzilla.redhat.com/232652>.
* tests/misc/runcon-no-reorder: New file. Test for the above.
* tests/misc/Makefile.am (TESTS): Add runcon-no-reorder.
* src/runcon.c (main): Remove "." at end of a diagnostic.
* src/runcon.c: New program.
* src/Makefile.am (bin_PROGRAMS): Add runcon.
(runcon_LDADD): Define.
* README: Add runcon to the list of programs.
* AUTHORS: Add this: runcon: Russell Coker
* tests/help-version: Add runcon as an exception.
* man/Makefile.am (dist_man_MANS): Add runcon.1.
(runcon.1): New dependency.
mkfifo, mknod: Accept new "-Z, --context=C" option.
* src/mkfifo.c, src/mknod.c: Include <selinux/selinux.h>.
(main): Honor it.
* src/Makefile.am (mkfifo_LDADD, mknod_LDADD): Use $(LIB_SELINUX).
mkdir: Accept new "-Z, --context=C" option.
* src/mkdir.c: Include <selinux/selinux.h>.
(main): Honor it.
* src/Makefile.am (mkdir_LDADD): Use $(LIB_SELINUX).
* tests/cp/cp-a-selinux: New file. Test for the bug reported in
<http://bugzilla.redhat.com/219900>.
* tests/cp/Makefile.am (TESTS): Add cp-a-selinux.
* tests/selinux: New file.
* tests/Makefile.am (EXTRA_DIST): Add selinux.
* tests/misc/selinux: Source the new script, rather than open coding it.
Change how "cp -a" and "cp --preserve=context" work with SELinux.
Now, cp -a attempts to preserve context, but failure to do so does
not change cp's exit status. However "cp --preserve=context" is
similar, but failure *does* cause cp to exit with nonzero status.
* src/copy.h (struct cp_options) [require_preserve_context]: New member.
* src/copy.c (copy_reg, copy_internal): Implement the above.
* src/mv.c (cp_option_init): Initialize the new member.
* src/install.c (cp_option_init): Likewise.
* src/cp.c (cp_option_init): Likewise.
(decode_preserve_arg): Set it or reset it.
cp, mv, install: add SELinux support, but unlike with the Red Hat
patch, mv and cp do not provide the "-Z context" option.
* src/copy.c: Include <selinux/selinux.h>.
(restore_default_fscreatecon): New function.
(copy_reg): Make cp --preserve=context work for existing destination.
(copy_internal): Likewise for new destinations.
* src/copy.h (cp_options) [preserve_security_context]: New member.
* src/cp.c: Include <selinux/selinux.h>.
(selinux_enabled): New global.
(usage): Mention new --preserve=context option.
(PRESERVE_CONTEXT): Define/use.
(decode_preserve_arg): Handle PRESERVE_CONTEXT.
(main): Remove an obsolete comment.
If --preserve=context is specified on a system without SELinux
enabled, give a diagnostic and fail.
* src/mv.c: Include <selinux/selinux.h>.
Set x->preserve_security_context if SELinux is enabled.
* src/install.c: Accept new "-Z, --context=C" option.
Accept --preserve-context option (but not -P option).
Accept alternate spelling: --preserve_context, for now.
Include <selinux/selinux.h> and "quotearg.h".
(selinux_enabled, use_default_selinux_context): New globals.
(PRESERVE_CONTEXT_OPTION): Define.
(cp_option_init): Default: do not preserve security context.
(setdefaultfilecon): New function.
(main): Honor new options.
* src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD):
Add $(LIB_SELINUX).
* src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.
* tests/misc/selinux [VERBOSE]: Print version info for each
of the tested tools, not just ls.
* src/c99-to-c89.diff: Remove the ls.c patch, now that I've
temporarily removed the offending c99'ism.
* src/chcon.c (usage): Split a string literal that was longer than 509.
* src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.
Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA.
* src/c99-to-c89.diff: Adjust offsets.
* AUTHORS: Add chcon.
* src/c99-to-c89.diff: Remove trailing blanks.
* src/chcon.c: Don't include "dirname.h". system.h already includes it.
* gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.
* src/c99-to-c89.diff: Handle a new c99'ism in ls.c.
* src/id.c (main): Tweak id -Z diagnostic.
id: Add SELinux support: -Z option.
* src/id.c (main): Apply patches from Fedora, with these changes:
Remove #ifdef WITH_SELINUX.
Use error (EXIT_FAILURE, not fprintf+exit(1).
* src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).
stat: Add support for SELinux in the form of a %C format directive.
* src/stat.c (follow_links): Make this variable file-global.
(out_file_context): New function.
(print_statfs): Honor %C.
(print_stat): Honor %C.
(do_stat): Remove follow_links parameter.
(usage): Document the two %C directives.
(main): Accept -Z (though it's a no-op).
* src/Makefile.am (stat_LDADD): Define.
ls: Add support for SELinux and a slightly modified -Z option.
I started with the patches from Red Hat.
The entries below tell how the code evolved.
* src/ls.c (print_long_format, print_file_name_and_frills): When
there is no security context (due to getfilecon/lgetfilecon failing
with e.g. ENOTSUP), print it as "?", not "".
* src/ls.c (print_file_name_and_frills): Make -Z work without -l.
(length_of_file_name_and_frills): Likewise.
* src/ls.c: Remove the --lcontext and --scontext options.
Change the way -Z, --context work so that it no longer implies -l.
Thus, -Z -l will work like -lcontext and -Z without -l will work
like --scontext.
Adjust tests to reflect new 'ls -l' syntax -- affects only
systems with SELinux when operating on a file with no ACL.
These tests assumed that everything before the first space on
each line is the 10-byte mode string. But there may also be a "+"
in the 11th column, just before the space. However, note that this
is not new. The same thing would have happened even without the
change below, when listing a file with an ACL.
* tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm:
* tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod:
* tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm:
Don't make compilation depend on USE_ACL. An SELinux security
context counts as an "alternate access control method", so ls
must output a "+" for each file with a security context.
* src/ls.c [struct fileinfo] (have_acl): Declare unconditionally.
(FILE_HAS_ACL): Remove macro definition. Use f->have_acl directly.
(gobble_file): Record whether a file has a security context, and
update the condition used to determine whether to print the "+".
(gobble_file): Call getfilecon/lgetfilecon also when
format == long_format, so that we get the "+".
* src/ls.c (gobble_file): Add a comment explaining why (with a
security context option) ls doesn't exit nonzero due to e.g.,
getfilecon failing with errno == ENOTSUP.
* src/ls.c (gobble_file): Ignore failure of getfilecon if it's due
to ENOTSUP.
* src/ls.c (gobble_file): Factor out three small blocks using
getfilecon and lgetfilecon.
Don't ignore return value from getfilecon and lgetfilecon.
* src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C
ternary operator).
(print_scontext_format): Likewise.
(print_scontext): Declare to be "bool", not int. Adjust uses.
* src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX).
* tests/misc/chcon: New file.
* tests/misc/chcon-fail: New file.
* tests/Makefile.am (check-root): Run new, root-only misc/chcon test.
* tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail.
* tests/misc/Makefile.am (TESTS): Add selinux.
* tests/misc/selinux: New file.
* tests/help-version: Skip chcon.
* man/chcon.x: New file.
* man/Makefile.am: Build chcon.1.
New program: chcon
* gl/modules/selinux-at: New module. Check for libselinux and set
LIB_SELINUX here, unconditionally, rather than depending on
the configure-time --enable-selinux option.
* gl/modules/selinux-h: New module.
* bootstrap.conf (gnulib_modules): Add selinux-at.
* gl/lib/selinux-at.c, gl/lib/selinux-at.h: New files.
* gl/lib/se-selinux_.h: New file.
* gl/lib/se-context_.h: New file.
* gl/m4/selinux-selinux-h.m4: New file.
* gl/m4/selinux-context-h.m4: New file.
* src/Makefile.am (bin_PROGRAMS): Add chcon.
(chcon_LDADD): Define.
* README: Add chcon to the list of programs.
* src/chcon.c: Rewrite the original (Red Hat) chcon to use fts.
2007-03-29 Jim Meyering <jim@meyering.net>
* .vg-suppressions: Add libc-getpwuid-leak.
2007-03-28 Jim Meyering <jim@meyering.net>
Help translators include translation team's web or email address.
* src/system.h (emit_bug_reporting_address): New function.
* src/base64.c: Use it rather than a literal printf.
* src/basename.c, src/cat.c, src/chgrp.c, src/chmod.c:
* src/chown.c, src/chroot.c, src/cksum.c, src/comm.c, src/cp.c:
* src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
* src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
* src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
* src/head.c, src/hostid.c, src/hostname.c, src/id.c, src/install.c:
* src/join.c, src/kill.c, src/link.c, src/ln.c, src/logname.c:
* src/ls.c, src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c:
* src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/od.c:
* src/paste.c, src/pathchk.c, src/pinky.c, src/pr.c, src/printenv.c:
* src/printf.c, src/ptx.c, src/pwd.c, src/readlink.c, src/rm.c:
* src/rmdir.c, src/seq.c, src/setuidgid.c, src/shred.c, src/shuf.c:
* src/sleep.c, src/sort.c, src/split.c, src/stat.c, src/stty.c:
* src/su.c, src/sum.c, src/sync.c, src/system.h, src/tac.c:
* src/tail.c, src/tee.c, src/test.c, src/touch.c, src/tr.c:
* src/true.c, src/tsort.c, src/tty.c, src/uname.c, src/unexpand.c:
* src/uniq.c, src/unlink.c, src/uptime.c, src/users.c, src/wc.c:
* src/who.c, src/whoami.c, src/yes.c: Likewise.
* src/stty.c: Don't include "vasprintf.h", now that its
declarations are guaranteed to be in gnulib's stdio.h.
* src/who.c: Likewise.
2007-03-27 Jim Meyering <jim@meyering.net>
* README: Use "install", not "ginstall" in the list of program names.
* src/Makefile.am (check-README): Substitute s/ginstall/install/.
2007-03-25 Jim Meyering <jim@meyering.net>
* src/c99-to-c89.diff: Regenerate.
2007-03-25 Paul Eggert <eggert@cs.ucla.edu>
Avoid the need for euidaccess and/or lstat on every directory entry
with 'rm -r dir' (without -f), if we are root, or if we are removing
a directory tree that is full of symbolic links.
* bootstrap.conf (gnulib_modules): Add write-any-file.
* src/copy.c: Include write-any-file.h.
(UNWRITABLE): Remove macro, replacing with....
(writable_destination): New function, which uses can_write_any_file
to avoid the need for euidaccess when we are privileged.
(overwrite_prompt, abandon_move): Use it.
* src/remove.c: Include write-any-file.h.
(D_TYPE): New macro.
(DT_UNKNOWN, DT_DIR, DT_LNK) [!HAVE_STRUCT_DIRENT_D_TYPE]: New macros.
(write_protected_non_symlink): Don't bother to stat if we can write
any file.
(prompt): New arg PDIRENT_TYPE. All callers changed.
Use readdir dirent type to avoid the need for 'lstat' on each directory
entry in cases like 'rm -r dir', if we are root, or if the tree is
full of symbolic links.
(DT_IS_KNOWN, DT_MUST_BE): Remove.
(remove_entry): New arg DIRENT_TYPE_ARG. All callers changed.
2007-03-24 Jim Meyering <jim@meyering.net>
If strace malfunctions, skip the test rather than failing it.
* tests/mv/atomic: Required on a mips-unknown-linux-gnu system
running the aging linux-2.4.27-mipscvs-20040814.
2007-03-23 Paul Eggert <eggert@cs.ucla.edu>
* src/pathchk.c: Don't include euidaccess.h, as we don't call
euidaccess.
2007-03-23 Jim Meyering <jim@meyering.net>
* README-package-renamed-to-coreutils: Add a URL for the FAQ,
and a couple more archive links.
2007-03-22 Jim Meyering <jim@meyering.net>
Post-release version change.
* NEWS: Add a line for 6.9+.
* configure.ac (AC_INIT): Set new version string.
Version 6.9.
* NEWS: Record release date and new version number.
* configure.ac (AC_INIT): New version number.
* tests/mv/hard-3: Correct the preceding change: $3 -> $2.
2007-03-22 Paul Eggert <eggert@cs.ucla.edu>
Improve a test script.
* tests/mv/hard-3: Check for 'ls' failure, too.
Generate more-useful debugging output when 'ls' fails.
2007-03-21 Jim Meyering <jim@meyering.net>
Fix a test script not to claim an ext2 file system is of type xfs.
* tests/du/slink: When using df --local and df --type=TYPE,
test only the exit code. Don't bother with stdout.
Prompted by a report by Thomas Schwinge of an inaccurate diagnostic.
* gl/lib/savewd.c: Remove this file, since the savewd_save change
is now in gnulib. The other wasn't useful.
2007-03-20 Jim Meyering <jim@meyering.net>
* gl/lib/acl.c: Remove this file, now that gnulib's version subsumes it.
Skip part of this test when "." is not a local file system.
* tests/install/basic-1: Otherwise, it would fail on some NFS
file systems.
* tests/mkdir/p-3: Likewise.
2007-03-19 Paul Eggert <eggert@cs.ucla.edu>
* src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD):
Add $(LIB_ACL_TRIVIAL).
2007-03-18 Jim Meyering <jim@meyering.net>
Fix a generic NFS-related test failure.
* tests/mkdir/p-3: When setting up an unreadable "." in an
inaccessible parent, make the parent inaccessible *after* making "."
unreadable. Otherwise, running "chmod a-r ." in an already-
inaccessible parent would fail on NFS with "Stale NFS file handle".
Fix a bug in how pr -m -s works.
* NEWS: Describe how the fix affects pr.
* src/pr.c (init_parameters): The --merge (-m) option does
not imply --expand-tabs (-e), so don't set "untabify_input".
Reported by Wis Macomson.
* tests/misc/pr: New file. Test for the above fix.
* tests/misc/Makefile.am (TESTS): Add pr.
* THANKS: Update.
2007-03-17 Jim Meyering <jim@meyering.net>
Detect use of AC_CONFIG_AUX_DIR also when its argument is quoted.
* bootstrap: Put ""s around use of $build_aux, in case
someone uses a name containing shell meta-characters.
Reported by Alfred M. Szmidt.
* tests/misc/tty-eof: Add shuf to the list of tested commands.
Avoid test failure on NFS-mounted Solaris ZFS file system.
* tests/du/basic: Skip a test if "." is on a non-local file system.
Avoid an obscure build failure, prefer waitpid over wait.
* src/install.c (strip): Use waitpid, not wait. It's equivalent,
but feels less obsolescent.
* bootstrap: Don't use \> in grep regexp. For HP-UX.
2007-03-16 Jim Meyering <jim@meyering.net>
Begin adding support for Solaris ZFS (4 entries per trivial ACL)
* gl/lib/acl.c (ACL_NOT_WELL_SUPPORTED): New macro.
(file_has_acl, copy_acl): Use it, rather than enumerating errno values.
(is_trivial_acl): New function. Incomplete, for now.
(file_has_acl, copy_acl): Use the new function, rather than
counting the number of entries in an ACL.
* bootstrap: Update from gnulib.
* .x-sc_prohibit_atoi_atof: Add TODO here, too.
2007-03-16 Paul Eggert <eggert@cs.ucla.edu>
* src/copy.c: Include filemode.h.
(overwrite_prompt): Say "try to overwrite", not "overwrite", to
make it clearer that the attempt may fail. Problem reported by
Dan Jacobson in:
http://lists.gnu.org/archive/html/bug-coreutils/2007-03/msg00130.html
Output symbolic mode as well as numeric.
* tests/mv/i-2 (fail): Adjust to new prompt format.
2007-03-15 Jim Meyering <jim@meyering.net>
Enforce policy: don't use *scanf functions.
* Makefile.maint (sc_prohibit_atoi_atof): Add to regexp and diagnostic.
* .x-sc_prohibit_atoi_atof: Give stty a temporary pass.
* TODO: note that stty.c needs this small clean-up.
2007-03-13 Jim Meyering <jim@meyering.net>
Prepare to work on ACL-related failure when using Solaris ZFS.
* gl/lib/acl.c: New file, copied from gnulib.
Work around a failing test due to an NFS-based race condition.
* tests/cp/sparse: Accept a report that the copy is *smaller*.
2007-03-12 Jim Meyering <jim@meyering.net>
Make bootstrap.conf a tiny bit more generic.
* bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
2007-03-10 Jim Meyering <jim@meyering.net>
Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
* gl/lib/savewd.c: Copy this file from gnulib, then change
"errno != EACCES" to (errno != EACCES && errno != ESTALE).
The symptom was this failure in tests/install/basic-1:
ginstall: cannot create directory `rel/a': Stale NFS file handle
The preceding change solved part of the problem. Now ginstall fails.
* tests/install/basic-1: Temporarily, don't redirect ginstall's
stderr to /dev/null, so I can see why the NFS autobuilder's NFS test
is failing.
* tests/install/basic-1: When setting up an unreadable "." in an
inaccessible parent, make the parent inaccessible *after* making "."
unreadable. Otherwise, running "chmod a-r ." in an already-
inaccessible parent would fail on NFS with "Stale NFS file handle".
Reported by Bob Proulx.
* Makefile.maint (po-check): Exclude c99-to-c89.diff.
2007-03-09 Jim Meyering <jim@meyering.net>
Avoid test failures on Darwin 7.9.0 (MacOS X 10.3.9)
* tests/chgrp/basic: Don't let failure by chgrp to set the
group of a symlink make this test fail. Do give a diagnostic.
In the chgrp-no-change-ctime test, add darwin7.9.0 as another
known-failing system.
When failing on some other system, print $host_triplet, too.
Also avoid test failures on Darwin 8.8.x (MacOS X 10.4).
Reported by Peter Fales.
2007-03-08 Jim Meyering <jim@meyering.net>
* src/c99-to-c89.diff: Reflect the new c99'ism, update offsets.
2007-03-08 Paul Eggert <eggert@cs.ucla.edu>
rm without -f: give a better diagnostic when euidaccess fails.
* src/remove.c (write_protected_non_symlink): Return int, not bool,
so that we can indicate failure too (as a postive error number).
(prompt): If write_protected_non_symlink fails, report that error
number and fail rather than charging ahead and removing the dubious
entry. Redo the logic of printing a diagnostic so that we need to
invoke quote (full_filename (...)) only once. More details at:
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9952/focus=9996>
2007-03-08 Jim Meyering <jim@meyering.net>
Generalize a few more cvs-isms.
* bootstrap (checkout_only_file): Rename from CVS_only_file.
Change comments and diagnostics not to say "CVS".
* bootstrap: Run libtool, if necessary.
Make bootstrap a little more general.
* bootstrap (build_aux): Factor out/use this definition.
Formally require a "AC_CONFIG_AUX_DIR($build_aux)" line in configure.ac.
(insert_sorted_if_absent): Move function definition "up", to
precede new first use.
If $build_aux/ doesn't exist initially, create it, and
mark it as ignored.
2007-03-03 Andrew Church <achurch@achurch.org> (tiny change)
Paul Eggert <eggert@cs.ucla.edu>
Fix a bug: cp -x would fail to set mount point permissions.
* NEWS: mention cp -x bug fix
* src/copy.c (copy_internal): Don't return immediately after
copying a mount point that we do not intend to recurse under.
Based on a patch by Andrew Church.
2007-03-03 Jim Meyering <jim@meyering.net>
pwd-unreadable-parent: Skip test on ia64/Linux, too.
* tests/misc/pwd-unreadable-parent: Also skip when $REPLACE_GETCWD.
Reported by Bob Proulx.
2007-03-02 Jim Meyering <jim@meyering.net>
pwd-unreadable-parent: Skip test on non-Linux/GNU systems.
* tests/misc/pwd-unreadable-parent: Rather than trying to decide
whether this test has a chance of succeeding, run it only when
$(host_os) is linux-gnu. It was failing on powerpc-apple-darwin8.8.0
* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Add host_os=$(host_os).
* tests/misc/pwd-long: Also allow "+" in $PWD.
Remove another coreutils-ism. Formatting cleanup.
* Makefile.maint (my-distcheck): Update an outdated comment.
(emit_upload_commands): Use $(PACKAGE) rather than "coreutils".
(my-distcheck): Skip the c99/c89 check if there's no such .diff file.
2007-03-01 Jim Meyering <jim@meyering.net>
* Makefile.maint (warn_cflags): Hoist, adding "-Dlint -O".
(my-distcheck): Use the new variable, instead of too-long literal.
Make "make syntax-check" rules less coreutils-specific.
* Makefile.maint (sc_cast_of_x_alloc_return_value): Use CVS_LIST_EXCEPT.
(sc_cast_of_alloca_return_value): Likewise.
(sc_root_tests): Do nothing if there is no check-root target
in tests/Makefile.am.
Run the writable-files check only for release-building targets.
* Makefile.maint (local-checks-available): Remove writable-files.
(alpha beta major): Put it here, instead.
"make syntax-check" now runs only Makefile.cfg-selected tests
* Makefile.maint (syntax-check-rules): Hoist this definition so that
it precedes the indirect use in the definition of $(local-check).
(local-check): Use :=, not just "=".
(syntax-check): Depend on $(local-check), not $(syntax-check-rules).
2007-02-28 Bruno Haible <bruno@clisp.org>
* bootstrap.conf (gnulib_modules): Replace xreadlink with
xreadlink-with-size. Add xreadlink.
* src/copy.c (copy_internal): Update.
* src/ls.c (is_directory): Update.
* src/stat.c (print_stat): Update.
* src/readlink.c (main): Use the one-argument xreadlink function.
2007-02-28 Paul Eggert <eggert@cs.ucla.edu>
* doc/coreutils.texi (Common options): --si outputs "M", not "MB".
Problem reported by Philip Rowlands in
<http://lists.gnu.org/archive/html/bug-coreutils/2007-02/msg00283.html>.
2007-02-28 Jim Meyering <jim@meyering.net>
* .x-sc_file_system: Add the new test, tests/misc/df-P, to this
list of exceptions, for the "make distcheck" sc_file_system rule.
* Makefile.maint (gnulib_snapshot_date): Remove now-unused definition.
2007-02-27 Paul Eggert <eggert@cs.ucla.edu>
Make df -P immune to effects of e.g., the BLOCK_SIZE envvar.
* NEWS: With -P, the default block size and output format is not
affected by DF_BLOCK_SIZE, BLOCK_SIZE, or BLOCKSIZE.
* src/df.c (main): Implement this.
2007-02-27 Jim Meyering <jim@meyering.net>
Add a test for the above.
* tests/misc/df-P: New file.
* tests/misc/Makefile.am (TESTS): Add df-P.
2007-02-25 Jim Meyering <jim@meyering.net>
* Makefile.maint (announcement): Adjust so that it works with
announce-gen's --gnulib-snapshot-time-stamp option.
Indent one of the command lines using TAB, not 8 spaces.
Post-release version change.
* NEWS: Add a line for 6.8+.
* configure.ac (AC_INIT): Set new version string.
2007-02-24 Jim Meyering <jim@meyering.net>
Version 6.8.
* NEWS: Record release date and new version number.
* configure.ac (AC_INIT): New version number.
Don't skip this test on new-enough Linux/GNU systems.
* tests/misc/pwd-unreadable-parent: Test $REPLACE_GETCWD = 0,
rather than for __GETCWD_PREFIX in config.h (the latter is no
longer defined, ever, due to gnulib changes).
* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define REPLACE_GETCWD.
Remove the "gnits" option; it prohibits my using "+" as a version
string suffix, and all it does (beyond the default "gnu" option)
is to _require_ the THANKS file.
* configure.ac (AM_INIT_AUTOMAKE): Remove it.
Remove all AUTOMAKE_OPTIONS settings in Makefile.am files.
* tests/chgrp/Makefile.am, tests/chmod/Makefile.am:
* tests/chown/Makefile.am, tests/cp/Makefile.am:
* tests/du/Makefile.am, tests/expr/Makefile.am:
* tests/factor/Makefile.am, tests/general/Makefile.am:
* tests/install/Makefile.am, tests/ln/Makefile.am:
* tests/ls/Makefile.am, tests/mkdir/Makefile.am:
* tests/mv/Makefile.am, tests/readlink/Makefile.am:
* tests/rm/Makefile.am, tests/rmdir/Makefile.am:
* tests/seq/Makefile.am, tests/stty/Makefile.am:
* tests/tee/Makefile.am, tests/touch/Makefile.am:
* README: Document the OSF/1 4.0d build failure and work-around.
Reported by Bruno Haible.
* NEWS: Use a simple "+" suffix to denote pre-release, not "-dirty".
Nicer connotations.
* configure.ac: Use 6.7+, not 6.7-dirty.
2007-02-24 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: sort no longer compresses temporaries by default.
* bootstrap.conf: Remove findprog.
* doc/coreutils.texi (sort invocation): The default is to not
compress. Don't treat "" specially.
* src/sort.c: Don't include findprog.h.
(create_temp): Compress only if the user specified --compress-program.
* tests/misc/sort-compress: Adjusts tests to match new behavior.
2007-02-24 Jim Meyering <jim@meyering.net>
Avoid a shell syntax error, when building with an inadequate Perl.
* man/Makefile.am (.x.1): Add quotes around $(PERL) in case, since
it can expand to "/.../missing perl".
* man/Makefile.am (.x.1): Warn when unable to update a man page.
Suggestion from Bruno Haible.
2007-02-23 Bruno Haible <bruno@clisp.org>
Handle better the combination of old Perl and a pre-c99 compiler.
* man/Makefile.am (.x.1): If the autoconf test has determined that
perl is missing or not a sufficient version, do nothing.
* tests/readlink/can-e: Put the closing double-quote at the end of a
backquoted word, not in the middle. Works around a bug in sh on
OSF/1 4.0d.
* tests/readlink/can-f: Likewise.
* tests/readlink/can-m: Likewise.
* tests/du/slink: Skip the test if executing on an nfsv3 file system.
This avoids a test failure at least on OSF/1 4.0d.
2007-02-23 Jim Meyering <jim@meyering.net>
* src/date.c (usage): Split a diagnostic that had grown to be
longer than the C89 maximum of 509 bytes.
2007-02-23 Ed Santiago <ed@edsantiago.com>
* src/date.c (usage): Mention that --rfc-3339 uses space, not 'T',
for a separator. Include sample RFC 2822 and 3339 output.
2007-02-23 Jim Meyering <jim@meyering.net>
With -Dlint, make shuf free all heap-allocated storage.
* src/shuf.c (main): Move declaration of input_lines to
function scope, and initialize to NULL, so we can free it.
[lint]: Free all malloc'd memory.
* tests/misc/shuf: Also test shuf's -e and -i options.
2007-02-22 Jim Meyering <jim@meyering.net>
Merge in a change from some other incarnation of this file (gzip?)
* bootstrap (gnulib_tool): Skip get_translations if there is no po/ dir.
Adjust preceding change not to perform an unaligned access.
* src/copy.c (copy_reg): Undo previous change. Instead, make
it clearer that we're using a single-byte sentinel, and
[lint]: Initialize sizeof (uintptr_t) - 1 bytes after the sentinel.
Reported by Andreas Schwab.
Placate valgrind, wrt ./cp --sparse=always
* src/copy.c (copy_reg): Place the sentinel by setting a
full word's worth of bits, not just a single byte's worth.
This avoids a harmless (but distracting) case of memory being
used-uninitialized.
2007-02-21 Paul Eggert <eggert@cs.ucla.edu>
Honor dd's noatime flag if possible, even if not supported on build fs
* doc/coreutils.texi (dd invocation): Warn that noatime might not be
reliable.
* src/dd.c (flags, usage): Look at O_NOATIME, not
HAVE_WORKING_O_NOATIME, to decide whether to support the noatime
flag, so that dd attempts O_NOATIME even if the build file system
does not support it. Problem reported by Jim Meyering today in
bug-coreutils.
* tests/dd/misc: Generate a warning, not a failure, if noatime
exists but fails.
2007-02-21 Jim Meyering <jim@meyering.net>
* tests/misc/date: Remove vestigial use of Data::Dumper.
2007-02-20 Paul Eggert <eggert@cs.ucla.edu>
* src/copy.c (cached_umask): Cast -1 to mode_t to avoid a warning
about out-of-range initializer with Sun C 5.8.
2007-02-20 Jim Meyering <jim@meyering.net>
* bootstrap (CVS_only_file): Use README-hacking.
Now that we use GIT, not cvs, rename README-cvs.
* README-hacking: Renamed from...
Update to reflect that we now use git.
* README-cvs: ...this.
* src/env.c (main): When invoked with no arguments (i.e. when printing
the environment), use a local variable to iterate through the global
"environ" array, rather than "environ" itself. This is solely to
avoid changing the environment for an LD_PRELOAD-substituted "puts"
or "exit" function. Tiny patch by Harvey Eneman. See
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9735>.
* THANKS: Update.
* bootstrap: Move definitions of temporary directory names and the
new bt_regex "up" to precede all uses, so it's clearer what their
scope is. Also, use [.], rather than \\., since the former works
even if eval'd.
* bootstrap: Remove occurrences of $bt (._bootmp) from lib/Makefile.
Based on the bison 2007-02-19 change by Joel E. Denny.
2007-02-19 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: sort now uses a --compress-program option rather than
an environment variable.
* doc/coreutils.texi (sort invocation): Document this.
* src/sort.c (usage): Likewise.
(COMPRESS_PROGRAM_OPTION): New const.
(long_options, create_temp, main): Support new option.
* tests/misc/sort-compress: Test it.
2007-02-19 Jim Meyering <jim@meyering.net>
* bootstrap: Fix typo s/dowloading/downloading/ in --help output.
2007-02-18 Jim Meyering <jim@meyering.net>
* src/system.h: Don't include exit.h, now that it's subsumed
by the gnulib-generated stdlib.h.
* tests/rm/fail-eacces: Skip this test when running as root.
Reported by Matthew Woehlke.
* bootstrap: Use "._bootmp" as the temporary directory name,
not ".#bootmp". The latter's "#" caused trouble with the new,
gnulib-added "LINK_WARNING_H = $(top_srcdir)/.#bootmp/..." line.
2007-02-14 Paul Eggert <eggert@cs.ucla.edu>
* bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
* src/dircolors.c: Include c-strcase.h.
(dc_parse_stream): Use c_strcasecmp rather than
strcasecmp to avoid unreliable results in locales like Turkish
where strcasecmp is incompatible with the C locale.
2007-02-13 Jim Meyering <jim@meyering.net>
Also check for and print stderr output, in case a program fails.
* tests/misc/tty-eof: Occasionally (not reproducible), this
test would fail, with one or more programs exiting nonzero, e.g.,
tty-eof: sha224sum exited with status 1 (expected 0)
Now, maybe we'll get a clue, the next time that happens.
2007-02-12 Jim Meyering <jim@meyering.net>
* .x-sc_useless_cpp_parens: Ignore a false-positive in a shell script.
* tests/misc/pwd-unreadable-parent: Skip the test if we're
definitely using the replacement.
* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Define CONFIG_HEADER.
2007-02-10 Jim Meyering <jim@meyering.net>
Remove excess leading spaces that would make help2man misbehave.
* src/printf.c (usage): Remove excess spaces on 2nd line of %b desc.
* src/nl.c (usage): Remove excess spaces on 2nd line of pBRE desc.
* src/dd.c (usage): Remove excess spaces on 2nd line of sync desc.
* src/date.c (usage): Use two spaces after each optional flag, not one.
Reported by Thomas Huriaux in <http://bugs.debian.org/410407>.
* Makefile.maint (longopt_re): Relax the regexp, making square
brackets optional, so it matches the newly reported violations, too.
* src/csplit.c (usage): Use two spaces (not one) to separate
each option string from its description, so help2man formats
the derived man page properly. Reported by Thomas Huriaux in
<http://bugs.debian.org/410407>.
* src/df.c (usage): Likewise.
* src/du.c (usage): Likewise.
* src/install.c (usage): Likewise.
* src/ls.c (usage): Likewise.
2007-02-03 Jim Meyering <jim@meyering.net>
Test for today's gnulib/lib/getcwd.c fix affecting pwd and readlink
* NEWS: Mention the bug fix.
* tests/misc/pwd-unreadable-parent: New file.
* tests/misc/Makefile.am (TESTS): Ad pwd-unreadable-parent.
2007-02-02 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: Document fix for cp --preserve=mode.
* src/copy.c (copy_internal): Omit the group- or other-writeable
permissions when creating a directory, to avoid a race condition
if the special mode bits aren't right just after the directory is
created.
* src/cp.c (make_dir_parents_private): Likewise.
* tests/cp/parent-perm-race: Test for the "cp --preserve=mode"
race fix in copy.c.
* NEWS: Document fix for cp --parents.
* src/cp.c (make_dir_parents_private): Report the error sooner with
"cp --parents DIR/FILE DEST" when DIR is a non-directory, thus not
creating the directory, DEST/DIR.
* tests/cp/cp-parents: Test for the non-race-condition bug fixed
by the above change.
2007-02-02 Jim Meyering <jim@meyering.net>
* src/nl.c (proc_text): Use "NULL", not "(struct re_registers *) 0".
* src/c99-to-c89.diff: Make shred.c Index: and a/b prefixes
consistent, so this can be applied with patch -p0.
Reported by Matthew Woehlke.
Arrange for "make check-root" to run the new root-only test.
* tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux.
(all_t): Add t9.
* Makefile.maint (patch-check): Use patch with its -p2 option,
since that makes this check slightly more strict.
Use a directory on a loopback device mounted with -o context=...
* tests/cp/cp-a-selinux: Since this test now runs mount and umount,
it is a root-only one.
2007-01-29 Jim Meyering <jim@meyering.net>
Plug a leak in ls.
* src/ls.c (print_dir): Don't leak a "DIR"+fd upon failure to
determine dev/inode or upon detecting a symlink loop.
* src/ls.c: Rename three global variables.
(cwd_file): Rename from 'files'.
(cwd_n_alloc): Rename from 'nfiles'.
(cwd_n_used): Rename from 'files_index'.
Shave 8 bytes off the size of "struct fileinfo".
* src/ls.c (fileinfo): Put all members of type "bool" together.
2007-01-28 Paul Eggert <eggert@cs.ucla.edu>
Modify "ls" to sort its data faster, using the new gnulib mpsort
module rather than qsort. This is particularly a win in
environments where strcoll is slow, since mpsort typically calls
strcoll less often than qsort does.
* bootstrap.conf (gnulib_modules): Add mpsort.
* src/ls.c: Include mpsort.h.
(sorted_file, sorted_file_alloc): New vars, for a new vector of
pointers to the file info, for speed.
(clear_files, extract_dirs_from_files, sort_files, print_current_files):
(print_many_per_line, print_horizontal, print_with_commas):
(calculate_columns): Set and use new vector.
(initialize_ordering_vector): New function.
2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
Adjust to today's change to gnulib, which added a module for
string.h to replace the little include files like strcase.h.
* src/dircolors.c: Don't include strcase.h.
* src/system.h: Don't include mempcpy.h, memrchr.h, stpcpy.h, strpbrk.h.
2007-01-26 Jim Meyering <jim@meyering.net>
* src/dd.c (advance_input_after_read_error): Change diagnostic to
say "invalid file offset" rather than "screwy file offset".
* .x-sc_cast_of_argument_to_free: Remove this file.
* Makefile.am (EXTRA_DIST): Likewise.
2007-01-25 Dan Hipschman <dsh@linux.ucla.edu>
* src/sort.c (create_temp): Remove superfluous access-X_OK
check. find_in_path does this for us.
2007-01-24 Jim Meyering <jim@meyering.net>
Remove usually-skipped test.
* tests/cp/open-perm-race: Remove this file. It is subsumed
by parent-perm-race.
* tests/cp/Makefile.am (TESTS): Remove open-perm-race.
* tests/sort/Makefile.am: Regenerate.
Pass "make distcheck" again.
* src/sort.c (usage): Split a diagnostic that had grown to be
longer than the C89 maximum of 509 bytes.
* .x-sc_cast_of_argument_to_free: New file. Allow a cast in sort.c.
FIXME: this is just temporary, while we wait to remove the offending
access-calling code.
* Makefile.am (EXTRA_DIST): Add .x-sc_cast_of_argument_to_free.
* Makefile.maint (sc_cast_of_argument_to_free): Use the
canonical, $$($(CVS_LIST_EXCEPT)).
* m4/.gitignore, m4/.cvsignore, lib/.gitignore, lib/.cvsignore: Update.
2007-01-24 Paul Eggert <eggert@cs.ucla.edu>
* NEWS: New option sort -C, proposed by XCU ERN 127, which looks
like it will be approved. Also add --check=quiet, --check=silent
as long aliases, and --check=diagnose-first as an alias for -c.
* doc/coreutils.texi (sort invocation): Document this.
Also, mention that sort -c can take at most one file.
* src/sort.c: Implement this.
Include argmatch.h.
(usage): Document the change.
(CHECK_OPTION): New constant.
(long_options): --check now takes an optional argument, and is now
treated differently from 'c'.
(check_args, check_types): New constant arrays.
(check): New arg CHECKONLY, which suppresses diagnostic if -C.
(main): Parse the new options.
* tests/sort/Test.pm (02d, 02d, incompat5, incompat6):
New tests for -C.
2007-01-24 Jim Meyering <jim@meyering.net>
Fix a typo.
* tests/misc/sort-compress: Use $abs_top_builddir, not $top_builddir.
* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
Don't depend on "which".
* tests/misc/sort-compress (SORT): Use $abs_builddir, now which.
* tests/misc/Makefile.am (TESTS_ENVIRONMENT): Export top_builddir.
2007-01-24 Dan Hipschman <dsh@linux.ucla.edu>
Test sort compression.
* tests/misc/Makefile.am: Add the test.
* tests/misc/sort-compress: New file containing the tests.
2007-01-24 Jim Meyering <jim@meyering.net>
* NEWS: sort temp file compression: tweak wording.
* src/sort.c (struct sortfile) [name]: Declare member to be const.
2007-01-21 Jim Meyering <jim@meyering.net>
* src/sort.c (MAX_FORK_RETRIES_COMPRESS, MAX_FORK_RETRIES_DECOMPRESS):
In pipe_fork callers, use these named constants, not "2" and "8".
(proctab, nprocs): Declare to be "static".
(pipe_fork) [lint]: Initialize local, pid,
to avoid unwarranted may-be-used-uninitialized warning.
(create_temp): Use the active voice. Describe parameters, too.
2007-01-21 James Youngman <jay@gnu.org>
Centralize all the uses of sigprocmask(). Don't restore an invalid
saved mask.
* src/sort.c (enter_cs, leave_cs): New functions for protecting
code sequences against signal delivery.
* (exit_cleanup): Use enter_cs and leave_cs instead of
calling sigprocmask directly.
(create_temp_file, pipe_fork, zaptemp): Likewise
2007-01-21 Dan Hipschman <dsh@linux.ucla.edu>
Add compression of temp files to sort.
* NEWS: Mention this.
* bootstrap.conf: Import findprog.
* configure.ac: Add AC_FUNC_FORK.
* doc/coreutils.texi: Document GNUSORT_COMPRESSOR environment
variable.
* src/sort.c (compress_program): New global, holds the name of the
external compression program.
(struct sortfile): New type used by mergepfs and friends instead
of filenames to hold PIDs of compressor processes.
(proctab): New global, holds compressor PIDs on which to wait.
(enum procstate, struct procnode): New types used by proctab.
(proctab_hasher, proctab_comparator): New functions for proctab.
(nprocs): New global, number of forked but unreaped children.
(reap, reap_some): New function, wait for/cleanup forked processes.
(register_proc, update_proc, wait_proc): New functions for adding,
modifying and removing proctab entries.
(create_temp_file): Change parameter type to pointer to file
descriptor, and return type to pointer to struct tempnode.
(dup2_or_die): New function used in create_temp and open_temp.
(pipe_fork): New function, creates a pipe and child process.
(create_temp): Creates a temp file and possibly a compression
program to which we filter output.
(open_temp): Opens a compressed temp file and creates a
decompression process through which to filter the input.
(mergefps): Change FILES parameter type to struct sortfile array
and update access accordingly. Use open_temp and reap_some.
(avoid_trashing_input, merge): Change FILES parameter like
mergefps and call create_temp instead of create_temp_file.
(sort): Call create_temp instead of create_temp_file.
Use reap_some.
(avoid_trashing_input, merge, sort, main): Adapt to mergefps.
The idea of compressing sorts temporary files was first
suggested/implemented by Jay Soffian in 1998, and again
by Charles Randall in 2001.
2007-01-20 Jim Meyering <jim@meyering.net>
* tests/misc/pwd-long: Work properly even when run from the
wrong one of two or more bind-mounted sibling directories.
Suggestion from Mike Stone in <http://bugs.debian.org/380552>.
2007-01-20 Paul Eggert <eggert@cs.ucla.edu>
Standardize on list of signals when an app catches signals.
* src/csplit.c (main): Also catch SIGALRM, SIGPIPE, SIGPOLL,
SIGPROF, SIGVTALRM, SIGXCPU, SIGXFSZ.
* src/ls.c (main): Likewise (except SIGPIPE was already caught).
Note that ls.c is special, as it also catches SIGTSTP.
* src/sort.c (main): Likewise. Also catch SIGQUIT. More details in
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9510>.
2007-01-19 Dan Hipschman <dsh@linux.ucla.edu>
and Paul Eggert <eggert@cs.ucla.edu>
* src/sort.c (cleanup): Clear temphead at the end.
(exit_cleanup): New function.
(main): Don't invoke atexit until we're ready.
Invoke it with exit_cleanup, not with cleanup and close_stdout,
to avoid a race condition with cleanup and signal handling. More
details: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9508
2007-01-18 Jim Meyering <jim@meyering.net>
* src/c99-to-c89.diff: Adjust remove.c offsets.
2007-01-17 Jim Meyering <jim@meyering.net>
Make "rm --interactive=never ..." never prompt.
* NEWS: Mention this.
* src/remove.h (enum rm_interactive): New ternary type.
(struct rm_options) [interactive]: Use it, here -- rather than bool.
* src/remove.c (prompt): Reflect type change.
* src/mv.c (rm_option_init): Initialize to RMI_NEVER now.
* src/rm.c (main): Add a FIXME comment for '-d' option.
Adapt to type change of rm_options.interactive.
* tests/rm/i-never: New file. Test for the above fix.
* tests/rm/Makefile.am (TESTS): Add i-never.
2007-01-15 Jim Meyering <jim@meyering.net>
* bootstrap (gnulib_tool): When adding to .cvsignore and .gitignore,
emit foo.h, for each foo_.h. This yields one false-positive, fts.h,
but that's ok, since fts_.h will eventually be renamed.
* src/remove.c (remove_dir): Don't use errno in diagnostic.
Root-only test failure reported by Alex van Hout and Jon Grosshart in
<http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/9415/focus=9415>.
* bootstrap.conf (avoided_gnulib_modules): Fix my typo:
s/--avoid=canonicalize-lgpl/--avoid=canonicalize-gpl/
2007-01-14 Bruno Haible <bruno@clisp.org>
Enable use of gnulib's new fchdir module.
* bootstrap.conf (avoided_gnulib_modules): Avoid canonicalize-lgpl,
since we use canonicalize.
(gnulib_modules): Add fchdir.
* m4/jm-macros.m4 (coreutils_MACROS): Remove fchdir-stub.
2007-01-13 Jim Meyering <jim@meyering.net>
* tests/cp/open-perm-race: Remove gdb-based test.
It would run only when compiled with -g, and besides is now
subsumed by file-perm-race.
* tests/cp/Makefile.am (TESTS): Remove open-perm-race.
* Transform all Makefile.am files so that when running "make check",
CU_TEST_NAME is set to the name of the test. This is so that when I
run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check"
on the entire package it is more convenient to map a leak or error
found in a valgrind log file back to the offending test.
Use this command:
(echo tests/Makefile.am.in; find tests -name Makefile.am) \
|xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \
-e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
2007-01-11 Jim Meyering <jim@meyering.net>
Avoid a leak in expr's implementation of the ":" (match) operator.
* src/expr.c (docolon): Free the regexp buffer using regfree, rather
than doing it manually, being careful to set fastmap to NULL first.
Free any re_regs.start and .end members, if necessary.
* tests/misc/test-diag: Work also when libc's error function
reports the entire program name ("../../src/test"), rather than
just the final component.
2007-01-10 Jim Meyering <jim@meyering.net>
Don't use fts_statp uninitialized for "chown -RLh --preserve-root ...".
* src/chown-core.c (FTSENT_IS_DIRECTORY): New macro.
(change_file_owner): Perform the ROOT_DEV_INO_CHECK only for a
directory. Non-directory entries lack fts_statp data when using
the FTS_NOSTAT option.
2007-01-07 Jim Meyering <jim@meyering.net>
* tests/sample-test: Update copyright date to 2007.
* Makefile.maint (copyright-check): Also check the copyright date
in tests/sample-test.
2007-01-06 Jim Meyering <jim@meyering.net>
* tests/fmt/basic (pfx-only, pfx-of-pfx): New tests,
based on examples from G.P. Halkes in
<http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9388>.
2007-01-06 G.P. Halkes <buscom@ghalkes.nl>
* src/fmt.c (copy_rest): Correct prefix handling.
Don't elide a line with the prefix followed by only white space.
(get_line): Move EOF-check to loop-termination condition.
* tests/fmt/basic (pfx-1): Adjust test to expect desired result.
(pfx-2): Remove test; its premise was contrary to the documentation.
2007-01-05 Jim Meyering <jim@meyering.net>
Avoid a used-uninitialized bug for invalid input, i.e., when the size
of the input, not counting newlines, is 1 % 4.
* gl/lib/base64.c (base64_decode): Don't hard-code inlen==4.
It may be smaller when flushing.
2007-01-05 Mike Frysinger <vapier@gentoo.org>
* src/dircolors.hin: Add a TERM directive for cons25.
2007-01-04 Jim Meyering <jim@meyering.net>
* Makefile.cfg (local-checks-to-skip): Skip strftime-check, in
case you don't have convenient access to glibc info documentation.
Use the release year, not the current year.
* src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
* src/Makefile.am (RELEASE_YEAR): Define it.
(.sh): Use it.
Thanks to a prod from Eric Blake.
Ensure that "group --version" always prints the current year.
* src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
* src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
Suggestion from Eric Blake.
When decoding, always allow newlines in input, with almost no
performance impact.
* src/base64.c (do_decode): Initialize decode context.
Call base64_decode one more time, after all input is processed.
(usage): When decoding, newlines are always accepted.
* tests/misc/base64: Add a bunch of tests, for the above.
* gl/lib/base64.c: Include <string.h>.
(base64_decode_ctx_init, get_4, decode_4): New functions.
(base64_decode): Efficiently handle interspersed newlines.
(base64_decode_alloc): Update signature.
* gl/lib/base64.h (struct base64_decode_context): Define.
(base64_decode_ctx_init): Add prototype.
(base64_decode, base64_decode_alloc): Update prototypes.
* gl/lib/base64.c: Copied from gnulib.
* gl/lib/base64.h: Likewise.
2007-01-03 Jim Meyering <jim@meyering.net>
* THANKS: Add Evan Hunt.
2007-01-03 Bruno Haible <bruno@clisp.org>
Avoid spurious test failures on MacOS X 10.3.9, in a German locale.
* tests/chown/deref: Apply lang-default.
* tests/misc/split-a: Likewise.
* tests/mv/reply-no: Likewise.
* src/copy.c (copy_internal): Use mkfifo as a fallback if mknod fails.
Needed on MacOS X.
2007-01-02 Paul Eggert <eggert@cs.ucla.edu>
Now, "ls -FRL" always follows symbolic links on Linux.
* NEWS: Mention this bug fix.
* src/ls.c (gobble_file): Fix bug reported by
Nobuyuki Tsuchimura in
http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00152.html
where "ls -FRL" didn't follow a symbolic link in some cases on Linux.
* tests/ls/follow-slink: Add a test for this case.
2007-01-01 Jim Meyering <jim@meyering.net>
* tests/rm/fail-eperm: Revert last change. The PATH=... setting
is not honored at least on HP-UX 11.23 systems.
Instead, simply transform the actual output diagnostic.
Test failure reported by Bob Proulx.
-----
Copyright (C) 2007 Free Software Foundation, Inc.
Copying and distribution of this file, with or without
modification, are permitted provided the copyright notice
and this notice are preserved.
|